@adaptabletools/adaptable 12.1.0-canary.2 → 12.1.0
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/bundle.cjs.js +6 -6
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/SearchOptions.d.ts +1 -1
- package/src/Api/ConfigApi.d.ts +1 -2
- package/src/Api/EventApi.d.ts +45 -8
- package/src/Api/Events/AdaptableSearchState.d.ts +22 -0
- package/src/Api/Events/AdaptableSearchState.js +2 -0
- package/src/Api/Events/FilterApplied.d.ts +11 -0
- package/src/Api/Events/FilterApplied.js +2 -0
- package/src/Api/Events/GridSorted.d.ts +25 -0
- package/src/Api/Events/GridSorted.js +2 -0
- package/src/Api/Events/QueryRun.d.ts +14 -0
- package/src/Api/Events/QueryRun.js +2 -0
- package/src/Api/Events/SearchChanged.d.ts +3 -47
- package/src/Api/FilterApi.d.ts +4 -0
- package/src/Api/GridApi.d.ts +5 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -2
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +9 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +11 -0
- package/src/Api/Implementation/QueryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QueryApiImpl.js +14 -0
- package/src/Api/QueryApi.d.ts +4 -0
- package/src/Redux/Store/AdaptableStore.js +7 -2
- package/src/View/Query/QueryViewPanel.d.ts +1 -1
- package/src/View/Query/QueryViewPanel.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +34 -13
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.1.0
|
|
3
|
+
"version": "12.1.0",
|
|
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",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1658746260266;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -24,7 +24,7 @@ export interface SearchOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
clearSearchesOnStartUp?: boolean;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Filters the quick search results so only matching rows are displayed
|
|
28
28
|
*
|
|
29
29
|
* @defaultValue false
|
|
30
30
|
* @gridInfoItem
|
package/src/Api/ConfigApi.d.ts
CHANGED
|
@@ -16,8 +16,7 @@ import { AdaptablePersistentState, AdaptableState } from '../PredefinedConfig/Ad
|
|
|
16
16
|
import { FreeTextColumnState } from '../PredefinedConfig/FreeTextColumnState';
|
|
17
17
|
import { ToolPanelState } from '../PredefinedConfig/ToolPanelState';
|
|
18
18
|
import { AdaptableStateKey, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
19
|
-
import { AdaptableSearchState, PredefinedConfig, ScheduleState } from '../types';
|
|
20
|
-
import { AdaptableSortState } from './Events/SearchChanged';
|
|
19
|
+
import { AdaptableSearchState, AdaptableSortState, PredefinedConfig, ScheduleState } from '../types';
|
|
21
20
|
import { QueryState } from '../PredefinedConfig/QueryState';
|
|
22
21
|
/**
|
|
23
22
|
* Range of functions to access Predefined Config and Adaptable State
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -17,23 +17,60 @@ import { TeamSharingEntityChangedInfo } from './Events/TeamSharingEntityChanged'
|
|
|
17
17
|
import { ActionRowSubmittedInfo } from './Events/ActionRowSubmitted';
|
|
18
18
|
import { DataSetSelectedInfo } from './Events/DataSetSelected';
|
|
19
19
|
import { AdaptableStateReloadedInfo } from './Events/AdaptableStateReloaded';
|
|
20
|
+
import { GridSortedInfo } from './Events/GridSorted';
|
|
21
|
+
import { QueryRunInfo } from './Events/QueryRun';
|
|
22
|
+
import { FilterAppliedInfo } from './Events/FilterApplied';
|
|
20
23
|
/**
|
|
21
24
|
* Responsible for publishing the many Events that AdapTable fires
|
|
22
25
|
*/
|
|
23
26
|
export interface EventApi {
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param eventName SearchChanged
|
|
27
|
-
* @param callback SearchChangedInfo which includes full details of what triggered the change and the current state of all Search and Filter related functions.
|
|
28
|
-
* @returns the unsubscribe function
|
|
28
|
+
* @deprecated - use FilterApplied, QueryRun or GridSorted
|
|
29
29
|
*/
|
|
30
30
|
on(eventName: 'SearchChanged', callback: (searchChangedInfo: SearchChangedInfo) => void): VoidFunction;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
* @param eventName SearchChanged
|
|
34
|
-
* @param callback
|
|
32
|
+
*@deprecated - use FilterApplied, QueryRun or GridSorted
|
|
35
33
|
*/
|
|
36
34
|
off(eventName: 'SearchChanged', callback: (searchChangedInfo: SearchChangedInfo) => void): void;
|
|
35
|
+
/**
|
|
36
|
+
* Event fired whenever AdapTable is Sorted
|
|
37
|
+
* @param eventName GridSorted
|
|
38
|
+
* @param callback GridSortedInfo which contains current Column Sorts
|
|
39
|
+
* @returns the unsubscribe function
|
|
40
|
+
*/
|
|
41
|
+
on(eventName: 'GridSorted', callback: (gridSortedInfo: GridSortedInfo) => void): VoidFunction;
|
|
42
|
+
/**
|
|
43
|
+
* Unsubscribe from GridSorted
|
|
44
|
+
* @param eventName GridSorted
|
|
45
|
+
* @param callback
|
|
46
|
+
*/
|
|
47
|
+
off(eventName: 'GridSorted', callback: (gridSortedInfo: GridSortedInfo) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* Event fired whenever a Query is run in AdapTable
|
|
50
|
+
* @param eventName QueryRun
|
|
51
|
+
* @param callback QueryRun which provides details of the Query and the associated AST
|
|
52
|
+
* @returns the unsubscribe function
|
|
53
|
+
*/
|
|
54
|
+
on(eventName: 'QueryRun', callback: (queryRunInfo: QueryRunInfo) => void): VoidFunction;
|
|
55
|
+
/**
|
|
56
|
+
* Unsubscribe from QueryRun
|
|
57
|
+
* @param eventName QueryRun
|
|
58
|
+
* @param callback
|
|
59
|
+
*/
|
|
60
|
+
off(eventName: 'QueryRun', callback: (queryRunInfo: QueryRunInfo) => void): void;
|
|
61
|
+
/**
|
|
62
|
+
* Event fired whenever a Filter is Applied in AdapTable
|
|
63
|
+
* @param eventName FilterApplied
|
|
64
|
+
* @param callback FilterApplied which provides details of the Query and the associated AST
|
|
65
|
+
* @returns the unsubscribe function
|
|
66
|
+
*/
|
|
67
|
+
on(eventName: 'FilterApplied', callback: (filterAppliedInfo: FilterAppliedInfo) => void): VoidFunction;
|
|
68
|
+
/**
|
|
69
|
+
* Unsubscribe from FilterApplied
|
|
70
|
+
* @param eventName FilterApplied
|
|
71
|
+
* @param callback
|
|
72
|
+
*/
|
|
73
|
+
off(eventName: 'FilterApplied', callback: (filterAppliedInfo: FilterAppliedInfo) => void): void;
|
|
37
74
|
/**
|
|
38
75
|
* Event fired whenever a cell changes in the Grid
|
|
39
76
|
* @param eventName CellChanged
|
|
@@ -264,6 +301,6 @@ export interface EventApi {
|
|
|
264
301
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
265
302
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
266
303
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
267
|
-
emit(eventName: 'AdaptableReady' | 'AlertFired' | '
|
|
304
|
+
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged', data?: any): Promise<any>;
|
|
268
305
|
destroy(): void;
|
|
269
306
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ColumnFilter, DataSet } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Current Searches and Filter in AdapTable
|
|
4
|
+
*/
|
|
5
|
+
export interface AdaptableSearchState {
|
|
6
|
+
/**
|
|
7
|
+
* Current DataSet (if one selected)
|
|
8
|
+
*/
|
|
9
|
+
dataSet: DataSet | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Current Query
|
|
12
|
+
*/
|
|
13
|
+
currentQuery: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* AST for Current Query
|
|
16
|
+
*/
|
|
17
|
+
queryAST: any;
|
|
18
|
+
/**
|
|
19
|
+
* Currently applied Column Filters
|
|
20
|
+
*/
|
|
21
|
+
columnFilters: ColumnFilter[] | undefined;
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
2
|
+
import { ColumnFilter } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* EventInfo returned by the Filter Applied event
|
|
5
|
+
*/
|
|
6
|
+
export interface FilterAppliedInfo extends BaseEventInfo {
|
|
7
|
+
/**
|
|
8
|
+
* Currently applied Column Filters
|
|
9
|
+
*/
|
|
10
|
+
columnFilters: ColumnFilter[] | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CustomSort } from '../../PredefinedConfig/CustomSortState';
|
|
2
|
+
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
3
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
4
|
+
/**
|
|
5
|
+
* EventInfo returned by GridSorted event
|
|
6
|
+
*/
|
|
7
|
+
export interface GridSortedInfo extends BaseEventInfo {
|
|
8
|
+
/**
|
|
9
|
+
* Current sort state in the Grid
|
|
10
|
+
*/
|
|
11
|
+
adaptableSortState: AdaptableSortState;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Overview of current sorting state in the grid
|
|
15
|
+
*/
|
|
16
|
+
export interface AdaptableSortState {
|
|
17
|
+
/**
|
|
18
|
+
* Which columns have sorting applied and,if so, which direction
|
|
19
|
+
*/
|
|
20
|
+
columnSorts: ColumnSort[];
|
|
21
|
+
/**
|
|
22
|
+
* All the Custom Sorts in State; this is always sent even if no custom sorts are active
|
|
23
|
+
*/
|
|
24
|
+
customSorts: CustomSort[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
2
|
+
/**
|
|
3
|
+
* EventInfo returned by the QueryRun event
|
|
4
|
+
*/
|
|
5
|
+
export interface QueryRunInfo extends BaseEventInfo {
|
|
6
|
+
/**
|
|
7
|
+
* Current Query
|
|
8
|
+
*/
|
|
9
|
+
currentQuery: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* AST for Current Query
|
|
12
|
+
*/
|
|
13
|
+
queryAST: any;
|
|
14
|
+
}
|
|
@@ -1,55 +1,11 @@
|
|
|
1
|
-
import { CustomSort } from '../../PredefinedConfig/CustomSortState';
|
|
2
|
-
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
3
1
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
4
|
-
import {
|
|
2
|
+
import { AdaptableSortState } from '../../types';
|
|
3
|
+
import { AdaptableSearchState } from './AdaptableSearchState';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* @deprecated Use QueryRun and or FilterApplied
|
|
7
6
|
*/
|
|
8
7
|
export interface SearchChangedInfo extends BaseEventInfo {
|
|
9
|
-
/**
|
|
10
|
-
* How Search was changed: 'CurrentQuery', 'Filter', 'DataChange' or 'Sort'
|
|
11
|
-
*/
|
|
12
8
|
searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort';
|
|
13
|
-
/**
|
|
14
|
-
* Current searches and filters in the Grid
|
|
15
|
-
*/
|
|
16
9
|
adaptableSearchState: AdaptableSearchState;
|
|
17
|
-
/**
|
|
18
|
-
* Current sort state in the Grid
|
|
19
|
-
*/
|
|
20
10
|
adaptableSortState: AdaptableSortState;
|
|
21
11
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Current Searches and Filter in AdapTable
|
|
24
|
-
*/
|
|
25
|
-
export interface AdaptableSearchState {
|
|
26
|
-
/**
|
|
27
|
-
* Current DataSet (if one selected)
|
|
28
|
-
*/
|
|
29
|
-
dataSet: DataSet | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Current Query
|
|
32
|
-
*/
|
|
33
|
-
currentQuery: string | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* AST for Current Query
|
|
36
|
-
*/
|
|
37
|
-
queryAST: any;
|
|
38
|
-
/**
|
|
39
|
-
* Currently applied Column Filters
|
|
40
|
-
*/
|
|
41
|
-
columnFilters: ColumnFilter[] | undefined;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Overview of current sorting state in the grid
|
|
45
|
-
*/
|
|
46
|
-
export interface AdaptableSortState {
|
|
47
|
-
/**
|
|
48
|
-
* Which columns have sorting applied and,if so, which direction
|
|
49
|
-
*/
|
|
50
|
-
columnSorts: ColumnSort[];
|
|
51
|
-
/**
|
|
52
|
-
* All the Custom Sorts in State; this is always sent even if no custom sorts are active
|
|
53
|
-
*/
|
|
54
|
-
customSorts: CustomSort[];
|
|
55
|
-
}
|
package/src/Api/FilterApi.d.ts
CHANGED
|
@@ -134,4 +134,8 @@ export interface FilterApi {
|
|
|
134
134
|
* @param action Filtering Action
|
|
135
135
|
*/
|
|
136
136
|
shouldNewColumnFilterTriggerGridFiltering(action: LayoutColumnFilterAction | Redux.Action): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Fires Filter Applied Event - typically used to enable filtering on the server
|
|
139
|
+
*/
|
|
140
|
+
fireFilterAppliedEvent(): void;
|
|
137
141
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -333,8 +333,13 @@ export interface GridApi {
|
|
|
333
333
|
redrawGrid(): void;
|
|
334
334
|
/**
|
|
335
335
|
* Fires Search Changed Event - typically used to enable server searching and filtering
|
|
336
|
+
* This is now deprecated and will be removed in AdapTable 13
|
|
336
337
|
*/
|
|
337
338
|
fireSearchChangedEvent(searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort', searchAtDate?: Date): void;
|
|
339
|
+
/**
|
|
340
|
+
* Fires Grid Sorted Event
|
|
341
|
+
*/
|
|
342
|
+
fireGridSortedEvent(): void;
|
|
338
343
|
/**
|
|
339
344
|
* Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
|
|
340
345
|
*/
|
|
@@ -18,8 +18,7 @@ import { FreeTextColumnState } from '../../PredefinedConfig/FreeTextColumnState'
|
|
|
18
18
|
import { ToolPanelState } from '../../PredefinedConfig/ToolPanelState';
|
|
19
19
|
import { ConfigApi } from '../ConfigApi';
|
|
20
20
|
import { AdaptableStateKey, AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
21
|
-
import { AdaptableSearchState, ScheduleState } from '../../types';
|
|
22
|
-
import { AdaptableSortState } from '../Events/SearchChanged';
|
|
21
|
+
import { AdaptableSearchState, AdaptableSortState, ScheduleState } from '../../types';
|
|
23
22
|
import { QueryState } from '../../PredefinedConfig/QueryState';
|
|
24
23
|
import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
|
|
25
24
|
import { ChartingState } from '../../PredefinedConfig/ChartingState';
|
|
@@ -42,4 +42,5 @@ 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
|
+
fireFilterAppliedEvent(): void;
|
|
45
46
|
}
|
|
@@ -267,5 +267,14 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
267
267
|
isEditTrigger ||
|
|
268
268
|
isSetAndActive);
|
|
269
269
|
}
|
|
270
|
+
fireFilterAppliedEvent() {
|
|
271
|
+
if (this.adaptable.isInitialised) {
|
|
272
|
+
const filterAppliedInfo = {
|
|
273
|
+
columnFilters: this.getColumnFilters(),
|
|
274
|
+
adaptableApi: this.getAdaptableApi(),
|
|
275
|
+
};
|
|
276
|
+
this.adaptable.api.eventApi.emit('FilterApplied', filterAppliedInfo);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
270
279
|
}
|
|
271
280
|
exports.FilterApiImpl = FilterApiImpl;
|
|
@@ -85,6 +85,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
85
85
|
isQuickFilterAvailable(): boolean;
|
|
86
86
|
redrawGrid(): void;
|
|
87
87
|
fireSearchChangedEvent(searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort'): void;
|
|
88
|
+
fireGridSortedEvent(): void;
|
|
88
89
|
fireCellChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
89
90
|
fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
|
|
90
91
|
jumpToRow(primaryKeyValue: any): void;
|
|
@@ -272,6 +272,17 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
272
272
|
this.adaptable.api.eventApi.emit('SearchChanged', searchChangedInfo);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
+
fireGridSortedEvent() {
|
|
276
|
+
if (this.adaptable.isInitialised) {
|
|
277
|
+
const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
|
|
278
|
+
const adaptableApi = this.getAdaptableApi();
|
|
279
|
+
const gridSortedInfo = {
|
|
280
|
+
adaptableSortState: adaptableSortState,
|
|
281
|
+
adaptableApi: adaptableApi,
|
|
282
|
+
};
|
|
283
|
+
adaptableApi.eventApi.emit('GridSorted', gridSortedInfo);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
275
286
|
fireCellChangedEvent(cellDataChangedInfo) {
|
|
276
287
|
if (this.adaptable.isInitialised) {
|
|
277
288
|
const cellChangedInfo = {
|
|
@@ -17,4 +17,5 @@ export declare class QueryApiImpl extends ApiBase implements QueryApi {
|
|
|
17
17
|
getReferencedNamedQueryNames(expression?: string): string[];
|
|
18
18
|
getNamedQueryModuleReferences(namedQueryName: string): string[];
|
|
19
19
|
expandCurrentQuery(query?: string): void;
|
|
20
|
+
fireQueryRunEvent(): void;
|
|
20
21
|
}
|
|
@@ -88,5 +88,19 @@ class QueryApiImpl extends ApiBase_1.ApiBase {
|
|
|
88
88
|
},
|
|
89
89
|
}));
|
|
90
90
|
}
|
|
91
|
+
fireQueryRunEvent() {
|
|
92
|
+
if (this.adaptable.isInitialised) {
|
|
93
|
+
const currentQuery = this.adaptable.api.queryApi.getCurrentQuery();
|
|
94
|
+
const adaptableApi = this.getAdaptableApi();
|
|
95
|
+
const queryRunInfo = {
|
|
96
|
+
currentQuery,
|
|
97
|
+
queryAST: currentQuery
|
|
98
|
+
? adaptableApi.queryLanguageApi.getASTForExpression(currentQuery)
|
|
99
|
+
: null,
|
|
100
|
+
adaptableApi: adaptableApi,
|
|
101
|
+
};
|
|
102
|
+
adaptableApi.eventApi.emit('QueryRun', queryRunInfo);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
91
105
|
}
|
|
92
106
|
exports.QueryApiImpl = QueryApiImpl;
|
package/src/Api/QueryApi.d.ts
CHANGED
|
@@ -331,12 +331,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
333
|
* Use Case: Query has changed
|
|
334
|
-
* Action: Filter the Grid and fire
|
|
334
|
+
* Action: Filter the Grid and fire Query Run Event
|
|
335
|
+
* Also run SearchChangedEvent (to be removed in AdapTable 13)
|
|
335
336
|
*/
|
|
336
337
|
case QueryRedux.QUERY_RUN: {
|
|
337
338
|
let ret = next(action);
|
|
338
339
|
setTimeout(() => adaptable.applyGridFiltering(), 5);
|
|
339
340
|
adaptable.api.gridApi.fireSearchChangedEvent('CurrentQuery');
|
|
341
|
+
adaptable.api.queryApi.fireQueryRunEvent();
|
|
340
342
|
return ret;
|
|
341
343
|
}
|
|
342
344
|
/*******************
|
|
@@ -715,7 +717,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
715
717
|
}
|
|
716
718
|
/**
|
|
717
719
|
* Use Case: Column Filters have changed
|
|
718
|
-
* Action: Apply grid filtering and fire
|
|
720
|
+
* Action: Apply grid filtering and fire associated events
|
|
719
721
|
*/
|
|
720
722
|
case LayoutRedux.LAYOUT_COLUMN_FILTER_ADD:
|
|
721
723
|
case LayoutRedux.LAYOUT_COLUMN_FILTER_EDIT:
|
|
@@ -760,6 +762,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
760
762
|
}
|
|
761
763
|
}, 5);
|
|
762
764
|
adaptable.api.gridApi.fireSearchChangedEvent('Filter');
|
|
765
|
+
adaptable.api.filterApi.fireFilterAppliedEvent();
|
|
763
766
|
return returnAction;
|
|
764
767
|
}
|
|
765
768
|
/*******************
|
|
@@ -1387,11 +1390,13 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1387
1390
|
case GridRedux.GRID_SET_SORT: {
|
|
1388
1391
|
let ret = next(action);
|
|
1389
1392
|
adaptable.api.gridApi.fireSearchChangedEvent('Sort');
|
|
1393
|
+
adaptable.api.gridApi.fireGridSortedEvent();
|
|
1390
1394
|
return ret;
|
|
1391
1395
|
}
|
|
1392
1396
|
case GridRedux.GRID_CLEAR_SORT: {
|
|
1393
1397
|
let ret = next(action);
|
|
1394
1398
|
adaptable.api.gridApi.fireSearchChangedEvent('Sort');
|
|
1399
|
+
adaptable.api.gridApi.fireGridSortedEvent();
|
|
1395
1400
|
return ret;
|
|
1396
1401
|
}
|
|
1397
1402
|
/*******************
|
|
@@ -23,7 +23,7 @@ declare class QueryViewPanelComponent extends React.Component<QueryViewPanelComp
|
|
|
23
23
|
render(): JSX.Element;
|
|
24
24
|
private clearQuery;
|
|
25
25
|
saveQuery(): void;
|
|
26
|
-
|
|
26
|
+
onSelectedQueryChanged(queryName: string): void;
|
|
27
27
|
runQuery(expression?: string): void;
|
|
28
28
|
}
|
|
29
29
|
export declare let QueryViewPanelControl: import("react-redux").ConnectedComponent<typeof QueryViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<QueryViewPanelComponent> & QueryViewPanelComponentProps, "api" | "accessLevel" | "CurrentQuery" | "CachedQueries" | "moduleInfo" | "NamedQueries" | "viewType" | "onAddCachedQuery" | "onRunQuery" | "onShowNamedQueries">>;
|
|
@@ -122,8 +122,8 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
122
122
|
saveQuery() {
|
|
123
123
|
this.props.onShowNamedQueries(this.state.expression, this.props.moduleInfo.Popup);
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
this.props.onRunQuery(
|
|
125
|
+
onSelectedQueryChanged(queryName) {
|
|
126
|
+
this.props.onRunQuery(queryName);
|
|
127
127
|
}
|
|
128
128
|
runQuery(expression = this.state.expression) {
|
|
129
129
|
if (StringExtensions_1.default.IsNullOrEmpty(expression) &&
|
|
@@ -40,7 +40,7 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
40
40
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
41
41
|
React.createElement(FormLayout_1.default, { columns: [1, 2] },
|
|
42
42
|
React.createElement(FormLayout_1.FormRow, null,
|
|
43
|
-
React.createElement(CheckBox_1.CheckBox, { value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "
|
|
43
|
+
React.createElement(CheckBox_1.CheckBox, { value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter Quick Search Results"))))),
|
|
44
44
|
React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
|
|
45
45
|
};
|
|
46
46
|
function mapStateToProps(state, ownProps) {
|
|
@@ -2700,6 +2700,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2700
2700
|
uiLabel: string;
|
|
2701
2701
|
}[];
|
|
2702
2702
|
};
|
|
2703
|
+
FilterAppliedInfo: {
|
|
2704
|
+
name: string;
|
|
2705
|
+
kind: string;
|
|
2706
|
+
description: string;
|
|
2707
|
+
properties: {
|
|
2708
|
+
name: string;
|
|
2709
|
+
kind: string;
|
|
2710
|
+
description: string;
|
|
2711
|
+
uiLabel: string;
|
|
2712
|
+
}[];
|
|
2713
|
+
};
|
|
2703
2714
|
FilterOptions: {
|
|
2704
2715
|
name: string;
|
|
2705
2716
|
kind: string;
|
|
@@ -3239,6 +3250,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3239
3250
|
reference: string;
|
|
3240
3251
|
})[];
|
|
3241
3252
|
};
|
|
3253
|
+
GridSortedInfo: {
|
|
3254
|
+
name: string;
|
|
3255
|
+
kind: string;
|
|
3256
|
+
description: string;
|
|
3257
|
+
properties: {
|
|
3258
|
+
name: string;
|
|
3259
|
+
kind: string;
|
|
3260
|
+
description: string;
|
|
3261
|
+
uiLabel: string;
|
|
3262
|
+
reference: string;
|
|
3263
|
+
}[];
|
|
3264
|
+
};
|
|
3242
3265
|
IAdaptableNoCodeWizard: {
|
|
3243
3266
|
name: string;
|
|
3244
3267
|
kind: string;
|
|
@@ -3998,6 +4021,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3998
4021
|
uiLabel: string;
|
|
3999
4022
|
}[];
|
|
4000
4023
|
};
|
|
4024
|
+
QueryRunInfo: {
|
|
4025
|
+
name: string;
|
|
4026
|
+
kind: string;
|
|
4027
|
+
description: string;
|
|
4028
|
+
properties: {
|
|
4029
|
+
name: string;
|
|
4030
|
+
kind: string;
|
|
4031
|
+
description: string;
|
|
4032
|
+
uiLabel: string;
|
|
4033
|
+
}[];
|
|
4034
|
+
};
|
|
4001
4035
|
QueryState: {
|
|
4002
4036
|
name: string;
|
|
4003
4037
|
kind: string;
|
|
@@ -4209,19 +4243,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4209
4243
|
name: string;
|
|
4210
4244
|
kind: string;
|
|
4211
4245
|
description: string;
|
|
4212
|
-
properties: ({
|
|
4213
|
-
name: string;
|
|
4214
|
-
kind: string;
|
|
4215
|
-
description: string;
|
|
4216
|
-
uiLabel: string;
|
|
4217
|
-
reference: string;
|
|
4218
|
-
} | {
|
|
4219
|
-
name: string;
|
|
4220
|
-
kind: string;
|
|
4221
|
-
description: string;
|
|
4222
|
-
uiLabel: string;
|
|
4223
|
-
reference?: undefined;
|
|
4224
|
-
})[];
|
|
4225
4246
|
};
|
|
4226
4247
|
SearchOptions: {
|
|
4227
4248
|
name: string;
|