@adaptabletools/adaptable 20.2.11 → 20.3.0-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/agGrid.d.ts +4 -0
- package/agGrid.js +5 -1
- package/base.css +6 -6
- package/base.css.map +1 -1
- package/index.css +6 -6
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +3 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +1 -0
- package/src/AdaptableOptions/PredicateOptions.d.ts +2 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -2
- package/src/AdaptableState/Common/AdaptableColumn.js +1 -0
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptablePredicate.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptablePredicate.js +17 -2
- package/src/AdaptableState/Common/ColumnScope.d.ts +1 -1
- package/src/AdaptableState/Common/CustomWindowConfig.d.ts +40 -0
- package/src/AdaptableState/Common/ProgressIndicatorConfig.d.ts +8 -1
- package/src/AdaptableState/Common/RowScope.d.ts +4 -0
- package/src/AdaptableState/FormatColumnState.d.ts +10 -0
- package/src/AdaptableState/StyledColumnState.d.ts +4 -0
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/GridApi.d.ts +8 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ColumnApiImpl.js +14 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +25 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +3 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +6 -0
- package/src/Api/Internal/ColumnInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnInternalApi.js +3 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +13 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +33 -6
- package/src/Api/UserInterfaceApi.d.ts +16 -4
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -0
- package/src/Strategy/StyledColumnModule.js +8 -3
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +6 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +1 -0
- package/src/Utilities/Helpers/FormatHelper.js +3 -0
- package/src/Utilities/getScopeViewItems.js +1 -1
- package/src/View/Components/ColumnFilter/utils.js +9 -4
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -4
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +3 -4
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +16 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +67 -23
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +34 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +18 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +22 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +6 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +29 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +28 -2
- package/src/agGrid/AgGridAdapter.js +3 -7
- package/src/agGrid/AgGridColumnAdapter.d.ts +4 -1
- package/src/agGrid/AgGridColumnAdapter.js +109 -10
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +14 -2
- package/src/agGrid/cellRenderers/BadgeRenderer.js +27 -13
- package/src/components/ProgressIndicator/ProgressIndicator.js +18 -4
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +43 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -132,6 +132,8 @@ export class AgGridColumnAdapter {
|
|
|
132
132
|
this.setupColumnCellRenderer(colSetupInfo);
|
|
133
133
|
this.setupColumnCellStyle(colSetupInfo);
|
|
134
134
|
this.setupColumnCellClass(colSetupInfo);
|
|
135
|
+
this.setupColumnHeaderStyle(colSetupInfo);
|
|
136
|
+
this.setupColumnHeaderClass(colSetupInfo);
|
|
135
137
|
this.setupColumnTooltipValueGetter(colSetupInfo);
|
|
136
138
|
this.setupColumnValueGetter(colSetupInfo);
|
|
137
139
|
this.setupColumnFilter(colSetupInfo);
|
|
@@ -157,7 +159,7 @@ export class AgGridColumnAdapter {
|
|
|
157
159
|
}
|
|
158
160
|
setupColumnCellClass({ col, colId, abColumn }) {
|
|
159
161
|
this.setColDefProperty(col, 'cellClass', (userCellClass) => {
|
|
160
|
-
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
162
|
+
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, { target: 'cell' });
|
|
161
163
|
const quickSearchTextMatchStyle = this.getQuickSearchTextMatchStyle();
|
|
162
164
|
const quickSearchCurrentTextMatchStyle = this.getQuickSearchCurrentTextMatchStyle();
|
|
163
165
|
const cellClass = (params) => {
|
|
@@ -207,6 +209,54 @@ export class AgGridColumnAdapter {
|
|
|
207
209
|
return cellClass;
|
|
208
210
|
});
|
|
209
211
|
}
|
|
212
|
+
setupColumnHeaderClass({ col, colId, abColumn }) {
|
|
213
|
+
this.setColDefProperty(col, 'headerClass', (userHeaderClass) => {
|
|
214
|
+
const headerClass = (params) => {
|
|
215
|
+
let baseHeaderClass = [];
|
|
216
|
+
// inherit styles from user provided colDef property
|
|
217
|
+
const userDefinedHeaderClass = typeof userHeaderClass === 'function' ? userHeaderClass(params) : userHeaderClass;
|
|
218
|
+
if (userDefinedHeaderClass) {
|
|
219
|
+
baseHeaderClass =
|
|
220
|
+
typeof userDefinedHeaderClass === 'string'
|
|
221
|
+
? [userDefinedHeaderClass]
|
|
222
|
+
: Array.isArray(userDefinedHeaderClass)
|
|
223
|
+
? userDefinedHeaderClass
|
|
224
|
+
: [userDefinedHeaderClass];
|
|
225
|
+
}
|
|
226
|
+
if (params.floatingFilter) {
|
|
227
|
+
// we NEVER style floating filters
|
|
228
|
+
return baseHeaderClass;
|
|
229
|
+
}
|
|
230
|
+
if (params.columnGroup) {
|
|
231
|
+
// we TEMPORARILY do NOT style column groups
|
|
232
|
+
// see https://github.com/AdaptableTools/adaptable/issues/2947#issuecomment-3062304655
|
|
233
|
+
return baseHeaderClass;
|
|
234
|
+
}
|
|
235
|
+
const columnId = params.column.getColId();
|
|
236
|
+
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
237
|
+
if (!adaptableColumn) {
|
|
238
|
+
return baseHeaderClass;
|
|
239
|
+
}
|
|
240
|
+
const target = 'columnHeader';
|
|
241
|
+
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
|
|
242
|
+
target,
|
|
243
|
+
});
|
|
244
|
+
if (!formatColumns.length) {
|
|
245
|
+
return baseHeaderClass;
|
|
246
|
+
}
|
|
247
|
+
const formatColumnClasses = formatColumns
|
|
248
|
+
.map((formatColumn) => {
|
|
249
|
+
if (formatColumn.Style?.ClassName &&
|
|
250
|
+
this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, abColumn)) {
|
|
251
|
+
return formatColumn.Style?.ClassName;
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
.filter((x) => !!x);
|
|
255
|
+
return [...baseHeaderClass, ...formatColumnClasses];
|
|
256
|
+
};
|
|
257
|
+
return headerClass;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
210
260
|
setupColumnCellStyle({ col }) {
|
|
211
261
|
this.setColDefProperty(col, 'cellStyle', (userCellStyle) => {
|
|
212
262
|
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
@@ -263,7 +313,7 @@ export class AgGridColumnAdapter {
|
|
|
263
313
|
...this.getReadOnlyCellStyle(gridCell, params),
|
|
264
314
|
...this.getEditableCellStyle(gridCell, params),
|
|
265
315
|
...this.getEditedCellStyle(gridCell, params),
|
|
266
|
-
...this.getFormatColumnAndStyledColumnCellStyle(gridCell, params),
|
|
316
|
+
...this.getFormatColumnAndStyledColumnCellStyle(gridCell.column, params),
|
|
267
317
|
...(isQuickSearchActive ? quickSearchStyle : {}),
|
|
268
318
|
...(isQuickSearchActive && textStyleToApply ? textStyleToApply : {}),
|
|
269
319
|
...this.getAlertCellStyle(gridCell, params),
|
|
@@ -275,6 +325,35 @@ export class AgGridColumnAdapter {
|
|
|
275
325
|
return cellStyle;
|
|
276
326
|
});
|
|
277
327
|
}
|
|
328
|
+
setupColumnHeaderStyle({ col }) {
|
|
329
|
+
this.setColDefProperty(col, 'headerStyle', (userHeaderStyle) => {
|
|
330
|
+
const headerStyleFunc = (params) => {
|
|
331
|
+
// inherit styles from user provided colDef property
|
|
332
|
+
const baseStyles = typeof userHeaderStyle === 'function' ? userHeaderStyle(params) : userHeaderStyle;
|
|
333
|
+
if (params.floatingFilter) {
|
|
334
|
+
// we NEVER style floating filters
|
|
335
|
+
return baseStyles;
|
|
336
|
+
}
|
|
337
|
+
const columnId = params.column.getColId();
|
|
338
|
+
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
339
|
+
if (!adaptableColumn) {
|
|
340
|
+
return baseStyles;
|
|
341
|
+
}
|
|
342
|
+
const result = {
|
|
343
|
+
...baseStyles,
|
|
344
|
+
...this.getFormatColumnHeaderStyle(adaptableColumn, params),
|
|
345
|
+
};
|
|
346
|
+
if (result['borderColor']) {
|
|
347
|
+
// by default, header cells don't have a border
|
|
348
|
+
// if the user defines a border-color, we assume he wants to show a border
|
|
349
|
+
result['borderWidth'] = `1px`;
|
|
350
|
+
result['borderStyle'] = 'solid';
|
|
351
|
+
}
|
|
352
|
+
return normalizeStyleForAgGrid(result);
|
|
353
|
+
};
|
|
354
|
+
return headerStyleFunc;
|
|
355
|
+
});
|
|
356
|
+
}
|
|
278
357
|
setupColumnCellEditor({ colId, col, colDef, abColumn }) {
|
|
279
358
|
const shouldShowSelectCellEditor = this.adaptableApi.userInterfaceApi.internalApi.shouldShowSelectCellEditor(abColumn);
|
|
280
359
|
const hasRichSelectCellEditor = this.adaptableInstance.agGridAdapter.isAgGridModuleRegistered('RichSelect');
|
|
@@ -843,7 +922,7 @@ export class AgGridColumnAdapter {
|
|
|
843
922
|
const classNames = formatColumns
|
|
844
923
|
.map((formatColumn) => {
|
|
845
924
|
if (formatColumn.Style?.ClassName &&
|
|
846
|
-
this.adaptableApi.formatColumnApi.internalApi.
|
|
925
|
+
this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInCell(formatColumn, abColumn, params.node, params.value)) {
|
|
847
926
|
return formatColumn.Style?.ClassName;
|
|
848
927
|
}
|
|
849
928
|
})
|
|
@@ -909,13 +988,13 @@ export class AgGridColumnAdapter {
|
|
|
909
988
|
}
|
|
910
989
|
/**
|
|
911
990
|
* The combination of styled column and format cells
|
|
912
|
-
* This
|
|
991
|
+
* This function decides when the two can be merged.
|
|
913
992
|
*/
|
|
914
|
-
getFormatColumnAndStyledColumnCellStyle(
|
|
915
|
-
let styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(
|
|
993
|
+
getFormatColumnAndStyledColumnCellStyle(column, params) {
|
|
994
|
+
let styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(column.columnId);
|
|
916
995
|
let styledColumnStyle = {};
|
|
917
996
|
if (styledColumn && !styledColumn?.IsSuspended) {
|
|
918
|
-
const styledCellStyle = this.getStyledColumnStyle(styledColumn,
|
|
997
|
+
const styledCellStyle = this.getStyledColumnStyle(styledColumn, column, params);
|
|
919
998
|
// for percentbar we want to merge
|
|
920
999
|
if (styledColumn.PercentBarStyle || styledColumn.BadgeStyle || styledColumn.GradientStyle) {
|
|
921
1000
|
styledColumnStyle = styledCellStyle;
|
|
@@ -925,13 +1004,33 @@ export class AgGridColumnAdapter {
|
|
|
925
1004
|
return styledCellStyle;
|
|
926
1005
|
}
|
|
927
1006
|
}
|
|
928
|
-
const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(
|
|
1007
|
+
const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(column, {
|
|
1008
|
+
target: 'cell',
|
|
1009
|
+
});
|
|
929
1010
|
// background color of styledColumn.GradientStyle has precedence and wins over FormatColumn
|
|
930
1011
|
return {
|
|
931
|
-
...this.getFormatColumnCellStyle(
|
|
1012
|
+
...this.getFormatColumnCellStyle(column, activeFormatColumnsWithStyle, params),
|
|
932
1013
|
...styledColumnStyle,
|
|
933
1014
|
};
|
|
934
1015
|
}
|
|
1016
|
+
getFormatColumnHeaderStyle(column, params) {
|
|
1017
|
+
if (params.columnGroup) {
|
|
1018
|
+
// FormatColumns are not supported in column groups
|
|
1019
|
+
// YET, see https://github.com/AdaptableTools/adaptable/issues/2947#issuecomment-3062304655
|
|
1020
|
+
return {};
|
|
1021
|
+
}
|
|
1022
|
+
const target = 'columnHeader';
|
|
1023
|
+
const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(column, {
|
|
1024
|
+
target,
|
|
1025
|
+
});
|
|
1026
|
+
if (!activeFormatColumnsWithStyle.length) {
|
|
1027
|
+
return {};
|
|
1028
|
+
}
|
|
1029
|
+
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1030
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, column);
|
|
1031
|
+
});
|
|
1032
|
+
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1033
|
+
}
|
|
935
1034
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
936
1035
|
let style = {};
|
|
937
1036
|
const gradientStyle = styledColumn?.GradientStyle;
|
|
@@ -998,7 +1097,7 @@ export class AgGridColumnAdapter {
|
|
|
998
1097
|
return {};
|
|
999
1098
|
}
|
|
1000
1099
|
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1001
|
-
return this.adaptableApi.formatColumnApi.internalApi.
|
|
1100
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInCell(formatColumn, abColumn, params.node, params.value);
|
|
1002
1101
|
});
|
|
1003
1102
|
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1004
1103
|
}
|
|
@@ -46,8 +46,14 @@ export const ReactActionColumnRenderer = (props) => {
|
|
|
46
46
|
}
|
|
47
47
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(props.node);
|
|
48
48
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
|
|
49
|
+
const isGrandTotalRowNode = adaptable.api.gridApi.isGrandTotalRowNode(props.node);
|
|
49
50
|
let shouldRender = true;
|
|
50
|
-
if (
|
|
51
|
+
if (isGrandTotalRowNode) {
|
|
52
|
+
if (actionColumn.rowScope?.ExcludeTotalRows) {
|
|
53
|
+
shouldRender = false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else if (isGroupedRow) {
|
|
51
57
|
if (actionColumn.rowScope?.ExcludeGroupRows) {
|
|
52
58
|
shouldRender = false;
|
|
53
59
|
}
|
|
@@ -108,8 +114,14 @@ export class ActionColumnRenderer {
|
|
|
108
114
|
this.eGui.className = 'ab-ActionColumn';
|
|
109
115
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(params.node);
|
|
110
116
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
|
|
117
|
+
const isGrandTotalRowNode = adaptable.api.gridApi.isGrandTotalRowNode(params.node);
|
|
111
118
|
let shouldRender = true;
|
|
112
|
-
if (
|
|
119
|
+
if (isGrandTotalRowNode) {
|
|
120
|
+
if (actionColumn.rowScope?.ExcludeTotalRows) {
|
|
121
|
+
shouldRender = false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else if (isGroupedRow) {
|
|
113
125
|
if (actionColumn.rowScope?.ExcludeGroupRows) {
|
|
114
126
|
shouldRender = false;
|
|
115
127
|
}
|
|
@@ -14,8 +14,14 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
14
14
|
this.eGui.className = 'ab-Badge__wrapper';
|
|
15
15
|
const isGroupedRow = params.node.group;
|
|
16
16
|
const isSummaryRow = adaptableApi.gridApi.isSummaryNode(params.node);
|
|
17
|
+
const isGrandTotalRowNode = adaptableApi.gridApi.isGrandTotalRowNode(params.node);
|
|
17
18
|
let shouldRender = true;
|
|
18
|
-
if (
|
|
19
|
+
if (isGrandTotalRowNode) {
|
|
20
|
+
if (badgeStyle.RowScope?.ExcludeTotalRows) {
|
|
21
|
+
shouldRender = false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else if (isGroupedRow) {
|
|
19
25
|
if (badgeStyle.RowScope?.ExcludeGroupRows) {
|
|
20
26
|
shouldRender = false;
|
|
21
27
|
}
|
|
@@ -51,7 +57,6 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
51
57
|
return;
|
|
52
58
|
}
|
|
53
59
|
for (const value of params.value) {
|
|
54
|
-
const formattedValue = params.formatValue?.(value) ?? value ?? '';
|
|
55
60
|
const predicateDefHandlerContext = {
|
|
56
61
|
value: value,
|
|
57
62
|
oldValue: null,
|
|
@@ -61,18 +66,20 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
61
66
|
...adaptableApi.internalApi.buildBaseContext(),
|
|
62
67
|
};
|
|
63
68
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
69
|
+
const formattedValue = badge?.IconOnly ? '' : params.formatValue?.(value) ?? value ?? '';
|
|
64
70
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
65
|
-
if (!isNullValue
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
71
|
+
if (!isNullValue) {
|
|
72
|
+
const config = { value: formattedValue };
|
|
73
|
+
if (badge) {
|
|
74
|
+
config.badge = badge;
|
|
75
|
+
}
|
|
76
|
+
badgesConfig.push(config);
|
|
70
77
|
}
|
|
71
78
|
}
|
|
72
79
|
this.renderBadges(badgesConfig, api, params);
|
|
73
80
|
}
|
|
74
81
|
renderSingularValues(params, adaptableApi) {
|
|
75
|
-
|
|
82
|
+
let formattedValue = params.formatValue?.(params.value) ?? params.value ?? '';
|
|
76
83
|
const predicateDefHandlerContext = {
|
|
77
84
|
value: params.value,
|
|
78
85
|
oldValue: null,
|
|
@@ -83,14 +90,14 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
83
90
|
};
|
|
84
91
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
85
92
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
86
|
-
if
|
|
87
|
-
|
|
88
|
-
isNullValue ||
|
|
89
|
-
// no badge
|
|
90
|
-
!badge) {
|
|
93
|
+
// Return if empty values or no badge
|
|
94
|
+
if (isNullValue || !badge) {
|
|
91
95
|
this.eGui.innerHTML = formattedValue;
|
|
92
96
|
return;
|
|
93
97
|
}
|
|
98
|
+
if (badge.IconOnly) {
|
|
99
|
+
formattedValue = '';
|
|
100
|
+
}
|
|
94
101
|
this.renderBadges([
|
|
95
102
|
{
|
|
96
103
|
badge,
|
|
@@ -101,6 +108,13 @@ export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
101
108
|
renderBadges(config, api, params) {
|
|
102
109
|
const adaptable = this.getAdaptableInstance(params);
|
|
103
110
|
const badges = config.map(({ badge, value }, index) => {
|
|
111
|
+
if (!badge) {
|
|
112
|
+
return React.createElement('span', {
|
|
113
|
+
key: index,
|
|
114
|
+
className: 'ab-Badge ab-Badge__unstyled',
|
|
115
|
+
children: value,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
104
118
|
return React.createElement(Badge, {
|
|
105
119
|
key: index,
|
|
106
120
|
adaptableStyle: badge.Style,
|
|
@@ -8,7 +8,7 @@ import Dialog from '../Dialog';
|
|
|
8
8
|
import { Box, Flex } from 'rebass';
|
|
9
9
|
export const ProgressIndicator = () => {
|
|
10
10
|
const adaptable = useAdaptable();
|
|
11
|
-
const { active, text, render, frameworkComponent } = useSelector((state) => state.Popup.ProgressIndicator);
|
|
11
|
+
const { active, text, render, frameworkComponent, renderMode } = useSelector((state) => state.Popup.ProgressIndicator);
|
|
12
12
|
const [visible, setVisible] = useState(false);
|
|
13
13
|
const [progressIndicatorCoordinates, setProgressIndicatorCoordinates] = useState({
|
|
14
14
|
top: 0,
|
|
@@ -49,10 +49,24 @@ export const ProgressIndicator = () => {
|
|
|
49
49
|
if (render || frameworkComponent) {
|
|
50
50
|
customEl = React.createElement(ExternalRenderer, { render: render, frameworkComponent: frameworkComponent });
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
// Check if we should replace the default content
|
|
53
|
+
const replaceContent = renderMode === 'dialog' && customEl;
|
|
54
|
+
return (React.createElement(
|
|
55
|
+
React.Fragment,
|
|
56
|
+
null,
|
|
57
|
+
active && (React.createElement(Dialog, { modal: true, isOpen: true, showCloseButton: false, className: `ab-ProgressIndicator ${visible ? 'ab-ProgressIndicator--visible' : ''}`, modalProps: {
|
|
58
|
+
style: progressIndicatorCoordinates,
|
|
59
|
+
} }, replaceContent ? (
|
|
60
|
+
// If renderMode is 'dialog', replace the entire content with custom element
|
|
61
|
+
customEl) : (
|
|
62
|
+
// Otherwise use the default Flex layout
|
|
63
|
+
(React.createElement(
|
|
64
|
+
Flex,
|
|
65
|
+
{ alignItems: "center", flexDirection: "column", p: 3, className: "ab-ProgressIndicator-body" },
|
|
54
66
|
React.createElement(LoaderSpinner, null),
|
|
55
67
|
React.createElement(Box, { mt: 3 },
|
|
56
68
|
text && React.createElement(Box, null, text),
|
|
57
|
-
customEl)
|
|
69
|
+
customEl)
|
|
70
|
+
)))))
|
|
71
|
+
));
|
|
58
72
|
};
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "20.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1752676413621 || Date.now(),
|
|
4
|
+
VERSION: "20.3.0-canary.0" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -648,8 +648,8 @@ export class LayoutManager extends LMEmitter {
|
|
|
648
648
|
const colId = colDef.colId ?? colDef.field;
|
|
649
649
|
return (layout.ColumnVisibility?.[colId] === false ||
|
|
650
650
|
!layout.TableColumns.includes(colId) ||
|
|
651
|
-
colDef.
|
|
652
|
-
colDef.
|
|
651
|
+
colDef.type === 'hiddenColumn' ||
|
|
652
|
+
(Array.isArray(colDef.type) && colDef.type.includes('hiddenColumn')));
|
|
653
653
|
})
|
|
654
654
|
.map((colDef) => colDef.colId ?? colDef.field),
|
|
655
655
|
};
|
|
@@ -2669,6 +2669,25 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2669
2669
|
name: string;
|
|
2670
2670
|
kind: string;
|
|
2671
2671
|
desc: string;
|
|
2672
|
+
props: ({
|
|
2673
|
+
name: string;
|
|
2674
|
+
kind: string;
|
|
2675
|
+
desc: string;
|
|
2676
|
+
isOpt: boolean;
|
|
2677
|
+
ref: string;
|
|
2678
|
+
} | {
|
|
2679
|
+
name: string;
|
|
2680
|
+
kind: string;
|
|
2681
|
+
desc: string;
|
|
2682
|
+
isOpt?: undefined;
|
|
2683
|
+
ref?: undefined;
|
|
2684
|
+
} | {
|
|
2685
|
+
name: string;
|
|
2686
|
+
kind: string;
|
|
2687
|
+
desc: string;
|
|
2688
|
+
isOpt: boolean;
|
|
2689
|
+
ref?: undefined;
|
|
2690
|
+
})[];
|
|
2672
2691
|
};
|
|
2673
2692
|
DashboardButtonContext: {
|
|
2674
2693
|
name: string;
|
|
@@ -3637,12 +3656,21 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3637
3656
|
desc: string;
|
|
3638
3657
|
isOpt: boolean;
|
|
3639
3658
|
ref: string;
|
|
3659
|
+
defVal?: undefined;
|
|
3640
3660
|
} | {
|
|
3641
3661
|
name: string;
|
|
3642
3662
|
kind: string;
|
|
3643
3663
|
desc: string;
|
|
3644
3664
|
ref: string;
|
|
3645
3665
|
isOpt?: undefined;
|
|
3666
|
+
defVal?: undefined;
|
|
3667
|
+
} | {
|
|
3668
|
+
name: string;
|
|
3669
|
+
kind: string;
|
|
3670
|
+
desc: string;
|
|
3671
|
+
isOpt: boolean;
|
|
3672
|
+
defVal: string;
|
|
3673
|
+
ref?: undefined;
|
|
3646
3674
|
})[];
|
|
3647
3675
|
};
|
|
3648
3676
|
FormatColumnOptions: {
|
|
@@ -3677,6 +3705,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3677
3705
|
isOpt: boolean;
|
|
3678
3706
|
}[];
|
|
3679
3707
|
};
|
|
3708
|
+
FormatColumnTarget: {
|
|
3709
|
+
name: string;
|
|
3710
|
+
kind: string;
|
|
3711
|
+
desc: string;
|
|
3712
|
+
};
|
|
3680
3713
|
FormContext: {
|
|
3681
3714
|
name: string;
|
|
3682
3715
|
kind: string;
|
|
@@ -6003,4 +6036,14 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
6003
6036
|
desc: string;
|
|
6004
6037
|
}[];
|
|
6005
6038
|
};
|
|
6039
|
+
WindowPosition: {
|
|
6040
|
+
name: string;
|
|
6041
|
+
kind: string;
|
|
6042
|
+
desc: string;
|
|
6043
|
+
};
|
|
6044
|
+
WindowSize: {
|
|
6045
|
+
name: string;
|
|
6046
|
+
kind: string;
|
|
6047
|
+
desc: string;
|
|
6048
|
+
};
|
|
6006
6049
|
};
|