@easyquery/ui 7.3.0-rc01 → 7.3.0-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.
@@ -4630,7 +4630,7 @@ input.eqjs-invalid {
4630
4630
  /* AggregationBar Widget END */
4631
4631
 
4632
4632
  :root {
4633
- --column-panel-expr-block-size: 180px;
4633
+ --column-panel-expr-block-size: 220px;
4634
4634
  --column-panel-caption-size: 100px;
4635
4635
  --tool-button-width: 22px;
4636
4636
  --tool-button-height: 22px;
@@ -4641,18 +4641,17 @@ input.eqjs-invalid {
4641
4641
  .eqjs-qp-condition-buttonsBlock {
4642
4642
  background-color: var(--button-block-background);
4643
4643
  border-radius: 0;
4644
- padding: 0 4px;
4644
+ padding: 0;
4645
4645
  position: absolute;
4646
4646
  right: 0;
4647
- top: 1px;
4648
4647
  display: flex;
4649
4648
  align-items: center;
4650
- justify-content: space-between;
4649
+ justify-content: flex-end;
4651
4650
  /*border: 1px solid red;*/
4651
+ top: 4px;
4652
4652
  }
4653
4653
 
4654
4654
  .eqjs-qp-condition-buttonsBlock {
4655
- top: 4px;
4656
4655
  }
4657
4656
 
4658
4657
  .eqjs-qc-column-checkbox:hover,
@@ -4741,9 +4740,10 @@ input.eqjs-invalid {
4741
4740
  .eqjs-qc-row,
4742
4741
  .eqjs-qp-row {
4743
4742
  display: flex;
4743
+ align-items: center;
4744
4744
  flex-wrap: wrap;
4745
4745
  min-height: auto;
4746
- line-height: 1.4;
4746
+ /*line-height: 1.4;*/
4747
4747
  overflow: hidden;
4748
4748
  flex-shrink: 0;
4749
4749
  }
@@ -4772,14 +4772,26 @@ input.eqjs-invalid {
4772
4772
  visibility: hidden;
4773
4773
  }
4774
4774
 
4775
+ .eqjs-buttons-in-block-1.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 1 + 2px);}
4776
+ .eqjs-buttons-in-block-2.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 2 + 2px);}
4777
+ .eqjs-buttons-in-block-3.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 3 + 2px);}
4778
+ .eqjs-buttons-in-block-4.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 4 + 2px);}
4779
+ .eqjs-buttons-in-block-5.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 5 + 2px);}
4780
+
4775
4781
  .eqjs-qc-row.eqjs-qc-disabled[data-show-buttons] {
4776
4782
  padding-right: 60px!important;
4777
4783
  }
4778
4784
 
