@easyquery/ui 7.4.2-rc01 → 7.4.2-rc02

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.
@@ -1352,6 +1352,18 @@ class MenuLevel {
1352
1352
  this.activeItem = menuItem;
1353
1353
  const rowElement = menuItem.itemDiv;
1354
1354
  rowElement.classList.add('active');
1355
+ if (this.scrollDiv && rowElement) {
1356
+ const rowTop = rowElement.offsetTop;
1357
+ const rowBottom = rowTop + rowElement.offsetHeight;
1358
+ const scrollTop = this.scrollDiv.scrollTop;
1359
+ const scrollBottom = scrollTop + this.scrollDiv.clientHeight;
1360
+ if (rowTop < scrollTop) {
1361
+ this.scrollDiv.scrollTop = rowTop;
1362
+ }
1363
+ else if (rowBottom > scrollBottom) {
1364
+ this.scrollDiv.scrollTop = rowBottom - this.scrollDiv.clientHeight;
1365
+ }
1366
+ }
1355
1367
  if (this.parentMenu.options.useDefaultStyles) {
1356
1368
  this.parentMenu.style.colors.bgON;
1357
1369
  this.parentMenu.style.colors.fgON;
@@ -2124,6 +2136,11 @@ class ColumnRendererCP {
2124
2136
  if (this.panel.options.accentActiveColumn || ui.browserUtils.isMobileMode()) {
2125
2137
  builder
2126
2138
  .on('click', this.onMouseClick.bind(this)); //touchstart
2139
+ builder.on('focusin', ev => {
2140
+ if (!this.isColumnActive()) {
2141
+ this.activate();
2142
+ }
2143
+ });
2127
2144
  }
2128
2145
  if (this.panel.options.alwaysShowButtons) {
2129
2146
  this.showButtons();
@@ -2219,7 +2236,9 @@ class ColumnRendererCP {
2219
2236
  else {
2220
2237
  builder.addChild('span', b => {
2221
2238
  b.text(this.column.caption)
2222
- .title(this.column.caption);
2239
+ .title(this.column.caption)
2240
+ .attr('tabindex', '0')
2241
+ .attr('aria-disabled', 'true');
2223
2242
  });
2224
2243
  }
2225
2244
  return builder.toDOM();
@@ -2838,6 +2857,8 @@ class AttrColumnRendererCP extends ColumnRendererCP {
2838
2857
  return ui.domel('span')
2839
2858
  .text(attrCaption)
2840
2859
  .title(attrCaption)
2860
+ .attr('tabindex', '0')
2861
+ .attr('aria-disabled', 'true')
2841
2862
  .toDOM();
2842
2863
  }
2843
2864
  }
@@ -3026,7 +3047,9 @@ class AggrFuncColumnRendererCP extends AttrColumnRendererCP {
3026
3047
  .addClass(getMobileCssClass())
3027
3048
  .addChild('span', b => b
3028
3049
  .text(item.text)
3029
- .title(item.text)));
3050
+ .title(item.text)
3051
+ .attr('tabindex', '0')
3052
+ .attr('aria-disabled', 'true')));
3030
3053
  }
3031
3054
  }
3032
3055
  else if (item.type === 2) {
@@ -3190,7 +3213,9 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
3190
3213
  builder
3191
3214
  .addChild('span', b => {
3192
3215
  b.text(this.column.caption)
3193
- .title(this.column.caption);
3216
+ .title(this.column.caption)
3217
+ .attr('tabindex', '0')
3218
+ .attr('aria-disabled', 'true');
3194
3219
  });
3195
3220
  }
3196
3221
  // Colon element
@@ -3228,7 +3253,9 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
3228
3253
  builder
3229
3254
  .addChild('span', b => {
3230
3255
  b.text(core$1.DataType[this.column.expr.dataType])
3231
- .title(core$1.DataType[this.column.expr.dataType]);
3256
+ .title(core$1.DataType[this.column.expr.dataType])
3257
+ .attr('tabindex', '0')
3258
+ .attr('aria-disabled', 'true');
3232
3259
  });
3233
3260
  }
3234
3261
  return exprBlock;
@@ -4114,6 +4141,11 @@ class ColumnRendererCB {
4114
4141
  if (this.bar.options.accentActiveColumn || ui.browserUtils.isMobileMode()) {
4115
4142
  builder
4116
4143
  .on('touchstart click', this.onMouseClick.bind(this));
4144
+ builder.on('focusin', ev => {
4145
+ if (!this.isColumnActive()) {
4146
+ this.onMouseClick(ev);
4147
+ }
4148
+ });
4117
4149
  }
4118
4150
  return this.element;
4119
4151
  }
@@ -4148,7 +4180,8 @@ class ColumnRendererCB {
4148
4180
  .addChild('div', b => b
4149
4181
  .title(caption)
4150
4182
  .text(caption)
4151
- .attr('tabIndex', '0'))
4183
+ .attr('tabIndex', '0')
4184
+ .attr('aria-disabled', 'true'))
4152
4185
  .toDOM();
