@cdmx/wappler_ag_grid 1.9.6-locale-test → 1.9.7

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.
@@ -3241,7 +3241,7 @@
3241
3241
  "defer": true
3242
3242
  },
3243
3243
  {
3244
- "src": "js/exceljs.min.js",
3244
+ "src": "js/read-excel-file.min.js",
3245
3245
  "type": "js",
3246
3246
  "defer": true
3247
3247
  },
package/dmx-ag-grid.js CHANGED
@@ -474,6 +474,7 @@ dmx.Component('ag-grid', {
474
474
  const enableCellClickEvent = this.props.row_click_event && (this.props.enable_actions || this.props.row_checkbox_event);
475
475
  const enableCellDoubleClickEvent = this.props.row_double_click_event && (this.props.enable_actions || this.props.row_checkbox_event);
476
476
  const actionButtonClassToggles = options.action_button_class_toggles
477
+ let localeText;
477
478
  let columnDefs = [];
478
479
  let groupedColumnDefs = [];
479
480
  let exportToCSV = this.props.export_to_csv;
@@ -1525,17 +1526,23 @@ dmx.Component('ag-grid', {
1525
1526
  }
1526
1527
  options.actions_column_position=='right' ? columnDefs.push(actionsColumn):columnDefs.unshift(actionsColumn);
1527
1528
  }
1528
- const localeMap = {
1529
- 'HE': AG_GRID_LOCALE_HE,
1530
- 'RU': AG_GRID_LOCALE_RU,
1531
- 'PT': AG_GRID_LOCALE_PT,
1532
- 'ES': AG_GRID_LOCALE_ES,
1533
- };
1529
+ if (options.locale_text == 'HE') {
1530
+ localeText = AG_GRID_LOCALE_IL
1531
+ }
1532
+ else if (options.locale_text == 'RU') {
1533
+ localeText = AG_GRID_LOCALE_RU
1534
+ }
1535
+ else if (options.locale_text == 'PT') {
1536
+ localeText = AG_GRID_LOCALE_PT
1537
+ }
1538
+ else if (options.locale_text == 'ES') {
1539
+ localeText = AG_GRID_LOCALE_ES
1540
+ }
1534
1541
  const gridOptions = {
1535
1542
  ...(idFieldPresent ? { getRowId: params => String(params.data.id) } : {}),
1536
1543
  columnDefs: (groupedColumnDefs && groupedColumnDefs.length > 0) ? groupedColumnDefs : columnDefs,
1537
1544
  getRowStyle: options.rstyles ? createRowStyleFunction(options.rstyles): undefined,
1538
- localeText: localeMap[options.locale_text] || null,
1545
+ localeText: localeText,
1539
1546
  enableRtl: options.enable_rtl,
1540
1547
  onRowClicked: enableRowClickEvent ? onRowClicked : undefined,
1541
1548
  onRowDoubleClicked: enableRowDoubleClickEvent ? onRowDoubleClicked : undefined,
@@ -1822,11 +1829,10 @@ dmx.Component('ag-grid', {
1822
1829
  console.error('Grid container not found.');
1823
1830
  return;
1824
1831
  }
1825
- const agHeader = gridElement.querySelector('.ag-header');
1826
- const agRootWrapper = gridElement.querySelector('.ag-root-wrapper');
1827
-
1828
1832
  // Function to adjust the header width
1829
1833
  function adjustHeaderWidth() {
1834
+ const agHeader = gridElement.querySelector('.ag-header');
1835
+ const agRootWrapper = gridElement.querySelector('.ag-root-wrapper');
1830
1836
  if (agHeader && agRootWrapper) {
1831
1837
  const rootWrapperWidth = agRootWrapper.clientWidth;
1832
1838
  const newHeaderWidth = rootWrapperWidth * 1.0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.9.6-locale-test",
3
+ "version": "1.9.7",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",