@adaptabletools/adaptable-cjs 23.0.0-canary.1 → 23.0.0-canary.3
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 +130 -137
- package/package.json +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -3
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +1 -1
- package/src/AdaptableState/LayoutState.d.ts +5 -4
- package/src/AdaptableState/StyledColumnState.d.ts +7 -16
- package/src/AdaptableState/StyledColumnState.js +10 -0
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/ReportScheduleRan.d.ts +4 -0
- package/src/Api/Internal/EventInternalApi.js +2 -1
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonInfo.js +4 -4
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.js +15 -5
- package/src/View/Components/ColumnFilter/FloatingFilter.js +57 -59
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +3 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +4 -4
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +6 -2
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.js +1 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +1 -1
- package/src/View/Wizard/OnePageWizards.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +2 -2
- package/src/components/Card/index.js +1 -1
- package/src/components/Combobox/index.js +10 -4
- package/src/components/Datepicker/index.js +2 -2
- package/src/components/Dialog/index.js +1 -1
- package/src/components/DragAndDropContext/TabList.js +1 -1
- package/src/components/Dropdown/Arrows.js +0 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/Input/index.js +1 -1
- package/src/components/NewDropdownButton/index.d.ts +1 -0
- package/src/components/NewDropdownButton/index.js +2 -2
- package/src/components/NewSelect/index.d.ts +2 -0
- package/src/components/NewSelect/index.js +10 -7
- package/src/components/Panel/index.js +1 -1
- package/src/components/SimpleButton/index.js +1 -1
- package/src/components/Tabs/index.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +4 -8
- package/src/components/ui/button.d.ts +5 -2
- package/src/components/ui/button.js +8 -6
- package/src/components/ui/calendar.d.ts +1 -1
- package/src/components/ui/combobox.d.ts +16 -16
- package/src/components/ui/combobox.js +48 -49
- package/src/components/ui/input-group.d.ts +10 -9
- package/src/components/ui/input-group.js +19 -16
- package/src/components/ui/input.d.ts +2 -2
- package/src/components/ui/input.js +7 -4
- package/src/components/ui/popover.d.ts +5 -5
- package/src/components/ui/popover.js +5 -5
- package/src/components/ui/select.d.ts +7 -6
- package/src/components/ui/select.js +19 -17
- package/src/components/ui/textarea.d.ts +2 -2
- package/src/components/ui/textarea.js +7 -4
- package/src/components/ui/tooltip.d.ts +6 -5
- package/src/components/ui/tooltip.js +10 -7
- 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 +29 -0
- package/src/lib/utils.d.ts +20 -0
- package/src/lib/utils.js +48 -1
- package/src/metamodel/adaptable.metamodel.d.ts +7 -26
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +2 -3
- package/src/migration/VersionUpgrade23.js +4 -16
- package/themes/dark.css +7 -17
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -5,6 +5,7 @@ exports.normalizeTableLayoutModel = normalizeTableLayoutModel;
|
|
|
5
5
|
exports.normalizePivotLayoutModel = normalizePivotLayoutModel;
|
|
6
6
|
exports.normalizeLayoutModel = normalizeLayoutModel;
|
|
7
7
|
const isPivotLayoutModel_1 = require("./isPivotLayoutModel");
|
|
8
|
+
const rowGroupDisplayType_1 = require("./rowGroupDisplayType");
|
|
8
9
|
exports.AUTO_GROUP_COLUMN_ID__SINGLE = 'ag-Grid-AutoColumn';
|
|
9
10
|
exports.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX = 'ag-Grid-AutoColumn-';
|
|
10
11
|
function normalizeTableLayoutModel(layout, options) {
|
|
@@ -66,7 +67,10 @@ function normalizeTableLayoutModel(layout, options) {
|
|
|
66
67
|
displayType = displayType || 'single';
|
|
67
68
|
layout.RowGroupDisplayType = displayType;
|
|
68
69
|
}
|
|
69
|
-
if (displayType === '
|
|
70
|
+
if (displayType === 'groupRows') {
|
|
71
|
+
layout.TableColumns = layout.TableColumns.filter((colId) => !(0, rowGroupDisplayType_1.isRowGroupAutoColumnId)(colId));
|
|
72
|
+
}
|
|
73
|
+
else if (displayType === 'single') {
|
|
70
74
|
if (!ColumnOrderSet.has(exports.AUTO_GROUP_COLUMN_ID__SINGLE)) {
|
|
71
75
|
layout.TableColumns = [exports.AUTO_GROUP_COLUMN_ID__SINGLE, ...layout.TableColumns];
|
|
72
76
|
}
|
|
@@ -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,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rowGroupDisplayTypeToGridOption = rowGroupDisplayTypeToGridOption;
|
|
4
|
+
exports.gridOptionToRowGroupDisplayType = gridOptionToRowGroupDisplayType;
|
|
5
|
+
exports.isRowGroupAutoColumnId = isRowGroupAutoColumnId;
|
|
6
|
+
const normalizeLayoutModel_1 = require("./normalizeLayoutModel");
|
|
7
|
+
function rowGroupDisplayTypeToGridOption(displayType) {
|
|
8
|
+
switch (displayType ?? 'single') {
|
|
9
|
+
case 'multi':
|
|
10
|
+
return 'multipleColumns';
|
|
11
|
+
case 'groupRows':
|
|
12
|
+
return 'groupRows';
|
|
13
|
+
case 'single':
|
|
14
|
+
default:
|
|
15
|
+
return 'singleColumn';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function gridOptionToRowGroupDisplayType(groupDisplayType) {
|
|
19
|
+
if (groupDisplayType === 'multipleColumns') {
|
|
20
|
+
return 'multi';
|
|
21
|
+
}
|
|
22
|
+
if (groupDisplayType === 'groupRows') {
|
|
23
|
+
return 'groupRows';
|
|
24
|
+
}
|
|
25
|
+
return 'single';
|
|
26
|
+
}
|
|
27
|
+
function isRowGroupAutoColumnId(colId) {
|
|
28
|
+
return colId === normalizeLayoutModel_1.AUTO_GROUP_COLUMN_ID__SINGLE || colId.startsWith(normalizeLayoutModel_1.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX);
|
|
29
|
+
}
|
package/src/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
import { type ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
3
|
export declare const POPUP_Z_INDEX = "twa:z-[9999999]";
|
|
4
|
+
export declare const getFocusableElements: (root: HTMLElement) => HTMLElement[];
|
|
5
|
+
type CaptureTabEvent = Pick<KeyboardEvent, 'key' | 'shiftKey' | 'preventDefault'>;
|
|
6
|
+
type CaptureTabTarget = HTMLElement | null | {
|
|
7
|
+
current: HTMLElement | null;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Traps Tab / Shift+Tab navigation within `node` so focus cycles between the
|
|
11
|
+
* first and last focusable elements instead of escaping the container.
|
|
12
|
+
*
|
|
13
|
+
* Only acts when the currently focused element is within `node` — popups that
|
|
14
|
+
* portal elsewhere (selects, datepickers) keep managing their own navigation.
|
|
15
|
+
*
|
|
16
|
+
* `node` may be an element directly or a React ref to one.
|
|
17
|
+
*
|
|
18
|
+
* Can be called directly (`captureTab(node, event)`) or curried by omitting the
|
|
19
|
+
* event (`captureTab(node)`) to get a handler that only expects the event.
|
|
20
|
+
*/
|
|
21
|
+
export declare function captureTab(node: CaptureTabTarget): (event: CaptureTabEvent) => void;
|
|
22
|
+
export declare function captureTab(node: CaptureTabTarget, event: CaptureTabEvent): void;
|
|
23
|
+
export {};
|
package/src/lib/utils.js
CHANGED
|
@@ -1,10 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POPUP_Z_INDEX = void 0;
|
|
3
|
+
exports.getFocusableElements = exports.POPUP_Z_INDEX = void 0;
|
|
4
4
|
exports.cn = cn;
|
|
5
|
+
exports.captureTab = captureTab;
|
|
5
6
|
const clsx_1 = require("clsx");
|
|
6
7
|
const twMerge_1 = require("../twMerge");
|
|
7
8
|
function cn(...inputs) {
|
|
8
9
|
return (0, twMerge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
9
10
|
}
|
|
10
11
|
exports.POPUP_Z_INDEX = 'twa:z-[9999999]';
|
|
12
|
+
const FOCUSABLE_SELECTOR = [
|
|
13
|
+
'a[href]',
|
|
14
|
+
'button:not([disabled])',
|
|
15
|
+
'input:not([disabled])',
|
|
16
|
+
'select:not([disabled])',
|
|
17
|
+
'textarea:not([disabled])',
|
|
18
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
19
|
+
].join(',');
|
|
20
|
+
const getFocusableElements = (root) => {
|
|
21
|
+
return Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => {
|
|
22
|
+
if (el.hasAttribute('disabled') || el.getAttribute('aria-hidden') === 'true') {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
// ignore elements that aren't actually rendered (e.g. display:none)
|
|
26
|
+
return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
exports.getFocusableElements = getFocusableElements;
|
|
30
|
+
function captureTab(node, event) {
|
|
31
|
+
if (event === undefined) {
|
|
32
|
+
return (deferredEvent) => captureTab(node, deferredEvent);
|
|
33
|
+
}
|
|
34
|
+
if (event.key !== 'Tab')
|
|
35
|
+
return;
|
|
36
|
+
const root = node instanceof HTMLElement ? node : (node?.current ?? null);
|
|
37
|
+
if (!root)
|
|
38
|
+
return;
|
|
39
|
+
const active = document.activeElement;
|
|
40
|
+
if (!active || !root.contains(active))
|
|
41
|
+
return;
|
|
42
|
+
const focusable = (0, exports.getFocusableElements)(root);
|
|
43
|
+
if (focusable.length === 0)
|
|
44
|
+
return;
|
|
45
|
+
const first = focusable[0];
|
|
46
|
+
const last = focusable[focusable.length - 1];
|
|
47
|
+
if (event.shiftKey) {
|
|
48
|
+
if (active === first) {
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
last.focus();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (active === last) {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
first.focus();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1138,11 +1138,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1138
1138
|
};
|
|
1139
1139
|
BadgePillStyle: {
|
|
1140
1140
|
k: string;
|
|
1141
|
-
p: {
|
|
1142
|
-
n: string;
|
|
1143
|
-
k: string;
|
|
1144
|
-
o: boolean;
|
|
1145
|
-
}[];
|
|
1146
1141
|
};
|
|
1147
1142
|
BadgeShape: {
|
|
1148
1143
|
k: string;
|
|
@@ -3552,25 +3547,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3552
3547
|
LayoutArray: {
|
|
3553
3548
|
k: string;
|
|
3554
3549
|
};
|
|
3555
|
-
LayoutBase: {
|
|
3556
|
-
k: string;
|
|
3557
|
-
p: ({
|
|
3558
|
-
n: string;
|
|
3559
|
-
k: string;
|
|
3560
|
-
o: boolean;
|
|
3561
|
-
r?: undefined;
|
|
3562
|
-
} | {
|
|
3563
|
-
n: string;
|
|
3564
|
-
k: string;
|
|
3565
|
-
o: boolean;
|
|
3566
|
-
r: string;
|
|
3567
|
-
} | {
|
|
3568
|
-
n: string;
|
|
3569
|
-
k: string;
|
|
3570
|
-
o?: undefined;
|
|
3571
|
-
r?: undefined;
|
|
3572
|
-
})[];
|
|
3573
|
-
};
|
|
3574
3550
|
LayoutChangedAction: {
|
|
3575
3551
|
k: string;
|
|
3576
3552
|
};
|
|
@@ -4343,12 +4319,17 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4343
4319
|
};
|
|
4344
4320
|
ReportScheduleRanInfo: {
|
|
4345
4321
|
k: string;
|
|
4346
|
-
p: {
|
|
4322
|
+
p: ({
|
|
4323
|
+
n: string;
|
|
4324
|
+
k: string;
|
|
4325
|
+
o?: undefined;
|
|
4326
|
+
r?: undefined;
|
|
4327
|
+
} | {
|
|
4347
4328
|
n: string;
|
|
4348
4329
|
k: string;
|
|
4349
4330
|
o: boolean;
|
|
4350
4331
|
r: string;
|
|
4351
|
-
}[];
|
|
4332
|
+
})[];
|
|
4352
4333
|
};
|
|
4353
4334
|
ResolveContextDataContext: {
|
|
4354
4335
|
k: string;
|