@adaptabletools/adaptable 18.1.4-canary.0 → 18.1.4

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": "18.1.4-canary.0",
3
+ "version": "18.1.4",
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",
@@ -225,6 +225,13 @@ export interface ValuesFilterOptions<TData = any> {
225
225
  * @noCodeItem
226
226
  */
227
227
  showValuesCount?: boolean | ((columFilterContext: ColumnFilterContext<TData>) => boolean);
228
+ /**
229
+ * If showing a Values Count, only count currently filtered columns
230
+ * @defaultValue false
231
+ * @gridInfoItem
232
+ * @noCodeItem
233
+ */
234
+ showCurrentlyFilteredValuesCount?: boolean;
228
235
  /**
229
236
  * Whether column values in filter dropdown should apply column's current Sort Order for the column
230
237
  *
@@ -300,7 +300,7 @@ export interface ColumnApi {
300
300
  * Configuration of an AG Grid Column, used for runtime updating of ColDefs
301
301
  */
302
302
  export interface ColumnConfig {
303
- /** Column Id */
303
+ /** Column Id (mandatory) */
304
304
  colId: string;
305
305
  /** True if the column is hidden */
306
306
  hide?: boolean | null;
@@ -1,4 +1,4 @@
1
- import { ActionRowSubmittedInfo, AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowSelectionChangedInfo, ScheduleTriggeredInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo, ThemeEditedInfo } from '../types';
1
+ import { ActionRowSubmittedInfo, AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowSelectionChangedInfo, ScheduleTriggeredInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo } from '../types';
2
2
  /**
3
3
  * Responsible for publishing the many Events that AdapTable fires
4
4
  */
@@ -121,17 +121,6 @@ export interface EventApi {
121
121
  * Unsubscribe from ThemeChanged
122
122
  */
123
123
  off(eventName: 'ThemeChanged', callback: (themeChangedInfo: ThemeChangedInfo) => void): void;
124
- /**
125
- * Event fired whenever a theme has been edited
126
- * @param eventName ThemeEdited
127
- * @param callback ThemeEditedInfo which just contains the name of the current Theme
128
- * @returns the unsubscribe function
129
- */
130
- on(eventName: 'ThemeEdited', callback: (themeEditedInfo: ThemeEditedInfo) => void): VoidFunction;
131
- /**
132
- * Unsubscribe from ThemeEdited
133
- */
134
- off(eventName: 'ThemeEdited', callback: (themeEditedInfo: ThemeEditedInfo) => void): void;
135
124
  /**
136
125
  * Event fired whenever a **System Status Message is displayed** in AdapTable
137
126
  * @param eventName SystemStatusMessageDisplayed
@@ -350,6 +339,6 @@ export interface EventApi {
350
339
  emitSync(eventName: 'DashboardChanged', data?: any): any[];
351
340
  emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
352
341
  emitSync(eventName: 'AdaptableDestroy'): any[];
353
- emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataImported' | 'DataSetSelected' | 'ColumnFilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'CalculatedColumnChanged' | 'LiveDataChanged' | 'ScheduleTriggered' | 'SearchChanged' | 'CellSelectionChanged' | 'RowSelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited' | 'GridFilterApplied' | 'CommentChanged', data?: any): Promise<any>;
342
+ emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataImported' | 'DataSetSelected' | 'ColumnFilterApplied' | 'Fdc3Message' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'CalculatedColumnChanged' | 'LiveDataChanged' | 'ScheduleTriggered' | 'SearchChanged' | 'CellSelectionChanged' | 'RowSelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'GridFilterApplied' | 'CommentChanged', data?: any): Promise<any>;
354
343
  destroy(): void;
355
344
  }
@@ -5,7 +5,11 @@ import { BaseEventInfo } from './BaseEventInfo';
5
5
  */
6
6
  export interface ThemeChangedInfo extends BaseEventInfo {
7
7
  /**
8
- * Selected Theme: either name of a (System) theme or the (Custom) Theme itself
8
+ * Current Theme: either name of a System Theme or a Custom Theme object
9
9
  */
10
10
  theme: AdaptableTheme | string;
11
+ /**
12
+ * What caused Event to fire: "ThemeSelected" or "ThemeEdited"
13
+ */
14
+ trigger: 'ThemeSelected' | 'ThemeEdited';
11
15
  }
@@ -57,7 +57,7 @@ export class ThemeApiImpl extends ApiBase {
57
57
  return;
58
58
  }
59
59
  this.adaptable.applyAdaptableTheme(currentTheme);
60
- let themeChangedInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { theme: currentTheme });
60
+ let themeChangedInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { trigger: 'ThemeSelected', theme: currentTheme });
61
61
  this.getAdaptableApi().eventApi.emit('ThemeChanged', themeChangedInfo);
62
62
  }
