@easyquery/core 7.2.5-rc01 → 7.2.5-rc03

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.
@@ -1,10 +1,10 @@
1
1
 
2
2
  /*
3
- * EasyQuery.JS Core v7.2.5-rc01
3
+ * EasyQuery.JS Core v7.2.5-rc03
4
4
  * Copyright 2024 Korzh.com
5
5
  * Licensed under MIT
6
6
  *
7
- * Build time: 1/6/2024 3:16:32 PM
7
+ * Build time: 1/15/2024 11:04:57 AM
8
8
  */
9
9
 
10
10
  'use strict';
@@ -2192,7 +2192,7 @@ class Query {
2192
2192
  }
2193
2193
  }
2194
2194
  if (group.columns.length == 0) {
2195
- aggrSettings.groups.slice(i, 1);
2195
+ aggrSettings.groups.splice(i, 1);
2196
2196
  }
2197
2197
  }
2198
2198
  const aggregates = aggrSettings.getAggregates();
@@ -2203,10 +2203,15 @@ class Query {
2203
2203
  hasChanged = true;
2204
2204
  }
2205
2205
  }
2206
+ // const isValidAggration = (aggrSettings.hasGroups() && (aggrSettings.hasAggregates() || aggrSettings.hasRecordCount()))
2207
+ // || (aggrSettings.hasAggregates && aggrSettings.hasGrandTotals());
2208
+ // if (!isValidAggration) {
2209
+ // this.enableAggregation = false;
2210
+ // }
2206
2211
  return hasChanged;
2207
2212
  }
2208
2213
  createSubQuery() {
2209
- return new Query(this.model, null, { context: this.context });
2214
+ return new Query(this.model, null, { parent: this, context: this.context });
2210
2215
  }
2211
2216
  useAggregation(settingsTuner, silent = false) {
2212
2217
  this.aggrSettings.clear();
@@ -2553,6 +2558,9 @@ class Query {
2553
2558
  }
2554
2559
  }
2555
2560
  }
2561
+ if (this._enableAggregation) {
2562
+ this.updateAggregationSettings();
2563
+ }
2556
2564
  noErrors = true;
2557
2565
  if (noErrors) {
2558
2566
  if (options.changeStatus) {
@@ -3130,7 +3138,7 @@ class Query {
3130
3138
  this.adjustColumnsSorting();
3131
3139
  }
3132
3140
  /**
3133
- * Removes the column.
3141
+ * Removes a column.
3134
3142
  * @param column The column to be removed.
3135
3143
  */
3136
3144
  removeColumn(column) {
@@ -3996,7 +4004,7 @@ class EqServiceProvider {
3996
4004
  this.httpClient.defaultHeaders['x-eqjs-version'] = '7.2.0';
3997
4005
  this.modelResolver = (_) => new DataModel();
3998
4006
  this.modelStorageResolver = null;
3999
- this.queryResolver = (context) => new Query(context.getModel(), null, { context });
4007
+ this.queryResolver = (context) => new Query(context.getModel(), null, { context: context });
4000
4008
  this.modelLoaderResolver = (context) => new EqServerModelLoader(context);
4001
4009
  this.queryStorageResolver = (context) => new BrowserQueryStorage(context);
4002
4010
  this.querySynchronizerResolver = (context) => new EqServerQuerySynchronizer(context);
@@ -4761,7 +4769,7 @@ class EqContext {
4761
4769
  }
4762
4770
  /**
4763
4771
  * Sets the content of the current data model
4764
- */
4772
+ */
4765
4773
  loadModelFromData(modelPlainData) {
4766
4774
  this.getQuery().loadModelData(modelPlainData);
4767
4775
  this.dataModel = this.getQuery().getModel();
@@ -1,10 +1,10 @@
1
1
 
2
2
  /*
3
- * EasyQuery.JS Core v7.2.5-rc01
3
+ * EasyQuery.JS Core v7.2.5-rc03
4
4
  * Copyright 2024 Korzh.com
5
5
  * Licensed under MIT
6
6
  *
7
- * Build time: 1/6/2024 3:16:32 PM
7
+ * Build time: 1/15/2024 11:04:57 AM
8
8
  */
9
9
 
10
10
  import { i18n, DataType, utils, ValueEditor, MetaEntity, MetaEntityAttr, EditorTag, MetaData, EventEmitter, AggregationSettings, HttpClient, EasyDataTable } from '@easydata/core';
@@ -2191,7 +2191,7 @@ class Query {
2191
2191
  }
2192
2192
  }
2193
2193
  if (group.columns.length == 0) {
2194
- aggrSettings.groups.slice(i, 1);
2194
+ aggrSettings.groups.splice(i, 1);
2195
2195
  }
2196
2196
  }
2197
2197
  const aggregates = aggrSettings.getAggregates();
@@ -2202,10 +2202,15 @@ class Query {
2202
2202
  hasChanged = true;
2203
2203
  }
2204
2204
  }
2205
+ // const isValidAggration = (aggrSettings.hasGroups() && (aggrSettings.hasAggregates() || aggrSettings.hasRecordCount()))
2206
+ // || (aggrSettings.hasAggregates && aggrSettings.hasGrandTotals());
2207
+ // if (!isValidAggration) {
2208
+ // this.enableAggregation = false;
2209
+ // }
2205
2210
  return hasChanged;
2206
2211
  }
2207
2212
  createSubQuery() {
2208
- return new Query(this.model, null, { context: this.context });
2213
+ return new Query(this.model, null, { parent: this, context: this.context });
2209
2214
  }
2210
2215
  useAggregation(settingsTuner, silent = false) {
2211
2216
  this.aggrSettings.clear();
@@ -2552,6 +2557,9 @@ class Query {
2552
2557
  }
2553
2558
  }
2554
2559
  }
