@adaptabletools/adaptable 16.0.0-canary.2 → 16.0.0-canary.3
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/base.css +31 -31
- package/base.css.map +1 -1
- package/bundle.cjs.js +155 -155
- package/index.css +39 -39
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -1
- package/src/AdaptableOptions/ActionRowOptions.d.ts +8 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +7 -7
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -13
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +5 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +15 -5
- package/src/Api/ColumnApi.d.ts +18 -7
- package/src/Api/DataChangeHistoryApi.d.ts +6 -0
- package/src/Api/EventApi.d.ts +19 -6
- package/src/Api/Events/ChexboxColumnClicked.d.ts +1 -0
- package/src/Api/Events/ScheduleTriggered.d.ts +11 -0
- package/src/Api/Events/ScheduleTriggered.js +2 -0
- package/src/Api/Implementation/ActionRowApiImpl.js +7 -5
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -1
- package/src/Api/Implementation/ColumnApiImpl.js +22 -3
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
- package/src/Api/Implementation/PredicateApiImpl.js +8 -8
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +4 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +5 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +0 -3
- package/src/Api/Implementation/StyledColumnApiImpl.js +0 -26
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -0
- package/src/Api/Internal/AdaptableInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +7 -2
- package/src/Api/Internal/FilterInternalApi.js +8 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +11 -13
- package/src/Api/Internal/ScheduleInternalApi.d.ts +8 -0
- package/src/Api/Internal/ScheduleInternalApi.js +20 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +5 -2
- package/src/Api/Internal/StyledColumnInternalApi.js +29 -2
- package/src/Api/Internal/UserInterfaceInternalApi.d.ts +5 -0
- package/src/Api/Internal/UserInterfaceInternalApi.js +18 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/Api/PredicateApi.d.ts +5 -5
- package/src/Api/StyledColumnApi.d.ts +0 -14
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +7 -7
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -15
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +65 -41
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +3 -2
- package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +17 -3
- package/src/Redux/Store/AdaptableStore.js +1 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -6
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/ScheduleModule.js +3 -2
- package/src/Strategy/StyledColumnModule.js +24 -15
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -2
- package/src/Utilities/MenuItem.d.ts +4 -4
- package/src/Utilities/Services/MetamodelService.js +5 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +1 -1
- package/src/Utilities/Services/RowEditService.js +1 -1
- package/src/Utilities/Services/TeamSharingService.d.ts +2 -0
- package/src/Utilities/Services/TeamSharingService.js +60 -3
- package/src/Utilities/Services/ValidationService.js +6 -2
- package/src/View/Charting/useChartingElements.js +1 -1
- package/src/View/Components/AdaptableButton/index.d.ts +3 -0
- package/src/View/Components/AdaptableButton/index.js +18 -0
- package/src/View/Components/AdaptableIconComponent/index.d.ts +7 -0
- package/src/View/Components/AdaptableIconComponent/index.js +16 -0
- package/src/View/Components/AdaptableIconComponent/useCustomIcon.d.ts +2 -0
- package/src/View/Components/AdaptableIconComponent/useCustomIcon.js +12 -0
- package/src/{components → View/Components}/Badge/index.d.ts +1 -1
- package/src/{components → View/Components}/Badge/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +1 -1
- package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +3 -2
- package/src/View/Components/Panels/PanelWithButton.d.ts +2 -2
- package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +4 -4
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -2
- package/src/View/Dashboard/Dashboard.js +3 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -0
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +13 -7
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +7 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -2
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +2 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -1
- package/src/View/UIHelper.d.ts +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +0 -2
- package/src/agGrid/ActionColumnRenderer.js +20 -5
- package/src/agGrid/Adaptable.d.ts +5 -2
- package/src/agGrid/Adaptable.js +61 -25
- package/src/agGrid/BadgeRenderer.js +19 -20
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/agGridHelper.js +2 -0
- package/src/agGrid/agGridMenuHelper.js +11 -4
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +1 -0
- package/src/agGrid/attachAddaptableColumnTypes.js +5 -4
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/Icon/index.d.ts +11 -0
- package/src/components/{AdaptableIconComponent → Icon}/index.js +10 -10
- package/src/components/IconSelector/IconSelector.js +3 -3
- package/src/components/SimpleButton/index.js +10 -10
- package/src/components/Toggle/Toggle.d.ts +2 -2
- package/src/components/Toggle/Toggle.js +2 -2
- package/src/components/icons/index.d.ts +4 -4
- package/src/components/icons/index.js +6 -6
- package/src/metamodel/adaptable.metamodel.d.ts +72 -31
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +6 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Components/AdaptableViewIcon/index.d.ts +0 -10
- package/src/View/Components/AdaptableViewIcon/index.js +0 -18
- package/src/components/AdaptableIconComponent/index.d.ts +0 -11
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { AdaptableFDC3EventInfo, SelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, CheckboxColumnClickedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, QueryRunInfo, FilterAppliedInfo } from '../types';
|
|
2
|
-
import { ChartChangedInfo } from './Events/ChartChanged';
|
|
3
|
-
import { ThemeEditedInfo } from './Events/ThemeChanged';
|
|
1
|
+
import { AdaptableFDC3EventInfo, SelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, CheckboxColumnClickedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, QueryRunInfo, ScheduleTriggeredInfo, ChartChangedInfo, ThemeEditedInfo, FilterAppliedInfo } from '../types';
|
|
4
2
|
/**
|
|
5
3
|
* Responsible for publishing the many Events that AdapTable fires
|
|
6
4
|
*/
|
|
@@ -31,10 +29,23 @@ export interface EventApi {
|
|
|
31
29
|
* @param callback
|
|
32
30
|
*/
|
|
33
31
|
off(eventName: 'QueryRun', callback: (queryRunInfo: QueryRunInfo) => void): void;
|
|
32
|
+
/**
|
|
33
|
+
* Event fired whenever a Schedule is triggered in AdapTable
|
|
34
|
+
* @param eventName ScheduleTriggered
|
|
35
|
+
* @param callback ScheduleTriggered which provides details of the Schedule that was triggered
|
|
36
|
+
* @returns the unsubscribe function
|
|
37
|
+
*/
|
|
38
|
+
on(eventName: 'ScheduleTriggered', callback: (scheduleTriggeredInfo: ScheduleTriggeredInfo) => void): VoidFunction;
|
|
39
|
+
/**
|
|
40
|
+
* Unsubscribe from ScheduleTriggered
|
|
41
|
+
* @param eventName ScheduleTriggered
|
|
42
|
+
* @param callback
|
|
43
|
+
*/
|
|
44
|
+
off(eventName: 'ScheduleTriggered', callback: (scheduleTriggeredInfo: ScheduleTriggeredInfo) => void): void;
|
|
34
45
|
/**
|
|
35
46
|
* Event fired whenever a Filter is Applied in AdapTable
|
|
36
47
|
* @param eventName FilterApplied
|
|
37
|
-
* @param callback FilterApplied which provides details of the
|
|
48
|
+
* @param callback FilterApplied which provides details of the Filter that was applied
|
|
38
49
|
* @returns the unsubscribe function
|
|
39
50
|
*/
|
|
40
51
|
on(eventName: 'FilterApplied', callback: (filterAppliedInfo: FilterAppliedInfo) => void): VoidFunction;
|
|
@@ -154,10 +165,12 @@ export interface EventApi {
|
|
|
154
165
|
* @param eventName CheckboxColumnClicked
|
|
155
166
|
* @param callback CheckboxColumnClickedInfo which includes details of the CheckboxColumn
|
|
156
167
|
* @returns the unsubscribe function
|
|
168
|
+
* @deprecated
|
|
157
169
|
*/
|
|
158
170
|
on(eventName: 'CheckboxColumnClicked', callback: (checkboxColumnClickedInfo: CheckboxColumnClickedInfo) => void): VoidFunction;
|
|
159
171
|
/**
|
|
160
|
-
* Unsubscribe from
|
|
172
|
+
* Unsubscribe from CheckboxColumnClicked
|
|
173
|
+
* @deprecated
|
|
161
174
|
*/
|
|
162
175
|
off(eventName: 'CheckboxColumnClicked', callback: (checkboxColumnClickedInfo: CheckboxColumnClickedInfo) => void): void;
|
|
163
176
|
/**
|
|
@@ -310,6 +323,6 @@ export interface EventApi {
|
|
|
310
323
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
311
324
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
312
325
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
313
|
-
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited', data?: any): Promise<any>;
|
|
326
|
+
emit(eventName: 'ActionRowSubmitted' | 'AdaptableReady' | 'AlertFired' | 'AdaptableStateChanged' | 'AdaptableStateReloaded' | 'CellChanged' | 'ChartChanged' | 'CheckboxColumnClicked' | 'CustomToolbarConfigured' | 'DashboardChanged' | 'DataSetSelected' | 'FDC3MessageSent' | 'FilterApplied' | 'GridDataChanged' | 'GridSorted' | 'LayoutChanged' | 'LiveDataChanged' | 'QueryRun' | 'ScheduleTriggered' | 'SearchChanged' | 'SelectionChanged' | 'SystemStatusMessageDisplayed' | 'TeamSharingEntityChanged' | 'ThemeChanged' | 'ThemeEdited', data?: any): Promise<any>;
|
|
314
327
|
destroy(): void;
|
|
315
328
|
}
|
|
@@ -2,6 +2,7 @@ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
|
2
2
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
3
|
/**
|
|
4
4
|
* Event Info published by CheckboxColumnClicked event
|
|
5
|
+
* @deprecated - no longer used in AdapTable 16
|
|
5
6
|
*/
|
|
6
7
|
export interface CheckboxColumnClickedInfo extends BaseEventInfo {
|
|
7
8
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseSchedule } from '../../PredefinedConfig/Common/Schedule';
|
|
2
|
+
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
+
/**
|
|
4
|
+
* EventInfo returned by the ScheduleTriggered event
|
|
5
|
+
*/
|
|
6
|
+
export interface ScheduleTriggeredInfo extends BaseEventInfo {
|
|
7
|
+
/**
|
|
8
|
+
* Schedule that was Triggered
|
|
9
|
+
*/
|
|
10
|
+
schedule: BaseSchedule;
|
|
11
|
+
}
|
|
@@ -10,14 +10,16 @@ class ActionRowApiImpl extends ApiBase_1.ApiBase {
|
|
|
10
10
|
this.internalApi = new ActionRowInternalApi_1.ActionRowInternalApi(adaptable);
|
|
11
11
|
}
|
|
12
12
|
getActionRowButtons() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var actionRowButtons = this.getActionRowOptions().actionRowButtons;
|
|
14
|
+
if (typeof actionRowButtons === 'function') {
|
|
15
|
+
const context = {
|
|
16
16
|
adaptableApi: this.getAdaptableApi(),
|
|
17
17
|
userName: this.getOptions().userName,
|
|
18
18
|
adaptableId: this.getOptions().adaptableId,
|
|
19
|
-
}
|
|
20
|
-
|
|
19
|
+
};
|
|
20
|
+
actionRowButtons = actionRowButtons(context);
|
|
21
|
+
}
|
|
22
|
+
return actionRowButtons !== null && actionRowButtons !== void 0 ? actionRowButtons : [];
|
|
21
23
|
}
|
|
22
24
|
displayEditActionRow(primaryKey) {
|
|
23
25
|
const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(primaryKey);
|
|
@@ -20,6 +20,7 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
|
|
|
20
20
|
showChartDefinitionOnce(chartDefinition: ChartDefinition, container?: HTMLElement): ChartRef;
|
|
21
21
|
closeChartDefinition(chartDefinition: ChartDefinition): void;
|
|
22
22
|
editChartDefinition(editedChartDefinition: ChartDefinition): void;
|
|
23
|
+
updateAgChart(chartDefinition: ChartDefinition): void;
|
|
23
24
|
addChartDefinition(chart: ChartDefinition): void;
|
|
24
25
|
getChartingOpenState(): {
|
|
25
26
|
charts: {
|
|
@@ -74,6 +74,10 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
74
74
|
}
|
|
75
75
|
editChartDefinition(editedChartDefinition) {
|
|
76
76
|
this.dispatchAction(ChartingRedux.ChartingEditChart(editedChartDefinition));
|
|
77
|
+
this.updateAgChart(editedChartDefinition);
|
|
78
|
+
}
|
|
79
|
+
updateAgChart(chartDefinition) {
|
|
80
|
+
this.adaptable.updateChart(chartDefinition);
|
|
77
81
|
}
|
|
78
82
|
addChartDefinition(chart) {
|
|
79
83
|
this.dispatchAction(ChartingRedux.ChartingAddChart(chart));
|
|
@@ -26,7 +26,8 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
26
26
|
getColumnWithColumnId(columnId: string, logWarning?: boolean): AdaptableColumn | undefined;
|
|
27
27
|
hasNumberDataType(columnId: string): boolean;
|
|
28
28
|
hasBooleanDataType(columnId: string): boolean;
|
|
29
|
-
|
|
29
|
+
hasStringArrayDataType(columnId: string): boolean;
|
|
30
|
+
hasNumericArrayDataType(columnId: string): boolean;
|
|
30
31
|
hasDateDataType(columnId: string): boolean;
|
|
31
32
|
getColumnDataTypeForColumnId(columnId: string): AdaptableColumnDataType | undefined;
|
|
32
33
|
getFriendlyNameForColumnId(columnId: string): string;
|
|
@@ -39,10 +40,12 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
39
40
|
getColumnWithFriendlyName(columnFriendlyName: string, logWarning?: boolean): AdaptableColumn;
|
|
40
41
|
getColumnsOfType(dataType: AdaptableColumnDataType): AdaptableColumn[];
|
|
41
42
|
getNumericColumns(): AdaptableColumn[];
|
|
43
|
+
getNumericArrayColumns(): AdaptableColumn[];
|
|
42
44
|
getNumberArrayColumns(): AdaptableColumn[];
|
|
43
45
|
getTupleNumberArrayColumns(): AdaptableColumn[];
|
|
44
46
|
getObjectNumberArrayColumns(): AdaptableColumn[];
|
|
45
47
|
getStringColumns(): AdaptableColumn[];
|
|
48
|
+
getStringArrayColumns(): AdaptableColumn[];
|
|
46
49
|
getDateColumns(): AdaptableColumn[];
|
|
47
50
|
getBooleanColumns(): AdaptableColumn[];
|
|
48
51
|
getArrayColumns(): AdaptableColumn[];
|
|
@@ -76,7 +76,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
76
76
|
}
|
|
77
77
|
isActionColumn(columnId) {
|
|
78
78
|
var _a;
|
|
79
|
-
return (((_a = this.adaptable.api.actionColumnApi
|
|
79
|
+
return (((_a = this.adaptable.api.actionColumnApi
|
|
80
|
+
.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((cc) => cc.columnId == columnId)) != null);
|
|
80
81
|
}
|
|
81
82
|
getColumnWithColumnId(columnId, logWarning) {
|
|
82
83
|
if (columnId == undefined) {
|
|
@@ -112,7 +113,14 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
112
113
|
}
|
|
113
114
|
return (column === null || column === void 0 ? void 0 : column.dataType) == 'Boolean';
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
+
hasStringArrayDataType(columnId) {
|
|
117
|
+
const column = this.getColumnWithColumnId(columnId);
|
|
118
|
+
if (!column) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
return (column === null || column === void 0 ? void 0 : column.dataType) == 'StringArray';
|
|
122
|
+
}
|
|
123
|
+
hasNumericArrayDataType(columnId) {
|
|
116
124
|
const column = this.getColumnWithColumnId(columnId);
|
|
117
125
|
if (!column) {
|
|
118
126
|
return false;
|
|
@@ -226,6 +234,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
226
234
|
return this.getNumericColumns();
|
|
227
235
|
case 'String':
|
|
228
236
|
return this.getStringColumns();
|
|
237
|
+
case 'StringArray':
|
|
238
|
+
return this.getStringArrayColumns();
|
|
229
239
|
case 'NumberArray':
|
|
230
240
|
return this.getNumberArrayColumns();
|
|
231
241
|
case 'ObjectNumberArray':
|
|
@@ -239,6 +249,11 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
239
249
|
getNumericColumns() {
|
|
240
250
|
return this.getColumns().filter((c) => c.dataType == 'Number');
|
|
241
251
|
}
|
|
252
|
+
getNumericArrayColumns() {
|
|
253
|
+
return this.getNumberArrayColumns()
|
|
254
|
+
.concat(this.getTupleNumberArrayColumns())
|
|
255
|
+
.concat(this.getObjectNumberArrayColumns());
|
|
256
|
+
}
|
|
242
257
|
getNumberArrayColumns() {
|
|
243
258
|
return this.getColumns().filter((c) => c.dataType == 'NumberArray');
|
|
244
259
|
}
|
|
@@ -251,6 +266,9 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
251
266
|
getStringColumns() {
|
|
252
267
|
return this.getColumns().filter((c) => c.dataType == 'String');
|
|
253
268
|
}
|
|
269
|
+
getStringArrayColumns() {
|
|
270
|
+
return this.getColumns().filter((c) => c.dataType == 'String');
|
|
271
|
+
}
|
|
254
272
|
getDateColumns() {
|
|
255
273
|
return this.getColumns().filter((c) => c.dataType == 'Date');
|
|
256
274
|
}
|
|
@@ -260,7 +278,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
260
278
|
getArrayColumns() {
|
|
261
279
|
return this.getColumns().filter((c) => c.dataType == 'NumberArray' ||
|
|
262
280
|
c.dataType == 'TupleNumberArray' ||
|
|
263
|
-
c.dataType == 'ObjectNumberArray'
|
|
281
|
+
c.dataType == 'ObjectNumberArray' ||
|
|
282
|
+
c.dataType == 'StringArray');
|
|
264
283
|
}
|
|
265
284
|
getSortableColumns() {
|
|
266
285
|
return this.getColumns().filter((c) => c.sortable);
|
|
@@ -8,5 +8,6 @@ export declare class DataChangeHistoryApiImpl extends ApiBase implements DataCha
|
|
|
8
8
|
suspendDataChangeHistory(): void;
|
|
9
9
|
getDataChangeHistoryLog(): CellDataChangedInfo[];
|
|
10
10
|
undoDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
|
|
11
|
+
clearDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
|
|
11
12
|
openDataChangeHistorySettingsPanel(): void;
|
|
12
13
|
}
|
|
@@ -40,6 +40,9 @@ class DataChangeHistoryApiImpl extends ApiBase_1.ApiBase {
|
|
|
40
40
|
undoDataChangeHistoryEntry(dataChangeInfo) {
|
|
41
41
|
this.dispatchAction((0, SystemRedux_1.SystemDataChangeHistoryUndo)(dataChangeInfo));
|
|
42
42
|
}
|
|
43
|
+
clearDataChangeHistoryEntry(dataChangeInfo) {
|
|
44
|
+
this.dispatchAction((0, SystemRedux_1.SystemDataChangeHistoryClearRow)(dataChangeInfo));
|
|
45
|
+
}
|
|
43
46
|
openDataChangeHistorySettingsPanel() {
|
|
44
47
|
this.showModulePopup(ModuleConstants.DataChangeHistoryModuleId);
|
|
45
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { PredicateApi } from '../PredicateApi';
|
|
3
|
-
import {
|
|
3
|
+
import { PredicateDefHandlerContext, PredicateModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
4
4
|
import { AdaptablePredicate, AdaptablePredicateDef, AdaptableColumnPredicate } from '../../types';
|
|
5
5
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
6
6
|
import { PredicateInternalApi } from '../Internal/PredicateInternalApi';
|
|
@@ -17,8 +17,8 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
|
17
17
|
predicateToString(predicate: AdaptableColumnPredicate): string | undefined;
|
|
18
18
|
isValidPredicate(predicate: AdaptableColumnPredicate | undefined): boolean;
|
|
19
19
|
isEveryPredicateValid(predicates: AdaptablePredicate[]): boolean;
|
|
20
|
-
handleColumnPredicate(predicate: AdaptableColumnPredicate | undefined,
|
|
21
|
-
handleColumnPredicates(predicates: AdaptableColumnPredicate[],
|
|
22
|
-
handlePredicate(predicate: AdaptablePredicate | undefined,
|
|
23
|
-
handlePredicates(predicates: AdaptablePredicate[], params: Omit<
|
|
20
|
+
handleColumnPredicate(predicate: AdaptableColumnPredicate | undefined, context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
21
|
+
handleColumnPredicates(predicates: AdaptableColumnPredicate[], context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
22
|
+
handlePredicate(predicate: AdaptablePredicate | undefined, context: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
23
|
+
handlePredicates(predicates: AdaptablePredicate[], params: Omit<PredicateDefHandlerContext, 'adaptableApi' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
24
24
|
}
|
|
@@ -70,22 +70,22 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
70
70
|
isEveryPredicateValid(predicates) {
|
|
71
71
|
return predicates.every((predicate) => this.isValidPredicate(predicate));
|
|
72
72
|
}
|
|
73
|
-
handleColumnPredicate(predicate,
|
|
73
|
+
handleColumnPredicate(predicate, context, defaultReturn) {
|
|
74
74
|
if (!predicate.ColumnId) {
|
|
75
|
-
return this.handlePredicate(predicate,
|
|
75
|
+
return this.handlePredicate(predicate, context, defaultReturn);
|
|
76
76
|
}
|
|
77
|
-
const paramsForColumn = Object.assign(Object.assign({},
|
|
77
|
+
const paramsForColumn = Object.assign(Object.assign({}, context), { column: this.adaptable.api.columnApi.getColumnWithColumnId(predicate.ColumnId),
|
|
78
78
|
// value: params?.node?.data?.[predicate.ColumnId],
|
|
79
|
-
value: this.adaptable.api.gridApi.getRawValueFromRowNode(
|
|
79
|
+
value: this.adaptable.api.gridApi.getRawValueFromRowNode(context.node, predicate.ColumnId) });
|
|
80
80
|
if ('oldValue' in paramsForColumn) {
|
|
81
81
|
delete paramsForColumn.oldValue;
|
|
82
82
|
}
|
|
83
83
|
return this.handlePredicate(predicate, paramsForColumn, defaultReturn);
|
|
84
84
|
}
|
|
85
|
-
handleColumnPredicates(predicates,
|
|
86
|
-
return predicates.every((predicate) => this.handleColumnPredicate(predicate,
|
|
85
|
+
handleColumnPredicates(predicates, context, defaultReturn) {
|
|
86
|
+
return predicates.every((predicate) => this.handleColumnPredicate(predicate, context, defaultReturn));
|
|
87
87
|
}
|
|
88
|
-
handlePredicate(predicate,
|
|
88
|
+
handlePredicate(predicate, context, defaultReturn) {
|
|
89
89
|
var _a;
|
|
90
90
|
if (!predicate) {
|
|
91
91
|
return defaultReturn;
|
|
@@ -98,7 +98,7 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
98
98
|
return defaultReturn;
|
|
99
99
|
}
|
|
100
100
|
try {
|
|
101
|
-
return predicateDef.handler(Object.assign({
|
|
101
|
+
return predicateDef.handler(Object.assign({ adaptableApi: this.getAdaptableApi(), inputs: predicate.Inputs }, context));
|
|
102
102
|
}
|
|
103
103
|
catch (error) {
|
|
104
104
|
console.error(`Error in predicate ${predicateDef.label}`, error);
|
|
@@ -6,7 +6,11 @@ import { Glue42Schedule } from '../../PredefinedConfig/Glue42State';
|
|
|
6
6
|
import { IPushPullSchedule } from '../../PredefinedConfig/IPushPullState';
|
|
7
7
|
import { OpenFinSchedule } from '../../PredefinedConfig/OpenFinState';
|
|
8
8
|
import { ReminderSchedule, ScheduleState } from '../../PredefinedConfig/ScheduleState';
|
|
9
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
10
|
+
import { ScheduleInternalApi } from '../Internal/ScheduleInternalApi';
|
|
9
11
|
export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
|
|
12
|
+
internalApi: ScheduleInternalApi;
|
|
13
|
+
constructor(adaptable: IAdaptable);
|
|
10
14
|
getScheduleState(): ScheduleState;
|
|
11
15
|
getSchedules(): BaseSchedule[];
|
|
12
16
|
getReminderSchedules(config?: {
|
|
@@ -5,7 +5,12 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const ScheduleRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ScheduleRedux"));
|
|
8
|
+
const ScheduleInternalApi_1 = require("../Internal/ScheduleInternalApi");
|
|
8
9
|
class ScheduleApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
+
constructor(adaptable) {
|
|
11
|
+
super(adaptable);
|
|
12
|
+
this.internalApi = new ScheduleInternalApi_1.ScheduleInternalApi(adaptable);
|
|
13
|
+
}
|
|
9
14
|
getScheduleState() {
|
|
10
15
|
return this.getAdaptableState().Schedule;
|
|
11
16
|
}
|
|
@@ -17,10 +17,7 @@ export declare class StyledColumnApiImpl extends ApiBase implements StyledColumn
|
|
|
17
17
|
getSuspendedStyledColumns(): StyledColumn[];
|
|
18
18
|
deleteStyledColumn(styledColumn: StyledColumn): void;
|
|
19
19
|
addStyledColumn(styledColumn: StyledColumn): void;
|
|
20
|
-
getCheckBoxStyleStyledColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
21
20
|
isSparklineStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
22
|
-
isCheckBoxStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
23
|
-
fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
|
|
24
21
|
getActiveStyledColumnForColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
25
22
|
hasPercentBarStyle(columnId: string): boolean;
|
|
26
23
|
hasGradientStyle(columnId: string): boolean;
|
|
@@ -4,7 +4,6 @@ exports.StyledColumnApiImpl = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const StyledColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/StyledColumnRedux"));
|
|
7
|
-
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
8
7
|
const StyledColumnInternalApi_1 = require("../Internal/StyledColumnInternalApi");
|
|
9
8
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
10
9
|
class StyledColumnApiImpl extends ApiBase_1.ApiBase {
|
|
@@ -37,37 +36,12 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
37
36
|
addStyledColumn(styledColumn) {
|
|
38
37
|
this.dispatchAction(StyledColumnRedux.StyledColumnAdd(styledColumn));
|
|
39
38
|
}
|
|
40
|
-
getCheckBoxStyleStyledColumn(column) {
|
|
41
|
-
var _a;
|
|
42
|
-
if (column.dataType != 'Boolean') {
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
const checkBoxFormatColumns = (_a = this.getStyledColumnState().StyledColumns) === null || _a === void 0 ? void 0 : _a.filter((sc) => sc === null || sc === void 0 ? void 0 : sc.CheckBoxStyle);
|
|
46
|
-
const styledColumn = checkBoxFormatColumns.find((sc) => sc.ColumnId == column.columnId);
|
|
47
|
-
return styledColumn;
|
|
48
|
-
}
|
|
49
39
|
isSparklineStyleStyledColumn(column) {
|
|
50
40
|
if (!column) {
|
|
51
41
|
return false;
|
|
52
42
|
}
|
|
53
43
|
return !!this.getStyledColumns().find((styledColumn) => !!styledColumn.SparkLineStyle && styledColumn.ColumnId === column.columnId);
|
|
54
44
|
}
|
|
55
|
-
isCheckBoxStyleStyledColumn(column) {
|
|
56
|
-
const styledColumn = this.getCheckBoxStyleStyledColumn(column);
|
|
57
|
-
return Helper_1.default.objectExists(styledColumn);
|
|
58
|
-
}
|
|
59
|
-
fireCheckboxColumnClickedEvent(columnId, rowData, primaryKeyValue, isChecked) {
|
|
60
|
-
let checkboxColumnClickedInfo = {
|
|
61
|
-
adaptableApi: this.adaptable.api,
|
|
62
|
-
column: this.adaptable.api.columnApi.getColumnWithColumnId(columnId),
|
|
63
|
-
rowData: rowData,
|
|
64
|
-
primaryKeyValue: primaryKeyValue,
|
|
65
|
-
isChecked: isChecked,
|
|
66
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
67
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
68
|
-
};
|
|
69
|
-
this.adaptable.api.eventApi.emit('CheckboxColumnClicked', checkboxColumnClickedInfo);
|
|
70
|
-
}
|
|
71
45
|
getActiveStyledColumnForColumn(column) {
|
|
72
46
|
const styledColumns = this.getActiveStyledColumns();
|
|
73
47
|
return styledColumns.find((sc) => sc.ColumnId == column.columnId);
|
|
@@ -5,7 +5,11 @@ import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
|
|
|
5
5
|
import { ColumnMenuContext, ContextMenuContext, UserMenuItem } from '../../PredefinedConfig/Common/Menu';
|
|
6
6
|
import { BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
|
|
7
7
|
import { AdaptableObjectTag, GridCell } from '../../types';
|
|
8
|
+
import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
|
|
9
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
8
10
|
export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfaceApi {
|
|
11
|
+
internalApi: UserInterfaceInternalApi;
|
|
12
|
+
constructor(adaptable: IAdaptable);
|
|
9
13
|
getColorPalette(): string[];
|
|
10
14
|
getStyleClassNames(): string[] | undefined;
|
|
11
15
|
getPermittedValuesItems(): PermittedValues[];
|
|
@@ -25,8 +29,5 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
25
29
|
getEditableCellStyle(): AdaptableStyle | undefined;
|
|
26
30
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
27
31
|
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
28
|
-
getCustomIconDefinition(iconName: string): import("../../types").AdaptableIcon |
|
|
29
|
-
name: string;
|
|
30
|
-
icon: import("../../types").AdaptableIcon;
|
|
31
|
-
};
|
|
32
|
+
getCustomIconDefinition(iconName: string): import("../../types").AdaptableIcon | import("../../types").CustomIcon;
|
|
32
33
|
}
|
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UserInterfaceApiImpl = void 0;
|
|
4
4
|
const ApiBase_1 = require("./ApiBase");
|
|
5
5
|
const ArrayExtensions_1 = require("../../Utilities/Extensions/ArrayExtensions");
|
|
6
|
+
const UserInterfaceInternalApi_1 = require("../Internal/UserInterfaceInternalApi");
|
|
6
7
|
class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
8
|
+
constructor(adaptable) {
|
|
9
|
+
super(adaptable);
|
|
10
|
+
this.internalApi = new UserInterfaceInternalApi_1.UserInterfaceInternalApi(adaptable);
|
|
11
|
+
}
|
|
7
12
|
getColorPalette() {
|
|
8
13
|
let colorPalette = this.getUserInterfaceOptions().colorPalette;
|
|
9
14
|
// first do the function then get hardcoded items
|
|
@@ -11,7 +11,7 @@ const ApiBase_1 = require("../Implementation/ApiBase");
|
|
|
11
11
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
12
12
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
13
13
|
const waitForCondition_1 = require("../../Utilities/waitForCondition");
|
|
14
|
-
const
|
|
14
|
+
const Icon_1 = require("../../components/Icon");
|
|
15
15
|
class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
16
16
|
getSystemState() {
|
|
17
17
|
return this.getAdaptableState().System;
|
|
@@ -182,7 +182,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
182
182
|
if (!buttonIcon) {
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
if ((0,
|
|
185
|
+
if ((0, Icon_1.isAdaptableSystemIcon)(buttonIcon) || (0, Icon_1.isAdaptableCustomIcon)(buttonIcon)) {
|
|
186
186
|
const defaultIconWidth = (_a = defaultWidthHeight === null || defaultWidthHeight === void 0 ? void 0 : defaultWidthHeight.width) !== null && _a !== void 0 ? _a : 'var(--ab-cmp-simple-button__width)';
|
|
187
187
|
const defaultIconHeight = (_b = defaultWidthHeight === null || defaultWidthHeight === void 0 ? void 0 : defaultWidthHeight.height) !== null && _b !== void 0 ? _b : 'var(--ab-cmp-simple-button__height)';
|
|
188
188
|
const buttonIconStyle = Object.assign({}, { width: defaultIconWidth, height: defaultIconHeight }, buttonIcon.style);
|
|
@@ -474,14 +474,19 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
474
474
|
}
|
|
475
475
|
isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
|
|
476
476
|
var _a;
|
|
477
|
-
|
|
477
|
+
const adapatableApi = this.getAdaptableApi();
|
|
478
|
+
const predicateDefHandlerContext = {
|
|
478
479
|
value: dataChangedEvent.newValue,
|
|
479
480
|
oldValue: dataChangedEvent.oldValue,
|
|
480
481
|
// TODO send real display value
|
|
481
482
|
displayValue: null,
|
|
482
483
|
node: dataChangedEvent.rowNode,
|
|
483
484
|
column: dataChangedEvent.column,
|
|
484
|
-
|
|
485
|
+
adaptableApi: adapatableApi,
|
|
486
|
+
userName: adapatableApi.optionsApi.getUserName(),
|
|
487
|
+
adaptableId: adapatableApi.optionsApi.getAdaptableId(),
|
|
488
|
+
};
|
|
489
|
+
return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
|
|
485
490
|
}
|
|
486
491
|
isAlertDefinitionForRowChangeEvent(alertDefinition) {
|
|
487
492
|
return (this.isAlertDefinitionForAddedRowChangeEvent(alertDefinition) ||
|
|
@@ -94,22 +94,26 @@ class FilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
94
94
|
if (someInputsAreEmpty) {
|
|
95
95
|
return true;
|
|
96
96
|
}
|
|
97
|
-
const column = this.
|
|
97
|
+
const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnFilter.ColumnId);
|
|
98
98
|
if (!column) {
|
|
99
99
|
return true;
|
|
100
100
|
}
|
|
101
|
-
const gridCell = this.
|
|
101
|
+
const gridCell = this.getAdaptableApi().gridApi.getGridCellFromRowNode(node, columnFilter.ColumnId);
|
|
102
102
|
if (!gridCell) {
|
|
103
103
|
return true;
|
|
104
104
|
}
|
|
105
105
|
let value = gridCell.normalisedValue;
|
|
106
|
-
|
|
106
|
+
const predicateDefHandlerContext = {
|
|
107
107
|
value: value,
|
|
108
108
|
oldValue: null,
|
|
109
109
|
displayValue: gridCell.displayValue,
|
|
110
110
|
node,
|
|
111
111
|
column,
|
|
112
|
-
|
|
112
|
+
adaptableApi: this.getAdaptableApi(),
|
|
113
|
+
userName: this.getAdaptableApi().optionsApi.getUserName(),
|
|
114
|
+
adaptableId: this.getAdaptableApi().optionsApi.getAdaptableId(),
|
|
115
|
+
};
|
|
116
|
+
return this.adaptable.api.predicateApi.handlePredicate(columnFilter.Predicate, predicateDefHandlerContext, true);
|
|
113
117
|
}
|
|
114
118
|
/**
|
|
115
119
|
* Checks if the filter action should trigger grid filtering.
|
|
@@ -171,12 +171,17 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
171
171
|
}
|
|
172
172
|
// first run the predicate
|
|
173
173
|
if (formatColumn.Rule.Predicates && ((_b = (_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
174
|
-
|
|
175
|
-
formatColumn,
|
|
176
|
-
column,
|
|
174
|
+
const predicateDefHandlerContext = {
|
|
177
175
|
value: params.value,
|
|
176
|
+
oldValue: null,
|
|
177
|
+
displayValue: params.value,
|
|
178
178
|
node: params.node,
|
|
179
|
-
|
|
179
|
+
column: column,
|
|
180
|
+
adaptableApi: this.getAdaptableApi(),
|
|
181
|
+
userName: this.getAdaptableApi().optionsApi.getUserName(),
|
|
182
|
+
adaptableId: this.getAdaptableApi().optionsApi.getAdaptableId(),
|
|
183
|
+
};
|
|
184
|
+
return this.evaluatePredicate(formatColumn, predicateDefHandlerContext);
|
|
180
185
|
}
|
|
181
186
|
else if (formatColumn.Rule.BooleanExpression) {
|
|
182
187
|
return this.evaluateExpression(formatColumn, params.node);
|
|
@@ -184,16 +189,9 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
184
189
|
// nothing has passed then return false
|
|
185
190
|
return false;
|
|
186
191
|
}
|
|
187
|
-
evaluatePredicate(
|
|
192
|
+
evaluatePredicate(formatColumn, predicateDefHandlerContext) {
|
|
188
193
|
var _a;
|
|
189
|
-
|
|
190
|
-
value: value,
|
|
191
|
-
oldValue: null,
|
|
192
|
-
displayValue: value,
|
|
193
|
-
node: node,
|
|
194
|
-
column: column,
|
|
195
|
-
};
|
|
196
|
-
return this.adaptable.api.predicateApi.handleColumnPredicates((_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, params, false);
|
|
194
|
+
return this.adaptable.api.predicateApi.handleColumnPredicates((_a = formatColumn.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, false);
|
|
197
195
|
}
|
|
198
196
|
evaluateExpression(formatColumn, node) {
|
|
199
197
|
const isValidExpression = this.adaptable.api.expressionApi.isValidBooleanExpression(formatColumn.Rule.BooleanExpression, ModuleConstants.FormatColumnModuleId, `Invalid format column rule '${formatColumn.Rule.BooleanExpression}'`);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { BaseSchedule } from '../../PredefinedConfig/Common/Schedule';
|
|
3
|
+
export declare class ScheduleInternalApi extends ApiBase {
|
|
4
|
+
/**
|
|
5
|
+
* Fires Schedule Triggered event
|
|
6
|
+
*/
|
|
7
|
+
fireScheduleTriggeredEvent(schedule: BaseSchedule): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScheduleInternalApi = void 0;
|
|
4
|
+
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
5
|
+
class ScheduleInternalApi extends ApiBase_1.ApiBase {
|
|
6
|
+
/**
|
|
7
|
+
* Fires Schedule Triggered event
|
|
8
|
+
*/
|
|
9
|
+
fireScheduleTriggeredEvent(schedule) {
|
|
10
|
+
const adaptableApi = this.getAdaptableApi();
|
|
11
|
+
const scheduleTriggeredInfo = {
|
|
12
|
+
adaptableApi: adaptableApi,
|
|
13
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
14
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
15
|
+
schedule: schedule,
|
|
16
|
+
};
|
|
17
|
+
adaptableApi.eventApi.emit('ScheduleTriggered', scheduleTriggeredInfo);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.ScheduleInternalApi = ScheduleInternalApi;
|
|
@@ -2,7 +2,7 @@ import { ApiBase } from '../Implementation/ApiBase';
|
|
|
2
2
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { BadgeStyleDefinition, CellColorRange, ColumnComparison, NumericStyledColumn, StyledColumn } from '../../PredefinedConfig/StyledColumnState';
|
|
4
4
|
import { IRowNode } from '@ag-grid-community/core';
|
|
5
|
-
import {
|
|
5
|
+
import { PredicateDefHandlerContext } from '../../types';
|
|
6
6
|
export declare class StyledColumnInternalApi extends ApiBase {
|
|
7
7
|
getMinValueForNumericColumn(column: AdaptableColumn): number | undefined;
|
|
8
8
|
getMaxValueForNumericColumn(column: AdaptableColumn): number | undefined;
|
|
@@ -57,6 +57,9 @@ export declare class StyledColumnInternalApi extends ApiBase {
|
|
|
57
57
|
* @param styledColumn Styled Column to Add
|
|
58
58
|
*/
|
|
59
59
|
hasStyledColumnRelativeCellRange(styledColumn: StyledColumn): boolean;
|
|
60
|
-
getApplicableBadge(styledColumn: StyledColumn,
|
|
60
|
+
getApplicableBadge(styledColumn: StyledColumn, context: PredicateDefHandlerContext): BadgeStyleDefinition | null;
|
|
61
61
|
getBadgePredicateDefsForColumn(columnId: string): import("../../types").AdaptablePredicateDef[];
|
|
62
|
+
getCheckBoxStyleStyledColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
63
|
+
isCheckBoxStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
64
|
+
fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
|
|
62
65
|
}
|