63
63
  getUserThemes() {
@@ -78,7 +78,8 @@ export class ThemeApiImpl extends ApiBase {
78
78
  }
79
79
  editTheme(theme) {
80
80
  this.dispatchAction(ThemeRedux.ThemeEdit(theme));
81
- this.getEventApi().emit('ThemeEdited', theme);
81
+ let themeChangedInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { trigger: 'ThemeEdited', theme: theme });
82
+ this.getAdaptableApi().eventApi.emit('ThemeChanged', themeChangedInfo);
82
83
  const currentTheme = this.getCurrentTheme();
83
84
  if (currentTheme === theme.Name) {
84
85
  this.adaptable.applyAdaptableTheme(theme);
@@ -84,7 +84,7 @@ export class GridInternalApi extends ApiBase {
84
84
  const shouldShowValuesCount = this.shouldShowValuesCount(abColumn);
85
85
  let valueOptions = [];
86
86
  if (shouldShowValuesCount) {
87
- const allGridCells = this.adaptable.getGridCellsForColumn(columnId);
87
+ const allGridCells = this.adaptable.getGridCellsForColumn(columnId, false, this.getColumnFilterOptions().valuesFilterOptions.showCurrentlyFilteredValuesCount);
88
88
  const allGridValues = allGridCells.map((gc) => gc.displayValue);
89
89
  const newsortedDistinctValues = sortedDistinctValues.filter((gc) => gc.displayValue != undefined && gc.displayValue != '' && gc.displayValue != null);
90
90
  valueOptions = newsortedDistinctValues.map((cv) => {
@@ -22,8 +22,8 @@ export interface RowSummary extends SuspendableObject {
22
22
  */
23
23
  ColumnsMap: Record<string, SummarySupportedExpression>;
24
24
  /**
25
- * Whether to include only filtered rows in the summary.
26
- * @defauts true
25
+ * Evaluates only currently filtered rows in the summary
26
+ * @defaultValue true
27
27
  */
28
28
  IncludeOnlyFilteredRows?: boolean;
29
29
  }
@@ -23,11 +23,9 @@ export class ThemeService {
23
23
  }
24
24
  subscribe() {
25
25
  const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
26
- const themeEditedUnsubscribe = this.api.eventApi.on('ThemeEdited', this.onThemeChanged);
27
26
  const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
28
27
  this.unsubscribe = () => {
29
28
  themeChangedUnsubscribe();
30
- themeEditedUnsubscribe();
31
29
  prefferedColorSchemeUnsubscribe();
32
30
  };
33
31
  }
@@ -96,10 +96,8 @@ export const ThemeEditor = (props) => {
96
96
  setCurrentThemeObject(Object.assign({}, theme));
97
97
  };
98
98
  const themeChangedUnsubscribe = adaptable.api.eventApi.on('ThemeChanged', updateTheme);
99
- const themeEditedUnsubscribe = adaptable.api.eventApi.on('ThemeEdited', updateTheme);
100
99
  return () => {
101
100
  themeChangedUnsubscribe();
102
- themeEditedUnsubscribe();
103
101
  };
104
102
  }, []);
105
103
  const handleNameDescriptionChangeThrottled = React.useMemo(() => {
@@ -190,6 +190,7 @@ const DefaultAdaptableOptions = {
190
190
  sortValuesFilter: false,
191
191
  filterValuesUsingTime: false,
192
192
  showCurrentlyFilteredValuesOnly: false,
193
+ showCurrentlyFilteredValuesCount: false,
193
194
  maxFilterValuesToDisplay: undefined,
194
195
  showValuesCount: undefined,
195
196
  valuesFilterPredicateOptions: undefined,
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  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: 1718815651314 || Date.now(),
4
- VERSION: "18.1.4-canary.0" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1719311651204 || Date.now(),
4
+ VERSION: "18.1.4" || '--current-version--',
5
5
  };
@@ -4744,12 +4744,14 @@ export declare const ADAPTABLE_METAMODEL: {
4744
4744
  kind: string;
4745
4745
  desc: string;
4746
4746
  isOpt?: undefined;
4747
+ defVal?: undefined;
4747
4748
  ref?: undefined;
4748
4749
  } | {
4749
4750
  name: string;
4750
4751
  kind: string;
4751
4752
  desc: string;
4752
4753
  isOpt: boolean;
4754
+ defVal: string;
4753
4755
  ref?: undefined;
4754
4756
  } | {
4755
4757
  name: string;
@@ -4757,6 +4759,7 @@ export declare const ADAPTABLE_METAMODEL: {
4757
4759
  desc: string;
4758
4760
  isOpt: boolean;
4759
4761
  ref: string;
4762
+ defVal?: undefined;
4760
4763
  })[];
4761
4764
  };
4762
4765
  RowSummaryPosition: {