@easyquery/ui 7.4.1 → 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) => {
@@ -6030,7 +6063,6 @@ class SimpleConditionRenderer extends ConditionRenderer {
6030
6063
  .data('condrow', '')
6031
6064
  .addChildElement(this.renderCheckbox())
6032
6065
  .addChildElement(this.renderConjunction());
6033
- let mayAppear = autoAppear;
6034
6066
  const minLength = operator == model.nullOperator
6035
6067
  ? Math.min(arrLength, this.condition.expressions.length + 1)
6036
6068
  : arrLength;
@@ -6043,7 +6075,7 @@ class SimpleConditionRenderer extends ConditionRenderer {
6043
6075
  }
6044
6076
  }
6045
6077
  else if (item.type === 'expression') {
6046
- const toAppear = mayAppear && (item.index > 0);
6078
+ const toAppear = autoAppear && (item.index == 1);
6047
6079
  const exprRenderer = this.panel.getExpressionRenderer(this.condition.expressions[item.index]);
6048
6080
  if (exprRenderer) {
6049
6081
  const el = exprRenderer.render(toAppear);
@@ -6052,7 +6084,6 @@ class SimpleConditionRenderer extends ConditionRenderer {
6052
6084
  exprRenderer.adjustWidth();
6053
6085
  }, 100);
6054
6086
  }
6055
- mayAppear = mayAppear && !toAppear;
6056
6087
  }
6057
6088
  else if (item.type === 'text') {
6058
6089
  builder.addChildElement(new TextRenderer(this.panel, item.text).render());
@@ -6068,6 +6099,12 @@ class SimpleConditionRenderer extends ConditionRenderer {
6068
6099
  }
6069
6100
  return false;
6070
6101
  });
6102
+ builder.on('focusin', ev => {
6103
+ if (!this.isConditionActive()) {
6104
+ this.panel.toggleConditionPicked(this.condition);
6105
+ this.adjustButtonsVisibility();
6106
+ }
6107
+ });
6071
6108
  }
6072
6109
  builder
6073
6110
  .addChildElement(this.renderButtonsBlock());
@@ -6540,6 +6577,12 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6540
6577
  builder.toDOM().dispatchEvent(ui.createBrowserEvent("mouseenter"));
6541
6578
  }
6542
6579
  });
6580
+ builder.on('focusin', ev => {
6581
+ if (!this.isConditionActive()) {
6582
+ this.panel.toggleConditionPicked(this.condition);
6583
+ this.adjustButtonsVisibility();
6584
+ }
6585
+ });
6543
6586
  }
6544
6587
  builder
6545
6588
  .addChildElement(this.renderButtonsBlock());
@@ -6613,7 +6656,9 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6613
6656
  builder.addChild('span', b => {
6614
6657
  b.text(core$1.i18n.getText(curType.key))
6615
6658
  .title(core$1.i18n.getText(curType.key))
6616
- .addClass(`${this.cssPrefix}-grelement`);
6659
+ .addClass(`${this.cssPrefix}-grelement`)
6660
+ .attr('tabindex', '0')
6661
+ .attr('aria-disabled', 'true');
6617
6662
  });
6618
6663
  }
