@adaptabletools/adaptable 23.0.0-canary.0 → 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 +88 -67
- package/package.json +1 -1
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +3 -3
- 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/Strategy/ExportModule.js +13 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +3 -1
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +7 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +2 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -2
- package/src/View/Components/ColumnFilter/columnFilterLocation.d.ts +2 -0
- package/src/View/Components/ColumnFilter/columnFilterLocation.js +1 -0
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
- package/src/View/Export/Wizard/ExportPopupWizardRouter.js +10 -1
- package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +3 -1
- package/src/View/Export/Wizard/ScheduledReportSettings.js +8 -1
- package/src/View/Export/Wizard/ScheduledReportWizard.js +8 -3
- package/src/View/Export/Wizard/isReportScheduledSettingsValid.d.ts +1 -1
- package/src/View/Export/Wizard/isReportScheduledSettingsValid.js +3 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +7 -2
- 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/agGrid/AdaptableFrameworkComponent.d.ts +25 -3
- package/src/agGrid/AgGridFilterAdapter.js +3 -1
- 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 +12 -24
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/themes/dark.css +10 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -20,6 +20,10 @@ import { isPivotLayout } from '../../../Utilities/isPivotLayout';
|
|
|
20
20
|
import { PivotRowGroupingSection, PivotRowGroupingSectionSummary, } from './sections/PivotRowGroupingSection';
|
|
21
21
|
import { isPivotAggregationsSectionValid, PivotAggregationsSection, PivotAggregationsSectionSummary, } from './sections/PivotAggregationsSection';
|
|
22
22
|
import { Box } from '../../../components/Flex';
|
|
23
|
+
const getLayoutWizardTitle = (layout, moduleFriendlyName) => {
|
|
24
|
+
const layoutName = layout.Name?.trim();
|
|
25
|
+
return layoutName ? `${moduleFriendlyName} (${layoutName})` : moduleFriendlyName;
|
|
26
|
+
};
|
|
23
27
|
export const LayoutWizard = (props) => {
|
|
24
28
|
const dispatch = useDispatch();
|
|
25
29
|
const adaptable = useAdaptable();
|
|
@@ -73,7 +77,8 @@ export const LayoutWizard = (props) => {
|
|
|
73
77
|
props.onFinishWizard(layout);
|
|
74
78
|
};
|
|
75
79
|
const layoutSupportedFeatures = adaptable.api.layoutApi.internalApi.getLayoutSupportedFeatures();
|
|
76
|
-
|
|
80
|
+
const wizardTitle = getLayoutWizardTitle(layout, props.moduleInfo.FriendlyName);
|
|
81
|
+
return isPivotLayout(layout) ? (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, moduleName: wizardTitle, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
77
82
|
{
|
|
78
83
|
title: 'Settings',
|
|
79
84
|
details: 'Configure Pivot Layout',
|
|
@@ -151,7 +156,7 @@ export const LayoutWizard = (props) => {
|
|
|
151
156
|
render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(OnePageWizardSummary, {}) })),
|
|
152
157
|
title: 'Summary',
|
|
153
158
|
},
|
|
154
|
-
] })) : (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
159
|
+
] })) : (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, moduleName: wizardTitle, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
155
160
|
{
|
|
156
161
|
title: 'Settings',
|
|
157
162
|
details: 'Configure Table Layout',
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
2
|
+
import { ComponentType, ReactElement } from 'react';
|
|
3
3
|
import { BaseContext } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Base Component for Bespoke Components: can be Angular, React or Vue
|
|
@@ -21,12 +21,34 @@ export type AngularFrameworkComponent<T = unknown> = {
|
|
|
21
21
|
}) => Partial<T>;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* A function that returns a ReactNode (toolbars, settings panels, tool panels, etc.).
|
|
25
|
+
* For custom Column / Context menu rows, use `ReactMenuItemFrameworkComponent` instead.
|
|
26
26
|
*/
|
|
27
27
|
export type ReactFrameworkComponent = ({ adaptableApi, }: {
|
|
28
28
|
adaptableApi: AdaptableApi;
|
|
29
29
|
}) => ReactElement;
|
|
30
|
+
/** AdapTable extras passed on AG Grid `menuItemParams` for custom menu items. */
|
|
31
|
+
export interface AdaptableMenuItemParams<TMenuContext = unknown> {
|
|
32
|
+
adaptableApi: AdaptableApi;
|
|
33
|
+
menuContext: TMenuContext;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props AG Grid passes to React custom menu item components, with AdapTable
|
|
37
|
+
* `menuItemParams` (see `AgGridMenuAdapter.mapCustomMenuItemToAgGridMenuDefinition`).
|
|
38
|
+
*/
|
|
39
|
+
export interface AdaptableReactMenuItemProps<TMenuContext = unknown> {
|
|
40
|
+
name: string;
|
|
41
|
+
menuItemParams: AdaptableMenuItemParams<TMenuContext> & Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* React component for custom Column / Context menu rows (AG Grid `menuItem`).
|
|
45
|
+
* Unlike `ReactFrameworkComponent`, receives `name` and `menuItemParams`, not only `adaptableApi`.
|
|
46
|
+
*/
|
|
47
|
+
export type ReactMenuItemFrameworkComponent<TMenuContext = unknown> = ComponentType<AdaptableReactMenuItemProps<TMenuContext>>;
|
|
48
|
+
/**
|
|
49
|
+
* Framework component for a custom menu item (Column Menu or Context Menu).
|
|
50
|
+
*/
|
|
51
|
+
export type MenuItemFrameworkComponent<TMenuContext = unknown> = AngularFrameworkComponent | VueFrameworkComponent | ReactMenuItemFrameworkComponent<TMenuContext>;
|
|
30
52
|
/**
|
|
31
53
|
* Creates a Vue Component to be used in AdapTable UI controls
|
|
32
54
|
*/
|
|
@@ -38,10 +38,12 @@ export const AgGridFilterAdapterFactory = (adaptable) => {
|
|
|
38
38
|
const columnId = this.column.getColId();
|
|
39
39
|
let column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
|
|
40
40
|
if (column) {
|
|
41
|
+
const isFiltersToolPanel = typeof params?.hidePopup !== 'function';
|
|
42
|
+
const location = isFiltersToolPanel ? 'filtersToolPanel' : 'columnMenu';
|
|
41
43
|
this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(React.createElement(AdaptableColumnFilter, {
|
|
42
44
|
columnId,
|
|
43
45
|
wrapperProps: { className: 'twa:p-2' },
|
|
44
|
-
location
|
|
46
|
+
location,
|
|
45
47
|
}), adaptable), this.filterContainer);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -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
|
+
}
|
|
@@ -482,6 +482,9 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
482
482
|
r?: undefined;
|
|
483
483
|
})[];
|
|
484
484
|
};
|
|
485
|
+
AdaptableMenuItemParams: {
|
|
486
|
+
k: string;
|
|
487
|
+
};
|
|
485
488
|
AdaptableMessageType: {
|
|
486
489
|
k: string;
|
|
487
490
|
};
|
|
@@ -636,6 +639,9 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
636
639
|
AdaptableQuery: {
|
|
637
640
|
k: string;
|
|
638
641
|
};
|
|
642
|
+
AdaptableReactMenuItemProps: {
|
|
643
|
+
k: string;
|
|
644
|
+
};
|
|
639
645
|
AdaptableReadyInfo: {
|
|
640
646
|
k: string;
|
|
641
647
|
p: {
|
|
@@ -1132,11 +1138,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1132
1138
|
};
|
|
1133
1139
|
BadgePillStyle: {
|
|
1134
1140
|
k: string;
|
|
1135
|
-
p: {
|
|
1136
|
-
n: string;
|
|
1137
|
-
k: string;
|
|
1138
|
-
o: boolean;
|
|
1139
|
-
}[];
|
|
1140
1141
|
};
|
|
1141
1142
|
BadgeShape: {
|
|
1142
1143
|
k: string;
|
|
@@ -3546,25 +3547,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3546
3547
|
LayoutArray: {
|
|
3547
3548
|
k: string;
|
|
3548
3549
|
};
|
|
3549
|
-
LayoutBase: {
|
|
3550
|
-
k: string;
|
|
3551
|
-
p: ({
|
|
3552
|
-
n: string;
|
|
3553
|
-
k: string;
|
|
3554
|
-
o: boolean;
|
|
3555
|
-
r?: undefined;
|
|
3556
|
-
} | {
|
|
3557
|
-
n: string;
|
|
3558
|
-
k: string;
|
|
3559
|
-
o: boolean;
|
|
3560
|
-
r: string;
|
|
3561
|
-
} | {
|
|
3562
|
-
n: string;
|
|
3563
|
-
k: string;
|
|
3564
|
-
o?: undefined;
|
|
3565
|
-
r?: undefined;
|
|
3566
|
-
})[];
|
|
3567
|
-
};
|
|
3568
3550
|
LayoutChangedAction: {
|
|
3569
3551
|
k: string;
|
|
3570
3552
|
};
|
|
@@ -3727,6 +3709,9 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3727
3709
|
MenuCategory: {
|
|
3728
3710
|
k: string;
|
|
3729
3711
|
};
|
|
3712
|
+
MenuItemFrameworkComponent: {
|
|
3713
|
+
k: string;
|
|
3714
|
+
};
|
|
3730
3715
|
MenuSeparator: {
|
|
3731
3716
|
k: string;
|
|
3732
3717
|
};
|
|
@@ -4249,6 +4234,9 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4249
4234
|
ReactFrameworkComponent: {
|
|
4250
4235
|
k: string;
|
|
4251
4236
|
};
|
|
4237
|
+
ReactMenuItemFrameworkComponent: {
|
|
4238
|
+
k: string;
|
|
4239
|
+
};
|
|
4252
4240
|
Report: {
|
|
4253
4241
|
k: string;
|
|
4254
4242
|
p: ({
|