@easyquery/ui 7.2.5-rc02 → 7.2.5

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.
@@ -187,9 +187,9 @@ class EntitiesPanel extends Widget {
187
187
  this.rootEntityBlock = document.createElement('div');
188
188
  if (model != null && !model.isEmpty()) {
189
189
  let entTree = model.getEntitiesTree({
190
- addUIC: this.options.showAttributes.useInConditions,
190
+ addUIC: this.options.showAttributes.useInConditions && !this.options.syncWithColumns,
191
191
  addUIR: this.options.showAttributes.useInResult,
192
- addUIS: this.options.showAttributes.useInSorting,
192
+ addUIS: this.options.showAttributes.useInSorting && !this.options.syncWithColumns,
193
193
  attrPlacement: this.options.attrPlacement,
194
194
  sortEntities: this.options.sortEntities,
195
195
  includeRootData: true
@@ -288,7 +288,7 @@ class EntitiesPanel extends Widget {
288
288
  const attr = model.getAttributeById(attrId);
289
289
  const column = query.addColumn({
290
290
  attribute: attr
291
- });
291
+ }, true);
292
292
  query.fireColumnsChangedEvent(QueryChangeAction.Add, column);
293
293
  }
294
294
  else {
@@ -320,7 +320,7 @@ class EntitiesPanel extends Widget {
320
320
  attrNode.innerHTML = "";
321
321
  attrNode.appendChild(attrLabel);
322
322
  attrNode.setAttribute('data-id', item.id);
323
- if (this.options.draggableAttributes) {
323
+ if (this.options.draggableAttributes && !this.options.syncWithColumns) {
324
324
  eqDragManager.registerDraggableItem({
325
325
  element: attrNode,
326
326
  scope: "entityAttr",
@@ -391,7 +391,7 @@ class EntitiesPanel extends Widget {
391
391
  }
392
392
  if (element.checked) {
393
393
  for (const attrId of attrList) {
394
- query.addColumn({ attributeId: attrId });
394
+ query.addColumn({ attributeId: attrId }, true);
395
395
  }
396
396
  }
397
397
  else {
@@ -5617,7 +5617,7 @@ class SortingBar extends Widget {
5617
5617
  attributeId: attrId,
5618
5618
  justsorted: true,
5619
5619
  sorting: SortDirection.Ascending
5620
- });
5620
+ }, true);
5621
5621
  query.fireChangedEvent({
5622
5622
  part: QueryChangePart.SortingColumns,
5623
5623
  action: QueryChangeAction.Add,
@@ -8756,7 +8756,7 @@ class EasyGridWidget extends Grid {
8756
8756
  const query = this.getContext().getQuery();
8757
8757
  const col = query.addColumn({
8758
8758
  attributeId: attrId
8759
- });
8759
+ }, true);
8760
8760
  query.fireChangedEvent({
8761
8761
  part: QueryChangePart.Columns,
8762
8762
  action: QueryChangeAction.Add,
@@ -8886,10 +8886,7 @@ class ManageDrillDownWidget extends Widget {
8886
8886
  utils.moveArrayItem(attr.operators, opIdx, 0);
8887
8887
  }
8888
8888
  }, null);
8889
- this.ddQuery = new Query(model, null, {
8890
- parent: query,
8891
- context: this.context
8892
- });
8889
+ this.ddQuery = query.createSubQuery();
8893
8890
  const dds = this.context.getQuery().getDrillDowns();
8894
8891
  if (dds.length) {
8895
8892
  const dd = dds[0];
@@ -8974,63 +8971,6 @@ var FacetType;
8974
8971
  FacetType["PivotTable"] = "PIVOT_TABLE";
8975
8972
  })(FacetType || (FacetType = {}));
8976
8973
 
8977
- class ExportDialog {
8978
- constructor(context) {
8979
- this.context = context;
8980
- this.promise = null;
8981
- }
8982
- show(defFormat = null) {
8983
- if (!this.promise) {
8984
- const formats = this.context.getExportFormats();
8985
- if (formats.length == 0)
8986
- throw Error("No exporter has been registered.");
8987
- defFormat = defFormat || formats[0];
8988
- this.promise = new Promise((resolve, reject) => {
8989
- const ds = this.context.getServices().getService('DialogService');
8990
- const body = domel('div')
8991
- .addClass('kdlg-form-section')
8992
- .addChild('div', b => b
8993
- .addClass('kfrm-form')
8994
- .addChild('div', b => b
8995
- .addClass('kfrm-fields col-a-1 label-align-right')
8996
- .addChild('label', b => b
8997
- .addClass('kdlg-form-label', 'kflex-20')
8998
- .attr('for', 'export_format')
8999
- .addText(i18n$1.getText('ExportDlgFmtLabel')))
9000
- .addChild('div', b => b
9001
- .addClass('kfrm-select')
9002
- .addChild('select', b => {
9003
- b
9004
- .attr('name', 'export_format')
9005
- .id('exportFormat');
9006
- for (const format of this.context.getExportFormats()) {
9007
- b.addOption({
9008
- value: format,
9009
- title: i18n$1.getText(format) || format,
9010
- selected: defFormat == format
9011
- });
9012
- }
9013
- }))))
9014
- .toDOM();
9015
- ds.open({
9016
- title: i18n$1.getText('ExportDlgTitle'),
9017
- body: body,
9018
- onSubmit: () => {
9019
- const format = body.querySelector('#exportFormat').value;
9020
- this.context.exportResult({
9021
- format: format,
9022
- success: resolve,
9023
- error: reject
9024
- });
9025
- return true;
9026
- }
9027
- });
9028
- });
9029
- }
9030
- return this.promise.finally(() => this.promise = null);
9031
- }
9032
- }
9033
-
9034
8974
  function __awaiter(thisArg, _arguments, P, generator) {
9035
8975
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9036
8976
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10864,6 +10804,63 @@ class FacetContainer extends Widget {
10864
10804
  }
10865
10805
  }
10866
10806
 
10807
+ class ExportDialog {
10808
+ constructor(context) {
10809
+ this.context = context;
10810
+ this.promise = null;
10811
+ }
10812
+ show(defFormat = null) {
10813
+ if (!this.promise) {
10814
+ const formats = this.context.getExportFormats();
10815
+ if (formats.length == 0)
10816
+ throw Error("No exporter has been registered.");
10817
+ defFormat = defFormat || formats[0];
10818
+ this.promise = new Promise((resolve, reject) => {
10819
+ const ds = this.context.getServices().getService('DialogService');
10820
+ const body = domel('div')
10821
+ .addClass('kdlg-form-section')
10822
+ .addChild('div', b => b
10823
+ .addClass('kfrm-form')
10824
+ .addChild('div', b => b
10825
+ .addClass('kfrm-fields col-a-1 label-align-right')
10826
+ .addChild('label', b => b
10827
+ .addClass('kdlg-form-label', 'kflex-20')
10828
+ .attr('for', 'export_format')
10829
+ .addText(i18n$1.getText('ExportDlgFmtLabel')))
10830
+ .addChild('div', b => b
10831
+ .addClass('kfrm-select')
10832
+ .addChild('select', b => {
10833
+ b
10834
+ .attr('name', 'export_format')
10835
+ .id('exportFormat');
10836
+ for (const format of this.context.getExportFormats()) {
10837
+ b.addOption({
10838
+ value: format,
10839
+ title: i18n$1.getText(format) || format,
10840
+ selected: defFormat == format
10841
+ });
10842
+ }
10843
+ }))))
10844
+ .toDOM();
10845
+ ds.open({
10846
+ title: i18n$1.getText('ExportDlgTitle'),
10847
+ body: body,
10848
+ onSubmit: () => {
10849
+ const format = body.querySelector('#exportFormat').value;
10850
+ this.context.exportResult({
10851
+ format: format,
10852
+ success: resolve,
10853
+ error: reject
10854
+ });
10855
+ return true;
10856
+ }
10857
+ });
10858
+ });
10859
+ }
10860
+ return this.promise.finally(() => this.promise = null);
10861
+ }
10862
+ }
10863
+
10867
10864
  class ResultFacetsPanel extends FacetContainer {
10868
10865
  constructor(slot) {
10869
10866
  super(slot);
@@ -11735,7 +11732,8 @@ class AggrSettingsRenderer {
11735
11732
  const funcs = this.query.getModel().getAggrFunctions();
11736
11733
  const items = [];
11737
11734
  for (const func of funcs) {
11738
- if (!func)
11735
+ //add all functions except those we don't process
11736
+ if (!func || func.id == 'MIN' || func.id == 'MAX' || func.id == 'CNTDST')
11739
11737
  continue;
11740
11738
  this.funcMap[func.id] = func;
11741
11739
  const funcCaption = model
@@ -14378,4 +14376,4 @@ if (!Array.prototype.findIndex) {
14378
14376
  };
14379
14377
  }
14380
14378
 
14381
- export { AddRowRenderer, AdvancedSearchView, AggrFuncColumnRendererCB, AggrFuncColumnRendererCP, AggrSettingsDialog, AggrSettingsRenderer, AggregationBar, AttrColumnRendererCB, AttrColumnRendererCP, AttributeExpressionRenderer, BaseElementRenderer, ChartFacet, ChartJsWidget, ChartType, ChartWidget, ColumnAction, ColumnRendererCB, ColumnRendererCP, ColumnsBar, ColumnsPanel, ConditionAction, ConditionGroupRenderer, ConditionGroupRowRenderer, ConditionRenderer, ConstColumnRendererCP, CustomListExpressionRenderer, CustomSqlColumnRendererCP, DataFilterView, DataTableFacet, DateTimeExpressionRenderer, DomDropDownElementBuilder, DropDownRenderer, EasyGridWidget, EntitiesPanel, EqHtmlGrid, ExportDialog, ExportWidget, ExpressionRenderer, FacetType, FilterBar, GoogleChartWidget, Grid, HtmlContentWidget, HtmlDataFilterView, InputExpressionRenderer, ListExpressionRenderer, ManageDrillDownWidget, OperatorRenderer, PivotTableFacet, PopupMenu, ProcessWidget, QPEditablePart, QueryPanel, ReportView, ResultFacet, ResultFacetsPanel, SimpleConditionRenderer, SortingBar, SqlListExpressionRenderer, StatementPanel, SubQueryExpressionRenderer, TextRenderer, View, browserUtils, dropdown };
14379
+ export { AddRowRenderer, AdvancedSearchView, AggrFuncColumnRendererCB, AggrFuncColumnRendererCP, AggrSettingsDialog, AggrSettingsRenderer, AggregationBar, AttrColumnRendererCB, AttrColumnRendererCP, AttributeExpressionRenderer, BaseElementRenderer, ChartFacet, ChartJsWidget, ChartType, ChartWidget, ColumnAction, ColumnRendererCB, ColumnRendererCP, ColumnsBar, ColumnsPanel, ConditionAction, ConditionGroupRenderer, ConditionGroupRowRenderer, ConditionRenderer, ConstColumnRendererCP, CustomListExpressionRenderer, CustomSqlColumnRendererCP, DataFilterView, DataTableFacet, DateTimeExpressionRenderer, DomDropDownElementBuilder, DropDownRenderer, EasyGridWidget, EntitiesPanel, EqHtmlGrid, ExportDialog, ExportWidget, ExpressionRenderer, FacetContainer, FacetType, FilterBar, GoogleChartWidget, Grid, HtmlContentWidget, HtmlDataFilterView, InputExpressionRenderer, ListExpressionRenderer, ManageDrillDownWidget, OperatorRenderer, PivotTableFacet, PopupMenu, ProcessWidget, QPEditablePart, QueryPanel, ReportView, ResultFacet, ResultFacetsPanel, SimpleConditionRenderer, SortingBar, SqlListExpressionRenderer, StatementPanel, SubQueryExpressionRenderer, TextRenderer, View, browserUtils, dropdown };
@@ -12,6 +12,7 @@ export * from './widgets/statement_panel';
12
12
  export * from './widgets/widget_options';
13
13
  export * from './widgets/process_widget';
14
14
  export * from './widgets/manage_drilldown_widget';
15
+ export * from './widgets/facet_container';
15
16
  export * from './widgets/result_facets_panel';
16
17
  export * from './widgets/export_widget';
17
18
  export * from './widgets/aggregation_bar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyquery/ui",
3
- "version": "7.2.5-rc02",
3
+ "version": "7.2.5",
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",
@@ -9,8 +9,7 @@
9
9
  "clear": "shx rm -rf dist/* docs/* lib/*",
10
10
  "build": "npm run clear && rollup -c",
11
11
  "watch": "npm run clear && rollup -c -w",
12
- "docs": "typedoc src/public_api.ts --out ./docs",
13
- "test": "jest"
12
+ "docs": "typedoc src/public_api.ts --out ./docs"
14
13
  },
15
14
  "author": "Korzh.com",
16
15
  "homepage": "https://korzh.com/easyquery/javascript",
@@ -31,7 +30,7 @@
31
30
  "peerDependencies": {
32
31
  "@easydata/core": "^1.4.21",
33
32
  "@easydata/ui": "^1.4.21",
34
- "@easyquery/core": "^7.2.5-rc02"
33
+ "@easyquery/core": "^7.2.5"
35
34
  },
36
35
  "files": [
37
36
  "dist",