@adaptabletools/adaptable 12.1.5 → 12.1.6

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.
Files changed (35) hide show
  1. package/bundle.cjs.js +94 -94
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -4
  6. package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
  7. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +31 -24
  8. package/src/Api/ColumnApi.d.ts +1 -1
  9. package/src/Api/FilterApi.d.ts +6 -0
  10. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  11. package/src/Api/Implementation/ColumnApiImpl.js +3 -2
  12. package/src/Api/Implementation/DataSetApiImpl.js +1 -1
  13. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
  14. package/src/Api/Implementation/FilterApiImpl.js +7 -1
  15. package/src/Api/Implementation/GridApiImpl.js +4 -4
  16. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
  17. package/src/Api/Implementation/LayoutApiImpl.js +4 -3
  18. package/src/Api/Implementation/QueryApiImpl.js +1 -1
  19. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
  20. package/src/Api/LayoutApi.d.ts +1 -1
  21. package/src/PredefinedConfig/Common/AdaptableColumn.js +3 -2
  22. package/src/Redux/Store/AdaptableStore.js +10 -10
  23. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  24. package/src/Utilities/Extensions/ArrayExtensions.js +6 -0
  25. package/src/View/Components/FilterForm/FilterForm.js +2 -1
  26. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -1
  27. package/src/agGrid/Adaptable.d.ts +1 -0
  28. package/src/agGrid/Adaptable.js +5 -2
  29. package/src/components/ProgressIndicator/ProgressIndicator.js +10 -12
  30. package/src/metamodel/adaptable.metamodel.d.ts +74 -6
  31. package/src/metamodel/adaptable.metamodel.js +1 -1
  32. package/src/parser/src/types.d.ts +1 -1
  33. package/src/types.d.ts +1 -1
  34. package/version.d.ts +1 -1
  35. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "12.1.5",
3
+ "version": "12.1.6",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1659522068928;
1
+ declare const _default: 1659973452141;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1659522068928;
3
+ exports.default = 1659973452141;
@@ -49,14 +49,20 @@ export interface IAdaptable {
49
49
  * Avoid unnecessary store calls and rendering
50
50
  */
51
51
  isInitialised: boolean;
52
- /**
53
- * TRUE if the Adaptable custom tool panel (side-bar) is displayed
54
- */
55
- hasAdaptableToolPanel: boolean;
56
52
  /**
57
53
  * Set to true when adaptable is destroyed.
58
54
  */
59
55
  isDestroyed: boolean;
56
+ /**
57
+ * TRUE iff:
58
+ * 1. isInitialised = TRUE
59
+ * 2. isDestroyed = FALSE
60
+ */
61
+ isLive: boolean;
62
+ /**
63
+ * TRUE if the Adaptable custom tool panel (side-bar) is displayed
64
+ */
65
+ hasAdaptableToolPanel: boolean;
60
66
  /**
61
67
  * Adaptable contains a number of 'Services' which are created at Startup
62
68
  *
@@ -150,4 +150,11 @@ export interface FilterOptions {
150
150
  * @defaultValue true
151
151
  */
152
152
  showQuickFilter?: boolean;
153
+ /**
154
+ * Display only currently filtered distinct values in Filter controls
155
+ *
156
+ * @defaultValue false
157
+ * @gridInfoItem
158
+ */
159
+ showDistinctFilteredValuesOnly?: boolean;
153
160
  }
