@cdmx/wappler_ag_grid 1.2.4 → 1.2.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.
@@ -85,11 +85,20 @@
85
85
  {title: 'Alpine', value: 'ag-theme-alpine'},
86
86
  {title: 'Balham', value: 'ag-theme-balham'},
87
87
  {title: 'Material', value: 'ag-theme-material'},
88
+ {title: 'Quartz', value: 'ag-theme-quartz'},
88
89
  {title: 'Custom', value: 'ag-theme-alpine ag-theme-custom'},
89
90
  {title: 'Base', value: 'ag-grid'}
90
91
  ],
91
92
  "help": "Select a theme for the grid"
92
93
  },
94
+ {
95
+ "name": "dark_mode",
96
+ "attribute": "dmx-bind:dark_mode",
97
+ "title": "Dark Mode",
98
+ "type": "boolean",
99
+ "defaultValue": true,
100
+ "help": "Enables dark mode"
101
+ },
93
102
  {
94
103
  "name": "locale_text",
95
104
  "attribute": "locale_text",
@@ -2264,6 +2273,10 @@
2264
2273
  "src": "../../../node_modules/ag-grid-community/styles/ag-theme-material.css",
2265
2274
  "dst": "css/ag-theme-material.css"
2266
2275
  },
2276
+ {
2277
+ "src": "../../../node_modules/ag-grid-community/styles/ag-theme-quartz.css",
2278
+ "dst": "css/ag-theme-quartz.css"
2279
+ },
2267
2280
  {
2268
2281
  "src": "../../../node_modules/moment/min/moment.min.js",
2269
2282
  "dst": "js/moment.min.js"
@@ -2333,6 +2346,10 @@
2333
2346
  "src": "css/ag-theme-material.css",
2334
2347
  "type": "css"
2335
2348
  },
2349
+ {
2350
+ "src": "css/ag-theme-quartz.css",
2351
+ "type": "css"
2352
+ },
2336
2353
  {
2337
2354
  "src": "css/switch-toggle-slider.css",
2338
2355
  "type": "css"
package/dmx-ag-grid.js CHANGED
@@ -5,13 +5,19 @@ dmx.Component('ag-grid', {
5
5
  count: Number,
6
6
  fields: {},
7
7
  fileData: [],
8
- selectedRows: []
8
+ selectedRows: [],
9
+ state: {
10
+ gridReady: !1,
11
+ firstDataRendered: !1,
12
+ rowDataUpdated: !1
13
+ }
9
14
  },
10
15
 
11
16
  attributes: {
12
17
  id: { default: null },
13
18
  noload: { type: Boolean, default: false },
14
19
  grid_theme: { type: String, default: 'ag-theme-alpine' },
20
+ dark_mode: { type: Boolean, default: false},
15
21
  column_defs: { type: Array, default: [] },
16
22
  tooltip_config: { type: Array, default: [] },
17
23
  custom_tooltip: { type: String, default: null },
@@ -359,7 +365,8 @@ dmx.Component('ag-grid', {
359
365
  let exportToCSV = this.props.export_to_csv;
360
366
  let gridInstance = null;
361
367
  let cellRenderer;
362
- this.$node.innerHTML = `<div id=${options.id}-grid class="${options.grid_theme}"></div>`;
368
+ const gridThemeClass = options.dark_mode ? `${options.grid_theme}-dark` : options.grid_theme;
369
+ this.$node.innerHTML = `<div id=${options.id}-grid class="${gridThemeClass}"></div>`;
363
370
  if (!rowData || rowData.length === 0) {
364
371
  console.error('No row data provided.');
365
372
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "ag-grid"
15
15
  ],
16
16
  "dependencies": {
17
- "ag-grid-community": "30.2.x",
17
+ "ag-grid-community": "31.0.x",
18
18
  "exceljs": "4.3.x",
19
19
  "moment": "2.29.x",
20
20
  "papaparse": "5.4.x"