@adaptabletools/adaptable 12.1.2 → 12.1.5
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 +116 -143
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/Events/SearchChanged.d.ts +1 -0
- package/src/Api/FormatColumnApi.d.ts +5 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +14 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +5 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +40 -11
- package/src/PredefinedConfig/AlertState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -1
- package/src/PredefinedConfig/Common/Types.d.ts +1 -0
- package/src/PredefinedConfig/Common/Types.js +38 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +8 -0
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +1 -1
- package/src/Strategy/LayoutModule.js +3 -3
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StateManagementModule.js +1 -1
- package/src/Strategy/StatusBarModule.js +1 -1
- package/src/Strategy/SystemStatusModule.js +1 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ThemeModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +68 -0
- package/src/Utilities/Constants/ModuleConstants.js +70 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +5 -0
- package/src/Utilities/Services/MetamodelService.d.ts +4 -4
- package/src/Utilities/Services/MetamodelService.js +19 -12
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +193 -135
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +23 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +3 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +148 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +33 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +82 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +109 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +8 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +16 -0
- package/src/View/AdaptableWizardView/Wizard.js +2 -1
- package/src/View/AdaptableWizardView/helper.d.ts +1 -1
- package/src/View/AdaptableWizardView/helper.js +3 -10
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +6 -2
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +2 -1
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +11 -4
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +8 -4
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +3 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +14 -10
- package/src/agGrid/PercentBarRenderer.d.ts +2 -1
- package/src/agGrid/PercentBarRenderer.js +3 -3
- package/src/agGrid/agGridHelper.d.ts +1 -1
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -38,7 +38,7 @@ const SortSection = (props) => {
|
|
|
38
38
|
});
|
|
39
39
|
const sortedSortColumns = React.useMemo(() => {
|
|
40
40
|
var _a;
|
|
41
|
-
return sortWithOrder_1.sortWithOrderArray(allSortableColumns.map((col) => col.columnId), ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).map((sort) => sort.ColumnId), { sortUnorderedItems:
|
|
41
|
+
return sortWithOrder_1.sortWithOrderArray(allSortableColumns.map((col) => col.columnId), ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).map((sort) => sort.ColumnId), { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
42
42
|
}, [layout, allSortableColumns]);
|
|
43
43
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
44
44
|
props.onChange(Object.assign(Object.assign({}, layout), { ColumnSorts: (columnIds || []).map((columnId) => {
|
|
@@ -22,7 +22,7 @@ export interface OnePageAdaptableWizardSection<ENTITY> {
|
|
|
22
22
|
isValid?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => true | string;
|
|
23
23
|
isVisible?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => boolean;
|
|
24
24
|
render: (data: ENTITY, index: number) => React.ReactNode;
|
|
25
|
-
renderSummary?: (data: ENTITY
|
|
25
|
+
renderSummary?: (data: ENTITY) => React.ReactNode;
|
|
26
26
|
}
|
|
27
27
|
export interface OnePageAdaptableWizardProps<ENTITY> {
|
|
28
28
|
moduleInfo: ModuleInfo;
|
|
@@ -259,7 +259,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
259
259
|
getExcelClassNameForCell(colId: string, primaryKeyValue: any): string;
|
|
260
260
|
setupColumnCellEditor({ colId, col }: ColumnSetupInfo): void;
|
|
261
261
|
setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
262
|
-
setupColumnTooltipValueGetter({ col, colId }: ColumnSetupInfo): void;
|
|
262
|
+
setupColumnTooltipValueGetter({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
263
263
|
setupColumnQuickFilerText({ col, abColumn }: ColumnSetupInfo): void;
|
|
264
264
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
265
265
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -392,7 +392,7 @@ class Adaptable {
|
|
|
392
392
|
this.AlertService = new AlertService_1.AlertService(this.api);
|
|
393
393
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
394
394
|
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
395
|
-
this.MetamodelService = new MetamodelService_1.MetamodelService(this.api);
|
|
395
|
+
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.internalApi.getAdaptableOptions());
|
|
396
396
|
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
397
397
|
// Set up Modules - we set up all the Modules suitable for AG Grid
|
|
398
398
|
// But users can make some hidden or readonly in their entitlements
|
|
@@ -893,7 +893,7 @@ class Adaptable {
|
|
|
893
893
|
this.gridOptions.api.setColumnDefs(colDefs);
|
|
894
894
|
this.updateColumnsIntoStore(); // todo remove this from here!!!
|
|
895
895
|
}
|
|
896
|
-
getFormatColumnCellStyle(formatColumn, params) {
|
|
896
|
+
getFormatColumnCellStyle(abColumn, formatColumn, params) {
|
|
897
897
|
if (!formatColumn.IncludeGroupedRows && this.isGroupRowNode(params.node)) {
|
|
898
898
|
return;
|
|
899
899
|
}
|
|
@@ -906,8 +906,8 @@ class Adaptable {
|
|
|
906
906
|
if (columnStyle) {
|
|
907
907
|
const gradientStyle = columnStyle === null || columnStyle === void 0 ? void 0 : columnStyle.GradientStyle;
|
|
908
908
|
if (gradientStyle) {
|
|
909
|
-
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, params.node, params.value);
|
|
910
|
-
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, params.node, params.value);
|
|
909
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, abColumn, params.node, params.value);
|
|
910
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, abColumn, params.node, params.value);
|
|
911
911
|
const clampedValue = clamp_1.default(params.value, min, max);
|
|
912
912
|
let cellBackColor;
|
|
913
913
|
let reverseGradient = false;
|
|
@@ -915,7 +915,8 @@ class Adaptable {
|
|
|
915
915
|
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
916
916
|
}
|
|
917
917
|
else {
|
|
918
|
-
const matchingRange = gradientStyle.CellRanges.find((r) => r.Min
|
|
918
|
+
const matchingRange = gradientStyle.CellRanges.find((r) => (r.Min == 'Col-Min' || r.Min <= clampedValue) &&
|
|
919
|
+
(r.Max == 'Col-Max' || r.Max >= clampedValue));
|
|
919
920
|
if (matchingRange) {
|
|
920
921
|
cellBackColor = matchingRange.Color;
|
|
921
922
|
reverseGradient = matchingRange.ReverseGradient;
|
|
@@ -1394,6 +1395,9 @@ class Adaptable {
|
|
|
1394
1395
|
shouldUpdateHeaders = this.setupColumnHeader(colSetupInfo) || shouldUpdateHeaders;
|
|
1395
1396
|
});
|
|
1396
1397
|
isChanged = isChanged || shouldUpdateHeaders;
|
|
1398
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(layout.ColumnFilters)) {
|
|
1399
|
+
this.gridOptions.api.onFilterChanged();
|
|
1400
|
+
}
|
|
1397
1401
|
if (isChanged) {
|
|
1398
1402
|
// it's important we set pivot mode
|
|
1399
1403
|
// before we set column state
|
|
@@ -3129,7 +3133,7 @@ class Adaptable {
|
|
|
3129
3133
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
3130
3134
|
const cellStyle = (params) => {
|
|
3131
3135
|
const formatColumnCellStyle = formatColumn
|
|
3132
|
-
? this.getFormatColumnCellStyle(formatColumn, params)
|
|
3136
|
+
? this.getFormatColumnCellStyle(abColumn, formatColumn, params)
|
|
3133
3137
|
: undefined;
|
|
3134
3138
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
3135
3139
|
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultCellStyle), this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), formatColumnCellStyle), this.getConditionalStyleCellStyle(conditionalStyles, abColumn, params)), (isQuickSearchActive ? quickSearchStyle : undefined)), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
@@ -3221,7 +3225,7 @@ class Adaptable {
|
|
|
3221
3225
|
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
3222
3226
|
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
|
|
3223
3227
|
if (formatColumn.ColumnStyle.PercentBarStyle) {
|
|
3224
|
-
return this.agGridHelper.createPercentBarRendererComp(formatColumn);
|
|
3228
|
+
return this.agGridHelper.createPercentBarRendererComp(formatColumn, abColumn);
|
|
3225
3229
|
}
|
|
3226
3230
|
if (formatColumn.ColumnStyle.CheckBoxStyle) {
|
|
3227
3231
|
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
@@ -3229,7 +3233,7 @@ class Adaptable {
|
|
|
3229
3233
|
}
|
|
3230
3234
|
});
|
|
3231
3235
|
}
|
|
3232
|
-
setupColumnTooltipValueGetter({ col, colId }) {
|
|
3236
|
+
setupColumnTooltipValueGetter({ col, colId, abColumn }) {
|
|
3233
3237
|
this.setColDefProperty(col, 'tooltipValueGetter', () => {
|
|
3234
3238
|
var _a;
|
|
3235
3239
|
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(colId);
|
|
@@ -3240,8 +3244,8 @@ class Adaptable {
|
|
|
3240
3244
|
formatColumn.ColumnStyle.PercentBarStyle.ToolTipText) {
|
|
3241
3245
|
if ((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle) {
|
|
3242
3246
|
return (params) => {
|
|
3243
|
-
const min = this.api.formatColumnApi.getNumericStyleMinValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, params.node, params.value);
|
|
3244
|
-
const max = this.api.formatColumnApi.getNumericStyleMaxValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, params.node, params.value);
|
|
3247
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
3248
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
3245
3249
|
const textOptions = formatColumn.ColumnStyle.PercentBarStyle.ToolTipText;
|
|
3246
3250
|
let returnValue = '';
|
|
3247
3251
|
if (textOptions.includes('CellValue')) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
|
-
|
|
3
|
+
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
export declare const getPercentBarRendererForColumn: (formatColumn: FormatColumn, abColumn: AdaptableColumn, api: AdaptableApi) => any;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
|
|
6
6
|
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
7
7
|
const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
|
|
8
|
-
const getPercentBarRendererForColumn = (formatColumn, api) => {
|
|
8
|
+
const getPercentBarRendererForColumn = (formatColumn, abColumn, api) => {
|
|
9
9
|
var _a;
|
|
10
10
|
if (!((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle)) {
|
|
11
11
|
return;
|
|
@@ -15,8 +15,8 @@ const getPercentBarRendererForColumn = (formatColumn, api) => {
|
|
|
15
15
|
if (!formatColumn.IncludeGroupedRows && api.gridApi.isGroupRowNode(params.node)) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const min = api.formatColumnApi.getNumericStyleMinValue(formatColumn.ColumnStyle, params.node, params.value);
|
|
19
|
-
const max = api.formatColumnApi.getNumericStyleMaxValue(formatColumn.ColumnStyle, params.node, params.value);
|
|
18
|
+
const min = api.formatColumnApi.getNumericStyleMinValue(formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
19
|
+
const max = api.formatColumnApi.getNumericStyleMaxValue(formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
20
20
|
let value = params.value;
|
|
21
21
|
if (Helper_1.default.objectNotExists(value)) {
|
|
22
22
|
value = 0;
|
|
@@ -21,7 +21,7 @@ export declare class agGridHelper {
|
|
|
21
21
|
setUpModules(): Map<AdaptableModule, IModule>;
|
|
22
22
|
TrySetUpNodeIds(hasAutogeneratedPrimaryKey: boolean): boolean;
|
|
23
23
|
createCheckboxRendererComp(columnId: string, isColumnReadOnly: boolean): ICellRendererFunc | undefined;
|
|
24
|
-
createPercentBarRendererComp(formatColumn: FormatColumn): ICellRendererFunc;
|
|
24
|
+
createPercentBarRendererComp(formatColumn: FormatColumn, abColumn: AdaptableColumn): ICellRendererFunc;
|
|
25
25
|
getCleanValue(value: string): string | undefined;
|
|
26
26
|
getRenderedValue(colDef: ColDef, valueToRender: any): any;
|
|
27
27
|
createAdaptableColumnFromAgGridColumn(agGridColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
|
|
@@ -148,8 +148,8 @@ class agGridHelper {
|
|
|
148
148
|
createCheckboxRendererComp(columnId, isColumnReadOnly) {
|
|
149
149
|
return CheckboxRenderer_1.getCheckboxRendererForColumn(columnId, isColumnReadOnly, this.adaptable.api);
|
|
150
150
|
}
|
|
151
|
-
createPercentBarRendererComp(formatColumn) {
|
|
152
|
-
return PercentBarRenderer_1.getPercentBarRendererForColumn(formatColumn, this.adaptable.api);
|
|
151
|
+
createPercentBarRendererComp(formatColumn, abColumn) {
|
|
152
|
+
return PercentBarRenderer_1.getPercentBarRendererForColumn(formatColumn, abColumn, this.adaptable.api);
|
|
153
153
|
}
|
|
154
154
|
getCleanValue(value) {
|
|
155
155
|
if (value == null || value == 'null' || value == undefined || value == 'undefined') {
|