@adaptabletools/adaptable 11.0.4 → 11.0.7
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/README.md +2 -2
- package/bundle.cjs.js +66 -66
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +2 -2
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +7 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +5 -0
- package/src/Api/LayoutApi.d.ts +6 -1
- package/src/PredefinedConfig/Common/AdaptableMessageType.d.ts +2 -2
- package/src/PredefinedConfig/Selection/GridCell.d.ts +1 -1
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +4 -0
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/Utilities/getExportColumnsViewItems.js +0 -13
- package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.js +8 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +1 -1
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +23 -2
- package/src/agGrid/agGridHelper.js +4 -0
- package/src/metamodel/adaptable.metamodel.js +14 -2
- package/src/types.d.ts +1 -1
- 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": "11.0.
|
|
3
|
+
"version": "11.0.7",
|
|
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: 1647406497522;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -167,6 +167,7 @@ export interface IAdaptable {
|
|
|
167
167
|
cancelEdit(): any;
|
|
168
168
|
isCellEditable(rowNode: RowNode, column: Column): boolean;
|
|
169
169
|
getFirstRowNode(): RowNode;
|
|
170
|
+
getFirstDisplayedRowNode(): RowNode;
|
|
170
171
|
forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
|
|
171
172
|
forAllVisibleRowNodesDo(func: (rowNode: RowNode) => void): void;
|
|
172
173
|
getVisibleRowNodes(): RowNode[];
|
|
@@ -35,9 +35,9 @@ export interface GeneralOptions {
|
|
|
35
35
|
*/
|
|
36
36
|
showGroupingTotalsAsHeader?: boolean;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Order Grouped Column automatically, deriving from Adaptable State if available (CustomSort or Layout ColumnSort)
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* The default group order will be derived from (in the specified priority): 1. an active CustomSort, 2. the defined ColDef Comparator, 3. current Layout ColumnSort or 4. alphanumerically
|
|
41
41
|
* @defaultValue true
|
|
42
42
|
* @gridInfoItem
|
|
43
43
|
*/
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -191,6 +191,10 @@ export interface GridApi {
|
|
|
191
191
|
* Retrieves the first Row Node in AdapTable
|
|
192
192
|
*/
|
|
193
193
|
getFirstRowNode(): RowNode;
|
|
194
|
+
/**
|
|
195
|
+
* Retrieves the first Displayed Row Node in AdapTable
|
|
196
|
+
*/
|
|
197
|
+
getFirstDisplayedRowNode(): RowNode;
|
|
194
198
|
/**
|
|
195
199
|
* Retrieves all Row Nodes currently in the Grid (i.e. filtered)
|
|
196
200
|
*/
|
|
@@ -54,6 +54,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
54
54
|
selectColumn(columnId: string): void;
|
|
55
55
|
selectColumns(columnIds: string[]): void;
|
|
56
56
|
getFirstRowNode(): RowNode;
|
|
57
|
+
getFirstDisplayedRowNode(): RowNode;
|
|
57
58
|
getVisibleRowNodes(): RowNode[];
|
|
58
59
|
getGridCellFromRowNode(rowwNode: RowNode, columnId: string): GridCell | undefined;
|
|
59
60
|
getRawValueFromRowNode(rowwNode: RowNode, columnId: string): any | undefined;
|
|
@@ -187,6 +187,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
187
187
|
getFirstRowNode() {
|
|
188
188
|
return this.adaptable.getFirstRowNode();
|
|
189
189
|
}
|
|
190
|
+
getFirstDisplayedRowNode() {
|
|
191
|
+
return this.adaptable.getFirstDisplayedRowNode();
|
|
192
|
+
}
|
|
190
193
|
getVisibleRowNodes() {
|
|
191
194
|
return this.adaptable.getVisibleRowNodes();
|
|
192
195
|
}
|
|
@@ -341,6 +344,10 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
341
344
|
}
|
|
342
345
|
areCellsEditable(gridCells) {
|
|
343
346
|
for (let gridCell of gridCells) {
|
|
347
|
+
if (!gridCell.column) {
|
|
348
|
+
// GridCell.column may be undefined for cells from synthetic columns created by AG Grid (ex. autoGroup columns)
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
344
351
|
if (gridCell.column.readOnly) {
|
|
345
352
|
return false;
|
|
346
353
|
}
|
|
@@ -2,6 +2,7 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { LayoutApi } from '../LayoutApi';
|
|
3
3
|
import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
5
|
+
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
5
6
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
6
7
|
getLayoutState(): LayoutState;
|
|
7
8
|
shouldAutoSaveLayout: (layout?: Layout) => boolean;
|
|
@@ -12,6 +13,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
12
13
|
setLayout(layoutName: string): void;
|
|
13
14
|
fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
|
|
14
15
|
getCurrentLayout(): Layout;
|
|
16
|
+
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
15
17
|
getCurrentLayoutName(): string;
|
|
16
18
|
getLayoutByName(layoutName: string): Layout | null;
|
|
17
19
|
getAllLayout(): Layout[];
|
|
@@ -69,6 +69,11 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
69
69
|
let layoutName = state.Layout.CurrentLayout;
|
|
70
70
|
return (this.getLayoutByName(layoutName) || ObjectFactory_1.default.CreateEmptyLayout({ Name: GeneralConstants_1.DEFAULT_LAYOUT }));
|
|
71
71
|
}
|
|
72
|
+
getCurrentLayoutColumnSort(columnId) {
|
|
73
|
+
var _a, _b, _c, _d;
|
|
74
|
+
const currentLayout = this.getCurrentLayout();
|
|
75
|
+
return ((_d = (_c = (_b = (_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.ColumnSorts) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (sort) => sort.ColumnId === columnId)) === null || _c === void 0 ? void 0 : _c.SortOrder) !== null && _d !== void 0 ? _d : null);
|
|
76
|
+
}
|
|
72
77
|
getCurrentLayoutName() {
|
|
73
78
|
return this.getAdaptableState().Layout.CurrentLayout;
|
|
74
79
|
}
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptableColumn } from '../../types';
|
|
1
|
+
import { AdaptableColumn, ColumnSort } from '../../types';
|
|
2
2
|
import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
|
|
3
3
|
/**
|
|
4
4
|
* Provides run-time access to the Layout Module and associated state
|
|
@@ -24,6 +24,11 @@ export interface LayoutApi {
|
|
|
24
24
|
* @returns layout
|
|
25
25
|
*/
|
|
26
26
|
getCurrentLayout(): Layout;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the sort order of a column from the current layout
|
|
29
|
+
* @param columnId Column id
|
|
30
|
+
*/
|
|
31
|
+
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
27
32
|
/**
|
|
28
33
|
* Retrieves map with visible columns in current Layout
|
|
29
34
|
*/
|
|
@@ -7,11 +7,11 @@ export declare type AdaptableMessageType =
|
|
|
7
7
|
*/
|
|
8
8
|
'Success'
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* An info message - shows in blue
|
|
11
11
|
*/
|
|
12
12
|
| 'Info'
|
|
13
13
|
/**
|
|
14
|
-
* A
|
|
14
|
+
* A warning message - shows in orange
|
|
15
15
|
*/
|
|
16
16
|
| 'Warning'
|
|
17
17
|
/**
|
|
@@ -178,7 +178,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
178
178
|
toView(alert) {
|
|
179
179
|
return {
|
|
180
180
|
items: [
|
|
181
|
-
getScopeViewItems_1.getScopeViewItems(alert.Scope),
|
|
181
|
+
getScopeViewItems_1.getScopeViewItems(alert.Scope, this.api),
|
|
182
182
|
getRuleViewItems_1.getRuleViewItems(alert.Rule, this.api),
|
|
183
183
|
getAlertBehaviourViewItems_1.getAlertBehaviourViewItems(),
|
|
184
184
|
getAlertPreviewViewItems_1.getAlertPreviewViewItems(alert, this.api),
|
|
@@ -45,6 +45,10 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
45
45
|
selectedCellInfo.gridCells.forEach((selectedCell) => {
|
|
46
46
|
let value = selectedCell.rawValue;
|
|
47
47
|
allValues.push(value);
|
|
48
|
+
if (!selectedCell.column) {
|
|
49
|
+
// GridCell.column may be undefined for cells from synthetic columns created by AG Grid (ex. autoGroup columns)
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
48
52
|
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.column.columnId)) {
|
|
49
53
|
let valueAsNumber = Number(value);
|
|
50
54
|
// possible that its not a number despite it being a numeric column
|
|
@@ -188,7 +188,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
188
188
|
toView(conditionalStyle) {
|
|
189
189
|
return {
|
|
190
190
|
items: [
|
|
191
|
-
getScopeViewItems_1.getScopeViewItems(conditionalStyle.Scope),
|
|
191
|
+
getScopeViewItems_1.getScopeViewItems(conditionalStyle.Scope, this.api),
|
|
192
192
|
getStyleViewItems_1.getStyleViewItems(),
|
|
193
193
|
getRuleViewItems_1.getRuleViewItems(conditionalStyle.Rule, this.api),
|
|
194
194
|
{
|
|
@@ -209,7 +209,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
209
209
|
toView(flashingCell) {
|
|
210
210
|
return {
|
|
211
211
|
items: [
|
|
212
|
-
Object.assign(Object.assign({}, getScopeViewItems_1.getScopeViewItems(flashingCell.Scope)), { label: 'Trigger' }),
|
|
212
|
+
Object.assign(Object.assign({}, getScopeViewItems_1.getScopeViewItems(flashingCell.Scope, this.api)), { label: 'Trigger' }),
|
|
213
213
|
Object.assign(Object.assign({}, getRuleViewItems_1.getRuleViewItems(flashingCell.Rule, this.api)), { label: 'Rule', name: 'Rule' }),
|
|
214
214
|
getFlashingCellDurationViewItems_1.getFlashingCellDurationViewItems(flashingCell),
|
|
215
215
|
getFlashingTargetViewItems_1.getFlashingTargetViewItems(flashingCell),
|
|
@@ -237,7 +237,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
237
237
|
return {
|
|
238
238
|
abObject: formatColumn,
|
|
239
239
|
items: [
|
|
240
|
-
getScopeViewItems_1.getScopeViewItems(formatColumn.Scope),
|
|
240
|
+
getScopeViewItems_1.getScopeViewItems(formatColumn.Scope, this.api),
|
|
241
241
|
{
|
|
242
242
|
name: 'Style',
|
|
243
243
|
view: () => getFormatColumnStyleViewItems_1.getFormatColumnStyleViewItems(formatColumn, this.api),
|
|
@@ -186,7 +186,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
186
186
|
return {
|
|
187
187
|
abObject: plusMinus,
|
|
188
188
|
items: [
|
|
189
|
-
Object.assign({ name: 'Target' }, getScopeViewItems_1.getScopeViewItems(plusMinus.Scope)),
|
|
189
|
+
Object.assign({ name: 'Target' }, getScopeViewItems_1.getScopeViewItems(plusMinus.Scope, this.api)),
|
|
190
190
|
plusMinus.Rule && {
|
|
191
191
|
name: 'Settings',
|
|
192
192
|
label: 'Rule',
|
|
@@ -74,7 +74,7 @@ class ShortcutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
74
74
|
toView(shortcut) {
|
|
75
75
|
return {
|
|
76
76
|
abObject: shortcut,
|
|
77
|
-
items: [getScopeViewItems_1.getScopeViewItems(shortcut.Scope), getShortcutSettingsViewItems_1.getShortcutSettingsViewItems(shortcut)],
|
|
77
|
+
items: [getScopeViewItems_1.getScopeViewItems(shortcut.Scope, this.api), getShortcutSettingsViewItems_1.getShortcutSettingsViewItems(shortcut)],
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
toViewAll() {
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExportColumnsViewItems = void 0;
|
|
4
|
-
const getScopeViewItems_1 = require("./getScopeViewItems");
|
|
5
|
-
const getValues = (report) => {
|
|
6
|
-
switch (report.ReportColumnScope) {
|
|
7
|
-
case 'AllColumns':
|
|
8
|
-
return ['All Columns'];
|
|
9
|
-
case 'VisibleColumns':
|
|
10
|
-
return ['Visible Columns'];
|
|
11
|
-
case 'ScopeColumns':
|
|
12
|
-
return getScopeViewItems_1.getScopeViewItems(report.Scope).values;
|
|
13
|
-
default:
|
|
14
|
-
return [''];
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
4
|
exports.getExportColumnsViewItems = (report, api) => {
|
|
18
5
|
return {
|
|
19
6
|
name: 'Columns',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AdaptableScope } from '../../../types';
|
|
1
|
+
import { AdaptableApi, AdaptableScope } from '../../../types';
|
|
2
2
|
import { AdaptableObjectItemView } from '../Interface/IModule';
|
|
3
|
-
export declare const getScopeViewItems: (scope: AdaptableScope) => AdaptableObjectItemView;
|
|
3
|
+
export declare const getScopeViewItems: (scope: AdaptableScope, api: AdaptableApi) => AdaptableObjectItemView;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getScopeViewItems = void 0;
|
|
4
|
-
exports.getScopeViewItems = (scope) => {
|
|
4
|
+
exports.getScopeViewItems = (scope, api) => {
|
|
5
5
|
let values = [];
|
|
6
|
-
if ('ColumnIds' in scope) {
|
|
6
|
+
if ('ColumnIds' in scope && Array.isArray(scope.ColumnIds)) {
|
|
7
7
|
values = scope.ColumnIds;
|
|
8
|
+
values = scope.ColumnIds.map((columnId) => api.columnApi.getFriendlyNameFromColumnId(columnId)).filter(Boolean);
|
|
8
9
|
}
|
|
9
10
|
if ('DataTypes' in scope) {
|
|
10
11
|
values = scope.DataTypes;
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
|
|
4
4
|
exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com';
|
|
5
5
|
//export const HOST_URL_DOCS = 'http://localhost:3000';
|
|
6
|
-
exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/
|
|
7
|
-
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
8
|
-
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
9
|
-
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
10
|
-
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
11
|
-
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
12
|
-
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/
|
|
13
|
-
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/
|
|
6
|
+
exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/guide/ui-expression-editor`;
|
|
7
|
+
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-boolean`;
|
|
8
|
+
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-scalar`;
|
|
9
|
+
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-observable`;
|
|
10
|
+
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation#aggregated-boolean-expressions`;
|
|
11
|
+
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation#aggregated-scalar-expressions`;
|
|
12
|
+
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-predicate`;
|
|
13
|
+
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-tutorial-primary-key`;
|
|
14
14
|
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/licensing`;
|
|
@@ -47,7 +47,7 @@ const ConfigurationDialog = (props) => {
|
|
|
47
47
|
padding: 0,
|
|
48
48
|
style: { overflow: 'auto', display: 'flex', flexFlow: 'column' },
|
|
49
49
|
}, borderRadius: "none", style: { fontSize: 16, flex: 1 } },
|
|
50
|
-
React.createElement(Panel_1.default, { border: "none" },
|
|
50
|
+
React.createElement(Panel_1.default, { style: { minHeight: 50 }, border: "none" },
|
|
51
51
|
React.createElement(FormLayout_1.default, null,
|
|
52
52
|
React.createElement(FormLayout_1.FormRow, { label: "AdaptableId" },
|
|
53
53
|
React.createElement(Input_1.default, { value: abOptions.adaptableId, onChange: onadaptableIdChange, style: { minWidth: '20rem' } })))),
|
|
@@ -231,6 +231,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
231
231
|
getGroupedColDefs(): ColDef[];
|
|
232
232
|
getColumnDefsWithCorrectVisibility: () => ColDef[];
|
|
233
233
|
getFirstRowNode(): RowNode;
|
|
234
|
+
getFirstDisplayedRowNode(): RowNode;
|
|
234
235
|
destroy(config?: {
|
|
235
236
|
unmount: boolean;
|
|
236
237
|
destroyApi?: boolean;
|
|
@@ -312,6 +313,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
312
313
|
deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
|
|
313
314
|
getFirstGroupedColumn(): AdaptableColumn | undefined;
|
|
314
315
|
private checkColumnsDataTypeSet;
|
|
316
|
+
private updateColumnDataTypeIfRowDataIsEmpty;
|
|
315
317
|
private runAdaptableComparerFunction;
|
|
316
318
|
isGridSelectable(): boolean;
|
|
317
319
|
isGridGroupable(): boolean;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -2217,11 +2217,16 @@ class Adaptable {
|
|
|
2217
2217
|
if (!foundNode) {
|
|
2218
2218
|
if (!node.group) {
|
|
2219
2219
|
rowNode = node;
|
|
2220
|
+
foundNode = true;
|
|
2220
2221
|
}
|
|
2221
2222
|
}
|
|
2222
2223
|
});
|
|
2223
2224
|
return rowNode;
|
|
2224
2225
|
}
|
|
2226
|
+
getFirstDisplayedRowNode() {
|
|
2227
|
+
const firstDisplayedRowIndex = this.gridOptions.api.getFirstDisplayedRow();
|
|
2228
|
+
return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
|
|
2229
|
+
}
|
|
2225
2230
|
destroy(config) {
|
|
2226
2231
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
2227
2232
|
if (this.gridOptions && this.gridOptions.api) {
|
|
@@ -3556,6 +3561,7 @@ class Adaptable {
|
|
|
3556
3561
|
this.addSyntheticPrimaryKey(dataSource);
|
|
3557
3562
|
}
|
|
3558
3563
|
this.gridOptions.api.setRowData(dataSource);
|
|
3564
|
+
this.updateColumnDataTypeIfRowDataIsEmpty();
|
|
3559
3565
|
}
|
|
3560
3566
|
getGridData() {
|
|
3561
3567
|
var _a;
|
|
@@ -3621,11 +3627,13 @@ class Adaptable {
|
|
|
3621
3627
|
dataUpdateConfig.callback(transaction);
|
|
3622
3628
|
}
|
|
3623
3629
|
resolve(transaction === null || transaction === void 0 ? void 0 : transaction.add);
|
|
3630
|
+
this.updateColumnDataTypeIfRowDataIsEmpty();
|
|
3624
3631
|
});
|
|
3625
3632
|
});
|
|
3626
3633
|
}
|
|
3627
3634
|
else {
|
|
3628
3635
|
const transaction = this.gridOptions.api.applyTransaction(newData);
|
|
3636
|
+
this.updateColumnDataTypeIfRowDataIsEmpty();
|
|
3629
3637
|
return Promise.resolve(transaction === null || transaction === void 0 ? void 0 : transaction.add);
|
|
3630
3638
|
}
|
|
3631
3639
|
}
|
|
@@ -3657,11 +3665,24 @@ class Adaptable {
|
|
|
3657
3665
|
}
|
|
3658
3666
|
checkColumnsDataTypeSet() {
|
|
3659
3667
|
// check that we have no unknown columns - if we do then ok
|
|
3660
|
-
const
|
|
3661
|
-
if (
|
|
3668
|
+
const colDefs = this.api.columnApi.getColumns();
|
|
3669
|
+
if (colDefs.some((colDef) => colDef.dataType === Enums_1.DataType.Unknown)) {
|
|
3662
3670
|
this.updateColumnsIntoStore();
|
|
3663
3671
|
}
|
|
3664
3672
|
}
|
|
3673
|
+
updateColumnDataTypeIfRowDataIsEmpty() {
|
|
3674
|
+
var _a, _b;
|
|
3675
|
+
// gridOptions?.rowData is not updated when setting data via the api
|
|
3676
|
+
if (!((_b = (_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.rowData) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
3677
|
+
// the columns dataType is based on the rawData, when type is not set on the column
|
|
3678
|
+
// when data is loaded async, the dataType initially is dataType=unknown
|
|
3679
|
+
// to fix this, we need to update the columnDefs when we data is loaded
|
|
3680
|
+
this.checkColumnsDataTypeSet();
|
|
3681
|
+
// this influences the floating filter
|
|
3682
|
+
// need to trigger header redraw, if not, the columnDef update is not picked-up
|
|
3683
|
+
this.redrawHeader();
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3665
3686
|
runAdaptableComparerFunction(columnId, columnValues) {
|
|
3666
3687
|
let adaptable = this;
|
|
3667
3688
|
return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
|
|
@@ -516,6 +516,10 @@ class agGridHelper {
|
|
|
516
516
|
if (definedColumnComparator) {
|
|
517
517
|
return definedColumnComparator(nodeA.key, nodeB.key);
|
|
518
518
|
}
|
|
519
|
+
const sortOder = adaptable.api.layoutApi.getCurrentLayoutColumnSort(firstGroupedColumn.columnId);
|
|
520
|
+
if (sortOder === 'Desc') {
|
|
521
|
+
return nodeA.key > nodeB.key ? -1 : 1;
|
|
522
|
+
}
|
|
519
523
|
}
|
|
520
524
|
// if no comparator available, just sort alphanumerically
|
|
521
525
|
if (nodeA.key == nodeB.key) {
|
|
@@ -6532,7 +6532,7 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
6532
6532
|
{
|
|
6533
6533
|
"name": "autoOrderGroupedColumns",
|
|
6534
6534
|
"kind": "boolean",
|
|
6535
|
-
"description": "
|
|
6535
|
+
"description": "Order Grouped Column automatically, deriving from Adaptable State if available (CustomSort or Layout ColumnSort)",
|
|
6536
6536
|
"uiLabel": "Auto Order Grouped Columns",
|
|
6537
6537
|
"isOptional": true,
|
|
6538
6538
|
"gridInfo": "item",
|
|
@@ -7046,6 +7046,12 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
7046
7046
|
"description": "Retrieves filtered data from the grid",
|
|
7047
7047
|
"uiLabel": "Get Filtered Data"
|
|
7048
7048
|
},
|
|
7049
|
+
{
|
|
7050
|
+
"name": "getFirstDisplayedRowNode",
|
|
7051
|
+
"kind": "function",
|
|
7052
|
+
"description": "Retrieves the first Displayed Row Node in AdapTable",
|
|
7053
|
+
"uiLabel": "Get First Displayed Row Node"
|
|
7054
|
+
},
|
|
7049
7055
|
{
|
|
7050
7056
|
"name": "getFirstRowNode",
|
|
7051
7057
|
"kind": "function",
|
|
@@ -7386,7 +7392,7 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
7386
7392
|
{
|
|
7387
7393
|
"name": "column",
|
|
7388
7394
|
"kind": "REFERENCE",
|
|
7389
|
-
"description": "Column in which cell is
|
|
7395
|
+
"description": "Column in which cell is situated",
|
|
7390
7396
|
"uiLabel": "Column",
|
|
7391
7397
|
"reference": "AdaptableColumn"
|
|
7392
7398
|
},
|
|
@@ -8048,6 +8054,12 @@ exports.ADAPTABLE_METAMODEL = {
|
|
|
8048
8054
|
"description": "Retrieves Current Layout from Layout State",
|
|
8049
8055
|
"uiLabel": "Get Current Layout"
|
|
8050
8056
|
},
|
|
8057
|
+
{
|
|
8058
|
+
"name": "getCurrentLayoutColumnSort",
|
|
8059
|
+
"kind": "function",
|
|
8060
|
+
"description": "Retrieves the sort order of a column from the current layout",
|
|
8061
|
+
"uiLabel": "Get Current Layout Column Sort"
|
|
8062
|
+
},
|
|
8051
8063
|
{
|
|
8052
8064
|
"name": "getCurrentLayoutName",
|
|
8053
8065
|
"kind": "function",
|
package/src/types.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export type { ColumnSort } from './PredefinedConfig/Common/ColumnSort';
|
|
|
116
116
|
export type { DataChangedInfo } from './PredefinedConfig/Common/DataChangedInfo';
|
|
117
117
|
export type { DataUpdateConfig } from './PredefinedConfig/Common/DataUpdateConfig';
|
|
118
118
|
export type { AdaptableFormData, AdaptableForm, AdaptableFormField, } from './PredefinedConfig/Common/AdaptableForm';
|
|
119
|
-
export type { AdaptableButton } from './PredefinedConfig/Common/AdaptableButton';
|
|
119
|
+
export type { AdaptableButton, ButtonContext } from './PredefinedConfig/Common/AdaptableButton';
|
|
120
120
|
export type { AdaptableMenuItem, UserMenuItem, ColumnMenuContext, ContextMenuContext, } from './PredefinedConfig/Common/Menu';
|
|
121
121
|
export type { Schedule } from './PredefinedConfig/Common/Schedule';
|
|
122
122
|
export type { ButtonStyle } from './PredefinedConfig/Common/ButtonStyle';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "11.0.
|
|
1
|
+
declare const _default: "11.0.7";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '11.0.
|
|
3
|
+
exports.default = '11.0.7'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|