4153
4186
  }
4154
4187
  const tapHandler = (ev) => {
@@ -6066,6 +6099,12 @@ class SimpleConditionRenderer extends ConditionRenderer {
6066
6099
  }
6067
6100
  return false;
6068
6101
  });
6102
+ builder.on('focusin', ev => {
6103
+ if (!this.isConditionActive()) {
6104
+ this.panel.toggleConditionPicked(this.condition);
6105
+ this.adjustButtonsVisibility();
6106
+ }
6107
+ });
6069
6108
  }
6070
6109
  builder
6071
6110
  .addChildElement(this.renderButtonsBlock());
@@ -6538,6 +6577,12 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6538
6577
  builder.toDOM().dispatchEvent(ui.createBrowserEvent("mouseenter"));
6539
6578
  }
6540
6579
  });
6580
+ builder.on('focusin', ev => {
6581
+ if (!this.isConditionActive()) {
6582
+ this.panel.toggleConditionPicked(this.condition);
6583
+ this.adjustButtonsVisibility();
6584
+ }
6585
+ });
6541
6586
  }
6542
6587
  builder
6543
6588
  .addChildElement(this.renderButtonsBlock());
@@ -6611,7 +6656,9 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6611
6656
  builder.addChild('span', b => {
6612
6657
  b.text(core$1.i18n.getText(curType.key))
6613
6658
  .title(core$1.i18n.getText(curType.key))
6614
- .addClass(`${this.cssPrefix}-grelement`);
6659
+ .addClass(`${this.cssPrefix}-grelement`)
6660
+ .attr('tabindex', '0')
6661
+ .attr('aria-disabled', 'true');
6615
6662
  });
6616
6663
  }
6617
6664
  builder.addChild('span', b => {
@@ -6687,6 +6734,8 @@ class BaseElementRenderer {
6687
6734
  }
6688
6735
  else {
6689
6736
  return ui.domel('span')
6737
+ .attr('tabindex', '0')
6738
+ .attr('aria-disabled', 'true')
6690
6739
  .title(displayedText)
6691
6740
  .text(displayedText)
6692
6741
  .toDOM();
@@ -1350,6 +1350,18 @@ class MenuLevel {
1350
1350
  this.activeItem = menuItem;
1351
1351
  const rowElement = menuItem.itemDiv;
1352
1352
  rowElement.classList.add('active');
1353
+ if (this.scrollDiv && rowElement) {
1354
+ const rowTop = rowElement.offsetTop;
1355
+ const rowBottom = rowTop + rowElement.offsetHeight;
1356
+ const scrollTop = this.scrollDiv.scrollTop;
1357
+ const scrollBottom = scrollTop + this.scrollDiv.clientHeight;
1358
+ if (rowTop < scrollTop) {
1359
+ this.scrollDiv.scrollTop = rowTop;
1360
+ }
1361
+ else if (rowBottom > scrollBottom) {
1362
+ this.scrollDiv.scrollTop = rowBottom - this.scrollDiv.clientHeight;
1363
+ }
1364
+ }
1353
1365
  if (this.parentMenu.options.useDefaultStyles) {
1354
1366
  this.parentMenu.style.colors.bgON;
1355
1367
  this.parentMenu.style.colors.fgON;
@@ -2122,6 +2134,11 @@ class ColumnRendererCP {
2122
2134
  if (this.panel.options.accentActiveColumn || browserUtils.isMobileMode()) {
2123
2135
  builder
2124
2136
  .on('click', this.onMouseClick.bind(this)); //touchstart
2137
+ builder.on('focusin', ev => {
2138
+ if (!this.isColumnActive()) {
2139
+ this.activate();
2140
+ }
2141
+ });
2125
2142
  }
2126
2143
  if (this.panel.options.alwaysShowButtons) {
2127
2144
  this.showButtons();
@@ -2217,7 +2234,9 @@ class ColumnRendererCP {
2217
2234
  else {
2218
2235
  builder.addChild('span', b => {
2219
2236
  b.text(this.column.caption)
2220
- .title(this.column.caption);
2237
+ .title(this.column.caption)
2238
+ .attr('tabindex', '0')
2239
+ .attr('aria-disabled', 'true');
2221
2240
  });
2222
2241
  }
2223
2242
  return builder.toDOM();
@@ -2836,6 +2855,8 @@ class AttrColumnRendererCP extends ColumnRendererCP {
2836
2855
  return domel('span')
2837
2856
  .text(attrCaption)
2838
2857
  .title(attrCaption)
2858
+ .attr('tabindex', '0')
2859
+ .attr('aria-disabled', 'true')
2839
2860
  .toDOM();
2840
2861
  }
2841
2862
  }
@@ -3024,7 +3045,9 @@ class AggrFuncColumnRendererCP extends AttrColumnRendererCP {
3024
3045
  .addClass(getMobileCssClass())
3025
3046
  .addChild('span', b => b
3026
3047
  .text(item.text)
3027
- .title(item.text)));
3048
+ .title(item.text)
3049
+ .attr('tabindex', '0')
3050
+ .attr('aria-disabled', 'true')));
3028
3051
  }
3029
3052
  }
3030
3053
  else if (item.type === 2) {
@@ -3188,7 +3211,9 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
3188
3211
  builder
3189
3212
  .addChild('span', b => {
3190
3213
  b.text(this.column.caption)
3191
- .title(this.column.caption);
3214
+ .title(this.column.caption)
3215
+ .attr('tabindex', '0')
3216
+ .attr('aria-disabled', 'true');
3192
3217
  });
3193
3218
  }
3194
3219
  // Colon element
@@ -3226,7 +3251,9 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
3226
3251
  builder
3227
3252
  .addChild('span', b => {
3228
3253
  b.text(DataType[this.column.expr.dataType])
3229
- .title(DataType[this.column.expr.dataType]);
3254
+ .title(DataType[this.column.expr.dataType])
3255
+ .attr('tabindex', '0')
3256
+ .attr('aria-disabled', 'true');
3230
3257
  });
3231
3258
  }
3232
3259
  return exprBlock;
@@ -4112,6 +4139,11 @@ class ColumnRendererCB {
4112
4139
  if (this.bar.options.accentActiveColumn || browserUtils.isMobileMode()) {
4113
4140
  builder
4114
4141
  .on('touchstart click', this.onMouseClick.bind(this));
4142
+ builder.on('focusin', ev => {
4143
+ if (!this.isColumnActive()) {
4144
+ this.onMouseClick(ev);
4145
+ }
4146
+ });
4115
4147
  }
4116
4148
  return this.element;
4117
4149
  }
@@ -4146,7 +4178,8 @@ class ColumnRendererCB {
4146
4178
  .addChild('div', b => b
4147
4179
  .title(caption)
4148
4180
  .text(caption)
4149
- .attr('tabIndex', '0'))
4181
+ .attr('tabIndex', '0')
4182
+ .attr('aria-disabled', 'true'))
4150
4183
  .toDOM();
4151
4184
  }
4152
4185
  const tapHandler = (ev) => {
@@ -6064,6 +6097,12 @@ class SimpleConditionRenderer extends ConditionRenderer {
6064
6097
  }
6065
6098
  return false;
6066
6099
  });
