@adaptabletools/adaptable-cjs 20.2.11 → 20.3.0-canary.1
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 +4 -0
- 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 +5 -3
- package/src/AdaptableState/Common/AdaptableColumn.js +8 -1
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptableObject.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptablePredicate.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptablePredicate.js +32 -3
- 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 +17 -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 +3 -1
- package/src/Api/Internal/ColumnInternalApi.js +7 -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/LayoutRedux.d.ts +7 -3
- 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 +3 -2
- package/src/Utilities/Helpers/FormatHelper.js +3 -0
- package/src/Utilities/Services/ModuleService.js +2 -2
- 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/Layout/Wizard/sections/ColumnsSection.js +2 -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 +34 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +28 -1
- package/src/agGrid/AgGridAdapter.js +2 -6
- package/src/agGrid/AgGridColumnAdapter.d.ts +4 -1
- package/src/agGrid/AgGridColumnAdapter.js +111 -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.cjs.tsbuildinfo +1 -1
|
@@ -137,6 +137,8 @@ class AgGridColumnAdapter {
|
|
|
137
137
|
this.setupColumnCellRenderer(colSetupInfo);
|
|
138
138
|
this.setupColumnCellStyle(colSetupInfo);
|
|
139
139
|
this.setupColumnCellClass(colSetupInfo);
|
|
140
|
+
this.setupColumnHeaderStyle(colSetupInfo);
|
|
141
|
+
this.setupColumnHeaderClass(colSetupInfo);
|
|
140
142
|
this.setupColumnTooltipValueGetter(colSetupInfo);
|
|
141
143
|
this.setupColumnValueGetter(colSetupInfo);
|
|
142
144
|
this.setupColumnFilter(colSetupInfo);
|
|
@@ -162,7 +164,7 @@ class AgGridColumnAdapter {
|
|
|
162
164
|
}
|
|
163
165
|
setupColumnCellClass({ col, colId, abColumn }) {
|
|
164
166
|
this.setColDefProperty(col, 'cellClass', (userCellClass) => {
|
|
165
|
-
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
167
|
+
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, { target: 'cell' });
|
|
166
168
|
const quickSearchTextMatchStyle = this.getQuickSearchTextMatchStyle();
|
|
167
169
|
const quickSearchCurrentTextMatchStyle = this.getQuickSearchCurrentTextMatchStyle();
|
|
168
170
|
const cellClass = (params) => {
|
|
@@ -212,6 +214,54 @@ class AgGridColumnAdapter {
|
|
|
212
214
|
return cellClass;
|
|
213
215
|
});
|
|
214
216
|
}
|
|
217
|
+
setupColumnHeaderClass({ col, colId, abColumn }) {
|
|
218
|
+
this.setColDefProperty(col, 'headerClass', (userHeaderClass) => {
|
|
219
|
+
const headerClass = (params) => {
|
|
220
|
+
let baseHeaderClass = [];
|
|
221
|
+
// inherit styles from user provided colDef property
|
|
222
|
+
const userDefinedHeaderClass = typeof userHeaderClass === 'function' ? userHeaderClass(params) : userHeaderClass;
|
|
223
|
+
if (userDefinedHeaderClass) {
|
|
224
|
+
baseHeaderClass =
|
|
225
|
+
typeof userDefinedHeaderClass === 'string'
|
|
226
|
+
? [userDefinedHeaderClass]
|
|
227
|
+
: Array.isArray(userDefinedHeaderClass)
|
|
228
|
+
? userDefinedHeaderClass
|
|
229
|
+
: [userDefinedHeaderClass];
|
|
230
|
+
}
|
|
231
|
+
if (params.floatingFilter) {
|
|
232
|
+
// we NEVER style floating filters
|
|
233
|
+
return baseHeaderClass;
|
|
234
|
+
}
|
|
235
|
+
if (params.columnGroup) {
|
|
236
|
+
// we TEMPORARILY do NOT style column groups
|
|
237
|
+
// see https://github.com/AdaptableTools/adaptable/issues/2947#issuecomment-3062304655
|
|
238
|
+
return baseHeaderClass;
|
|
239
|
+
}
|
|
240
|
+
const columnId = params.column.getColId();
|
|
241
|
+
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
242
|
+
if (!adaptableColumn) {
|
|
243
|
+
return baseHeaderClass;
|
|
244
|
+
}
|
|
245
|
+
const target = 'columnHeader';
|
|
246
|
+
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
|
|
247
|
+
target,
|
|
248
|
+
});
|
|
249
|
+
if (!formatColumns.length) {
|
|
250
|
+
return baseHeaderClass;
|
|
251
|
+
}
|
|
252
|
+
const formatColumnClasses = formatColumns
|
|
253
|
+
.map((formatColumn) => {
|
|
254
|
+
if (formatColumn.Style?.ClassName &&
|
|
255
|
+
this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, abColumn)) {
|
|
256
|
+
return formatColumn.Style?.ClassName;
|
|
257
|
+
}
|
|
258
|
+
})
|
|
259
|
+
.filter((x) => !!x);
|
|
260
|
+
return [...baseHeaderClass, ...formatColumnClasses];
|
|
261
|
+
};
|
|
262
|
+
return headerClass;
|
|
263
|
+
});
|
|
264
|
+
}
|
|
215
265
|
setupColumnCellStyle({ col }) {
|
|
216
266
|
this.setColDefProperty(col, 'cellStyle', (userCellStyle) => {
|
|
217
267
|
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
@@ -268,7 +318,7 @@ class AgGridColumnAdapter {
|
|
|
268
318
|
...this.getReadOnlyCellStyle(gridCell, params),
|
|
269
319
|
...this.getEditableCellStyle(gridCell, params),
|
|
270
320
|
...this.getEditedCellStyle(gridCell, params),
|
|
271
|
-
...this.getFormatColumnAndStyledColumnCellStyle(gridCell, params),
|
|
321
|
+
...this.getFormatColumnAndStyledColumnCellStyle(gridCell.column, params),
|
|
272
322
|
...(isQuickSearchActive ? quickSearchStyle : {}),
|
|
273
323
|
...(isQuickSearchActive && textStyleToApply ? textStyleToApply : {}),
|
|
274
324
|
...this.getAlertCellStyle(gridCell, params),
|
|
@@ -280,6 +330,37 @@ class AgGridColumnAdapter {
|
|
|
280
330
|
return cellStyle;
|
|
281
331
|
});
|
|
282
332
|
}
|
|
333
|
+
setupColumnHeaderStyle({ col }) {
|
|
334
|
+
this.setColDefProperty(col, 'headerStyle', (userHeaderStyle) => {
|
|
335
|
+
const headerStyleFunc = (params) => {
|
|
336
|
+
let baseStyles = {};
|
|
337
|
+
// inherit styles from user provided colDef property
|
|
338
|
+
baseStyles =
|
|
339
|
+
typeof userHeaderStyle === 'function' ? userHeaderStyle(params) : userHeaderStyle;
|
|
340
|
+
if (params.floatingFilter) {
|
|
341
|
+
// we NEVER style floating filters
|
|
342
|
+
return baseStyles;
|
|
343
|
+
}
|
|
344
|
+
const columnId = params.column.getColId();
|
|
345
|
+
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
346
|
+
if (!adaptableColumn) {
|
|
347
|
+
return baseStyles;
|
|
348
|
+
}
|
|
349
|
+
const result = {
|
|
350
|
+
...baseStyles,
|
|
351
|
+
...this.getFormatColumnHeaderStyle(adaptableColumn, params),
|
|
352
|
+
};
|
|
353
|
+
if (result['borderColor']) {
|
|
354
|
+
// by default, header cells don't have a border
|
|
355
|
+
// if the user defines a border-color, we assume he wants to show a border
|
|
356
|
+
result['borderWidth'] = `1px`;
|
|
357
|
+
result['borderStyle'] = 'solid';
|
|
358
|
+
}
|
|
359
|
+
return (0, StyleHelper_1.normalizeStyleForAgGrid)(result);
|
|
360
|
+
};
|
|
361
|
+
return headerStyleFunc;
|
|
362
|
+
});
|
|
363
|
+
}
|
|
283
364
|
setupColumnCellEditor({ colId, col, colDef, abColumn }) {
|
|
284
365
|
const shouldShowSelectCellEditor = this.adaptableApi.userInterfaceApi.internalApi.shouldShowSelectCellEditor(abColumn);
|
|
285
366
|
const hasRichSelectCellEditor = this.adaptableInstance.agGridAdapter.isAgGridModuleRegistered('RichSelect');
|
|
@@ -848,7 +929,7 @@ class AgGridColumnAdapter {
|
|
|
848
929
|
const classNames = formatColumns
|
|
849
930
|
.map((formatColumn) => {
|
|
850
931
|
if (formatColumn.Style?.ClassName &&
|
|
851
|
-
this.adaptableApi.formatColumnApi.internalApi.
|
|
932
|
+
this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInCell(formatColumn, abColumn, params.node, params.value)) {
|
|
852
933
|
return formatColumn.Style?.ClassName;
|
|
853
934
|
}
|
|
854
935
|
})
|
|
@@ -914,13 +995,13 @@ class AgGridColumnAdapter {
|
|
|
914
995
|
}
|
|
915
996
|
/**
|
|
916
997
|
* The combination of styled column and format cells
|
|
917
|
-
* This
|
|
998
|
+
* This function decides when the two can be merged.
|
|
918
999
|
*/
|
|
919
|
-
getFormatColumnAndStyledColumnCellStyle(
|
|
920
|
-
let styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(
|
|
1000
|
+
getFormatColumnAndStyledColumnCellStyle(column, params) {
|
|
1001
|
+
let styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(column.columnId);
|
|
921
1002
|
let styledColumnStyle = {};
|
|
922
1003
|
if (styledColumn && !styledColumn?.IsSuspended) {
|
|
923
|
-
const styledCellStyle = this.getStyledColumnStyle(styledColumn,
|
|
1004
|
+
const styledCellStyle = this.getStyledColumnStyle(styledColumn, column, params);
|
|
924
1005
|
// for percentbar we want to merge
|
|
925
1006
|
if (styledColumn.PercentBarStyle || styledColumn.BadgeStyle || styledColumn.GradientStyle) {
|
|
926
1007
|
styledColumnStyle = styledCellStyle;
|
|
@@ -930,13 +1011,33 @@ class AgGridColumnAdapter {
|
|
|
930
1011
|
return styledCellStyle;
|
|
931
1012
|
}
|
|
932
1013
|
}
|
|
933
|
-
const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(
|
|
1014
|
+
const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(column, {
|
|
1015
|
+
target: 'cell',
|
|
1016
|
+
});
|
|
934
1017
|
// background color of styledColumn.GradientStyle has precedence and wins over FormatColumn
|
|
935
1018
|
return {
|
|
936
|
-
...this.getFormatColumnCellStyle(
|
|
1019
|
+
...this.getFormatColumnCellStyle(column, activeFormatColumnsWithStyle, params),
|
|
937
1020
|
...styledColumnStyle,
|
|
938
1021
|
};
|
|
939
1022
|
}
|
|
1023
|
+
getFormatColumnHeaderStyle(column, params) {
|
|
1024
|
+
if (params.columnGroup) {
|
|
1025
|
+
// FormatColumns are not supported in column groups
|
|
1026
|
+
// YET, see https://github.com/AdaptableTools/adaptable/issues/2947#issuecomment-3062304655
|
|
1027
|
+
return {};
|
|
1028
|
+
}
|
|
1029
|
+
const target = 'columnHeader';
|
|
1030
|
+
const activeFormatColumnsWithStyle = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithStyleForColumn(column, {
|
|
1031
|
+
target,
|
|
1032
|
+
});
|
|
1033
|
+
if (!activeFormatColumnsWithStyle.length) {
|
|
1034
|
+
return {};
|
|
1035
|
+
}
|
|
1036
|
+
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1037
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, column);
|
|
1038
|
+
});
|
|
1039
|
+
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1040
|
+
}
|
|
940
1041
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
941
1042
|
let style = {};
|
|
942
1043
|
const gradientStyle = styledColumn?.GradientStyle;
|
|
@@ -1003,7 +1104,7 @@ class AgGridColumnAdapter {
|
|
|
1003
1104
|
return {};
|
|
1004
1105
|
}
|
|
1005
1106
|
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1006
|
-
return this.adaptableApi.formatColumnApi.internalApi.
|
|
1107
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInCell(formatColumn, abColumn, params.node, params.value);
|
|
1007
1108
|
});
|
|
1008
1109
|
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1009
1110
|
}
|
|
@@ -50,8 +50,14 @@ const ReactActionColumnRenderer = (props) => {
|
|
|
50
50
|
}
|
|
51
51
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(props.node);
|
|
52
52
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
|
|
53
|
+
const isGrandTotalRowNode = adaptable.api.gridApi.isGrandTotalRowNode(props.node);
|
|
53
54
|
let shouldRender = true;
|
|
54
|
-
if (
|
|
55
|
+
if (isGrandTotalRowNode) {
|
|
56
|
+
if (actionColumn.rowScope?.ExcludeTotalRows) {
|
|
57
|
+
shouldRender = false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (isGroupedRow) {
|
|
55
61
|
if (actionColumn.rowScope?.ExcludeGroupRows) {
|
|
56
62
|
shouldRender = false;
|
|
57
63
|
}
|
|
@@ -113,8 +119,14 @@ class ActionColumnRenderer {
|
|
|
113
119
|
this.eGui.className = 'ab-ActionColumn';
|
|
114
120
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(params.node);
|
|
115
121
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
|
|
122
|
+
const isGrandTotalRowNode = adaptable.api.gridApi.isGrandTotalRowNode(params.node);
|
|
116
123
|
let shouldRender = true;
|
|
117
|
-
if (
|
|
124
|
+
if (isGrandTotalRowNode) {
|
|
125
|
+
if (actionColumn.rowScope?.ExcludeTotalRows) {
|
|
126
|
+
shouldRender = false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else if (isGroupedRow) {
|
|
118
130
|
if (actionColumn.rowScope?.ExcludeGroupRows) {
|
|
119
131
|
shouldRender = false;
|
|
120
132
|
}
|
|
@@ -18,8 +18,14 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
18
18
|
this.eGui.className = 'ab-Badge__wrapper';
|
|
19
19
|
const isGroupedRow = params.node.group;
|
|
20
20
|
const isSummaryRow = adaptableApi.gridApi.isSummaryNode(params.node);
|
|
21
|
+
const isGrandTotalRowNode = adaptableApi.gridApi.isGrandTotalRowNode(params.node);
|
|
21
22
|
let shouldRender = true;
|
|
22
|
-
if (
|
|
23
|
+
if (isGrandTotalRowNode) {
|
|
24
|
+
if (badgeStyle.RowScope?.ExcludeTotalRows) {
|
|
25
|
+
shouldRender = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else if (isGroupedRow) {
|
|
23
29
|
if (badgeStyle.RowScope?.ExcludeGroupRows) {
|
|
24
30
|
shouldRender = false;
|
|
25
31
|
}
|
|
@@ -55,7 +61,6 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
55
61
|
return;
|
|
56
62
|
}
|
|
57
63
|
for (const value of params.value) {
|
|
58
|
-
const formattedValue = params.formatValue?.(value) ?? value ?? '';
|
|
59
64
|
const predicateDefHandlerContext = {
|
|
60
65
|
value: value,
|
|
61
66
|
oldValue: null,
|
|
@@ -65,18 +70,20 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
65
70
|
...adaptableApi.internalApi.buildBaseContext(),
|
|
66
71
|
};
|
|
67
72
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
73
|
+
const formattedValue = badge?.IconOnly ? '' : params.formatValue?.(value) ?? value ?? '';
|
|
68
74
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
69
|
-
if (!isNullValue
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
75
|
+
if (!isNullValue) {
|
|
76
|
+
const config = { value: formattedValue };
|
|
77
|
+
if (badge) {
|
|
78
|
+
config.badge = badge;
|
|
79
|
+
}
|
|
80
|
+
badgesConfig.push(config);
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
83
|
this.renderBadges(badgesConfig, api, params);
|
|
77
84
|
}
|
|
78
85
|
renderSingularValues(params, adaptableApi) {
|
|
79
|
-
|
|
86
|
+
let formattedValue = params.formatValue?.(params.value) ?? params.value ?? '';
|
|
80
87
|
const predicateDefHandlerContext = {
|
|
81
88
|
value: params.value,
|
|
82
89
|
oldValue: null,
|
|
@@ -87,14 +94,14 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
87
94
|
};
|
|
88
95
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
89
96
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
90
|
-
if
|
|
91
|
-
|
|
92
|
-
isNullValue ||
|
|
93
|
-
// no badge
|
|
94
|
-
!badge) {
|
|
97
|
+
// Return if empty values or no badge
|
|
98
|
+
if (isNullValue || !badge) {
|
|
95
99
|
this.eGui.innerHTML = formattedValue;
|
|
96
100
|
return;
|
|
97
101
|
}
|
|
102
|
+
if (badge.IconOnly) {
|
|
103
|
+
formattedValue = '';
|
|
104
|
+
}
|
|
98
105
|
this.renderBadges([
|
|
99
106
|
{
|
|
100
107
|
badge,
|
|
@@ -105,6 +112,13 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
105
112
|
renderBadges(config, api, params) {
|
|
106
113
|
const adaptable = this.getAdaptableInstance(params);
|
|
107
114
|
const badges = config.map(({ badge, value }, index) => {
|
|
115
|
+
if (!badge) {
|
|
116
|
+
return React.createElement('span', {
|
|
117
|
+
key: index,
|
|
118
|
+
className: 'ab-Badge ab-Badge__unstyled',
|
|
119
|
+
children: value,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
108
122
|
return React.createElement(Badge_1.Badge, {
|
|
109
123
|
key: index,
|
|
110
124
|
adaptableStyle: badge.Style,
|
|
@@ -12,7 +12,7 @@ const Dialog_1 = tslib_1.__importDefault(require("../Dialog"));
|
|
|
12
12
|
const rebass_1 = require("rebass");
|
|
13
13
|
const ProgressIndicator = () => {
|
|
14
14
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
15
|
-
const { active, text, render, frameworkComponent } = (0, react_redux_1.useSelector)((state) => state.Popup.ProgressIndicator);
|
|
15
|
+
const { active, text, render, frameworkComponent, renderMode } = (0, react_redux_1.useSelector)((state) => state.Popup.ProgressIndicator);
|
|
16
16
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
17
17
|
const [progressIndicatorCoordinates, setProgressIndicatorCoordinates] = (0, react_1.useState)({
|
|
18
18
|
top: 0,
|
|
@@ -53,11 +53,25 @@ const ProgressIndicator = () => {
|
|
|
53
53
|
if (render || frameworkComponent) {
|
|
54
54
|
customEl = React.createElement(ExternalRenderer_1.ExternalRenderer, { render: render, frameworkComponent: frameworkComponent });
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// Check if we should replace the default content
|
|
57
|
+
const replaceContent = renderMode === 'dialog' && customEl;
|
|
58
|
+
return (React.createElement(
|
|
59
|
+
React.Fragment,
|
|
60
|
+
null,
|
|
61
|
+
active && (React.createElement(Dialog_1.default, { modal: true, isOpen: true, showCloseButton: false, className: `ab-ProgressIndicator ${visible ? 'ab-ProgressIndicator--visible' : ''}`, modalProps: {
|
|
62
|
+
style: progressIndicatorCoordinates,
|
|
63
|
+
} }, replaceContent ? (
|
|
64
|
+
// If renderMode is 'dialog', replace the entire content with custom element
|
|
65
|
+
customEl) : (
|
|
66
|
+
// Otherwise use the default Flex layout
|
|
67
|
+
(React.createElement(
|
|
68
|
+
rebass_1.Flex,
|
|
69
|
+
{ alignItems: "center", flexDirection: "column", p: 3, className: "ab-ProgressIndicator-body" },
|
|
58
70
|
React.createElement(Loader_1.LoaderSpinner, null),
|
|
59
71
|
React.createElement(rebass_1.Box, { mt: 3 },
|
|
60
72
|
text && React.createElement(rebass_1.Box, null, text),
|
|
61
|
-
customEl)
|
|
73
|
+
customEl)
|
|
74
|
+
)))))
|
|
75
|
+
));
|
|
62
76
|
};
|
|
63
77
|
exports.ProgressIndicator = ProgressIndicator;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "20.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1752759845400 || Date.now(),
|
|
6
|
+
VERSION: "20.3.0-canary.1" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -651,8 +651,8 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
651
651
|
const colId = colDef.colId ?? colDef.field;
|
|
652
652
|
return (layout.ColumnVisibility?.[colId] === false ||
|
|
653
653
|
!layout.TableColumns.includes(colId) ||
|
|
654
|
-
colDef.
|
|
655
|
-
colDef.
|
|
654
|
+
colDef.type === 'hiddenColumn' ||
|
|
655
|
+
(Array.isArray(colDef.type) && colDef.type.includes('hiddenColumn')));
|
|
656
656
|
})
|
|
657
657
|
.map((colDef) => colDef.colId ?? colDef.field),
|
|
658
658
|
};
|
|
@@ -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
|
};
|