@adaptabletools/adaptable 12.0.0-canary.2 → 12.0.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +15 -14
- package/bundle.cjs.js +162 -148
- package/index.css +15 -14
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +5 -9
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
- package/src/AdaptableOptions/EditOptions.d.ts +22 -3
- package/src/AdaptableOptions/GeneralOptions.d.ts +7 -0
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -5
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AlertApi.d.ts +3 -3
- package/src/Api/Events/RowFormSubmitted.d.ts +15 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +3 -3
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -3
- package/src/PredefinedConfig/AlertState.d.ts +4 -4
- package/src/PredefinedConfig/Common/FormContext.d.ts +3 -0
- package/src/Redux/Store/AdaptableStore.js +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +13 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +3 -3
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
- package/src/components/Datepicker/Caption.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +105 -21
- package/src/metamodel/adaptable.metamodel.js +116 -32
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/index.css
CHANGED
|
@@ -1177,7 +1177,7 @@ template {
|
|
|
1177
1177
|
padding: 0 !important;
|
|
1178
1178
|
overflow: hidden !important;
|
|
1179
1179
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
1180
|
-
border: 0 !important
|
|
1180
|
+
border: 0 !important;
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
1183
|
/* Buttons */
|
|
@@ -1201,22 +1201,23 @@ template {
|
|
|
1201
1201
|
border: 2px solid transparent;
|
|
1202
1202
|
}
|
|
1203
1203
|
|
|
1204
|
-
.rdp-button[disabled] {
|
|
1204
|
+
.rdp-button[aria-disabled='true'] {
|
|
1205
1205
|
opacity: 0.25;
|
|
1206
|
+
pointer-events: none;
|
|
1206
1207
|
}
|
|
1207
1208
|
|
|
1208
|
-
.rdp-button:not([disabled]) {
|
|
1209
|
+
.rdp-button:not([aria-disabled='true']) {
|
|
1209
1210
|
cursor: pointer;
|
|
1210
1211
|
}
|
|
1211
1212
|
|
|
1212
|
-
.rdp-button:focus
|
|
1213
|
-
.rdp-button:active
|
|
1213
|
+
.rdp-button:focus,
|
|
1214
|
+
.rdp-button:active {
|
|
1214
1215
|
color: inherit;
|
|
1215
1216
|
border: var(--rdp-outline);
|
|
1216
1217
|
background-color: var(--rdp-background-color);
|
|
1217
1218
|
}
|
|
1218
1219
|
|
|
1219
|
-
.rdp-button:hover:not([disabled]) {
|
|
1220
|
+
.rdp-button:hover:not([aria-disabled='true']) {
|
|
1220
1221
|
background-color: var(--rdp-background-color);
|
|
1221
1222
|
}
|
|
1222
1223
|
|
|
@@ -1347,8 +1348,8 @@ template {
|
|
|
1347
1348
|
color: unset;
|
|
1348
1349
|
}
|
|
1349
1350
|
|
|
1350
|
-
.rdp-dropdown:focus:not([disabled])
|
|
1351
|
-
.rdp-dropdown:active:not([disabled])
|
|
1351
|
+
.rdp-dropdown:focus:not([disabled]) + .rdp-caption_label,
|
|
1352
|
+
.rdp-dropdown:active:not([disabled]) + .rdp-caption_label {
|
|
1352
1353
|
border: var(--rdp-outline);
|
|
1353
1354
|
border-radius: 6px;
|
|
1354
1355
|
background-color: var(--rdp-background-color);
|
|
@@ -1382,7 +1383,7 @@ template {
|
|
|
1382
1383
|
border: 0;
|
|
1383
1384
|
}
|
|
1384
1385
|
|
|
1385
|
-
.rdp-
|
|
1386
|
+
.rdp-tfoot {
|
|
1386
1387
|
margin: 0.5em;
|
|
1387
1388
|
}
|
|
1388
1389
|
|
|
@@ -1417,15 +1418,15 @@ template {
|
|
|
1417
1418
|
font-weight: bold;
|
|
1418
1419
|
}
|
|
1419
1420
|
|
|
1420
|
-
.rdp-day_selected:not([disabled]),
|
|
1421
|
-
.rdp-day_selected:focus:not([disabled]),
|
|
1422
|
-
.rdp-day_selected:active:not([disabled]),
|
|
1423
|
-
.rdp-day_selected:hover:not([disabled]) {
|
|
1421
|
+
.rdp-day_selected:not([aria-disabled='true']),
|
|
1422
|
+
.rdp-day_selected:focus:not([aria-disabled='true']),
|
|
1423
|
+
.rdp-day_selected:active:not([aria-disabled='true']),
|
|
1424
|
+
.rdp-day_selected:hover:not([aria-disabled='true']) {
|
|
1424
1425
|
color: white;
|
|
1425
1426
|
background-color: var(--rdp-accent-color);
|
|
1426
1427
|
}
|
|
1427
1428
|
|
|
1428
|
-
.rdp-day_selected:focus:not([disabled]) {
|
|
1429
|
+
.rdp-day_selected:focus:not([aria-disabled='true']) {
|
|
1429
1430
|
border: var(--rdp-outline-selected);
|
|
1430
1431
|
}
|
|
1431
1432
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.0.0-canary.
|
|
3
|
+
"version": "12.0.0-canary.3",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"re-resizable": "^6.9.1",
|
|
42
42
|
"react": "^16.8.0 || ^17.0.0",
|
|
43
43
|
"react-beautiful-dnd": "13.1.0",
|
|
44
|
-
"react-day-picker": "8.0.
|
|
44
|
+
"react-day-picker": "8.0.6",
|
|
45
45
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
46
46
|
"react-redux": "7.2.4",
|
|
47
47
|
"react-remove-scroll": "2.4.2",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1654758749447;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormContext } from '../../types';
|
|
2
2
|
import { AlertButton, AlertDefinition } from '../PredefinedConfig/AlertState';
|
|
3
3
|
import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
4
|
-
import { AdaptableForm
|
|
4
|
+
import { AdaptableForm } from '../PredefinedConfig/Common/AdaptableForm';
|
|
5
5
|
import { CellDataChangedInfo } from '../types';
|
|
6
6
|
/**
|
|
7
7
|
* Options related to Alerts in Adaptable.
|
|
@@ -65,7 +65,7 @@ export declare type ActionHandler = {
|
|
|
65
65
|
/**
|
|
66
66
|
* Handler function to call when the Button is clicked
|
|
67
67
|
*/
|
|
68
|
-
handler: (button: AlertButton<
|
|
68
|
+
handler: (button: AlertButton<AlertFormContext>, context: AlertFormContext) => void;
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* Form to show in an Alert
|
|
@@ -78,20 +78,16 @@ export declare type AlertForm = {
|
|
|
78
78
|
/**
|
|
79
79
|
* The Form to display in the Alert
|
|
80
80
|
*/
|
|
81
|
-
form: AdaptableForm<
|
|
81
|
+
form: AdaptableForm<AlertFormContext>;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
84
|
* Context required by functions when using an Alert Button
|
|
85
85
|
*/
|
|
86
|
-
export interface
|
|
86
|
+
export interface AlertFormContext extends FormContext {
|
|
87
87
|
/**
|
|
88
88
|
* Alert that has been triggered
|
|
89
89
|
*/
|
|
90
90
|
alert: AdaptableAlert;
|
|
91
|
-
/**
|
|
92
|
-
* Data in the Alert Form
|
|
93
|
-
*/
|
|
94
|
-
formData?: AdaptableFormData;
|
|
95
91
|
}
|
|
96
92
|
/**
|
|
97
93
|
* Context used for creating bespoke Alert messages
|
|
@@ -80,13 +80,9 @@ export interface DashboardButtonContext extends BaseContext {
|
|
|
80
80
|
/**
|
|
81
81
|
* Context required by functions when using a Custom Toolbar Button
|
|
82
82
|
*/
|
|
83
|
-
export interface CustomToolbarButtonContext extends
|
|
83
|
+
export interface CustomToolbarButtonContext extends DashboardButtonContext {
|
|
84
84
|
/**
|
|
85
85
|
* Custom Toolbar which hosts the Button
|
|
86
86
|
*/
|
|
87
87
|
customToolbar: CustomToolbar;
|
|
88
|
-
/**
|
|
89
|
-
* Current Dashboard State
|
|
90
|
-
*/
|
|
91
|
-
dashboardState: DashboardState;
|
|
92
88
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
|
|
2
|
-
import {
|
|
2
|
+
import { ActionColumnContext, AdaptableButton } from '../types';
|
|
3
3
|
export declare type AdaptableDataChangeHistoryAction = 'undo';
|
|
4
|
-
export interface DataChangeHistoryContext extends
|
|
4
|
+
export interface DataChangeHistoryContext extends ActionColumnContext {
|
|
5
5
|
/**
|
|
6
6
|
* Helper function to undo the change.
|
|
7
7
|
*/
|
|
@@ -5,9 +5,7 @@ import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedI
|
|
|
5
5
|
import { MathOperation } from '../PredefinedConfig/Common/Enums';
|
|
6
6
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
7
7
|
/**
|
|
8
|
-
* Options related to Editing in Adaptable
|
|
9
|
-
*
|
|
10
|
-
* Allows users to provide Adaptable with Server Validation that works in conjunction with Client (aka Cell) Validation
|
|
8
|
+
* Options related to Editing in Adaptable - includes Server Validation, Smart Edit Operations and Row Forms
|
|
11
9
|
*/
|
|
12
10
|
export interface EditOptions {
|
|
13
11
|
/**
|
|
@@ -108,13 +106,34 @@ export interface RowFormOptions {
|
|
|
108
106
|
*/
|
|
109
107
|
onFormSubmit?: (rowFormSubmittedInfo: RowFormSubmittedInfo) => void;
|
|
110
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Context passed into a Row Form - can be `CreateRowFormContext` or `EditRowFormContext`
|
|
111
|
+
*/
|
|
111
112
|
export declare type RowFormContext = CreateRowFormContext | EditRowFormContext;
|
|
113
|
+
/**
|
|
114
|
+
* Context used in a Create Row Form
|
|
115
|
+
*/
|
|
112
116
|
export interface CreateRowFormContext extends FormContext {
|
|
117
|
+
/**
|
|
118
|
+
* Type of the Context
|
|
119
|
+
*/
|
|
113
120
|
type: Extract<RowFormType, 'rowCreated'>;
|
|
121
|
+
/**
|
|
122
|
+
* The RowNode being cloned
|
|
123
|
+
*/
|
|
114
124
|
clonedRowNode?: RowNode;
|
|
115
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Context used in an Edit Row Form
|
|
128
|
+
*/
|
|
116
129
|
export interface EditRowFormContext extends FormContext {
|
|
130
|
+
/**
|
|
131
|
+
* Type of the Context
|
|
132
|
+
*/
|
|
117
133
|
type: Extract<RowFormType, 'rowEdited'>;
|
|
134
|
+
/**
|
|
135
|
+
* The RowNode being edited
|
|
136
|
+
*/
|
|
118
137
|
rowNode: RowNode;
|
|
119
138
|
}
|
|
120
139
|
export interface FormParamContext extends BaseContext {
|
|
@@ -91,5 +91,12 @@ export interface DataSet extends AdaptableObject {
|
|
|
91
91
|
*/
|
|
92
92
|
form?: AdaptableForm<DataSetFormContext>;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Used when a DataSet displays a Form
|
|
96
|
+
*/
|
|
94
97
|
export interface DataSetFormContext extends FormContext {
|
|
98
|
+
/**
|
|
99
|
+
* The DataSet which triggered the Form
|
|
100
|
+
*/
|
|
101
|
+
dataSet: DataSet;
|
|
95
102
|
}
|
|
@@ -57,13 +57,9 @@ export interface ToolPanelButtonContext extends BaseContext {
|
|
|
57
57
|
*/
|
|
58
58
|
toolPanelState: ToolPanelState;
|
|
59
59
|
}
|
|
60
|
-
export interface CustomToolPanelButtonContext extends
|
|
60
|
+
export interface CustomToolPanelButtonContext extends ToolPanelButtonContext {
|
|
61
61
|
/**
|
|
62
62
|
*The Custom ToolPanel which contains the button
|
|
63
63
|
*/
|
|
64
64
|
customToolPanel: CustomToolPanel;
|
|
65
|
-
/**
|
|
66
|
-
* Current ToolPanel State
|
|
67
|
-
*/
|
|
68
|
-
toolPanelState: ToolPanelState;
|
|
69
65
|
}
|
|
@@ -152,7 +152,7 @@ export interface ActionColumn extends AdaptableObject {
|
|
|
152
152
|
/**
|
|
153
153
|
* Button (or list of buttons) to display in the Column
|
|
154
154
|
*/
|
|
155
|
-
actionColumnButton: AdaptableButton<
|
|
155
|
+
actionColumnButton: AdaptableButton<ActionColumnContext> | AdaptableButton<ActionColumnContext>[];
|
|
156
156
|
/**
|
|
157
157
|
* Shows Action Column also in grouped rows
|
|
158
158
|
*/
|
|
@@ -165,7 +165,7 @@ export interface ActionColumn extends AdaptableObject {
|
|
|
165
165
|
/**
|
|
166
166
|
* Context required by functions when using an Action Column Button
|
|
167
167
|
*/
|
|
168
|
-
export interface
|
|
168
|
+
export interface ActionColumnContext extends BaseContext {
|
|
169
169
|
/**
|
|
170
170
|
* Action Column in question
|
|
171
171
|
*/
|
package/src/Api/AlertApi.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AdaptableScope } from '../PredefinedConfig/Common/AdaptableScope';
|
|
|
4
4
|
import { AdaptablePredicateDef } from '../PredefinedConfig/Common/AdaptablePredicate';
|
|
5
5
|
import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
6
6
|
import { AdaptableForm, AdaptableFormData } from '../PredefinedConfig/Common/AdaptableForm';
|
|
7
|
-
import { AdaptableMessageType,
|
|
7
|
+
import { AdaptableMessageType, AlertFormContext, AlertProperties, GridDataChangedInfo } from '../types';
|
|
8
8
|
/**
|
|
9
9
|
* Provides run-time access to Alert function and associated State
|
|
10
10
|
*/
|
|
@@ -18,7 +18,7 @@ export interface AlertApi {
|
|
|
18
18
|
* Retrieeves the Adaptable Form with the given name
|
|
19
19
|
* @param name name of the Form
|
|
20
20
|
*/
|
|
21
|
-
getAdaptableFormByName(name: string): AdaptableForm<
|
|
21
|
+
getAdaptableFormByName(name: string): AdaptableForm<AlertFormContext> | undefined;
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* Retrieves all Alert Definitions in Alert State
|
|
@@ -89,7 +89,7 @@ export interface AlertApi {
|
|
|
89
89
|
/**
|
|
90
90
|
* Runs after a button in an Alert Form is clicked
|
|
91
91
|
*/
|
|
92
|
-
executeAlertButton(button: AlertButton<
|
|
92
|
+
executeAlertButton(button: AlertButton<AlertFormContext>, context: AlertFormContext): void;
|
|
93
93
|
/**
|
|
94
94
|
* Runs after an Alert Action is invoked
|
|
95
95
|
* @param actionName Action which has been invoked
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
2
2
|
import { AdaptableFormData } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
3
3
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
4
|
+
/**
|
|
5
|
+
* Info passed into RowFormSubmitted Event - can be `CreatedRowFormInfo` or `EditedRowFormInfo` or `DeletedRowFormInfo`
|
|
6
|
+
*/
|
|
4
7
|
export declare type RowFormSubmittedInfo = CreatedRowFormInfo | EditedRowFormInfo | DeletedRowFormInfo;
|
|
8
|
+
/**
|
|
9
|
+
* Type of Row Form - Created, Edited or Deleted
|
|
10
|
+
*/
|
|
5
11
|
export declare type RowFormType = 'rowCreated' | 'rowEdited' | 'rowDeleted';
|
|
12
|
+
/**
|
|
13
|
+
* Info passed into RowFormSubmitted Event for Created Rows
|
|
14
|
+
*/
|
|
6
15
|
export interface CreatedRowFormInfo extends BaseEventInfo {
|
|
7
16
|
type: 'rowCreated';
|
|
8
17
|
formData: AdaptableFormData;
|
|
9
18
|
clonedRowNode?: RowNode;
|
|
10
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Info passed into RowFormSubmitted Event for Edited Rows
|
|
22
|
+
*/
|
|
11
23
|
export interface EditedRowFormInfo extends BaseEventInfo {
|
|
12
24
|
type: 'rowEdited';
|
|
13
25
|
formData: AdaptableFormData;
|
|
14
26
|
rowNode: RowNode;
|
|
15
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Info passed into RowFormSubmitted Event for Deleted Rows
|
|
30
|
+
*/
|
|
16
31
|
export interface DeletedRowFormInfo extends BaseEventInfo {
|
|
17
32
|
type: 'rowDeleted';
|
|
18
33
|
rowNode: RowNode;
|
|
@@ -6,12 +6,12 @@ import { AdaptableScope } from '../../PredefinedConfig/Common/AdaptableScope';
|
|
|
6
6
|
import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
7
7
|
import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
|
|
8
8
|
import { AdaptableForm, AdaptableFormData } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
9
|
-
import {
|
|
9
|
+
import { AlertFormContext } from '../../AdaptableOptions/AlertOptions';
|
|
10
10
|
import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
|
|
11
11
|
import { GridDataChangedInfo } from '../Events/GridDataChanged';
|
|
12
12
|
export declare class AlertApiImpl extends ApiBase implements AlertApi {
|
|
13
13
|
getAlertState(): AlertState;
|
|
14
|
-
getAdaptableFormByName(name: string): AdaptableForm<
|
|
14
|
+
getAdaptableFormByName(name: string): AdaptableForm<AlertFormContext> | undefined;
|
|
15
15
|
getAlertDefinitions(config?: {
|
|
16
16
|
includeLayoutNotAssociatedObjects?: boolean;
|
|
17
17
|
}): AlertDefinition[];
|
|
@@ -23,7 +23,7 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
|
|
|
23
23
|
getAlertDefinitionsWithPreventEdit(): AlertDefinition[];
|
|
24
24
|
getAlertDefinitionsWithAllowEdit(): AlertDefinition[];
|
|
25
25
|
addAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
|
|
26
|
-
executeAlertButton(button: AlertButton<
|
|
26
|
+
executeAlertButton(button: AlertButton<AlertFormContext>, context: AlertFormContext): void;
|
|
27
27
|
executeAlertAction(actionName: AdaptableAlertAction, details: {
|
|
28
28
|
alertDefinition: AlertDefinition;
|
|
29
29
|
cellDataChangedInfo?: CellDataChangedInfo;
|
|
@@ -11,7 +11,7 @@ import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInf
|
|
|
11
11
|
import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
|
|
12
12
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
|
-
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState,
|
|
14
|
+
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertFormContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo, SharedEntity, AdaptableIcon } from '../../types';
|
|
15
15
|
import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
|
|
16
16
|
import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
|
|
17
17
|
import { IReportService } from '../../Utilities/Services/Interface/IReportService';
|
|
@@ -39,8 +39,8 @@ import { EditLookUpPermittedValues } from '../../../types';
|
|
|
39
39
|
import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
|
|
40
40
|
export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
41
41
|
getSystemState(): SystemState;
|
|
42
|
-
getAdaptableFormFromAlertForm(alertForm: string | AlertButtonForm, context: any, defaultMessageType?: AdaptableMessageType): (Omit<AdaptableForm<
|
|
43
|
-
buttons?: (Omit<AdaptableButton<
|
|
42
|
+
getAdaptableFormFromAlertForm(alertForm: string | AlertButtonForm, context: any, defaultMessageType?: AdaptableMessageType): (Omit<AdaptableForm<AlertFormContext>, 'buttons'> & {
|
|
43
|
+
buttons?: (Omit<AdaptableButton<AlertFormContext>, 'buttonStyle'> & {
|
|
44
44
|
buttonStyle?: ButtonStyle;
|
|
45
45
|
})[];
|
|
46
46
|
}) | undefined;
|
|
@@ -10,7 +10,7 @@ import { AdaptableStyle } from './Common/AdaptableStyle';
|
|
|
10
10
|
import { XOR } from '../Utilities/Extensions/TypeExtensions';
|
|
11
11
|
import { AdaptableAggregatedBooleanQuery, AdaptableBooleanQuery, AdaptableObservableQuery } from './Common/AdaptableQuery';
|
|
12
12
|
import { ButtonStyle } from './Common/ButtonStyle';
|
|
13
|
-
import {
|
|
13
|
+
import { AlertFormContext, BaseContext } from '../types';
|
|
14
14
|
/**
|
|
15
15
|
* Predefined Configuration for Alert Module
|
|
16
16
|
*/
|
|
@@ -49,8 +49,8 @@ export interface AlertDefinition extends SuspendableObject {
|
|
|
49
49
|
*/
|
|
50
50
|
AlertForm?: string | AlertButtonForm;
|
|
51
51
|
}
|
|
52
|
-
export declare type AlertButtonForm = Omit<AdaptableForm<
|
|
53
|
-
Buttons?: AlertButton<
|
|
52
|
+
export declare type AlertButtonForm = Omit<AdaptableForm<AlertFormContext>, 'title' | 'buttons' | 'fields' | 'description'> & {
|
|
53
|
+
Buttons?: AlertButton<AlertFormContext>[];
|
|
54
54
|
};
|
|
55
55
|
export interface AlertDefinitionPredicate extends AdaptablePredicate {
|
|
56
56
|
PredicateId: TypeHint<string, SystemAlertPredicateId>;
|
|
@@ -69,7 +69,7 @@ export declare type AdaptableAlertAction = 'highlight-cell' | 'highlight-row' |
|
|
|
69
69
|
/**
|
|
70
70
|
* Defines a button that appears in an Alert Form
|
|
71
71
|
*/
|
|
72
|
-
export interface AlertButton<
|
|
72
|
+
export interface AlertButton<AlertFormContext> extends Omit<AdaptableButton<BaseContext>, 'onClick' | 'label' | 'buttonStyle' | 'hidden' | 'disabled' | 'tooltip'> {
|
|
73
73
|
/**
|
|
74
74
|
* Predefined Action(s) to trigger when button is clicked; but the implementation in `actionHandlers` property of Alert Options
|
|
75
75
|
*/
|
|
@@ -730,6 +730,12 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
730
730
|
middlewareAPI.dispatch(PopupRedux_1.PopupShowForm({
|
|
731
731
|
Id: 'data-set-form',
|
|
732
732
|
Form: dataSet.form,
|
|
733
|
+
prepareContext: (context) => {
|
|
734
|
+
return new Promise((resolve) => {
|
|
735
|
+
const preparedContext = Object.assign(Object.assign({}, context), { dataSet });
|
|
736
|
+
resolve(preparedContext);
|
|
737
|
+
});
|
|
738
|
+
},
|
|
733
739
|
}));
|
|
734
740
|
}
|
|
735
741
|
});
|
|
@@ -7,7 +7,19 @@ export interface CustomSection<T> {
|
|
|
7
7
|
details?: AdaptableFrameworkComponent;
|
|
8
8
|
isValid?: OnePageWizardSection<T>['isValid'];
|
|
9
9
|
isVisible?: OnePageWizardSection<T>['isVisible'];
|
|
10
|
-
render: (
|
|
10
|
+
render: (
|
|
11
|
+
/**
|
|
12
|
+
* Internal state of adaptableOptions.
|
|
13
|
+
*/
|
|
14
|
+
adaptableOptions: AdaptableOptions,
|
|
15
|
+
/**
|
|
16
|
+
* With this callback adaptableOptions can be changed.
|
|
17
|
+
*/
|
|
18
|
+
onChange: (newAdaptableOptions: AdaptableOptions) => void,
|
|
19
|
+
/**
|
|
20
|
+
* Set the selected columns.
|
|
21
|
+
*/
|
|
22
|
+
setSelectedColumns: (selectedColumn: Record<string, boolean>) => void) => React.ReactNode;
|
|
11
23
|
}
|
|
12
24
|
export interface ConfigurationWizardProps {
|
|
13
25
|
adaptableOptions: AdaptableOptions;
|
|
@@ -76,7 +76,7 @@ exports.ConfigurationWizard = (props) => {
|
|
|
76
76
|
isValid: section.isValid,
|
|
77
77
|
isVisible: section.isVisible,
|
|
78
78
|
render: () => {
|
|
79
|
-
return section.render(adaptableOptions, setAdaptableOptions);
|
|
79
|
+
return section.render(adaptableOptions, setAdaptableOptions, setSelectedColumns);
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
}),
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { AlertButton } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
import { AdaptableAlert } from '../../../PredefinedConfig/Common/AdaptableAlert';
|
|
4
4
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
5
|
-
import {
|
|
5
|
+
import { AlertFormContext } from '../../../types';
|
|
6
6
|
declare type AlertButtonsEditorProps = {
|
|
7
|
-
AlertButtons: AlertButton<
|
|
8
|
-
onChange: (buttons: AlertButton<
|
|
7
|
+
AlertButtons: AlertButton<AlertFormContext>[];
|
|
8
|
+
onChange: (buttons: AlertButton<AlertFormContext>[]) => void;
|
|
9
9
|
api: AdaptableApi;
|
|
10
10
|
adaptableAlert: AdaptableAlert;
|
|
11
11
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
2
|
-
import {
|
|
3
|
-
export declare const buildActionColumnButton: (options: DataChangeHistoryOptions, undoRowNode: (rowNode: RowNode) => void) => AdaptableButton<
|
|
2
|
+
import { ActionColumnContext, AdaptableButton, DataChangeHistoryOptions } from '../../types';
|
|
3
|
+
export declare const buildActionColumnButton: (options: DataChangeHistoryOptions, undoRowNode: (rowNode: RowNode) => void) => AdaptableButton<ActionColumnContext>[];
|
|
@@ -14,7 +14,7 @@ const react_day_picker_1 = require("react-day-picker");
|
|
|
14
14
|
function Caption(props) {
|
|
15
15
|
const { displayMonth } = props;
|
|
16
16
|
const context = react_day_picker_1.useDayPicker();
|
|
17
|
-
const { classNames,
|
|
17
|
+
const { classNames, disableNavigation, styles, onMonthChange, dir } = context;
|
|
18
18
|
const { goToMonth, displayMonths } = react_day_picker_1.useNavigation();
|
|
19
19
|
const handlePreviousClick = () => {
|
|
20
20
|
handleMonthChange(add_1.default(displayMonth, { months: -1 }));
|