@adaptabletools/adaptable 14.0.0-canary.2 → 14.0.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/bundle.cjs.js +197 -197
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/ColumnApi.d.ts +2 -10
- package/src/Api/EventApi.d.ts +8 -8
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnApiImpl.js +0 -8
- package/src/Api/Internal/AdaptableInternalApi.d.ts +1 -1
- package/src/Api/Internal/AdaptableInternalApi.js +4 -3
- package/src/Api/Internal/ExportInternalApi.d.ts +8 -0
- package/src/Api/Internal/ExportInternalApi.js +51 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +11 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +10 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -0
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +26 -2
- package/src/Redux/Store/AdaptableStore.js +6 -0
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.js +1 -2
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +2 -4
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +8 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -2
- package/src/Strategy/FreeTextColumnModule.js +1 -2
- package/src/Strategy/LayoutModule.js +6 -6
- package/src/Strategy/SettingsPanelModule.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -2
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -4
- package/src/Utilities/Services/ChartingService.js +1 -1
- package/src/Utilities/Services/EntitlementService.js +4 -4
- package/src/Utilities/Services/Interface/IReportService.d.ts +7 -1
- package/src/Utilities/Services/QueryLanguageService.js +3 -3
- package/src/Utilities/Services/ReportService.d.ts +10 -2
- package/src/Utilities/Services/ReportService.js +40 -31
- package/src/Utilities/Services/TeamSharingService.js +3 -3
- package/src/Utilities/Services/ValidationService.js +6 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +11 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +6 -27
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/EntityRulesEditor/Utilities.d.ts +2 -2
- package/src/View/Components/EntityRulesEditor/Utilities.js +19 -12
- package/src/View/Components/FilterForm/FilterForm.js +6 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +7 -9
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +1 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +1 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -2
- package/src/View/Dashboard/CustomToolbarWrapper.js +7 -1
- package/src/View/Dashboard/Dashboard.js +5 -5
- package/src/View/Dashboard/DashboardPopup.js +2 -3
- package/src/View/Dashboard/DashboardViewPanel.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -2
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Filter/FilterViewPanel.js +3 -3
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +5 -14
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +4 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +3 -3
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +9 -3
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +1 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -3
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +123 -39
- package/src/agGrid/PercentBarRenderer.js +1 -1
- package/src/agGrid/agGridHelper.js +3 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +7 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -363,7 +363,10 @@ class Adaptable {
|
|
|
363
363
|
// but we might need to do this again in the future for some other components that are not native React
|
|
364
364
|
// captureReactWarnings();
|
|
365
365
|
if (typeof unmount === 'function') {
|
|
366
|
-
unmount
|
|
366
|
+
// rAF is required, otherwise the unmount would be performed during the rendering phase and React doesn't like that
|
|
367
|
+
requestAnimationFrame(() => {
|
|
368
|
+
unmount();
|
|
369
|
+
});
|
|
367
370
|
}
|
|
368
371
|
// releaseReactWarnings();
|
|
369
372
|
};
|
|
@@ -436,7 +439,7 @@ class Adaptable {
|
|
|
436
439
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
437
440
|
// @ts-ignore
|
|
438
441
|
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
439
|
-
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.
|
|
442
|
+
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions());
|
|
440
443
|
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
441
444
|
// Set up Modules - we set up all the Modules suitable for AG Grid
|
|
442
445
|
// But users can make some hidden or readonly in their entitlements
|
|
@@ -3226,8 +3229,16 @@ class Adaptable {
|
|
|
3226
3229
|
const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
|
|
3227
3230
|
const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
|
|
3228
3231
|
const cellClass = (params) => {
|
|
3229
|
-
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
|
|
3230
3232
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
3233
|
+
// if a Visual Data export is in progress, we are interested only in the Excel Style Class
|
|
3234
|
+
if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
|
|
3235
|
+
const userDefinedCellClass = typeof userCellClass === 'function' ? userCellClass(params) : userCellClass;
|
|
3236
|
+
const cellClassKey = this.getExcelClassNameForCell(colId, primaryKeyValue, userDefinedCellClass);
|
|
3237
|
+
return this.api.internalApi
|
|
3238
|
+
.getReportService()
|
|
3239
|
+
.getExcelStyleIdForCellClassKey(cellClassKey);
|
|
3240
|
+
}
|
|
3241
|
+
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
|
|
3231
3242
|
const editableClassName = this.getEditableCellClass(abColumn, params);
|
|
3232
3243
|
const readonlyClassName = this.getReadonlyCellClass(abColumn, params);
|
|
3233
3244
|
const highlightAlertClassName = this.getAlertCellClass(abColumn, params);
|
|
@@ -3235,7 +3246,6 @@ class Adaptable {
|
|
|
3235
3246
|
const styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(colId);
|
|
3236
3247
|
const hasStyledColumn = !!styledColumn && !styledColumn.IsSuspended;
|
|
3237
3248
|
const returnValue = [
|
|
3238
|
-
this.getExcelClassNameForCell(colId, primaryKeyValue),
|
|
3239
3249
|
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
3240
3250
|
!hasStyledColumn && formatColumns.length
|
|
3241
3251
|
? this.getFormatColumnCellClass(formatColumns, abColumn, params)
|
|
@@ -3256,12 +3266,16 @@ class Adaptable {
|
|
|
3256
3266
|
return cellClass;
|
|
3257
3267
|
});
|
|
3258
3268
|
}
|
|
3259
|
-
getExcelClassNameForCell(colId, primaryKeyValue) {
|
|
3269
|
+
getExcelClassNameForCell(colId, primaryKeyValue, userDefinedCellClass) {
|
|
3260
3270
|
let excelClassName = `--excel-cell-${colId}-${primaryKeyValue}`;
|
|
3261
3271
|
if (excelClassName.indexOf(' ') > 0) {
|
|
3262
3272
|
excelClassName = excelClassName.replace(/\s/g, '_');
|
|
3263
3273
|
}
|
|
3264
|
-
return
|
|
3274
|
+
return userDefinedCellClass != null
|
|
3275
|
+
? `${excelClassName}-${Array.isArray(userDefinedCellClass)
|
|
3276
|
+
? userDefinedCellClass.join('-')
|
|
3277
|
+
: userDefinedCellClass}`
|
|
3278
|
+
: excelClassName;
|
|
3265
3279
|
}
|
|
3266
3280
|
setupColumnCellEditor({ colId, col }) {
|
|
3267
3281
|
const adaptableColumn = this.api.columnApi.getColumnWithColumnId(colId);
|
|
@@ -3461,7 +3475,7 @@ class Adaptable {
|
|
|
3461
3475
|
}
|
|
3462
3476
|
return (params) => {
|
|
3463
3477
|
const { node, value } = params;
|
|
3464
|
-
const
|
|
3478
|
+
const mostRelevantFormatColumn = this.api.formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(activeFormatColumnsWithDisplayFormat, abColumn, { node, value });
|
|
3465
3479
|
if (!mostRelevantFormatColumn) {
|
|
3466
3480
|
// ALL FormatColumns are conditional and NONE of them are relevant for this row
|
|
3467
3481
|
return value;
|
|
@@ -4226,7 +4240,7 @@ class Adaptable {
|
|
|
4226
4240
|
return false;
|
|
4227
4241
|
}
|
|
4228
4242
|
showQuickFilter() {
|
|
4229
|
-
const height = this.api.
|
|
4243
|
+
const height = this.api.optionsApi.getFilterOptions().quickFilterHeight;
|
|
4230
4244
|
this.gridOptions.api.setFloatingFiltersHeight(height);
|
|
4231
4245
|
}
|
|
4232
4246
|
hideQuickFilter() {
|
|
@@ -4479,8 +4493,30 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4479
4493
|
grid.destroy();
|
|
4480
4494
|
}
|
|
4481
4495
|
setExcelStylesForExport() {
|
|
4496
|
+
// we memoize as much as possible, as this is called quite A LOT
|
|
4497
|
+
const adaptableColumnMap = {};
|
|
4498
|
+
const getAdaptableColumnWithColumnId = (columnId) => {
|
|
4499
|
+
const memoizedColumn = adaptableColumnMap[columnId];
|
|
4500
|
+
if (memoizedColumn) {
|
|
4501
|
+
return memoizedColumn;
|
|
4502
|
+
}
|
|
4503
|
+
const abColumn = this.api.columnApi.getColumnWithColumnId(columnId);
|
|
4504
|
+
adaptableColumnMap[columnId] = abColumn;
|
|
4505
|
+
return abColumn;
|
|
4506
|
+
};
|
|
4507
|
+
const formatColumnsWithDisplayFormatForColumn = {};
|
|
4508
|
+
const getFormatColumnsWithDisplayFormatForColumn = (columnId) => {
|
|
4509
|
+
const memoizedFormatColumns = formatColumnsWithDisplayFormatForColumn[columnId];
|
|
4510
|
+
if (memoizedFormatColumns) {
|
|
4511
|
+
return memoizedFormatColumns;
|
|
4512
|
+
}
|
|
4513
|
+
const abColumn = getAdaptableColumnWithColumnId(columnId);
|
|
4514
|
+
const formatColumns = this.api.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
4515
|
+
formatColumnsWithDisplayFormatForColumn[columnId] = formatColumns;
|
|
4516
|
+
return formatColumns;
|
|
4517
|
+
};
|
|
4518
|
+
const isDateCellExportedAsFormattedValue = this.api.exportApi.internalApi.isDateCellExportedAsFormattedValue();
|
|
4482
4519
|
this.setGridOptionsProperty('excelStyles', (userExcelStyles = []) => {
|
|
4483
|
-
const adaptableExcelStyles = [];
|
|
4484
4520
|
const displayedColumns = this.gridOptions.columnApi.getAllDisplayedColumns();
|
|
4485
4521
|
const colDefs = displayedColumns.map((column) => {
|
|
4486
4522
|
return column.getColDef();
|
|
@@ -4497,24 +4533,33 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4497
4533
|
};
|
|
4498
4534
|
const rowStyle = this.gridOptions.getRowStyle(rowParams);
|
|
4499
4535
|
displayedColumns.forEach((column, columnIndex) => {
|
|
4536
|
+
var _a, _b, _c;
|
|
4500
4537
|
const colDef = colDefs[columnIndex];
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4538
|
+
let cellClassParams;
|
|
4539
|
+
const getLazyCellClassParams = () => {
|
|
4540
|
+
if (!cellClassParams) {
|
|
4541
|
+
cellClassParams = {
|
|
4542
|
+
colDef,
|
|
4543
|
+
node,
|
|
4544
|
+
column,
|
|
4545
|
+
data: node.data,
|
|
4546
|
+
value: this.getRawValueFromRowNode(node, column.getId()),
|
|
4547
|
+
rowIndex,
|
|
4548
|
+
api: this.gridOptions.api,
|
|
4549
|
+
columnApi: this.gridOptions.columnApi,
|
|
4550
|
+
context: {},
|
|
4551
|
+
};
|
|
4552
|
+
}
|
|
4553
|
+
return cellClassParams;
|
|
4511
4554
|
};
|
|
4512
|
-
const cellStyle = typeof colDef.cellStyle === 'function'
|
|
4555
|
+
const cellStyle = typeof colDef.cellStyle === 'function'
|
|
4556
|
+
? colDef.cellStyle(getLazyCellClassParams())
|
|
4557
|
+
: {};
|
|
4513
4558
|
const excelStyles = [];
|
|
4514
4559
|
// add user defined excel styles
|
|
4515
4560
|
let userColDefCellClass = this.getUserColDefProperty(column.getColId(), 'cellClass');
|
|
4516
4561
|
const userDefinedCellClass = typeof userColDefCellClass === 'function'
|
|
4517
|
-
? userColDefCellClass(
|
|
4562
|
+
? userColDefCellClass(getLazyCellClassParams())
|
|
4518
4563
|
: userColDefCellClass;
|
|
4519
4564
|
const userDefinedExcelStyle = userDefinedCellClass &&
|
|
4520
4565
|
userExcelStyles.find((excelStyle) => {
|
|
@@ -4536,21 +4581,48 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4536
4581
|
if (Object.values(adaptableStyle).some((style) => style != null)) {
|
|
4537
4582
|
excelStyles.push(this.convertCSSToExcelStyle(adaptableStyle));
|
|
4538
4583
|
}
|
|
4584
|
+
const excelDataType = this.api.exportApi.internalApi.getExcelDataType(colDef === null || colDef === void 0 ? void 0 : colDef.type);
|
|
4539
4585
|
// don't add the cell style if it has no adaptable custom styles or user defined styles
|
|
4540
|
-
if (!excelStyles.length
|
|
4586
|
+
if (!excelStyles.length &&
|
|
4587
|
+
// if this is a formatted Date value, we still need to add the AG GRID specific type & numberFormat below
|
|
4588
|
+
!(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue)) {
|
|
4541
4589
|
return;
|
|
4542
4590
|
}
|
|
4543
|
-
const
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4591
|
+
const cellClassId = this.getExcelClassNameForCell(column.getId(), this.getPrimaryKeyValueFromRowNode(node), userDefinedCellClass);
|
|
4592
|
+
const finalCellExcelStyle = Object.assign({}, ...excelStyles);
|
|
4593
|
+
if (excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue) {
|
|
4594
|
+
let dateFormatPattern = this.api.optionsApi.getExportOptions().exportDateFormat;
|
|
4595
|
+
const rawValue = this.getRawValueFromRowNode(node, column.getId());
|
|
4596
|
+
const abColumn = getAdaptableColumnWithColumnId(column.getColId());
|
|
4597
|
+
if (!dateFormatPattern) {
|
|
4598
|
+
const mostRelevantFormatColumn = this.api.formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(getFormatColumnsWithDisplayFormatForColumn(column.getColId()), abColumn, { node, value: rawValue });
|
|
4599
|
+
dateFormatPattern =
|
|
4600
|
+
((_a = mostRelevantFormatColumn === null || mostRelevantFormatColumn === void 0 ? void 0 : mostRelevantFormatColumn.DisplayFormat) === null || _a === void 0 ? void 0 : _a.Formatter) === 'DateFormatter' &&
|
|
4601
|
+
((_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);
|
|
4602
|
+
}
|
|
4603
|
+
if (dateFormatPattern) {
|
|
4604
|
+
const normalisedValue = this.getNormalisedValueFromRawValue(rawValue, abColumn);
|
|
4605
|
+
// we have to pass the date in the ISO format to Excel
|
|
4606
|
+
// see https://www.ag-grid.com/javascript-data-grid/excel-export-data-types/#dates
|
|
4607
|
+
const isoFormattedValue = normalisedValue === null || normalisedValue === void 0 ? void 0 : normalisedValue.toISOString();
|
|
4608
|
+
if (isoFormattedValue) {
|
|
4609
|
+
finalCellExcelStyle.dataType = 'DateTime';
|
|
4610
|
+
finalCellExcelStyle.numberFormat = { format: dateFormatPattern };
|
|
4611
|
+
// create a new cell key to ensure any user provided className does not interfere
|
|
4612
|
+
const cellKey = this.getExcelClassNameForCell(column.getColId(), this.getPrimaryKeyValueFromRowNode(node));
|
|
4613
|
+
// we need to register so that later the cellProcessor will put the isoFormattedValue through (thus giving the formatting responsability to Excel)
|
|
4614
|
+
this.api.internalApi
|
|
4615
|
+
.getReportService()
|
|
4616
|
+
.registerExcelStyleWithFormattedDate(cellKey, isoFormattedValue);
|
|
4617
|
+
}
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
this.api.internalApi
|
|
4621
|
+
.getReportService()
|
|
4622
|
+
.registerExcelStyle(finalCellExcelStyle, cellClassId);
|
|
4551
4623
|
});
|
|
4552
4624
|
});
|
|
4553
|
-
return
|
|
4625
|
+
return this.api.internalApi.getReportService().getRegisteredExcelStyles();
|
|
4554
4626
|
});
|
|
4555
4627
|
}
|
|
4556
4628
|
exportVisualDataToExcel() {
|
|
@@ -4560,13 +4632,17 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4560
4632
|
sheetName: 'Sheet 1',
|
|
4561
4633
|
fileName: this.ReportService.getReportFileName(this.adaptableOptions.adaptableId),
|
|
4562
4634
|
// delegate the cell value processing to Adaptable
|
|
4563
|
-
processCellCallback: (
|
|
4635
|
+
processCellCallback: ({ node, column, value }) => {
|
|
4564
4636
|
var _a;
|
|
4565
|
-
|
|
4637
|
+
const columnId = column.getColId();
|
|
4638
|
+
if ((node === null || node === void 0 ? void 0 : node.group) &&
|
|
4639
|
+
(this.api.columnApi.isAutoRowGroupColumn(columnId) ||
|
|
4640
|
+
// we would still need to process the cell if this is a group row with an aggregated value
|
|
4641
|
+
((_a = node === null || node === void 0 ? void 0 : node.aggData) === null || _a === void 0 ? void 0 : _a[columnId]) == undefined)) {
|
|
4566
4642
|
// skip processing of row groups, this was already handled in processRowGroupCallback()
|
|
4567
|
-
return
|
|
4643
|
+
return value;
|
|
4568
4644
|
}
|
|
4569
|
-
return this.processCellForExcelExport(
|
|
4645
|
+
return this.processCellForExcelExport(node, columnId);
|
|
4570
4646
|
},
|
|
4571
4647
|
processRowGroupCallback: (params) => {
|
|
4572
4648
|
var _a;
|
|
@@ -4654,6 +4730,14 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4654
4730
|
return result;
|
|
4655
4731
|
}
|
|
4656
4732
|
processCellForExcelExport(rowNode, columnId) {
|
|
4733
|
+
if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
|
|
4734
|
+
const cellKey = this.getExcelClassNameForCell(columnId, this.getPrimaryKeyValueFromRowNode(rowNode));
|
|
4735
|
+
const isoFormattedDate = this.ReportService.getExcelStyleWithFormattedDate(cellKey);
|
|
4736
|
+
if (isoFormattedDate) {
|
|
4737
|
+
// this is a Date cell which will be formatted by Excel
|
|
4738
|
+
return isoFormattedDate;
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4657
4741
|
return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
|
|
4658
4742
|
}
|
|
4659
4743
|
processRowGroupForExcelExport(rowNode) {
|
|
@@ -4664,9 +4748,10 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4664
4748
|
}
|
|
4665
4749
|
let rawValue = rowNode.key;
|
|
4666
4750
|
if (this.api.columnApi.getColumnDataTypeForColumnId(columnId) === 'Date' &&
|
|
4667
|
-
typeof rawValue === 'string'
|
|
4751
|
+
typeof rawValue === 'string' &&
|
|
4752
|
+
!Number.isNaN(rawValue)) {
|
|
4668
4753
|
// AG-Grid converts the value to string, we have to reconvert it back
|
|
4669
|
-
const dateRawValue = (
|
|
4754
|
+
const dateRawValue = parseInt(rawValue);
|
|
4670
4755
|
if (dateRawValue != undefined) {
|
|
4671
4756
|
// @ts-ignore
|
|
4672
4757
|
rawValue = dateRawValue;
|
|
@@ -4693,8 +4778,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4693
4778
|
}
|
|
4694
4779
|
initLicenseService() {
|
|
4695
4780
|
const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
4696
|
-
const licenseKey = globalObject.ADAPTABLE_LICENSE_KEY ||
|
|
4697
|
-
this.api.internalApi.getAdaptableOptions().licenseKey;
|
|
4781
|
+
const licenseKey = globalObject.ADAPTABLE_LICENSE_KEY || this.api.optionsApi.getLicenseKey();
|
|
4698
4782
|
return new LicenseService_1.LicenseService(this, licenseKey, {
|
|
4699
4783
|
publishedAt: publishTimestamp_1.default,
|
|
4700
4784
|
});
|
|
@@ -57,7 +57,7 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
57
57
|
textEl.style.lineHeight = '1.2';
|
|
58
58
|
if (percentBarStyle.CellText.includes('CellValue')) {
|
|
59
59
|
const activeFormatColumnsWithDisplayFormat = api.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
60
|
-
const
|
|
60
|
+
const formatColumn = api.formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(activeFormatColumnsWithDisplayFormat, abColumn, { node: params.node, value });
|
|
61
61
|
if (formatColumn && api.scopeApi.isColumnInNumericScope(abColumn, formatColumn.Scope)) {
|
|
62
62
|
const options = formatColumn.DisplayFormat.Options;
|
|
63
63
|
value = api.formatColumnApi.internalApi.getNumberFormattedValue(params.value, params.node, abColumn, options);
|
|
@@ -154,6 +154,9 @@ class agGridHelper {
|
|
|
154
154
|
return (0, PercentBarRenderer_1.getPercentBarRendererForColumn)(styledColumn, abColumn, this.adaptable.api);
|
|
155
155
|
}
|
|
156
156
|
getCleanValue(value) {
|
|
157
|
+
if (typeof value === 'string') {
|
|
158
|
+
return value;
|
|
159
|
+
}
|
|
157
160
|
if (value == null || value == 'null' || value == undefined || value == 'undefined') {
|
|
158
161
|
return undefined;
|
|
159
162
|
}
|
|
@@ -27,7 +27,7 @@ const Radio_1 = tslib_1.__importDefault(require("../Radio"));
|
|
|
27
27
|
const VarEditorButton = () => {
|
|
28
28
|
var _a, _b;
|
|
29
29
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
30
|
-
const expressionOptions = (_b = (_a = adaptable.api.
|
|
30
|
+
const expressionOptions = (_b = (_a = adaptable.api.optionsApi.getAdaptableQLOptions()) === null || _a === void 0 ? void 0 : _a.expressionOptions) === null || _b === void 0 ? void 0 : _b.customQueryVariables;
|
|
31
31
|
if (!expressionOptions || Object.keys(expressionOptions).length === 0) {
|
|
32
32
|
return React.createElement(React.Fragment, null);
|
|
33
33
|
}
|
|
@@ -2845,6 +2845,13 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2845
2845
|
kind: string;
|
|
2846
2846
|
description: string;
|
|
2847
2847
|
properties: ({
|
|
2848
|
+
name: string;
|
|
2849
|
+
kind: string;
|
|
2850
|
+
description: string;
|
|
2851
|
+
uiLabel: string;
|
|
2852
|
+
isOptional?: undefined;
|
|
2853
|
+
reference?: undefined;
|
|
2854
|
+
} | {
|
|
2848
2855
|
name: string;
|
|
2849
2856
|
kind: string;
|
|
2850
2857
|
description: string;
|