@adaptabletools/adaptable 18.0.0-canary.15 → 18.0.0-canary.17
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/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +5 -1
- package/src/AdaptableOptions/MenuOptions.js +71 -70
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +0 -3
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +10 -1
- package/src/PredefinedConfig/Common/Menu.js +71 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +16 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +12 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -5
- package/src/Strategy/AdaptableModuleBase.js +9 -8
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +7 -6
- package/src/Strategy/CellSummaryModule.js +37 -12
- package/src/Strategy/ColumnFilterModule.js +8 -7
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/CommentModule.js +2 -2
- package/src/Strategy/CustomSortModule.js +2 -1
- package/src/Strategy/DashboardModule.js +8 -7
- package/src/Strategy/DataImportModule.d.ts +1 -1
- package/src/Strategy/DataImportModule.js +5 -5
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -4
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/LayoutModule.js +32 -23
- package/src/Strategy/NoteModule.js +2 -2
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -0
- package/src/Strategy/StyledColumnModule.js +23 -5
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +124 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +42 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +26 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +26 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +14 -14
- package/src/agGrid/AgGridMenuAdapter.js +7 -5
- package/src/agGrid/defaultAdaptableOptions.js +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +6 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -12
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -17
|
@@ -9,17 +9,17 @@ export class SettingsPanelModule extends AdaptableModuleBase {
|
|
|
9
9
|
addColumnMenuItems(column) {
|
|
10
10
|
return [
|
|
11
11
|
// To do : get the icon and name from settings in case they have changed?
|
|
12
|
-
this.createColumnMenuItemReduxAction('Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
12
|
+
this.createColumnMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
13
13
|
];
|
|
14
14
|
}
|
|
15
15
|
addContextMenuItems(menuContext) {
|
|
16
16
|
return [
|
|
17
|
-
this.createColumnMenuItemReduxAction('Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
17
|
+
this.createColumnMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
20
|
addModuleMenuItem(source) {
|
|
21
21
|
if (this.isModuleAvailable()) {
|
|
22
|
-
return this.createColumnMenuItemReduxAction('Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
22
|
+
return this.createColumnMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -27,7 +27,7 @@ export class SmartEditModule extends AdaptableModuleBase {
|
|
|
27
27
|
let popUpParams = {
|
|
28
28
|
source: 'ContextMenu',
|
|
29
29
|
};
|
|
30
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
30
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'smart-edit-apply',
|
|
31
31
|
Label: 'Apply Smart Edit',
|
|
32
32
|
ComponentName: this.moduleInfo.Popup,
|
|
33
33
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -53,7 +53,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
53
53
|
defaultCurrentSectionName: 'Settings',
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Sparkline Column', this.moduleInfo.Popup, this.getGlyphForStyledColumn(styledColumn), popupParam));
|
|
56
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('styled-column-sparkline', label + 'Sparkline Column', this.moduleInfo.Popup, this.getGlyphForStyledColumn(styledColumn), popupParam));
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
// Next do non sparkline
|
|
@@ -78,7 +78,8 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
78
78
|
};
|
|
79
79
|
const icon = this.getGlyphForStyledColumn(styledColumn);
|
|
80
80
|
const label = `Edit ${this.getTypeLabel(styledColumn)} Style`;
|
|
81
|
-
|
|
81
|
+
const name = this.getTypeName(styledColumn);
|
|
82
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(name, label, this.moduleInfo.Popup, icon, popupParam));
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
else {
|
|
@@ -90,7 +91,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
90
91
|
config: {},
|
|
91
92
|
};
|
|
92
93
|
const badgeLabel = column.dataType === 'Number' ? 'Badge' : 'Create Badge Style';
|
|
93
|
-
const newBadgeButton = this.createColumnMenuItemShowPopup(badgeLabel, this.moduleInfo.Popup, 'badge', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { BadgeStyle: {
|
|
94
|
+
const newBadgeButton = this.createColumnMenuItemShowPopup('styled-column-badge', badgeLabel, this.moduleInfo.Popup, 'badge', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { BadgeStyle: {
|
|
94
95
|
Badges: [ObjectFactory.CreateDefaultStyledColumnBadge()],
|
|
95
96
|
} }), config: {
|
|
96
97
|
defaultCurrentSectionName: 'Badges',
|
|
@@ -102,17 +103,18 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
102
103
|
const emptyRanges = this.api.scopeApi.createCellColorRangesForScope({
|
|
103
104
|
ColumnIds: [column.columnId],
|
|
104
105
|
});
|
|
105
|
-
const newGrandientButton = this.createColumnMenuItemShowPopup('Gradient', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
|
|
106
|
+
const newGrandientButton = this.createColumnMenuItemShowPopup('styled-column-gradient', 'Gradient', this.moduleInfo.Popup, 'gradient', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { GradientStyle: {
|
|
106
107
|
CellRanges: emptyRanges,
|
|
107
108
|
} }), config: {
|
|
108
109
|
defaultCurrentSectionName: 'Style',
|
|
109
110
|
} }));
|
|
110
|
-
const newPrecentBarButton = this.createColumnMenuItemShowPopup('Percent Bar', this.moduleInfo.Popup, 'percent', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { PercentBarStyle: {
|
|
111
|
+
const newPrecentBarButton = this.createColumnMenuItemShowPopup('styled-column-percent-bar', 'Percent Bar', this.moduleInfo.Popup, 'percent', Object.assign(Object.assign({}, popupParam), { value: Object.assign(Object.assign({}, newStyledColumn), { PercentBarStyle: {
|
|
111
112
|
CellRanges: emptyRanges,
|
|
112
113
|
} }), config: {
|
|
113
114
|
defaultCurrentSectionName: 'Style',
|
|
114
115
|
} }));
|
|
115
116
|
returnColumnMenuItems.push({
|
|
117
|
+
name: 'styled-column',
|
|
116
118
|
label: 'Create Styled Column',
|
|
117
119
|
module: this.moduleInfo.ModuleName,
|
|
118
120
|
isVisible: true,
|
|
@@ -230,4 +232,20 @@ export class StyledColumnModule extends AdaptableModuleBase {
|
|
|
230
232
|
}
|
|
231
233
|
return type;
|
|
232
234
|
}
|
|
235
|
+
getTypeName(styledColumn) {
|
|
236
|
+
let type = null;
|
|
237
|
+
if (styledColumn.GradientStyle) {
|
|
238
|
+
type = 'styled-column-gradient';
|
|
239
|
+
}
|
|
240
|
+
else if (styledColumn.PercentBarStyle) {
|
|
241
|
+
type = 'styled-column-percent-bar';
|
|
242
|
+
}
|
|
243
|
+
else if (styledColumn.SparkLineStyle) {
|
|
244
|
+
type = 'styled-column-sparkline';
|
|
245
|
+
}
|
|
246
|
+
else if (styledColumn.BadgeStyle) {
|
|
247
|
+
type = 'styled-column-badge';
|
|
248
|
+
}
|
|
249
|
+
return type;
|
|
250
|
+
}
|
|
233
251
|
}
|
|
@@ -8,7 +8,7 @@ export class SystemStatusModule extends AdaptableModuleBase {
|
|
|
8
8
|
addColumnMenuItems(column) {
|
|
9
9
|
if (this.isModuleAvailable()) {
|
|
10
10
|
return [
|
|
11
|
-
this.createColumnMenuItemShowPopup('Show System Status', this.moduleInfo.Popup, this.moduleInfo.Glyph),
|
|
11
|
+
this.createColumnMenuItemShowPopup('system-status-show', 'Show System Status', this.moduleInfo.Popup, this.moduleInfo.Glyph),
|
|
12
12
|
];
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -18,7 +18,7 @@ export class SystemStatusModule extends AdaptableModuleBase {
|
|
|
18
18
|
source: 'ContextMenu',
|
|
19
19
|
};
|
|
20
20
|
return [
|
|
21
|
-
this.createMainMenuItemShowPopup({
|
|
21
|
+
this.createMainMenuItemShowPopup({ Name: 'system-status-show',
|
|
22
22
|
Label: 'Show System Status',
|
|
23
23
|
ComponentName: this.moduleInfo.Popup,
|
|
24
24
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { IRowNode } from '@ag-grid-community/core';
|
|
1
2
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
3
|
import { BaseParameter } from './expressionFunctionUtils';
|
|
3
|
-
import { IRowNode } from '@ag-grid-community/core';
|
|
4
4
|
import { AggregateParams } from './scalarAggregationHelper';
|
|
5
5
|
/**
|
|
6
6
|
* List of all the AggregatedScalar Functions available in AdaptableQL
|
|
7
7
|
*/
|
|
8
8
|
export type AggregatedScalarFunctionName = ScalarAggregationFunction | OperandFunction;
|
|
9
|
-
export type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'QUARTILE' | 'PERCENTILE' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL' | 'MEDIAN' | 'MODE' | 'DISTINCT' | 'ONLY' | 'STD_DEVIATION';
|
|
9
|
+
export type ScalarAggregationFunction = 'SUM' | 'PERCENTAGE' | 'QUANT' | 'QUARTILE' | 'PERCENTILE' | 'AVG' | 'MIN' | 'MAX' | 'COUNT' | 'CUMUL' | 'MEDIAN' | 'MODE' | 'DISTINCT' | 'ONLY' | 'STD_DEVIATION' | 'OLDEST' | 'YOUNGEST';
|
|
10
10
|
type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY' | 'WEIGHT';
|
|
11
11
|
export interface ScalarAggregationParameter extends BaseParameter<'aggregationScalar', ScalarAggregationFunction> {
|
|
12
12
|
value: AggregatedScalarExpressionEvaluation;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { extractColumnParameter, extractColumnParameters, extractParameter, getNumericValue, handleColumnFunction, validateColumnType, } from './expressionFunctionUtils';
|
|
2
1
|
import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluationError';
|
|
3
|
-
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
4
2
|
import { SumArray } from '../Extensions/ArrayExtensions';
|
|
3
|
+
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
4
|
+
import { extractColumnParameter, extractColumnParameters, extractParameter, getNumericValue, handleColumnFunction, validateColumnType, } from './expressionFunctionUtils';
|
|
5
|
+
import isAfter from 'date-fns/isAfter';
|
|
6
|
+
import { parseDateValue } from '../Helpers/DateHelper';
|
|
5
7
|
export const aggregatedExpressionFunctions = [
|
|
6
8
|
'SUM',
|
|
7
9
|
'PERCENTAGE',
|
|
@@ -351,6 +353,7 @@ export const aggregatedScalarExpressionFunctions = {
|
|
|
351
353
|
return aggregatedValue;
|
|
352
354
|
},
|
|
353
355
|
done: (aggregatedValue) => {
|
|
356
|
+
var _a;
|
|
354
357
|
const sorted = [...aggregatedValue.entries()].sort(([aVal, aFreq], [bVal, bFreq]) => {
|
|
355
358
|
if (aFreq < bFreq) {
|
|
356
359
|
return 1;
|
|
@@ -362,7 +365,7 @@ export const aggregatedScalarExpressionFunctions = {
|
|
|
362
365
|
return aVal === bVal ? 0 : 1;
|
|
363
366
|
}
|
|
364
367
|
});
|
|
365
|
-
return sorted[0][0];
|
|
368
|
+
return (_a = sorted === null || sorted === void 0 ? void 0 : sorted[0]) === null || _a === void 0 ? void 0 : _a[0];
|
|
366
369
|
},
|
|
367
370
|
},
|
|
368
371
|
},
|
|
@@ -908,6 +911,124 @@ export const aggregatedScalarExpressionFunctions = {
|
|
|
908
911
|
examples: ['[col1]', 'COL("col1")'],
|
|
909
912
|
category: 'special',
|
|
910
913
|
},
|
|
914
|
+
OLDEST: {
|
|
915
|
+
handler(args, context) {
|
|
916
|
+
const minColumnParameter = extractColumnParameter('OLDEST', args);
|
|
917
|
+
const minColumnName = minColumnParameter.value;
|
|
918
|
+
validateColumnType(minColumnName, ['Date'], 'OLDEST', context.adaptableApi);
|
|
919
|
+
const groupByParameter = extractParameter('OLDEST', 'operand', ['GROUP_BY'], args, {
|
|
920
|
+
isOptional: true,
|
|
921
|
+
});
|
|
922
|
+
const aggregationExpressionEvaluation = {
|
|
923
|
+
aggregationParams: {
|
|
924
|
+
reducers: {
|
|
925
|
+
OLDEST: {
|
|
926
|
+
name: 'OLDEST',
|
|
927
|
+
field: minColumnName,
|
|
928
|
+
initialValue: null,
|
|
929
|
+
reducer: (minValue, rowValue) => {
|
|
930
|
+
if (!minValue) {
|
|
931
|
+
return rowValue;
|
|
932
|
+
}
|
|
933
|
+
if (!rowValue) {
|
|
934
|
+
return minValue;
|
|
935
|
+
}
|
|
936
|
+
if (isAfter(parseDateValue(minValue), parseDateValue(rowValue))) {
|
|
937
|
+
return rowValue;
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
return minValue;
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
done: (minValue, arr) => {
|
|
944
|
+
if (minValue !== null) {
|
|
945
|
+
return minValue;
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
},
|
|
949
|
+
},
|
|
950
|
+
},
|
|
951
|
+
rowFilterFn: context.filterFn,
|
|
952
|
+
getRowNodes: context.getRowNodes,
|
|
953
|
+
};
|
|
954
|
+
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
955
|
+
const result = {
|
|
956
|
+
name: 'OLDEST',
|
|
957
|
+
type: 'aggregationScalar',
|
|
958
|
+
value: aggregationExpressionEvaluation,
|
|
959
|
+
};
|
|
960
|
+
return result;
|
|
961
|
+
},
|
|
962
|
+
description: 'Aggregates a column over multiple rows by computing the minimum of the column values\nOptionally the aggregation may be computed within provided individual groups',
|
|
963
|
+
signatures: [
|
|
964
|
+
'OLDEST( [colName] )',
|
|
965
|
+
'OLDEST( COL(name: string))',
|
|
966
|
+
'OLDEST( [colNameA], GROUP_BY( [colNameB] ))',
|
|
967
|
+
'OLDEST( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
968
|
+
],
|
|
969
|
+
examples: ['OLDEST([colA])', 'OLDEST([colA], GROUP_BY([colB]))'],
|
|
970
|
+
category: 'aggregation',
|
|
971
|
+
inputs: ['date'],
|
|
972
|
+
},
|
|
973
|
+
YOUNGEST: {
|
|
974
|
+
handler(args, context) {
|
|
975
|
+
const minColumnParameter = extractColumnParameter('YOUNGEST', args);
|
|
976
|
+
const minColumnName = minColumnParameter.value;
|
|
977
|
+
validateColumnType(minColumnName, ['Date'], 'YOUNGEST', context.adaptableApi);
|
|
978
|
+
const groupByParameter = extractParameter('YOUNGEST', 'operand', ['GROUP_BY'], args, {
|
|
979
|
+
isOptional: true,
|
|
980
|
+
});
|
|
981
|
+
const aggregationExpressionEvaluation = {
|
|
982
|
+
aggregationParams: {
|
|
983
|
+
reducers: {
|
|
984
|
+
YOUNGEST: {
|
|
985
|
+
name: 'YOUNGEST',
|
|
986
|
+
field: minColumnName,
|
|
987
|
+
initialValue: null,
|
|
988
|
+
reducer: (minValue, rowValue) => {
|
|
989
|
+
if (!minValue) {
|
|
990
|
+
return rowValue;
|
|
991
|
+
}
|
|
992
|
+
if (!rowValue) {
|
|
993
|
+
return minValue;
|
|
994
|
+
}
|
|
995
|
+
if (isAfter(parseDateValue(minValue), parseDateValue(rowValue))) {
|
|
996
|
+
return minValue;
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
return rowValue;
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
done: (minValue, arr) => {
|
|
1003
|
+
if (minValue !== null) {
|
|
1004
|
+
return minValue;
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
1010
|
+
rowFilterFn: context.filterFn,
|
|
1011
|
+
getRowNodes: context.getRowNodes,
|
|
1012
|
+
};
|
|
1013
|
+
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
1014
|
+
const result = {
|
|
1015
|
+
name: 'YOUNGEST',
|
|
1016
|
+
type: 'aggregationScalar',
|
|
1017
|
+
value: aggregationExpressionEvaluation,
|
|
1018
|
+
};
|
|
1019
|
+
return result;
|
|
1020
|
+
},
|
|
1021
|
+
description: 'Aggregates a column over multiple rows by computing the minimum of the column values\nOptionally the aggregation may be computed within provided individual groups',
|
|
1022
|
+
signatures: [
|
|
1023
|
+
'YOUNGEST( [colName] )',
|
|
1024
|
+
'YOUNGEST( COL(name: string))',
|
|
1025
|
+
'YOUNGEST( [colNameA], GROUP_BY( [colNameB] ))',
|
|
1026
|
+
'YOUNGEST( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
1027
|
+
],
|
|
1028
|
+
examples: ['YOUNGEST([colA])', 'YOUNGEST([colA], GROUP_BY([colB]))'],
|
|
1029
|
+
category: 'aggregation',
|
|
1030
|
+
inputs: ['date'],
|
|
1031
|
+
},
|
|
911
1032
|
};
|
|
912
1033
|
const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, context) => {
|
|
913
1034
|
const aggregationEvaluation = aggregationParameter.value;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as Redux from 'redux';
|
|
2
2
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
3
|
-
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
3
|
+
import { AdaptableMenuItem, AdaptableMenuItemName } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableIcon, AdaptableSystemIconName } from '../PredefinedConfig/Common/AdaptableIcon';
|
|
6
6
|
export declare class MenuItemDoReduxAction implements AdaptableMenuItem {
|
|
7
|
-
constructor(label: string, module: AdaptableModule, reduxAction: Redux.Action, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
7
|
+
constructor(name: AdaptableMenuItemName, label: string, module: AdaptableModule, reduxAction: Redux.Action, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
8
|
+
name: AdaptableMenuItemName;
|
|
8
9
|
reduxAction: Redux.Action;
|
|
9
10
|
label: string;
|
|
10
11
|
module: AdaptableModule;
|
|
@@ -12,7 +13,8 @@ export declare class MenuItemDoReduxAction implements AdaptableMenuItem {
|
|
|
12
13
|
icon: AdaptableIcon;
|
|
13
14
|
}
|
|
14
15
|
export declare class MenuItemDoClickFunction implements AdaptableMenuItem {
|
|
15
|
-
constructor(label: string, module: AdaptableModule, clickFunction: () => void, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
16
|
+
constructor(name: AdaptableMenuItemName, label: string, module: AdaptableModule, clickFunction: () => void, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
17
|
+
name: AdaptableMenuItemName;
|
|
16
18
|
onClick: () => void;
|
|
17
19
|
label: string;
|
|
18
20
|
module: AdaptableModule;
|
|
@@ -20,7 +22,8 @@ export declare class MenuItemDoClickFunction implements AdaptableMenuItem {
|
|
|
20
22
|
icon: AdaptableIcon;
|
|
21
23
|
}
|
|
22
24
|
export declare class MenuItemShowPopup implements AdaptableMenuItem {
|
|
23
|
-
constructor(label: string, module: AdaptableModule, componentName: string, icon: AdaptableSystemIconName, isVisible: boolean, popupParams?: ModuleParams);
|
|
25
|
+
constructor(name: AdaptableMenuItemName, label: string, module: AdaptableModule, componentName: string, icon: AdaptableSystemIconName, isVisible: boolean, popupParams?: ModuleParams);
|
|
26
|
+
name: AdaptableMenuItemName;
|
|
24
27
|
reduxAction: Redux.Action;
|
|
25
28
|
label: string;
|
|
26
29
|
module: AdaptableModule;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as PopupRedux from '../Redux/ActionsReducers/PopupRedux';
|
|
2
2
|
// A menu item which performs a Redux Action when it is clicke
|
|
3
3
|
export class MenuItemDoReduxAction {
|
|
4
|
-
constructor(label, module, reduxAction, icon, isVisible) {
|
|
4
|
+
constructor(name, label, module, reduxAction, icon, isVisible) {
|
|
5
|
+
this.name = name;
|
|
5
6
|
this.label = label;
|
|
6
7
|
this.module = module;
|
|
7
8
|
this.isVisible = isVisible;
|
|
@@ -12,7 +13,8 @@ export class MenuItemDoReduxAction {
|
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
export class MenuItemDoClickFunction {
|
|
15
|
-
constructor(label, module, clickFunction, icon, isVisible) {
|
|
16
|
+
constructor(name, label, module, clickFunction, icon, isVisible) {
|
|
17
|
+
this.name = name;
|
|
16
18
|
this.label = label;
|
|
17
19
|
this.module = module;
|
|
18
20
|
this.isVisible = isVisible;
|
|
@@ -24,7 +26,8 @@ export class MenuItemDoClickFunction {
|
|
|
24
26
|
}
|
|
25
27
|
// A menu item which shows a popup screen when it is clieked
|
|
26
28
|
export class MenuItemShowPopup {
|
|
27
|
-
constructor(label, module, componentName, icon, isVisible, popupParams) {
|
|
29
|
+
constructor(name, label, module, componentName, icon, isVisible, popupParams) {
|
|
30
|
+
this.name = name;
|
|
28
31
|
this.label = label;
|
|
29
32
|
this.module = module;
|
|
30
33
|
this.isVisible = isVisible;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SystemLicenseDisablePersistence as e,SystemLicenseShowWatermark as a}from"../../../Redux/ActionsReducers/SystemRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",d=10,p=864e5;export var LicenseValidityType;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(LicenseValidityType||(LicenseValidityType={}));const h
|
|
1
|
+
import{SystemLicenseDisablePersistence as e,SystemLicenseShowWatermark as a}from"../../../Redux/ActionsReducers/SystemRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",d=10,p=864e5;export var LicenseValidityType;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(LicenseValidityType||(LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===i},I=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===i},_=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===i};export class LicenseService{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",(()=>{requestAnimationFrame((()=>{this.init()}))}))}init(){let e=null;if(this.licenseKey)try{e=n(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),i=new Date(e.end),s=i<new Date,o=e.trial;let n=null;return n=s?i>t?o?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:o?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var t;const i=new Date;i.setHours(0,0,0,0);let n=0;e instanceof Error||!(null==e?void 0:e.end)||(n=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-i.getTime())/p),n=s(n,0,1/0));let h="",E="";!e||e instanceof Error||!e.appName||e.appName==r||(h=e.appName,E=" for application [APP_NAME]");const I=(e,a=o,t=c,i=n,s=h)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",s).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(I("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(I("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(I("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(I("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(n<=d)this.adaptable.logger.consoleLogByMessageType(I(`This AdapTable license${E} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{l()&&this.adaptable.logger.consoleLogByMessageType(I(`Thank you for using a valid AdapTable license${E}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(I(`This AdapTable license${E} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(I(`This AdapTable license${E} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction(t({alertType:"generic",header:"License Error",message:e,alertDefinition:i.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
|
|
@@ -83,7 +83,7 @@ export const UIOptionsStatusbarForm = (props) => {
|
|
|
83
83
|
React.createElement(Box, { as: "b" }, "Create Adaptable Statusbar Panel"),
|
|
84
84
|
React.createElement(FormLayout, { mt: 2 },
|
|
85
85
|
React.createElement(FormRow, { label: "Panel Name" },
|
|
86
|
-
React.createElement(Input, { value: adaptablePanelTitle,
|
|
86
|
+
React.createElement(Input, { value: adaptablePanelTitle, placeholder: 'Adaptable Panel Name', onChange: (event) => setAdaptablePanelTitle(event.target.value) })),
|
|
87
87
|
React.createElement(FormRow, { label: "Align" },
|
|
88
88
|
React.createElement(DropdownButton, { columns: ['label'], items: alignOptions }, (_d = alignOptions.find((option) => option.value === adaptablePanelAlign)) === null || _d === void 0 ? void 0 : _d.label)),
|
|
89
89
|
React.createElement(FormRow, { label: "" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableInputProps } from '../AdaptableInput';
|
|
3
3
|
export type AdaptableDateInputProps = AdaptableInputProps;
|
|
4
|
-
declare const AdaptableDateInput: React.ForwardRefExoticComponent<Pick<import("../../../components/Input").InputProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "wmode"
|
|
4
|
+
declare const AdaptableDateInput: React.ForwardRefExoticComponent<Pick<import("../../../components/Input").InputProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "wmode"> & React.RefAttributes<HTMLInputElement>>;
|
|
5
5
|
export default AdaptableDateInput;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const AdaptableDateInlineInput: React.ForwardRefExoticComponent<Pick<Omit<import("../../../components/Input").InputProps, "onChange" | "value"> & {
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
value: string;
|
|
5
|
+
}, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "wmode"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { isValid, parse } from 'date-fns';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import Input from '../../../components/Input';
|
|
5
|
+
import { useAdaptable } from '../../AdaptableContext';
|
|
6
|
+
export const AdaptableDateInlineInput = React.forwardRef((props, ref) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
9
|
+
const dateInputOptions = useAdaptable().adaptableOptions.userInterfaceOptions.dateInputOptions;
|
|
10
|
+
const dateProps = {
|
|
11
|
+
format: dateInputOptions.dateFormat,
|
|
12
|
+
locale: dateInputOptions.locale,
|
|
13
|
+
};
|
|
14
|
+
const [inputValue, setInputValue] = useState(() => {
|
|
15
|
+
return props.value;
|
|
16
|
+
});
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (hasFocus) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
setInputValue(props.value);
|
|
22
|
+
}, [props.value]);
|
|
23
|
+
const handleInputChange = (e) => {
|
|
24
|
+
setInputValue(e.currentTarget.value);
|
|
25
|
+
const date = parse(e.currentTarget.value, dateProps.format, new Date());
|
|
26
|
+
if (isValid(date)) {
|
|
27
|
+
props.onChange(e.currentTarget.value);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
props.onChange(undefined);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return (React.createElement(Input, Object.assign({}, props, { onFocus: (event) => {
|
|
34
|
+
var _a;
|
|
35
|
+
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
36
|
+
setHasFocus(true);
|
|
37
|
+
}, onBlur: (event) => {
|
|
38
|
+
var _a;
|
|
39
|
+
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
40
|
+
setHasFocus(false);
|
|
41
|
+
}, ref: ref, value: inputValue, onChange: (e) => handleInputChange(e), placeholder: (_a = props.placeholder) !== null && _a !== void 0 ? _a : dateProps.format, style: props.style, disabled: props.disabled })));
|
|
42
|
+
});
|
|
@@ -39,7 +39,7 @@ export const AdaptableObjectListItemView = (props) => {
|
|
|
39
39
|
var _a;
|
|
40
40
|
let labelEl = tag.label;
|
|
41
41
|
if (typeof tag.label === 'function') {
|
|
42
|
-
labelEl = React.createElement(tag.label, { data: props.abObject });
|
|
42
|
+
labelEl = React.createElement(tag.label, { key: index, data: props.abObject });
|
|
43
43
|
}
|
|
44
44
|
labelEl = labelEl !== null && labelEl !== void 0 ? labelEl : tag.name;
|
|
45
45
|
return (React.createElement(Flex, { "data-name": tag.name, key: `${index}-${tag.name}`, mb: 2, className: `${baseClassName}__row` },
|
|
@@ -129,5 +129,8 @@ export const AdaptableObjectListItem = (props) => {
|
|
|
129
129
|
};
|
|
130
130
|
export const AdaptableObjectList = (props) => {
|
|
131
131
|
var _a;
|
|
132
|
-
return (React.createElement("ul", { className: LIST_BASE_CLASS_NAME }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item) =>
|
|
132
|
+
return (React.createElement("ul", { className: LIST_BASE_CLASS_NAME }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
|
|
133
|
+
var _a;
|
|
134
|
+
return (React.createElement(AdaptableObjectListItem, Object.assign({ key: (_a = item.abObject.Uuid) !== null && _a !== void 0 ? _a : index, data: item, module: props.module }, props.itemProps)));
|
|
135
|
+
})));
|
|
133
136
|
};
|
|
@@ -14,12 +14,13 @@ import { ObjectFactory } from '../../../Utilities/ObjectFactory';
|
|
|
14
14
|
import HelpBlock from '../../../components/HelpBlock';
|
|
15
15
|
import { Flex } from 'rebass';
|
|
16
16
|
import Radio from '../../../components/Radio';
|
|
17
|
-
import Helper from '../../../Utilities/Helpers/Helper';
|
|
17
|
+
import Helper, { cloneObject } from '../../../Utilities/Helpers/Helper';
|
|
18
18
|
import AdaptableInput from '../AdaptableInput';
|
|
19
19
|
import { renderWithAdaptableContext } from '../../renderWithAdaptableContext';
|
|
20
20
|
import { CheckBox } from '../../../components/CheckBox';
|
|
21
21
|
import { runIfNotResolvedIn } from '../../../Utilities/runIfNotResolvedIn';
|
|
22
22
|
import { getDefaultColumnFilterPredicate } from './getDefaultColumnFilterPredicate';
|
|
23
|
+
import { AdaptableDateInlineInput } from '../AdaptableInput/AdaptableDateInlineInput';
|
|
23
24
|
const panelStyle = {
|
|
24
25
|
width: '100%',
|
|
25
26
|
minWidth: 150,
|
|
@@ -174,13 +175,20 @@ class FilterFormComponent extends React.Component {
|
|
|
174
175
|
this.changeColumnPredicateInput(newCheckedValue, 0);
|
|
175
176
|
} })));
|
|
176
177
|
}
|
|
177
|
-
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) =>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => {
|
|
179
|
+
var _a, _b;
|
|
180
|
+
const showDatePicker = (_b = (_a = this.props.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getColumnFilterOptions()) === null || _b === void 0 ? void 0 : _b.showDatePicker;
|
|
181
|
+
if (predicateInput.type === 'date' && !showDatePicker) {
|
|
182
|
+
return (React.createElement(AdaptableDateInlineInput, { value: filter.Predicate.Inputs[index], onChange: (value) => this.changeColumnPredicateInput(value, index) }));
|
|
183
|
+
}
|
|
184
|
+
return (React.createElement(Flex, { key: index, flexDirection: "row" },
|
|
185
|
+
React.createElement(AdaptableInput, { onMouseDown: (event) => {
|
|
186
|
+
if (predicateInput.type === 'date') {
|
|
187
|
+
// This prevents the ag-grid dropdown closing when a date is selected
|
|
188
|
+
event.stopPropagation();
|
|
189
|
+
}
|
|
190
|
+
}, disabled: this.isFilterDisabled(), type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), mb: 1, flex: 1, fontSize: 2 })));
|
|
191
|
+
});
|
|
184
192
|
}
|
|
185
193
|
isFilterDisabled() {
|
|
186
194
|
var _a;
|
|
@@ -255,12 +263,12 @@ class FilterFormComponent extends React.Component {
|
|
|
255
263
|
}
|
|
256
264
|
changeColumnPredicateInput(value, index) {
|
|
257
265
|
const { editedColumnFilter } = this.state;
|
|
258
|
-
|
|
259
|
-
|
|
266
|
+
const newEditedColumnFilter = cloneObject(editedColumnFilter);
|
|
267
|
+
newEditedColumnFilter.Predicate.Inputs[index] = value;
|
|
268
|
+
this.setState({ editedColumnFilter: newEditedColumnFilter });
|
|
260
269
|
if (this.props.api.optionsApi.getColumnFilterOptions().autoApplyFilter) {
|
|
261
|
-
this.props.onSetColumnFilter(
|
|
270
|
+
this.props.onSetColumnFilter(newEditedColumnFilter);
|
|
262
271
|
}
|
|
263
|
-
// this.props.onSetColumnFilter(editedColumnFilter);
|
|
264
272
|
}
|
|
265
273
|
}
|
|
266
274
|
function mapStateToProps(state, ownProps) {
|