@cdmx/wappler_ag_grid 0.3.2 → 0.3.4
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/app_connect/components.hjson +56 -22
- package/dmx-ag-grid.js +55 -56
- package/package.json +1 -1
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"variables": [
|
|
92
92
|
{
|
|
93
93
|
"name": "minWidth",
|
|
94
|
-
"attribute": "
|
|
94
|
+
"attribute": "min_width",
|
|
95
95
|
"title": "Minimum Width",
|
|
96
96
|
"type": "number",
|
|
97
97
|
"defaultValue": 150,
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "floatingFilter",
|
|
126
|
-
"attribute": "dmx-bind:
|
|
126
|
+
"attribute": "dmx-bind:floating_filter",
|
|
127
127
|
"title": "Floating Filter",
|
|
128
128
|
"type": "boolean",
|
|
129
129
|
"defaultValue": true,
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"name": "exportToCSV",
|
|
134
|
-
"attribute": "dmx-bind:
|
|
134
|
+
"attribute": "dmx-bind:export_to_csv",
|
|
135
135
|
"title": "CSV Export",
|
|
136
136
|
"type": "boolean",
|
|
137
137
|
"defaultValue": true,
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
"name": "columnHoverHighlight",
|
|
150
|
-
"attribute": "dmx-bind:
|
|
150
|
+
"attribute": "dmx-bind:column_hover_highlight",
|
|
151
151
|
"title": "Column Hover Highlight",
|
|
152
152
|
"type": "boolean",
|
|
153
153
|
"defaultValue": true,
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
"name": "suppressRowDeselection",
|
|
158
|
-
"attribute": "dmx-bind:
|
|
158
|
+
"attribute": "dmx-bind:suppress_row_deselection",
|
|
159
159
|
"title": "Supress Row Deselection",
|
|
160
160
|
"type": "boolean",
|
|
161
161
|
"defaultValue": false,
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"name": "paginationPageSize",
|
|
174
|
-
"attribute": "
|
|
174
|
+
"attribute": "pagination_page_size",
|
|
175
175
|
"title": "Pagination Page Size",
|
|
176
176
|
"type": "number",
|
|
177
177
|
"defaultValue": 20,
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
"name": "fixedHeader",
|
|
250
|
-
"attribute": "dmx-bind:
|
|
250
|
+
"attribute": "dmx-bind:fixed_header",
|
|
251
251
|
"title": "Sticky Header",
|
|
252
252
|
"type": "boolean",
|
|
253
253
|
"display": "fieldset",
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
"children": [
|
|
263
263
|
{
|
|
264
264
|
"name": "fixedHeaderOffset",
|
|
265
|
-
"attribute": "
|
|
265
|
+
"attribute": "fixed_header_offset",
|
|
266
266
|
"title": "Header Offset",
|
|
267
267
|
"type": "number",
|
|
268
268
|
"initDisplay": "none",
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
"name": "topbarClass",
|
|
274
|
-
"attribute": "
|
|
274
|
+
"attribute": "topbar_class",
|
|
275
275
|
"title": "Topbar Class",
|
|
276
276
|
"type": "text",
|
|
277
277
|
"initDisplay": "none",
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
282
|
"name": "fixedTopOffset",
|
|
283
|
-
"attribute": "
|
|
283
|
+
"attribute": "fixed_top_offset",
|
|
284
284
|
"title": "Topbar Offset",
|
|
285
285
|
"type": "number",
|
|
286
286
|
"initDisplay": "none",
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
"name": "rowHeight",
|
|
294
|
-
"attribute": "
|
|
294
|
+
"attribute": "row_height",
|
|
295
295
|
"title": "Row Height",
|
|
296
296
|
"type": "number",
|
|
297
297
|
"defaultValue": 25,
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"name": "headerHeight",
|
|
302
|
-
"attribute": "
|
|
302
|
+
"attribute": "header_height",
|
|
303
303
|
"title": "Header Height",
|
|
304
304
|
"type": "number",
|
|
305
305
|
"defaultValue": 30,
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"name": "suppressRowClickSelection",
|
|
310
|
-
"attribute": "dmx-bind:
|
|
310
|
+
"attribute": "dmx-bind:suppress_row_click_selection",
|
|
311
311
|
"title": "Suppress Row Click Selection",
|
|
312
312
|
"type": "boolean",
|
|
313
313
|
"defaultValue": false,
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
317
|
"name": "suppressMenuHide",
|
|
318
|
-
"attribute": "dmx-bind:
|
|
318
|
+
"attribute": "dmx-bind:suppress_menu_hide",
|
|
319
319
|
"title": "Suppress Menu Hide",
|
|
320
320
|
"type": "boolean",
|
|
321
321
|
"defaultValue": false,
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
"name": "suppressMovableColumns",
|
|
326
|
-
"attribute": "dmx-bind:
|
|
326
|
+
"attribute": "dmx-bind:suppress_movable_columns",
|
|
327
327
|
"title": "Suppress Movable Columns",
|
|
328
328
|
"type": "boolean",
|
|
329
329
|
"defaultValue": false,
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"name": "enableCellExpressions",
|
|
334
|
-
"attribute": "dmx-bind:
|
|
334
|
+
"attribute": "dmx-bind:enable_cell_expressions",
|
|
335
335
|
"title": "Enable Cell Expressions",
|
|
336
336
|
"type": "boolean",
|
|
337
337
|
"defaultValue": false,
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"name": "animateRows",
|
|
342
|
-
"attribute": "dmx-bind:
|
|
342
|
+
"attribute": "dmx-bind:animate_rows",
|
|
343
343
|
"title": "Animate Rows",
|
|
344
344
|
"type": "boolean",
|
|
345
345
|
"defaultValue": false,
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
349
|
"name": "suppressAggFuncInHeader",
|
|
350
|
-
"attribute": "dmx-bind:
|
|
350
|
+
"attribute": "dmx-bind:suppress_agg_func_in_header",
|
|
351
351
|
"title": "Suppress Aggregation Function in Header",
|
|
352
352
|
"type": "boolean",
|
|
353
353
|
"defaultValue": false,
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"name": "suppressAggAtRootLevel",
|
|
358
|
-
"attribute": "dmx-bind:
|
|
358
|
+
"attribute": "dmx-bind:suppress_agg_at_root_level",
|
|
359
359
|
"title": "Suppress Aggregation at Root Level",
|
|
360
360
|
"type": "boolean",
|
|
361
361
|
"defaultValue": false,
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
"name": "suppressClipboardPaste",
|
|
366
|
-
"attribute": "dmx-bind:
|
|
366
|
+
"attribute": "dmx-bind:suppress_clipboard_paste",
|
|
367
367
|
"title": "Suppress Clipboard Paste",
|
|
368
368
|
"type": "boolean",
|
|
369
369
|
"defaultValue": false,
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"name": "suppressScrollOnNewData",
|
|
374
|
-
"attribute": "dmx-bind:
|
|
374
|
+
"attribute": "dmx-bind:suppress_scroll_on_new_data",
|
|
375
375
|
"title": "Suppress Scroll on New Data",
|
|
376
376
|
"type": "boolean",
|
|
377
377
|
"defaultValue": false,
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"name": "suppressPropertyNamesCheck",
|
|
382
|
-
"attribute": "dmx-bind:
|
|
382
|
+
"attribute": "dmx-bind:suppress_property_names_check",
|
|
383
383
|
"title": "Suppress Property Names Check",
|
|
384
384
|
"type": "boolean",
|
|
385
385
|
"defaultValue": false,
|
|
@@ -980,6 +980,40 @@
|
|
|
980
980
|
"dmx-ag-grid": true
|
|
981
981
|
}
|
|
982
982
|
},
|
|
983
|
+
{
|
|
984
|
+
"name": "dmx-ag-grid-pagination-page-size",
|
|
985
|
+
"attributeStartsWith": "dmx-bind",
|
|
986
|
+
"attribute": "pagination_page_size",
|
|
987
|
+
"title": "Pagination Page Size",
|
|
988
|
+
"type": "boolean",
|
|
989
|
+
"display": "fieldset",
|
|
990
|
+
"icon": "fa fa-lg fa-chevron-right",
|
|
991
|
+
"groupTitle": "Grid Config",
|
|
992
|
+
"groupIcon": "fa fa-lg fa-cubes",
|
|
993
|
+
"defaultValue": false,
|
|
994
|
+
"show": [
|
|
995
|
+
"paginationPageSize"
|
|
996
|
+
],
|
|
997
|
+
"noChangeOnHide": true,
|
|
998
|
+
"groupEnabler": true,
|
|
999
|
+
"children": [
|
|
1000
|
+
{
|
|
1001
|
+
"name": "paginationPageSize",
|
|
1002
|
+
"attributeStartsWith": "dmx-bind",
|
|
1003
|
+
"attribute": "pagination_page_size",
|
|
1004
|
+
"isValue": true,
|
|
1005
|
+
"dataBindings": true,
|
|
1006
|
+
"title": "Pagination Page Size:",
|
|
1007
|
+
"type": "text",
|
|
1008
|
+
"help": "Pagination Page Size.",
|
|
1009
|
+
"defaultValue": "",
|
|
1010
|
+
"initDisplay": "none"
|
|
1011
|
+
}
|
|
1012
|
+
],
|
|
1013
|
+
"allowedOn": {
|
|
1014
|
+
"dmx-ag-grid": true
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
983
1017
|
{
|
|
984
1018
|
"name": "dmx-ag-grid-locale",
|
|
985
1019
|
"attributeStartsWith": "dmx-bind",
|
package/dmx-ag-grid.js
CHANGED
|
@@ -8,7 +8,6 @@ dmx.Component('ag-grid', {
|
|
|
8
8
|
|
|
9
9
|
attributes: {
|
|
10
10
|
id: { default: null },
|
|
11
|
-
rowData: { type: Array, default: [] },
|
|
12
11
|
grid_theme: { type: String, default: 'ag-theme-alpine' },
|
|
13
12
|
column_defs: { type: Array, default: [] },
|
|
14
13
|
cstyles: { type: Array, default: [] },
|
|
@@ -16,39 +15,39 @@ dmx.Component('ag-grid', {
|
|
|
16
15
|
cwidths: { type: Object, default: {} },
|
|
17
16
|
data_changes: { type: Array, default: [] },
|
|
18
17
|
data: { type: Array, default: [] },
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
dom_layout: { type: String, default: 'autoHeight' },
|
|
19
|
+
enable_cell_text_selection: { type: Boolean, default: true },
|
|
20
|
+
row_selection: { type: String, default: 'single' },
|
|
21
|
+
suppress_row_deselection: { type: Boolean, default: false },
|
|
23
22
|
pagination: { type: Boolean, default: true },
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
pagination_page_size: { type: Number, default: 20 },
|
|
24
|
+
row_height: { type: Number, default: null },
|
|
25
|
+
header_height: { type: Number, default: null },
|
|
26
|
+
suppress_row_click_selection: { type: Boolean, default: false },
|
|
27
|
+
suppress_menu_hide: { type: Boolean, default: false },
|
|
28
|
+
suppress_movable_columns: { type: Boolean, default: false },
|
|
29
|
+
enable_cell_expressions: { type: Boolean, default: false },
|
|
30
|
+
animate_rows: { type: Boolean, default: false },
|
|
31
|
+
suppress_agg_func_in_header: { type: Boolean, default: false },
|
|
32
|
+
suppress_agg_at_root_level: { type: Boolean, default: false },
|
|
33
|
+
suppress_clipboard_paste: { type: Boolean, default: false },
|
|
34
|
+
suppress_scroll_on_new_data: { type: Boolean, default: false },
|
|
35
|
+
suppress_property_names_check: { type: Boolean, default: false },
|
|
37
36
|
hide_id_field: { type: Boolean, default: false },
|
|
38
37
|
enable_rtl: { type: Boolean, default: false },
|
|
39
38
|
locale_text: { type: Text, default: null },
|
|
40
|
-
|
|
39
|
+
min_width: { type: Number, default: 150 },
|
|
41
40
|
sortable: { type: Boolean, default: true },
|
|
42
41
|
resizable: { type: Boolean, default: true },
|
|
43
42
|
filter: { type: Boolean, default: true },
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
floating_filter: { type: Boolean, default: true },
|
|
44
|
+
column_hover_highlight: { type: Boolean, default: true },
|
|
45
|
+
export_to_csv: { type: Boolean, default: true },
|
|
46
|
+
fixed_header: { type: Boolean, default: false },
|
|
47
|
+
topbar_class: { type: Text, default: 'topbar' },
|
|
48
|
+
fixed_header_offset: { type: Number, default: 100 },
|
|
49
|
+
fixed_top_offset: { type: Number, default: 80 },
|
|
50
|
+
fixed_horizonatal_scroll: { type: Boolean, default: false },
|
|
52
51
|
timezone: {type: Text, default: '' },
|
|
53
52
|
cell_click_event: {type: Boolean, default: false },
|
|
54
53
|
row_click_event: {type: Boolean, default: false },
|
|
@@ -67,7 +66,6 @@ dmx.Component('ag-grid', {
|
|
|
67
66
|
view_action_icon_class: {type: String, default: 'fas fa-eye' },
|
|
68
67
|
view_action_btn_class: {type: String, default: 'btn-info btn-xs' },
|
|
69
68
|
data_binded_changes: {type: Array, default: [] }
|
|
70
|
-
|
|
71
69
|
},
|
|
72
70
|
|
|
73
71
|
methods: {
|
|
@@ -86,8 +84,13 @@ dmx.Component('ag-grid', {
|
|
|
86
84
|
const options = this.props
|
|
87
85
|
const rowData = this.props.data;
|
|
88
86
|
const timezone = this.props.timezone || false;
|
|
87
|
+
const cnames = this.props.cnames
|
|
88
|
+
const cwidths = this.props.cwidths
|
|
89
|
+
const enableRowClickEvent = this.props.row_click_event;
|
|
90
|
+
const enableCellClickEvent = this.props.cell_click_event;
|
|
91
|
+
let localeText;
|
|
89
92
|
let columnDefs = [];
|
|
90
|
-
let exportToCSV = this.props.
|
|
93
|
+
let exportToCSV = this.props.export_to_csv;
|
|
91
94
|
this.$node.innerHTML = `<div id=${options.id}-grid class="${options.grid_theme}"></div>`;
|
|
92
95
|
if (!rowData || rowData.length === 0) {
|
|
93
96
|
console.error('No row data provided.');
|
|
@@ -431,10 +434,7 @@ dmx.Component('ag-grid', {
|
|
|
431
434
|
|
|
432
435
|
return null;
|
|
433
436
|
}
|
|
434
|
-
|
|
435
|
-
cwidths = this.props.cwidths
|
|
436
|
-
enableRowClickEvent = this.props.row_click_event;
|
|
437
|
-
enableCellClickEvent = this.props.cell_click_event;
|
|
437
|
+
|
|
438
438
|
if (cnames.hasOwnProperty(key)) {
|
|
439
439
|
const cname = cnames[key]
|
|
440
440
|
headerName = cname ? cname.custom_name : humanize(key);
|
|
@@ -540,7 +540,6 @@ dmx.Component('ag-grid', {
|
|
|
540
540
|
|
|
541
541
|
columnDefs.push(actionsColumn);
|
|
542
542
|
}
|
|
543
|
-
let localeText;
|
|
544
543
|
if (options.locale_text == 'HE') {
|
|
545
544
|
localeText = AG_GRID_LOCALE_HE
|
|
546
545
|
}
|
|
@@ -553,32 +552,32 @@ dmx.Component('ag-grid', {
|
|
|
553
552
|
rowStyle: enableRowClickEvent ? { cursor: 'pointer' } : undefined,
|
|
554
553
|
defaultColDef: {
|
|
555
554
|
flex: 1,
|
|
556
|
-
minWidth: this.props.
|
|
555
|
+
minWidth: this.props.min_width,
|
|
557
556
|
resizable: this.props.resizable,
|
|
558
557
|
filter: this.props.filter,
|
|
559
558
|
sortable: this.props.sortable,
|
|
560
|
-
floatingFilter: this.props.
|
|
559
|
+
floatingFilter: this.props.floating_filter
|
|
561
560
|
},
|
|
562
|
-
domLayout:
|
|
561
|
+
domLayout: this.props.dom_layout,
|
|
563
562
|
enableCellTextSelection: true,
|
|
564
|
-
rowSelection: this.props.
|
|
565
|
-
suppressRowDeselection: this.props.
|
|
563
|
+
rowSelection: this.props.row_selection,
|
|
564
|
+
suppressRowDeselection: this.props.suppress_row_deselection,
|
|
566
565
|
pagination: this.props.pagination,
|
|
567
|
-
paginationPageSize: this.props.
|
|
568
|
-
rowHeight: this.props.
|
|
569
|
-
headerHeight: this.props.
|
|
570
|
-
suppressRowClickSelection: this.props.
|
|
571
|
-
suppressMenuHide: this.props.
|
|
572
|
-
suppressMovableColumns: this.props.
|
|
573
|
-
enableCellExpressions: this.props.
|
|
574
|
-
animateRows: this.props.
|
|
575
|
-
suppressAggFuncInHeader: this.props.
|
|
576
|
-
suppressAggAtRootLevel: this.props.
|
|
577
|
-
suppressClipboardPaste: this.props.
|
|
578
|
-
suppressScrollOnNewData: this.props.
|
|
579
|
-
suppressPropertyNamesCheck: this.props.
|
|
580
|
-
suppressRowDeselection: this.props.
|
|
581
|
-
columnHoverHighlight: this.props.
|
|
566
|
+
paginationPageSize: this.props.pagination_page_size,
|
|
567
|
+
rowHeight: this.props.row_height,
|
|
568
|
+
headerHeight: this.props.header_height,
|
|
569
|
+
suppressRowClickSelection: this.props.suppress_row_click_selection,
|
|
570
|
+
suppressMenuHide: this.props.suppress_menu_hide,
|
|
571
|
+
suppressMovableColumns: this.props.suppress_movable_columns,
|
|
572
|
+
enableCellExpressions: this.props.enable_cell_expressions,
|
|
573
|
+
animateRows: this.props.animate_rows,
|
|
574
|
+
suppressAggFuncInHeader: this.props.suppress_agg_func_in_header,
|
|
575
|
+
suppressAggAtRootLevel: this.props.suppress_agg_at_root_level,
|
|
576
|
+
suppressClipboardPaste: this.props.suppress_clipboard_paste,
|
|
577
|
+
suppressScrollOnNewData: this.props.suppress_scroll_on_new_data,
|
|
578
|
+
suppressPropertyNamesCheck: this.props.suppress_property_names_check,
|
|
579
|
+
suppressRowDeselection: this.props.suppress_row_deselection,
|
|
580
|
+
columnHoverHighlight: this.props.column_hover_highlight,
|
|
582
581
|
components: {
|
|
583
582
|
clickCellRenderer: clickCellRenderer,
|
|
584
583
|
checkboxCellRenderer: checkboxCellRenderer,
|
|
@@ -626,10 +625,10 @@ dmx.Component('ag-grid', {
|
|
|
626
625
|
console.error('Grid container not found.');
|
|
627
626
|
return;
|
|
628
627
|
}
|
|
629
|
-
if (options.
|
|
628
|
+
if (options.fixed_header) {
|
|
630
629
|
window.addEventListener('scroll', function () {
|
|
631
630
|
const header = document.querySelector('.ag-header');
|
|
632
|
-
const topbar = document.querySelector('.' + options.
|
|
631
|
+
const topbar = document.querySelector('.' + options.topbar_class);
|
|
633
632
|
const topbarHeight = (topbar ? topbar.getBoundingClientRect().height : 0) + options.fixedTopOffset;
|
|
634
633
|
const headerPos = (topbar ? topbar.getBoundingClientRect().bottom : 0) + options.fixedHeaderOffset;
|
|
635
634
|
|