@lowdefy/blocks-aggrid 4.7.3 → 5.1.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.
- package/dist/AgGrid.js +12 -12
- package/dist/AgGridInput.js +11 -11
- package/dist/LoadingOverlay.js +42 -0
- package/dist/ag-grid-antd.module.css +107 -0
- package/dist/blocks/AgGridAlpine/AgGridAlpine.js +12 -14
- package/dist/blocks/AgGridAlpine/meta.js +407 -0
- package/dist/blocks/AgGridBalham/AgGridBalham.js +12 -14
- package/dist/blocks/AgGridBalham/meta.js +407 -0
- package/dist/blocks/AgGridInputAlpine/AgGridInputAlpine.js +12 -15
- package/dist/blocks/AgGridInputAlpine/meta.js +441 -0
- package/dist/blocks/AgGridInputBalham/AgGridInputBalham.js +12 -15
- package/dist/blocks/AgGridInputBalham/meta.js +441 -0
- package/dist/blocks/AgGridInputMaterial/AgGridInputMaterial.js +12 -15
- package/dist/blocks/AgGridInputMaterial/meta.js +441 -0
- package/dist/blocks/AgGridMaterial/AgGridMaterial.js +12 -14
- package/dist/blocks/AgGridMaterial/meta.js +407 -0
- package/dist/blocks.js +0 -4
- package/dist/cellRenderers/AvatarCell.js +115 -0
- package/dist/cellRenderers/BooleanCell.js +31 -0
- package/dist/cellRenderers/DateCell.js +36 -0
- package/dist/cellRenderers/EllipsisCell.js +37 -0
- package/dist/cellRenderers/LinkCell.js +68 -0
- package/dist/{blocks/AgGridAlpineDark/e2e.js → cellRenderers/NullCell.js} +10 -2
- package/dist/cellRenderers/NumberCell.js +76 -0
- package/dist/cellRenderers/ProgressCell.js +68 -0
- package/dist/cellRenderers/TagCell.js +67 -0
- package/dist/cellRenderers/index.js +34 -0
- package/dist/cellRenderers/resolveFieldRefs.js +40 -0
- package/dist/e2e.js +0 -4
- package/dist/{schemas.js → metas.js} +6 -10
- package/dist/processColDefs.js +80 -3
- package/dist/types.js +4 -16
- package/package.json +16 -11
- package/dist/blocks/AgGridAlpine/schema.js +0 -125
- package/dist/blocks/AgGridAlpine/schema.json +0 -105
- package/dist/blocks/AgGridAlpine/style.less +0 -18
- package/dist/blocks/AgGridAlpineDark/AgGridAlpineDark.js +0 -39
- package/dist/blocks/AgGridAlpineDark/schema.js +0 -125
- package/dist/blocks/AgGridAlpineDark/schema.json +0 -105
- package/dist/blocks/AgGridAlpineDark/style.less +0 -18
- package/dist/blocks/AgGridBalham/schema.js +0 -125
- package/dist/blocks/AgGridBalham/schema.json +0 -105
- package/dist/blocks/AgGridBalham/style.less +0 -18
- package/dist/blocks/AgGridBalhamDark/AgGridBalhamDark.js +0 -39
- package/dist/blocks/AgGridBalhamDark/e2e.js +0 -16
- package/dist/blocks/AgGridBalhamDark/schema.js +0 -125
- package/dist/blocks/AgGridBalhamDark/schema.json +0 -105
- package/dist/blocks/AgGridBalhamDark/style.less +0 -18
- package/dist/blocks/AgGridInputAlpine/schema.js +0 -146
- package/dist/blocks/AgGridInputAlpine/schema.json +0 -123
- package/dist/blocks/AgGridInputAlpine/style.less +0 -18
- package/dist/blocks/AgGridInputAlpineDark/AgGridInputAlpineDark.js +0 -44
- package/dist/blocks/AgGridInputAlpineDark/e2e.js +0 -16
- package/dist/blocks/AgGridInputAlpineDark/schema.js +0 -146
- package/dist/blocks/AgGridInputAlpineDark/schema.json +0 -123
- package/dist/blocks/AgGridInputAlpineDark/style.less +0 -18
- package/dist/blocks/AgGridInputBalham/schema.js +0 -146
- package/dist/blocks/AgGridInputBalham/schema.json +0 -123
- package/dist/blocks/AgGridInputBalham/style.less +0 -18
- package/dist/blocks/AgGridInputBalhamDark/AgGridInputBalhamDark.js +0 -44
- package/dist/blocks/AgGridInputBalhamDark/e2e.js +0 -16
- package/dist/blocks/AgGridInputBalhamDark/schema.js +0 -146
- package/dist/blocks/AgGridInputBalhamDark/schema.json +0 -123
- package/dist/blocks/AgGridInputBalhamDark/style.less +0 -18
- package/dist/blocks/AgGridInputMaterial/schema.js +0 -146
- package/dist/blocks/AgGridInputMaterial/schema.json +0 -123
- package/dist/blocks/AgGridInputMaterial/style.less +0 -18
- package/dist/blocks/AgGridMaterial/schema.js +0 -125
- package/dist/blocks/AgGridMaterial/schema.json +0 -105
- package/dist/blocks/AgGridMaterial/style.less +0 -18
|
@@ -0,0 +1,441 @@
|
|
|
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
|
+
*/ export default {
|
|
16
|
+
category: 'input',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: 'array',
|
|
19
|
+
cssKeys: {
|
|
20
|
+
element: 'The AgGridInputBalham element.'
|
|
21
|
+
},
|
|
22
|
+
events: {
|
|
23
|
+
onCellClick: {
|
|
24
|
+
description: 'Trigger event when a cell is clicked.',
|
|
25
|
+
event: {
|
|
26
|
+
cell: 'The clicked cell with column and value.',
|
|
27
|
+
colId: 'The column id.',
|
|
28
|
+
row: 'The row data.',
|
|
29
|
+
rowIndex: 'The row index.',
|
|
30
|
+
selected: 'All selected rows.'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
onFilterChanged: {
|
|
34
|
+
description: 'Trigger event when the filter changes.',
|
|
35
|
+
event: {
|
|
36
|
+
rows: 'The displayed rows after filtering.',
|
|
37
|
+
filter: 'The filter model.'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
onRowClick: {
|
|
41
|
+
description: 'Trigger event when a row is clicked.',
|
|
42
|
+
event: {
|
|
43
|
+
row: 'The row data.',
|
|
44
|
+
selected: 'All selected rows.',
|
|
45
|
+
rowIndex: 'The row index.'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
onRowSelected: {
|
|
49
|
+
description: 'Trigger event when a row is selected.',
|
|
50
|
+
event: {
|
|
51
|
+
row: 'The row data.',
|
|
52
|
+
rowIndex: 'The row index.',
|
|
53
|
+
selected: 'All selected rows.'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
onSelectionChanged: {
|
|
57
|
+
description: 'Triggered when the selected rows are changed.',
|
|
58
|
+
event: {
|
|
59
|
+
selected: 'All selected rows.'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
onSortChanged: {
|
|
63
|
+
description: 'Trigger event when the sort changes.',
|
|
64
|
+
event: {
|
|
65
|
+
rows: 'The displayed rows after sorting.',
|
|
66
|
+
sort: 'The sort column state.'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
onCellValueChanged: {
|
|
70
|
+
description: 'Triggered when a cell value is changed on the grid.',
|
|
71
|
+
event: {
|
|
72
|
+
field: 'The column field name.',
|
|
73
|
+
newRowData: 'All row data after the change.',
|
|
74
|
+
newValue: 'The new cell value.',
|
|
75
|
+
oldValue: 'The previous cell value.',
|
|
76
|
+
rowData: 'The changed row data.',
|
|
77
|
+
rowIndex: 'The row index.'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
onRowDragEnd: {
|
|
81
|
+
description: 'Triggered when a row is dragged to another position in the grid.',
|
|
82
|
+
event: {
|
|
83
|
+
fromData: 'The dragged row data.',
|
|
84
|
+
toData: 'The target row data.',
|
|
85
|
+
fromIndex: 'The original row index.',
|
|
86
|
+
toIndex: 'The new row index.',
|
|
87
|
+
newRowData: 'All row data after reorder.'
|
|
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
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
properties: {
|
|
100
|
+
type: 'object',
|
|
101
|
+
additionalProperties: false,
|
|
102
|
+
properties: {
|
|
103
|
+
height: {
|
|
104
|
+
type: [
|
|
105
|
+
'number',
|
|
106
|
+
'string'
|
|
107
|
+
],
|
|
108
|
+
default: 'auto',
|
|
109
|
+
description: 'Specify table height explicitly, in pixel.'
|
|
110
|
+
},
|
|
111
|
+
rowData: {
|
|
112
|
+
type: 'array',
|
|
113
|
+
description: 'The list of data to display on the table.'
|
|
114
|
+
},
|
|
115
|
+
rowId: {
|
|
116
|
+
type: 'string',
|
|
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/).'
|
|
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
|
+
},
|
|
134
|
+
defaultColDef: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
description: 'Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/).'
|
|
137
|
+
},
|
|
138
|
+
columnDefs: {
|
|
139
|
+
type: 'array',
|
|
140
|
+
description: 'A list of properties for each column.',
|
|
141
|
+
items: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
field: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
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'."
|
|
147
|
+
},
|
|
148
|
+
headerName: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
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.'
|
|
151
|
+
},
|
|
152
|
+
editable: {
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
default: false,
|
|
155
|
+
description: 'Set to true if this column is editable, otherwise false.'
|
|
156
|
+
},
|
|
157
|
+
rowDrag: {
|
|
158
|
+
type: [
|
|
159
|
+
'boolean',
|
|
160
|
+
'object'
|
|
161
|
+
],
|
|
162
|
+
default: false,
|
|
163
|
+
description: 'Set to true (or return true from function) to allow row dragging.'
|
|
164
|
+
},
|
|
165
|
+
filter: {
|
|
166
|
+
type: 'boolean',
|
|
167
|
+
default: false,
|
|
168
|
+
description: 'Filter component to use for this column. Set to true to use the default filter.'
|
|
169
|
+
},
|
|
170
|
+
sortable: {
|
|
171
|
+
type: 'boolean',
|
|
172
|
+
default: false,
|
|
173
|
+
description: 'Set to true to allow sorting on this column.'
|
|
174
|
+
},
|
|
175
|
+
resizable: {
|
|
176
|
+
type: 'boolean',
|
|
177
|
+
default: false,
|
|
178
|
+
description: 'Set to true to allow this column should be resized.'
|
|
179
|
+
},
|
|
180
|
+
width: {
|
|
181
|
+
type: 'number',
|
|
182
|
+
description: 'Initial width in pixels for the cell.'
|
|
183
|
+
},
|
|
184
|
+
cellStyle: {
|
|
185
|
+
type: 'number',
|
|
186
|
+
description: 'An object of css values returning an object of css values for a particular cell.'
|
|
187
|
+
},
|
|
188
|
+
cellRenderer: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
description: "Provide your own cell Renderer function (using the `_function` operator) for this column's cells."
|
|
191
|
+
},
|
|
192
|
+
valueFormatter: {
|
|
193
|
+
type: [
|
|
194
|
+
'object',
|
|
195
|
+
'string'
|
|
196
|
+
],
|
|
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
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -13,15 +13,20 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
|
+
import '@ag-grid-community/styles/ag-grid.css';
|
|
18
|
+
import '@ag-grid-community/styles/ag-theme-material.css';
|
|
19
|
+
import antdStyles from '../../ag-grid-antd.module.css';
|
|
17
20
|
import AgGridInput from '../../AgGridInput.js';
|
|
18
|
-
const AgGridInputMaterial = ({ blockId, events, loading, methods, properties, required, validation, value })
|
|
21
|
+
const AgGridInputMaterial = ({ blockId, events, loading, methods, properties, required, styles, validation, value })=>{
|
|
22
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
19
23
|
id: blockId,
|
|
20
|
-
className: `ag-theme-material ${
|
|
24
|
+
className: `ag-theme-material ${antdStyles.antdTheme}`,
|
|
25
|
+
style: {
|
|
21
26
|
width: '100%',
|
|
22
27
|
height: properties.height ?? 500,
|
|
23
|
-
...
|
|
24
|
-
}
|
|
28
|
+
...styles?.element
|
|
29
|
+
}
|
|
25
30
|
}, /*#__PURE__*/ React.createElement(AgGridInput, {
|
|
26
31
|
blockId: blockId,
|
|
27
32
|
events: events,
|
|
@@ -32,13 +37,5 @@ const AgGridInputMaterial = ({ blockId, events, loading, methods, properties, re
|
|
|
32
37
|
validation: validation,
|
|
33
38
|
value: value
|
|
34
39
|
}));
|
|
35
|
-
AgGridInputMaterial.defaultProps = blockDefaultProps;
|
|
36
|
-
AgGridInputMaterial.meta = {
|
|
37
|
-
category: 'input',
|
|
38
|
-
valueType: 'array',
|
|
39
|
-
icons: [],
|
|
40
|
-
styles: [
|
|
41
|
-
'blocks/AgGridInputMaterial/style.less'
|
|
42
|
-
]
|
|
43
40
|
};
|
|
44
|
-
export default AgGridInputMaterial;
|
|
41
|
+
export default withBlockDefaults(AgGridInputMaterial);
|