@adaptabletools/adaptable 10.0.2 → 10.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +68 -26
- package/index.css +80 -28
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +14 -7
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +89 -4
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +33 -0
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/GridApi.d.ts +34 -8
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +11 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +7 -0
- package/src/Api/Implementation/ColumnApiImpl.js +37 -1
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -17
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +2 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
- package/src/Api/Implementation/GridApiImpl.js +17 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -0
- package/src/Api/Implementation/InternalApiImpl.js +16 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +11 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +57 -80
- package/src/Api/InternalApi.d.ts +2 -0
- package/src/Api/UserInterfaceApi.d.ts +14 -5
- package/src/PredefinedConfig/AlertState.d.ts +5 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +4 -37
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +16 -15
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → PredefinedConfig/Common/SpecialColumnSettings.js} +0 -0
- package/src/PredefinedConfig/FilterState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +10 -0
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/Redux/Store/AdaptableStore.js +4 -0
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +0 -2
- package/src/Strategy/ExportModule.js +58 -61
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
- package/src/Utilities/Helpers/DateHelper.js +30 -20
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +13 -1
- package/src/Utilities/Services/MetamodelService.js +1 -0
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +4 -2
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +44 -23
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +3 -0
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +14 -5
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +64 -23
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +45 -13
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +3 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +3 -1
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +20 -3
- package/src/agGrid/Adaptable.d.ts +20 -4
- package/src/agGrid/Adaptable.js +166 -50
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/metamodel/adaptable.metamodel.d.ts +72 -2
- package/src/metamodel/adaptable.metamodel.js +304 -69
- package/src/types.d.ts +4 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
2
2
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
3
3
|
import { UserMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
|
-
import { ActionColumn,
|
|
4
|
+
import { ActionColumn, BulkUpdatePermittedValues, CustomSortPermittedValues, EditLookUpPermittedValues, FilterPermittedValues, PermittedValues } from '../AdaptableOptions/UserInterfaceOptions';
|
|
5
5
|
/**
|
|
6
6
|
* Functions relating to User Interface section of Adaptable State
|
|
7
7
|
*/
|
|
@@ -17,27 +17,36 @@ export interface UserInterfaceApi {
|
|
|
17
17
|
/**
|
|
18
18
|
* Retrieves `permittedValues` property from User Interface Options
|
|
19
19
|
*/
|
|
20
|
-
getAllPermittedValuesItems():
|
|
20
|
+
getAllPermittedValuesItems(): PermittedValues[];
|
|
21
21
|
/**
|
|
22
22
|
* Retrieves Permitted Values for a given Column
|
|
23
23
|
* @param column column for which to retrieve Permitted Values
|
|
24
24
|
*/
|
|
25
25
|
getPermittedValuesForColumn(column: AdaptableColumn): any[];
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves Permitted values for filtering by column values in Floating Filter and dropdown Filter.
|
|
28
|
+
*/
|
|
29
|
+
getFilterPermittedValuesForColumn(column: AdaptableColumn): FilterPermittedValues | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves Permitted values for Custom sort.
|
|
32
|
+
*/
|
|
33
|
+
getCustomSortPermittedValuesForColumn(column: AdaptableColumn): CustomSortPermittedValues | undefined;
|
|
34
|
+
getBulkUpdatePermittedValuesForColumn(column: AdaptableColumn): BulkUpdatePermittedValues | undefined;
|
|
26
35
|
/**
|
|
27
36
|
* Retrieves `editLookUpItems` property from User Interface Options
|
|
28
37
|
*/
|
|
29
|
-
getAllEditLookUpItems():
|
|
38
|
+
getAllEditLookUpItems(): EditLookUpPermittedValues[];
|
|
30
39
|
/**
|
|
31
40
|
* Retrieves EditLookUpItems for a given Column
|
|
32
41
|
* @param columnId Column for which to retrieve EditLookUpItems
|
|
33
42
|
*/
|
|
34
|
-
getEditLookUpItemForColumn(
|
|
43
|
+
getEditLookUpItemForColumn(column: AdaptableColumn): EditLookUpPermittedValues | undefined;
|
|
35
44
|
/**
|
|
36
45
|
* Retrieves actual Look Up Values from an EditLookUpItem
|
|
37
46
|
* @param editLookUpItem editLookUpItem to check
|
|
38
47
|
* @param columnId Column to check
|
|
39
48
|
*/
|
|
40
|
-
getEditLookUpValuesForEditLookUpItem(editLookUpItem:
|
|
49
|
+
getEditLookUpValuesForEditLookUpItem(editLookUpItem: EditLookUpPermittedValues, columnId: string, rowData: any): any[] | undefined;
|
|
41
50
|
/**
|
|
42
51
|
* Adds menu item to Column Menu
|
|
43
52
|
* @param userMenuItem Menu Item to add
|
|
@@ -11,6 +11,7 @@ import { XOR } from '../Utilities/Extensions/TypeExtensions';
|
|
|
11
11
|
import { AdaptableAggregationQuery, AdaptableBooleanQuery, AdaptableObservableQuery } from './Common/AdaptableQuery';
|
|
12
12
|
import { ButtonStyle } from './Common/ButtonStyle';
|
|
13
13
|
import { AlertButtonContext } from '../AdaptableOptions/NotificationsOptions';
|
|
14
|
+
import { DataChangedInfo } from './Common/DataChangedInfo';
|
|
14
15
|
/**
|
|
15
16
|
* Predefined Configuration for Alert function
|
|
16
17
|
*/
|
|
@@ -82,6 +83,10 @@ export interface AlertDefinition extends BaseAlertDefinition {
|
|
|
82
83
|
* Type of Alert: 'Info', 'Success', 'Warning', 'Error'; influences Alert colour, icon and logging
|
|
83
84
|
*/
|
|
84
85
|
MessageType: AdaptableMessageType;
|
|
86
|
+
/**
|
|
87
|
+
* Alert Message - can be string or function; if not provided AdapTable creates dynamically using Rule & Scope
|
|
88
|
+
*/
|
|
89
|
+
MessageText?: string | ((scope: AdaptableScope, rule: AlertRule, dataChangedInfo?: DataChangedInfo) => string);
|
|
85
90
|
/**
|
|
86
91
|
* Series of properties which set what happens when Alert is triggered
|
|
87
92
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConfigState } from './ConfigState';
|
|
2
2
|
import { AdaptableObject } from './Common/AdaptableObject';
|
|
3
3
|
import { AdaptableScalarQuery } from './Common/AdaptableQuery';
|
|
4
|
+
import { SpecialColumnSettings } from './Common/SpecialColumnSettings';
|
|
4
5
|
/**
|
|
5
6
|
* Predefined Configuration for Calculated Column function
|
|
6
7
|
**/
|
|
@@ -24,7 +25,7 @@ export interface CalculatedColumn extends AdaptableObject {
|
|
|
24
25
|
*/
|
|
25
26
|
FriendlyName?: string;
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* Additional optional properties for Column (e.g. filterable, resizable)
|
|
28
29
|
*/
|
|
29
30
|
CalculatedColumnSettings?: CalculatedColumnSettings;
|
|
30
31
|
/**
|
|
@@ -35,9 +36,9 @@ export interface CalculatedColumn extends AdaptableObject {
|
|
|
35
36
|
/**
|
|
36
37
|
* Set of optional properties that define a Calculated Column's behaviour
|
|
37
38
|
*/
|
|
38
|
-
export interface CalculatedColumnSettings {
|
|
39
|
+
export interface CalculatedColumnSettings extends SpecialColumnSettings {
|
|
39
40
|
/**
|
|
40
|
-
* Expression's return value DataType; inferred by AdapTable but
|
|
41
|
+
* Expression's return value DataType; inferred by AdapTable but settable by User
|
|
41
42
|
*/
|
|
42
43
|
DataType?: 'String' | 'Number' | 'Boolean' | 'Date';
|
|
43
44
|
/**
|
|
@@ -45,38 +46,4 @@ export interface CalculatedColumnSettings {
|
|
|
45
46
|
* @defaultValue false
|
|
46
47
|
*/
|
|
47
48
|
ShowToolTip?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Preferred width (in pixels) for Column; if unset, calculated dynamically by underlying Grid
|
|
50
|
-
*/
|
|
51
|
-
Width?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Whether Column is filterable
|
|
54
|
-
* @defaultValue true
|
|
55
|
-
*/
|
|
56
|
-
Filterable?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Whether Column can be resized (by dragging column header edges)
|
|
59
|
-
* @defaultValue true
|
|
60
|
-
*/
|
|
61
|
-
Resizable?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Whether Column can be grouped
|
|
64
|
-
* @defaultValue true
|
|
65
|
-
*/
|
|
66
|
-
Groupable?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Whether Column is sortable
|
|
69
|
-
* @defaultValue true
|
|
70
|
-
*/
|
|
71
|
-
Sortable?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Whether Column can be used when grid is in pivot mode
|
|
74
|
-
* @defaultValue true
|
|
75
|
-
*/
|
|
76
|
-
Pivotable?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Whether Column can be used in an aggregation when grouping
|
|
79
|
-
* @defaultValue true
|
|
80
|
-
*/
|
|
81
|
-
Aggregatable?: boolean;
|
|
82
49
|
}
|
|
@@ -16,6 +16,7 @@ const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
|
|
|
16
16
|
const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
|
|
17
17
|
const isSameDay_1 = tslib_1.__importDefault(require("date-fns/isSameDay"));
|
|
18
18
|
const CalendarHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/CalendarHelper"));
|
|
19
|
+
const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
|
|
19
20
|
/**
|
|
20
21
|
* Array of Predicate Defs which are shipped by AdapTable
|
|
21
22
|
*/
|
|
@@ -273,7 +274,7 @@ exports.SystemPredicateDefs = [
|
|
|
273
274
|
icon: { path: 'calendar' },
|
|
274
275
|
columnScope: { DataTypes: ['Date'] },
|
|
275
276
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
276
|
-
handler: ({ value }) => isToday_1.default(value),
|
|
277
|
+
handler: ({ value }) => isToday_1.default(DateHelper_1.parseDateValue(value)),
|
|
277
278
|
},
|
|
278
279
|
{
|
|
279
280
|
id: 'Yesterday',
|
|
@@ -281,7 +282,7 @@ exports.SystemPredicateDefs = [
|
|
|
281
282
|
icon: { path: 'calendar' },
|
|
282
283
|
columnScope: { DataTypes: ['Date'] },
|
|
283
284
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
284
|
-
handler: ({ value }) => isYesterday_1.default(value),
|
|
285
|
+
handler: ({ value }) => isYesterday_1.default(DateHelper_1.parseDateValue(value)),
|
|
285
286
|
},
|
|
286
287
|
{
|
|
287
288
|
id: 'Tomorrow',
|
|
@@ -289,7 +290,7 @@ exports.SystemPredicateDefs = [
|
|
|
289
290
|
icon: { path: 'calendar' },
|
|
290
291
|
columnScope: { DataTypes: ['Date'] },
|
|
291
292
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
292
|
-
handler: ({ value }) => isTomorrow_1.default(value),
|
|
293
|
+
handler: ({ value }) => isTomorrow_1.default(DateHelper_1.parseDateValue(value)),
|
|
293
294
|
},
|
|
294
295
|
{
|
|
295
296
|
id: 'ThisWeek',
|
|
@@ -297,7 +298,7 @@ exports.SystemPredicateDefs = [
|
|
|
297
298
|
icon: { path: 'calendar' },
|
|
298
299
|
columnScope: { DataTypes: ['Date'] },
|
|
299
300
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
300
|
-
handler: ({ value }) => isThisWeek_1.default(value),
|
|
301
|
+
handler: ({ value }) => isThisWeek_1.default(DateHelper_1.parseDateValue(value)),
|
|
301
302
|
},
|
|
302
303
|
{
|
|
303
304
|
id: 'ThisMonth',
|
|
@@ -305,7 +306,7 @@ exports.SystemPredicateDefs = [
|
|
|
305
306
|
icon: { path: 'calendar' },
|
|
306
307
|
columnScope: { DataTypes: ['Date'] },
|
|
307
308
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
308
|
-
handler: ({ value }) => isThisMonth_1.default(value),
|
|
309
|
+
handler: ({ value }) => isThisMonth_1.default(DateHelper_1.parseDateValue(value)),
|
|
309
310
|
},
|
|
310
311
|
{
|
|
311
312
|
id: 'ThisQuarter',
|
|
@@ -313,7 +314,7 @@ exports.SystemPredicateDefs = [
|
|
|
313
314
|
icon: { path: 'calendar' },
|
|
314
315
|
columnScope: { DataTypes: ['Date'] },
|
|
315
316
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
316
|
-
handler: ({ value }) => isThisQuarter_1.default(value),
|
|
317
|
+
handler: ({ value }) => isThisQuarter_1.default(DateHelper_1.parseDateValue(value)),
|
|
317
318
|
},
|
|
318
319
|
{
|
|
319
320
|
id: 'ThisYear',
|
|
@@ -321,7 +322,7 @@ exports.SystemPredicateDefs = [
|
|
|
321
322
|
icon: { path: 'calendar' },
|
|
322
323
|
columnScope: { DataTypes: ['Date'] },
|
|
323
324
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
324
|
-
handler: ({ value }) => isThisYear_1.default(value),
|
|
325
|
+
handler: ({ value }) => isThisYear_1.default(DateHelper_1.parseDateValue(value)),
|
|
325
326
|
},
|
|
326
327
|
{
|
|
327
328
|
id: 'InPast',
|
|
@@ -329,7 +330,7 @@ exports.SystemPredicateDefs = [
|
|
|
329
330
|
icon: { path: 'calendar' },
|
|
330
331
|
columnScope: { DataTypes: ['Date'] },
|
|
331
332
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
332
|
-
handler: ({ value }) => isPast_1.default(value),
|
|
333
|
+
handler: ({ value }) => isPast_1.default(DateHelper_1.parseDateValue(value)),
|
|
333
334
|
},
|
|
334
335
|
{
|
|
335
336
|
id: 'InFuture',
|
|
@@ -337,7 +338,7 @@ exports.SystemPredicateDefs = [
|
|
|
337
338
|
icon: { path: 'calendar' },
|
|
338
339
|
columnScope: { DataTypes: ['Date'] },
|
|
339
340
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
340
|
-
handler: ({ value }) => isFuture_1.default(value),
|
|
341
|
+
handler: ({ value }) => isFuture_1.default(DateHelper_1.parseDateValue(value)),
|
|
341
342
|
},
|
|
342
343
|
{
|
|
343
344
|
id: 'After',
|
|
@@ -346,7 +347,7 @@ exports.SystemPredicateDefs = [
|
|
|
346
347
|
columnScope: { DataTypes: ['Date'] },
|
|
347
348
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
348
349
|
inputs: [{ type: 'date' }],
|
|
349
|
-
handler: ({ value, inputs }) => isAfter_1.default(value, new Date(inputs[0])),
|
|
350
|
+
handler: ({ value, inputs }) => isAfter_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
|
|
350
351
|
toString: ({ inputs }) => `> ${inputs[0]}`,
|
|
351
352
|
},
|
|
352
353
|
{
|
|
@@ -356,7 +357,7 @@ exports.SystemPredicateDefs = [
|
|
|
356
357
|
columnScope: { DataTypes: ['Date'] },
|
|
357
358
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
358
359
|
inputs: [{ type: 'date' }],
|
|
359
|
-
handler: ({ value, inputs }) => isBefore_1.default(value, new Date(inputs[0])),
|
|
360
|
+
handler: ({ value, inputs }) => isBefore_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
|
|
360
361
|
toString: ({ inputs }) => `< ${inputs[0]}`,
|
|
361
362
|
},
|
|
362
363
|
{
|
|
@@ -366,7 +367,7 @@ exports.SystemPredicateDefs = [
|
|
|
366
367
|
columnScope: { DataTypes: ['Date'] },
|
|
367
368
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
368
369
|
inputs: [{ type: 'date' }],
|
|
369
|
-
handler: ({ value, inputs }) => isSameDay_1.default(value, new Date(inputs[0])),
|
|
370
|
+
handler: ({ value, inputs }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
|
|
370
371
|
toString: ({ inputs }) => `= ${inputs[0]}`,
|
|
371
372
|
},
|
|
372
373
|
{
|
|
@@ -376,7 +377,7 @@ exports.SystemPredicateDefs = [
|
|
|
376
377
|
columnScope: { DataTypes: ['Date'] },
|
|
377
378
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
378
379
|
inputs: [{ type: 'date' }],
|
|
379
|
-
handler: ({ value, inputs }) => !isSameDay_1.default(value, new Date(inputs[0])),
|
|
380
|
+
handler: ({ value, inputs }) => !isSameDay_1.default(DateHelper_1.parseDateValue(value), new Date(inputs[0])),
|
|
380
381
|
toString: ({ inputs }) => `!= ${inputs[0]}`,
|
|
381
382
|
},
|
|
382
383
|
{
|
|
@@ -385,7 +386,7 @@ exports.SystemPredicateDefs = [
|
|
|
385
386
|
icon: { path: 'calendar' },
|
|
386
387
|
columnScope: { DataTypes: ['Date'] },
|
|
387
388
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
388
|
-
handler: ({ value, api }) => isSameDay_1.default(value, CalendarHelper_1.default.getNextWorkingDay()),
|
|
389
|
+
handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), CalendarHelper_1.default.getNextWorkingDay()),
|
|
389
390
|
},
|
|
390
391
|
{
|
|
391
392
|
id: 'LastWorkDay',
|
|
@@ -393,7 +394,7 @@ exports.SystemPredicateDefs = [
|
|
|
393
394
|
icon: { path: 'calendar' },
|
|
394
395
|
columnScope: { DataTypes: ['Date'] },
|
|
395
396
|
moduleScope: ['filter', 'alert', 'conditionalstyle'],
|
|
396
|
-
handler: ({ value, api }) => isSameDay_1.default(value, CalendarHelper_1.default.getPreviousWorkingDay()),
|
|
397
|
+
handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), CalendarHelper_1.default.getPreviousWorkingDay()),
|
|
397
398
|
},
|
|
398
399
|
{
|
|
399
400
|
id: 'InRange',
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface DataUpdateConfig {
|
|
5
5
|
/**
|
|
6
|
-
* Whether data should be updated
|
|
6
|
+
* Whether data should be updated asynchronously
|
|
7
7
|
*/
|
|
8
8
|
runAsync?: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Callback function invoked when a batch successfully updates
|
|
11
11
|
*/
|
|
12
12
|
callback?: (res: any) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Index where to add new rows
|
|
15
|
+
*/
|
|
16
|
+
addIndex?: number;
|
|
13
17
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Settings for SpecialColumns
|
|
3
|
+
*/
|
|
4
|
+
export interface SpecialColumnSettings {
|
|
5
|
+
/**
|
|
6
|
+
* Preferred width (in pixels) for Column; if unset, calculated dynamically by underlying Grid
|
|
7
|
+
*/
|
|
8
|
+
Width?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Whether Column is filterable
|
|
11
|
+
* @defaultValue true
|
|
12
|
+
*/
|
|
13
|
+
Filterable?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether Column can be resized (by dragging column header edges)
|
|
16
|
+
* @defaultValue true
|
|
17
|
+
*/
|
|
18
|
+
Resizable?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether Column can be grouped
|
|
21
|
+
* @defaultValue true
|
|
22
|
+
*/
|
|
23
|
+
Groupable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether Column is sortable
|
|
26
|
+
* @defaultValue true
|
|
27
|
+
*/
|
|
28
|
+
Sortable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether Column can be used when grid is in pivot mode
|
|
31
|
+
* @defaultValue true
|
|
32
|
+
*/
|
|
33
|
+
Pivotable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether Column can be used in an aggregation when grouping
|
|
36
|
+
* @defaultValue true
|
|
37
|
+
*/
|
|
38
|
+
Aggregatable?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether if no menu should be shown for this Column header.
|
|
41
|
+
* @defaultValue false
|
|
42
|
+
*/
|
|
43
|
+
SuppressMenu?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether if this Column should be movable via dragging
|
|
46
|
+
* @defaultValue false
|
|
47
|
+
*/
|
|
48
|
+
SuppressMovable?: boolean;
|
|
49
|
+
}
|
|
File without changes
|
|
@@ -48,4 +48,4 @@ export interface ColumnFilterPredicate extends AdaptablePredicate {
|
|
|
48
48
|
PredicateId: TypeHint<string, SystemFilterPredicateId>;
|
|
49
49
|
}
|
|
50
50
|
export declare type SystemFilterPredicateIds = SystemFilterPredicateId[];
|
|
51
|
-
export declare type SystemFilterPredicateId = 'Values' | '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' | 'InRange' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False';
|
|
51
|
+
export declare type SystemFilterPredicateId = 'Values' | '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' | 'InRange' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'BooleanToggle';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfigState } from './ConfigState';
|
|
2
2
|
import { AdaptableObject } from './Common/AdaptableObject';
|
|
3
|
+
import { SpecialColumnSettings } from './Common/SpecialColumnSettings';
|
|
3
4
|
/**
|
|
4
5
|
* Predefined Configuration for the Free Text Column function
|
|
5
6
|
*/
|
|
@@ -39,6 +40,10 @@ export interface FreeTextColumn extends AdaptableObject {
|
|
|
39
40
|
* @defaultValue 'String'
|
|
40
41
|
*/
|
|
41
42
|
DataType?: 'String' | 'Number' | 'Boolean' | 'Date';
|
|
43
|
+
/**
|
|
44
|
+
* Additional optional properties for Column (e.g. filterable, resizable)
|
|
45
|
+
*/
|
|
46
|
+
FreeTextColumnSettings?: FreeTextColumnSettings;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* Defines a cell value stored in a Free Text Column
|
|
@@ -53,3 +58,8 @@ export interface FreeTextStoredValue {
|
|
|
53
58
|
*/
|
|
54
59
|
FreeText: any;
|
|
55
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Set of optional properties that define a FreeText Columns behaviour
|
|
63
|
+
*/
|
|
64
|
+
export interface FreeTextColumnSettings extends SpecialColumnSettings {
|
|
65
|
+
}
|
|
@@ -25,19 +25,27 @@ export interface GridRow {
|
|
|
25
25
|
*/
|
|
26
26
|
export interface RowInfo {
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Is Row a Master Row (in a Master-Detail grid)
|
|
29
29
|
*/
|
|
30
30
|
isMaster?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Is Row expanded (if a group row)
|
|
33
33
|
*/
|
|
34
34
|
isExpanded?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Is Row grouped
|
|
37
37
|
*/
|
|
38
38
|
isGroup?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Is Row selected
|
|
41
|
+
*/
|
|
42
|
+
isSelected?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Is Row displayed (ie. filtered, not necessarily in viewport)
|
|
45
|
+
*/
|
|
46
|
+
isDisplayed?: boolean;
|
|
39
47
|
/**
|
|
40
48
|
* What level the Row is (if Row Grouping is active)
|
|
41
49
|
*/
|
|
42
|
-
|
|
50
|
+
rowGroupLevel?: number;
|
|
43
51
|
}
|
|
@@ -14,7 +14,6 @@ import { CachedQuery } from './QueryState';
|
|
|
14
14
|
import { AdaptableFlashingAlert } from './Common/AdaptableFlashingAlert';
|
|
15
15
|
import { TypeUuid } from './Uuid';
|
|
16
16
|
import { SummaryOperation } from './Common/Enums';
|
|
17
|
-
import { ProgressIndicator } from '../Utilities/Interface/ProgressIndicator';
|
|
18
17
|
import { ExportCustomDestinationPopup } from './ExportState';
|
|
19
18
|
export type { IPushPullReport, IPushPullDomain };
|
|
20
19
|
export type { Glue42Report };
|
|
@@ -63,3 +62,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
63
62
|
suspendTime: Date;
|
|
64
63
|
};
|
|
65
64
|
}
|
|
65
|
+
export interface ProgressIndicator {
|
|
66
|
+
active: boolean;
|
|
67
|
+
label: string;
|
|
68
|
+
}
|
|
@@ -43,6 +43,7 @@ const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
|
|
|
43
43
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
44
44
|
const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
|
|
45
45
|
const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
|
|
46
|
+
const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
|
|
46
47
|
exports.INIT_STATE = 'INIT_STATE';
|
|
47
48
|
exports.LOAD_STATE = 'LOAD_STATE';
|
|
48
49
|
const NON_PERSIST_ACTIONS = {
|
|
@@ -50,6 +51,9 @@ const NON_PERSIST_ACTIONS = {
|
|
|
50
51
|
'@@INIT': true,
|
|
51
52
|
'@@redux/init': true,
|
|
52
53
|
[exports.INIT_STATE]: true,
|
|
54
|
+
// progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
|
|
55
|
+
[SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_SHOW]: true,
|
|
56
|
+
[SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_HIDE]: true,
|
|
53
57
|
};
|
|
54
58
|
exports.InitState = () => ({
|
|
55
59
|
type: exports.INIT_STATE,
|
|
@@ -272,7 +272,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
272
272
|
showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
|
|
273
273
|
alertDefinitions.forEach((alertDefinition) => {
|
|
274
274
|
// might be better to do a single alert with all the messages?
|
|
275
|
-
this.api.alertApi.showAlert(this.api.columnApi.getFriendlyNameFromColumnId(dataChangedInfo.columnId), this.api.alertApi.getAlertDescription(alertDefinition), alertDefinition, dataChangedInfo);
|
|
275
|
+
this.api.alertApi.showAlert(this.api.columnApi.getFriendlyNameFromColumnId(dataChangedInfo.columnId), this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
278
|
showFlashingAlertsForDefinitions(dataChangedInfo, flashingAlertDefinitions = []) {
|
|
@@ -24,6 +24,4 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
24
24
|
getTeamSharingAction(): TeamSharingImportInfo<Report>;
|
|
25
25
|
private isEmptyReportData;
|
|
26
26
|
private showEmptyExportWarning;
|
|
27
|
-
private showExportIndicator;
|
|
28
|
-
private hideExportIndicator;
|
|
29
27
|
}
|
|
@@ -14,7 +14,6 @@ const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
|
14
14
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
15
15
|
const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
|
|
16
16
|
const ObjectFactory_1 = require("../Utilities/ObjectFactory");
|
|
17
|
-
const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
|
|
18
17
|
class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
18
|
constructor(api) {
|
|
20
19
|
super(ModuleConstants.ExportModuleId, 'Export', 'export-data', 'ExportPopup', 'Export data from the Grid to numerous locations in numerous formatso', api);
|
|
@@ -53,68 +52,72 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
52
|
this.api.exportApi.editReports(reportsToEdit);
|
|
54
53
|
}
|
|
55
54
|
addContextMenuItems(menuContext) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
const canExport = !menuContext.isRowGroupColumn &&
|
|
56
|
+
this.isModuleAvailable() &&
|
|
57
|
+
menuContext.selectedCellInfo &&
|
|
58
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
|
|
59
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
|
|
60
|
+
if (!canExport) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const selectedCellReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_CELLS_REPORT);
|
|
64
|
+
const menuItems = [];
|
|
65
|
+
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
66
|
+
menuItems.push(this.createColumnMenuItemClickFunction(destination, this.moduleInfo.Glyph, () => this.export(selectedCellReport, destination)));
|
|
67
|
+
}
|
|
68
|
+
for (const customDestination of this.api.exportApi.getAllCustomDestination()) {
|
|
69
|
+
menuItems.push(this.createColumnMenuItemClickFunction(customDestination.name, this.moduleInfo.Glyph, () => this.export(selectedCellReport, customDestination.name)));
|
|
66
70
|
}
|
|
67
|
-
return [
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
label: 'Export Selected Cells',
|
|
74
|
+
isVisible: true,
|
|
75
|
+
icon: this.moduleInfo.Glyph,
|
|
76
|
+
subItems: menuItems,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
68
79
|
}
|
|
69
80
|
export(report, exportDestination) {
|
|
70
|
-
this.
|
|
71
|
-
// setTimeout required to give the export indicator a head-start to render
|
|
72
|
-
setTimeout(() => {
|
|
81
|
+
this.api.internalApi.executeWithProgressIndicator(`${report.Name} Export in progress...`, () => {
|
|
73
82
|
var _a;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
else if (customDestination) {
|
|
86
|
-
customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
|
|
87
|
-
}
|
|
83
|
+
if (this.isCustomDestination(exportDestination)) {
|
|
84
|
+
const customDestination = (_a = this.api.internalApi
|
|
85
|
+
.getAdaptableOptions()
|
|
86
|
+
.exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
|
|
87
|
+
if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
|
|
88
|
+
this.api.internalApi.dispatchReduxAction(SystemRedux.SystemExportCustomDestinationPopupShow({
|
|
89
|
+
ReportName: report.Name,
|
|
90
|
+
ExportDestination: customDestination,
|
|
91
|
+
}));
|
|
88
92
|
}
|
|
89
|
-
else {
|
|
90
|
-
|
|
91
|
-
case Enums_1.ExportDestination.Excel:
|
|
92
|
-
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
93
|
-
// WYSIWYG is fully delegated to the ag-grid excel export
|
|
94
|
-
this.api.exportApi.exportVisualDataToExcel();
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
this.convertReportToExcel(report);
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
case Enums_1.ExportDestination.Clipboard:
|
|
101
|
-
this.copyToClipboard(report);
|
|
102
|
-
break;
|
|
103
|
-
case Enums_1.ExportDestination.CSV:
|
|
104
|
-
this.convertReportToCsv(report);
|
|
105
|
-
break;
|
|
106
|
-
case Enums_1.ExportDestination.JSON:
|
|
107
|
-
this.convertReportToJSON(report);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
93
|
+
else if (customDestination) {
|
|
94
|
+
customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
|
|
110
95
|
}
|
|
111
|
-
this.hideExportIndicator();
|
|
112
96
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
else {
|
|
98
|
+
switch (exportDestination) {
|
|
99
|
+
case Enums_1.ExportDestination.Excel:
|
|
100
|
+
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
101
|
+
// WYSIWYG is fully delegated to the ag-grid excel export
|
|
102
|
+
this.api.exportApi.exportVisualDataToExcel();
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
this.convertReportToExcel(report);
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case Enums_1.ExportDestination.Clipboard:
|
|
109
|
+
this.copyToClipboard(report);
|
|
110
|
+
break;
|
|
111
|
+
case Enums_1.ExportDestination.CSV:
|
|
112
|
+
this.convertReportToCsv(report);
|
|
113
|
+
break;
|
|
114
|
+
case Enums_1.ExportDestination.JSON:
|
|
115
|
+
this.convertReportToJSON(report);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
116
118
|
}
|
|
117
|
-
|
|
119
|
+
this.api.internalApi.hideProgressIndicator();
|
|
120
|
+
});
|
|
118
121
|
}
|
|
119
122
|
isCustomDestination(exportDestination) {
|
|
120
123
|
if (Object.values(Enums_1.ExportDestination).some((val) => val === exportDestination)) {
|
|
@@ -183,11 +186,5 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
183
186
|
alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
184
187
|
}));
|
|
185
188
|
}
|
|
186
|
-
showExportIndicator(label) {
|
|
187
|
-
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorShow(label));
|
|
188
|
-
}
|
|
189
|
-
hideExportIndicator() {
|
|
190
|
-
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorHide());
|
|
191
|
-
}
|
|
192
189
|
}
|
|
193
190
|
exports.ExportModule = ExportModule;
|
|
@@ -131,6 +131,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
131
131
|
useAdaptableQuickFilter: true,
|
|
132
132
|
clearFiltersOnStartUp: false,
|
|
133
133
|
quickFilterTrigger: 'mouseenter',
|
|
134
|
+
quickFilterValuesTrigger: 'mouseenter',
|
|
134
135
|
filterActionOnUserDataChange: {
|
|
135
136
|
applyFilter: GeneralConstants.FILTER_ALWAYS,
|
|
136
137
|
throttleDelay: 0,
|
|
@@ -6,5 +6,5 @@ export declare const isValidDate: (date: Date) => boolean;
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const isValueValidDate: (data: any) => boolean;
|
|
8
8
|
export declare const dateToISO: (date: Date | number | string) => string;
|
|
9
|
-
export declare const parseToISO: (date: string | Date | number, dateFormat
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const parseToISO: (date: string | Date | number, dateFormat?: string) => string;
|
|
10
|
+
export declare const parseDateValue: (dateValue: string | Date | number, dateFormat?: string) => Date | undefined;
|