@adaptabletools/adaptable 15.0.3-canary.0 → 15.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs.js +181 -177
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/SearchOptions.d.ts +8 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +7 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -5
- package/src/Api/GridApi.d.ts +14 -6
- package/src/Api/Implementation/GridApiImpl.d.ts +7 -2
- package/src/Api/Implementation/GridApiImpl.js +43 -3
- package/src/Api/Internal/GridInternalApi.js +11 -1
- package/src/Redux/Store/AdaptableStore.js +5 -2
- package/src/Strategy/AlertModule.js +1 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -0
- package/src/Strategy/CustomSortModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +1 -0
- package/src/Strategy/FormatColumnModule.js +1 -0
- package/src/Strategy/Interface/IModule.d.ts +6 -0
- package/src/Strategy/PlusMinusModule.js +1 -0
- package/src/Strategy/ScheduleModule.js +21 -0
- package/src/Strategy/ShortcutModule.js +1 -0
- package/src/Strategy/StyledColumnModule.js +1 -0
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +3 -8
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +27 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +104 -42
- package/src/Utilities/Extensions/NumberExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/NumberExtensions.js +6 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +9 -2
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/TeamSharing/SharedEntityObjectView.d.ts +3 -0
- package/src/View/Theme/ThemePopup.d.ts +1 -1
- package/src/View/Theme/ThemePopup.js +17 -3
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +19 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/evaluator.js +3 -1
- package/src/parser/src/parser.js +496 -453
- package/src/parser/src/types.d.ts +1 -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": "15.
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
"uuid": "^3.3.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@ag-grid-community/core": ">=29.
|
|
59
|
+
"@ag-grid-community/core": ">=29.1.0"
|
|
60
60
|
}
|
|
61
61
|
}
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1680601200247;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -141,7 +141,6 @@ export interface IAdaptable {
|
|
|
141
141
|
setDataSource(dataSource: any): void;
|
|
142
142
|
getGridData(): any[];
|
|
143
143
|
getFilteredData(): any[];
|
|
144
|
-
loadDataSource(dataSource: any): void;
|
|
145
144
|
updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
146
145
|
addRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
147
146
|
deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
@@ -177,6 +176,7 @@ export interface IAdaptable {
|
|
|
177
176
|
getDisplayValueFromRowNode(rowNode: IRowNode, columnId: string): string | undefined;
|
|
178
177
|
getDisplayValueFromRawValue(rowNode: IRowNode, columnId: string, rawValue: any): string | undefined;
|
|
179
178
|
getNormalisedValueFromRawValue(rawValue: any, column: AdaptableColumn): string | number | boolean | Date | unknown;
|
|
179
|
+
getGridCellsForColumn(columnId: string): GridCell[] | undefined;
|
|
180
180
|
getDataRowFromRowNode(rowNode: IRowNode): any;
|
|
181
181
|
getRowNodesForPrimaryKeys(primaryKeyValues: any[]): IRowNode[];
|
|
182
182
|
getRowNodeForPrimaryKey(primaryKeyValue: any): IRowNode;
|
|
@@ -186,4 +186,11 @@ export interface FilterOptions<TData = any> {
|
|
|
186
186
|
* @defaultValue 250
|
|
187
187
|
*/
|
|
188
188
|
quickFilterDebounce?: number;
|
|
189
|
+
/**
|
|
190
|
+
* Show the count of each distinct item for given column in the Values (IN) Filter
|
|
191
|
+
* @defaultValue false
|
|
192
|
+
* @gridInfoItem
|
|
193
|
+
* @noCodeItem
|
|
194
|
+
*/
|
|
195
|
+
showValuesCount?: (column: AdaptableColumn<TData>) => boolean;
|
|
189
196
|
}
|
|
@@ -31,4 +31,12 @@ export interface SearchOptions<TData = any> {
|
|
|
31
31
|
* @noCodeItem
|
|
32
32
|
*/
|
|
33
33
|
filterResultsAfterQuickSearch?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Include Row Groups when Quick Searching (highlight only)
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue false
|
|
38
|
+
* @gridInfoItem
|
|
39
|
+
* @noCodeItem
|
|
40
|
+
*/
|
|
41
|
+
runQuickSearchOnRowGroups?: boolean;
|
|
34
42
|
}
|
|
@@ -49,6 +49,13 @@ export interface TeamSharingOptions {
|
|
|
49
49
|
* @gridInfoItem
|
|
50
50
|
*/
|
|
51
51
|
updateNotification?: 'Alert' | 'AlertWithNotification' | 'SystemStatus';
|
|
52
|
+
/**
|
|
53
|
+
* Suppress warning when an Import overrides existing Config item
|
|
54
|
+
*
|
|
55
|
+
* @defaultValue false
|
|
56
|
+
* @gridInfoItem
|
|
57
|
+
*/
|
|
58
|
+
suppressOverrideConfigWarning?: boolean;
|
|
52
59
|
}
|
|
53
60
|
/**
|
|
54
61
|
* Context provided to `TeamSharingOptions.loadSharedEntities()` callback
|
|
@@ -28,7 +28,7 @@ export interface UserInterfaceOptions<TData = any> {
|
|
|
28
28
|
*/
|
|
29
29
|
dateInputOptions?: DateInputOptions;
|
|
30
30
|
/**
|
|
31
|
-
* List of values which are permitted (e.g. to show in
|
|
31
|
+
* List of values which are permitted (e.g. to show in Filter, Custom Sort etc.)
|
|
32
32
|
*/
|
|
33
33
|
permittedValues?: PermittedValues<TData>[];
|
|
34
34
|
/**
|
|
@@ -118,7 +118,7 @@ export interface EditLookUpPermittedValues<TData = any> extends BasePermittedVal
|
|
|
118
118
|
values?: any[] | ((context: EditLookUpContext<TData>) => any[]);
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* Used to define values inside the
|
|
121
|
+
* Used to define values inside the Filter Bar and Filter Form
|
|
122
122
|
*/
|
|
123
123
|
export interface FilterPermittedValues<TData = any> extends BasePermittedValues {
|
|
124
124
|
/**
|
|
@@ -127,7 +127,7 @@ export interface FilterPermittedValues<TData = any> extends BasePermittedValues
|
|
|
127
127
|
*/
|
|
128
128
|
suppressFilterSearchBar?: boolean;
|
|
129
129
|
/**
|
|
130
|
-
* Values to display in 'IN' Filter
|
|
130
|
+
* Function returning Values to display in 'IN' Filter - can be async
|
|
131
131
|
*/
|
|
132
132
|
values: (context: FilterPermittedValuesContext<TData>) => any[] | Promise<any[]>;
|
|
133
133
|
}
|
|
@@ -136,7 +136,7 @@ export interface FilterPermittedValues<TData = any> extends BasePermittedValues
|
|
|
136
136
|
*/
|
|
137
137
|
export interface CustomSortPermittedValues<TData = any> extends BasePermittedValues {
|
|
138
138
|
/**
|
|
139
|
-
* Values to display in Custom Sort Wizard
|
|
139
|
+
* Function returning Values to display in Custom Sort Wizard - can be async
|
|
140
140
|
*/
|
|
141
141
|
values: (context: PermittedValuesContext<TData>) => any[] | Promise<any[]>;
|
|
142
142
|
}
|
|
@@ -145,7 +145,7 @@ export interface CustomSortPermittedValues<TData = any> extends BasePermittedVal
|
|
|
145
145
|
*/
|
|
146
146
|
export interface BulkUpdatePermittedValues<TData = any> extends BasePermittedValues {
|
|
147
147
|
/**
|
|
148
|
-
* Values to display in Bulk Update Wizard
|
|
148
|
+
* Function returning Values to display in Bulk Update Wizard - can be async
|
|
149
149
|
*/
|
|
150
150
|
values: (context: BulkUpdatePermittedValuesContext<TData>) => any[] | Promise<any[]>;
|
|
151
151
|
}
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -20,11 +20,6 @@ export interface GridApi {
|
|
|
20
20
|
* Returns Grid section from Adaptable State
|
|
21
21
|
*/
|
|
22
22
|
getGridState(): GridState;
|
|
23
|
-
/**
|
|
24
|
-
* Repopulates grid with given data
|
|
25
|
-
* @param data any data from any datasource that is suitable for AG Grid
|
|
26
|
-
*/
|
|
27
|
-
setGridData(data: any[]): void;
|
|
28
23
|
/**
|
|
29
24
|
* Retrieves all data from the grid
|
|
30
25
|
*/
|
|
@@ -34,9 +29,18 @@ export interface GridApi {
|
|
|
34
29
|
*/
|
|
35
30
|
getFilteredData(): any[];
|
|
36
31
|
/**
|
|
37
|
-
*
|
|
32
|
+
* Repopulates grid with given data and fires a 'GridDataChanged' event.
|
|
33
|
+
* @param data any data from any datasource that is suitable for AG Grid
|
|
34
|
+
*/
|
|
35
|
+
setGridData(data: any[]): void;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the grid with the given data. It does NOT fire a 'GridDataChanged' event.
|
|
38
38
|
* @param data any data from any datasource that is suitable for AG Grid
|
|
39
39
|
*/
|
|
40
|
+
setInitialGridData(data: any): void;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
40
44
|
loadGridData(data: any): void;
|
|
41
45
|
/**
|
|
42
46
|
* Updates Adaptable (and AG Grid) with rows that have changed
|
|
@@ -272,6 +276,10 @@ export interface GridApi {
|
|
|
272
276
|
* @param columnId ColumnId to lookup
|
|
273
277
|
*/
|
|
274
278
|
getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
|
|
279
|
+
getGridCellsForRawValue(columnId: string, rawValue: any): GridCell[] | undefined;
|
|
280
|
+
getCellRawValueCount(columnId: string, rawValue: any): number;
|
|
281
|
+
getGridCellsForDisplayValue(columnId: string, displayValue: any): GridCell[] | undefined;
|
|
282
|
+
getCellDisplayValueCount(columnId: string, displayValue: any): number;
|
|
275
283
|
/**
|
|
276
284
|
* Retrieves Formatted Value for a given Raw Value in given Column
|
|
277
285
|
* @param columnId ColumnId to lookup
|
|
@@ -21,9 +21,10 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
21
21
|
constructor(adaptable: IAdaptable);
|
|
22
22
|
getGridState(): GridState;
|
|
23
23
|
setGridData(dataSource: any[]): void;
|
|
24
|
+
setInitialGridData(data: any): void;
|
|
25
|
+
loadGridData(dataSource: any): void;
|
|
24
26
|
getGridData(): any[];
|
|
25
27
|
getFilteredData(): any[];
|
|
26
|
-
loadGridData(dataSource: any): void;
|
|
27
28
|
updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
28
29
|
addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode<any>[]>;
|
|
29
30
|
undoCellEdit(cellDataChangedInfo: CellDataChangedInfo): boolean;
|
|
@@ -70,7 +71,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
70
71
|
getFirstRowNode(): IRowNode;
|
|
71
72
|
getFirstDisplayedRowNode(): IRowNode;
|
|
72
73
|
getVisibleRowNodes(): IRowNode[];
|
|
73
|
-
getAllRowNodes(config
|
|
74
|
+
getAllRowNodes(config?: {
|
|
74
75
|
includeGroupRows?: boolean;
|
|
75
76
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
76
77
|
}): IRowNode[];
|
|
@@ -98,6 +99,10 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
98
99
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
99
100
|
isQuickFilterAvailable(): boolean;
|
|
100
101
|
redrawGrid(): void;
|
|
102
|
+
getGridCellsForRawValue(columnId: string, rawValue: any): GridCell[] | undefined;
|
|
103
|
+
getCellRawValueCount(columnId: string, rawValue: any): number;
|
|
104
|
+
getGridCellsForDisplayValue(columnId: string, displayValue: any): GridCell[] | undefined;
|
|
105
|
+
getCellDisplayValueCount(columnId: string, displayValue: any): number;
|
|
101
106
|
fireGridSortedEvent(): void;
|
|
102
107
|
fireCellChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
103
108
|
fireGridDataChangedEvent(dataRows: any[], rowNodes: IRowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
|
|
@@ -18,6 +18,15 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
18
18
|
}
|
|
19
19
|
setGridData(dataSource) {
|
|
20
20
|
this.adaptable.setDataSource(dataSource);
|
|
21
|
+
const allRowNodes = this.getAllRowNodes();
|
|
22
|
+
this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Add');
|
|
23
|
+
}
|
|
24
|
+
setInitialGridData(data) {
|
|
25
|
+
this.adaptable.setDataSource(data);
|
|
26
|
+
}
|
|
27
|
+
loadGridData(dataSource) {
|
|
28
|
+
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'loadGridData', 'setInitialGridData');
|
|
29
|
+
this.setInitialGridData(dataSource);
|
|
21
30
|
}
|
|
22
31
|
getGridData() {
|
|
23
32
|
return this.adaptable.getGridData();
|
|
@@ -25,9 +34,6 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
25
34
|
getFilteredData() {
|
|
26
35
|
return this.adaptable.getFilteredData();
|
|
27
36
|
}
|
|
28
|
-
loadGridData(dataSource) {
|
|
29
|
-
this.adaptable.loadDataSource(dataSource);
|
|
30
|
-
}
|
|
31
37
|
async updateGridData(dataRows, dataUpdateConfig) {
|
|
32
38
|
const rowNodes = await this.adaptable.updateRows(dataRows, dataUpdateConfig);
|
|
33
39
|
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Edit');
|
|
@@ -338,6 +344,40 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
338
344
|
this.adaptable.redrawBody();
|
|
339
345
|
this.adaptable.redrawHeader();
|
|
340
346
|
}
|
|
347
|
+
getGridCellsForRawValue(columnId, rawValue) {
|
|
348
|
+
const gridCells = this.adaptable.getGridCellsForColumn(columnId);
|
|
349
|
+
if (!gridCells) {
|
|
350
|
+
return undefined;
|
|
351
|
+
}
|
|
352
|
+
const returnValues = [];
|
|
353
|
+
gridCells.forEach((gc) => {
|
|
354
|
+
if (gc.rawValue === rawValue) {
|
|
355
|
+
returnValues.push(gc);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
return returnValues;
|
|
359
|
+
}
|
|
360
|
+
getCellRawValueCount(columnId, rawValue) {
|
|
361
|
+
const gridCells = this.getGridCellsForRawValue(columnId, rawValue);
|
|
362
|
+
return gridCells === null || gridCells === void 0 ? void 0 : gridCells.length;
|
|
363
|
+
}
|
|
364
|
+
getGridCellsForDisplayValue(columnId, displayValue) {
|
|
365
|
+
const gridCells = this.adaptable.getGridCellsForColumn(columnId);
|
|
366
|
+
if (!gridCells) {
|
|
367
|
+
return undefined;
|
|
368
|
+
}
|
|
369
|
+
const returnValues = [];
|
|
370
|
+
gridCells.forEach((gc) => {
|
|
371
|
+
if (gc.displayValue === displayValue) {
|
|
372
|
+
returnValues.push(gc);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
return returnValues;
|
|
376
|
+
}
|
|
377
|
+
getCellDisplayValueCount(columnId, displayValue) {
|
|
378
|
+
const gridCells = this.getGridCellsForDisplayValue(columnId, displayValue);
|
|
379
|
+
return gridCells === null || gridCells === void 0 ? void 0 : gridCells.length;
|
|
380
|
+
}
|
|
341
381
|
fireGridSortedEvent() {
|
|
342
382
|
(0, logDeprecation_1.logDeprecationInternal)(this.adaptable.logger, 'GridApi', 'fireGridSortedEvent');
|
|
343
383
|
this.internalApi.fireGridSortedEvent();
|
|
@@ -6,6 +6,7 @@ const ApiBase_1 = require("../Implementation/ApiBase");
|
|
|
6
6
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
7
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
8
8
|
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
9
|
+
const NumberExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/NumberExtensions"));
|
|
9
10
|
class GridInternalApi extends ApiBase_1.ApiBase {
|
|
10
11
|
/**
|
|
11
12
|
* Fires Grid Sorted Event
|
|
@@ -76,10 +77,19 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, showFilteredRowsOnly, filter);
|
|
80
|
+
let showValuesCount = false;
|
|
81
|
+
const showValuesCountFunction = this.getFilterOptions().showValuesCount;
|
|
82
|
+
if (showValuesCountFunction) {
|
|
83
|
+
showValuesCount = showValuesCountFunction(abColumn);
|
|
84
|
+
}
|
|
79
85
|
return {
|
|
80
86
|
values: this.sortDistinctValues(gridCells, abColumn).map((cv) => {
|
|
87
|
+
const label = showValuesCount
|
|
88
|
+
? cv.displayValue +
|
|
89
|
+
NumberExtensions_1.default.WrapInParentheses(this.getGridApi().getCellDisplayValueCount(abColumn.columnId, cv.displayValue))
|
|
90
|
+
: cv.displayValue;
|
|
81
91
|
return {
|
|
82
|
-
label:
|
|
92
|
+
label: label,
|
|
83
93
|
value: cv.normalisedValue,
|
|
84
94
|
};
|
|
85
95
|
}),
|
|
@@ -751,7 +751,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
751
751
|
let returnAction;
|
|
752
752
|
// needs to be called before 'next' so previous and next column filters are known
|
|
753
753
|
const shouldTriggerGridFiltering = adaptable.api.filterApi.internalApi.shouldNewColumnFilterTriggerGridFiltering(action);
|
|
754
|
-
|
|
754
|
+
const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
|
|
755
|
+
if (((_g = adaptable.adaptableOptions.layoutOptions) === null || _g === void 0 ? void 0 : _g.autoSaveLayouts) &&
|
|
756
|
+
!currentLayout.IsReadOnly) {
|
|
755
757
|
returnAction = next(action);
|
|
756
758
|
}
|
|
757
759
|
else {
|
|
@@ -1353,7 +1355,8 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1353
1355
|
.getTeamSharingService()
|
|
1354
1356
|
.buildSharedEntityImportActions(actionTyped.SharedEntity);
|
|
1355
1357
|
const processImportAction = TeamSharingRedux.TeamSharingProcessImport(importStepActions);
|
|
1356
|
-
if (needsOverwriteConfirmation
|
|
1358
|
+
if (needsOverwriteConfirmation &&
|
|
1359
|
+
!adaptable.api.optionsApi.getTeamSharingOptions().suppressOverrideConfigWarning) {
|
|
1357
1360
|
let confirmation = {
|
|
1358
1361
|
CancelButtonText: 'Cancel Import',
|
|
1359
1362
|
Header: 'Overwriting Existing Object',
|
|
@@ -244,6 +244,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
244
244
|
getViewProperties() {
|
|
245
245
|
return {
|
|
246
246
|
getDeleteAction: AlertRedux.AlertDefinitionDelete,
|
|
247
|
+
getEditAction: AlertRedux.AlertDefinitionEdit,
|
|
247
248
|
getSuspendAction: AlertRedux.AlertDefinitionSuspend,
|
|
248
249
|
getUnSuspendAction: AlertRedux.AlertDefinitionUnSuspend,
|
|
249
250
|
getSuspendAllAction: AlertRedux.AlertDefinitionSuspendAll,
|
|
@@ -20,6 +20,7 @@ export declare class CustomSortModule extends AdaptableModuleBase implements IMo
|
|
|
20
20
|
toView(customSort: CustomSort): AdaptableObjectView;
|
|
21
21
|
toViewAll(): AdaptableObjectView[];
|
|
22
22
|
getViewProperties(): {
|
|
23
|
+
getEditAction: (customSort: CustomSort) => CustomSortRedux.CustomSortEditAction;
|
|
23
24
|
getDeleteAction: (customSort: CustomSort) => CustomSortRedux.CustomSortDeleteAction;
|
|
24
25
|
getSuspendAction: (customSort: CustomSort) => CustomSortRedux.CustomSortDeleteAction;
|
|
25
26
|
getUnSuspendAction: (customSort: CustomSort) => CustomSortRedux.CustomSortDeleteAction;
|
|
@@ -67,6 +67,7 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
67
67
|
}
|
|
68
68
|
getViewProperties() {
|
|
69
69
|
return {
|
|
70
|
+
getEditAction: CustomSortRedux.CustomSortEdit,
|
|
70
71
|
getDeleteAction: CustomSortRedux.CustomSortDelete,
|
|
71
72
|
getSuspendAction: CustomSortRedux.CustomSortSuspend,
|
|
72
73
|
getUnSuspendAction: CustomSortRedux.CustomSortUnSuspend,
|
|
@@ -252,6 +252,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
252
252
|
}
|
|
253
253
|
getViewProperties() {
|
|
254
254
|
return {
|
|
255
|
+
getEditAction: FlashingCellRedux.FlashingCellDefinitionEdit,
|
|
255
256
|
getSuspendAction: FlashingCellRedux.FlashingCellDefinitionSuspend,
|
|
256
257
|
getUnSuspendAction: FlashingCellRedux.FlashingCellDefinitionUnSuspend,
|
|
257
258
|
getSuspendAllAction: FlashingCellRedux.FlashingCellDefinitionSuspendAll,
|
|
@@ -158,6 +158,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
158
158
|
getViewProperties() {
|
|
159
159
|
return {
|
|
160
160
|
actions: [MoveFormatColumn_1.MoveFormatColumn],
|
|
161
|
+
getEditAction: FormatColumnRedux.FormatColumnEdit,
|
|
161
162
|
getDeleteAction: FormatColumnRedux.FormatColumnDelete,
|
|
162
163
|
getSuspendAction: FormatColumnRedux.FormatColumnSuspend,
|
|
163
164
|
getUnSuspendAction: FormatColumnRedux.FormatColumnUnSuspend,
|
|
@@ -44,6 +44,11 @@ export interface AdaptableObjectItemView {
|
|
|
44
44
|
*/
|
|
45
45
|
view?: React.FunctionComponent<React.PropsWithChildren<{
|
|
46
46
|
data: AdaptableObject | SuspendableObject;
|
|
47
|
+
module?: IModule;
|
|
48
|
+
}>> | React.ReactElement;
|
|
49
|
+
viewAfter?: React.FunctionComponent<React.PropsWithChildren<{
|
|
50
|
+
data: AdaptableObject | SuspendableObject;
|
|
51
|
+
module?: IModule;
|
|
47
52
|
}>> | React.ReactElement;
|
|
48
53
|
/**
|
|
49
54
|
* Values used for the component.
|
|
@@ -96,6 +101,7 @@ export interface AdaptableModuleView {
|
|
|
96
101
|
getUnSuspendAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
97
102
|
getCompactSuspendAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
98
103
|
getCompactUnSuspendAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
104
|
+
getEditAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
99
105
|
getSuspendAllAction?: () => Redux.Action;
|
|
100
106
|
getUnSuspendAllAction?: () => Redux.Action;
|
|
101
107
|
getDeleteAllAction?: () => Redux.Action;
|
|
@@ -207,6 +207,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
207
207
|
}
|
|
208
208
|
getViewProperties() {
|
|
209
209
|
return {
|
|
210
|
+
getEditAction: PlusMinusRedux.PlusMinusNudgeEdit,
|
|
210
211
|
getDeleteAction: PlusMinusRedux.PlusMinusNudgeDelete,
|
|
211
212
|
getSuspendAction: PlusMinusRedux.PlusMinusNudgeSuspend,
|
|
212
213
|
getUnSuspendAction: PlusMinusRedux.PlusMinusNudgeUnSuspend,
|
|
@@ -196,6 +196,27 @@ class ScheduleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
196
196
|
}
|
|
197
197
|
return {
|
|
198
198
|
abObjectTypes,
|
|
199
|
+
getEditAction: (schedule) => {
|
|
200
|
+
let editAction = null;
|
|
201
|
+
switch (schedule.ScheduleType) {
|
|
202
|
+
case Enums_1.ScheduleType.Reminder:
|
|
203
|
+
editAction = ScheduleRedux.ReminderScheduleEdit(schedule);
|
|
204
|
+
break;
|
|
205
|
+
case Enums_1.ScheduleType.Report:
|
|
206
|
+
editAction = ScheduleRedux.ReportScheduleEdit(schedule);
|
|
207
|
+
break;
|
|
208
|
+
case Enums_1.ScheduleType.ipushpull:
|
|
209
|
+
editAction = ScheduleRedux.IPushPullScheduleEdit(schedule);
|
|
210
|
+
break;
|
|
211
|
+
case Enums_1.ScheduleType.Glue42:
|
|
212
|
+
editAction = ScheduleRedux.Glue42ScheduleEdit(schedule);
|
|
213
|
+
break;
|
|
214
|
+
case Enums_1.ScheduleType.OpenFin:
|
|
215
|
+
editAction = ScheduleRedux.OpenFinScheduleEdit(schedule);
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
return editAction;
|
|
219
|
+
},
|
|
199
220
|
getDeleteAction: (schedule) => {
|
|
200
221
|
let deleteAction = null;
|
|
201
222
|
switch (schedule.ScheduleType) {
|
|
@@ -89,6 +89,7 @@ class ShortcutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
89
89
|
}
|
|
90
90
|
getViewProperties() {
|
|
91
91
|
return {
|
|
92
|
+
getEditAction: ShortcutRedux.ShortcutEdit,
|
|
92
93
|
getDeleteAction: ShortcutRedux.ShortcutDelete,
|
|
93
94
|
getSuspendAction: ShortcutRedux.ShortcutSuspend,
|
|
94
95
|
getUnSuspendAction: ShortcutRedux.ShortcutUnSuspend,
|
|
@@ -207,6 +207,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
207
207
|
}
|
|
208
208
|
getViewProperties() {
|
|
209
209
|
return {
|
|
210
|
+
getEditAction: StyledColumnRedux.StyledColumnEdit,
|
|
210
211
|
getDeleteAction: StyledColumnRedux.StyledColumnDelete,
|
|
211
212
|
getSuspendAction: StyledColumnRedux.StyledColumnSuspend,
|
|
212
213
|
getUnSuspendAction: StyledColumnRedux.StyledColumnUnSuspend,
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export declare const getAlertBehaviourViewItems: (api: AdaptableApi) =>
|
|
4
|
-
name: string;
|
|
5
|
-
view: React.FunctionComponent<React.PropsWithChildren<{
|
|
6
|
-
data: AlertDefinition;
|
|
7
|
-
}>>;
|
|
8
|
-
};
|
|
1
|
+
import { AdaptableApi } from '../../../types';
|
|
2
|
+
import { AdaptableObjectItemView } from '../../Interface/IModule';
|
|
3
|
+
export declare const getAlertBehaviourViewItems: (api: AdaptableApi) => AdaptableObjectItemView;
|
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getObjectTagsViewItems = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
7
|
+
const react_redux_1 = require("react-redux");
|
|
4
8
|
const getObjectTagsViewItems = (object, api) => {
|
|
5
|
-
var _a, _b;
|
|
9
|
+
var _a, _b, _c, _d;
|
|
6
10
|
if (!api.internalApi.shouldDisplayTagSections() || !((_a = object === null || object === void 0 ? void 0 : object.Tags) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
7
11
|
return;
|
|
8
12
|
}
|
|
13
|
+
const currentLayoutName = api.layoutApi.getCurrentLayoutName();
|
|
14
|
+
const hasCurrentLayoutAsTag = (_c = ((_b = object === null || object === void 0 ? void 0 : object.Tags) !== null && _b !== void 0 ? _b : [])) === null || _c === void 0 ? void 0 : _c.includes(currentLayoutName);
|
|
9
15
|
return {
|
|
10
16
|
name: 'Tags',
|
|
11
|
-
values: (
|
|
17
|
+
values: (_d = object === null || object === void 0 ? void 0 : object.Tags) === null || _d === void 0 ? void 0 : _d.map((tag) => api.internalApi.getLabelForTag(tag)),
|
|
18
|
+
viewAfter: (props) => {
|
|
19
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
20
|
+
const viewOptions = props.module.getViewProperties();
|
|
21
|
+
const handleToggleTag = react_1.default.useCallback(() => {
|
|
22
|
+
var _a;
|
|
23
|
+
let tags = (_a = props.data.Tags) !== null && _a !== void 0 ? _a : [];
|
|
24
|
+
if (hasCurrentLayoutAsTag) {
|
|
25
|
+
// remove layout
|
|
26
|
+
tags = tags.filter((tag) => tag !== currentLayoutName);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
tags.push(currentLayoutName);
|
|
30
|
+
}
|
|
31
|
+
const newObject = Object.assign(Object.assign({}, props.data), { Tags: tags });
|
|
32
|
+
const editAction = viewOptions.getEditAction(newObject);
|
|
33
|
+
dispatch(editAction);
|
|
34
|
+
}, [hasCurrentLayoutAsTag, props.data]);
|
|
35
|
+
return (react_1.default.createElement(SimpleButton_1.default, { onClick: handleToggleTag, mt: 1, icon: hasCurrentLayoutAsTag ? 'minus' : 'plus' }, hasCurrentLayoutAsTag ? 'Remove from Layout' : 'Add to Layout'));
|
|
36
|
+
},
|
|
12
37
|
};
|
|
13
38
|
};
|
|
14
39
|
exports.getObjectTagsViewItems = getObjectTagsViewItems;
|
|
@@ -214,9 +214,11 @@ exports.DefaultAdaptableOptions = {
|
|
|
214
214
|
showSuspendFilterButton: false,
|
|
215
215
|
quickFilterWildcards: {},
|
|
216
216
|
quickFilterDebounce: 250,
|
|
217
|
+
showValuesCount: undefined,
|
|
217
218
|
},
|
|
218
219
|
searchOptions: {
|
|
219
220
|
excludeColumnFromQuickSearch: undefined,
|
|
221
|
+
runQuickSearchOnRowGroups: false,
|
|
220
222
|
clearSearchesOnStartUp: false,
|
|
221
223
|
quickSearchPlaceholder: 'Search',
|
|
222
224
|
filterResultsAfterQuickSearch: false,
|
|
@@ -237,6 +239,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
237
239
|
saveSharedEntities: (sharedEntities) => sharedEntities,
|
|
238
240
|
updateInterval: 0,
|
|
239
241
|
updateNotification: undefined,
|
|
242
|
+
suppressOverrideConfigWarning: false,
|
|
240
243
|
},
|
|
241
244
|
userInterfaceOptions: {
|
|
242
245
|
applicationIcon: undefined,
|
|
@@ -17,7 +17,7 @@ exports.booleanExpressionFunctions = {
|
|
|
17
17
|
category: 'logical',
|
|
18
18
|
returnType: 'boolean',
|
|
19
19
|
signatures: ['TRUE'],
|
|
20
|
-
examples: ['TRUE'],
|
|
20
|
+
examples: ['[column] = TRUE'],
|
|
21
21
|
},
|
|
22
22
|
FALSE: {
|
|
23
23
|
handler: () => {
|
|
@@ -27,7 +27,7 @@ exports.booleanExpressionFunctions = {
|
|
|
27
27
|
category: 'logical',
|
|
28
28
|
returnType: 'boolean',
|
|
29
29
|
signatures: ['FALSE'],
|
|
30
|
-
examples: ['FALSE'],
|
|
30
|
+
examples: ['[column] = FALSE'],
|
|
31
31
|
},
|
|
32
32
|
AND: {
|
|
33
33
|
handler(args) {
|
|
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Scalar Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
5
|
-
export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK';
|
|
5
|
+
export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'NULL' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
7
|
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|