@adaptabletools/adaptable 20.2.0-canary.0 → 20.2.0-canary.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "20.2.0-canary.0",
3
+ "version": "20.2.0-canary.1",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -186,6 +186,10 @@ export interface InFilterValueInfo {
186
186
  * How many times the item appears in the column
187
187
  */
188
188
  count?: number;
189
+ /**
190
+ * How many times the item appears in the column in filtered rows
191
+ */
192
+ visibleCount?: number;
189
193
  /**
190
194
  * Whether the item is currently visible in the Grid (i.e. in filtered rows)
191
195
  */
@@ -9,6 +9,9 @@ export interface QuickSearchOptions<TData = any> {
9
9
  * @param quickSearchContext Contains quick search text and current Grid Cell
10
10
  */
11
11
  isCellSearchable?: (quickSearchContext: QuickSearchContext) => boolean;
12
+ /**
13
+ * Allows a different value to be used for a cell when searching (instead of its raw value)
14
+ */
12
15
  getCellSearchText?: (quickSearchContext: QuickSearchContext) => string | null;
13
16
  /**
14
17
  * Value to use as placeholder in QuickSearch controls (e.g. in Dashboard)
@@ -56,6 +56,7 @@ export interface GridCell<TData = any> {
56
56
  }
57
57
  export interface GridCellWithCount extends GridCell {
58
58
  count: number;
59
+ visibleCount: number;
59
60
  }
60
61
  /**
61
62
  * Lightweight object used for identifying a Cell to be updated
@@ -24,19 +24,19 @@ export const isScopeValid = ({ Scope }) => {
24
24
  return result.length ? result.join(', ') : true;
25
25
  };
26
26
  const DATA_TYPES_MAP = {
27
- Date: {
27
+ date: {
28
28
  label: 'Date',
29
29
  value: 'date',
30
30
  },
31
- Number: {
31
+ number: {
32
32
  label: 'Number',
33
33
  value: 'number',
34
34
  },
35
- String: {
35
+ text: {
36
36
  label: 'Text',
37
37
  value: 'text',
38
38
  },
39
- Boolean: {
39
+ boolean: {
40
40
  label: 'Boolean',
41
41
  value: 'boolean',
42
42
  },
@@ -195,14 +195,16 @@ export const ColumnsSection = (props) => {
195
195
  const adaptable = useAdaptable();
196
196
  const { data: layout } = useOnePageAdaptableWizardContext();
197
197
  const [searchInputValue, setSearchInputValue] = React.useState('');
198
- // we don't want to rely on all the columns from the Grid itself
199
- // since the "Row Groups" section of the editor can determine a change
200
- // which is not reflected into AG Grid until we hit finish
201
- //
202
- // so we only rely on non-generated columns, which are the same
203
- const allColumns = adaptable.api.columnApi.getUIAvailableColumns().filter((col) => {
198
+ const allColumns = adaptable.api.columnApi
199
+ .getUIAvailableColumns()
200
+ .filter((col) => {
201
+ // since the "Row Groups" section of the editor can determine a change
202
+ // which is not reflected into AG Grid until we hit finish
203
+ // so we only rely on non-generated columns, which are the same
204
204
  return !col.isGeneratedRowGroupColumn;
205
- });
205
+ })
206
+ // if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
207
+ .filter((col) => !col.isGeneratedPivotResultColumn);
206
208
  // however, changes in RowGroupedColumns done in the previous step
207
209
  // are reflected into the layout, so we use the latest layout.RowGroupedColumns
208
210
  // to create new columns
@@ -2248,6 +2248,9 @@ You need to define at least one Layout!`);
2248
2248
  get visible() {
2249
2249
  return gridCell.visible;
2250
2250
  },
2251
+ get visibleCount() {
2252
+ return gridCell.visibleCount;
2253
+ },
2251
2254
  };
2252
2255
  });
2253
2256
  return result;
@@ -2262,6 +2265,9 @@ You need to define at least one Layout!`);
2262
2265
  get visible() {
2263
2266
  return gridCell.visible;
2264
2267
  },
2268
+ get visibleCount() {
2269
+ return gridCell.visibleCount;
2270
+ },
2265
2271
  };
2266
2272
  });
2267
2273
  return result;
@@ -2430,6 +2436,11 @@ You need to define at least one Layout!`);
2430
2436
  return (rowNodesWithSameCellValue.findIndex((pk) => self.isRowNodeAvailableAfterFiltering(pk) === true) !== -1);
2431
2437
  },
2432
2438
  });
2439
+ Object.defineProperty(cellWithCount, 'visibleCount', {
2440
+ get: () => {
2441
+ return rowNodesWithSameCellValue.filter((pk) => self.isRowNodeAvailableAfterFiltering(pk) === true).length;
2442
+ },
2443
+ });
2433
2444
  result.push(cellWithCount);
2434
2445
  });
2435
2446
  return result;
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1748873595292 || Date.now(),
4
- VERSION: "20.2.0-canary.0" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1749490679822 || Date.now(),
4
+ VERSION: "20.2.0-canary.1" || '--current-version--',
5
5
  };