@adaptabletools/adaptable 12.0.0-canary.5 → 12.0.0-canary.8
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 +73 -73
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +7 -7
- package/src/Api/DataSetApi.d.ts +3 -3
- package/src/Api/EventApi.d.ts +9 -9
- package/src/Api/Events/ActionRowSubmitted.d.ts +24 -0
- package/src/Api/Events/DataSetSelected.d.ts +11 -0
- package/src/Api/Events/{DataSetChanged.js → DataSetSelected.js} +0 -0
- package/src/Api/FilterApi.d.ts +7 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +2 -4
- package/src/Api/Implementation/AlertApiImpl.js +2 -3
- package/src/Api/Implementation/ApiBase.d.ts +12 -1
- package/src/Api/Implementation/ApiBase.js +7 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -4
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +2 -3
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -4
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -3
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +3 -3
- package/src/Api/Implementation/FilterApiImpl.d.ts +8 -0
- package/src/Api/Implementation/FilterApiImpl.js +25 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -3
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
- package/src/Api/Implementation/InternalApiImpl.js +5 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -6
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -4
- package/src/Api/Implementation/PlusMinusApiImpl.js +2 -3
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +3 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +6 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +10 -16
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -4
- package/src/Api/Implementation/ShortcutApiImpl.js +2 -3
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +4 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +12 -0
- package/src/Api/InternalApi.d.ts +1 -1
- package/src/Api/LayoutApi.d.ts +1 -6
- package/src/Api/PredicateApi.d.ts +6 -0
- package/src/Api/TeamSharingApi.d.ts +15 -0
- package/src/Redux/Store/AdaptableStore.js +4 -1
- package/src/Strategy/Interface/IModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.js +51 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/GridInfo/GridInfoPopup.js +3 -1
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/agGrid/Adaptable.js +4 -2
- package/src/components/Dashboard/Dashboard.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +98 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +3 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/Events/DataSetChanged.d.ts +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.0.0-canary.
|
|
3
|
+
"version": "12.0.0-canary.8",
|
|
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: 1655668818436;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -29,6 +29,9 @@ export declare type AngularFrameworkComponent<T = unknown> = {
|
|
|
29
29
|
export declare type ReactFrameworkComponent = ({ adaptableApi, }: {
|
|
30
30
|
adaptableApi: AdaptableApi;
|
|
31
31
|
}) => ReactElement;
|
|
32
|
+
/**
|
|
33
|
+
* Context provided for any custom rendering
|
|
34
|
+
*/
|
|
32
35
|
export interface CustomRenderContext {
|
|
33
36
|
visible: boolean;
|
|
34
37
|
element: HTMLDivElement;
|
|
@@ -86,7 +86,7 @@ export interface FDC3Column {
|
|
|
86
86
|
/**
|
|
87
87
|
* Returns a custom icon to display in the Raise Intent Context Menu Item;
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
intentIcon?: (intent: FDC3Intent | CustomFDC3Intent) => AdaptableIcon;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* A Column which will be defined as an FDC3 Instrument
|
|
@@ -67,23 +67,23 @@ export interface LayoutOptions {
|
|
|
67
67
|
}
|
|
68
68
|
export interface LayoutTagOptions {
|
|
69
69
|
/**
|
|
70
|
-
* Automatically generate an
|
|
70
|
+
* Automatically generate an AdaptableObjectTag for each Layout
|
|
71
71
|
*
|
|
72
72
|
* @defaultValue false
|
|
73
73
|
*/
|
|
74
74
|
autoGenerateTagsForLayouts?: boolean | ((context: AutoGenerateTagsForLayoutsContext) => AdaptableObjectTag[]);
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Automatically assumes that any `LayoutAssociatedObject` is available in the current Layout if it has a tag with the Layouts name (or no tags at all)
|
|
77
77
|
*
|
|
78
|
-
* @defaultValue
|
|
78
|
+
* @defaultValue false
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
autoCheckTagsForLayouts?: boolean;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* Checks if the provided Adaptable Object is available in the given Layout
|
|
83
83
|
*
|
|
84
|
-
* @defaultValue
|
|
84
|
+
* @defaultValue undefined
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
isObjectAvailableInLayout?: (context: LayoutAvailableContext) => boolean;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Customize how Layouts are displayed in Settings Panel
|
package/src/Api/DataSetApi.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ export interface DataSetApi {
|
|
|
33
33
|
*/
|
|
34
34
|
showDataSetPopup(): void;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* @param dataSet Data Set which has
|
|
36
|
+
* Fires the DataSet Selected Event
|
|
37
|
+
* @param dataSet Data Set which has been selected
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
fireDataSetSelectedEvent(dataSet: DataSet): void;
|
|
40
40
|
}
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { FlashingCellDisplayedInfo } from './Events/FlashingCellDisplayed';
|
|
|
15
15
|
import { GridDataChangedInfo } from './Events/GridDataChanged';
|
|
16
16
|
import { TeamSharingEntityChangedInfo } from './Events/TeamSharingEntityChanged';
|
|
17
17
|
import { ActionRowSubmittedInfo } from './Events/ActionRowSubmitted';
|
|
18
|
-
import {
|
|
18
|
+
import { DataSetSelectedInfo } from './Events/DataSetSelected';
|
|
19
19
|
/**
|
|
20
20
|
* Responsible for publishing the many Events that AdapTable fires
|
|
21
21
|
*/
|
|
@@ -209,18 +209,18 @@ export interface EventApi {
|
|
|
209
209
|
*/
|
|
210
210
|
off(eventName: 'ActionRowSubmitted', callback: (actionRowSubmittedInfo: ActionRowSubmittedInfo) => void): void;
|
|
211
211
|
/**
|
|
212
|
-
* Event fired when a DataSet is
|
|
212
|
+
* Event fired when a DataSet is Selected
|
|
213
213
|
*
|
|
214
|
-
* @param eventName
|
|
215
|
-
* @param callback
|
|
214
|
+
* @param eventName DataSetSelected
|
|
215
|
+
* @param callback DataSetSelectedInfo
|
|
216
216
|
*/
|
|
217
|
-
on(eventName: '
|
|
217
|
+
on(eventName: 'DataSetSelected', callback: (dataSetSelectedInfo: DataSetSelectedInfo) => void): () => void;
|
|
218
218
|
/**
|
|
219
|
-
* Unsubscribe from
|
|
220
|
-
* @param eventName
|
|
219
|
+
* Unsubscribe from DataSetSelected
|
|
220
|
+
* @param eventName DataSetSelected
|
|
221
221
|
* @param callback
|
|
222
222
|
*/
|
|
223
|
-
off(eventName: '
|
|
223
|
+
off(eventName: 'DataSetSelected', callback: (dataSetSelectedInfo: DataSetSelectedInfo) => void): void;
|
|
224
224
|
/**
|
|
225
225
|
* Fired when Adaptable is up and running - has no arguments.
|
|
226
226
|
* @param eventName - AdaptableReady
|
|
@@ -252,6 +252,6 @@ export interface EventApi {
|
|
|
252
252
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
253
253
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
254
254
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
255
|
-
emit(eventName: 'AdaptableReady' | 'AlertFired' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'AdaptableStateChanged' | 'DashboardChanged' | 'CellChanged' | 'GridDataChanged' | 'LayoutChanged' | 'LiveDataChanged' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'FDC3MessageSent' | 'ActionRowSubmitted' | '
|
|
255
|
+
emit(eventName: 'AdaptableReady' | 'AlertFired' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'AdaptableStateChanged' | 'DashboardChanged' | 'CellChanged' | 'GridDataChanged' | 'LayoutChanged' | 'LiveDataChanged' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'FDC3MessageSent' | 'ActionRowSubmitted' | 'DataSetSelected', data?: any): Promise<any>;
|
|
256
256
|
destroy(): void;
|
|
257
257
|
}
|
|
@@ -13,22 +13,46 @@ export declare type ActionRowType = 'rowCreated' | 'rowEdited' | 'rowDeleted';
|
|
|
13
13
|
* Info passed into ActionRowSubmitted Event for Created Rows
|
|
14
14
|
*/
|
|
15
15
|
export interface CreatedActionRowInfo extends BaseEventInfo {
|
|
16
|
+
/**
|
|
17
|
+
* Specifies its a Created Action Row
|
|
18
|
+
*/
|
|
16
19
|
type: 'rowCreated';
|
|
20
|
+
/**
|
|
21
|
+
* Data entered in the Form
|
|
22
|
+
*/
|
|
17
23
|
formData: AdaptableFormData;
|
|
24
|
+
/**
|
|
25
|
+
* Node being cloned
|
|
26
|
+
*/
|
|
18
27
|
clonedRowNode?: RowNode;
|
|
19
28
|
}
|
|
20
29
|
/**
|
|
21
30
|
* Info passed into ActionRowSubmitted Event for Edited Rows
|
|
22
31
|
*/
|
|
23
32
|
export interface EditedActionRowInfo extends BaseEventInfo {
|
|
33
|
+
/**
|
|
34
|
+
* Specifies its an Edited Action Row
|
|
35
|
+
*/
|
|
24
36
|
type: 'rowEdited';
|
|
37
|
+
/**
|
|
38
|
+
* Data entered in the Form
|
|
39
|
+
*/
|
|
25
40
|
formData: AdaptableFormData;
|
|
41
|
+
/**
|
|
42
|
+
* Node being edited
|
|
43
|
+
*/
|
|
26
44
|
rowNode: RowNode;
|
|
27
45
|
}
|
|
28
46
|
/**
|
|
29
47
|
* Info passed into ActionRowSubmitted Event for Deleted Rows
|
|
30
48
|
*/
|
|
31
49
|
export interface DeletedActionRowInfo extends BaseEventInfo {
|
|
50
|
+
/**
|
|
51
|
+
* Specifies its a Deleted Action Row
|
|
52
|
+
*/
|
|
32
53
|
type: 'rowDeleted';
|
|
54
|
+
/**
|
|
55
|
+
* Node being deleted
|
|
56
|
+
*/
|
|
33
57
|
rowNode: RowNode;
|
|
34
58
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataSet } from '../../types';
|
|
2
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
+
/**
|
|
4
|
+
* Object returned by the `DataSetSelected` event
|
|
5
|
+
*/
|
|
6
|
+
export interface DataSetSelectedInfo extends BaseEventInfo {
|
|
7
|
+
/**
|
|
8
|
+
* The DataSet that has been selected
|
|
9
|
+
*/
|
|
10
|
+
dataSet: DataSet;
|
|
11
|
+
}
|
|
File without changes
|
package/src/Api/FilterApi.d.ts
CHANGED
|
@@ -108,4 +108,11 @@ export interface FilterApi {
|
|
|
108
108
|
* @param node Row Node to evaluate
|
|
109
109
|
*/
|
|
110
110
|
evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Checks if a filter is active or applied.
|
|
113
|
+
* It is applied when:
|
|
114
|
+
* - filter predicate does not have inputs
|
|
115
|
+
* - filter predicate has inputs with values
|
|
116
|
+
*/
|
|
117
|
+
isFilterActive(columnFilter: ColumnFilter): boolean;
|
|
111
118
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiBase } from './ApiBase';
|
|
1
|
+
import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
|
|
2
2
|
import { AlertApi } from '../AlertApi';
|
|
3
3
|
import { AlertState, AlertDefinition, AlertProperties, AdaptableAlertAction, AlertButton } from '../../PredefinedConfig/AlertState';
|
|
4
4
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
@@ -12,9 +12,7 @@ import { GridDataChangedInfo } from '../Events/GridDataChanged';
|
|
|
12
12
|
export declare class AlertApiImpl extends ApiBase implements AlertApi {
|
|
13
13
|
getAlertState(): AlertState;
|
|
14
14
|
getAdaptableFormByName(name: string): AdaptableForm<AlertFormContext> | undefined;
|
|
15
|
-
getAlertDefinitions(config?:
|
|
16
|
-
includeLayoutNotAssociatedObjects?: boolean;
|
|
17
|
-
}): AlertDefinition[];
|
|
15
|
+
getAlertDefinitions(config?: LayoutAssociatedObjectLoadConfig): AlertDefinition[];
|
|
18
16
|
getAlertDefinitionById(id: AlertDefinition['Uuid']): AlertDefinition;
|
|
19
17
|
getNonReactiveAlertDefinitions(): AlertDefinition[];
|
|
20
18
|
getActiveNonReactiveAlertDefinitions(): AlertDefinition[];
|
|
@@ -21,9 +21,8 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
21
21
|
return (_a = alertForms.find((f) => f.name === name)) === null || _a === void 0 ? void 0 : _a.form;
|
|
22
22
|
}
|
|
23
23
|
getAlertDefinitions(config) {
|
|
24
|
-
var _a
|
|
25
|
-
return ((
|
|
26
|
-
this.adaptable.api.internalApi.isObjectAvailableInLayout(alertDefinition, 'Alert'))) !== null && _b !== void 0 ? _b : []);
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this.handleLayoutAssociatedObjects(this.getAlertState().AlertDefinitions, 'Alert', config)) !== null && _a !== void 0 ? _a : []);
|
|
27
26
|
}
|
|
28
27
|
getAlertDefinitionById(id) {
|
|
29
28
|
return this.getAlertDefinitions().find((alert) => (alert === null || alert === void 0 ? void 0 : alert.Uuid) === id);
|
|
@@ -7,7 +7,7 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
|
7
7
|
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
8
8
|
import { AdaptableApi } from '../AdaptableApi';
|
|
9
9
|
import { ExportOptions } from '../../AdaptableOptions/ExportOptions';
|
|
10
|
-
import { ActionOptions, ContainerOptions, DashboardOptions, EditOptions, FilterOptions, GeneralOptions, LayoutOptions, MenuOptions, SearchOptions, StateOptions, TeamSharingOptions, UserInterfaceOptions } from '../../types';
|
|
10
|
+
import { ActionOptions, ContainerOptions, DashboardOptions, EditOptions, FilterOptions, GeneralOptions, LayoutAssociatedObject, LayoutOptions, MenuOptions, SearchOptions, StateOptions, TeamSharingOptions, UserInterfaceOptions } from '../../types';
|
|
11
11
|
import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
|
|
12
12
|
import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
|
|
13
13
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
@@ -31,6 +31,10 @@ export declare abstract class ApiBase {
|
|
|
31
31
|
*/
|
|
32
32
|
protected checkItemExists(item: any, name: string, type: string): boolean;
|
|
33
33
|
protected checkArrayExists(array: any): boolean;
|
|
34
|
+
protected handleLayoutAssociatedObjects<T extends LayoutAssociatedObject>(associatedObjects: T[], module: AdaptableModule, config?: {
|
|
35
|
+
includeLayoutNotAssociatedObjects?: boolean;
|
|
36
|
+
associatedWithLayout?: string;
|
|
37
|
+
}): T[];
|
|
34
38
|
/**
|
|
35
39
|
* Base api Helper method that dispatches a *Redux Action* to the Store
|
|
36
40
|
* @param action the Redux Action to be dispatched
|
|
@@ -68,3 +72,10 @@ export declare abstract class ApiBase {
|
|
|
68
72
|
protected getAdaptableApi(): AdaptableApi;
|
|
69
73
|
destroy(): void;
|
|
70
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Configuration for API methods which load `LayoutAssociatedObject`
|
|
77
|
+
*/
|
|
78
|
+
export interface LayoutAssociatedObjectLoadConfig {
|
|
79
|
+
includeLayoutNotAssociatedObjects?: boolean;
|
|
80
|
+
associatedWithLayout?: string;
|
|
81
|
+
}
|
|
@@ -37,6 +37,13 @@ class ApiBase {
|
|
|
37
37
|
}
|
|
38
38
|
return true;
|
|
39
39
|
}
|
|
40
|
+
handleLayoutAssociatedObjects(associatedObjects = [], module, config) {
|
|
41
|
+
const associatedLayout = (config === null || config === void 0 ? void 0 : config.associatedWithLayout)
|
|
42
|
+
? this.adaptable.api.layoutApi.getLayoutByName(config.associatedWithLayout)
|
|
43
|
+
: this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
44
|
+
return associatedObjects.filter((associatedObject) => (config === null || config === void 0 ? void 0 : config.includeLayoutNotAssociatedObjects) ||
|
|
45
|
+
this.adaptable.api.internalApi.isObjectAvailableInLayout(associatedObject, module, associatedLayout));
|
|
46
|
+
}
|
|
40
47
|
/**
|
|
41
48
|
* Base api Helper method that dispatches a *Redux Action* to the Store
|
|
42
49
|
* @param action the Redux Action to be dispatched
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { ApiBase } from './ApiBase';
|
|
1
|
+
import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
|
|
2
2
|
import { ConditionalStyleApi } from '../ConditionalStyleApi';
|
|
3
3
|
import { ConditionalStyleState, ConditionalStyle } from '../../PredefinedConfig/ConditionalStyleState';
|
|
4
4
|
import { AdaptableColumn, AdaptableScope } from '../../types';
|
|
5
5
|
import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
6
6
|
export declare class ConditionalStyleApiImpl extends ApiBase implements ConditionalStyleApi {
|
|
7
7
|
getConditionalStyleState(): ConditionalStyleState;
|
|
8
|
-
getAllConditionalStyle(config?:
|
|
9
|
-
includeLayoutNotAssociatedObjects?: boolean;
|
|
10
|
-
}): ConditionalStyle[];
|
|
8
|
+
getAllConditionalStyle(config?: LayoutAssociatedObjectLoadConfig): ConditionalStyle[];
|
|
11
9
|
getAllActiveConditionalStyle(): ConditionalStyle[];
|
|
12
10
|
getConditionalStyleById(id: ConditionalStyle['Uuid']): ConditionalStyle;
|
|
13
11
|
getAllSuspendedConditionalStyle(): ConditionalStyle[];
|
|
@@ -10,9 +10,8 @@ class ConditionalStyleApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
10
|
return this.getAdaptableState().ConditionalStyle;
|
|
11
11
|
}
|
|
12
12
|
getAllConditionalStyle(config) {
|
|
13
|
-
var _a
|
|
14
|
-
return ((
|
|
15
|
-
this.adaptable.api.internalApi.isObjectAvailableInLayout(conditionalStyle, 'ConditionalStyle'))) !== null && _b !== void 0 ? _b : []);
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this.handleLayoutAssociatedObjects(this.getConditionalStyleState().ConditionalStyles, 'ConditionalStyle', config)) !== null && _a !== void 0 ? _a : []);
|
|
16
15
|
}
|
|
17
16
|
getAllActiveConditionalStyle() {
|
|
18
17
|
return this.getAllConditionalStyle().filter((style) => !style.IsSuspended);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { ApiBase } from './ApiBase';
|
|
1
|
+
import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
|
|
2
2
|
import { CustomSortApi } from '../CustomSortApi';
|
|
3
3
|
import { CustomSortState, CustomSort } from '../../PredefinedConfig/CustomSortState';
|
|
4
4
|
export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi {
|
|
5
5
|
getCustomSortState(): CustomSortState;
|
|
6
|
-
getAllCustomSort(config?:
|
|
7
|
-
includeLayoutNotAssociatedObjects?: boolean;
|
|
8
|
-
}): CustomSort[];
|
|
6
|
+
getAllCustomSort(config?: LayoutAssociatedObjectLoadConfig): CustomSort[];
|
|
9
7
|
getCustomSortById(id: CustomSort['Uuid']): CustomSort;
|
|
10
8
|
getAllActiveCustomSort(): CustomSort[];
|
|
11
9
|
getAllSuspendedCustomSort(): CustomSort[];
|
|
@@ -10,9 +10,8 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
10
|
return this.getAdaptableState().CustomSort;
|
|
11
11
|
}
|
|
12
12
|
getAllCustomSort(config) {
|
|
13
|
-
var _a
|
|
14
|
-
return ((
|
|
15
|
-
this.adaptable.api.internalApi.isObjectAvailableInLayout(customSort, 'CustomSort'))) !== null && _b !== void 0 ? _b : []);
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this.handleLayoutAssociatedObjects(this.getCustomSortState().CustomSorts, 'CustomSort', config)) !== null && _a !== void 0 ? _a : []);
|
|
16
15
|
}
|
|
17
16
|
getCustomSortById(id) {
|
|
18
17
|
return this.getAllCustomSort().find((customSort) => customSort.Uuid === id);
|
|
@@ -8,5 +8,5 @@ export declare class DataSetApiImpl extends ApiBase implements DataSetApi {
|
|
|
8
8
|
setDataSet(dataSetName: string): void;
|
|
9
9
|
clearCurrentDataSet(): void;
|
|
10
10
|
showDataSetPopup(): void;
|
|
11
|
-
|
|
11
|
+
fireDataSetSelectedEvent(dataSet: DataSet): void;
|
|
12
12
|
}
|
|
@@ -29,13 +29,13 @@ class DataSetApiImpl extends ApiBase_1.ApiBase {
|
|
|
29
29
|
showDataSetPopup() {
|
|
30
30
|
this.showModulePopup(ModuleConstants.DataSetModuleId);
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
fireDataSetSelectedEvent(dataSet) {
|
|
33
33
|
if (this.adaptable.isInitialised) {
|
|
34
|
-
const
|
|
34
|
+
const dataSetSelectedInfo = {
|
|
35
35
|
adaptableApi: this.adaptable.api,
|
|
36
36
|
dataSet,
|
|
37
37
|
};
|
|
38
|
-
this.adaptable.api.eventApi.emit('
|
|
38
|
+
this.adaptable.api.eventApi.emit('DataSetSelected', dataSetSelectedInfo);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -28,4 +28,12 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
|
|
|
28
28
|
columnFiltersToString(columnFilters: ColumnFilter[]): string;
|
|
29
29
|
evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
|
|
30
30
|
private getColumnFilterById;
|
|
31
|
+
/**
|
|
32
|
+
* Checks if a filter is applied. It is applied when:
|
|
33
|
+
* - has no inputs
|
|
34
|
+
* - has inputs and inputs have values
|
|
35
|
+
*
|
|
36
|
+
* @param filter
|
|
37
|
+
*/
|
|
38
|
+
isFilterActive(filter: ColumnFilter): boolean;
|
|
31
39
|
}
|
|
@@ -7,6 +7,7 @@ const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/La
|
|
|
7
7
|
const ApiBase_1 = require("./ApiBase");
|
|
8
8
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
9
9
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
10
11
|
class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
11
12
|
getAllSystemFilterIds() {
|
|
12
13
|
return this.getFilterOptions().systemFilters;
|
|
@@ -179,5 +180,29 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
179
180
|
var _a;
|
|
180
181
|
return (_a = this.getColumnFilters()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
|
|
181
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Checks if a filter is applied. It is applied when:
|
|
185
|
+
* - has no inputs
|
|
186
|
+
* - has inputs and inputs have values
|
|
187
|
+
*
|
|
188
|
+
* @param filter
|
|
189
|
+
*/
|
|
190
|
+
isFilterActive(filter) {
|
|
191
|
+
const predicateDef = this.adaptable.api.predicateApi.getPredicateDefById(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId);
|
|
192
|
+
if (ArrayExtensions_1.default.IsNull(predicateDef.inputs) &&
|
|
193
|
+
// values predicates have no inputs in the definition
|
|
194
|
+
!this.adaptable.api.predicateApi.hasPredicateValues(filter.Predicate)) {
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
const inputs = filter.Predicate.Inputs;
|
|
198
|
+
if (ArrayExtensions_1.default.IsEmpty(inputs)) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
// all values in the array need to be non-empty (e.g. between has two values, [min, max])
|
|
202
|
+
const allInputsHaveValues = inputs.every((value) => {
|
|
203
|
+
return value !== undefined && value !== null && value !== '';
|
|
204
|
+
});
|
|
205
|
+
return allInputsHaveValues;
|
|
206
|
+
}
|
|
182
207
|
}
|
|
183
208
|
exports.FilterApiImpl = FilterApiImpl;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiBase } from './ApiBase';
|
|
1
|
+
import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
|
|
2
2
|
import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
|
|
3
3
|
import { FlashingCellApi } from '../FlashingCellApi';
|
|
4
4
|
import { FlashingCellDefinition, FlashingCellState } from '../../PredefinedConfig/FlashingCellState';
|
|
@@ -6,9 +6,7 @@ import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePr
|
|
|
6
6
|
import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
|
|
7
7
|
export declare class FlashingCellApiImpl extends ApiBase implements FlashingCellApi {
|
|
8
8
|
getFlashingCellState(): FlashingCellState;
|
|
9
|
-
getFlashingCellDefinitions(config?:
|
|
10
|
-
includeLayoutNotAssociatedObjects?: boolean;
|
|
11
|
-
}): FlashingCellDefinition[];
|
|
9
|
+
getFlashingCellDefinitions(config?: LayoutAssociatedObjectLoadConfig): FlashingCellDefinition[];
|
|
12
10
|
mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
|
|
13
11
|
getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid']): FlashingCellDefinition;
|
|
14
12
|
getActiveFlashingCellDefinitions(): FlashingCellDefinition[];
|
|
@@ -10,9 +10,8 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
10
|
return this.getAdaptableState().FlashingCell;
|
|
11
11
|
}
|
|
12
12
|
getFlashingCellDefinitions(config) {
|
|
13
|
-
var _a
|
|
14
|
-
const flashingCellDefinitions = (
|
|
15
|
-
this.adaptable.api.internalApi.isObjectAvailableInLayout(flashingCellDefinition, 'FlashingCell'))) !== null && _b !== void 0 ? _b : [];
|
|
13
|
+
var _a;
|
|
14
|
+
const flashingCellDefinitions = (_a = this.handleLayoutAssociatedObjects(this.getFlashingCellState().FlashingCellDefinitions, 'FlashingCell', config)) !== null && _a !== void 0 ? _a : [];
|
|
16
15
|
return flashingCellDefinitions.map((flashingCellDefinition) => {
|
|
17
16
|
return this.mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition);
|
|
18
17
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
|
|
2
|
-
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
|
|
3
3
|
import { FormatColumnApi } from '../FormatColumnApi';
|
|
4
4
|
import { FormatColumnState, FormatColumn, ColumnStyle, ColumnComparison } from '../../PredefinedConfig/FormatColumnState';
|
|
5
5
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
@@ -7,9 +7,7 @@ import { RowNode } from '@ag-grid-community/all-modules';
|
|
|
7
7
|
import { AdaptableFormat } from '../../types';
|
|
8
8
|
export declare class FormatColumnApiImpl extends ApiBase implements FormatColumnApi {
|
|
9
9
|
getFormatColumnState(): FormatColumnState;
|
|
10
|
-
getAllFormatColumn(config?:
|
|
11
|
-
includeLayoutNotAssociatedObjects?: boolean;
|
|
12
|
-
}): FormatColumn[];
|
|
10
|
+
getAllFormatColumn(config?: LayoutAssociatedObjectLoadConfig): FormatColumn[];
|
|
13
11
|
getFormatColumnById(id: FormatColumn['Uuid']): FormatColumn;
|
|
14
12
|
getAllActiveFormatColumn(): FormatColumn[];
|
|
15
13
|
getAllSuspendedFormatColumn(): FormatColumn[];
|
|
@@ -14,9 +14,8 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
14
14
|
return this.getAdaptableState().FormatColumn;
|
|
15
15
|
}
|
|
16
16
|
getAllFormatColumn(config) {
|
|
17
|
-
var _a
|
|
18
|
-
return ((
|
|
19
|
-
this.adaptable.api.internalApi.isObjectAvailableInLayout(formatColumn, 'FormatColumn'))) !== null && _b !== void 0 ? _b : []);
|
|
17
|
+
var _a;
|
|
18
|
+
return ((_a = this.handleLayoutAssociatedObjects(this.getFormatColumnState().FormatColumns, 'FormatColumn', config)) !== null && _a !== void 0 ? _a : []);
|
|
20
19
|
}
|
|
21
20
|
getFormatColumnById(id) {
|
|
22
21
|
return this.getAllFormatColumn().find((formatColumn) => formatColumn.Uuid === id);
|
|
@@ -127,7 +127,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
127
127
|
hideProgressIndicator(): void;
|
|
128
128
|
getCorrectEnglishVariant(wordToSpell: string): string;
|
|
129
129
|
hasLayoutSpecificObjects(): boolean;
|
|
130
|
-
isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule): boolean;
|
|
130
|
+
isObjectAvailableInLayout(object: LayoutAssociatedObject, module: AdaptableModule, layout: Layout): boolean;
|
|
131
131
|
showLayoutNotAssociatedObjects(): boolean;
|
|
132
132
|
shouldDisplayTagSections(): boolean;
|
|
133
133
|
getAvailableTags(): AdaptableObjectTag[] | undefined;
|
|
@@ -121,7 +121,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
121
121
|
? toFlashingAlert(forPrimaryKey[columnId])
|
|
122
122
|
: toFlashingAlert(forPrimaryKey[SystemRedux_1.FLASHING_CELL_ROW_KEY]);
|
|
123
123
|
if ((adaptableFlashingCell === null || adaptableFlashingCell === void 0 ? void 0 : adaptableFlashingCell.flashingCellDefinition) &&
|
|
124
|
-
!this.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell')) {
|
|
124
|
+
!this.isObjectAvailableInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getAdaptableApi().layoutApi.getCurrentLayout())) {
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
return adaptableFlashingCell;
|
|
@@ -494,18 +494,19 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
494
494
|
}
|
|
495
495
|
return false;
|
|
496
496
|
}
|
|
497
|
-
isObjectAvailableInLayout(object, module) {
|
|
497
|
+
isObjectAvailableInLayout(object, module, layout) {
|
|
498
|
+
var _a;
|
|
498
499
|
if (!this.hasLayoutSpecificObjects()) {
|
|
499
500
|
return true;
|
|
500
501
|
}
|
|
501
502
|
const layoutTagOptions = this.getAdaptableOptions().layoutOptions.layoutTagOptions;
|
|
502
503
|
if ((layoutTagOptions === null || layoutTagOptions === void 0 ? void 0 : layoutTagOptions.autoCheckTagsForLayouts) == true) {
|
|
503
|
-
return
|
|
504
|
+
return ArrayExtensions_1.default.IsNullOrEmpty(object.Tags) ? true : (_a = object.Tags) === null || _a === void 0 ? void 0 : _a.includes(layout.Name);
|
|
504
505
|
}
|
|
505
506
|
const context = {
|
|
506
507
|
adaptableObject: object,
|
|
507
508
|
module,
|
|
508
|
-
layout
|
|
509
|
+
layout,
|
|
509
510
|
adaptableApi: this.getAdaptableApi(),
|
|
510
511
|
};
|
|
511
512
|
return layoutTagOptions === null || layoutTagOptions === void 0 ? void 0 : layoutTagOptions.isObjectAvailableInLayout(context);
|
|
@@ -3,7 +3,6 @@ import { LayoutApi } from '../LayoutApi';
|
|
|
3
3
|
import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
5
5
|
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
6
|
-
import { LayoutAssociatedObject } from '../../types';
|
|
7
6
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
8
7
|
getLayoutState(): LayoutState;
|
|
9
8
|
shouldAutoSaveLayout: (layout?: Layout) => boolean;
|
|
@@ -41,7 +40,6 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
41
40
|
isDefaultLayout(layout: Layout): boolean;
|
|
42
41
|
isCurrentLayoutDefault(): boolean;
|
|
43
42
|
areExpandedRowGroupsSavedInLayouts(): boolean;
|
|
44
|
-
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
45
43
|
removeColumnFromCurrentLayout(columnId: string): void;
|
|
46
44
|
removeColumnFromAllLayouts(columnId: string): void;
|
|
47
45
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
@@ -315,12 +315,6 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
315
315
|
return (this.getLayoutOptions().includeExpandedRowGroups ||
|
|
316
316
|
this.getLayoutOptions().displayRowGroups === 'dynamic');
|
|
317
317
|
}
|
|
318
|
-
isObjectAvailableInCurrentLayout(adaptableObject) {
|
|
319
|
-
var _a;
|
|
320
|
-
return ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(adaptableObject.Tags)
|
|
321
|
-
? true
|
|
322
|
-
: (_a = adaptableObject.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag).includes(this.getCurrentLayoutName());
|
|
323
|
-
}
|
|
324
318
|
removeColumnFromCurrentLayout(columnId) {
|
|
325
319
|
this.removeColumnFromLayout(columnId, this.getCurrentLayoutName());
|
|
326
320
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ApiBase } from './ApiBase';
|
|
1
|
+
import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
|
|
2
2
|
import { PlusMinusState, PlusMinusNudge } from '../../PredefinedConfig/PlusMinusState';
|
|
3
3
|
import { PlusMinusApi } from '../PlusMinusApi';
|
|
4
4
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
5
5
|
export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
|
|
6
6
|
getPlusMinusState(): PlusMinusState;
|
|
7
|
-
getAllPlusMinus(config?:
|
|
8
|
-
includeLayoutNotAssociatedObjects?: boolean;
|
|
9
|
-
}): PlusMinusNudge[];
|
|
7
|
+
getAllPlusMinus(config?: LayoutAssociatedObjectLoadConfig): PlusMinusNudge[];
|
|
10
8
|
getPlusMinusById(id: PlusMinusNudge['Uuid']): PlusMinusNudge;
|
|
11
9
|
getAllActivePlusMinus(): PlusMinusNudge[];
|
|
12
10
|
getAllSuspendedPlusMinus(): PlusMinusNudge[];
|
|
@@ -10,9 +10,8 @@ class PlusMinusApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
10
|
return this.getAdaptableState().PlusMinus;
|
|
11
11
|
}
|
|
12
12
|
getAllPlusMinus(config) {
|
|
13
|
-
var _a
|
|
14
|
-
const layoutSpecificPlusMinusNudges = (
|
|
15
|
-
this.adaptable.api.internalApi.isObjectAvailableInLayout(plusMinusNudge, 'PlusMinus'))) !== null && _b !== void 0 ? _b : [];
|
|
13
|
+
var _a;
|
|
14
|
+
const layoutSpecificPlusMinusNudges = (_a = this.handleLayoutAssociatedObjects(this.getPlusMinusState().PlusMinusNudges, 'PlusMinus', config)) !== null && _a !== void 0 ? _a : [];
|
|
16
15
|
return layoutSpecificPlusMinusNudges.filter((plusMinusNudge) => plusMinusNudge.Rule == undefined || plusMinusNudge.Rule.BooleanExpression != undefined);
|
|
17
16
|
}
|
|
18
17
|
getPlusMinusById(id) {
|
|
@@ -14,4 +14,5 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
|
14
14
|
isValidPredicate(predicate: AdaptablePredicate | undefined): boolean;
|
|
15
15
|
handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
16
16
|
getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
|
|
17
|
+
hasPredicateValues(predicate: AdaptablePredicate): boolean;
|
|
17
18
|
}
|
|
@@ -96,5 +96,8 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
96
96
|
}
|
|
97
97
|
return predicateId;
|
|
98
98
|
}
|
|
99
|
+
hasPredicateValues(predicate) {
|
|
100
|
+
return (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId) === 'Values' || (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId) === 'ExcludeValues';
|
|
101
|
+
}
|
|
99
102
|
}
|
|
100
103
|
exports.PredicateApiImpl = PredicateApiImpl;
|