@adaptabletools/adaptable 12.1.0-canary.2 → 12.1.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/bundle.cjs.js +99 -99
- 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/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +11 -11
- package/src/View/AdaptableView.js +2 -2
- package/src/View/Components/Popups/AdaptableToaster.js +7 -7
- 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/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +24 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +59 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +39 -0
- package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +41 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +23 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +269 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +23 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +43 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +9 -0
- package/src/components/Toastify/index.d.ts +3 -0
- package/src/components/Toastify/index.js +10 -0
- 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.
|
|
3
|
+
"version": "12.1.1",
|
|
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: 1658765730539;
|
|
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
|
/*******************
|
|
@@ -27,7 +27,7 @@ import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
|
27
27
|
import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
28
28
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
29
29
|
import { AdaptableApi } from '../../types';
|
|
30
|
-
import
|
|
30
|
+
import { ToastOptions } from '../components/Toastify';
|
|
31
31
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
32
32
|
export declare function CreateEmptyCalculatedColumn(isFilterable: boolean): CalculatedColumn;
|
|
33
33
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
@@ -4,7 +4,7 @@ exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplay
|
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
7
|
-
const
|
|
7
|
+
const Toastify_1 = require("../components/Toastify");
|
|
8
8
|
function CreateEmptyCustomSort() {
|
|
9
9
|
return { Uuid: Uuid_1.createUuid(), ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
|
|
10
10
|
}
|
|
@@ -393,29 +393,29 @@ exports.CreateToastOptions = CreateToastOptions;
|
|
|
393
393
|
function getToastPosition(position) {
|
|
394
394
|
switch (position) {
|
|
395
395
|
case 'BottomLeft':
|
|
396
|
-
return toast.POSITION.BOTTOM_LEFT;
|
|
396
|
+
return Toastify_1.toast.POSITION.BOTTOM_LEFT;
|
|
397
397
|
case 'BottomCenter':
|
|
398
|
-
return toast.POSITION.BOTTOM_CENTER;
|
|
398
|
+
return Toastify_1.toast.POSITION.BOTTOM_CENTER;
|
|
399
399
|
case 'BottomRight':
|
|
400
|
-
return toast.POSITION.BOTTOM_RIGHT;
|
|
400
|
+
return Toastify_1.toast.POSITION.BOTTOM_RIGHT;
|
|
401
401
|
case 'TopLeft':
|
|
402
|
-
return toast.POSITION.TOP_LEFT;
|
|
402
|
+
return Toastify_1.toast.POSITION.TOP_LEFT;
|
|
403
403
|
case 'TopCenter':
|
|
404
|
-
return toast.POSITION.TOP_CENTER;
|
|
404
|
+
return Toastify_1.toast.POSITION.TOP_CENTER;
|
|
405
405
|
case 'TopRight':
|
|
406
|
-
return toast.POSITION.TOP_RIGHT;
|
|
406
|
+
return Toastify_1.toast.POSITION.TOP_RIGHT;
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
function getToastTransition(transition) {
|
|
410
410
|
switch (transition) {
|
|
411
411
|
case 'Bounce':
|
|
412
|
-
return Bounce;
|
|
412
|
+
return Toastify_1.Bounce;
|
|
413
413
|
case 'Slide':
|
|
414
|
-
return Slide;
|
|
414
|
+
return Toastify_1.Slide;
|
|
415
415
|
case 'Zoom':
|
|
416
|
-
return Zoom;
|
|
416
|
+
return Toastify_1.Zoom;
|
|
417
417
|
case 'Flip':
|
|
418
|
-
return Flip;
|
|
418
|
+
return Toastify_1.Flip;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
exports.ObjectFactory = {
|
|
@@ -15,7 +15,7 @@ const License_1 = require("./License");
|
|
|
15
15
|
const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
|
|
16
16
|
const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
|
|
17
17
|
const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
|
|
18
|
-
const
|
|
18
|
+
const Toastify_1 = require("../components/Toastify");
|
|
19
19
|
class AdaptableView extends React.Component {
|
|
20
20
|
render() {
|
|
21
21
|
var _a, _b, _c, _d;
|
|
@@ -27,7 +27,7 @@ class AdaptableView extends React.Component {
|
|
|
27
27
|
this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
|
|
28
28
|
React.createElement(AdaptablePopupConfirmation_1.AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi }),
|
|
29
29
|
Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup_1.AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
|
|
30
|
-
React.createElement(ToastContainer
|
|
30
|
+
React.createElement(Toastify_1.ToastContainer
|
|
31
31
|
// we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
|
|
32
32
|
// instance is destroyed and re-created many times
|
|
33
33
|
, {
|
|
@@ -5,13 +5,13 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
7
7
|
const AdaptablePopupAlert_1 = require("./AdaptablePopupAlert");
|
|
8
|
-
const
|
|
8
|
+
const Toastify_1 = require("../../../components/Toastify");
|
|
9
9
|
const showToast = (props) => {
|
|
10
10
|
// we're doing this hack and not simply using props.api in order not to have a memory
|
|
11
11
|
// leak where the api is still kept around in memory by the toaster
|
|
12
12
|
let api = props.api;
|
|
13
13
|
const off = api.eventApi.on('AdaptableDestroy', () => {
|
|
14
|
-
toast.dismiss(toastId);
|
|
14
|
+
Toastify_1.toast.dismiss(toastId);
|
|
15
15
|
api = null;
|
|
16
16
|
});
|
|
17
17
|
const adaptableOptions = props.api.internalApi.getAdaptableOptions();
|
|
@@ -27,21 +27,21 @@ const showToast = (props) => {
|
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
const content = (React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, adaptableAlert: props.adaptableAlert, onClose: () => {
|
|
30
|
-
toast.dismiss(toastId);
|
|
30
|
+
Toastify_1.toast.dismiss(toastId);
|
|
31
31
|
} }));
|
|
32
32
|
let toastId;
|
|
33
33
|
switch (props.adaptableAlert.alertDefinition.MessageType) {
|
|
34
34
|
case 'Info':
|
|
35
|
-
toastId = toast.info(content, toastProps);
|
|
35
|
+
toastId = Toastify_1.toast.info(content, toastProps);
|
|
36
36
|
break;
|
|
37
37
|
case 'Error':
|
|
38
|
-
toastId = toast.error(content, toastProps);
|
|
38
|
+
toastId = Toastify_1.toast.error(content, toastProps);
|
|
39
39
|
break;
|
|
40
40
|
case 'Success':
|
|
41
|
-
toastId = toast.success(content, toastProps);
|
|
41
|
+
toastId = Toastify_1.toast.success(content, toastProps);
|
|
42
42
|
break;
|
|
43
43
|
case 'Warning':
|
|
44
|
-
toastId = toast.warn(content, toastProps);
|
|
44
|
+
toastId = Toastify_1.toast.warn(content, toastProps);
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -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) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme, TypeOptions } from '../types';
|
|
3
|
+
export interface CloseButtonProps {
|
|
4
|
+
closeToast: (e: React.MouseEvent<HTMLElement>) => void;
|
|
5
|
+
type: TypeOptions;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
theme: Theme;
|
|
8
|
+
}
|
|
9
|
+
export declare function CloseButton({ closeToast, theme, ariaLabel }: CloseButtonProps): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme, ToastProps, TypeOptions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Used when providing custom icon
|
|
5
|
+
*/
|
|
6
|
+
export interface IconProps {
|
|
7
|
+
theme: Theme;
|
|
8
|
+
type: TypeOptions;
|
|
9
|
+
}
|
|
10
|
+
export declare type BuiltInIconProps = React.SVGProps<SVGSVGElement> & IconProps;
|
|
11
|
+
declare function Warning(props: BuiltInIconProps): JSX.Element;
|
|
12
|
+
declare function Info(props: BuiltInIconProps): JSX.Element;
|
|
13
|
+
declare function Success(props: BuiltInIconProps): JSX.Element;
|
|
14
|
+
declare function Error(props: BuiltInIconProps): JSX.Element;
|
|
15
|
+
declare function Spinner(): JSX.Element;
|
|
16
|
+
export declare const Icons: {
|
|
17
|
+
info: typeof Info;
|
|
18
|
+
warning: typeof Warning;
|
|
19
|
+
success: typeof Success;
|
|
20
|
+
error: typeof Error;
|
|
21
|
+
spinner: typeof Spinner;
|
|
22
|
+
};
|
|
23
|
+
export declare function getIcon({ theme, type, isLoading, icon }: ToastProps): React.ReactNode;
|
|
24
|
+
export {};
|