4779
- .eqjs-qc-row[data-show-buttons] {
4785
+
4786
+ .eqjs-qc-header {
4780
4787
  padding-right: 100px;
4781
4788
  }
4782
4789
 
4790
+ .eqjs-qc-header.eqjs-no-buttons {
4791
+ padding-right: 0;
4792
+ }
4793
+
4794
+
4783
4795
  .eqjs-qc-expr-block {
4784
4796
  flex-basis: var(--column-panel-expr-block-size);
4785
4797
  min-width: var(--column-panel-expr-block-size);
@@ -4787,6 +4799,14 @@ input.eqjs-invalid {
4787
4799
  margin-left: 10px;
4788
4800
  flex-shrink: 1;
4789
4801
  overflow: hidden;
4802
+ height: 100%;
4803
+ display: flex;
4804
+ align-items: center;
4805
+ justify-content: flex-start;
4806
+ }
4807
+
4808
+ .eqjs-qc-expr-block > * {
4809
+ margin: 0 2px!important;
4790
4810
  }
4791
4811
 
4792
4812
  .eqjs-qc-expr-block a, .eqjs-qc-expr-block a:hover {
@@ -4800,13 +4820,20 @@ input.eqjs-invalid {
4800
4820
  width: var(--column-panel-caption-size);
4801
4821
  min-width: 0;
4802
4822
  overflow: hidden;
4823
+ height: 100%;
4824
+ display: flex;
4825
+ align-items: center;
4826
+ flex-wrap: nowrap;
4803
4827
  }
4804
4828
 
4805
- .eqjs-qc-captionelement a {
4829
+ .eqjs-qc-captionelement a, .eqjs-qc-captionelement span {
4806
4830
  white-space: nowrap;
4807
4831
  overflow: hidden;
4808
4832
  text-overflow: ellipsis;
4809
- display: inline-block;
4833
+ display: inline-flex;
4834
+ align-items: center;
4835
+ border: 1px solid transparent;
4836
+ padding: 0 2px;
4810
4837
  }
4811
4838
 
4812
4839
  .eqjs-qc-captionelement a, .eqjs-qc-captionelement a:hover {
@@ -4825,13 +4852,12 @@ input.eqjs-invalid {
4825
4852
 
4826
4853
  .eqjs-qc-sortbutton-placeholder {
4827
4854
  left: 24px;
4828
- top: 1px;
4855
+ top: 3px;
4829
4856
  }
4830
4857
 
4831
4858
  .eqjs-button-placeholder {
4832
4859
  width: var(--tool-button-width);
4833
4860
  height: var(--tool-button-height);
4834
- margin: 2px;
4835
4861
  }
4836
4862
 
4837
4863
  .eqjs-button-placeholder:hover,
@@ -4858,13 +4884,6 @@ input.eqjs-invalid {
4858
4884
  overflow: hidden;
4859
4885
  }
4860
4886
 
4861
- .eqjs-qc-header {
4862
- padding-right: 100px;
4863
- }
4864
-
4865
- .eqjs-qc-header.eqjs-no-buttons {
4866
- padding-right: 0;
4867
- }
4868
4887
 
4869
4888
  .eqjs-qc-header-expression {
4870
4889
  margin-left: 20px;
@@ -4875,8 +4894,8 @@ input.eqjs-invalid {
4875
4894
  .eqjs-qc-header-title {
4876
4895
  flex-shrink: 0;
4877
4896
  flex-grow: 1;
4878
- width: calc(var(--column-panel-caption-size) + 24px);
4879
- margin-left: 10px;
4897
+ width: var(--column-panel-caption-size);
4898
+ margin-left: 2px;
4880
4899
  display: inline-block;
4881
4900
  }
4882
4901
 
@@ -4897,6 +4916,32 @@ input.eqjs-invalid {
4897
4916
  /*border: 1px solid red;*/
4898
4917
  }
4899
4918
 
4919
+ .eqjs-qc-colelement {
4920
+ margin: 0;
4921
+ }
4922
+
4923
+ .eqjs-qc-captionelement {
4924
+ padding: 0!important;
4925
+ }
4926
+
4927
+ .eqjs-qc-captionelement a, .eqjs-qc-expr-block > div {
4928
+ height: 18px;
4929
+ }
4930
+
4931
+ .eqjs-qc-captionelement a {
4932
+ top: -1px;
4933
+ }
4934
+
4935
+ /* Debug styles */
4936
+
4937
+ /*.eqjs-qc-row {*/
4938
+ /* border: 1px solid blue;*/
4939
+ /*}*/
4940
+
4941
+ /*.eqjs-qc-expr-block a, .eqjs-qc-captionelement a {*/
4942
+ /* border: 1px solid red!important;*/
4943
+ /*}*/
4944
+
4900
4945
  /* Mobile */
4901
4946
  .eqjs-qc-row.eqjs-mobile, .eqjs-qp-row.eqjs-mobile {
4902
4947
  padding: 4px 8px;
@@ -1,5 +1,5 @@
1
1
  :root {
2
- --column-panel-expr-block-size: 180px;
2
+ --column-panel-expr-block-size: 220px;
3
3
  --column-panel-caption-size: 100px;
4
4
  --tool-button-width: 22px;
5
5
  --tool-button-height: 22px;
@@ -10,18 +10,17 @@
10
10
  .eqjs-qp-condition-buttonsBlock {
11
11
  background-color: var(--button-block-background);
12
12
  border-radius: 0;
13
- padding: 0 4px;
13
+ padding: 0;
14
14
  position: absolute;
15
15
  right: 0;
16
- top: 1px;
17
16
  display: flex;
18
17
  align-items: center;
19
- justify-content: space-between;
18
+ justify-content: flex-end;
20
19
  /*border: 1px solid red;*/
20
+ top: 4px;
21
21
  }
22
22
 
23
23
  .eqjs-qp-condition-buttonsBlock {
24
- top: 4px;
25
24
  }
26
25
 
27
26
  .eqjs-qc-column-checkbox:hover,
@@ -110,9 +109,10 @@
110
109
  .eqjs-qc-row,
111
110
  .eqjs-qp-row {
112
111
  display: flex;
112
+ align-items: center;
113
113
  flex-wrap: wrap;
114
114
  min-height: auto;
115
- line-height: 1.4;
115
+ /*line-height: 1.4;*/
116
116
  overflow: hidden;
117
117
  flex-shrink: 0;
118
118
  }
@@ -141,14 +141,26 @@
141
141
  visibility: hidden;
142
142
  }
143
143
 
144
+ .eqjs-buttons-in-block-1.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 1 + 2px);}
145
+ .eqjs-buttons-in-block-2.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 2 + 2px);}
146
+ .eqjs-buttons-in-block-3.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 3 + 2px);}
147
+ .eqjs-buttons-in-block-4.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 4 + 2px);}
148
+ .eqjs-buttons-in-block-5.eqjs-qc-row[data-show-buttons] {padding-right: calc(var(--tool-button-width) * 5 + 2px);}
149
+
144
150
  .eqjs-qc-row.eqjs-qc-disabled[data-show-buttons] {
145
151
  padding-right: 60px!important;
146
152
  }
147
153
 
148
- .eqjs-qc-row[data-show-buttons] {
154
+
155
+ .eqjs-qc-header {
149
156
  padding-right: 100px;
150
157
  }
151
158
 
159
+ .eqjs-qc-header.eqjs-no-buttons {
160
+ padding-right: 0;
161
+ }
162
+
163
+
152
164
  .eqjs-qc-expr-block {
153
165
  flex-basis: var(--column-panel-expr-block-size);
154
166
  min-width: var(--column-panel-expr-block-size);
@@ -156,6 +168,14 @@
156
168
  margin-left: 10px;
157
169
  flex-shrink: 1;
158
170
  overflow: hidden;
171
+ height: 100%;
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: flex-start;
175
+ }
176
+
177
+ .eqjs-qc-expr-block > * {
178
+ margin: 0 2px!important;
159
179
  }
160
180
 
161
181
  .eqjs-qc-expr-block a, .eqjs-qc-expr-block a:hover {
@@ -169,13 +189,20 @@
169
189
  width: var(--column-panel-caption-size);
170
190
  min-width: 0;
171
191
  overflow: hidden;
192
+ height: 100%;
193
+ display: flex;
194
+ align-items: center;
195
+ flex-wrap: nowrap;
172
196
  }
173
197
 
174
- .eqjs-qc-captionelement a {
198
+ .eqjs-qc-captionelement a, .eqjs-qc-captionelement span {
175
199
  white-space: nowrap;
176
200
  overflow: hidden;
177
201
  text-overflow: ellipsis;
178
- display: inline-block;
202
+ display: inline-flex;
203
+ align-items: center;
204
+ border: 1px solid transparent;
205
+ padding: 0 2px;
179
206
  }
180
207
 
181
208
  .eqjs-qc-captionelement a, .eqjs-qc-captionelement a:hover {
@@ -194,13 +221,12 @@
194
221
 
195
222
  .eqjs-qc-sortbutton-placeholder {
196
223
  left: 24px;
197
- top: 1px;
224
+ top: 3px;
198
225
  }
199
226
 
200
227
  .eqjs-button-placeholder {
201
228
  width: var(--tool-button-width);
202
229
  height: var(--tool-button-height);
203
- margin: 2px;
204
230
  }
205
231
 
206
232
  .eqjs-button-placeholder:hover,
@@ -227,13 +253,6 @@
227
253
  overflow: hidden;
228
254
  }
229
255
 
230
- .eqjs-qc-header {
231
- padding-right: 100px;
232
- }
233
-
234
- .eqjs-qc-header.eqjs-no-buttons {
235
- padding-right: 0;
236
- }
237
256
 
238
257
  .eqjs-qc-header-expression {
239
258
  margin-left: 20px;
@@ -244,8 +263,8 @@
244
263
  .eqjs-qc-header-title {
245
264
  flex-shrink: 0;
246
265
  flex-grow: 1;
247
- width: calc(var(--column-panel-caption-size) + 24px);
248
- margin-left: 10px;
266
+ width: var(--column-panel-caption-size);
267
+ margin-left: 2px;
249
268
  display: inline-block;
250
269
  }
251
270
 
@@ -266,6 +285,32 @@
266
285
  /*border: 1px solid red;*/
267
286
  }
268
287
 
288
+ .eqjs-qc-colelement {
289
+ margin: 0;
290
+ }
291
+
292
+ .eqjs-qc-captionelement {
293
+ padding: 0!important;
294
+ }
295
+
296
+ .eqjs-qc-captionelement a, .eqjs-qc-expr-block > div {
297
+ height: 18px;
298
+ }
299
+
300
+ .eqjs-qc-captionelement a {
301
+ top: -1px;
302
+ }
303
+
304
+ /* Debug styles */
305
+
306
+ /*.eqjs-qc-row {*/
307
+ /* border: 1px solid blue;*/
308
+ /*}*/
309
+
310
+ /*.eqjs-qc-expr-block a, .eqjs-qc-captionelement a {*/
311
+ /* border: 1px solid red!important;*/
312
+ /*}*/
313
+
269
314
  /* Mobile */
270
315
  .eqjs-qc-row.eqjs-mobile, .eqjs-qp-row.eqjs-mobile {
271
316
  padding: 4px 8px;
@@ -1992,13 +1992,15 @@ class ColumnRendererCP {
1992
1992
  //start sort button
1993
1993
  .addChild('div', builder => builder
1994
1994
  .addClass(`${eqCssPrefix}-button-placeholder`, `${this.cssPrefix}-button-placeholder`, `${this.cssPrefix}-colelement`, `${this.cssPrefix}-sortbutton-placeholder`)
1995
- .addChildElement(this.sortingButton))
1996
- // end sort button
1997
- .addChildElement(this.renderExpressionBlock());
1995
+ .addChildElement(this.sortingButton));
1996
+ // end sort button
1997
+ builder.addChildElement(this.renderExpressionBlock());
1998
1998
  if (this.panel.options.showColumnTitles !== false && !ui.browserUtils.isMobileMode()) {
1999
1999
  builder
2000
2000
  .addChildElement(this.renderCaptionBlock());
2001
2001
  }
2002
+ let buttonsIndex = 0;
2003
+ let buttonsList = '';
2002
2004
  builder
2003
2005
  //start buttons
2004
2006
  .addChild('div', builder => {
@@ -2008,30 +2010,42 @@ class ColumnRendererCP {
2008
2010
  //start enable button
2009
2011
  if (this.getButtonsToShow().indexOf("enable") >= 0 && !this.column.isReadOnly()) {
2010
2012
  builder.addChildElement(this.renderEnabledButton());
2013
+ buttonsIndex++;
2014
+ buttonsList += 'Enable';
2011
2015
  }
2012
2016
  //end enable button
2013
2017
  //start aggr func button
2014
2018
  if (this.getButtonsToShow().indexOf("type") >= 0 && this.columnEnabled) {
2015
2019
  builder.addChildElement(this.renderColumnTypeButton());
2020
+ buttonsIndex++;
2021
+ buttonsList += 'Type';
2016
2022
  }
2017
2023
  //end aggr func button
2018
2024
  //start format selector button
2019
2025
  if (this.getButtonsToShow().indexOf("format") >= 0 && this.columnEnabled) {
2020
2026
  builder.addChildElement(this.renderColumnFormatButton());
2027
+ buttonsIndex++;
2028
+ buttonsList += 'Format';
2021
2029
  }
2022
2030
  //end format selector button
2023
2031
  //start delete button
2024
2032
  if (this.getButtonsToShow().indexOf("delete") >= 0 && !this.column.isReadOnly()) {
2025
2033
  builder.addChildElement(this.renderDeleteButton());
2034
+ buttonsIndex++;
2035
+ buttonsList += 'Delete';
2026
2036
  }
2027
2037
  //end delete button
2028
2038
  //start menu button
2029
2039
  if (this.getButtonsToShow().indexOf("menu") >= 0 && !this.column.isReadOnly()) {
2030
2040
  builder.addChildElement(this.renderMenuButton());
2041
+ buttonsIndex++;
2042
+ buttonsList += 'Menu';
2031
2043
  }
2032
2044
  //end menu button
2033
2045
  });
2034
2046
  //end buttons
2047
+ builder.addClass(`eqjs-buttons-in-block-${buttonsIndex}`);
2048
+ builder.addClass(`eqjs-buttons-in-block-${buttonsList}`);
2035
2049
  if (!ui.browserUtils.isMobileMode()) {
2036
2050
  //start event listeners
2037
2051
  builder
@@ -2053,12 +2067,15 @@ class ColumnRendererCP {
2053
2067
  }
2054
2068
  onMouseClick(ev) {
2055
2069
  ev.stopPropagation();
2070
+ this.activate();
2071
+ return false;
2072
+ }
2073
+ activate() {
2056
2074
  this.panel.toggleColumnPicked(this.column);
2057
2075
  this.adjustButtonsVisibility();
2058
2076
  if (!ui.browserUtils.isMobileMode()) {
2059
2077
  this.element.dispatchEvent(ui.createBrowserEvent("mouseenter"));
2060
2078
  }
2061
- return false;
2062
2079
  }
2063
2080
  fireColumnChanged() {
2064
2081
  this.column.fireChangedEvent();
@@ -2078,6 +2095,7 @@ class ColumnRendererCP {
2078
2095
  .text(this.column.caption)
2079
2096
  .on('click', (ev) => {
2080
2097
  ev.stopPropagation();
2098
+ this.activate();
2081
2099
  const element = ev.target;
2082
2100
  const inputEl = element.parentElement.querySelector('input');
2083
2101
  if (inputEl) {
@@ -2152,7 +2170,7 @@ class ColumnRendererCP {
2152
2170
  sortButtonDirectionCssClass = `${sortButtonCssClass}-none`;
2153
2171
  break;
2154
2172
  }
2155
- if (!this.isEditable()) {
2173
+ if (!this.isEditable() || ui.browserUtils.isMobileMode()) {
2156
2174
  if (sorting === core.SortDirection.Ascending
2157
2175
  || sorting === core.SortDirection.Descending)
2158
2176
  return ui.domel('div')
@@ -2168,11 +2186,12 @@ class ColumnRendererCP {
2168
2186
  .attr('tabIndex', '0')
2169
2187
  .on('click', (ev) => {
2170
2188
  ev.stopPropagation();
2189
+ this.activate();
2171
2190
  this.keepShowingButtons = true;
2172
2191
  const menu = this.getUIS() ? this.panel.sortMenu || this.panel.moveMenu : this.panel.moveMenu;
2173
2192
  menu.showMenu({
2174
2193
  anchor: this.sortingButton,
2175
- selectedIds: this.column.isHidden() ? ['IsHidden'] : null,
2194
+ selectedIds: this.getButtonMenuSelectedItems(), // this.column.isHidden() ? ['IsHidden'] : null,
2176
2195
  itemSelectedCallback: (data, items) => {
2177
2196
  let action;
2178
2197
  switch (data.id) {
@@ -2285,6 +2304,7 @@ class ColumnRendererCP {
2285
2304
  .attr('tabIndex', '0')
2286
2305
  .on('click', (ev) => {
2287
2306
  ev.stopPropagation();
2307
+ this.activate();
2288
2308
  this.keepShowingButtons = true;
2289
2309
  this.changeTypeHandler(ev);
2290
2310
  })
@@ -2493,6 +2513,7 @@ class ColumnRendererCP {
2493
2513
  curQuery.fireColumnsChangedEvent(core.QueryChangeAction.Delete, this.column);
2494
2514
  break;
2495
2515
  case exports.ColumnAction.Enable:
2516
+ this.activate();
2496
2517
  this.columnEnabled = !this.columnEnabled;
2497
2518
  this.fireColumnChanged();
2498
2519
  break;
@@ -2527,6 +2548,7 @@ class ColumnRendererCP {
2527
2548
  case exports.ColumnAction.Menu:
2528
2549
  const colMenu = this.buttonMenu;
2529
2550
  this.keepShowingButtons = true;
2551
+ this.activate();
2530
2552
  colMenu.showMenu({
2531
2553
  anchor: evt ? evt.target : null,
2532
2554
  selectedIds: this.getButtonMenuSelectedItems(),
@@ -2561,7 +2583,7 @@ class ColumnRendererCP {
2561
2583
  action = exports.ColumnAction.SortingAsc;
2562
2584
  break;
2563
2585
  case "Descending":
2564
- action = exports.ColumnAction.SortingAsc;
2586
+ action = exports.ColumnAction.SortingDesc;
2565
2587
  break;
2566
2588
  }
2567
2589
  this.buttonMenuHandler(action, evt);
@@ -2591,26 +2613,26 @@ class ColumnRendererCP {
2591
2613
  if (menuId) {
2592
2614
  menuId += '-ButtonMenu';
2593
2615
  }
2594
- const common = [];
2595
- common.push({
2616
+ const Appearance = [];
2617
+ Appearance.push({
2596
2618
  id: "enable",
2597
2619
  text: core.i18n.getText('MenuEnable')
2598
2620
  });
2599
2621
  if (this.panel.options.allowHiddenColumns) {
2600
- common.push({
2622
+ Appearance.push({
2601
2623
  id: "hidden",
2602
2624
  text: core.i18n.getText('CmdHiddenColumn')
2603
2625
  });
2604
2626
  }
2605
- common.push({
2627
+ Appearance.push({
2606
2628
  id: "delete",
2607
2629
  text: core.i18n.getText('CmdDelete')
2608
2630
  });
2609
2631
  let items = [];
2610
2632
  items.push({
2611
2633
  id: '__group',
2612
- text: ' ',
2613
- items: common
2634
+ text: core.i18n.getText('CmdGroupAppearance'),
2635
+ items: Appearance
2614
2636
  });
2615
2637
  const sortItems = this.panel.options.allowSorting ?
2616
2638
  [
@@ -2669,6 +2691,17 @@ class ColumnRendererCP {
2669
2691
  if (this.column.isHidden()) {
2670
2692
  arrSelected.push("hidden");
2671
2693
  }
2694
+ switch (this.column.sorting) {
2695
+ case core.SortDirection.None:
2696
+ arrSelected.push("None");
2697
+ break;
2698
+ case core.SortDirection.Ascending:
2699
+ arrSelected.push("Ascending");
2700
+ break;
2701
+ case core.SortDirection.Descending:
2702
+ arrSelected.push("Descending");
2703
+ break;
2704
+ }
2672
2705
  const formats = this.panel
2673
2706
  .getContext()
2674
2707
  .getModel()
@@ -2710,6 +2743,7 @@ class AttrColumnRendererCP extends ColumnRendererCP {
2710
2743
  .text(attrCaption) //TO DO:add localization
2711
2744
  .on('click', (ev) => {
2712
2745
  ev.stopPropagation();
2746
+ this.activate();
2713
2747
  this.panel.showEntitiesMenu({
2714
2748
  anchor: ev.target,
2715
2749
  selectedIds: null,
@@ -2880,6 +2914,7 @@ class AggrFuncColumnRendererCP extends AttrColumnRendererCP {
2880
2914
  .text(item.text)
2881
2915
  .on('click', (ev) => {
2882
2916
  ev.stopPropagation();
2917
+ this.activate();
2883
2918
  this.functionMenu.showMenu({
2884
2919
  anchor: functionLink.toDOM(),
2885
2920
  selectedIds: null,
@@ -3558,7 +3593,7 @@ class ColumnsPanel extends core.Widget {
3558
3593
  this.context.options.columnTitleFormat = options.titleElementFormat;
3559
3594
  }
3560
3595
  if (ui.browserUtils.isMobileMode()) {
3561
- this.options.buttons = ["menu"];
3596
+ this.options.buttons = ["menu", "sorting"];
3562
3597
  this.options.showHeader = false;
3563
3598
  }
3564
3599
  }
@@ -14213,6 +14248,7 @@ function addEasyQueryUITexts() {
14213
14248
  CmdDeleteColumn: 'Delete column',
14214
14249
  CmdDeleteSorting: 'Delete sorting',
14215
14250
  CmdDescending: 'Descending',
14251
+ CmdGroupAppearance: 'Appearance',
14216
14252
  CmdGroupSort: 'Sorting',
14217
14253
  CmdGroupFormat: 'Display format',
14218
14254
  CmdNotSorted: 'Not sorted',
@@ -1990,13 +1990,15 @@ class ColumnRendererCP {
1990
1990
  //start sort button
1991
1991
  .addChild('div', builder => builder
1992
1992
  .addClass(`${eqCssPrefix}-button-placeholder`, `${this.cssPrefix}-button-placeholder`, `${this.cssPrefix}-colelement`, `${this.cssPrefix}-sortbutton-placeholder`)
1993
- .addChildElement(this.sortingButton))
1994
- // end sort button
1995
- .addChildElement(this.renderExpressionBlock());
1993
+ .addChildElement(this.sortingButton));
1994
+ // end sort button
1995
+ builder.addChildElement(this.renderExpressionBlock());
1996
1996
  if (this.panel.options.showColumnTitles !== false && !browserUtils.isMobileMode()) {
1997
1997
  builder
1998
1998
  .addChildElement(this.renderCaptionBlock());
1999
1999
  }
2000
+ let buttonsIndex = 0;
2001
+ let buttonsList = '';
2000
2002
  builder
2001
2003
  //start buttons
2002
2004
  .addChild('div', builder => {
@@ -2006,30 +2008,42 @@ class ColumnRendererCP {
2006
2008
  //start enable button
2007
2009
  if (this.getButtonsToShow().indexOf("enable") >= 0 && !this.column.isReadOnly()) {
2008
2010
  builder.addChildElement(this.renderEnabledButton());
2011
+ buttonsIndex++;
2012
+ buttonsList += 'Enable';
2009
2013
  }
2010
2014
  //end enable button
2011
2015
  //start aggr func button
2012
2016
  if (this.getButtonsToShow().indexOf("type") >= 0 && this.columnEnabled) {
2013
2017
  builder.addChildElement(this.renderColumnTypeButton());
2018
+ buttonsIndex++;
2019
+ buttonsList += 'Type';
2014
2020
  }
2015
2021
  //end aggr func button
2016
2022
  //start format selector button
2017
2023
  if (this.getButtonsToShow().indexOf("format") >= 0 && this.columnEnabled) {
2018
2024
  builder.addChildElement(this.renderColumnFormatButton());
2025
+ buttonsIndex++;
2026
+ buttonsList += 'Format';
2019
2027
  }
2020
2028
  //end format selector button
2021
2029
  //start delete button
2022
2030
  if (this.getButtonsToShow().indexOf("delete") >= 0 && !this.column.isReadOnly()) {
2023
2031
  builder.addChildElement(this.renderDeleteButton());
2032
+ buttonsIndex++;
2033
+ buttonsList += 'Delete';
2024
2034
  }
2025
2035
  //end delete button
2026
2036
  //start menu button
2027
2037
  if (this.getButtonsToShow().indexOf("menu") >= 0 && !this.column.isReadOnly()) {
2028
2038
  builder.addChildElement(this.renderMenuButton());
2039
+ buttonsIndex++;
2040
+ buttonsList += 'Menu';
2029
2041
  }
2030
2042
  //end menu button
2031
2043
  });
2032
2044
  //end buttons
2045
+ builder.addClass(`eqjs-buttons-in-block-${buttonsIndex}`);
2046
+ builder.addClass(`eqjs-buttons-in-block-${buttonsList}`);
2033
2047
  if (!browserUtils.isMobileMode()) {
2034
2048
  //start event listeners
2035
2049
  builder
@@ -2051,12 +2065,15 @@ class ColumnRendererCP {
2051
2065
  }
2052
2066
  onMouseClick(ev) {
2053
2067
  ev.stopPropagation();
2068
+ this.activate();
2069
+ return false;
2070
+ }
2071
+ activate() {
2054
2072
  this.panel.toggleColumnPicked(this.column);
2055
2073
  this.adjustButtonsVisibility();
2056
2074
  if (!browserUtils.isMobileMode()) {
2057
2075
  this.element.dispatchEvent(createBrowserEvent("mouseenter"));
2058
2076
  }
2059
- return false;
2060
2077
  }
2061
2078
  fireColumnChanged() {
2062
2079
  this.column.fireChangedEvent();
@@ -2076,6 +2093,7 @@ class ColumnRendererCP {
2076
2093
  .text(this.column.caption)
2077
2094
  .on('click', (ev) => {
2078
2095
  ev.stopPropagation();
2096
+ this.activate();
2079
2097
  const element = ev.target;
2080
2098
  const inputEl = element.parentElement.querySelector('input');
2081
2099
  if (inputEl) {
@@ -2150,7 +2168,7 @@ class ColumnRendererCP {
2150
2168
  sortButtonDirectionCssClass = `${sortButtonCssClass}-none`;
2151
2169
  break;
2152
2170
  }
2153
- if (!this.isEditable()) {
2171
+ if (!this.isEditable() || browserUtils.isMobileMode()) {
2154
2172
  if (sorting === SortDirection.Ascending
2155
2173
  || sorting === SortDirection.Descending)
2156
2174
  return domel('div')
@@ -2166,11 +2184,12 @@ class ColumnRendererCP {
2166
2184
  .attr('tabIndex', '0')
2167
2185
  .on('click', (ev) => {
2168
2186
  ev.stopPropagation();
2187
+ this.activate();
2169
2188
  this.keepShowingButtons = true;
2170
2189
  const menu = this.getUIS() ? this.panel.sortMenu || this.panel.moveMenu : this.panel.moveMenu;
2171
2190
  menu.showMenu({
2172
2191
  anchor: this.sortingButton,
2173
- selectedIds: this.column.isHidden() ? ['IsHidden'] : null,
2192
+ selectedIds: this.getButtonMenuSelectedItems(), // this.column.isHidden() ? ['IsHidden'] : null,
2174
2193
  itemSelectedCallback: (data, items) => {
2175
2194
  let action;
2176
2195
  switch (data.id) {
@@ -2283,6 +2302,7 @@ class ColumnRendererCP {
2283
2302
  .attr('tabIndex', '0')
2284
2303
  .on('click', (ev) => {
2285
2304
  ev.stopPropagation();
2305
+ this.activate();
2286
2306
  this.keepShowingButtons = true;
2287
2307
  this.changeTypeHandler(ev);
2288
2308
  })
@@ -2491,6 +2511,7 @@ class ColumnRendererCP {
2491
2511
  curQuery.fireColumnsChangedEvent(QueryChangeAction.Delete, this.column);
2492
2512
  break;
2493
2513
  case ColumnAction.Enable:
2514
+ this.activate();
2494
2515
  this.columnEnabled = !this.columnEnabled;
2495
2516
  this.fireColumnChanged();
2496
2517
  break;
@@ -2525,6 +2546,7 @@ class ColumnRendererCP {
2525
2546
  case ColumnAction.Menu:
2526
2547
  const colMenu = this.buttonMenu;
2527
2548
  this.keepShowingButtons = true;
2549
+ this.activate();
2528
2550
  colMenu.showMenu({
2529
2551
  anchor: evt ? evt.target : null,
2530
2552
  selectedIds: this.getButtonMenuSelectedItems(),
@@ -2559,7 +2581,7 @@ class ColumnRendererCP {
2559
2581
  action = ColumnAction.SortingAsc;
2560
2582
  break;
2561
2583
  case "Descending":
2562
- action = ColumnAction.SortingAsc;
2584
+ action = ColumnAction.SortingDesc;
2563
2585
  break;
2564
2586
  }
2565
2587
  this.buttonMenuHandler(action, evt);
@@ -2589,26 +2611,26 @@ class ColumnRendererCP {
2589
2611
  if (menuId) {
2590
2612
  menuId += '-ButtonMenu';
2591
2613
  }
2592
- const common = [];
2593
- common.push({
2614
+ const Appearance = [];
2615
+ Appearance.push({
2594
2616
  id: "enable",
2595
2617
  text: i18n$1.getText('MenuEnable')
2596
2618
  });
2597
2619
  if (this.panel.options.allowHiddenColumns) {
2598
- common.push({
2620
+ Appearance.push({
2599
2621
  id: "hidden",
2600
2622
  text: i18n$1.getText('CmdHiddenColumn')
2601
2623
  });
2602
2624
  }
2603
- common.push({
2625
+ Appearance.push({
2604
2626
  id: "delete",
2605
2627
  text: i18n$1.getText('CmdDelete')
2606
2628
  });
2607
2629
  let items = [];
2608
2630
  items.push({
2609
2631
  id: '__group',
2610
- text: ' ',
2611
- items: common
2632
+ text: i18n$1.getText('CmdGroupAppearance'),
2633
+ items: Appearance
2612
2634
  });
2613
2635
  const sortItems = this.panel.options.allowSorting ?
2614
2636
  [
@@ -2667,6 +2689,17 @@ class ColumnRendererCP {
2667
2689
  if (this.column.isHidden()) {
2668
2690
  arrSelected.push("hidden");
2669
2691
  }
2692
+ switch (this.column.sorting) {
2693
+ case SortDirection.None:
2694
+ arrSelected.push("None");
2695
+ break;
2696
+ case SortDirection.Ascending:
2697
+ arrSelected.push("Ascending");
2698
+ break;
2699
+ case SortDirection.Descending:
2700
+ arrSelected.push("Descending");
2701
+ break;
2702
+ }
2670
2703
  const formats = this.panel
2671
2704
  .getContext()
2672
2705
  .getModel()
@@ -2708,6 +2741,7 @@ class AttrColumnRendererCP extends ColumnRendererCP {
2708
2741
  .text(attrCaption) //TO DO:add localization
2709
2742
  .on('click', (ev) => {
2710
2743
  ev.stopPropagation();
2744
+ this.activate();
2711
2745
  this.panel.showEntitiesMenu({
2712
2746
  anchor: ev.target,
2713
2747
  selectedIds: null,
@@ -2878,6 +2912,7 @@ class AggrFuncColumnRendererCP extends AttrColumnRendererCP {
2878
2912
  .text(item.text)
2879
2913
  .on('click', (ev) => {
2880
2914
  ev.stopPropagation();
2915
+ this.activate();
2881
2916
  this.functionMenu.showMenu({
2882
2917
  anchor: functionLink.toDOM(),
2883
2918
  selectedIds: null,
@@ -3556,7 +3591,7 @@ class ColumnsPanel extends Widget {
3556
3591
  this.context.options.columnTitleFormat = options.titleElementFormat;
3557
3592
  }
3558
3593
  if (browserUtils.isMobileMode()) {
3559
- this.options.buttons = ["menu"];
3594
+ this.options.buttons = ["menu", "sorting"];
3560
3595
  this.options.showHeader = false;
3561
3596
  }
3562
3597
  }
@@ -14211,6 +14246,7 @@ function addEasyQueryUITexts() {
14211
14246
  CmdDeleteColumn: 'Delete column',
14212
14247
  CmdDeleteSorting: 'Delete sorting',
14213
14248
  CmdDescending: 'Descending',
14249
+ CmdGroupAppearance: 'Appearance',
14214
14250
  CmdGroupSort: 'Sorting',
14215
14251
  CmdGroupFormat: 'Display format',
14216
14252
  CmdNotSorted: 'Not sorted',
@@ -32,6 +32,7 @@ export declare abstract class ColumnRendererCP {
32
32
  protected set columnEnabled(value: boolean);
33
33
  render(): HTMLDivElement;
34
34
  private onMouseClick;
35
+ activate(): void;
35
36
  fireColumnChanged(): void;
36
37
  refresh(): void;
37
38
  protected abstract renderExpressionBlock(): HTMLDivElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyquery/ui",
3
- "version": "7.3.0-rc01",
3
+ "version": "7.3.0-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.3.0-rc01"
33
+ "@easyquery/core": "^7.3.0-rc02"
34
34
  },
35
35
  "files": [
36
36
  "dist",