@adaptabletools/adaptable 14.0.0-canary.3 → 14.0.1-canary.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 +196 -191
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +5 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +16 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +4 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +1 -0
- package/src/AdaptableOptions/ChartingOptions.d.ts +1 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +3 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +3 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -0
- package/src/AdaptableOptions/ExpressionOptions.d.ts +15 -15
- package/src/AdaptableOptions/FilterOptions.d.ts +9 -8
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +0 -11
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -9
- package/src/AdaptableOptions/LayoutOptions.d.ts +2 -7
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -0
- package/src/AdaptableOptions/SearchOptions.d.ts +1 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +2 -0
- package/src/AdaptableOptions/StateOptions.d.ts +0 -4
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -0
- package/src/Api/AlertApi.d.ts +3 -3
- package/src/Api/EventApi.d.ts +8 -8
- package/src/Api/GridApi.d.ts +5 -5
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +6 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +2 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +7 -0
- package/src/Api/Internal/AdaptableInternalApi.js +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +1 -2
- package/src/Api/Internal/PredicateInternalApi.js +0 -7
- package/src/Api/Internal/TeamSharingInternalApi.d.ts +0 -5
- package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
- package/src/Api/StyledColumnApi.d.ts +7 -2
- package/src/Api/TeamSharingApi.d.ts +8 -0
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -6
- package/src/PredefinedConfig/Common/Menu.d.ts +5 -5
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +6 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +2 -3
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -6
- package/src/Strategy/FreeTextColumnModule.js +24 -5
- package/src/Strategy/StyledColumnModule.js +60 -28
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +0 -3
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +11 -10
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +11 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +26 -52
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +13 -13
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +101 -44
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
- package/src/View/Dashboard/CustomToolbarWrapper.js +7 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +18 -10
- package/src/agGrid/Adaptable.d.ts +0 -1
- package/src/agGrid/Adaptable.js +10 -21
- package/src/agGrid/agGridHelper.js +3 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +42 -7
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +5 -5
- package/src/components/ExpressionEditor/editorButtonsSearch.js +8 -12
- package/src/metamodel/adaptable.metamodel.d.ts +106 -58
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +5 -9
- package/src/parser/src/utils.js +6 -3
- package/src/types.d.ts +3 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -40,7 +40,7 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
|
|
|
40
40
|
editAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
|
|
41
41
|
suspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
|
|
42
42
|
unSuspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
|
|
43
|
-
|
|
43
|
+
evaluateAlertDefinitions(alertDefinitions: AlertDefinition[]): void;
|
|
44
44
|
findAlertDefinitions(criteria: AdaptableObjectLookupCriteria): AlertDefinition[];
|
|
45
45
|
private getRelevantColumnIdsForAlertDefinition;
|
|
46
46
|
private createCellDataChangeInfoStubs;
|
|
@@ -181,7 +181,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
181
181
|
this.dispatchAction(AlertRedux.AlertDefinitionUnSuspend(alertDefinition));
|
|
182
182
|
return this.getAlertDefinitionById(alertDefinition.Uuid);
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
evaluateAlertDefinitions(alertDefinitions) {
|
|
185
185
|
const filterScopeAllDefinitions = (alertDefinition) => {
|
|
186
186
|
if (this.getAdaptableApi().scopeApi.scopeIsAll(alertDefinition.Scope) &&
|
|
187
187
|
!this.getAdaptableApi().queryLanguageApi.getAdaptableQueryExpression(alertDefinition.Rule)) {
|
|
@@ -240,7 +240,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
240
240
|
}, [{}]);
|
|
241
241
|
let preparedClearSelection = clearSelection;
|
|
242
242
|
rowRanges.forEach((range) => {
|
|
243
|
-
// clear only on
|
|
243
|
+
// clear only on first range selection
|
|
244
244
|
this.adaptable.selectCells(preapredGridCellRange.columnIds, range.startNode, range.endNode, preparedClearSelection);
|
|
245
245
|
preparedClearSelection = false;
|
|
246
246
|
});
|
|
@@ -22,6 +22,7 @@ export declare class StyledColumnApiImpl extends ApiBase implements StyledColumn
|
|
|
22
22
|
deleteStyledColumn(styledColumn: StyledColumn): void;
|
|
23
23
|
addStyledColumn(styledColumn: StyledColumn): void;
|
|
24
24
|
getCheckBoxStyleStyledColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
25
|
+
isSparklineStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
25
26
|
isCheckBoxStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
26
27
|
fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
|
|
27
28
|
getActiveStyledColumnForColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
@@ -62,6 +62,12 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
62
62
|
const styledColumn = checkBoxFormatColumns.find((sc) => sc.ColumnId == column.columnId);
|
|
63
63
|
return styledColumn;
|
|
64
64
|
}
|
|
65
|
+
isSparklineStyleStyledColumn(column) {
|
|
66
|
+
if (!column) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return !!this.getStyledColumns().find((styledColumn) => !!styledColumn.SparkLineStyle && styledColumn.ColumnId === column.columnId);
|
|
70
|
+
}
|
|
65
71
|
isCheckBoxStyleStyledColumn(column) {
|
|
66
72
|
const styledColumn = this.getCheckBoxStyleStyledColumn(column);
|
|
67
73
|
return Helper_1.default.objectExists(styledColumn);
|
|
@@ -18,4 +18,6 @@ export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingAp
|
|
|
18
18
|
importSharedEntry(sharedEntity: SharedEntity): void;
|
|
19
19
|
private getTeamSharingState;
|
|
20
20
|
getLoadedSharedEntities(): SharedEntity[];
|
|
21
|
+
refreshTeamSharing(): void;
|
|
22
|
+
triggerLoadingTeamSharingEntries(): void;
|
|
21
23
|
}
|
|
@@ -76,5 +76,12 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
|
76
76
|
getLoadedSharedEntities() {
|
|
77
77
|
return this.getTeamSharingState().SharedEntities;
|
|
78
78
|
}
|
|
79
|
+
refreshTeamSharing() {
|
|
80
|
+
this.dispatchAction(TeamSharingRedux.TeamSharingGet());
|
|
81
|
+
}
|
|
82
|
+
triggerLoadingTeamSharingEntries() {
|
|
83
|
+
(0, logDeprecation_1.logDeprecation)('TeamSharingApi', 'triggerLoadingTeamSharingEntries', 'refreshTeamSharing');
|
|
84
|
+
this.refreshTeamSharing();
|
|
85
|
+
}
|
|
79
86
|
}
|
|
80
87
|
exports.TeamSharingApiImpl = TeamSharingApiImpl;
|
|
@@ -231,7 +231,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
231
231
|
createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
232
232
|
const createComponentFn = () =>
|
|
233
233
|
// delegate the logic to framework wrapper
|
|
234
|
-
this.adaptable.
|
|
234
|
+
this.adaptable._emitSync('FrameworkComponentChange', {
|
|
235
235
|
command: 'create',
|
|
236
236
|
containerDomNode,
|
|
237
237
|
frameworkComponent,
|
|
@@ -249,7 +249,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
destroyFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
252
|
-
this.adaptable.
|
|
252
|
+
this.adaptable._emitSync('FrameworkComponentChange', {
|
|
253
253
|
command: 'destroy',
|
|
254
254
|
containerDomNode,
|
|
255
255
|
frameworkComponent,
|
|
@@ -93,8 +93,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
93
93
|
* Returns true if Layouts will contain Expanded Row Groups information
|
|
94
94
|
*/
|
|
95
95
|
areExpandedRowGroupsSavedInLayouts() {
|
|
96
|
-
return
|
|
97
|
-
this.getLayoutOptions().displayRowGroups === 'dynamic');
|
|
96
|
+
return this.getLayoutOptions().displayRowGroups === 'dynamic';
|
|
98
97
|
}
|
|
99
98
|
/**
|
|
100
99
|
* Checks if the draft layout and the current layout are the same.
|
|
@@ -22,13 +22,6 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
|
|
|
22
22
|
].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
|
|
23
23
|
}
|
|
24
24
|
getSystemFilterPredicateIds() {
|
|
25
|
-
// for now we still need to get the old ones in case they have been provided
|
|
26
|
-
// however they have been deprectated and they are not populated by AdapTable
|
|
27
|
-
const oldSystemFilterPredicates = this.getFilterOptions().systemFilters;
|
|
28
|
-
if (oldSystemFilterPredicates) {
|
|
29
|
-
return oldSystemFilterPredicates;
|
|
30
|
-
}
|
|
31
|
-
// if old list not provided use the new property in Predicate Options
|
|
32
25
|
const systemFilterPredicates = this.getAdaptableQLOptions().predicateOptions.systemFilterPredicates;
|
|
33
26
|
if (typeof systemFilterPredicates === 'function') {
|
|
34
27
|
const systemPredicateContext = {
|
|
@@ -6,11 +6,6 @@ export declare class TeamSharingInternalApi extends ApiBase {
|
|
|
6
6
|
* @param sharedEntity Entity that has been changed
|
|
7
7
|
*/
|
|
8
8
|
fireTeamSharingEntityChangedEvent(sharedEntity: SharedEntity): void;
|
|
9
|
-
/**
|
|
10
|
-
* Trigger loading of shared entries.
|
|
11
|
-
* By default shared entries are loaded when the Team Sharing popup is visible.
|
|
12
|
-
*/
|
|
13
|
-
triggerLoadingTeamSharingEntries(): void;
|
|
14
9
|
/**
|
|
15
10
|
* Retrieves shared entry dependencies.
|
|
16
11
|
*/
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TeamSharingInternalApi = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
6
|
-
const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/TeamSharingRedux"));
|
|
7
5
|
class TeamSharingInternalApi extends ApiBase_1.ApiBase {
|
|
8
6
|
/**
|
|
9
7
|
* Fires the Team Sharing Entity Changed Event
|
|
@@ -18,13 +16,6 @@ class TeamSharingInternalApi extends ApiBase_1.ApiBase {
|
|
|
18
16
|
this.getAdaptableApi().eventApi.emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Trigger loading of shared entries.
|
|
23
|
-
* By default shared entries are loaded when the Team Sharing popup is visible.
|
|
24
|
-
*/
|
|
25
|
-
triggerLoadingTeamSharingEntries() {
|
|
26
|
-
this.dispatchAction(TeamSharingRedux.TeamSharingGet());
|
|
27
|
-
}
|
|
28
19
|
/**
|
|
29
20
|
* Retrieves shared entry dependencies.
|
|
30
21
|
*/
|
|
@@ -53,15 +53,20 @@ export interface StyledColumnApi {
|
|
|
53
53
|
*/
|
|
54
54
|
getCheckBoxStyleStyledColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
55
55
|
/**
|
|
56
|
-
* Checks whether Column with given `columnId` has a PercentBar Style applied
|
|
56
|
+
* Checks whether Column with given `columnId` has a PercentBar Style applied
|
|
57
57
|
* @param columnId column ID
|
|
58
58
|
*/
|
|
59
59
|
hasPercentBarStyle(columnId: string): boolean;
|
|
60
60
|
/**
|
|
61
|
-
* Checks whether Column with given `columnId` has a Gradient Style applied
|
|
61
|
+
* Checks whether Column with given `columnId` has a Gradient Style applied
|
|
62
62
|
* @param columnId column ID
|
|
63
63
|
*/
|
|
64
64
|
hasGradientStyle(columnId: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Checks whether Column is a Sparkline Column
|
|
67
|
+
* @param columnId column ID
|
|
68
|
+
*/
|
|
69
|
+
isSparklineStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
65
70
|
/**
|
|
66
71
|
* Whether given column is a (boolean) checkbox column
|
|
67
72
|
* @param columnId column to check
|
|
@@ -53,6 +53,10 @@ export interface TeamSharingApi {
|
|
|
53
53
|
* Retrieves already loaded shared entries.
|
|
54
54
|
*/
|
|
55
55
|
getLoadedSharedEntities(): SharedEntity[];
|
|
56
|
+
/**
|
|
57
|
+
* Refreshes the local TeamSharing state by (re)loading the remote state.
|
|
58
|
+
*/
|
|
59
|
+
refreshTeamSharing(): void;
|
|
56
60
|
/**
|
|
57
61
|
* TO BE REMOVED
|
|
58
62
|
*/
|
|
@@ -60,4 +64,8 @@ export interface TeamSharingApi {
|
|
|
60
64
|
*@deprecated use `openTeamSharingSettingsPanel()` instead
|
|
61
65
|
*/
|
|
62
66
|
showTeamSharingPopup(): void;
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated use `refreshTeamSharing()` instead
|
|
69
|
+
*/
|
|
70
|
+
triggerLoadingTeamSharingEntries(): void;
|
|
63
71
|
}
|
|
@@ -141,4 +141,4 @@ export declare type SystemAlertPredicateIds = SystemAlertPredicateId[];
|
|
|
141
141
|
/**
|
|
142
142
|
* List of System Predicates available for Alerts
|
|
143
143
|
*/
|
|
144
|
-
export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'IsNotNumeric' | 'AddedRow' | 'RemovedRow' | 'Any';
|
|
144
|
+
export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'IsNotNumeric' | 'AddedRow' | 'RemovedRow' | 'Values' | 'ExcludeValues' | 'Any';
|
|
@@ -27,20 +27,16 @@ export interface CalculatedColumn extends AdaptableObject {
|
|
|
27
27
|
/**
|
|
28
28
|
* Additional optional properties for Column (e.g. filterable, resizable)
|
|
29
29
|
*/
|
|
30
|
-
CalculatedColumnSettings
|
|
30
|
+
CalculatedColumnSettings: CalculatedColumnSettings;
|
|
31
31
|
/**
|
|
32
32
|
* Scalar/AggregatedScalar Query used by AdapTableQL to evaluate Column's value
|
|
33
33
|
*/
|
|
34
34
|
Query: AdaptableCalculatedColumnQuery;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Set
|
|
37
|
+
* Set properties that define Calculated Column's behaviour (all optional except DataType)
|
|
38
38
|
*/
|
|
39
39
|
export interface CalculatedColumnSettings extends SpecialColumnSettings {
|
|
40
|
-
/**
|
|
41
|
-
* Expression's return value DataType; inferred by AdapTable but settable by User
|
|
42
|
-
*/
|
|
43
|
-
DataType: 'String' | 'Number' | 'Boolean' | 'Date';
|
|
44
40
|
/**
|
|
45
41
|
* Show underlying Expression as ToolTip when hovering over a cell
|
|
46
42
|
* @defaultValue false
|
|
@@ -40,23 +40,23 @@ export interface AdaptableMenuItem {
|
|
|
40
40
|
subItems?: AdaptableMenuItem[];
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* Menu Item which is added to Column
|
|
43
|
+
* Menu Item which is added to Column or Context Menu - can contain sub items
|
|
44
44
|
*/
|
|
45
45
|
export interface UserMenuItem<CONTEXT_TYPE extends BaseContext> {
|
|
46
46
|
/**
|
|
47
|
-
* Text
|
|
47
|
+
* Text to appear in the Menu Item
|
|
48
48
|
*/
|
|
49
49
|
label: string | ((context: CONTEXT_TYPE) => string);
|
|
50
50
|
/**
|
|
51
|
-
* Function
|
|
51
|
+
* Function invoked when the Menu Item is clicked
|
|
52
52
|
*/
|
|
53
53
|
onClick?: (menuContext: CONTEXT_TYPE) => void;
|
|
54
54
|
/**
|
|
55
|
-
* Function
|
|
55
|
+
* Function evaluating whether Menu Item is visible
|
|
56
56
|
*/
|
|
57
57
|
hidden?: (menuContext: CONTEXT_TYPE) => boolean;
|
|
58
58
|
/**
|
|
59
|
-
* Function
|
|
59
|
+
* Function evaluating whether Menu Item is enabled
|
|
60
60
|
*/
|
|
61
61
|
disabled?: (menuContext: CONTEXT_TYPE) => boolean;
|
|
62
62
|
/**
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Base Settings for Calculated
|
|
2
|
+
* Base Settings for both Calculated and FreeText Columns
|
|
3
3
|
*/
|
|
4
4
|
export interface SpecialColumnSettings {
|
|
5
|
+
/**
|
|
6
|
+
* Expression's return value DataType; inferred by AdapTable but settable by User
|
|
7
|
+
*/
|
|
8
|
+
DataType: 'String' | 'Number' | 'Boolean' | 'Date';
|
|
5
9
|
/**
|
|
6
10
|
* Preferred (pixel) Column Width; if unset, calculated dynamically by AG Grid
|
|
7
11
|
*/
|
|
@@ -47,7 +51,7 @@ export interface SpecialColumnSettings {
|
|
|
47
51
|
*/
|
|
48
52
|
SuppressMovable?: boolean;
|
|
49
53
|
/**
|
|
50
|
-
* Custom column types
|
|
54
|
+
* Custom column types added to AG Grid Column Types when object is created
|
|
51
55
|
*/
|
|
52
56
|
ColumnTypes?: string[];
|
|
53
57
|
/**
|
|
@@ -24,8 +24,7 @@ export interface FormatColumn extends SuspendableObject {
|
|
|
24
24
|
*/
|
|
25
25
|
Scope: AdaptableScope;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* When not defined the format column is always applied.
|
|
27
|
+
* Rule used to decide whether to apply the Format; if undefined Format is always applied
|
|
29
28
|
*/
|
|
30
29
|
Rule?: FormatColumnRule;
|
|
31
30
|
/**
|
|
@@ -66,7 +65,7 @@ export declare type SystemFormatColumnPredicateIds = SystemFormatColumnPredicate
|
|
|
66
65
|
/**
|
|
67
66
|
* List of System Predicates available for Format Columns
|
|
68
67
|
*/
|
|
69
|
-
export declare type SystemFormatColumnPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False';
|
|
68
|
+
export declare type SystemFormatColumnPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'Values' | 'ExcludeValues';
|
|
70
69
|
/**
|
|
71
70
|
* Special Style used when Formatting Columns: Gradient, PercentBar or CheckBox
|
|
72
71
|
*
|
|
@@ -35,15 +35,10 @@ export interface FreeTextColumn extends AdaptableObject {
|
|
|
35
35
|
* * @defaultValue 'Inline'
|
|
36
36
|
*/
|
|
37
37
|
TextEditor?: 'Inline' | 'Large';
|
|
38
|
-
/**
|
|
39
|
-
* Whether Column is String, Number, Boolean or Date
|
|
40
|
-
* @defaultValue 'String'
|
|
41
|
-
*/
|
|
42
|
-
DataType: 'String' | 'Number' | 'Boolean' | 'Date';
|
|
43
38
|
/**
|
|
44
39
|
* Additional optional properties for Column (e.g. filterable, resizable)
|
|
45
40
|
*/
|
|
46
|
-
FreeTextColumnSettings
|
|
41
|
+
FreeTextColumnSettings: FreeTextColumnSettings;
|
|
47
42
|
}
|
|
48
43
|
/**
|
|
49
44
|
* Defines a cell value stored in a Free Text Column
|
|
@@ -25,10 +25,29 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
25
25
|
// make sure all default to type string
|
|
26
26
|
const allFreeTextColumns = this.getModuleAdaptableObjects();
|
|
27
27
|
for (const freeTextColumn of allFreeTextColumns) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const unTypedCol = freeTextColumn;
|
|
29
|
+
if (unTypedCol.DataType) {
|
|
30
|
+
const dataType = unTypedCol.DataType;
|
|
31
|
+
delete unTypedCol['DataType'];
|
|
32
|
+
if (!freeTextColumn.FreeTextColumnSettings) {
|
|
33
|
+
freeTextColumn.FreeTextColumnSettings = {
|
|
34
|
+
DataType: dataType,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
freeTextColumn.FreeTextColumnSettings.DataType = dataType;
|
|
39
|
+
}
|
|
40
|
+
this.api.freeTextColumnApi.editFreeTextColumn(freeTextColumn);
|
|
41
|
+
}
|
|
42
|
+
if (!freeTextColumn.FreeTextColumnSettings) {
|
|
43
|
+
freeTextColumn.FreeTextColumnSettings = {
|
|
44
|
+
DataType: 'String',
|
|
45
|
+
};
|
|
46
|
+
this.api.freeTextColumnApi.editFreeTextColumn(freeTextColumn);
|
|
47
|
+
}
|
|
48
|
+
if (!freeTextColumn.FreeTextColumnSettings.DataType) {
|
|
49
|
+
freeTextColumn.FreeTextColumnSettings.DataType = 'String';
|
|
50
|
+
this.api.freeTextColumnApi.editFreeTextColumn(freeTextColumn);
|
|
32
51
|
}
|
|
33
52
|
}
|
|
34
53
|
}
|
|
@@ -73,7 +92,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
92
|
{
|
|
74
93
|
name: 'Settings',
|
|
75
94
|
label: 'Data Type',
|
|
76
|
-
values: [(_a = freeTextColumn.DataType) !== null && _a !== void 0 ? _a : 'Not specified'],
|
|
95
|
+
values: [(_a = freeTextColumn.FreeTextColumnSettings.DataType) !== null && _a !== void 0 ? _a : 'Not specified'],
|
|
77
96
|
},
|
|
78
97
|
Boolean(freeTextColumn.DefaultValue) && {
|
|
79
98
|
name: 'Settings',
|
|
@@ -73,39 +73,71 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
73
|
}
|
|
74
74
|
addColumnMenuItems(column) {
|
|
75
75
|
let returnColumnMenuItems = [];
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
// Need a Column and an editable Module
|
|
77
|
+
if (column && this.isModuleEditable()) {
|
|
78
|
+
// First look at Sparkline Columns - needs to be editable array type
|
|
79
|
+
if (this.api.columnApi.hasArrayDataType(column.columnId) && column.IsReadOnly !== true) {
|
|
78
80
|
let styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(column.columnId);
|
|
79
|
-
let
|
|
80
|
-
if (!
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
GradientStyle: {} });
|
|
81
|
+
let sparklineColumnExists = column.isSparkline && Boolean(styledColumn);
|
|
82
|
+
if (column.isSparkline && !sparklineColumnExists) {
|
|
83
|
+
// do nothing as we only want to continue if there is no sparkline column or if its in state
|
|
84
|
+
// because if just one then it was created in AG Grid and we dont want to edit it
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
else {
|
|
87
|
+
if (!sparklineColumnExists) {
|
|
88
|
+
styledColumn = Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyStyledColumn()), { ColumnId: column.columnId,
|
|
89
|
+
// set sparkline style
|
|
90
|
+
SparkLineStyle: {} });
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(column.columnId);
|
|
94
|
+
}
|
|
95
|
+
let label = sparklineColumnExists ? 'Edit ' : 'Create ';
|
|
96
|
+
let popupParam = {
|
|
97
|
+
action: sparklineColumnExists ? 'Edit' : 'New',
|
|
98
|
+
source: 'ColumnMenu',
|
|
99
|
+
value: styledColumn,
|
|
100
|
+
};
|
|
101
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Sparkline Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
87
102
|
}
|
|
88
|
-
let label = styledColumnExists ? 'Edit ' : 'Create ';
|
|
89
|
-
let popupParam = {
|
|
90
|
-
action: styledColumnExists ? 'Edit' : 'New',
|
|
91
|
-
source: 'ColumnMenu',
|
|
92
|
-
value: styledColumn,
|
|
93
|
-
};
|
|
94
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Styled Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
95
103
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
// Next do non sparkline
|
|
105
|
+
if (!column.isSparkline) {
|
|
106
|
+
// First do numeric (Gradient and Percent Bar)
|
|
107
|
+
if (column.dataType === 'Number') {
|
|
108
|
+
let styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(column.columnId);
|
|
109
|
+
let styledColumnExists = Boolean(styledColumn);
|
|
110
|
+
if (!styledColumn) {
|
|
111
|
+
styledColumn = Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyStyledColumn()), { ColumnId: column.columnId,
|
|
112
|
+
// numbers default to gradient
|
|
113
|
+
GradientStyle: {} });
|
|
114
|
+
}
|
|
115
|
+
if (styledColumn && styledColumn.IsReadOnly && styledColumn.IsReadOnly == true) {
|
|
116
|
+
styledColumnExists = false;
|
|
117
|
+
}
|
|
118
|
+
let label = styledColumnExists ? 'Edit ' : 'Create ';
|
|
119
|
+
let popupParam = {
|
|
120
|
+
action: styledColumnExists ? 'Edit' : 'New',
|
|
121
|
+
source: 'ColumnMenu',
|
|
122
|
+
value: styledColumn,
|
|
123
|
+
};
|
|
124
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Styled Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
103
125
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
126
|
+
// Then do Checkbox
|
|
127
|
+
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
128
|
+
let styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(column.columnId);
|
|
129
|
+
const hasCheckBox = styledColumn && (styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.CheckBoxStyle);
|
|
130
|
+
if (hasCheckBox) {
|
|
131
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'unchecked', () => {
|
|
132
|
+
this.api.styledColumnApi.deleteStyledColumn(styledColumn);
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
137
|
+
const styledColumn = ObjectFactory_1.default.CreateEmptyStyledColumn();
|
|
138
|
+
this.api.styledColumnApi.addStyledColumn(Object.assign(Object.assign({}, styledColumn), { ColumnId: column.columnId, CheckBoxStyle: true }));
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
109
141
|
}
|
|
110
142
|
}
|
|
111
143
|
}
|
|
@@ -33,7 +33,7 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
33
33
|
this.api.internalApi.dispatchReduxAction(TeamSharingRedux.TeamSharingCommitImport());
|
|
34
34
|
});
|
|
35
35
|
if (this.api.teamSharingApi.isTeamSharingAvailable()) {
|
|
36
|
-
this.api.teamSharingApi.
|
|
36
|
+
this.api.teamSharingApi.refreshTeamSharing();
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
isModuleAvailable() {
|
|
@@ -167,7 +167,7 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
167
167
|
return {
|
|
168
168
|
actions: [TeamSharingApplyButton_1.TeamSharingApplyButton],
|
|
169
169
|
onMount: () => {
|
|
170
|
-
this.api.teamSharingApi.
|
|
170
|
+
this.api.teamSharingApi.refreshTeamSharing();
|
|
171
171
|
},
|
|
172
172
|
getDeleteAction: (sharedEntity) => {
|
|
173
173
|
return TeamSharingRedux.TeamSharingRemoveItem(sharedEntity.Uuid);
|
|
@@ -145,7 +145,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
145
145
|
],
|
|
146
146
|
},
|
|
147
147
|
generalOptions: {
|
|
148
|
-
hideEmptyGroupRows: false,
|
|
149
148
|
showMissingPrimaryKeyAlert: false,
|
|
150
149
|
dataSets: GeneralConstants_1.EMPTY_ARRAY,
|
|
151
150
|
showGroupingTotalsAsHeader: false,
|
|
@@ -158,7 +157,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
158
157
|
disableDeleteConfirmation: false,
|
|
159
158
|
},
|
|
160
159
|
layoutOptions: {
|
|
161
|
-
includeExpandedRowGroups: false,
|
|
162
160
|
displayRowGroups: 'closed',
|
|
163
161
|
autoSaveLayouts: true,
|
|
164
162
|
autoSizeColumnsInLayout: false,
|
|
@@ -209,7 +207,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
209
207
|
defaultFilterFormTab: 'Values',
|
|
210
208
|
enableFilterOnSpecialColumns: true,
|
|
211
209
|
maxFilterValuesToDisplay: 2000,
|
|
212
|
-
systemFilters: undefined,
|
|
213
210
|
showQuickFilter: true,
|
|
214
211
|
showDistinctFilteredValuesOnly: false,
|
|
215
212
|
showClearFilterButton: false,
|
|
@@ -4,7 +4,7 @@ import { AggregatedScalarExpressionEvaluation } from './aggregatedScalarExpressi
|
|
|
4
4
|
/**
|
|
5
5
|
* List of all the Aggregation Functions available in AdaptableQL
|
|
6
6
|
*/
|
|
7
|
-
export declare type AggregatedBooleanFunctionName = 'WHERE' | 'COL' | 'GROUP_BY' | AggregationFunction | ComparisonFunction;
|
|
7
|
+
export declare type AggregatedBooleanFunctionName = 'WHERE' | 'COL' | 'GROUP_BY' | 'WEIGHT' | AggregationFunction | ComparisonFunction;
|
|
8
8
|
declare type AggregationFunction = 'SUM' | 'MIN' | 'MAX' | 'AVG';
|
|
9
9
|
declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
|
|
10
10
|
export interface BooleanAggregationParameter extends BaseParameter<'aggregationBoolean', AggregationFunction> {
|
|
@@ -28,22 +28,14 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
28
28
|
signatures: ['<main_query> WHERE <boolean_query>'],
|
|
29
29
|
examples: ['<main_query> WHERE <boolean_query>', '<main_query> WHERE QUERY("abc")'],
|
|
30
30
|
hasEagerEvaluation: true,
|
|
31
|
-
category: '
|
|
31
|
+
category: 'conditional',
|
|
32
32
|
},
|
|
33
33
|
SUM: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['SUM'],
|
|
34
34
|
MIN: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['MIN'],
|
|
35
35
|
MAX: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['MAX'],
|
|
36
36
|
AVG: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['AVG'],
|
|
37
|
+
WEIGHT: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['WEIGHT'],
|
|
37
38
|
GROUP_BY: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['GROUP_BY'],
|
|
38
|
-
COL: {
|
|
39
|
-
handler(args, context) {
|
|
40
|
-
return (0, expressionFunctionUtils_1.handleColumnFunction)(args, context);
|
|
41
|
-
},
|
|
42
|
-
description: 'References a column by its unique identifier',
|
|
43
|
-
signatures: ['[colName]', 'COL(name: string)'],
|
|
44
|
-
examples: ['[col1]', "COL('col1')"],
|
|
45
|
-
category: 'advanced',
|
|
46
|
-
},
|
|
47
39
|
EQ: {
|
|
48
40
|
handler(args, context) {
|
|
49
41
|
return buildBooleanAggregationParameter(args, context, '=', (aggregatedValue, conditionValue) => aggregatedValue === conditionValue);
|
|
@@ -134,6 +126,15 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
134
126
|
examples: [`SUM([col1]) >= '5M'`, 'GTE( SUM([col1]), 250000)'],
|
|
135
127
|
category: 'comparison',
|
|
136
128
|
},
|
|
129
|
+
COL: {
|
|
130
|
+
handler(args, context) {
|
|
131
|
+
return (0, expressionFunctionUtils_1.handleColumnFunction)(args, context);
|
|
132
|
+
},
|
|
133
|
+
description: 'References a column by its unique identifier',
|
|
134
|
+
signatures: ['[colName]', 'COL(name: string)'],
|
|
135
|
+
examples: ['[col1]', "COL('col1')"],
|
|
136
|
+
category: 'special',
|
|
137
|
+
},
|
|
137
138
|
};
|
|
138
139
|
const buildBooleanAggregationParameter = (args, context, comparisonOperator, conditionFn) => {
|
|
139
140
|
// LHS
|
|
@@ -232,14 +232,14 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
232
232
|
};
|
|
233
233
|
return result;
|
|
234
234
|
},
|
|
235
|
-
description: 'Aggregates a column over multiple rows by computing the average value (arithmetic mean) of the column values\nOptionally the aggregation may be
|
|
235
|
+
description: 'Aggregates a column over multiple rows by computing the average value (arithmetic mean) of the column values\nOptionally the aggregation may be weighted and/or grouped.',
|
|
236
236
|
signatures: [
|
|
237
237
|
'AVG( [colName] )',
|
|
238
238
|
'AVG( COL(name: string))',
|
|
239
239
|
'AVG( [colNameA], GROUP_BY( [colNameB] ))',
|
|
240
240
|
'AVG( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
241
241
|
],
|
|
242
|
-
examples: ['AVG([colA])', 'AVG([colA], GROUP_BY([colB]))'],
|
|
242
|
+
examples: ['AVG([colA])', 'AVG([colA], GROUP_BY([colB]))', 'AVG([colA], WEIGHT([colB]))'],
|
|
243
243
|
category: 'aggregation',
|
|
244
244
|
},
|
|
245
245
|
MIN: {
|
|
@@ -487,7 +487,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
487
487
|
},
|
|
488
488
|
description: 'Defines an accumulative dimension (order) for the enclosing cumulative aggregation',
|
|
489
489
|
signatures: ['OVER( [colName] )', 'OVER( COL(name: string))'],
|
|
490
|
-
examples: ['OVER( [colName] )', `OVER( COL('colName'))`],
|
|
490
|
+
examples: ['OVER( [colName] )', `OVER( COL('colName'))`, `CUMUL( SUM([colA]), OVER([colB]))`],
|
|
491
491
|
category: 'cumulative',
|
|
492
492
|
},
|
|
493
493
|
WEIGHT: {
|
|
@@ -503,8 +503,12 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
503
503
|
},
|
|
504
504
|
description: 'Defines a weight for the enclosing AVG(Average) aggregation',
|
|
505
505
|
signatures: ['WEIGHT( [colName] )', 'WEIGHT( COL(name: string))'],
|
|
506
|
-
examples: [
|
|
507
|
-
|
|
506
|
+
examples: [
|
|
507
|
+
'WEIGHT( [colName] )',
|
|
508
|
+
`WEIGHT( COL('colName'))`,
|
|
509
|
+
`AVG( [colName1], WEIGHT([colName2]))`,
|
|
510
|
+
],
|
|
511
|
+
category: 'operand',
|
|
508
512
|
},
|
|
509
513
|
GROUP_BY: {
|
|
510
514
|
handler(args, context) {
|
|
@@ -519,7 +523,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
519
523
|
description: 'Groups an aggregation operation within the rows that have the same value in the specified column',
|
|
520
524
|
signatures: ['GROUP_BY( [colName] )', 'GROUP_BY( COL(name: string))'],
|
|
521
525
|
examples: ['GROUP_BY( [colName] )', `GROUP_BY( COL('colName'))`],
|
|
522
|
-
category: '
|
|
526
|
+
category: 'grouping',
|
|
523
527
|
},
|
|
524
528
|
COL: {
|
|
525
529
|
handler(args, context) {
|
|
@@ -528,7 +532,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
528
532
|
description: 'References a column by its unique identifier',
|
|
529
533
|
signatures: ['[colName]', 'COL(name: string)'],
|
|
530
534
|
examples: ['[col1]', 'COL("col1")'],
|
|
531
|
-
category: '
|
|
535
|
+
category: 'special',
|
|
532
536
|
},
|
|
533
537
|
};
|
|
534
538
|
const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, context) => {
|