@wavemaker/app-ng-runtime 11.10.1-rc.6054 → 11.10.2-rc.6065

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.
@@ -10,7 +10,9 @@ export declare class TableRowDirective extends BaseComponent implements OnInit {
10
10
  closeothers: any;
11
11
  content: any;
12
12
  expandicon: any;
13
+ expandtitle: any;
13
14
  collapseicon: any;
15
+ collapsetitle: any;
14
16
  height: any;
15
17
  position: any;
16
18
  constructor(inj: Injector, table: TableComponent, explicitContext: any);
@@ -1557,9 +1557,9 @@
1557
1557
  }
1558
1558
  }
1559
1559
 
1560
- const isDef = v => v !== undefined;
1561
- const ifDef = (v, d) => v === undefined ? d : v;
1562
- const plus = (a, b) => undefined === a ? b : undefined === b ? a : a + b;
1560
+ const isDef = v => v !== void 0;
1561
+ const ifDef = (v, d) => v === void 0 ? d : v;
1562
+ const plus = (a, b) => void 0 === a ? b : void 0 === b ? a : a + b;
1563
1563
  const minus = (a, b) => ifDef(a, 0) - ifDef(b, 0);
1564
1564
  const noop$1 = () => { };
1565
1565
  const exprFnCache = new Map();
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@wavemaker/app-ng-runtime",
3
- "version": "11.10.1-rc.6054",
3
+ "version": "11.10.2-rc.6065",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/app-ng-runtime",
9
- "version": "11.10.1-rc.6054",
9
+ "version": "11.10.2-rc.6065",
10
10
  "license": "MIT",
11
11
  "engines": {
12
12
  "node": ">=18.16.1",
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@wavemaker/app-ng-runtime",
3
- "version": "11.10.1-rc.6054",
3
+ "version": "11.10.2-rc.6065",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/app-ng-runtime",
9
- "version": "11.10.1-rc.6054",
9
+ "version": "11.10.2-rc.6065",
10
10
  "license": "MIT",
11
11
  "engines": {
12
12
  "node": ">=18.16.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-ng-runtime",
3
- "version": "11.10.1-rc.6054",
3
+ "version": "11.10.2-rc.6065",
4
4
  "description": "All modules required for a WaveMaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -650,12 +650,20 @@ $.widget('wm.datatable', {
650
650
  _getCheckbox: function (labelClass = '', chkBoxName = '', checked = '', disabled = '') {
651
651
  return `<div class="app-checkbox checkbox">
652
652
  <label class="${labelClass}">
653
+ <span class="sr-only" aria-live="assertive">${this._getCheckboxLabel(chkBoxName)}</span>
653
654
  <input type="checkbox" name="${chkBoxName}" ${checked} ${disabled} role="checkbox">
654
655
  <span class="caption"></span>
655
656
  </label>
656
657
  </div>`
657
658
  },
658
659
 
660
+ _getCheckboxLabel: function (chkBoxName) {
661
+ if (chkBoxName) { // it is a row
662
+ return 'Select row';
663
+ } else {
664
+ return 'Select all rows';
665
+ }
666
+ },
659
667
  /* Returns the radio template. */
660
668
  _getRadioTemplate: function (row) {
661
669
  var checked = row._checked === true ? ' checked' : '',
@@ -1649,6 +1657,7 @@ $.widget('wm.datatable', {
1649
1657
  if (this.options.multiselect) {
1650
1658
  $checkbox = $row.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)');
1651
1659
  $checkbox.prop('checked', selected);
1660
+ $checkbox.siblings('span.sr-only').text(selected ? 'Row Selected' : 'Row Deselected');
1652
1661
  this.preparedData[rowId]._checked = selected;
1653
1662
  // if we check header checkbox(select/unselect all the records) then updating selectAll checkbox state is not required.
1654
1663
  if (!isSelectAll) {
@@ -2748,6 +2757,11 @@ $.widget('wm.datatable', {
2748
2757
  var colId = column.attr('data-col-id');
2749
2758
  return colId;
2750
2759
  },
2760
+ keydownHandler: function(event) {
2761
+ if (event && event.key === 'Enter') {
2762
+ this.sortHandler(event);
2763
+ }
2764
+ },
2751
2765
  /* Attaches all event handlers for the table. */
2752
2766
  attachEventHandlers: function ($htm) {
2753
2767
  var $header = this.gridHeaderElement,
@@ -2776,9 +2790,13 @@ $.widget('wm.datatable', {
2776
2790
  if (this.options.enableColumnSelection) {
2777
2791
  $header.find('th[data-col-sortable] .header-data').off('click', this.sortHandler.bind(this));
2778
2792
  $header.find('th[data-col-sortable] .header-data').on('click', this.sortHandler.bind(this));
2793
+ $header.find('th[data-col-sortable]').off('keydown', this.keydownHandler.bind(this));
2794
+ $header.find('th[data-col-sortable]').on('keydown', this.keydownHandler.bind(this));
2779
2795
  } else {
2780
2796
  $header.find('th[data-col-sortable]').off('click', this.sortHandler.bind(this));
2781
2797
  $header.find('th[data-col-sortable]').on('click', this.sortHandler.bind(this));
2798
+ $header.find('th[data-col-sortable]').off('keydown', this.keydownHandler.bind(this));
2799
+ $header.find('th[data-col-sortable]').on('keydown', this.keydownHandler.bind(this));
2782
2800
  }
2783
2801
  } else {
2784
2802
  if (this.options.enableColumnSelection) {
@@ -2900,6 +2918,7 @@ $.widget('wm.datatable', {
2900
2918
  }
2901
2919
  if (isClosed) {
2902
2920
  $row.addClass(self.options.cssClassNames.expandedRowClass);
2921
+ $row.find( 'button, a').attr('title', self.options.rowDef.collapsetitle);
2903
2922
  $row.find( 'button, a').attr('aria-expanded', 'true');
2904
2923
  if (e && self.preparedData[rowId]._selected) {
2905
2924
  e.stopPropagation();
@@ -2922,6 +2941,7 @@ $.widget('wm.datatable', {
2922
2941
  $nextDetailRow.show();
2923
2942
  });
2924
2943
  } else {
2944
+ $row.find( 'button, a').attr('title', self.options.rowDef.expandtitle);
2925
2945
  self._collapseRow(e, rowData, rowId, $nextDetailRow, $icon);
2926
2946
  }
2927
2947
  },
@@ -3046,7 +3066,9 @@ $.widget('wm.datatable', {
3046
3066
 
3047
3067
  function toggleSelectAll(e) {
3048
3068
  var $checkboxes = $('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox', self.gridElement),
3049
- checked = this.checked;
3069
+ checked = this.checked,
3070
+ $headerCheckbox = self.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox");
3071
+ $headerCheckbox.siblings('span.sr-only').text(checked ? 'All Rows Selected' : 'All Rows Deselected');
3050
3072
  $checkboxes.prop('checked', checked);
3051
3073
  $checkboxes.each(function () {
3052
3074
  var $row = $(this).closest('tr.app-datagrid-row'),