@adaptabletools/adaptable-cjs 19.1.0 → 19.1.2-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +3 -0
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/CommentOptions.d.ts +2 -2
- package/src/AdaptableOptions/NoteOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +21 -11
- package/src/Api/Events/GridDataChanged.d.ts +3 -0
- package/src/Api/GridApi.d.ts +8 -3
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +5 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +7 -1
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -15
- package/src/Api/Implementation/ApiBase.d.ts +12 -3
- package/src/Api/Implementation/ApiBase.js +39 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
- package/src/Api/Implementation/CalendarApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +9 -9
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -18
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CommentsApiImpl.js +6 -4
- package/src/Api/Implementation/ConfigApiImpl.js +23 -24
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
- package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DashboardApiImpl.js +5 -5
- package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataImportApiImpl.js +3 -3
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +5 -5
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EventApiImpl.js +2 -2
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +7 -7
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
- package/src/Api/Implementation/GridApiImpl.js +108 -103
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
- package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NoteApiImpl.js +3 -3
- package/src/Api/Implementation/OptionsApiImpl.js +7 -7
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +4 -4
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
- package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +8 -8
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
- package/src/Api/Internal/ActionRowInternalApi.js +8 -8
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +55 -50
- package/src/Api/Internal/AlertInternalApi.js +9 -9
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
- package/src/Api/Internal/ColumnInternalApi.js +3 -3
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -0
- package/src/Api/Internal/CommentsInternalApi.js +4 -0
- package/src/Api/Internal/CustomSortInternalApi.js +3 -3
- package/src/Api/Internal/DashboardInternalApi.js +4 -3
- package/src/Api/Internal/DataImportInternalApi.js +2 -2
- package/src/Api/Internal/DataSetInternalApi.js +2 -2
- package/src/Api/Internal/ExportInternalApi.js +21 -22
- package/src/Api/Internal/ExpressionInternalApi.js +4 -4
- package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
- package/src/Api/Internal/Fdc3InternalApi.js +9 -12
- package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
- package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
- package/src/Api/Internal/GridFilterInternalApi.js +2 -2
- package/src/Api/Internal/GridInternalApi.js +26 -26
- package/src/Api/Internal/LayoutInternalApi.js +6 -5
- package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
- package/src/Api/Internal/NoteInternalApi.d.ts +1 -0
- package/src/Api/Internal/NoteInternalApi.js +4 -0
- package/src/Api/Internal/PredicateInternalApi.js +5 -5
- package/src/Api/Internal/ScheduleInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/PredefinedConfig/Common/ExtendedLayoutInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +3 -0
- package/src/Strategy/NoteModule.d.ts +0 -1
- package/src/Strategy/NoteModule.js +4 -5
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Fdc3Service.js +1 -3
- package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
- package/src/Utilities/Services/FlashingCellService.js +2 -3
- package/src/Utilities/Services/RowEditService.js +3 -5
- package/src/View/Alert/AlertStatusSubPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +4 -4
- package/src/View/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +1 -4
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Note/NotePopup.js +1 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -5
- package/src/agGrid/AdaptableAgGrid.js +47 -26
- package/src/agGrid/AgGridAdapter.js +3 -3
- package/src/agGrid/FloatingFilterWrapper.js +4 -3
- package/src/agGrid/defaultAdaptableOptions.js +100 -96
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +32 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -79,7 +79,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
79
79
|
}
|
|
80
80
|
return false;
|
|
81
81
|
case 'VisibleRows':
|
|
82
|
-
return this.
|
|
82
|
+
return this._adaptable.isRowNodeVisible(cellDataChangedInfo.rowNode);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
getExcelDataType(adaptableColumnType) {
|
|
@@ -119,7 +119,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
119
119
|
const exportFormatType = exportOptions.exportFormatType;
|
|
120
120
|
// First check if a function was provided and return the result
|
|
121
121
|
if (exportFormatType != null && typeof exportFormatType === 'function') {
|
|
122
|
-
const context = Object.assign(Object.assign({}, this.
|
|
122
|
+
const context = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
|
|
123
123
|
return exportFormatType(context);
|
|
124
124
|
}
|
|
125
125
|
// Next Check if a "hard-coded" value has been provided and return that
|
|
@@ -303,7 +303,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
303
303
|
case 'SelectedRows':
|
|
304
304
|
return '[Selected Rows]';
|
|
305
305
|
case 'ExpressionRows':
|
|
306
|
-
return this.
|
|
306
|
+
return this.getAdaptableInternalApi().getAdaptableQueryExpressionText(report.Query);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
}
|
|
@@ -364,17 +364,17 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
364
364
|
const resultRowData = [];
|
|
365
365
|
switch (report.ReportRowScope) {
|
|
366
366
|
case 'AllRows':
|
|
367
|
-
this.
|
|
367
|
+
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
368
368
|
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
369
369
|
});
|
|
370
370
|
break;
|
|
371
371
|
case 'VisibleRows':
|
|
372
|
-
this.
|
|
372
|
+
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
|
|
373
373
|
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
374
374
|
});
|
|
375
375
|
break;
|
|
376
376
|
case 'ExpressionRows':
|
|
377
|
-
this.
|
|
377
|
+
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
378
378
|
var _a;
|
|
379
379
|
if (this.getAdaptableApi()
|
|
380
380
|
.internalApi.getQueryLanguageService()
|
|
@@ -388,7 +388,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
388
388
|
const { gridCells: GridCells } = selectedCellInfo;
|
|
389
389
|
let selectedCellsByPrimaryKey = (0, lodash_1.groupBy)(GridCells, 'primaryKeyValue');
|
|
390
390
|
// we iterate over all visibleRowNodes to preserve the current order
|
|
391
|
-
this.
|
|
391
|
+
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
|
|
392
392
|
const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
393
393
|
const selectedRowCells = selectedCellsByPrimaryKey[rowPrimaryKeyValue];
|
|
394
394
|
if (selectedRowCells) {
|
|
@@ -406,7 +406,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
406
406
|
const selectedRowInfo = this.getAdaptableApi().gridApi.getSelectedRowInfo();
|
|
407
407
|
const selectedGridRowPrimaryKeys = (_b = (_a = selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows) === null || _a === void 0 ? void 0 : _a.filter((gr) => gr.rowInfo.isGroup == false).map((gridRow) => gridRow.primaryKeyValue)) !== null && _b !== void 0 ? _b : [];
|
|
408
408
|
if (selectedGridRowPrimaryKeys.length) {
|
|
409
|
-
this.
|
|
409
|
+
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
410
410
|
const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
411
411
|
if (selectedGridRowPrimaryKeys.includes(rowPrimaryKeyValue)) {
|
|
412
412
|
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
@@ -442,7 +442,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
442
442
|
}, {});
|
|
443
443
|
}
|
|
444
444
|
publishLiveLiveDataChangedEvent(reportDestination, liveDataTrigger, liveReport) {
|
|
445
|
-
const liveDataChangedInfo = Object.assign(Object.assign({}, this.
|
|
445
|
+
const liveDataChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { reportDestination: reportDestination, liveDataTrigger: liveDataTrigger, liveReport: liveReport });
|
|
446
446
|
this.getAdaptableApi().eventApi.emit('LiveDataChanged', liveDataChangedInfo);
|
|
447
447
|
}
|
|
448
448
|
getCellExportValueFromRowNode(rowNode, columnId, reportName) {
|
|
@@ -529,14 +529,15 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
529
529
|
formatColumnsWithDisplayFormatForColumn[columnId] = formatColumns;
|
|
530
530
|
return formatColumns;
|
|
531
531
|
};
|
|
532
|
-
const
|
|
533
|
-
const colDefs =
|
|
532
|
+
const agGridDisplayedColumns = this.getAgGridApi().getAllDisplayedColumns();
|
|
533
|
+
const colDefs = agGridDisplayedColumns.map((column) => {
|
|
534
534
|
return column.getColDef();
|
|
535
535
|
});
|
|
536
536
|
const forAllVisibleRowNodesDoConfig = { includeGroupRows: true };
|
|
537
|
-
const agGridApi = this.
|
|
538
|
-
const userExcelStyles = this.
|
|
539
|
-
|
|
537
|
+
const agGridApi = this.getAgGridApi();
|
|
538
|
+
const userExcelStyles = this.getAdaptableInternalApi().getAgGridAdapter().getUserGridOptionsProperty('excelStyles') ||
|
|
539
|
+
[];
|
|
540
|
+
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((node, rowIndex) => {
|
|
540
541
|
const rowParams = {
|
|
541
542
|
node,
|
|
542
543
|
data: node.data,
|
|
@@ -546,7 +547,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
546
547
|
};
|
|
547
548
|
const getRowStyleFn = agGridApi.getGridOption('getRowStyle');
|
|
548
549
|
const rowStyle = getRowStyleFn ? getRowStyleFn(rowParams) : {};
|
|
549
|
-
|
|
550
|
+
agGridDisplayedColumns.forEach((column, columnIndex) => {
|
|
550
551
|
var _a, _b, _c;
|
|
551
552
|
const colDef = colDefs[columnIndex];
|
|
552
553
|
const columnId = column.getId();
|
|
@@ -568,12 +569,10 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
568
569
|
}
|
|
569
570
|
return cellClassParams;
|
|
570
571
|
};
|
|
571
|
-
const cellStyle = typeof colDef.cellStyle === 'function'
|
|
572
|
-
? colDef.cellStyle(getLazyCellClassParams())
|
|
573
|
-
: {};
|
|
572
|
+
const cellStyle = typeof colDef.cellStyle === 'function' ? colDef.cellStyle(getLazyCellClassParams()) : {};
|
|
574
573
|
const excelStyles = [];
|
|
575
574
|
// add user defined excel styles
|
|
576
|
-
let userColDefCellClass = this.
|
|
575
|
+
let userColDefCellClass = this._adaptable.agGridColumnAdapter.getUserColDefProperty(column.getColId(), 'cellClass');
|
|
577
576
|
const userDefinedCellClass = typeof userColDefCellClass === 'function'
|
|
578
577
|
? userColDefCellClass(getLazyCellClassParams())
|
|
579
578
|
: userColDefCellClass;
|
|
@@ -606,7 +605,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
606
605
|
!(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue)) {
|
|
607
606
|
return;
|
|
608
607
|
}
|
|
609
|
-
const cellClassId = this.
|
|
608
|
+
const cellClassId = this._adaptable.agGridColumnAdapter.getExcelClassNameForCell(column.getId(), this._adaptable.getPrimaryKeyValueFromRowNode(node), userDefinedCellClass);
|
|
610
609
|
const finalCellExcelStyle = Object.assign({}, ...excelStyles);
|
|
611
610
|
if (excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue) {
|
|
612
611
|
let dateFormatPattern = this.getAdaptableApi().optionsApi.getExportOptions().exportDateFormat;
|
|
@@ -618,7 +617,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
618
617
|
((_c = (_b = mostRelevantFormatColumn === null || mostRelevantFormatColumn === void 0 ? void 0 : mostRelevantFormatColumn.DisplayFormat) === null || _b === void 0 ? void 0 : _b.Options) === null || _c === void 0 ? void 0 : _c.Pattern);
|
|
619
618
|
}
|
|
620
619
|
if (dateFormatPattern) {
|
|
621
|
-
const normalisedValue = this.
|
|
620
|
+
const normalisedValue = this._adaptable.getNormalisedValueFromRawValue(rawValue, abColumn);
|
|
622
621
|
if (normalisedValue) {
|
|
623
622
|
// we have to pass the date in the ISO format to Excel
|
|
624
623
|
// see https://www.ag-grid.com/javascript-data-grid/excel-export-data-types/#dates
|
|
@@ -630,7 +629,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
630
629
|
finalCellExcelStyle.dataType = 'DateTime';
|
|
631
630
|
finalCellExcelStyle.numberFormat = { format: dateFormatPattern };
|
|
632
631
|
// create a new cell key to ensure any user provided className does not interfere
|
|
633
|
-
const cellKey = this.
|
|
632
|
+
const cellKey = this._adaptable.agGridColumnAdapter.getExcelClassNameForCell(column.getColId(), this._adaptable.getPrimaryKeyValueFromRowNode(node));
|
|
634
633
|
// we need to register so that later the cellProcessor will put the isoFormattedValue through (thus giving the formatting responsability to Excel)
|
|
635
634
|
this.registerExcelStyleWithFormattedDate(cellKey, isoFormattedValue);
|
|
636
635
|
}
|
|
@@ -20,7 +20,7 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
|
|
|
20
20
|
if (typeof evaluateExpressionExternallyFn !== 'function') {
|
|
21
21
|
return true;
|
|
22
22
|
}
|
|
23
|
-
const context = Object.assign(Object.assign({}, this.
|
|
23
|
+
const context = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { module });
|
|
24
24
|
if (object) {
|
|
25
25
|
context.object = object;
|
|
26
26
|
}
|
|
@@ -38,7 +38,7 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
|
|
|
38
38
|
if (typeof evaluateExpressionExternallyFn !== 'function') {
|
|
39
39
|
return true;
|
|
40
40
|
}
|
|
41
|
-
const context = Object.assign(Object.assign({}, this.
|
|
41
|
+
const context = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { module });
|
|
42
42
|
if (object) {
|
|
43
43
|
context.object = object;
|
|
44
44
|
}
|
|
@@ -82,9 +82,9 @@ class ExpressionInternalApi extends ApiBase_1.ApiBase {
|
|
|
82
82
|
// return keys;
|
|
83
83
|
// }
|
|
84
84
|
getFieldsFromOptions() {
|
|
85
|
-
const fields = this.
|
|
85
|
+
const fields = this.getExpressionOptions().fields;
|
|
86
86
|
if (fields != null && typeof fields === 'function') {
|
|
87
|
-
return fields(this.
|
|
87
|
+
return fields(this.getAdaptableInternalApi().buildBaseContext());
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
let arr = fields;
|
|
@@ -18,7 +18,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
18
18
|
const contextMappedFromGridData = Object.assign({ type: contextType }, mappedContextData);
|
|
19
19
|
const resolveContextDataFn = this.getFdc3Options().resolveContextData;
|
|
20
20
|
if (typeof resolveContextDataFn === 'function') {
|
|
21
|
-
return resolveContextDataFn(Object.assign(Object.assign({}, this.
|
|
21
|
+
return resolveContextDataFn(Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { contextType,
|
|
22
22
|
contextMappedFromGridData,
|
|
23
23
|
rowNode, rowData: rowNode.data, primaryKeyValue: this.getGridApi().getPrimaryKeyValueForRowNode(rowNode) }));
|
|
24
24
|
}
|
|
@@ -45,7 +45,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
45
45
|
filter: false,
|
|
46
46
|
sortable: false,
|
|
47
47
|
enableRowGroup: false,
|
|
48
|
-
cellRenderer: this.
|
|
48
|
+
cellRenderer: this.getAdaptableVariant() === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
|
|
49
49
|
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, GeneralConstants_1.AB_FDC3_COLUMN, 'abColDefObject'],
|
|
50
50
|
});
|
|
51
51
|
}
|
|
@@ -65,7 +65,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
65
65
|
filter: false,
|
|
66
66
|
sortable: false,
|
|
67
67
|
enableRowGroup: false,
|
|
68
|
-
cellRenderer: this.
|
|
68
|
+
cellRenderer: this.getAdaptableVariant() === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
|
|
69
69
|
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, GeneralConstants_1.AB_FDC3_COLUMN, 'abColDefObject'],
|
|
70
70
|
};
|
|
71
71
|
};
|
|
@@ -147,11 +147,11 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
147
147
|
const relevantRaiseIntentConfig = this.getAllRaiseIntentConfigs().find((config) => config.intentType === raisedIntent && config.contextType === context.type);
|
|
148
148
|
if (typeof (relevantRaiseIntentConfig === null || relevantRaiseIntentConfig === void 0 ? void 0 : relevantRaiseIntentConfig.handleIntentResolution) === 'function') {
|
|
149
149
|
// call intent specific resolution handler
|
|
150
|
-
relevantRaiseIntentConfig.handleIntentResolution(Object.assign(Object.assign({}, this.
|
|
150
|
+
relevantRaiseIntentConfig.handleIntentResolution(Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { intentResolution }));
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
153
|
// call global resolution handler (if any)
|
|
154
|
-
(_b = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.handleIntentResolution) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.
|
|
154
|
+
(_b = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.handleIntentResolution) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { intentResolution }));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
isStandardContextType(contextType) {
|
|
@@ -200,7 +200,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
200
200
|
}
|
|
201
201
|
getDefaultIconForIntent(intentType) {
|
|
202
202
|
var _a, _b;
|
|
203
|
-
const defaultConfig = this.getFdc3Service().getUiControlsDefaultConfiguration();
|
|
203
|
+
const defaultConfig = this.getAdaptableInternalApi().getFdc3Service().getUiControlsDefaultConfiguration();
|
|
204
204
|
// @ts-ignore
|
|
205
205
|
const intentIcon = (_b = (_a = defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.intents[intentType]) === null || _a === void 0 ? void 0 : _a.icon) !== null && _b !== void 0 ? _b : {
|
|
206
206
|
name: 'fdc3',
|
|
@@ -209,7 +209,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
209
209
|
}
|
|
210
210
|
getDefaultIconForContext(contextType) {
|
|
211
211
|
var _a, _b;
|
|
212
|
-
const defaultConfig = this.getFdc3Service().getUiControlsDefaultConfiguration();
|
|
212
|
+
const defaultConfig = this.getAdaptableInternalApi().getFdc3Service().getUiControlsDefaultConfiguration();
|
|
213
213
|
// @ts-ignore
|
|
214
214
|
const contextIcon = (_b = (_a = defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.contexts[contextType]) === null || _a === void 0 ? void 0 : _a.icon) !== null && _b !== void 0 ? _b : {
|
|
215
215
|
name: 'fdc3',
|
|
@@ -244,7 +244,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
244
244
|
// '_field.fieldName'
|
|
245
245
|
if (valueReference.startsWith(Fdc3Options_1.FieldRefTypePrefix)) {
|
|
246
246
|
const fieldId = valueReference.replace(Fdc3Options_1.FieldRefTypePrefix, '');
|
|
247
|
-
mappedData[contextKey] = this.
|
|
247
|
+
mappedData[contextKey] = this.getAdaptableInternalApi().getValueUsingField(rowNode.data, fieldId);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
return mappedData;
|
|
@@ -264,7 +264,7 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
264
264
|
}
|
|
265
265
|
mapFdc3ButtonConfigToAdaptableButton(fdc3AdaptableButton, fdcInfo) {
|
|
266
266
|
const buildFdc3Context = (context) => {
|
|
267
|
-
return Object.assign({ context: this.mapRowToContextData(fdcInfo.contextType, context.rowNode), intent: fdcInfo.action === 'raiseIntent' ? fdcInfo.intent : null, rowNode: context.rowNode, rowData: context.data, primaryKeyValue: context.primaryKeyValue }, this.
|
|
267
|
+
return Object.assign({ context: this.mapRowToContextData(fdcInfo.contextType, context.rowNode), intent: fdcInfo.action === 'raiseIntent' ? fdcInfo.intent : null, rowNode: context.rowNode, rowData: context.data, primaryKeyValue: context.primaryKeyValue }, this.getAdaptableInternalApi().buildBaseContext());
|
|
268
268
|
};
|
|
269
269
|
return {
|
|
270
270
|
onClick: (_button, context) => {
|
|
@@ -354,8 +354,5 @@ class Fdc3InternalApi extends ApiBase_1.ApiBase {
|
|
|
354
354
|
tone: 'neutral',
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
getFdc3Service() {
|
|
358
|
-
return this.adaptable.Fdc3Service;
|
|
359
|
-
}
|
|
360
357
|
}
|
|
361
358
|
exports.Fdc3InternalApi = Fdc3InternalApi;
|
|
@@ -12,7 +12,7 @@ class FlashingCellInternalApi extends ApiBase_1.ApiBase {
|
|
|
12
12
|
* @param flashingCellDefinition Flashing Cell Definition to Merge
|
|
13
13
|
*/
|
|
14
14
|
mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition) {
|
|
15
|
-
let flashingDefaults = this.
|
|
15
|
+
let flashingDefaults = this.getFlashingCellOptions();
|
|
16
16
|
if (!flashingDefaults) {
|
|
17
17
|
return flashingCellDefinition;
|
|
18
18
|
}
|
|
@@ -37,7 +37,7 @@ class FlashingCellInternalApi extends ApiBase_1.ApiBase {
|
|
|
37
37
|
}
|
|
38
38
|
getAdaptableFlashingCellFor(primaryKey, columnId) {
|
|
39
39
|
var _a;
|
|
40
|
-
const flashingCellService = this.
|
|
40
|
+
const flashingCellService = this.getAdaptableInternalApi().getFlashingCellService();
|
|
41
41
|
const AdaptableFlashingAlerts = flashingCellService.gridCellsCurrentlyFlashing;
|
|
42
42
|
const AdaptableFlashingAlertsMap = flashingCellService.flashingCellsMapping;
|
|
43
43
|
const forPrimaryKey = (_a = AdaptableFlashingAlerts[primaryKey]) !== null && _a !== void 0 ? _a : {};
|
|
@@ -129,8 +129,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
129
129
|
if (!(columnCustomFormatters === null || columnCustomFormatters === void 0 ? void 0 : columnCustomFormatters.length)) {
|
|
130
130
|
return value;
|
|
131
131
|
}
|
|
132
|
-
const
|
|
133
|
-
const customFormattersFromOptions = (_c = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.formatColumnOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
|
|
132
|
+
const customFormattersFromOptions = (_c = (_b = this.getFormatColumnOptions()) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
|
|
134
133
|
// formatters are applied in the order they are defined in the options
|
|
135
134
|
const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
|
|
136
135
|
const customDisplayFormatterContext = ObjectFactory_1.default.CreateCustomDisplayFormatterContext(value, node, abColumn, this.getAdaptableApi());
|
|
@@ -186,7 +185,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
186
185
|
}
|
|
187
186
|
// first run the predicate
|
|
188
187
|
if (formatColumn.Rule.Predicates && ((_e = (_d = formatColumn.Rule) === null || _d === void 0 ? void 0 : _d.Predicates) === null || _e === void 0 ? void 0 : _e.length)) {
|
|
189
|
-
const predicateDefHandlerContext = Object.assign({ value: cellValue, oldValue: null, displayValue: cellValue, node: rowNode, column: column }, this.
|
|
188
|
+
const predicateDefHandlerContext = Object.assign({ value: cellValue, oldValue: null, displayValue: cellValue, node: rowNode, column: column }, this.getAdaptableInternalApi().buildBaseContext());
|
|
190
189
|
return this.evaluatePredicate(formatColumn, predicateDefHandlerContext);
|
|
191
190
|
} // then run the Expression
|
|
192
191
|
else if (formatColumn.Rule.BooleanExpression) {
|
|
@@ -28,7 +28,8 @@ class FreeTextColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
28
28
|
refencedCalcColumns.forEach((calculatedColumn) => {
|
|
29
29
|
colsToRefresh.push(calculatedColumn.ColumnId);
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
const suppressFlash = false;
|
|
32
|
+
this.getGridApi().refreshCells([cellDataChangedInfo.rowNode], colsToRefresh, suppressFlash);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
@@ -37,7 +38,9 @@ class FreeTextColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
37
38
|
*/
|
|
38
39
|
getFreeTextColumnModuleReferences(freeTextColumn) {
|
|
39
40
|
const references = [];
|
|
40
|
-
this.
|
|
41
|
+
this.getAdaptableInternalApi()
|
|
42
|
+
.getModules()
|
|
43
|
+
.forEach((module) => {
|
|
41
44
|
if (module
|
|
42
45
|
.getModuleFreeTextColumnReferences()
|
|
43
46
|
.some((moduleReference) => moduleReference.Uuid === freeTextColumn.Uuid)) {
|
|
@@ -4,12 +4,12 @@ exports.GridFilterInternalApi = void 0;
|
|
|
4
4
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
5
5
|
class GridFilterInternalApi extends ApiBase_1.ApiBase {
|
|
6
6
|
fireGridFilterAppliedEvent() {
|
|
7
|
-
if (this.
|
|
7
|
+
if (this.isAdapTableReady()) {
|
|
8
8
|
const currentGridFilter = this.getGridFilterApi().getCurrentGridFilter();
|
|
9
9
|
const adaptableApi = this.getAdaptableApi();
|
|
10
10
|
const gridFilterAppliedInfo = Object.assign({ gridFilter: currentGridFilter, gridFilterExpressionAST: currentGridFilter
|
|
11
11
|
? adaptableApi.expressionApi.getASTForExpression(currentGridFilter === null || currentGridFilter === void 0 ? void 0 : currentGridFilter.Expression)
|
|
12
|
-
: null }, this.
|
|
12
|
+
: null }, this.getAdaptableInternalApi().buildBaseContext());
|
|
13
13
|
adaptableApi.eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -15,10 +15,10 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
15
15
|
* Fires Grid Sorted Event
|
|
16
16
|
*/
|
|
17
17
|
fireGridSortedEvent() {
|
|
18
|
-
if (this.
|
|
18
|
+
if (this.isAdapTableReady()) {
|
|
19
19
|
const adaptableSortState = this.getAdaptableApi().configApi.getAdaptableSortState();
|
|
20
20
|
const adaptableApi = this.getAdaptableApi();
|
|
21
|
-
const gridSortedInfo = Object.assign({ adaptableSortState: adaptableSortState }, this.
|
|
21
|
+
const gridSortedInfo = Object.assign({ adaptableSortState: adaptableSortState }, this.getAdaptableInternalApi().buildBaseContext());
|
|
22
22
|
adaptableApi.eventApi.emit('GridSorted', gridSortedInfo);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -26,8 +26,8 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
26
26
|
* Fires Cell Changed Changed Event - when any data in AG Grid's dataset has changed
|
|
27
27
|
*/
|
|
28
28
|
fireCellChangedEvent(cellDataChangedInfo) {
|
|
29
|
-
if (this.
|
|
30
|
-
const cellChangedInfo = Object.assign(Object.assign({}, this.
|
|
29
|
+
if (this.isAdapTableReady()) {
|
|
30
|
+
const cellChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { cellChange: cellDataChangedInfo });
|
|
31
31
|
this.getAdaptableApi().eventApi.emit('CellChanged', cellChangedInfo);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -35,12 +35,12 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
35
35
|
* Fires Grid Data Changed Event - when a row has changed in AG Grid
|
|
36
36
|
*/
|
|
37
37
|
fireGridDataChangedEvent(dataRows, rowNodes, rowTrigger) {
|
|
38
|
-
if (this.
|
|
38
|
+
if (this.isAdapTableReady()) {
|
|
39
39
|
const gridDataChangedInfo = Object.assign({ changedAt: Date.now(), rowTrigger,
|
|
40
40
|
dataRows,
|
|
41
|
-
rowNodes }, this.
|
|
41
|
+
rowNodes }, this.getAdaptableInternalApi().buildBaseContext());
|
|
42
42
|
this.getAdaptableApi().eventApi.emit('GridDataChanged', gridDataChangedInfo);
|
|
43
|
-
this.
|
|
43
|
+
this.getAdaptableInternalApi().getDataService().CreateGridChangedEvent(gridDataChangedInfo);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -55,7 +55,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
55
55
|
const distinctValuesParams = {
|
|
56
56
|
visibleRowsOnly: false,
|
|
57
57
|
};
|
|
58
|
-
const returnValues = this.
|
|
58
|
+
const returnValues = this._adaptable.getDistinctValuesForColumn(abColumn, distinctValuesParams);
|
|
59
59
|
return this.sortDistinctValues(returnValues, abColumn).map((cv) => {
|
|
60
60
|
return cv.normalisedValue;
|
|
61
61
|
});
|
|
@@ -88,7 +88,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
88
88
|
const shouldShowValuesCount = this.shouldShowValuesCount(abColumn);
|
|
89
89
|
let valueOptions = [];
|
|
90
90
|
if (shouldShowValuesCount) {
|
|
91
|
-
const allGridCells = this.
|
|
91
|
+
const allGridCells = this._adaptable.getGridCellsForColumn(columnId, this.getColumnFilterOptions().valuesFilterOptions.showCurrentlyFilteredValuesCount);
|
|
92
92
|
const allGridValues = allGridCells.map((gc) => gc.displayValue);
|
|
93
93
|
const newsortedDistinctValues = sortedDistinctValues.filter((gc) => gc.displayValue != undefined && gc.displayValue != '' && gc.displayValue != null);
|
|
94
94
|
valueOptions = newsortedDistinctValues.map((cv) => {
|
|
@@ -118,7 +118,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
118
118
|
let returnValue = false;
|
|
119
119
|
if (showValuesCount) {
|
|
120
120
|
if (typeof showValuesCount === 'function') {
|
|
121
|
-
const columnFilterContext = Object.assign({ column }, this.
|
|
121
|
+
const columnFilterContext = Object.assign({ column }, this.getAdaptableInternalApi().buildBaseContext());
|
|
122
122
|
returnValue = showValuesCount(columnFilterContext);
|
|
123
123
|
}
|
|
124
124
|
else {
|
|
@@ -148,12 +148,12 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
148
148
|
addPredicateValues(params) {
|
|
149
149
|
var _a, _b, _c, _d;
|
|
150
150
|
const { valueOptions, column, shouldShowValuesCount, visibleRowsOnly } = params;
|
|
151
|
-
const visibleGridCells = this.
|
|
151
|
+
const visibleGridCells = this._adaptable.getGridCellsForColumnTemp(column.columnId, visibleRowsOnly);
|
|
152
152
|
let allGridCells;
|
|
153
153
|
if (shouldShowValuesCount) {
|
|
154
154
|
allGridCells = visibleRowsOnly
|
|
155
155
|
? visibleGridCells
|
|
156
|
-
: this.
|
|
156
|
+
: this._adaptable.getGridCellsForColumnTemp(column.columnId, this.getColumnFilterOptions().valuesFilterOptions.showCurrentlyFilteredValuesCount);
|
|
157
157
|
}
|
|
158
158
|
const adaptableApi = this.getAdaptableApi();
|
|
159
159
|
const predicateIds = adaptableApi.columnFilterApi.internalApi.getValuesFitlerPredicateIds(column);
|
|
@@ -232,12 +232,12 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
232
232
|
preparedPermittedValues = await (filterPermittedValues === null || filterPermittedValues === void 0 ? void 0 : filterPermittedValues.values(filterPermittedValuesParams));
|
|
233
233
|
}
|
|
234
234
|
catch (error) {
|
|
235
|
-
this.
|
|
235
|
+
this._adaptable.logger.consoleError(`Failed to load filter permitted values`, column, filter, error);
|
|
236
236
|
}
|
|
237
237
|
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
238
238
|
return {
|
|
239
239
|
suppressClientSideFilter: filterPermittedValues.suppressFilterSearchBar,
|
|
240
|
-
gridCells: this.
|
|
240
|
+
gridCells: this._adaptable.getDistinctValuesForColumn(column, distinctValuesParams),
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
@@ -265,10 +265,10 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
265
265
|
preparedPermittedValues = await (customSortPermittedValues === null || customSortPermittedValues === void 0 ? void 0 : customSortPermittedValues.values(permittedValuesParams));
|
|
266
266
|
}
|
|
267
267
|
catch (error) {
|
|
268
|
-
this.
|
|
268
|
+
this._adaptable.logger.consoleError(`Failed to load custom sort permitted values`, column, error);
|
|
269
269
|
}
|
|
270
270
|
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
271
|
-
return this.
|
|
271
|
+
return this._adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
274
|
* Gets all distinct Bulk Update values for the Column with the given ColumnId
|
|
@@ -296,10 +296,10 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
296
296
|
preparedPermittedValues = await (bulkUpdatePermittedValues === null || bulkUpdatePermittedValues === void 0 ? void 0 : bulkUpdatePermittedValues.values(bulkUpdatePermittedValuesParams));
|
|
297
297
|
}
|
|
298
298
|
catch (error) {
|
|
299
|
-
this.
|
|
299
|
+
this._adaptable.logger.consoleError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
|
|
300
300
|
}
|
|
301
301
|
distinctValuesParams.permittedValues = preparedPermittedValues;
|
|
302
|
-
return this.
|
|
302
|
+
return this._adaptable.getDistinctValuesForColumn(column, distinctValuesParams);
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
305
|
* Gets all distinct visible (after current filters are applied) display values in the Column with the given ColumnId
|
|
@@ -313,7 +313,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
313
313
|
const distinctValuesParams = {
|
|
314
314
|
visibleRowsOnly: true,
|
|
315
315
|
};
|
|
316
|
-
const returnValues = this.
|
|
316
|
+
const returnValues = this._adaptable.getDistinctValuesForColumn(abColumn, distinctValuesParams);
|
|
317
317
|
return this.sortDistinctValues(returnValues, abColumn).map((cv) => {
|
|
318
318
|
return cv.normalisedValue;
|
|
319
319
|
});
|
|
@@ -346,7 +346,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
346
346
|
visibleRowsOnly: false,
|
|
347
347
|
skipRowNode: skipRowNode,
|
|
348
348
|
};
|
|
349
|
-
return this.
|
|
349
|
+
return this._adaptable.getDistinctValuesForColumn(abColumn, distinctValuesParams);
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* Gets all distinct visible raw values in the Column
|
|
@@ -360,7 +360,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
360
360
|
const distinctValuesParams = {
|
|
361
361
|
visibleRowsOnly: true,
|
|
362
362
|
};
|
|
363
|
-
const returnValues = this.
|
|
363
|
+
const returnValues = this._adaptable.getDistinctValuesForColumn(abColumn, distinctValuesParams);
|
|
364
364
|
return this.sortDistinctValues(returnValues, abColumn).map((cv) => {
|
|
365
365
|
return cv.rawValue;
|
|
366
366
|
});
|
|
@@ -395,7 +395,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
395
395
|
this.dispatchAction(GridRedux.GridSetSelectedRows(selectedRowInfo));
|
|
396
396
|
}
|
|
397
397
|
buildStandaloneColumnHeader(column) {
|
|
398
|
-
return this.
|
|
398
|
+
return this._adaptable.agGridMenuAdapter.buildStandaloneColumnHeader(column);
|
|
399
399
|
}
|
|
400
400
|
getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
|
|
401
401
|
if (!editLookUpItem || !column) {
|
|
@@ -404,7 +404,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
404
404
|
let editLookUpValues = editLookUpItem.values;
|
|
405
405
|
// first do the function then get hardcoded items
|
|
406
406
|
if (editLookUpValues != null && typeof editLookUpValues === 'function') {
|
|
407
|
-
const editLookUpContext = Object.assign(Object.assign({}, this.
|
|
407
|
+
const editLookUpContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column, gridCell });
|
|
408
408
|
return editLookUpValues(editLookUpContext);
|
|
409
409
|
}
|
|
410
410
|
else {
|
|
@@ -444,7 +444,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
444
444
|
}
|
|
445
445
|
getRowHighlightStyle(params) {
|
|
446
446
|
var _a;
|
|
447
|
-
const primaryKeyValue = this.
|
|
447
|
+
const primaryKeyValue = this._adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
448
448
|
const highlightRow = (_a = this.getAdaptableApi()
|
|
449
449
|
.internalApi.getSystemState()
|
|
450
450
|
.HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
|
|
@@ -477,7 +477,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
477
477
|
}
|
|
478
478
|
getRowHighlightClass(params) {
|
|
479
479
|
var _a;
|
|
480
|
-
const primaryKeyValue = this.
|
|
480
|
+
const primaryKeyValue = this._adaptable.getPrimaryKeyValueFromRowNode(params.node, params.api);
|
|
481
481
|
const highlightRow = (_a = this.getAdaptableApi()
|
|
482
482
|
.internalApi.getSystemState()
|
|
483
483
|
.HighlightedRows) === null || _a === void 0 ? void 0 : _a.find((highlightRow) => {
|
|
@@ -488,7 +488,7 @@ class GridInternalApi extends ApiBase_1.ApiBase {
|
|
|
488
488
|
: null;
|
|
489
489
|
}
|
|
490
490
|
deriveSpecialColumnSettingsFromAgGridDefaultColDef() {
|
|
491
|
-
const defaultColumnDefinition = this.
|
|
491
|
+
const defaultColumnDefinition = this._adaptable.agGridAdapter.getDefaultColumnDefinition();
|
|
492
492
|
return {
|
|
493
493
|
Filterable: defaultColumnDefinition.filter,
|
|
494
494
|
Resizable: defaultColumnDefinition.resizable,
|
|
@@ -17,7 +17,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
17
17
|
* @param newState Layout State after change
|
|
18
18
|
*/
|
|
19
19
|
fireLayoutChangedEvent(trigger, oldSate, newState, skipEqualityCheck) {
|
|
20
|
-
const layoutChangedInfo = Object.assign({ actionName: trigger, oldLayoutState: oldSate, newLayoutState: newState }, this.
|
|
20
|
+
const layoutChangedInfo = Object.assign({ actionName: trigger, oldLayoutState: oldSate, newLayoutState: newState }, this.getAdaptableInternalApi().buildBaseContext());
|
|
21
21
|
if (!skipEqualityCheck && (0, isEqual_1.default)(oldSate, newState)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -128,7 +128,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
128
128
|
if (this.getEntitlementApi().getEntitlementAccessLevelForModule(ModuleConstants_1.GridFilterModuleId) == 'Hidden') {
|
|
129
129
|
layoutSupportedFeatures.GridFilter = false;
|
|
130
130
|
}
|
|
131
|
-
if (((_b = (_a = this.
|
|
131
|
+
if (((_b = (_a = this._adaptable) === null || _a === void 0 ? void 0 : _a.getAgGridRowModelType) === null || _b === void 0 ? void 0 : _b.call(_a)) !== 'clientSide') {
|
|
132
132
|
layoutSupportedFeatures.RowSummaries = false;
|
|
133
133
|
}
|
|
134
134
|
return layoutSupportedFeatures;
|
|
@@ -157,7 +157,7 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
157
157
|
return ArrayExtensions_1.default.IsNullOrEmpty(object.Tags) ? true : (_a = object.Tags) === null || _a === void 0 ? void 0 : _a.includes(layout.Name);
|
|
158
158
|
}
|
|
159
159
|
const context = Object.assign({ adaptableObject: object, module,
|
|
160
|
-
layout }, this.
|
|
160
|
+
layout }, this.getAdaptableInternalApi().buildBaseContext());
|
|
161
161
|
return layoutTagOptions === null || layoutTagOptions === void 0 ? void 0 : layoutTagOptions.isObjectAvailableInLayout(context);
|
|
162
162
|
}
|
|
163
163
|
showLayoutNotAssociatedObjects() {
|
|
@@ -183,8 +183,9 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
183
183
|
}
|
|
184
184
|
return acc;
|
|
185
185
|
}, { top: [], bottom: [] });
|
|
186
|
-
this.
|
|
187
|
-
|
|
186
|
+
const agGridAdapter = this.getAdaptableInternalApi().getAgGridAdapter();
|
|
187
|
+
agGridAdapter.setGridOption('pinnedTopRowData', top);
|
|
188
|
+
agGridAdapter.setGridOption('pinnedBottomRowData', bottom);
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
exports.LayoutInternalApi = LayoutInternalApi;
|
|
@@ -15,7 +15,7 @@ class NamedQueryInternalApi extends ApiBase_1.ApiBase {
|
|
|
15
15
|
}
|
|
16
16
|
catch (error) {
|
|
17
17
|
// defensive programing, this should happen only if someone botched the predefined configs
|
|
18
|
-
this.
|
|
18
|
+
this.logWarn(`QueryApi.getReferencedNamedQueryNames received an invalid expression: ${expression}
|
|
19
19
|
Error: ${error}`);
|
|
20
20
|
return [];
|
|
21
21
|
}
|
|
@@ -26,7 +26,7 @@ class NamedQueryInternalApi extends ApiBase_1.ApiBase {
|
|
|
26
26
|
*/
|
|
27
27
|
getNamedQueryModuleReferences(namedQueryName) {
|
|
28
28
|
const references = [];
|
|
29
|
-
this.
|
|
29
|
+
this.getAdaptableInternalApi().getModules().forEach((module) => {
|
|
30
30
|
if (module
|
|
31
31
|
.getModuleNamedQueryReferences()
|
|
32
32
|
.some((moduleReference) => moduleReference === namedQueryName)) {
|
|
@@ -10,5 +10,9 @@ class NoteInternalApi extends ApiBase_1.ApiBase {
|
|
|
10
10
|
}
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
|
+
getNotesDateFormat() {
|
|
14
|
+
const dateFormat = this.getNoteOptions().dateFormat;
|
|
15
|
+
return typeof dateFormat === 'function' ? dateFormat() : dateFormat;
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
exports.NoteInternalApi = NoteInternalApi;
|