@@ -105,7 +105,7 @@ export interface BasePermittedValues {
105
105
  */
106
106
  export interface PermittedValues extends BasePermittedValues {
107
107
  /**
108
- * Values to display: either hardcoded list or a function
108
+ * Values to display: either hardcoded list or a function that returns a list
109
109
  */
110
110
  values?: any[] | ((context: PermittedValuesContext) => any[]);
111
111
  }
@@ -113,6 +113,9 @@ export interface PermittedValues extends BasePermittedValues {
113
113
  * Used to define permitted values for inline column editor
114
114
  */
115
115
  export interface EditLookUpPermittedValues extends BasePermittedValues {
116
+ /**
117
+ * Values to display in Edit Look Up: either hardcoded list or a function that returns a list
118
+ */
116
119
  values?: any[] | ((context: EditLookUpContext) => any[]);
117
120
  }
118
121
  /**
@@ -124,56 +127,60 @@ export interface FilterPermittedValues extends BasePermittedValues {
124
127
  * @defaultValue false
125
128
  */
126
129
  suppressFilterSearchBar?: boolean;
130
+ /**
131
+ * Values to display in 'IN' Filter: either hardcoded list or a function that returns a list
132
+ */
127
133
  values: (context: FilterPermittedValuesContext) => any[] | Promise<any[]>;
128
134
  }
129
135
  /**
130
- * Custom column values for custom sort.
136
+ * Custom column values for Custom Sort
131
137
  */
132
138
  export interface CustomSortPermittedValues extends BasePermittedValues {
139
+ /**
140
+ * Values to display in Custom Sort Wizard: either hardcoded list or a function that returns a list
141
+ */
133
142
  values: (context: PermittedValuesContext) => any[] | Promise<any[]>;
134
143
  }
135
144
  /**
136
145
  * User to define permitted values when updating cells via bulk update
137
146
  */
138
147
  export interface BulkUpdatePermittedValues extends BasePermittedValues {
148
+ /**
149
+ * Values to display in Bulk Update Wizard: either hardcoded list or a function that returns a list
150
+ */
139
151
  values: (context: BulkUpdatePermittedValuesContext) => any[] | Promise<any[]>;
140
152
  }
141
153
  /**
142
- * Use PermittedValues instead
143
- * @deprecated use PermittedValues instead
154
+ * Context used when getting PermittedValues via a function
144
155
  */
145
- export declare type CellValuesList = PermittedValues;
146
- export interface EditLookUpContext extends BaseContext {
147
- /**
148
- * Column displaying the Edit LookUp
149
- */
150
- column: AdaptableColumn;
151
- /**
152
- * Cell being edited
153
- */
154
- gridCell?: GridCell;
155
- }
156
156
  export interface PermittedValuesContext extends BaseContext {
157
157
  /**
158
158
  * Column whose values are being displayed
159
159
  */
160
160
  column: AdaptableColumn;
161
161
  }
162
- export interface FilterPermittedValuesContext extends BaseContext {
162
+ /**
163
+ * Context used when getting EditLookUpPermittedValues via a function
164
+ */
165
+ export interface EditLookUpContext extends PermittedValuesContext {
163
166
  /**
164
- * Column hosting the filter form
167
+ * Cell being edited
165
168
  */
166
- column: AdaptableColumn;
169
+ gridCell?: GridCell;
170
+ }
171
+ /**
172
+ * Context used when getting FilterPermittedValues via a function
173
+ */
174
+ export interface FilterPermittedValuesContext extends PermittedValuesContext {
167
175
  /**
168
176
  * A search string
169
177
  */
170
- filter: string;
178
+ searchFilter: string;
171
179
  }
172
- export interface BulkUpdatePermittedValuesContext extends BaseContext {
173
- /**
174
- * Column being edited via Bulk Update
175
- */
176
- column: AdaptableColumn;
180
+ /**
181
+ * Context used when getting BulkUpdatePermittedValues via a function
182
+ */
183
+ export interface BulkUpdatePermittedValuesContext extends PermittedValuesContext {
177
184
  /**
178
185
  * Cells which will be modified in the Bulk Update
179
186
  */
@@ -229,7 +229,7 @@ export interface ColumnApi {
229
229
  * @param columnId Column to check
230
230
  * @param columnFilter Current applied filter
231
231
  */
232
- getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string): Promise<{
232
+ getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string, showFilteredRowsOnly: boolean): Promise<{
233
233
  values: {
234
234
  value: any;
235
235
  label: string;
@@ -138,4 +138,10 @@ export interface FilterApi {
138
138
  * Fires Filter Applied Event - typically used to enable filtering on the server
139
139
  */
140
140
  fireFilterAppliedEvent(): void;
141
+ /**
142
+ * Compares to sets of Column Filters to see if they are identical
143
+ * @param filters1
144
+ * @param filters2
145
+ */
146
+ areColumnFiltersDifferent(filters1: ColumnFilter[], filters2: ColumnFilter[]): boolean;
141
147
  }
@@ -53,7 +53,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
53
53
  getQueryableColumns(): AdaptableColumn[];
54
54
  private LogMissingColumnWarning;
55
55
  getDistinctDisplayValuesForColumn(columnId: string): any[];
56
- getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string): Promise<{
56
+ getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string, showFilteredRowsOnly: boolean): Promise<{
57
57
  values: any[];
58
58
  suppressClientSideFilter: boolean;
59
59
  }>;
@@ -289,15 +289,16 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
289
289
  return cv.normalisedValue;
290
290
  });
291
291
  }
292
- async getDistinctFilterDisplayValuesForColumn(columnId, filter) {
292
+ async getDistinctFilterDisplayValuesForColumn(columnId, filter, showFilteredRowsOnly) {
293
293
  const abColumn = this.getColumnFromId(columnId);
294
+ console.log('getting for ', columnId);
294
295
  if (abColumn == undefined) {
295
296
  return {
296
297
  values: [],
297
298
  suppressClientSideFilter: false,
298
299
  };
299
300
  }
300
- const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, false, filter);
301
+ const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, showFilteredRowsOnly, filter);
301
302
  return {
302
303
  values: this.sortDistinctValues(gridCells, abColumn).map((cv) => {
303
304
  return {
@@ -30,7 +30,7 @@ class DataSetApiImpl extends ApiBase_1.ApiBase {
30
30
  this.showModulePopup(ModuleConstants.DataSetModuleId);
31
31
  }
32
32
  fireDataSetSelectedEvent(dataSet) {
33
- if (this.adaptable.isInitialised) {
33
+ if (this.adaptable.isLive) {
34
34
  const dataSetSelectedInfo = {
35
35
  adaptableApi: this.adaptable.api,
36
36
  dataSet,
@@ -42,5 +42,6 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
42
42
  */
43
43
  isFilterActive(filter: ColumnFilter): boolean;
44
44
  shouldNewColumnFilterTriggerGridFiltering(action: LayoutRedux.LayoutColumnFilterAction | Redux.Action): boolean;
45
+ areColumnFiltersDifferent(oldFilters: ColumnFilter[], newFilters: ColumnFilter[]): boolean;
45
46
  fireFilterAppliedEvent(): void;
46
47
  }
@@ -270,8 +270,14 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
270
270
  isEditTrigger ||
271
271
  isSetAndActive);
272
272
  }
273
+ areColumnFiltersDifferent(oldFilters, newFilters) {
274
+ if (ArrayExtensions_1.default.IsNullOrEmpty(oldFilters) && ArrayExtensions_1.default.IsNullOrEmpty(newFilters)) {
275
+ return false;
276
+ }
277
+ return ArrayExtensions_1.default.areArraysNotEqual(oldFilters, newFilters);
278
+ }
273
279
  fireFilterAppliedEvent() {
274
- if (this.adaptable.isInitialised) {
280
+ if (this.adaptable.isLive) {
275
281
  const filterAppliedInfo = {
276
282
  columnFilters: this.getColumnFilters(),
277
283
  adaptableApi: this.getAdaptableApi(),
@@ -260,7 +260,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
260
260
  this.adaptable.redrawHeader();
261
261
  }
262
262
  fireSearchChangedEvent(searchChangedTrigger) {
263
- if (this.adaptable.isInitialised) {
263
+ if (this.adaptable.isLive) {
264
264
  const adaptableSearchState = this.adaptable.api.configApi.getAdaptableSearchState();
265
265
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
266
266
  const searchChangedInfo = {
@@ -273,7 +273,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
273
273
  }
274
274
  }
275
275
  fireGridSortedEvent() {
276
- if (this.adaptable.isInitialised) {
276
+ if (this.adaptable.isLive) {
277
277
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
278
278
  const adaptableApi = this.getAdaptableApi();
279
279
  const gridSortedInfo = {
@@ -284,7 +284,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
284
284
  }
285
285
  }
286
286
  fireCellChangedEvent(cellDataChangedInfo) {
287
- if (this.adaptable.isInitialised) {
287
+ if (this.adaptable.isLive) {
288
288
  const cellChangedInfo = {
289
289
  adaptableApi: this.adaptable.api,
290
290
  cellChange: cellDataChangedInfo,
@@ -293,7 +293,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
293
293
  }
294
294
  }
295
295
  fireGridDataChangedEvent(dataRows, rowNodes = [], rowTrigger) {
296
- if (this.adaptable.isInitialised) {
296
+ if (this.adaptable.isLive) {
297
297
  const gridDataChangedInfo = {
298
298
  changedAt: Date.now(),
299
299
  adaptableApi: this.adaptable.api,
@@ -12,7 +12,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
12
12
  };
13
13
  getCurrentVisibleColumnIds(): string[];
14
14
  setLayout(layoutName: string): void;
15
- fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
15
+ fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState, skipEqualityCheck?: boolean): void;
16
16
  getCurrentLayout(): Layout;
17
17
  getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
18
18
  areDraftAndCurrentLayoutEqual(): boolean;
@@ -50,16 +50,17 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
50
50
  }
51
51
  }
52
52
  }
53
- fireLayoutChangedEvent(trigger, oldSate, newState) {
53
+ fireLayoutChangedEvent(trigger, oldSate, newState, skipEqualityCheck) {
54
54
  const layoutChangedInfo = {
55
55
  adaptableApi: this.adaptable.api,
56
56
  actionName: trigger,
57
57
  oldLayoutState: oldSate,
58
58
  newLayoutState: newState,
59
59
  };
60
- if (!isEqual_1.default(oldSate, newState)) {
61
- this.adaptable.api.eventApi.emit('LayoutChanged', layoutChangedInfo);
60
+ if (!skipEqualityCheck && isEqual_1.default(oldSate, newState)) {
61
+ return;
62
62
  }
63
+ this.adaptable.api.eventApi.emit('LayoutChanged', layoutChangedInfo);
63
64
  }
64
65
  getCurrentLayout() {
65
66
  const state = this.getAdaptableState();
@@ -89,7 +89,7 @@ class QueryApiImpl extends ApiBase_1.ApiBase {
89
89
  }));
90
90
  }
91
91
  fireQueryRunEvent() {
92
- if (this.adaptable.isInitialised) {
92
+ if (this.adaptable.isLive) {
93
93
  const currentQuery = this.adaptable.api.queryApi.getCurrentQuery();
94
94
  const adaptableApi = this.getAdaptableApi();
95
95
  const queryRunInfo = {
@@ -47,7 +47,7 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
47
47
  this.showModulePopup(ModuleConstants.TeamSharingModuleId);
48
48
  }
49
49
  fireTeamSharingEntityChangedEvent(sharedEntity) {
50
- if (this.adaptable.isInitialised) {
50
+ if (this.adaptable.isLive) {
51
51
  const teamSharingEntityChangedInfo = {
52
52
  adaptableApi: this.adaptable.api,
53
53
  sharedEntity: sharedEntity,
@@ -113,7 +113,7 @@ export interface LayoutApi {
113
113
  * @param oldSate Layout State before change
114
114
  * @param newState Layout State after change
115
115
  */
116
- fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
116
+ fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState, skipEqualityCheck?: boolean): void;
117
117
  /**
118
118
  * Compares 2 Layouts for equality
119
119
  * @param layout1 First Layout
@@ -8,14 +8,15 @@ const isValidOrderForColumnGroups = ({ oldColumns, newColumns, }) => {
8
8
  let count = 0;
9
9
  columns.forEach((column) => {
10
10
  var _a, _b;
11
- if (column.columnGroup &&
11
+ if (column &&
12
+ column.columnGroup &&
12
13
  column.columnGroup.groupCount > 1 &&
13
14
  !column.columnGroup.allowGroupSplit) {
14
15
  if (prevGroup !== column.columnGroup.columnGroupId) {
15
16
  count++;
16
17
  }
17
18
  }
18
- prevGroup = (_b = (_a = column.columnGroup) === null || _a === void 0 ? void 0 : _a.columnGroupId) !== null && _b !== void 0 ? _b : '';
19
+ prevGroup = (_b = (_a = column === null || column === void 0 ? void 0 : column.columnGroup) === null || _a === void 0 ? void 0 : _a.columnGroupId) !== null && _b !== void 0 ? _b : '';
19
20
  });
20
21
  return count;
21
22
  };
@@ -281,7 +281,7 @@ exports.AdaptableStore = AdaptableStore;
281
281
  const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
282
282
  return function (next) {
283
283
  return function (action) {
284
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
284
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
285
285
  switch (action.type) {
286
286
  /*******************
287
287
  * NAMED QUERY ACTIONS
@@ -684,14 +684,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
684
684
  if (adaptable.adaptableOptions.searchOptions.filterResultsAfterQuickSearch) {
685
685
  const actionTyped = action;
686
686
  const searchText = actionTyped.quickSearchText;
687
- // const gridOptions = adaptable.api.gridApi.getAgGridInstance();
688
687
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(searchText)) {
689
- // Currently using this but any searchable would allow us to limit the cols checked
690
- // const queryText = 'ANY_CONTAINS("' + searchText + '") ';
691
- // const queryText = 'ANY_SEARCHABLE_CONTAINS("' + searchText + '") ';
692
- // adaptable.api.queryApi.setCurrentQuery(queryText);
693
- // Better still would be to use ag grid if that is possible?
694
- // gridOptions.api.setQuickFilter(searchText);
695
688
  adaptable.setAgQuickSearch(searchText);
696
689
  }
697
690
  else {
@@ -763,6 +756,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
763
756
  }, 5);
764
757
  adaptable.api.gridApi.fireSearchChangedEvent('Filter');
765
758
  adaptable.api.filterApi.fireFilterAppliedEvent();
759
+ adaptable.api.layoutApi.fireLayoutChangedEvent(action.type, null, middlewareAPI.getState().Layout);
766
760
  return returnAction;
767
761
  }
768
762
  /*******************
@@ -872,6 +866,12 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
872
866
  let returnAction = next(action);
873
867
  const newLayoutState = middlewareAPI.getState().Layout;
874
868
  adaptable.api.layoutApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
869
+ const oldFilters = (_h = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _h === void 0 ? void 0 : _h.ColumnFilters;
870
+ const newFilters = (_j = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _j === void 0 ? void 0 : _j.ColumnFilters;
871
+ // Tell Grid to apply filtering if filters have been changed in a loaded Layout
872
+ if (adaptable.api.filterApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
873
+ adaptable.applyGridFiltering();
874
+ }
875
875
  if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
876
876
  returnAction.type == LayoutRedux.LAYOUT_DELETE ||
877
877
  returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
@@ -884,7 +884,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
884
884
  // tell grid the layout has been selected
885
885
  adaptable.setLayout(currentLayout);
886
886
  }
887
- if (!((_h = adaptable.adaptableOptions.layoutOptions) === null || _h === void 0 ? void 0 : _h.autoSaveLayouts)) {
887
+ if (!((_k = adaptable.adaptableOptions.layoutOptions) === null || _k === void 0 ? void 0 : _k.autoSaveLayouts)) {
888
888
  middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
889
889
  }
890
890
  }
@@ -892,7 +892,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
892
892
  returnAction.type == LayoutRedux.LAYOUT_SAVE) {
893
893
  const actionTyped = action;
894
894
  // if autosave is false
895
- if (!((_j = adaptable.adaptableOptions.layoutOptions) === null || _j === void 0 ? void 0 : _j.autoSaveLayouts)) {
895
+ if (!((_l = adaptable.adaptableOptions.layoutOptions) === null || _l === void 0 ? void 0 : _l.autoSaveLayouts)) {
896
896
  // and the current layout is saved, make sure we also update the draft
897
897
  if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
898
898
  middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
@@ -205,6 +205,7 @@ exports.DefaultAdaptableOptions = {
205
205
  maxFilterValuesToDisplay: 2000,
206
206
  systemFilters: AdaptablePredicate_1.SystemFilterPredicateIds,
207
207
  showQuickFilter: true,
208
+ showDistinctFilteredValuesOnly: false,
208
209
  },
209
210
  searchOptions: {
210
211
  excludeColumnFromQuickSearch: undefined,
@@ -109,6 +109,12 @@ function moveArray(array, from, to) {
109
109
  exports.moveArray = moveArray;
110
110
  //This deliberately only checks contents equality and not positional so [1, 2, 3]== [1, 3, 2]
111
111
  function areArraysEqual(arr1, arr2) {
112
+ if (IsNullOrEmpty(arr1) && IsNotNullOrEmpty(arr2)) {
113
+ return false;
114
+ }
115
+ if (IsNotNullOrEmpty(arr1) && IsNullOrEmpty(arr2)) {
116
+ return false;
117
+ }
112
118
  if (arr1.length !== arr2.length) {
113
119
  return false;
114
120
  }
@@ -110,7 +110,8 @@ class FilterFormComponent extends React.Component {
110
110
  }
111
111
  }
112
112
  async loadPermittedValues(filter = '') {
113
- const { values: distinctColumnValues, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
113
+ const { values: distinctColumnValues, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
114
+ .showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
114
115
  if (!this._isMounted) {
115
116
  return;
116
117
  }
@@ -32,7 +32,8 @@ class QuickFilterFormComponent extends React.Component {
32
32
  }
33
33
  };
34
34
  this.loadPermittedValues = async (filter = '') => {
35
- const { values, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
35
+ const { values, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
36
+ .showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
36
37
  if (!this._isMounted) {
37
38
  return;
38
39
  }
@@ -76,6 +76,7 @@ export declare class Adaptable implements IAdaptable {
76
76
  private currentColumnDefs?;
77
77
  private rowListeners;
78
78
  private isCheckedColumnDataType;
79
+ get isLive(): boolean;
79
80
  _on: (eventName: string, callback: EmitterCallback) => (() => void);
80
81
  _onIncludeFired: (eventName: string, callback: EmitterCallback) => (() => void);
81
82
  _emit: (eventName: string, data?: any) => Promise<any>;
@@ -266,6 +266,9 @@ class Adaptable {
266
266
  };
267
267
  // (global as any).adaptable = this;
268
268
  }
269
+ get isLive() {
270
+ return this.isInitialised && !this.isDestroyed;
271
+ }
269
272
  static init(adaptableOptions) {
270
273
  return Adaptable.initInternal(adaptableOptions);
271
274
  }
@@ -542,7 +545,7 @@ class Adaptable {
542
545
  });
543
546
  }
544
547
  performAudit(action, oldState, newState) {
545
- if (this.isInitialised) {
548
+ if (this.isLive) {
546
549
  const adaptableStateChangedInfo = {
547
550
  adaptableApi: this.api,
548
551
  actionName: action.type,
@@ -1720,7 +1723,7 @@ class Adaptable {
1720
1723
  const filterPermittedValuesParams = {
1721
1724
  adaptableApi: this.api,
1722
1725
  column: column,
1723
- filter: filter,
1726
+ searchFilter: filter,
1724
1727
  };
1725
1728
  preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(filterPermittedValuesParams));
1726
1729
  }
@@ -17,31 +17,29 @@ const ProgressIndicator = () => {
17
17
  width: 0,
18
18
  });
19
19
  const adaptable = AdaptableContext_1.useAdaptable();
20
- const adaptableContainerRef = react_1.useRef(adaptable.getAdaptableContainerElement());
21
- const gridContainerRef = react_1.useRef(adaptable.getAgGridContainerElement());
22
- const disableAdaptableGrid = (elemRef, disabled) => {
20
+ const disableAdaptableGrid = (containerElement, disabled) => {
23
21
  const DISABLING_CSS_CLASS = 'ab-wait-for-progress-indicator';
24
- if (!elemRef.current) {
22
+ if (!containerElement) {
25
23
  return;
26
24
  }
27
25
  if (disabled) {
28
- elemRef.current.classList.add(DISABLING_CSS_CLASS);
26
+ containerElement.classList.add(DISABLING_CSS_CLASS);
29
27
  }
30
28
  else {
31
- elemRef.current.classList.remove(DISABLING_CSS_CLASS);
29
+ containerElement.classList.remove(DISABLING_CSS_CLASS);
32
30
  }
33
31
  };
34
- const updateGridContainerCoordinates = () => {
35
- if (!gridContainerRef.current) {
32
+ const updateGridContainerCoordinates = (containerElement) => {
33
+ if (!containerElement) {
36
34
  return;
37
35
  }
38
- const { top, left, height, width } = gridContainerRef.current.getBoundingClientRect();
36
+ const { top, left, height, width } = containerElement.getBoundingClientRect();
39
37
  setProgressIndicatorCoordinates({ top, left, height, width });
40
38
  };
41
39
  react_1.useEffect(() => {
42
- disableAdaptableGrid(adaptableContainerRef, active);
43
- disableAdaptableGrid(gridContainerRef, active);
44
- updateGridContainerCoordinates();
40
+ disableAdaptableGrid(adaptable.getAdaptableContainerElement(), active);
41
+ disableAdaptableGrid(adaptable.getAgGridContainerElement(), active);
42
+ updateGridContainerCoordinates(adaptable.getAdaptableContainerElement());
45
43
  // without RAF the progress indicator would be rendered instantly, without the 'transition-delay' defined via CSS
46
44
  requestAnimationFrame(() => {
47
45
  setVisible(active);