@adaptabletools/adaptable 12.0.0-canary.4 → 12.0.0-canary.7
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 +133 -130
- 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/ColumnOptions.d.ts +4 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +11 -6
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +2 -0
- package/src/AdaptableOptions/StateOptions.d.ts +10 -0
- package/src/Api/Events/ActionRowSubmitted.d.ts +24 -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/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/SmartEditApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +2 -1
- 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/SmartEditApi.d.ts +1 -1
- package/src/Api/TeamSharingApi.d.ts +15 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +3 -0
- 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/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -0
- package/src/Utilities/Extensions/TypeExtensions.d.ts +30 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -13
- package/src/Utilities/Helpers/DateHelper.d.ts +27 -0
- package/src/Utilities/Helpers/DateHelper.js +33 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -0
- package/src/Utilities/Services/MetamodelService.d.ts +7 -1
- package/src/Utilities/Services/MetamodelService.js +82 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +10 -8
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +3 -1
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/agGrid/Adaptable.js +7 -4
- package/src/components/Dashboard/Dashboard.js +2 -1
- package/src/metamodel/adaptable-metamodel-model.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +91 -13
- package/src/metamodel/adaptable.metamodel.js +1 -12981
- package/src/types.d.ts +2 -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.0.0-canary.
|
|
3
|
+
"version": "12.0.0-canary.7",
|
|
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: 1655632388110;
|
|
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;
|
|
@@ -5,10 +5,14 @@ import { Column } from '@ag-grid-community/all-modules';
|
|
|
5
5
|
export interface ColumnOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Provide an alternative Friendly Name for a Column
|
|
8
|
+
*
|
|
9
|
+
* @defaultValue undefined
|
|
8
10
|
*/
|
|
9
11
|
columnFriendlyName?: (columnFriendlyNameContext: ColumnFriendlyNameContext) => string | undefined;
|
|
10
12
|
/**
|
|
11
13
|
* Optional list of Column Types - used primarily for Special Columns
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue []
|
|
12
16
|
*/
|
|
13
17
|
columnTypes?: string[];
|
|
14
18
|
/**
|
|
@@ -47,6 +47,8 @@ export interface DataChangeHistoryOptions {
|
|
|
47
47
|
showDataChange?: (cellDataChangedInfo: CellDataChangedInfo) => boolean;
|
|
48
48
|
/**
|
|
49
49
|
* Action button definition. Can be used to implement undo functionality.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue undefined
|
|
50
52
|
*/
|
|
51
53
|
changeHistoryButton?: DataChangeHistoryButton | DataChangeHistoryButton[];
|
|
52
54
|
}
|
|
@@ -8,6 +8,8 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
|
8
8
|
export interface EditOptions {
|
|
9
9
|
/**
|
|
10
10
|
* Function to validate on Server Adaptable data edits
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue undefined
|
|
11
13
|
*/
|
|
12
14
|
validateOnServer?: (cellDataChangedInfo: CellDataChangedInfo) => Promise<ValidationResult>;
|
|
13
15
|
/**
|
|
@@ -19,10 +21,14 @@ export interface EditOptions {
|
|
|
19
21
|
displayServerValidationMessages?: boolean;
|
|
20
22
|
/**
|
|
21
23
|
* Function which checks if given Grid Cell is editable
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue undefined
|
|
22
26
|
*/
|
|
23
27
|
isCellEditable?: (gridCell: GridCell) => boolean;
|
|
24
28
|
/**
|
|
25
29
|
* Custom Operations to use in Smart Edit
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue undefined
|
|
26
32
|
*/
|
|
27
33
|
smartEditCustomOperations?: SmartEditCustomOperation[];
|
|
28
34
|
}
|
|
@@ -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,18 +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
|
+
*
|
|
72
|
+
* @defaultValue false
|
|
71
73
|
*/
|
|
72
74
|
autoGenerateTagsForLayouts?: boolean | ((context: AutoGenerateTagsForLayoutsContext) => AdaptableObjectTag[]);
|
|
73
75
|
/**
|
|
74
|
-
*
|
|
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
|
+
*
|
|
78
|
+
* @defaultValue false
|
|
75
79
|
*/
|
|
76
|
-
|
|
80
|
+
autoCheckTagsForLayouts?: boolean;
|
|
77
81
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
82
|
+
* Checks if the provided Adaptable Object is available in the given Layout
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue undefined
|
|
80
85
|
*/
|
|
81
|
-
|
|
86
|
+
isObjectAvailableInLayout?: (context: LayoutAvailableContext) => boolean;
|
|
82
87
|
}
|
|
83
88
|
/**
|
|
84
89
|
* Customize how Layouts are displayed in Settings Panel
|
|
@@ -29,6 +29,8 @@ export interface SettingsPanelOptions {
|
|
|
29
29
|
alwaysShowInToolPanel?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Ordered items to display at side of Settings Panel
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue all available AdapTable modules
|
|
32
34
|
*/
|
|
33
35
|
navigation?: {
|
|
34
36
|
items?: (AdaptableSettingsPanel | string | '-')[];
|
|
@@ -5,22 +5,32 @@ import { AdaptableState } from '../PredefinedConfig/AdaptableState';
|
|
|
5
5
|
export interface StateOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Allows the customization of state persistence
|
|
8
|
+
*
|
|
9
|
+
* @defaultValue persists state to local storage
|
|
8
10
|
*/
|
|
9
11
|
persistState?: AdaptablePersistStateFunction;
|
|
10
12
|
/**
|
|
11
13
|
* Allows the customization of Adaptable State loading
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue loads state from local storage
|
|
12
16
|
*/
|
|
13
17
|
loadState?: AdaptableLoadStateFunction;
|
|
14
18
|
/**
|
|
15
19
|
* Allows the customization of the Adaptable State that is going to be persisted
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue undefined
|
|
16
22
|
*/
|
|
17
23
|
saveState?: AdaptableSaveStateFunction;
|
|
18
24
|
/**
|
|
19
25
|
* Allows hooking into Adaptable State hydration
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue undefined
|
|
20
28
|
*/
|
|
21
29
|
applyState?: (state: any) => any;
|
|
22
30
|
/**
|
|
23
31
|
* Allows clearing of remote Adaptable State
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue undefined
|
|
24
34
|
*/
|
|
25
35
|
clearState?: AdaptableClearStateFunction;
|
|
26
36
|
/**
|
|
@@ -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
|
}
|
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);
|
|
@@ -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;
|