@adaptabletools/adaptable 23.0.0-canary.1 → 23.0.0-canary.2
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/index.css +62 -64
- package/package.json +1 -1
- package/src/AdaptableState/LayoutState.d.ts +5 -4
- package/src/AdaptableState/StyledColumnState.d.ts +7 -16
- package/src/AdaptableState/StyledColumnState.js +9 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +6 -2
- package/src/View/renderWithAdaptableContext.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +2 -2
- package/src/components/Combobox/index.js +1 -1
- package/src/components/Datepicker/index.js +4 -4
- package/src/components/NewDropdownButton/index.js +1 -1
- package/src/components/NewSelect/index.js +2 -2
- package/src/components/NewTooltip/index.js +1 -1
- package/src/components/ui/button.js +1 -1
- package/src/components/ui/calendar.d.ts +1 -1
- package/src/components/ui/calendar.js +2 -2
- package/src/components/ui/combobox.js +3 -3
- package/src/components/ui/dropdown-menu.js +1 -1
- package/src/components/ui/input-group.d.ts +1 -1
- package/src/components/ui/input-group.js +4 -4
- package/src/components/ui/input.js +1 -1
- package/src/components/ui/popover.js +1 -1
- package/src/components/ui/select.js +1 -1
- package/src/components/ui/textarea.js +1 -1
- package/src/components/ui/tooltip.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +2 -2
- package/src/layout-manager/src/index.js +5 -4
- package/src/layout-manager/src/normalizeLayoutModel.js +5 -1
- package/src/layout-manager/src/rowGroupDisplayType.d.ts +6 -0
- package/src/layout-manager/src/rowGroupDisplayType.js +24 -0
- package/src/metamodel/adaptable.metamodel.d.ts +0 -24
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/index.css
CHANGED
|
@@ -6975,93 +6975,43 @@
|
|
|
6975
6975
|
.ab-Datepicker-Overlay .rdp-focusable {
|
|
6976
6976
|
cursor: pointer;
|
|
6977
6977
|
}
|
|
6978
|
-
.ab-Datepicker-Overlay {
|
|
6979
|
-
@keyframes rdp-slide_in_left {
|
|
6980
|
-
0% {
|
|
6981
|
-
transform: translateX(-100%);
|
|
6982
|
-
}
|
|
6983
|
-
100% {
|
|
6984
|
-
transform: translateX(0);
|
|
6985
|
-
}
|
|
6986
|
-
}
|
|
6987
|
-
@keyframes rdp-slide_in_right {
|
|
6988
|
-
0% {
|
|
6989
|
-
transform: translateX(100%);
|
|
6990
|
-
}
|
|
6991
|
-
100% {
|
|
6992
|
-
transform: translateX(0);
|
|
6993
|
-
}
|
|
6994
|
-
}
|
|
6995
|
-
@keyframes rdp-slide_out_left {
|
|
6996
|
-
0% {
|
|
6997
|
-
transform: translateX(0);
|
|
6998
|
-
}
|
|
6999
|
-
100% {
|
|
7000
|
-
transform: translateX(-100%);
|
|
7001
|
-
}
|
|
7002
|
-
}
|
|
7003
|
-
@keyframes rdp-slide_out_right {
|
|
7004
|
-
0% {
|
|
7005
|
-
transform: translateX(0);
|
|
7006
|
-
}
|
|
7007
|
-
100% {
|
|
7008
|
-
transform: translateX(100%);
|
|
7009
|
-
}
|
|
7010
|
-
}
|
|
7011
|
-
}
|
|
6978
|
+
.ab-Datepicker-Overlay {}
|
|
7012
6979
|
.ab-Datepicker-Overlay .rdp-weeks_before_enter {
|
|
7013
|
-
animation: rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6980
|
+
animation: ab-rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7014
6981
|
}
|
|
7015
6982
|
.ab-Datepicker-Overlay .rdp-weeks_before_exit {
|
|
7016
|
-
animation: rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6983
|
+
animation: ab-rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7017
6984
|
}
|
|
7018
6985
|
.ab-Datepicker-Overlay .rdp-weeks_after_enter {
|
|
7019
|
-
animation: rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6986
|
+
animation: ab-rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7020
6987
|
}
|
|
7021
6988
|
.ab-Datepicker-Overlay .rdp-weeks_after_exit {
|
|
7022
|
-
animation: rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6989
|
+
animation: ab-rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7023
6990
|
}
|
|
7024
6991
|
.ab-Datepicker-Overlay .rdp-root[dir="rtl"] .rdp-weeks_after_enter {
|
|
7025
|
-
animation: rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6992
|
+
animation: ab-rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7026
6993
|
}
|
|
7027
6994
|
.ab-Datepicker-Overlay .rdp-root[dir="rtl"] .rdp-weeks_before_exit {
|
|
7028
|
-
animation: rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6995
|
+
animation: ab-rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7029
6996
|
}
|
|
7030
6997
|
.ab-Datepicker-Overlay .rdp-root[dir="rtl"] .rdp-weeks_before_enter {
|
|
7031
|
-
animation: rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
6998
|
+
animation: ab-rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7032
6999
|
}
|
|
7033
7000
|
.ab-Datepicker-Overlay .rdp-root[dir="rtl"] .rdp-weeks_after_exit {
|
|
7034
|
-
animation: rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7035
|
-
}
|
|
7036
|
-
.ab-Datepicker-Overlay {
|
|
7037
|
-
@keyframes rdp-fade_in {
|
|
7038
|
-
from {
|
|
7039
|
-
opacity: 0;
|
|
7040
|
-
}
|
|
7041
|
-
to {
|
|
7042
|
-
opacity: 1;
|
|
7043
|
-
}
|
|
7044
|
-
}
|
|
7045
|
-
@keyframes rdp-fade_out {
|
|
7046
|
-
from {
|
|
7047
|
-
opacity: 1;
|
|
7048
|
-
}
|
|
7049
|
-
to {
|
|
7050
|
-
opacity: 0;
|
|
7051
|
-
}
|
|
7052
|
-
}
|
|
7001
|
+
animation: ab-rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7053
7002
|
}
|
|
7003
|
+
.ab-Datepicker-Overlay {}
|
|
7054
7004
|
.ab-Datepicker-Overlay .rdp-caption_after_enter {
|
|
7055
|
-
animation: rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7005
|
+
animation: ab-rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7056
7006
|
}
|
|
7057
7007
|
.ab-Datepicker-Overlay .rdp-caption_after_exit {
|
|
7058
|
-
animation: rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7008
|
+
animation: ab-rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7059
7009
|
}
|
|
7060
7010
|
.ab-Datepicker-Overlay .rdp-caption_before_enter {
|
|
7061
|
-
animation: rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7011
|
+
animation: ab-rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7062
7012
|
}
|
|
7063
7013
|
.ab-Datepicker-Overlay .rdp-caption_before_exit {
|
|
7064
|
-
animation: rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7014
|
+
animation: ab-rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
|
|
7065
7015
|
}
|
|
7066
7016
|
.ab-Datepicker-Overlay {
|
|
7067
7017
|
border: var(--ab-cmp-datepicker__border);
|
|
@@ -8701,3 +8651,51 @@
|
|
|
8701
8651
|
}
|
|
8702
8652
|
}
|
|
8703
8653
|
}
|
|
8654
|
+
@keyframes ab-rdp-slide_in_left {
|
|
8655
|
+
0% {
|
|
8656
|
+
transform: translateX(-100%);
|
|
8657
|
+
}
|
|
8658
|
+
100% {
|
|
8659
|
+
transform: translateX(0);
|
|
8660
|
+
}
|
|
8661
|
+
}
|
|
8662
|
+
@keyframes ab-rdp-slide_in_right {
|
|
8663
|
+
0% {
|
|
8664
|
+
transform: translateX(100%);
|
|
8665
|
+
}
|
|
8666
|
+
100% {
|
|
8667
|
+
transform: translateX(0);
|
|
8668
|
+
}
|
|
8669
|
+
}
|
|
8670
|
+
@keyframes ab-rdp-slide_out_left {
|
|
8671
|
+
0% {
|
|
8672
|
+
transform: translateX(0);
|
|
8673
|
+
}
|
|
8674
|
+
100% {
|
|
8675
|
+
transform: translateX(-100%);
|
|
8676
|
+
}
|
|
8677
|
+
}
|
|
8678
|
+
@keyframes ab-rdp-slide_out_right {
|
|
8679
|
+
0% {
|
|
8680
|
+
transform: translateX(0);
|
|
8681
|
+
}
|
|
8682
|
+
100% {
|
|
8683
|
+
transform: translateX(100%);
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8686
|
+
@keyframes ab-rdp-fade_in {
|
|
8687
|
+
from {
|
|
8688
|
+
opacity: 0;
|
|
8689
|
+
}
|
|
8690
|
+
to {
|
|
8691
|
+
opacity: 1;
|
|
8692
|
+
}
|
|
8693
|
+
}
|
|
8694
|
+
@keyframes ab-rdp-fade_out {
|
|
8695
|
+
from {
|
|
8696
|
+
opacity: 1;
|
|
8697
|
+
}
|
|
8698
|
+
to {
|
|
8699
|
+
opacity: 0;
|
|
8700
|
+
}
|
|
8701
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "23.0.0-canary.
|
|
3
|
+
"version": "23.0.0-canary.2",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -44,6 +44,10 @@ export interface LayoutState extends BaseState {
|
|
|
44
44
|
/**
|
|
45
45
|
* Base object for both Table and Pivot Layouts
|
|
46
46
|
*/
|
|
47
|
+
/**
|
|
48
|
+
* How row groups are displayed in a Layout (maps to AG Grid `groupDisplayType`).
|
|
49
|
+
*/
|
|
50
|
+
export type RowGroupDisplayType = 'single' | 'multi' | 'groupRows';
|
|
47
51
|
export interface LayoutBase extends AdaptableObject {
|
|
48
52
|
/**
|
|
49
53
|
* Name of the Layout as it appears in the Layout toolbar and tool panel
|
|
@@ -101,10 +105,7 @@ export interface LayoutBase extends AdaptableObject {
|
|
|
101
105
|
* Position of the Grand Total Row in the Layout
|
|
102
106
|
*/
|
|
103
107
|
GrandTotalRow?: 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom' | boolean;
|
|
104
|
-
|
|
105
|
-
* Display Row Grouped Columns as 'single' or 'multi' column
|
|
106
|
-
*/
|
|
107
|
-
RowGroupDisplayType?: 'single' | 'multi';
|
|
108
|
+
RowGroupDisplayType?: RowGroupDisplayType;
|
|
108
109
|
}
|
|
109
110
|
/**
|
|
110
111
|
* Defines a Table-based Layout
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseState } from './BaseState';
|
|
2
2
|
import { AdaptablePredicate, AdaptableBooleanQuery, AdaptableIcon } from '../types';
|
|
3
|
-
import { CellBoxStyle, CellFontStyle } from './Common/AdaptableStyle';
|
|
3
|
+
import { AdaptableStyle, CellBoxStyle, CellFontStyle } from './Common/AdaptableStyle';
|
|
4
4
|
import { TypeHint } from './Common/Types';
|
|
5
5
|
import { RowScope } from './Common/RowScope';
|
|
6
6
|
import { AgSparklineOptions } from 'ag-charts-types';
|
|
@@ -367,23 +367,14 @@ export type SystemBadgeStylePredicateIds = SystemBadgeStylePredicateId[];
|
|
|
367
367
|
export interface BadgeStylePredicate extends AdaptablePredicate {
|
|
368
368
|
PredicateId: TypeHint<string, SystemBadgeStylePredicateId>;
|
|
369
369
|
}
|
|
370
|
+
/** Keys copied from legacy `BadgeStyleDefinition.Style` (`AdaptableStyle`) into `PillStyle`. */
|
|
371
|
+
export declare const BADGE_PILL_STYLE_KEYS: readonly ["BackColor", "ForeColor", "BorderColor", "FontWeight", "FontStyle", "TextDecoration"];
|
|
370
372
|
/**
|
|
371
|
-
* Visual styling applied to a single Badge
|
|
373
|
+
* Visual styling applied to a single Badge pill — an explicit subset of
|
|
374
|
+
* {@link AdaptableStyle}. Not used: `BorderRadius` ({@link BadgeShape}),
|
|
375
|
+
* `Alignment` / `FontSize` / `ClassName` (column-level or unsupported).
|
|
372
376
|
*/
|
|
373
|
-
export
|
|
374
|
-
/** Pill background colour. */
|
|
375
|
-
BackColor?: string;
|
|
376
|
-
/** Pill text/icon colour. */
|
|
377
|
-
ForeColor?: string;
|
|
378
|
-
/** Pill border colour (a subtle 1px border is drawn when set). */
|
|
379
|
-
BorderColor?: string;
|
|
380
|
-
/** Whether the pill text is bold. */
|
|
381
|
-
FontWeight?: 'Normal' | 'Bold';
|
|
382
|
-
/** Whether the pill text is italic. */
|
|
383
|
-
FontStyle?: 'Normal' | 'Italic';
|
|
384
|
-
/** Optional decoration (underline / line-through / overline). */
|
|
385
|
-
TextDecoration?: 'None' | 'Underline' | 'Overline' | 'LineThrough';
|
|
386
|
-
}
|
|
377
|
+
export type BadgePillStyle = Pick<AdaptableStyle, (typeof BADGE_PILL_STYLE_KEYS)[number]>;
|
|
387
378
|
/**
|
|
388
379
|
* Visual shape of a Badge; convenience shorthand that resolves to a border radius without having to pick a pixel value
|
|
389
380
|
*/
|
|
@@ -189,7 +189,7 @@ export const ColumnsSection = (props) => {
|
|
|
189
189
|
if (layout.RowGroupDisplayType === 'single') {
|
|
190
190
|
allColumns.unshift(generateAutoRowGroupSingleColumn());
|
|
191
191
|
}
|
|
192
|
-
else {
|
|
192
|
+
else if (layout.RowGroupDisplayType === 'multi') {
|
|
193
193
|
[...layout.RowGroupedColumns].reverse().forEach((col) => {
|
|
194
194
|
const groupCol = generateAutoRowGroupColumnForColumn(adaptable.api.columnApi.getColumnWithColumnId(col));
|
|
195
195
|
allColumns.unshift(groupCol);
|
|
@@ -73,9 +73,13 @@ export const RowGroupingSection = (props) => {
|
|
|
73
73
|
if (RowGroupDisplayType === 'single') {
|
|
74
74
|
newLayout.TableColumns = (newLayout.TableColumns || []).filter((colId) => !adaptable.api.columnApi.isAutoRowGroupColumnForMulti(colId));
|
|
75
75
|
}
|
|
76
|
-
else {
|
|
76
|
+
else if (RowGroupDisplayType === 'multi') {
|
|
77
77
|
newLayout.TableColumns = (newLayout.TableColumns || []).filter((colId) => !adaptable.api.columnApi.isAutoRowGroupColumnForSingle(colId));
|
|
78
78
|
}
|
|
79
|
+
else {
|
|
80
|
+
newLayout.TableColumns = (newLayout.TableColumns || []).filter((colId) => !adaptable.api.columnApi.isAutoRowGroupColumnForSingle(colId) &&
|
|
81
|
+
!adaptable.api.columnApi.isAutoRowGroupColumnForMulti(colId));
|
|
82
|
+
}
|
|
79
83
|
onChange(newLayout);
|
|
80
|
-
}, children: [_jsx(TypeRadio, { value: "single", text: "Single Column", description: "All Row Grouped Columns display in one hierarchical Column" }), _jsx(TypeRadio, { value: "multi", text: "Multiple Columns", description: "Each Row Grouped Column displays in its own, separate, Column" })] }) }) })] }), _jsxs(Tabs, { className: "twa:mt-2", children: [_jsx(Tabs.Tab, { children: "Row Grouped Columns" }), _jsx(Tabs.Tab, { children: rowGroupsText }), _jsx(Tabs.Content, { children: _jsx(ValueSelector, { showFilterInput: true, filter: columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, toListLabel: (option) => (_jsxs(Flex, { alignItems: "center", children: [option.friendlyName ?? option.columnId, _jsx(ColumnGroupTag, { column: option })] })), options: sortedGroupableColumns, value: layout.RowGroupedColumns ?? [], allowReorder: true, onChange: handleColumnsChange }) }), _jsx(Tabs.Content, { children: _jsx(RowGroupBehaviorSection, { layout: layout, onChange: onChange }) })] })] }));
|
|
84
|
+
}, children: [_jsx(TypeRadio, { value: "single", text: "Single Column", description: "All Row Grouped Columns display in one hierarchical Column" }), _jsx(TypeRadio, { value: "multi", text: "Multiple Columns", description: "Each Row Grouped Column displays in its own, separate, Column" }), _jsx(TypeRadio, { value: "groupRows", text: "Full Width Group Rows", description: "Row groups display as full-width rows (no group column and no aggregations)" })] }) }) })] }), _jsxs(Tabs, { className: "twa:mt-2", children: [_jsx(Tabs.Tab, { children: "Row Grouped Columns" }), _jsx(Tabs.Tab, { children: rowGroupsText }), _jsx(Tabs.Content, { children: _jsx(ValueSelector, { showFilterInput: true, filter: columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, toListLabel: (option) => (_jsxs(Flex, { alignItems: "center", children: [option.friendlyName ?? option.columnId, _jsx(ColumnGroupTag, { column: option })] })), options: sortedGroupableColumns, value: layout.RowGroupedColumns ?? [], allowReorder: true, onChange: handleColumnsChange }) }), _jsx(Tabs.Content, { children: _jsx(RowGroupBehaviorSection, { layout: layout, onChange: onChange }) })] })] }));
|
|
81
85
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Provider } from 'react-redux';
|
|
3
3
|
import AdaptableContext from './AdaptableContext';
|
|
4
4
|
import { WithAdaptableComputedCSSVars } from './AdaptableComputedCSSVarsContext';
|
|
5
|
-
import { TooltipProvider } from
|
|
5
|
+
import { TooltipProvider } from '../components/ui/tooltip';
|
|
6
6
|
export const renderWithAdaptableContext = (children, adaptable) => {
|
|
7
7
|
return (_jsx(TooltipProvider, { delay: 300, children: _jsx(Provider, { store: adaptable.adaptableStore.TheStore, children: _jsx(WithAdaptableComputedCSSVars, { children: _jsx(AdaptableContext.Provider, { value: adaptable, children: children }) }) }) }));
|
|
8
8
|
};
|
|
@@ -96,6 +96,7 @@ import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
|
|
|
96
96
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
97
97
|
import { checkForDuplicateColumns, getLayoutRowGroupValuesExceptionGroupKeys, isPivotLayout, layoutModelToLayoutState, layoutStateToLayoutModel, normalizeLayout, } from '../Api/Implementation/LayoutHelpers';
|
|
98
98
|
import { LayoutManager } from '../layout-manager/src';
|
|
99
|
+
import { rowGroupDisplayTypeToGridOption } from '../layout-manager/src/rowGroupDisplayType';
|
|
99
100
|
import { isPivotLayoutModel } from '../layout-manager/src/isPivotLayoutModel';
|
|
100
101
|
import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, HIDDEN_COLUMN_TYPE, hiddenColDefConfig, PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE, PIVOT_ANY_TOTAL_COLUMN_TYPE, PIVOT_COLUMN_TOTAL_COLUMN_TYPE, PIVOT_GRAND_TOTAL_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
|
|
101
102
|
import { agGridDataTypeDefinitions } from './agGridDataTypeDefinitions';
|
|
@@ -461,8 +462,7 @@ export class AdaptableAgGrid {
|
|
|
461
462
|
if (isPivotLayoutModel(layoutModel)) {
|
|
462
463
|
gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
|
|
463
464
|
}
|
|
464
|
-
gridOptions.groupDisplayType =
|
|
465
|
-
layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
|
|
465
|
+
gridOptions.groupDisplayType = rowGroupDisplayTypeToGridOption(layoutModel.RowGroupDisplayType);
|
|
466
466
|
// fixes issue #3053
|
|
467
467
|
gridOptions.suppressAggFuncInHeader = !!layoutModel.SuppressAggFuncInHeader;
|
|
468
468
|
if (!isPivotLayoutModel(layoutModel) &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxPrimitive, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor, RESIZABLE_VIRTUALIZED_LIST_CLASS, } from
|
|
3
|
+
import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxPrimitive, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor, RESIZABLE_VIRTUALIZED_LIST_CLASS, } from '../ui/combobox';
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
5
5
|
import { ChevronDownIcon, Loader2Icon, PlusIcon } from 'lucide-react';
|
|
6
6
|
import { useMemo } from 'react';
|
|
@@ -9,10 +9,10 @@ import { useDatepickerContext } from './DatepickerContext';
|
|
|
9
9
|
import { AdaptableDateInlineInput } from '../../View/Components/AdaptableInput/AdaptableDateInlineInput';
|
|
10
10
|
import { isValid, addYears, endOfYear, startOfYear, addDays, addBusinessDays, } from 'date-fns';
|
|
11
11
|
import { Flex } from '../Flex';
|
|
12
|
-
import { cn } from
|
|
13
|
-
import { Popover, PopoverContent, PopoverTrigger } from
|
|
14
|
-
import { Calendar } from
|
|
15
|
-
import { InputGroup, InputGroupAddon } from
|
|
12
|
+
import { cn } from '../../lib/utils';
|
|
13
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
|
14
|
+
import { Calendar } from '../ui/calendar';
|
|
15
|
+
import { InputGroup, InputGroupAddon } from '../ui/input-group';
|
|
16
16
|
import { SingleSelect } from '../NewSelect';
|
|
17
17
|
import { targetOwn } from '../twUtils';
|
|
18
18
|
// ── Caption dropdown components (month/year) ──────────────────────────
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from
|
|
3
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from '../ui/dropdown-menu';
|
|
4
4
|
import { NewTooltip } from '../NewTooltip';
|
|
5
5
|
import { cn } from '../../lib/utils';
|
|
6
6
|
import { ChevronDownIcon } from 'lucide-react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from
|
|
3
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from
|
|
2
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from '../ui/select';
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip';
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
const getItemTitle = (label, value) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip, TooltipTrigger, TooltipContent } from
|
|
2
|
+
import { Tooltip, TooltipTrigger, TooltipContent } from '../ui/tooltip';
|
|
3
3
|
export function NewTooltip({ label, children, side, align }) {
|
|
4
4
|
if (!label) {
|
|
5
5
|
return _jsx(_Fragment, { children: children });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { cn } from
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
5
|
const buttonVariants = cva('twa:group/button twa:inline-flex twa:shrink-0 twa:items-center twa:justify-center twa:rounded-button twa:border twa:border-transparent twa:bg-clip-padding twa:text-sm twa:font-medium twa:whitespace-nowrap twa:transition-all twa:outline-none twa:select-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50 twa:active:translate-y-px twa:disabled:pointer-events-none twa:disabled:opacity-50 twa:aria-invalid:border-destructive twa:aria-invalid:ring-3 twa:aria-invalid:ring-destructive/20 twa:dark:aria-invalid:border-destructive/50 twa:dark:aria-invalid:ring-destructive/40 twa:[&_svg]:pointer-events-none twa:[&_svg]:shrink-0 twa:[&_svg:not([class*=size-])]:size-4', {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DayPicker } from 'react-day-picker';
|
|
3
|
-
import { Button } from
|
|
3
|
+
import { Button } from './button';
|
|
4
4
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
5
|
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
6
6
|
}): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { DayPicker, getDefaultClassNames, useDayPicker, } from 'react-day-picker';
|
|
4
|
-
import { cn } from
|
|
5
|
-
import { Button, buttonVariants } from
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Button, buttonVariants } from './button';
|
|
6
6
|
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from 'lucide-react';
|
|
7
7
|
const CalendarRoot = ({ className, rootRef, ...props }) => {
|
|
8
8
|
return _jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Combobox as ComboboxPrimitive } from '@base-ui/react';
|
|
4
|
-
import { cn, POPUP_Z_INDEX } from
|
|
5
|
-
import { Button } from
|
|
6
|
-
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from
|
|
4
|
+
import { cn, POPUP_Z_INDEX } from '../../lib/utils';
|
|
5
|
+
import { Button } from './button';
|
|
6
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from './input-group';
|
|
7
7
|
import { CheckIcon, ChevronDownIcon, XIcon, Loader2Icon } from 'lucide-react';
|
|
8
8
|
import { CheckBox } from '../CheckBox';
|
|
9
9
|
const useFilteredItems = ComboboxPrimitive.useFilteredItems;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
3
|
-
import { cn, POPUP_Z_INDEX } from
|
|
3
|
+
import { cn, POPUP_Z_INDEX } from '../../lib/utils';
|
|
4
4
|
import { ChevronRightIcon, CheckIcon } from 'lucide-react';
|
|
5
5
|
function DropdownMenu({ ...props }) {
|
|
6
6
|
return _jsx(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { Button } from
|
|
3
|
+
import { Button } from './button';
|
|
4
4
|
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
5
|
declare const inputGroupAddonVariants: (props?: {
|
|
6
6
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { cn } from
|
|
5
|
-
import { Button } from
|
|
6
|
-
import { Input } from
|
|
7
|
-
import { Textarea } from
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Button } from './button';
|
|
6
|
+
import { Input } from './input';
|
|
7
|
+
import { Textarea } from './textarea';
|
|
8
8
|
function InputGroup({ className, ...props }) {
|
|
9
9
|
return (_jsx("div", { "data-slot": "input-group", role: "group", className: cn('twa:group/input-group twa:relative twa:flex twa:h-input twa:w-full twa:min-w-0 twa:items-center twa:rounded-input twa:border twa:border-input twa:shadow-xs twa:transition-[color,box-shadow] twa:outline-none twa:in-data-[slot=combobox-content]:focus-within:border-inherit twa:in-data-[slot=combobox-content]:focus-within:ring-0 twa:has-[[data-slot=input-group-control]:focus-visible]:border-ring twa:has-[[data-slot=input-group-control]:focus-visible]:ring-3 twa:has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 twa:has-[[data-slot][aria-invalid=true]]:border-destructive twa:has-[[data-slot][aria-invalid=true]]:ring-3 twa:has-[[data-slot][aria-invalid=true]]:ring-destructive/20 twa:has-[>[data-align=block-end]]:h-auto twa:has-[>[data-align=block-end]]:flex-col twa:has-[>[data-align=block-start]]:h-auto twa:has-[>[data-align=block-start]]:flex-col twa:has-[>textarea]:h-auto twa:dark:bg-input/30 twa:dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 twa:has-[>[data-align=block-end]]:[&>input]:pt-3 twa:has-[>[data-align=block-start]]:[&>input]:pb-3 twa:has-[>[data-align=inline-end]]:[&>input]:pr-1.5 twa:has-[>[data-align=inline-start]]:[&>input]:pl-1.5', className), ...props }));
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
3
|
-
import { cn } from
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
4
|
function Input({ className, type, ...props }) {
|
|
5
5
|
return (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: cn("twa:h-9 twa:w-full twa:min-w-0 twa:rounded-md twa:border twa:border-input twa:bg-transparent twa:px-2.5 twa:py-1 twa:text-base twa:shadow-xs twa:transition-[color,box-shadow] twa:outline-none twa:file:inline-flex twa:file:h-7 twa:file:border-0 twa:file:bg-transparent twa:file:text-sm twa:file:font-medium twa:file:text-foreground twa:placeholder:text-muted-foreground twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50 twa:disabled:pointer-events-none twa:disabled:cursor-not-allowed twa:disabled:opacity-50 twa:aria-invalid:border-destructive twa:aria-invalid:ring-3 twa:aria-invalid:ring-destructive/20 twa:md:text-sm twa:dark:bg-input/30 twa:dark:aria-invalid:border-destructive/50 twa:dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
|
-
import { cn, POPUP_Z_INDEX } from
|
|
3
|
+
import { cn, POPUP_Z_INDEX } from '../../lib/utils';
|
|
4
4
|
function Popover({ ...props }) {
|
|
5
5
|
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
3
|
-
import { cn, POPUP_Z_INDEX } from
|
|
3
|
+
import { cn, POPUP_Z_INDEX } from '../../lib/utils';
|
|
4
4
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
|
|
5
5
|
const Select = SelectPrimitive.Root;
|
|
6
6
|
function SelectGroup({ className, ...props }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
3
|
function Textarea({ className, ...props }) {
|
|
4
4
|
return (_jsx("textarea", { "data-slot": "textarea", className: cn("twa:flex twa:field-sizing-content twa:min-h-16 twa:w-full twa:rounded-md twa:border twa:border-input twa:bg-transparent twa:px-2.5 twa:py-2 twa:text-base twa:shadow-xs twa:transition-[color,box-shadow] twa:outline-none twa:placeholder:text-muted-foreground twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50 twa:disabled:cursor-not-allowed twa:disabled:opacity-50 twa:aria-invalid:border-destructive twa:aria-invalid:ring-3 twa:aria-invalid:ring-destructive/20 twa:md:text-sm twa:dark:bg-input/30 twa:dark:aria-invalid:border-destructive/50 twa:dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
3
|
-
import { cn, POPUP_Z_INDEX } from
|
|
3
|
+
import { cn, POPUP_Z_INDEX } from '../../lib/utils';
|
|
4
4
|
function TooltipProvider({ delay = 0, ...props }) {
|
|
5
5
|
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delay: delay, ...props }));
|
|
6
6
|
}
|
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: "23.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1780405578983 || Date.now(),
|
|
4
|
+
VERSION: "23.0.0-canary.2" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnSizingMap, LayoutRowSelection } from '../../AdaptableState/LayoutState';
|
|
1
|
+
import { ColumnSizingMap, LayoutRowSelection, RowGroupDisplayType } from '../../AdaptableState/LayoutState';
|
|
2
2
|
import { XOR } from '../../Utilities/Extensions/TypeExtensions';
|
|
3
3
|
/**
|
|
4
4
|
* Defines how a Column is sorted
|
|
@@ -17,7 +17,7 @@ export interface BaseLayoutModel {
|
|
|
17
17
|
/**
|
|
18
18
|
* @defaultValue 'single'
|
|
19
19
|
*/
|
|
20
|
-
RowGroupDisplayType?:
|
|
20
|
+
RowGroupDisplayType?: RowGroupDisplayType;
|
|
21
21
|
/**
|
|
22
22
|
* Those are not actually used by the LayoutManager,
|
|
23
23
|
* but we need to keep them here so we can give the layout
|
|
@@ -2,6 +2,7 @@ import { debounce, DeepMap } from '@infinite-table/infinite-react';
|
|
|
2
2
|
import { isPivotLayoutModel } from './isPivotLayoutModel';
|
|
3
3
|
import { LMEmitter } from './LMEmitter';
|
|
4
4
|
import { AUTO_GROUP_COLUMN_ID__MULTI_PREFIX, AUTO_GROUP_COLUMN_ID__SINGLE, normalizeLayoutModel, normalizePivotLayoutModel, normalizeTableLayoutModel, } from './normalizeLayoutModel';
|
|
5
|
+
import { gridOptionToRowGroupDisplayType, rowGroupDisplayTypeToGridOption, } from './rowGroupDisplayType';
|
|
5
6
|
import { getChanges, isLayoutEqual } from './isLayoutEqual';
|
|
6
7
|
import { simplifyLayoutModel, simplifyPivotLayoutModel, simplifyTableLayoutModel, } from './simplifyLayoutModel';
|
|
7
8
|
import { sortColumnIdsByOrder } from './sortColumnIdsByOrder';
|
|
@@ -552,7 +553,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
552
553
|
if (groupDisplayType === 'singleColumn') {
|
|
553
554
|
colsInLayout.add(AUTO_GROUP_COLUMN_ID__SINGLE);
|
|
554
555
|
}
|
|
555
|
-
else {
|
|
556
|
+
else if (groupDisplayType === 'multipleColumns') {
|
|
556
557
|
this.currentLayout.RowGroupedColumns.forEach((colId) => {
|
|
557
558
|
colsInLayout.add(`${AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`);
|
|
558
559
|
});
|
|
@@ -760,7 +761,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
760
761
|
ColumnGroupValues,
|
|
761
762
|
GrandTotalRow: this.gridApi.getGridOption('grandTotalRow'),
|
|
762
763
|
SuppressAggFuncInHeader: this.gridApi.getGridOption('suppressAggFuncInHeader'),
|
|
763
|
-
RowGroupDisplayType: this.gridApi.getGridOption('groupDisplayType')
|
|
764
|
+
RowGroupDisplayType: gridOptionToRowGroupDisplayType(this.gridApi.getGridOption('groupDisplayType')),
|
|
764
765
|
RowSelection: this.getRowSelectionFromGrid(),
|
|
765
766
|
});
|
|
766
767
|
return layout;
|
|
@@ -1314,7 +1315,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
1314
1315
|
// this.gridApi.applyColumnState(state);
|
|
1315
1316
|
const hasGroupedColumns = layout.RowGroupedColumns && layout.RowGroupedColumns.length;
|
|
1316
1317
|
if (hasGroupedColumns) {
|
|
1317
|
-
const displayTypeFromLayout = layout.RowGroupDisplayType
|
|
1318
|
+
const displayTypeFromLayout = rowGroupDisplayTypeToGridOption(layout.RowGroupDisplayType);
|
|
1318
1319
|
const groupDisplayType = this.gridApi.getGridOption('groupDisplayType');
|
|
1319
1320
|
if (groupDisplayType !== displayTypeFromLayout) {
|
|
1320
1321
|
this.gridApi.setGridOption('groupDisplayType', displayTypeFromLayout);
|
|
@@ -1677,7 +1678,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
1677
1678
|
this.applyPivotTotals(layout);
|
|
1678
1679
|
const hasGroupedColumns = layout.PivotGroupedColumns && !!layout.PivotGroupedColumns.length;
|
|
1679
1680
|
if (hasGroupedColumns) {
|
|
1680
|
-
const displayTypeFromLayout = layout.RowGroupDisplayType
|
|
1681
|
+
const displayTypeFromLayout = rowGroupDisplayTypeToGridOption(layout.RowGroupDisplayType);
|
|
1681
1682
|
const groupDisplayType = this.gridApi.getGridOption('groupDisplayType');
|
|
1682
1683
|
if (groupDisplayType !== displayTypeFromLayout) {
|
|
1683
1684
|
this.gridApi.setGridOption('groupDisplayType', displayTypeFromLayout);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isPivotLayoutModel } from './isPivotLayoutModel';
|
|
2
|
+
import { isRowGroupAutoColumnId } from './rowGroupDisplayType';
|
|
2
3
|
export const AUTO_GROUP_COLUMN_ID__SINGLE = 'ag-Grid-AutoColumn';
|
|
3
4
|
export const AUTO_GROUP_COLUMN_ID__MULTI_PREFIX = 'ag-Grid-AutoColumn-';
|
|
4
5
|
export function normalizeTableLayoutModel(layout, options) {
|
|
@@ -60,7 +61,10 @@ export function normalizeTableLayoutModel(layout, options) {
|
|
|
60
61
|
displayType = displayType || 'single';
|
|
61
62
|
layout.RowGroupDisplayType = displayType;
|
|
62
63
|
}
|
|
63
|
-
if (displayType === '
|
|
64
|
+
if (displayType === 'groupRows') {
|
|
65
|
+
layout.TableColumns = layout.TableColumns.filter((colId) => !isRowGroupAutoColumnId(colId));
|
|
66
|
+
}
|
|
67
|
+
else if (displayType === 'single') {
|
|
64
68
|
if (!ColumnOrderSet.has(AUTO_GROUP_COLUMN_ID__SINGLE)) {
|
|
65
69
|
layout.TableColumns = [AUTO_GROUP_COLUMN_ID__SINGLE, ...layout.TableColumns];
|
|
66
70
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GridOptions } from 'ag-grid-enterprise';
|
|
2
|
+
import { RowGroupDisplayType } from '../../AdaptableState/LayoutState';
|
|
3
|
+
export type { RowGroupDisplayType };
|
|
4
|
+
export declare function rowGroupDisplayTypeToGridOption(displayType: RowGroupDisplayType | undefined): GridOptions['groupDisplayType'];
|
|
5
|
+
export declare function gridOptionToRowGroupDisplayType(groupDisplayType: GridOptions['groupDisplayType'] | undefined): RowGroupDisplayType;
|
|
6
|
+
export declare function isRowGroupAutoColumnId(colId: string): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AUTO_GROUP_COLUMN_ID__MULTI_PREFIX, AUTO_GROUP_COLUMN_ID__SINGLE, } from './normalizeLayoutModel';
|
|
2
|
+
export function rowGroupDisplayTypeToGridOption(displayType) {
|
|
3
|
+
switch (displayType ?? 'single') {
|
|
4
|
+
case 'multi':
|
|
5
|
+
return 'multipleColumns';
|
|
6
|
+
case 'groupRows':
|
|
7
|
+
return 'groupRows';
|
|
8
|
+
case 'single':
|
|
9
|
+
default:
|
|
10
|
+
return 'singleColumn';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export function gridOptionToRowGroupDisplayType(groupDisplayType) {
|
|
14
|
+
if (groupDisplayType === 'multipleColumns') {
|
|
15
|
+
return 'multi';
|
|
16
|
+
}
|
|
17
|
+
if (groupDisplayType === 'groupRows') {
|
|
18
|
+
return 'groupRows';
|
|
19
|
+
}
|
|
20
|
+
return 'single';
|
|
21
|
+
}
|
|
22
|
+
export function isRowGroupAutoColumnId(colId) {
|
|
23
|
+
return colId === AUTO_GROUP_COLUMN_ID__SINGLE || colId.startsWith(AUTO_GROUP_COLUMN_ID__MULTI_PREFIX);
|
|
24
|
+
}
|