@adaptabletools/adaptable 12.0.5 → 12.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs.js +92 -92
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/InternalApiImpl.js +3 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +2 -6
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/CellSummaryModule.js +4 -3
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -2
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/Utilities/Services/RowEditService.js +4 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +8 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/{ConfigurationForm.js → AdaptableOptionsForm.js} +3 -39
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +27 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/{ConfigurationForm.d.ts → EntitlementsForm.d.ts} +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +17 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +8 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +54 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -1
- package/src/agGrid/Adaptable.js +9 -7
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -0
- package/src/components/ExpressionEditor/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.8",
|
|
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",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1657781105254;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -261,8 +261,9 @@ export interface GridApi {
|
|
|
261
261
|
* Retrieves Formatted Value for a given Raw Value in given Column
|
|
262
262
|
* @param columnId ColumnId to lookup
|
|
263
263
|
* @param rawValue Raw Value
|
|
264
|
+
* @param rowNode Node containig the Column
|
|
264
265
|
*/
|
|
265
|
-
|
|
266
|
+
getDisplayValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
|
|
266
267
|
/**
|
|
267
268
|
* Retrieves Display Value for Cell in given Row and Column
|
|
268
269
|
* @param rowNode Row to use
|
|
@@ -65,7 +65,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
65
65
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
66
66
|
getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
67
67
|
getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
68
|
-
|
|
68
|
+
getDisplayValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
|
|
69
69
|
getNormalisedValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
|
|
70
70
|
getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
|
|
71
71
|
getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
|
|
@@ -200,7 +200,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
200
200
|
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
201
201
|
return this.adaptable.getDisplayValueFromRowNode(rowNode, columnId);
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
getDisplayValueFromRawValue(rowNode, columnId, rawValue) {
|
|
204
204
|
return this.adaptable.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
|
|
205
205
|
}
|
|
206
206
|
getNormalisedValueFromRowNode(rowNode, columnId) {
|
|
@@ -390,6 +390,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
390
390
|
getQueryPreviewData() {
|
|
391
391
|
var _a;
|
|
392
392
|
const firstRowNode = this.adaptable.api.gridApi.getFirstRowNode();
|
|
393
|
+
if (firstRowNode == undefined) {
|
|
394
|
+
return {};
|
|
395
|
+
}
|
|
393
396
|
const firstRowData = (_a = Object.assign({}, firstRowNode === null || firstRowNode === void 0 ? void 0 : firstRowNode.data)) !== null && _a !== void 0 ? _a : {};
|
|
394
397
|
// handle CalcCols which are not persisted in the rowModel
|
|
395
398
|
this.adaptable.api.calculatedColumnApi.getAllCalculatedColumn().forEach((calculatedColumn) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseContext } from '../../../types';
|
|
2
2
|
import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
|
|
3
3
|
/**
|
|
4
4
|
* Defines the Summary operations provides for Selected Cells
|
|
@@ -30,7 +30,7 @@ export interface CellSummaryOperation {
|
|
|
30
30
|
/**
|
|
31
31
|
* Context provided to a custom Cell Summary Operation function
|
|
32
32
|
*/
|
|
33
|
-
export interface CellSummaryOperationContext {
|
|
33
|
+
export interface CellSummaryOperationContext extends BaseContext {
|
|
34
34
|
/**
|
|
35
35
|
* Currently selected cells
|
|
36
36
|
*/
|
|
@@ -51,8 +51,4 @@ export interface CellSummaryOperationContext {
|
|
|
51
51
|
* Count of currently selected cells
|
|
52
52
|
*/
|
|
53
53
|
distinctCount: number;
|
|
54
|
-
/**
|
|
55
|
-
* Adaptable Api object
|
|
56
|
-
*/
|
|
57
|
-
api: AdaptableApi;
|
|
58
54
|
}
|
|
@@ -32,8 +32,8 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
32
32
|
'formattedValue') {
|
|
33
33
|
const { oldValue, newValue, rowNode } = cellDataChangedInfo;
|
|
34
34
|
const columnId = cellDataChangedInfo.column.columnId;
|
|
35
|
-
const oldFormattedValue = this.api.gridApi.
|
|
36
|
-
const newFormattedValue = this.api.gridApi.
|
|
35
|
+
const oldFormattedValue = this.api.gridApi.getDisplayValueFromRawValue(rowNode, columnId, oldValue);
|
|
36
|
+
const newFormattedValue = this.api.gridApi.getDisplayValueFromRawValue(rowNode, columnId, newValue);
|
|
37
37
|
if (oldFormattedValue === newFormattedValue) {
|
|
38
38
|
// if the formattedValues are identical, then no alert is fired
|
|
39
39
|
return;
|
|
@@ -98,14 +98,15 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
98
98
|
const api = this.api;
|
|
99
99
|
operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
|
|
100
100
|
if (operation.operationFunction) {
|
|
101
|
-
|
|
101
|
+
const cellSummaryOperationContext = {
|
|
102
102
|
selectedCellInfo,
|
|
103
103
|
distinctCount,
|
|
104
104
|
allValues,
|
|
105
105
|
numericValues,
|
|
106
106
|
numericColumns,
|
|
107
|
-
api,
|
|
108
|
-
}
|
|
107
|
+
adaptableApi: this.api,
|
|
108
|
+
};
|
|
109
|
+
selectedCellSummary[operation.operationName] = operation.operationFunction(cellSummaryOperationContext);
|
|
109
110
|
}
|
|
110
111
|
});
|
|
111
112
|
}
|
|
@@ -31,8 +31,8 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
31
31
|
'formattedValue') {
|
|
32
32
|
const { oldValue, newValue, rowNode } = cellDataChangedInfo;
|
|
33
33
|
const columnId = cellDataChangedInfo.column.columnId;
|
|
34
|
-
const oldFormattedValue = this.api.gridApi.
|
|
35
|
-
const newFormattedValue = this.api.gridApi.
|
|
34
|
+
const oldFormattedValue = this.api.gridApi.getDisplayValueFromRawValue(rowNode, columnId, oldValue);
|
|
35
|
+
const newFormattedValue = this.api.gridApi.getDisplayValueFromRawValue(rowNode, columnId, newValue);
|
|
36
36
|
if (oldFormattedValue === newFormattedValue) {
|
|
37
37
|
// if the formattedValues are identical, then no alert is fired
|
|
38
38
|
return;
|
|
@@ -7,8 +7,8 @@ exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/guide/ui-expression
|
|
|
7
7
|
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-boolean`;
|
|
8
8
|
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-scalar`;
|
|
9
9
|
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-observable`;
|
|
10
|
-
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation
|
|
11
|
-
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation
|
|
10
|
+
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-boolean`;
|
|
11
|
+
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation-scalar`;
|
|
12
12
|
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-predicate`;
|
|
13
13
|
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-tutorial-primary-key`;
|
|
14
14
|
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
|
|
@@ -339,7 +339,7 @@ class ReportService {
|
|
|
339
339
|
return type === 'rawValue'
|
|
340
340
|
? cellRawValue
|
|
341
341
|
: // type === formattedValue
|
|
342
|
-
this.adaptableApi.gridApi.
|
|
342
|
+
this.adaptableApi.gridApi.getDisplayValueFromRawValue(rowNode, columnId, cellRawValue);
|
|
343
343
|
}
|
|
344
344
|
computeCellExportValueFormat(columnDataType) {
|
|
345
345
|
const exportOptions = this.adaptableApi.internalApi.getAdaptableOptions().exportOptions;
|
|
@@ -189,7 +189,10 @@ class RowEditService {
|
|
|
189
189
|
adaptableApi,
|
|
190
190
|
})
|
|
191
191
|
: Object.assign({}, formData);
|
|
192
|
-
|
|
192
|
+
const config = {
|
|
193
|
+
addIndex: 0,
|
|
194
|
+
};
|
|
195
|
+
adaptableApi.gridApi.addGridData([newRowData], config);
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
198
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AdaptableOptions } from '../../../types';
|
|
3
|
+
interface AdaptableOptionsFormOptions {
|
|
4
|
+
adaptableOptions: AdaptableOptions;
|
|
5
|
+
onChangeadaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const AdaptableOptionsForm: (props: AdaptableOptionsFormOptions) => JSX.Element;
|
|
8
|
+
export default AdaptableOptionsForm;
|
|
@@ -8,17 +8,13 @@ const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlo
|
|
|
8
8
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
9
9
|
const rebass_1 = require("rebass");
|
|
10
10
|
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
11
|
-
const
|
|
12
|
-
var _a, _b
|
|
11
|
+
const AdaptableOptionsForm = (props) => {
|
|
12
|
+
var _a, _b;
|
|
13
13
|
let abOptions = props.adaptableOptions;
|
|
14
14
|
const layoutOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.layoutOptions), abOptions.layoutOptions);
|
|
15
15
|
const generalOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.generalOptions), abOptions.generalOptions);
|
|
16
16
|
const adaptableQLOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.adaptableQLOptions), abOptions.adaptableQLOptions);
|
|
17
|
-
const userInterfaceOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.userInterfaceOptions), abOptions.userInterfaceOptions);
|
|
18
|
-
const searchOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.searchOptions), abOptions.searchOptions);
|
|
19
17
|
const filterOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.filterOptions), abOptions.filterOptions);
|
|
20
|
-
// we are 'hard-coding' this to use AG Grid but so does helper so ok for now and we can refactor when Adaptable Grid is ready
|
|
21
|
-
const gridOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.gridOptions), abOptions.gridOptions);
|
|
22
18
|
return (React.createElement(React.Fragment, null,
|
|
23
19
|
React.createElement(HelpBlock_1.default, null, "Base Options"),
|
|
24
20
|
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'label', style: { textAlign: 'start' } }, { name: 'children' }] },
|
|
@@ -36,38 +32,6 @@ const ConfigurationForm = (props) => {
|
|
|
36
32
|
abOptions.generalOptions.showMissingPrimaryKeyAlert = showMissingPrimaryKeyWarning;
|
|
37
33
|
props.onChangeadaptableOptions(abOptions);
|
|
38
34
|
} }))),
|
|
39
|
-
React.createElement(HelpBlock_1.default, null, "Grid Options"),
|
|
40
|
-
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
41
|
-
React.createElement(FormLayout_1.FormRow, { label: "Enable Range Selection" },
|
|
42
|
-
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
|
|
43
|
-
abOptions = Object.assign({}, abOptions);
|
|
44
|
-
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
45
|
-
abOptions.gridOptions.enableRangeSelection = enableRangeSelection;
|
|
46
|
-
props.onChangeadaptableOptions(abOptions);
|
|
47
|
-
} })),
|
|
48
|
-
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
49
|
-
React.createElement(CheckBox_1.CheckBox, { checked: (_c = gridOptions.defaultColDef) === null || _c === void 0 ? void 0 : _c.floatingFilter, onChange: (floatingFilter) => {
|
|
50
|
-
abOptions = Object.assign({}, abOptions);
|
|
51
|
-
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
52
|
-
abOptions.gridOptions.defaultColDef = {
|
|
53
|
-
floatingFilter,
|
|
54
|
-
};
|
|
55
|
-
props.onChangeadaptableOptions(abOptions);
|
|
56
|
-
} })),
|
|
57
|
-
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
58
|
-
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
|
|
59
|
-
abOptions = Object.assign({}, abOptions);
|
|
60
|
-
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
61
|
-
abOptions.gridOptions.suppressColumnVirtualisation = suppressColumnVirtualisation;
|
|
62
|
-
props.onChangeadaptableOptions(abOptions);
|
|
63
|
-
} })),
|
|
64
|
-
React.createElement(FormLayout_1.FormRow, { label: "Show Column Menu Button" },
|
|
65
|
-
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
|
|
66
|
-
abOptions = Object.assign({}, abOptions);
|
|
67
|
-
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
68
|
-
abOptions.gridOptions.suppressMenuHide = suppressMenuHide;
|
|
69
|
-
props.onChangeadaptableOptions(abOptions);
|
|
70
|
-
} }))),
|
|
71
35
|
React.createElement(HelpBlock_1.default, null, "Layout Options"),
|
|
72
36
|
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
73
37
|
React.createElement(FormLayout_1.FormRow, { label: "Auto Save Layouts" },
|
|
@@ -134,4 +98,4 @@ const ConfigurationForm = (props) => {
|
|
|
134
98
|
props.onChangeadaptableOptions(abOptions);
|
|
135
99
|
}, value: filterOptions.maxFilterValuesToDisplay, marginRight: 3 })))));
|
|
136
100
|
};
|
|
137
|
-
exports.default =
|
|
101
|
+
exports.default = AdaptableOptionsForm;
|
|
@@ -7,7 +7,8 @@ const react_1 = require("react");
|
|
|
7
7
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
|
|
8
8
|
const OnePageWizards_1 = require("../../Wizard/OnePageWizards");
|
|
9
9
|
const ConfigurationWizardColumnsStep_1 = require("./ConfigurationWizardColumnsStep");
|
|
10
|
-
const
|
|
10
|
+
const GridOptionsForm_1 = tslib_1.__importDefault(require("./GridOptionsForm"));
|
|
11
|
+
const AdaptableOptionsForm_1 = tslib_1.__importDefault(require("./AdaptableOptionsForm"));
|
|
11
12
|
const ConfigurationWizard = (props) => {
|
|
12
13
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
13
14
|
const [adaptableOptions, setAdaptableOptions] = react_1.useState(props.adaptableOptions);
|
|
@@ -50,7 +51,7 @@ const ConfigurationWizard = (props) => {
|
|
|
50
51
|
let sections = [
|
|
51
52
|
{
|
|
52
53
|
title: 'Columns',
|
|
53
|
-
details: 'Configure
|
|
54
|
+
details: 'Configure Columns',
|
|
54
55
|
isValid: () => {
|
|
55
56
|
if (!isPrimaryKeySelected) {
|
|
56
57
|
return 'Primary key column must be included';
|
|
@@ -65,10 +66,33 @@ const ConfigurationWizard = (props) => {
|
|
|
65
66
|
title: 'Adaptable Options',
|
|
66
67
|
details: 'Configure Adaptable Options',
|
|
67
68
|
isValid: () => (adaptableOptions.adaptableId ? true : 'Adaptable ID is required'),
|
|
68
|
-
render: () => (React.createElement(
|
|
69
|
+
render: () => (React.createElement(AdaptableOptionsForm_1.default, { adaptableOptions: adaptableOptions, onChangeadaptableOptions: (abOptions) => {
|
|
69
70
|
setAdaptableOptions(abOptions);
|
|
70
71
|
} })),
|
|
71
72
|
},
|
|
73
|
+
{
|
|
74
|
+
title: 'Grid Options',
|
|
75
|
+
details: 'Configure AG Grid Options',
|
|
76
|
+
render: () => (React.createElement(GridOptionsForm_1.default, { adaptableOptions: adaptableOptions, onChangeadaptableOptions: (abOptions) => {
|
|
77
|
+
setAdaptableOptions(abOptions);
|
|
78
|
+
} })),
|
|
79
|
+
},
|
|
80
|
+
// JW - I would like at some point to do a page of Entitlements
|
|
81
|
+
// to show all the Modules and let users select which are Full, ReadOnly or Hidden
|
|
82
|
+
/*
|
|
83
|
+
{
|
|
84
|
+
title: 'Entitlements',
|
|
85
|
+
details: 'Configure Entitlements',
|
|
86
|
+
render: () => (
|
|
87
|
+
<EntitlementsForm
|
|
88
|
+
adaptableOptions={adaptableOptions}
|
|
89
|
+
onChangeadaptableOptions={(abOptions) => {
|
|
90
|
+
setAdaptableOptions(abOptions);
|
|
91
|
+
}}
|
|
92
|
+
/>
|
|
93
|
+
),
|
|
94
|
+
},
|
|
95
|
+
*/
|
|
72
96
|
];
|
|
73
97
|
if (props.startSections) {
|
|
74
98
|
sections = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
|
-
interface
|
|
3
|
+
interface EntitlementsFormOptions {
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
5
|
onChangeadaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
8
|
-
export default
|
|
7
|
+
declare const EntitlementsForm: (props: EntitlementsFormOptions) => JSX.Element;
|
|
8
|
+
export default EntitlementsForm;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
6
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
7
|
+
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
8
|
+
const EntitlementsForm = (props) => {
|
|
9
|
+
let abOptions = props.adaptableOptions;
|
|
10
|
+
const entitlementOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.entitlementOptions), abOptions.entitlementOptions);
|
|
11
|
+
const gridOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.gridOptions), abOptions.gridOptions);
|
|
12
|
+
return (React.createElement(React.Fragment, null,
|
|
13
|
+
React.createElement(HelpBlock_1.default, null, "EntitlementOptions Options"),
|
|
14
|
+
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
15
|
+
React.createElement(FormLayout_1.FormRow, { label: "Entitlements to be set here" }))));
|
|
16
|
+
};
|
|
17
|
+
exports.default = EntitlementsForm;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AdaptableOptions } from '../../../types';
|
|
3
|
+
interface GridOptionsFormOptions {
|
|
4
|
+
adaptableOptions: AdaptableOptions;
|
|
5
|
+
onChangeadaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const GridOptionsForm: (props: GridOptionsFormOptions) => JSX.Element;
|
|
8
|
+
export default GridOptionsForm;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
6
|
+
const CheckBox_1 = require("../../../components/CheckBox");
|
|
7
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
8
|
+
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
9
|
+
const GridOptionsForm = (props) => {
|
|
10
|
+
var _a;
|
|
11
|
+
let abOptions = props.adaptableOptions;
|
|
12
|
+
const gridOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.gridOptions), abOptions.gridOptions);
|
|
13
|
+
return (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement(HelpBlock_1.default, null, "Grid Options"),
|
|
15
|
+
React.createElement(FormLayout_1.default, { margin: 2, columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
|
|
16
|
+
React.createElement(FormLayout_1.FormRow, { label: "Show ToolPanel" },
|
|
17
|
+
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.sideBar == true, onChange: (addSideBar) => {
|
|
18
|
+
abOptions = Object.assign({}, abOptions);
|
|
19
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
20
|
+
abOptions.gridOptions.sideBar = addSideBar;
|
|
21
|
+
props.onChangeadaptableOptions(abOptions);
|
|
22
|
+
} })),
|
|
23
|
+
React.createElement(FormLayout_1.FormRow, { label: "Enable Range Selection" },
|
|
24
|
+
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.enableRangeSelection, onChange: (enableRangeSelection) => {
|
|
25
|
+
abOptions = Object.assign({}, abOptions);
|
|
26
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
27
|
+
abOptions.gridOptions.enableRangeSelection = enableRangeSelection;
|
|
28
|
+
props.onChangeadaptableOptions(abOptions);
|
|
29
|
+
} })),
|
|
30
|
+
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
31
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_a = gridOptions.defaultColDef) === null || _a === void 0 ? void 0 : _a.floatingFilter, onChange: (floatingFilter) => {
|
|
32
|
+
abOptions = Object.assign({}, abOptions);
|
|
33
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
34
|
+
abOptions.gridOptions.defaultColDef = {
|
|
35
|
+
floatingFilter,
|
|
36
|
+
};
|
|
37
|
+
props.onChangeadaptableOptions(abOptions);
|
|
38
|
+
} })),
|
|
39
|
+
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
40
|
+
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
|
|
41
|
+
abOptions = Object.assign({}, abOptions);
|
|
42
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
43
|
+
abOptions.gridOptions.suppressColumnVirtualisation = suppressColumnVirtualisation;
|
|
44
|
+
props.onChangeadaptableOptions(abOptions);
|
|
45
|
+
} })),
|
|
46
|
+
React.createElement(FormLayout_1.FormRow, { label: "Show Column Menu Button" },
|
|
47
|
+
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
|
|
48
|
+
abOptions = Object.assign({}, abOptions);
|
|
49
|
+
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
50
|
+
abOptions.gridOptions.suppressMenuHide = suppressMenuHide;
|
|
51
|
+
props.onChangeadaptableOptions(abOptions);
|
|
52
|
+
} })))));
|
|
53
|
+
};
|
|
54
|
+
exports.default = GridOptionsForm;
|
|
@@ -324,7 +324,6 @@ const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormat
|
|
|
324
324
|
if (data.DisplayFormat.Formatter !== 'StringFormatter') {
|
|
325
325
|
return null;
|
|
326
326
|
}
|
|
327
|
-
console.log('formatters', scopedCustomFormatters);
|
|
328
327
|
return (React.createElement(rebass_1.Box, { "data-name": 'format-column-display-format', padding: 2 },
|
|
329
328
|
React.createElement(Tabs_1.Tabs, null,
|
|
330
329
|
React.createElement(Tabs_1.Tabs.Tab, null, "Format"),
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1394,13 +1394,6 @@ class Adaptable {
|
|
|
1394
1394
|
shouldUpdateHeaders = this.setupColumnHeader(colSetupInfo) || shouldUpdateHeaders;
|
|
1395
1395
|
});
|
|
1396
1396
|
isChanged = isChanged || shouldUpdateHeaders;
|
|
1397
|
-
if (this.api.layoutApi.areExpandedRowGroupsSavedInLayouts() &&
|
|
1398
|
-
ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(layout.ExpandedRowGroupValues)) {
|
|
1399
|
-
this.expandRowGroupsForValues(layout.ExpandedRowGroupValues);
|
|
1400
|
-
}
|
|
1401
|
-
if (this.adaptableOptions.layoutOptions.displayRowGroups === 'expanded') {
|
|
1402
|
-
this.expandAllRowGroups();
|
|
1403
|
-
}
|
|
1404
1397
|
if (isChanged) {
|
|
1405
1398
|
// it's important we set pivot mode
|
|
1406
1399
|
// before we set column state
|
|
@@ -1421,6 +1414,15 @@ class Adaptable {
|
|
|
1421
1414
|
// so we figured out the following line fixes the issue
|
|
1422
1415
|
// this.gridOptions.api.setColumnDefs(this.gridOptions.api.getColumnDefs()); //TODO find a solution for weighted averages - column floating filters are not showing
|
|
1423
1416
|
GridApi_setColumnDefs.call(this.gridOptions.api, this.gridOptions.api.getColumnDefs());
|
|
1417
|
+
// these updates need to be at the end, the methods are based on the grid state/col defs
|
|
1418
|
+
// the layout needs to be applied for them to work
|
|
1419
|
+
if (this.api.layoutApi.areExpandedRowGroupsSavedInLayouts() &&
|
|
1420
|
+
ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(layout.ExpandedRowGroupValues)) {
|
|
1421
|
+
this.expandRowGroupsForValues(layout.ExpandedRowGroupValues);
|
|
1422
|
+
}
|
|
1423
|
+
if (this.adaptableOptions.layoutOptions.displayRowGroups === 'expanded') {
|
|
1424
|
+
this.expandAllRowGroups();
|
|
1425
|
+
}
|
|
1424
1426
|
// this.updateColumnsIntoStore();// no longer needed
|
|
1425
1427
|
}
|
|
1426
1428
|
const colsToAutoSizeArray = Object.keys(colsToAutoSize);
|
|
@@ -162,9 +162,9 @@ class agGridHelper {
|
|
|
162
162
|
const customFriendlyName = typeof columnFriendlyName === 'function'
|
|
163
163
|
? columnFriendlyName({ colId: colId, agColumn: agGridColumn })
|
|
164
164
|
: null;
|
|
165
|
-
const FriendlyName =
|
|
165
|
+
const FriendlyName = customFriendlyName !== null && customFriendlyName !== void 0 ? customFriendlyName : (isActionRowButtonColumn
|
|
166
166
|
? GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME
|
|
167
|
-
: this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header');
|
|
167
|
+
: this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header'));
|
|
168
168
|
if (!this.initialAgGridColDefs[colId]) {
|
|
169
169
|
this.initialAgGridColDefs[colId] = Object.assign({}, agGridColumn.getUserProvidedColDef());
|
|
170
170
|
}
|
|
@@ -40,6 +40,9 @@ function BaseEditorInput(props) {
|
|
|
40
40
|
};
|
|
41
41
|
const testRowNode = react_1.useMemo(() => {
|
|
42
42
|
const firstRowNode = props.api.gridApi.getFirstRowNode();
|
|
43
|
+
if (!firstRowNode || !firstRowNode.data) {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
43
46
|
// clone the class instance to still keep the prototype methods
|
|
44
47
|
return Object.assign(Object.create(Object.getPrototypeOf(firstRowNode)), firstRowNode);
|
|
45
48
|
}, []);
|
|
@@ -112,9 +112,9 @@ function ExpressionEditor(props) {
|
|
|
112
112
|
cursor: 'grab',
|
|
113
113
|
marginRight: 'var(--ab-space-1)',
|
|
114
114
|
}, data: `[${column.columnId}]`, "data-name": "column", icon: "drag" },
|
|
115
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.columnId}]` : column.friendlyName)) }, column.dataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", value: getColValue(column), onChange: (e) => setData(updateColValue(data, column, Number(e.target.value))), width: "100%", disabled: column.readOnly })) : column.dataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", value: getColValue(column), onChange: (e) => setData(updateColValue(data, column, e.target.value)), width: "100%", disabled: column.readOnly })) : column.dataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", value: getColDateValue(column), onChange: (e) => {
|
|
115
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.columnId}]` : column.friendlyName)) }, column.dataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", "data-value": column.columnId, value: getColValue(column), onChange: (e) => setData(updateColValue(data, column, Number(e.target.value))), width: "100%", disabled: column.readOnly })) : column.dataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", "data-value": column.columnId, value: getColValue(column), onChange: (e) => setData(updateColValue(data, column, e.target.value)), width: "100%", disabled: column.readOnly })) : column.dataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", "data-value": column.columnId, value: getColDateValue(column), onChange: (e) => {
|
|
116
116
|
setData(updateColValue(data, column, new Date(e.target.value)));
|
|
117
|
-
}, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: getColValue(column), onChange: (checked) => setData(updateColValue(data, column, checked)), disabled: column.readOnly })) : null))))));
|
|
117
|
+
}, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", "data-value": column.columnId, checked: getColValue(column), onChange: (checked) => setData(updateColValue(data, column, checked)), disabled: column.readOnly })) : null))))));
|
|
118
118
|
const namedQueries = (React.createElement("div", null, props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: {
|
|
119
119
|
padding: 3,
|
|
120
120
|
marginTop: 'var(--ab-space-2)',
|