6100
+ builder.on('focusin', ev => {
6101
+ if (!this.isConditionActive()) {
6102
+ this.panel.toggleConditionPicked(this.condition);
6103
+ this.adjustButtonsVisibility();
6104
+ }
6105
+ });
6067
6106
  }
6068
6107
  builder
6069
6108
  .addChildElement(this.renderButtonsBlock());
@@ -6536,6 +6575,12 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6536
6575
  builder.toDOM().dispatchEvent(createBrowserEvent("mouseenter"));
6537
6576
  }
6538
6577
  });
6578
+ builder.on('focusin', ev => {
6579
+ if (!this.isConditionActive()) {
6580
+ this.panel.toggleConditionPicked(this.condition);
6581
+ this.adjustButtonsVisibility();
6582
+ }
6583
+ });
6539
6584
  }
6540
6585
  builder
6541
6586
  .addChildElement(this.renderButtonsBlock());
@@ -6609,7 +6654,9 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6609
6654
  builder.addChild('span', b => {
6610
6655
  b.text(i18n.getText(curType.key))
6611
6656
  .title(i18n.getText(curType.key))
6612
- .addClass(`${this.cssPrefix}-grelement`);
6657
+ .addClass(`${this.cssPrefix}-grelement`)
6658
+ .attr('tabindex', '0')
6659
+ .attr('aria-disabled', 'true');
6613
6660
  });
6614
6661
  }
6615
6662
  builder.addChild('span', b => {
@@ -6685,6 +6732,8 @@ class BaseElementRenderer {
6685
6732
  }
6686
6733
  else {
6687
6734
  return domel('span')
6735
+ .attr('tabindex', '0')
6736
+ .attr('aria-disabled', 'true')
6688
6737
  .title(displayedText)
6689
6738
  .text(displayedText)
6690
6739
  .toDOM();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyquery/ui",
3
- "version": "7.4.2-rc01",
3
+ "version": "7.4.2-rc02",
4
4
  "description": "EasyQuery.JS Community UI widgets",
5
5
  "types": "./dist/types/public_api.d.ts",
6
6
  "main": "./dist/easyquery.ui.cjs.js",
@@ -30,7 +30,7 @@
30
30
  "bugs": "https://korzh.com/support",
31
31
  "license": "LGPL-3.0",
32
32
  "peerDependencies": {
33
- "@easyquery/core": "^7.4.2-rc01"
33
+ "@easyquery/core": "^7.4.2-rc02"
34
34
  },
35
35
  "files": [
36
36
  "dist",