2560
+ if (this._enableAggregation) {
2561
+ this.updateAggregationSettings();
2562
+ }
2555
2563
  noErrors = true;
2556
2564
  if (noErrors) {
2557
2565
  if (options.changeStatus) {
@@ -3129,7 +3137,7 @@ class Query {
3129
3137
  this.adjustColumnsSorting();
3130
3138
  }
3131
3139
  /**
3132
- * Removes the column.
3140
+ * Removes a column.
3133
3141
  * @param column The column to be removed.
3134
3142
  */
3135
3143
  removeColumn(column) {
@@ -3995,7 +4003,7 @@ class EqServiceProvider {
3995
4003
  this.httpClient.defaultHeaders['x-eqjs-version'] = '7.2.0';
3996
4004
  this.modelResolver = (_) => new DataModel();
3997
4005
  this.modelStorageResolver = null;
3998
- this.queryResolver = (context) => new Query(context.getModel(), null, { context });
4006
+ this.queryResolver = (context) => new Query(context.getModel(), null, { context: context });
3999
4007
  this.modelLoaderResolver = (context) => new EqServerModelLoader(context);
4000
4008
  this.queryStorageResolver = (context) => new BrowserQueryStorage(context);
4001
4009
  this.querySynchronizerResolver = (context) => new EqServerQuerySynchronizer(context);
@@ -4760,7 +4768,7 @@ class EqContext {
4760
4768
  }
4761
4769
  /**
4762
4770
  * Sets the content of the current data model
4763
- */
4771
+ */
4764
4772
  loadModelFromData(modelPlainData) {
4765
4773
  this.getQuery().loadModelData(modelPlainData);
4766
4774
  this.dataModel = this.getQuery().getModel();
@@ -162,7 +162,7 @@ export declare class EqContext {
162
162
  getModel(): DataModel;
163
163
  /**
164
164
  * Sets the content of the current data model
165
- */
165
+ */
166
166
  loadModelFromData(modelPlainData: ModelPlainData): void;
167
167
  /**
168
168
  * Sets the ID of the default model
@@ -324,7 +324,7 @@ export declare class Query implements AggregationColumnStore {
324
324
  */
325
325
  moveColumn(index1: number, index2: number): void;
326
326
  /**
327
- * Removes the column.
327
+ * Removes a column.
328
328
  * @param column The column to be removed.
329
329
  */
330
330
  removeColumn(column: QueryColumn): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyquery/core",
3
- "version": "7.2.5-rc01",
3
+ "version": "7.2.5-rc03",
4
4
  "description": "EasyQuery.JS Community core modules",
5
5
  "types": "./dist/types/public_api.d.ts",
6
6
  "main": "./dist/easyquery.core.cjs.js",