@cdmx/wappler_ag_grid 0.3.1 → 0.3.3

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/README.md CHANGED
@@ -17,4 +17,5 @@ This Custom Module provides the below features:
17
17
  14. Options to enable checkboxes for IDs for bulk select Operations
18
18
  15. Options to enable Toggle Sliders for status fields
19
19
  16. Added Action Buttons feature
20
- 17. Advanced Data Manipulation using Arrays and SC bindings
20
+ 17. Advanced Data Manipulation using Arrays and SC bindings
21
+ 18. Added RTL and Locale Controls
@@ -171,7 +171,7 @@
171
171
  },
172
172
  {
173
173
  "name": "paginationPageSize",
174
- "attribute": "paginationPageSize",
174
+ "attribute": "pagination_page_size",
175
175
  "title": "Pagination Page Size",
176
176
  "type": "number",
177
177
  "defaultValue": 20,
@@ -291,7 +291,7 @@
291
291
  },
292
292
  {
293
293
  "name": "rowHeight",
294
- "attribute": "rowHeight",
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": "headerHeight",
302
+ "attribute": "header_height",
303
303
  "title": "Header Height",
304
304
  "type": "number",
305
305
  "defaultValue": 30,
@@ -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",
@@ -1013,6 +1047,40 @@
1013
1047
  "allowedOn": {
1014
1048
  "dmx-ag-grid": true
1015
1049
  }
1050
+ },
1051
+ {
1052
+ "name": "dmx-ag-grid-rtl",
1053
+ "attributeStartsWith": "dmx-bind",
1054
+ "attribute": "enable_rtl",
1055
+ "title": "Enable RTL",
1056
+ "type": "boolean",
1057
+ "display": "fieldset",
1058
+ "icon": "fa fa-lg fa-chevron-right",
1059
+ "groupTitle": "Grid Config",
1060
+ "groupIcon": "fa fa-lg fa-cubes",
1061
+ "defaultValue": false,
1062
+ "show": [
1063
+ "enableRtl"
1064
+ ],
1065
+ "noChangeOnHide": true,
1066
+ "groupEnabler": true,
1067
+ "children": [
1068
+ {
1069
+ "name": "enableRtl",
1070
+ "attributeStartsWith": "dmx-bind",
1071
+ "attribute": "enable_rtl",
1072
+ "isValue": true,
1073
+ "dataBindings": true,
1074
+ "title": "RTL:",
1075
+ "type": "text",
1076
+ "help": "Locale.",
1077
+ "defaultValue": "",
1078
+ "initDisplay": "none"
1079
+ }
1080
+ ],
1081
+ "allowedOn": {
1082
+ "dmx-ag-grid": true
1083
+ }
1016
1084
  }
1017
1085
  ],
1018
1086
  "events": [
package/dmx-ag-grid.js CHANGED
@@ -21,9 +21,9 @@ dmx.Component('ag-grid', {
21
21
  rowSelection: { type: String, default: 'single' },
22
22
  suppressRowDeselection: { type: Boolean, default: false },
23
23
  pagination: { type: Boolean, default: true },
24
- paginationPageSize: { default: 20 },
25
- rowHeight: { type: Number, default: null },
26
- headerHeight: { type: Number, default: null },
24
+ pagination_page_size: { type: Number, default: 20 },
25
+ row_height: { type: Number, default: null },
26
+ header_height: { type: Number, default: null },
27
27
  suppressRowClickSelection: { type: Boolean, default: false },
28
28
  suppressMenuHide: { type: Boolean, default: false },
29
29
  suppressMovableColumns: { type: Boolean, default: false },
@@ -86,6 +86,11 @@ dmx.Component('ag-grid', {
86
86
  const options = this.props
87
87
  const rowData = this.props.data;
88
88
  const timezone = this.props.timezone || false;
89
+ const cnames = this.props.cnames
90
+ const cwidths = this.props.cwidths
91
+ const enableRowClickEvent = this.props.row_click_event;
92
+ const enableCellClickEvent = this.props.cell_click_event;
93
+ let localeText;
89
94
  let columnDefs = [];
90
95
  let exportToCSV = this.props.exportToCSV;
91
96
  this.$node.innerHTML = `<div id=${options.id}-grid class="${options.grid_theme}"></div>`;
@@ -431,10 +436,7 @@ dmx.Component('ag-grid', {
431
436
 
432
437
  return null;
433
438
  }
434
- cnames = this.props.cnames
435
- cwidths = this.props.cwidths
436
- enableRowClickEvent = this.props.row_click_event;
437
- enableCellClickEvent = this.props.cell_click_event;
439
+
438
440
  if (cnames.hasOwnProperty(key)) {
439
441
  const cname = cnames[key]
440
442
  headerName = cname ? cname.custom_name : humanize(key);
@@ -540,7 +542,6 @@ dmx.Component('ag-grid', {
540
542
 
541
543
  columnDefs.push(actionsColumn);
542
544
  }
543
- let localeText;
544
545
  if (options.locale_text == 'HE') {
545
546
  localeText = AG_GRID_LOCALE_HE
546
547
  }
@@ -564,9 +565,9 @@ dmx.Component('ag-grid', {
564
565
  rowSelection: this.props.rowSelection,
565
566
  suppressRowDeselection: this.props.suppressRowDeselection,
566
567
  pagination: this.props.pagination,
567
- paginationPageSize: this.props.paginationPageSize,
568
- rowHeight: this.props.rowHeight,
569
- headerHeight: this.props.headerHeight,
568
+ paginationPageSize: this.props.pagination_page_size,
569
+ rowHeight: this.props.row_height,
570
+ headerHeight: this.props.header_height,
570
571
  suppressRowClickSelection: this.props.suppressRowClickSelection,
571
572
  suppressMenuHide: this.props.suppressMenuHide,
572
573
  suppressMovableColumns: this.props.suppressMovableColumns,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation",
6
6
  "license": "MIT",