@cdmx/wappler_ag_grid 0.0.3 → 0.0.5

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.
@@ -9,7 +9,7 @@
9
9
  "icon": "fa fa-lg fa-table",
10
10
  "state": "opened",
11
11
  "anyParent": true,
12
- "template": "<dmx-ag-grid id=\"@@id@@-grid\">\n<div id=\"@@id@@\" class=\"col ag-theme-alpine\">\n</div>\n</dmx-ag-grid>",
12
+ "template": "<dmx-ag-grid id=\"@@id@@\"></dmx-ag-grid>",
13
13
  "baseName": "aggrid",
14
14
  "help": "AG Grid component for data display",
15
15
  "dataScheme": [
@@ -56,35 +56,6 @@
56
56
  {
57
57
  "group": "AG Grid Options",
58
58
  "variables": [
59
- {
60
- "name": "defaultColDef",
61
- "attribute": "defaultColDef",
62
- "title": "Default Column Definition",
63
- "type": "object",
64
- "defaultValue": {},
65
- "help": "Default properties for all columns"
66
- },
67
- {
68
- "name": "columnTypes",
69
- "attribute": "columnTypes",
70
- "title": "Column Types",
71
- "type": "object",
72
- "defaultValue": {},
73
- "help": "Map of custom column types"
74
- },
75
- {
76
- "name": "rowSelection",
77
- "attribute": "rowSelection",
78
- "title": "Row Selection",
79
- "type": "string",
80
- "defaultValue": "single",
81
- "options": [
82
- "single",
83
- "multiple",
84
- "none"
85
- ],
86
- "help": "Defines the row selection mode"
87
- },
88
59
  {
89
60
  "name": "minWidth",
90
61
  "attribute": "minWidth",
@@ -95,7 +66,7 @@
95
66
  },
96
67
  {
97
68
  "name": "resizable",
98
- "attribute": "resizable",
69
+ "attribute": "dmx-bind:resizable",
99
70
  "title": "Resizable",
100
71
  "type": "boolean",
101
72
  "defaultValue": true,
@@ -103,7 +74,7 @@
103
74
  },
104
75
  {
105
76
  "name": "sortable",
106
- "attribute": "sortable",
77
+ "attribute": "dmx-bind:sortable",
107
78
  "title": "Sortable",
108
79
  "type": "boolean",
109
80
  "defaultValue": true,
@@ -111,7 +82,7 @@
111
82
  },
112
83
  {
113
84
  "name": "filter",
114
- "attribute": "filter",
85
+ "attribute": "dmx-bind:filter",
115
86
  "title": "Filter",
116
87
  "type": "boolean",
117
88
  "defaultValue": true,
@@ -119,7 +90,7 @@
119
90
  },
120
91
  {
121
92
  "name": "floatingFilter",
122
- "attribute": "floatingFilter",
93
+ "attribute": "dmx-bind:floatingFilter",
123
94
  "title": "Floating Filter",
124
95
  "type": "boolean",
125
96
  "defaultValue": true,
@@ -127,7 +98,7 @@
127
98
  },
128
99
  {
129
100
  "name": "exportToCSV",
130
- "attribute": "exportToCSV",
101
+ "attribute": "dmx-bind:exportToCSV",
131
102
  "title": "CSV Export",
132
103
  "type": "boolean",
133
104
  "defaultValue": true,
@@ -135,7 +106,7 @@
135
106
  },
136
107
  {
137
108
  "name": "columnHoverHighlight",
138
- "attribute": "columnHoverHighlight",
109
+ "attribute": "dmx-bind:columnHoverHighlight",
139
110
  "title": "Column Hover Highlight",
140
111
  "type": "boolean",
141
112
  "defaultValue": true,
@@ -143,7 +114,7 @@
143
114
  },
144
115
  {
145
116
  "name": "suppressRowDeselection",
146
- "attribute": "suppressRowDeselection",
117
+ "attribute": "dmx-bind:suppressRowDeselection",
147
118
  "title": "Supress Row Deselection",
148
119
  "type": "boolean",
149
120
  "defaultValue": true,
@@ -151,7 +122,7 @@
151
122
  },
152
123
  {
153
124
  "name": "pagination",
154
- "attribute": "pagination",
125
+ "attribute": "dmx-bind:pagination",
155
126
  "title": "Pagination",
156
127
  "type": "boolean",
157
128
  "defaultValue": true,
package/dmx-ag-grid.js CHANGED
@@ -62,87 +62,31 @@ dmx.Component('ag-grid', {
62
62
  suppressRowClickSelection: { type: Boolean, default: false },
63
63
  suppressMenuHide: { type: Boolean, default: false },
64
64
  suppressMovableColumns: { type: Boolean, default: false },
65
- enableCellExpressions: {
66
- type: Boolean,
67
- default: false
68
- },
69
- animateRows: {
70
- type: Boolean,
71
- default: false
72
- },
73
- suppressAggFuncInHeader: {
74
- type: Boolean,
75
- default: false
76
- },
77
- suppressAggAtRootLevel: {
78
- type: Boolean,
79
- default: false
80
- },
81
- suppressClipboardPaste: {
82
- type: Boolean,
83
- default: false
84
- },
85
- suppressScrollOnNewData: {
86
- type: Boolean,
87
- default: false
88
- },
89
- suppressPropertyNamesCheck: {
90
- type: Boolean,
91
- default: false
92
- },
93
- localeText: {
94
- default: null
95
- },
96
- minWidth: {
97
- type: Number,
98
- default: 150
99
- },
100
- sortable: {
101
- type: Boolean,
102
- default: true
103
- },
104
- resizable: {
105
- type: Boolean,
106
- default: true
107
- },
108
- filter: {
109
- type: Boolean,
110
- default: true
111
- },
112
- floatingFilter: {
113
- type: Boolean,
114
- default: true
115
- },
116
- columnHoverHighlight: {
117
- type: Boolean,
118
- default: true
119
- },
120
- exportToCSV: {
121
- type: Boolean,
122
- default: true
123
- },
124
- fixedHeader: {
125
- type: Boolean,
126
- default: false
127
- },
128
- topbarClass: {
129
- type: Text,
130
- default: 'topbar'
131
- },
132
- fixedHeaderOffset: {
133
- type: Number,
134
- default: 100
135
- },
136
- fixedTopOffset: {
137
- type: Number,
138
- default: 80
139
- },
65
+ enableCellExpressions: { type: Boolean, default: false },
66
+ animateRows: { type: Boolean, default: false },
67
+ suppressAggFuncInHeader: { type: Boolean, default: false },
68
+ suppressAggAtRootLevel: { type: Boolean, default: false },
69
+ suppressClipboardPaste: { type: Boolean, default: false },
70
+ suppressScrollOnNewData: { type: Boolean, default: false },
71
+ suppressPropertyNamesCheck: { type: Boolean, default: false },
72
+ localeText: { default: null },
73
+ minWidth: { type: Number, default: 150 },
74
+ sortable: { type: Boolean, default: true },
75
+ resizable: { type: Boolean, default: true },
76
+ filter: { type: Boolean, default: true },
77
+ floatingFilter: { type: Boolean, default: true },
78
+ columnHoverHighlight: { type: Boolean, default: true },
79
+ exportToCSV: { type: Boolean, default: true },
80
+ fixedHeader: { type: Boolean, default: false },
81
+ topbarClass: { type: Text, default: 'topbar' },
82
+ fixedHeaderOffset: { type: Number, default: 100 },
83
+ fixedTopOffset: { type: Number, default: 80 },
140
84
  fixedHorizonatalScroll: { type: Boolean, default: false },
141
85
  timezone: {type: Text, default: '' }
142
86
  },
143
87
 
144
88
  methods: {
145
- setData: function (rowData, columnDefs) {
89
+ setValue: function (rowData, columnDefs) {
146
90
  this.set('rowData', rowData);
147
91
  this.set('columnDefs', columnDefs);
148
92
  this.refreshGrid();
@@ -160,6 +104,9 @@ dmx.Component('ag-grid', {
160
104
  const dataChanges = this.props.data_changes;
161
105
  let columnDefs = [];
162
106
  let exportToCSV = this.props.exportToCSV;
107
+
108
+
109
+ this.$node.innerHTML = `<div id=${gridId +'-grid'}></div>`
163
110
  if (!rowData || rowData.length === 0) {
164
111
  console.error('No row data provided.');
165
112
  return;
@@ -423,10 +370,9 @@ const cstyles = this.props.cstyles
423
370
  rowData: rowData,
424
371
  ...gridOptions
425
372
  };
426
-
427
373
  // Create ag-Grid instance
428
374
  new agGrid.Grid(gridDiv, gridConfig);
429
- const gridElement = document.querySelector('.ag-theme-alpine');
375
+ const gridElement = document.getElementById(gridId+'-grid');
430
376
  const gridContainer = gridElement.parentNode;
431
377
 
432
378
  if (!gridContainer) {
@@ -486,13 +432,13 @@ const cstyles = this.props.cstyles
486
432
  'dmx-ag-grid-row-data-updated': Event
487
433
  },
488
434
 
489
- render: function () {
490
- // this.refreshGrid();
435
+ render: function(node) {
436
+ if (this.$node) {
437
+ this.$parse();
438
+ }
491
439
  },
492
440
 
493
441
  update: function (props) {
494
- // dmx.equal is a helper function the does a deep compare
495
- // which is useful when comparing arrays and objects
496
442
  if (!dmx.equal(this.props.data, props.data)) {
497
443
  this.refreshGrid();
498
444
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation",
6
6
  "license": "MIT",