6619
6664
  builder.addChild('span', b => {
@@ -6689,6 +6734,8 @@ class BaseElementRenderer {
6689
6734
  }
6690
6735
  else {
6691
6736
  return ui.domel('span')
6737
+ .attr('tabindex', '0')
6738
+ .attr('aria-disabled', 'true')
6692
6739
  .title(displayedText)
6693
6740
  .text(displayedText)
6694
6741
  .toDOM();
@@ -7094,7 +7141,6 @@ class CustomListExpressionRenderer extends ListExpressionRenderer {
7094
7141
  constructor() {
7095
7142
  super(...arguments);
7096
7143
  this.isLoading = false;
7097
- this.onClickTemp = null;
7098
7144
  }
7099
7145
  renderEditor() {
7100
7146
  if (this.isLoading)
@@ -7141,12 +7187,26 @@ class CustomListExpressionRenderer extends ListExpressionRenderer {
7141
7187
  }
7142
7188
  }
7143
7189
  else if (listRequestHandler) {
7144
- listRequestHandler({
7190
+ let eParams = this.valueEditor.extraParams ? Object.assign({}, this.valueEditor.extraParams) : {};
7191
+ let requestData = {
7145
7192
  listName: listName,
7146
7193
  editorId: this.valueEditor.id,
7147
- editorParams: this.valueEditor.extraParams,
7194
+ editorParams: eParams,
7148
7195
  value: this.getValue()
7149
- }, (list) => {
7196
+ };
7197
+ if (this.valueEditor.dependsOnAttr) {
7198
+ const query = this.panel.getQuery();
7199
+ if (query) {
7200
+ const rootCond = query.getRootCondition ? query.getRootCondition() : query.root;
7201
+ if (rootCond) {
7202
+ const pValue = query.getOneValueForAttr(this.valueEditor.dependsOnAttr);
7203
+ if (pValue) {
7204
+ requestData.parentValue = pValue;
7205
+ }
7206
+ }
7207
+ }
7208
+ }
7209
+ listRequestHandler(requestData, (list) => {
7150
7210
  this.menuItemsList = list;
7151
7211
  if (onComplete) {
7152
7212
  onComplete();
@@ -7158,7 +7218,6 @@ class CustomListExpressionRenderer extends ListExpressionRenderer {
7158
7218
  class SqlListExpressionRenderer extends CustomListExpressionRenderer {
7159
7219
  fillMenuItemsList(onComplete) {
7160
7220
  const context = this.panel.getContext();
7161
- this.valueEditor;
7162
7221
  const listRequestHandler = context.getListRequestHandler();
7163
7222
  if (listRequestHandler) {
7164
7223
  let requestData = {
@@ -7167,7 +7226,6 @@ class SqlListExpressionRenderer extends CustomListExpressionRenderer {
7167
7226
  editorParams: this.valueEditor.extraParams,
7168
7227
  value: this.getValue()
7169
7228
  };
7170
- //requestData.sql = editor.sql;
7171
7229
  listRequestHandler(requestData, (list) => {
7172
7230
  this.menuItemsList = list;
7173
7231
  if (onComplete) {
@@ -7901,6 +7959,51 @@ class QueryPanel extends core.Widget {
7901
7959
  else {
7902
7960
  modifyCondition(conds, autoEdit);
7903
7961
  }
7962
+ const checkAndClearDependents = (masterCond, masterAttrId) => {
7963
+ const model = this.getContext().getModel();
7964
+ const query = this.getQuery();
7965
+ const rootCond = query.getRootCondition();
7966
+ const processCond = (c) => {
7967
+ if (c.isGroup()) {
7968
+ c.getConditions().forEach(processCond);
7969
+ }
7970
+ else if (c !== masterCond && c.expressions.length > 0) {
7971
+ const attrExpr = c.expressions[0];
7972
+ if (attrExpr.tag === core.ExprTag.EntityAttribute) {
7973
+ const operator = model.getOperatorById(c.getOperatorId());
7974
+ const attribute = model.getAttributeByIdSafe(attrExpr.value);
7975
+ if (c.expressions.length > 1 && operator) {
7976
+ const operand = model.getOperand(attribute, operator, 1);
7977
+ let editor = operand.editor;
7978
+ if (editor && editor.dependsOnAttr === masterAttrId) {
7979
+ for (let i = 1; i < c.expressions.length; i++) {
7980
+ // Only clear if it's not already empty to prevent infinite loops
7981
+ if (!c.expressions[i].isEmpty()) {
7982
+ c.expressions[i].setContent('', '');
7983
+ }
7984
+ modifyCondition(c, false);
7985
+ }
7986
+ }
7987
+ }
7988
+ }
7989
+ }
7990
+ };
7991
+ if (rootCond) {
7992
+ processCond(rootCond);
7993
+ }
7994
+ };
7995
+ if (!Array.isArray(conds)) {
7996
+ const masterCond = conds;
7997
+ const operatorId = masterCond.getOperatorId();
7998
+ if ((edata.condPart & core.ConditionPart.Value) === core.ConditionPart.Value
7999
+ && (operatorId == "Equal" || operatorId == "IsInList")) {
8000
+ const baseExpr = masterCond.expressions[0];
8001
+ if (baseExpr.tag == core.ExprTag.EntityAttribute) {
8002
+ const attrId = baseExpr.value;
8003
+ checkAndClearDependents(masterCond, attrId);
8004
+ }
8005
+ }
8006
+ }
7904
8007
  break;
7905
8008
  }
7906
8009
  case core.QueryChangeAction.Add: {
@@ -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) => {
@@ -6028,7 +6061,6 @@ class SimpleConditionRenderer extends ConditionRenderer {
6028
6061
  .data('condrow', '')
6029
6062
  .addChildElement(this.renderCheckbox())
6030
6063
  .addChildElement(this.renderConjunction());
6031
- let mayAppear = autoAppear;
6032
6064
  const minLength = operator == model.nullOperator
6033
6065
  ? Math.min(arrLength, this.condition.expressions.length + 1)
6034
6066
  : arrLength;
@@ -6041,7 +6073,7 @@ class SimpleConditionRenderer extends ConditionRenderer {
6041
6073
  }
6042
6074
  }
6043
6075
  else if (item.type === 'expression') {
6044
- const toAppear = mayAppear && (item.index > 0);
6076
+ const toAppear = autoAppear && (item.index == 1);
6045
6077
  const exprRenderer = this.panel.getExpressionRenderer(this.condition.expressions[item.index]);
6046
6078
  if (exprRenderer) {
6047
6079
  const el = exprRenderer.render(toAppear);
@@ -6050,7 +6082,6 @@ class SimpleConditionRenderer extends ConditionRenderer {
6050
6082
  exprRenderer.adjustWidth();
6051
6083
  }, 100);
6052
6084
  }
6053
- mayAppear = mayAppear && !toAppear;
6054
6085
  }
6055
6086
  else if (item.type === 'text') {
6056
6087
  builder.addChildElement(new TextRenderer(this.panel, item.text).render());
@@ -6066,6 +6097,12 @@ class SimpleConditionRenderer extends ConditionRenderer {
6066
6097
  }
6067
6098
  return false;
6068
6099
  });
6100
+ builder.on('focusin', ev => {
6101
+ if (!this.isConditionActive()) {
6102
+ this.panel.toggleConditionPicked(this.condition);
6103
+ this.adjustButtonsVisibility();
6104
+ }
6105
+ });
6069
6106
  }
6070
6107
  builder
6071
6108
  .addChildElement(this.renderButtonsBlock());
@@ -6538,6 +6575,12 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6538
6575
  builder.toDOM().dispatchEvent(createBrowserEvent("mouseenter"));
6539
6576
  }
6540
6577
  });
6578
+ builder.on('focusin', ev => {
6579
+ if (!this.isConditionActive()) {
6580
+ this.panel.toggleConditionPicked(this.condition);
6581
+ this.adjustButtonsVisibility();
6582
+ }
6583
+ });
6541
6584
  }
6542
6585
  builder
6543
6586
  .addChildElement(this.renderButtonsBlock());
@@ -6611,7 +6654,9 @@ class ConditionGroupRowRenderer extends SimpleConditionRenderer {
6611
6654
  builder.addChild('span', b => {
6612
6655
  b.text(i18n.getText(curType.key))
6613
6656
  .title(i18n.getText(curType.key))
6614
- .addClass(`${this.cssPrefix}-grelement`);
6657
+ .addClass(`${this.cssPrefix}-grelement`)
6658
+ .attr('tabindex', '0')
6659
+ .attr('aria-disabled', 'true');
6615
6660
  });
6616
6661
  }
6617
6662
  builder.addChild('span', b => {
@@ -6687,6 +6732,8 @@ class BaseElementRenderer {
6687
6732
  }
6688
6733
  else {
6689
6734
  return domel('span')
6735
+ .attr('tabindex', '0')
6736
+ .attr('aria-disabled', 'true')
6690
6737
  .title(displayedText)
6691
6738
  .text(displayedText)
6692
6739
  .toDOM();
@@ -7092,7 +7139,6 @@ class CustomListExpressionRenderer extends ListExpressionRenderer {
7092
7139
  constructor() {
7093
7140
  super(...arguments);
7094
7141
  this.isLoading = false;
7095
- this.onClickTemp = null;
7096
7142
  }
7097
7143
  renderEditor() {
7098
7144
  if (this.isLoading)
@@ -7139,12 +7185,26 @@ class CustomListExpressionRenderer extends ListExpressionRenderer {
7139
7185
  }
7140
7186
  }
7141
7187
  else if (listRequestHandler) {
7142
- listRequestHandler({
7188
+ let eParams = this.valueEditor.extraParams ? Object.assign({}, this.valueEditor.extraParams) : {};
7189
+ let requestData = {
7143
7190
  listName: listName,
7144
7191
  editorId: this.valueEditor.id,
7145
- editorParams: this.valueEditor.extraParams,
7192
+ editorParams: eParams,
7146
7193
  value: this.getValue()
7147
- }, (list) => {
7194
+ };
7195
+ if (this.valueEditor.dependsOnAttr) {
7196
+ const query = this.panel.getQuery();
7197
+ if (query) {
7198
+ const rootCond = query.getRootCondition ? query.getRootCondition() : query.root;
7199
+ if (rootCond) {
7200
+ const pValue = query.getOneValueForAttr(this.valueEditor.dependsOnAttr);
7201
+ if (pValue) {
7202
+ requestData.parentValue = pValue;
7203
+ }
7204
+ }
7205
+ }
7206
+ }
7207
+ listRequestHandler(requestData, (list) => {
7148
7208
  this.menuItemsList = list;
7149
7209
  if (onComplete) {
7150
7210
  onComplete();
@@ -7156,7 +7216,6 @@ class CustomListExpressionRenderer extends ListExpressionRenderer {
7156
7216
  class SqlListExpressionRenderer extends CustomListExpressionRenderer {
7157
7217
  fillMenuItemsList(onComplete) {
7158
7218
  const context = this.panel.getContext();
7159
- this.valueEditor;
7160
7219
  const listRequestHandler = context.getListRequestHandler();
7161
7220
  if (listRequestHandler) {
7162
7221
  let requestData = {
@@ -7165,7 +7224,6 @@ class SqlListExpressionRenderer extends CustomListExpressionRenderer {
7165
7224
  editorParams: this.valueEditor.extraParams,
7166
7225
  value: this.getValue()
7167
7226
  };
7168
- //requestData.sql = editor.sql;
7169
7227
  listRequestHandler(requestData, (list) => {
7170
7228
  this.menuItemsList = list;
7171
7229
  if (onComplete) {
@@ -7899,6 +7957,51 @@ class QueryPanel extends Widget {
7899
7957
  else {
7900
7958
  modifyCondition(conds, autoEdit);
7901
7959
  }
7960
+ const checkAndClearDependents = (masterCond, masterAttrId) => {
7961
+ const model = this.getContext().getModel();
7962
+ const query = this.getQuery();
7963
+ const rootCond = query.getRootCondition();
7964
+ const processCond = (c) => {
7965
+ if (c.isGroup()) {
7966
+ c.getConditions().forEach(processCond);
7967
+ }
7968
+ else if (c !== masterCond && c.expressions.length > 0) {
7969
+ const attrExpr = c.expressions[0];
7970
+ if (attrExpr.tag === ExprTag.EntityAttribute) {
7971
+ const operator = model.getOperatorById(c.getOperatorId());
7972
+ const attribute = model.getAttributeByIdSafe(attrExpr.value);
7973
+ if (c.expressions.length > 1 && operator) {
7974
+ const operand = model.getOperand(attribute, operator, 1);
7975
+ let editor = operand.editor;
7976
+ if (editor && editor.dependsOnAttr === masterAttrId) {
7977
+ for (let i = 1; i < c.expressions.length; i++) {
7978
+ // Only clear if it's not already empty to prevent infinite loops
7979
+ if (!c.expressions[i].isEmpty()) {
7980
+ c.expressions[i].setContent('', '');
7981
+ }
7982
+ modifyCondition(c, false);
7983
+ }
7984
+ }
7985
+ }
7986
+ }
7987
+ }
7988
+ };
7989
+ if (rootCond) {
7990
+ processCond(rootCond);
7991
+ }
7992
+ };
7993
+ if (!Array.isArray(conds)) {
7994
+ const masterCond = conds;
7995
+ const operatorId = masterCond.getOperatorId();
7996
+ if ((edata.condPart & ConditionPart.Value) === ConditionPart.Value
7997
+ && (operatorId == "Equal" || operatorId == "IsInList")) {
7998
+ const baseExpr = masterCond.expressions[0];
7999
+ if (baseExpr.tag == ExprTag.EntityAttribute) {
8000
+ const attrId = baseExpr.value;
8001
+ checkAndClearDependents(masterCond, attrId);
8002
+ }
8003
+ }
8004
+ }
7902
8005
  break;
7903
8006
  }
7904
8007
  case QueryChangeAction.Add: {
@@ -6,7 +6,7 @@ export declare class ChartFacet extends ResultFacet {
6
6
  protected chart: ChartWidget;
7
7
  title: string;
8
8
  protected settings: any;
9
- protected dialogTitle: any;
9
+ protected dialogTitle: string;
10
10
  init(slot: HTMLElement): void;
11
11
  destroy(): void;
12
12
  getType(): FacetType;
@@ -4,7 +4,7 @@ import { FacetType } from '../types/facet_type';
4
4
  export declare class DataTableFacet extends ResultFacet {
5
5
  protected grid: Widget;
6
6
  title: string;
7
- protected dialogTitle: any;
7
+ protected dialogTitle: string;
8
8
  init(slot: HTMLElement): void;
9
9
  getSettings(): any;
10
10
  protected reinitGrid(): void;
@@ -21,7 +21,7 @@ interface CrossTabOptions {
21
21
  export declare class PivotTableFacet extends ResultFacet {
22
22
  protected grid: EasyGrid;
23
23
  title: string;
24
- protected dialogTitle: any;
24
+ protected dialogTitle: string;
25
25
  protected pivotTable: EasyDataTable;
26
26
  protected settings: CrossTabOptions;
27
27
  init(slot: HTMLElement): void;
@@ -10,7 +10,7 @@ export declare abstract class ResultFacet {
10
10
  private displayMessageDiv;
11
11
  title: string;
12
12
  protected cssPrefix: string;
13
- protected dialogTitle: any;
13
+ protected dialogTitle: string;
14
14
  protected options: any;
15
15
  protected canDisplayFlag: boolean;
16
16
  constructor(container: FacetContainer, options?: any);
@@ -51,11 +51,11 @@ export declare class ColumnsPanel extends Widget {
51
51
  private createEntitiesMenu;
52
52
  getSortMenuList(): {
53
53
  id: string;
54
- text: any;
54
+ text: string;
55
55
  }[];
56
56
  getMoveMenuList(): {
57
57
  id: string;
58
- text: any;
58
+ text: string;
59
59
  }[];
60
60
  private createSortMenu;
61
61
  private createMoveMenu;
@@ -24,7 +24,6 @@ export declare class ListExpressionRenderer extends ExpressionRenderer {
24
24
  export declare class CustomListExpressionRenderer extends ListExpressionRenderer {
25
25
  loaderElement: HTMLElement | null;
26
26
  private isLoading;
27
- private onClickTemp;
28
27
  protected renderEditor(): void;
29
28
  protected showLoader(): void;
30
29
  protected hideLoader(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyquery/ui",
3
- "version": "7.4.1",
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.1"
33
+ "@easyquery/core": "^7.4.2-rc02"
34
34
  },
35
35
  "files": [
36
36
  "dist",