@adaptabletools/adaptable 22.0.0-canary.7 → 22.0.0-canary.8
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 +63 -71
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
- package/src/AdaptableState/Common/AdaptableRowContext.js +1 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
- package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
- package/src/AdaptableState/InitialState.d.ts +9 -0
- package/src/AdaptableState/LayoutState.d.ts +1 -2
- package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
- package/src/AdaptableState/UserInterfaceState.js +1 -0
- package/src/Api/GridApi.d.ts +5 -9
- package/src/Api/Implementation/AlertApiImpl.js +2 -6
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
- package/src/Api/Implementation/GridApiImpl.js +9 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +3 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -5
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
- package/src/Api/LayoutApi.d.ts +6 -0
- package/src/Api/UserInterfaceApi.d.ts +17 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +21 -0
- package/src/Redux/Store/AdaptableStore.js +27 -0
- package/src/Utilities/resolveContainerElement.d.ts +23 -0
- package/src/Utilities/resolveContainerElement.js +44 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +36 -1
- package/src/View/Components/WizardSummaryPage.js +1 -1
- package/src/View/Dashboard/CustomToolbar.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +144 -138
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
- package/src/View/UIHelper.d.ts +2 -1
- package/src/View/UIHelper.js +8 -14
- package/src/agGrid/Adaptable.js +11 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
- package/src/agGrid/AdaptableAgGrid.js +112 -31
- package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +9 -1
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/Select/Select.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +62 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -2
- package/themes/dark.css +30 -29
- package/themes/light.css +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -6,6 +6,7 @@ import { PrimaryKeyDocsLink } from '../Utilities/Constants/DocumentationLinkCons
|
|
|
6
6
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
7
7
|
import Emitter from '../Utilities/Emitter';
|
|
8
8
|
import { applyDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
9
|
+
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
9
10
|
import { AgGridAdapter } from './AgGridAdapter';
|
|
10
11
|
import * as GeneralConstants from '../Utilities/Constants/GeneralConstants';
|
|
11
12
|
import { AG_GRID_GRAND_TOTAL_ROW_ID, AG_GRID_GROUPED_COLUMN, AUTOGENERATED_PK_COLUMN, ERROR_LAYOUT, GROUP_PATH_SEPARATOR, HALF_SECOND, QUARTER_SECOND, } from '../Utilities/Constants/GeneralConstants';
|
|
@@ -221,6 +222,8 @@ export class AdaptableAgGrid {
|
|
|
221
222
|
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
222
223
|
*/
|
|
223
224
|
adaptableStatusPanelKeys = [];
|
|
225
|
+
adaptableStatusPanelDefs = [];
|
|
226
|
+
hasAdaptableStatusBar;
|
|
224
227
|
// see #no_additional_react_root
|
|
225
228
|
_PRIVATE_adaptableJSXElement;
|
|
226
229
|
_prevLayout;
|
|
@@ -755,6 +758,82 @@ export class AdaptableAgGrid {
|
|
|
755
758
|
hideQuickFilter() {
|
|
756
759
|
this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', 0);
|
|
757
760
|
}
|
|
761
|
+
showAdaptableToolPanel() {
|
|
762
|
+
if (!this.hasAdaptableToolPanel) {
|
|
763
|
+
// don't re-add the ToolPanel if it's hidden by entitlement
|
|
764
|
+
if (this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel')) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
|
|
768
|
+
if (currentSideBar?.toolPanels) {
|
|
769
|
+
const updatedSideBar = {
|
|
770
|
+
...currentSideBar,
|
|
771
|
+
toolPanels: [...currentSideBar.toolPanels, this.buildAdaptableToolPanelDef()],
|
|
772
|
+
};
|
|
773
|
+
this.agGridAdapter.setGridOption('sideBar', updatedSideBar);
|
|
774
|
+
this.hasAdaptableToolPanel = true;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
hideAdaptableToolPanel() {
|
|
779
|
+
if (this.hasAdaptableToolPanel) {
|
|
780
|
+
// close the tool panel if it's currently open
|
|
781
|
+
this.api.toolPanelApi.closeAdapTableToolPanel();
|
|
782
|
+
const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
|
|
783
|
+
if (currentSideBar?.toolPanels) {
|
|
784
|
+
const updatedSideBar = {
|
|
785
|
+
...currentSideBar,
|
|
786
|
+
toolPanels: currentSideBar.toolPanels.filter((toolPanelDef) => {
|
|
787
|
+
if (typeof toolPanelDef === 'string') {
|
|
788
|
+
return toolPanelDef !== GeneralConstants.ADAPTABLE_TOOLPANEL_ID;
|
|
789
|
+
}
|
|
790
|
+
return toolPanelDef.id !== GeneralConstants.ADAPTABLE_TOOLPANEL_ID;
|
|
791
|
+
}),
|
|
792
|
+
};
|
|
793
|
+
this.agGridAdapter.setGridOption('sideBar', updatedSideBar);
|
|
794
|
+
}
|
|
795
|
+
this.hasAdaptableToolPanel = false;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
buildAdaptableToolPanelDef() {
|
|
799
|
+
return {
|
|
800
|
+
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
801
|
+
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
802
|
+
labelDefault: GeneralConstants.ADAPTABLE,
|
|
803
|
+
labelKey: 'adaptable',
|
|
804
|
+
iconKey: 'menu',
|
|
805
|
+
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
806
|
+
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
showAdaptableStatusBar() {
|
|
810
|
+
if (!this.hasAdaptableStatusBar && this.adaptableStatusPanelDefs.length > 0) {
|
|
811
|
+
const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
|
|
812
|
+
if (currentStatusBar) {
|
|
813
|
+
// filter out any Adaptable panels that may already exist to avoid duplicates
|
|
814
|
+
const existingNonAdaptablePanels = (currentStatusBar.statusPanels ?? []).filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key));
|
|
815
|
+
const updatedStatusBar = {
|
|
816
|
+
...currentStatusBar,
|
|
817
|
+
statusPanels: [...existingNonAdaptablePanels, ...this.adaptableStatusPanelDefs],
|
|
818
|
+
};
|
|
819
|
+
this.agGridAdapter.setGridOption('statusBar', updatedStatusBar);
|
|
820
|
+
this.hasAdaptableStatusBar = true;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
hideAdaptableStatusBar() {
|
|
825
|
+
if (this.hasAdaptableStatusBar) {
|
|
826
|
+
const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
|
|
827
|
+
if (currentStatusBar?.statusPanels) {
|
|
828
|
+
const updatedStatusBar = {
|
|
829
|
+
...currentStatusBar,
|
|
830
|
+
statusPanels: currentStatusBar.statusPanels.filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key)),
|
|
831
|
+
};
|
|
832
|
+
this.agGridAdapter.setGridOption('statusBar', updatedStatusBar);
|
|
833
|
+
}
|
|
834
|
+
this.hasAdaptableStatusBar = false;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
758
837
|
normalizeAdaptableOptions(adaptableOptions) {
|
|
759
838
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
760
839
|
this.logger.warn(`Autogenerated primary key is enabled (adaptableOptions.autogeneratedPrimaryKey = true). This should be a last resort as it limits some Adaptable features. See: ${PrimaryKeyDocsLink}`);
|
|
@@ -1157,16 +1236,7 @@ export class AdaptableAgGrid {
|
|
|
1157
1236
|
return original_sideBar;
|
|
1158
1237
|
}
|
|
1159
1238
|
const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
|
|
1160
|
-
const adaptableToolPanelDef =
|
|
1161
|
-
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
1162
|
-
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
1163
|
-
labelDefault: GeneralConstants.ADAPTABLE,
|
|
1164
|
-
labelKey: 'adaptable',
|
|
1165
|
-
iconKey: 'menu',
|
|
1166
|
-
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
1167
|
-
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
1168
|
-
// maxWidth = undefined,
|
|
1169
|
-
};
|
|
1239
|
+
const adaptableToolPanelDef = this.buildAdaptableToolPanelDef();
|
|
1170
1240
|
const mapToolPanelDefs = (toolPanelDefs = []) => {
|
|
1171
1241
|
// if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
|
|
1172
1242
|
return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
|
|
@@ -1241,19 +1311,29 @@ export class AdaptableAgGrid {
|
|
|
1241
1311
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
|
|
1242
1312
|
const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
|
|
1243
1313
|
if (statusPanel.statusPanel === ADAPTABLE_STATUS_PANEL) {
|
|
1314
|
+
if (!statusPanel.key) {
|
|
1315
|
+
this.logger.consoleWarn('AdaptableStatusPanel is missing a "key" property. This panel will not be managed by HideAdaptableUI. Please provide a unique key.');
|
|
1316
|
+
return statusPanel;
|
|
1317
|
+
}
|
|
1244
1318
|
this.adaptableStatusPanelKeys.push(statusPanel.key);
|
|
1245
1319
|
const context = {
|
|
1246
1320
|
Key: statusPanel.key,
|
|
1247
1321
|
};
|
|
1248
|
-
|
|
1322
|
+
const adaptablePanelDef = {
|
|
1249
1323
|
...statusPanel,
|
|
1250
1324
|
statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
|
|
1251
1325
|
};
|
|
1326
|
+
this.adaptableStatusPanelDefs.push(adaptablePanelDef);
|
|
1327
|
+
return adaptablePanelDef;
|
|
1252
1328
|
}
|
|
1253
1329
|
return statusPanel;
|
|
1254
1330
|
});
|
|
1255
1331
|
return { ...original_statusBar, statusPanels };
|
|
1256
1332
|
});
|
|
1333
|
+
this.hasAdaptableStatusBar = this.adaptableStatusPanelKeys.length > 0;
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
this.hasAdaptableStatusBar = false;
|
|
1257
1337
|
}
|
|
1258
1338
|
/**
|
|
1259
1339
|
* `getRowStyle`
|
|
@@ -1441,21 +1521,22 @@ export class AdaptableAgGrid {
|
|
|
1441
1521
|
useRowNodeLookUp() {
|
|
1442
1522
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1443
1523
|
}
|
|
1524
|
+
buildInitContainerContext() {
|
|
1525
|
+
return {
|
|
1526
|
+
adaptableId: this.adaptableOptions?.adaptableId ?? '',
|
|
1527
|
+
adaptableStateKey: this.adaptableOptions?.adaptableStateKey ?? '',
|
|
1528
|
+
adaptableContext: this.adaptableOptions?.adaptableContext,
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1444
1531
|
getAgGridContainerElement() {
|
|
1445
1532
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1446
|
-
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1447
|
-
typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
|
|
1448
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
|
|
1449
|
-
: this.adaptableOptions?.containerOptions?.agGridContainer;
|
|
1533
|
+
this.DANGER_USE_GETTER_agGridContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.agGridContainer, this.buildInitContainerContext());
|
|
1450
1534
|
}
|
|
1451
1535
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1452
1536
|
}
|
|
1453
1537
|
getAdaptableContainerElement() {
|
|
1454
1538
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1455
|
-
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1456
|
-
typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
|
|
1457
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
|
|
1458
|
-
: this.adaptableOptions?.containerOptions?.adaptableContainer;
|
|
1539
|
+
this.DANGER_USE_GETTER_adaptableContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.adaptableContainer, this.buildInitContainerContext());
|
|
1459
1540
|
}
|
|
1460
1541
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1461
1542
|
}
|
|
@@ -2454,31 +2535,31 @@ export class AdaptableAgGrid {
|
|
|
2454
2535
|
});
|
|
2455
2536
|
}
|
|
2456
2537
|
}
|
|
2457
|
-
async manageGridRows(
|
|
2538
|
+
async manageGridRows(dataRowConfig, dataUpdateConfig = {}) {
|
|
2458
2539
|
const result = {
|
|
2459
2540
|
addedRows: [],
|
|
2460
2541
|
updatedRows: [],
|
|
2461
2542
|
removedRows: [],
|
|
2462
2543
|
};
|
|
2463
|
-
if (!dataRows) {
|
|
2544
|
+
if (!dataRowConfig || !dataRowConfig.dataRows) {
|
|
2464
2545
|
return result;
|
|
2465
2546
|
}
|
|
2466
|
-
const addDataRows = dataRows.add;
|
|
2467
|
-
const updateDataRows = dataRows.update;
|
|
2468
|
-
const removeDataRows = dataRows.delete;
|
|
2547
|
+
const addDataRows = dataRowConfig.dataRows.add;
|
|
2548
|
+
const updateDataRows = dataRowConfig.dataRows.update;
|
|
2549
|
+
const removeDataRows = dataRowConfig.dataRows.delete;
|
|
2469
2550
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
2470
2551
|
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2471
2552
|
}
|
|
2472
|
-
if (
|
|
2553
|
+
if (dataUpdateConfig.runAsync) {
|
|
2473
2554
|
return new Promise((resolve) => {
|
|
2474
2555
|
this.applyAgGridTransactionAsync({
|
|
2475
2556
|
update: updateDataRows,
|
|
2476
2557
|
add: addDataRows,
|
|
2477
2558
|
remove: removeDataRows,
|
|
2478
|
-
addIndex:
|
|
2559
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2479
2560
|
}, (transaction) => {
|
|
2480
|
-
if (typeof
|
|
2481
|
-
|
|
2561
|
+
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2562
|
+
dataUpdateConfig.callback(transaction);
|
|
2482
2563
|
}
|
|
2483
2564
|
if (transaction?.add) {
|
|
2484
2565
|
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
@@ -2489,7 +2570,7 @@ export class AdaptableAgGrid {
|
|
|
2489
2570
|
removedRows: transaction?.remove,
|
|
2490
2571
|
});
|
|
2491
2572
|
});
|
|
2492
|
-
if (
|
|
2573
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2493
2574
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2494
2575
|
}
|
|
2495
2576
|
});
|
|
@@ -2499,12 +2580,12 @@ export class AdaptableAgGrid {
|
|
|
2499
2580
|
update: updateDataRows,
|
|
2500
2581
|
add: addDataRows,
|
|
2501
2582
|
remove: removeDataRows,
|
|
2502
|
-
addIndex:
|
|
2583
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2503
2584
|
});
|
|
2504
2585
|
if (transaction?.add) {
|
|
2505
2586
|
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2506
2587
|
}
|
|
2507
|
-
if (
|
|
2588
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2508
2589
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2509
2590
|
}
|
|
2510
2591
|
return Promise.resolve({
|
|
@@ -54,7 +54,7 @@ export const AgGridFloatingFilterAdapterFactory = (adaptable) => {
|
|
|
54
54
|
// Find and update header cell
|
|
55
55
|
const headerCell = findParentWithClass(filterContainer, 'ag-header-cell', stopClasses);
|
|
56
56
|
if (headerCell?.classList.contains('ag-floating-filter')) {
|
|
57
|
-
headerCell.style.padding = 'var(--ab-space
|
|
57
|
+
headerCell.style.padding = 'var(--ab-base-space)';
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
return class AgGridFloatingFilterAdapter {
|
|
@@ -17,12 +17,16 @@ export class AgGridMenuAdapter {
|
|
|
17
17
|
this._adaptableInstance = null;
|
|
18
18
|
}
|
|
19
19
|
buildColumnMenu(params, originalGetMainMenuItems) {
|
|
20
|
-
const columnMenuOptions = this.adaptableOptions.columnMenuOptions;
|
|
21
20
|
const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
|
|
22
21
|
if (!params.column) {
|
|
23
22
|
// return only AG Grid context if the Adaptable column is not found (should not happen)
|
|
24
23
|
return agGridMenuItems;
|
|
25
24
|
}
|
|
25
|
+
// If Adaptable UI is hidden, return only AG Grid default items
|
|
26
|
+
if (!this.adaptableApi.userInterfaceApi.isAdaptableUIVisible()) {
|
|
27
|
+
return agGridMenuItems;
|
|
28
|
+
}
|
|
29
|
+
const columnMenuOptions = this.adaptableOptions.columnMenuOptions;
|
|
26
30
|
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId(params.column?.getColId());
|
|
27
31
|
const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
|
|
28
32
|
/**
|
|
@@ -60,6 +64,10 @@ export class AgGridMenuAdapter {
|
|
|
60
64
|
if (!params.column) {
|
|
61
65
|
return [];
|
|
62
66
|
}
|
|
67
|
+
// If Adaptable UI is hidden, return only AG Grid default items
|
|
68
|
+
if (!this.adaptableApi.userInterfaceApi.isAdaptableUIVisible()) {
|
|
69
|
+
return (params.defaultItems ? [...params.defaultItems] : []);
|
|
70
|
+
}
|
|
63
71
|
// we do this in order to refresh the internal state of selected cells (technically query the AG Grid cellRanges)
|
|
64
72
|
// (right-click selected the current cell, but this was not reflected in the internal state of the selected cells)
|
|
65
73
|
this._adaptableInstance.refreshSelectedCellsState();
|
|
@@ -5,7 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
const Square = (props) => {
|
|
6
6
|
return React.createElement("div", { className: `ab-CheckBox__square ab-CheckBox__square--${props.type}` });
|
|
7
7
|
};
|
|
8
|
-
const CheckBox = ({ children, checked, onChange, value, name, disabled, readOnly, variant = 'default', gapDistance = 'var(--ab-space
|
|
8
|
+
const CheckBox = ({ children, checked, onChange, value, name, disabled, readOnly, variant = 'default', gapDistance = 'var(--ab-base-space)', childrenPosition = 'end', as = 'label', ...props }) => {
|
|
9
9
|
const [stateChecked, setStateChecked] = useState(false);
|
|
10
10
|
const computedChecked = checked !== undefined ? checked : stateChecked;
|
|
11
11
|
const onInputChange = (event) => {
|
|
@@ -8,7 +8,7 @@ const Arrows = () => {
|
|
|
8
8
|
// background: 'var(--ab-color-defaultbackground)',
|
|
9
9
|
fill: 'var(--ab-cmp-dropdown__fill)',
|
|
10
10
|
top: '50%',
|
|
11
|
-
right: 'var(--ab-space
|
|
11
|
+
right: 'var(--ab-base-space)',
|
|
12
12
|
transform: 'translate3d(0px, -50%, 0px)',
|
|
13
13
|
cursor: 'pointer',
|
|
14
14
|
} },
|
|
@@ -35,11 +35,11 @@ export const DataTableEditor = ({ fields, dataFormatter, data: initialData, type
|
|
|
35
35
|
hasFriendlyNames && (React.createElement(CheckBox, { checked: showColumnIds, onChange: (checked) => setShowValues(checked), style: {
|
|
36
36
|
float: 'right',
|
|
37
37
|
margin: 0,
|
|
38
|
-
paddingTop: 'var(--ab-space
|
|
39
|
-
paddingBottom: 'var(--ab-space
|
|
38
|
+
paddingTop: 'var(--ab-base-space)',
|
|
39
|
+
paddingBottom: 'var(--ab-base-space)',
|
|
40
40
|
} }, labels?.showIds ?? 'Show Column IDs')),
|
|
41
41
|
React.createElement(AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: labels?.filterPlaceholder ?? 'Filter columns...', style: { flex: 1, marginBottom: 3 } })),
|
|
42
|
-
React.createElement(FormLayout, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space
|
|
42
|
+
React.createElement(FormLayout, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-base-space)", gridRowGap: "var(--ab-base-space)", sizes: ['auto', '1fr'], style: { alignItems: 'stretch', overflow: 'auto' } }, fields
|
|
43
43
|
.filter((field) => {
|
|
44
44
|
if (!searchInputValue) {
|
|
45
45
|
return true;
|
|
@@ -14,7 +14,7 @@ const defaultColumns = {
|
|
|
14
14
|
};
|
|
15
15
|
const PLACEHOLDER = React.createElement("div", null);
|
|
16
16
|
const FormLayout = (props) => {
|
|
17
|
-
let { placeholder = PLACEHOLDER, columns = ['label', 'children'], defaultComponent = Box, sizes = ['auto', '1fr'], gridColumnGap = 'var(--ab-space
|
|
17
|
+
let { placeholder = PLACEHOLDER, columns = ['label', 'children'], defaultComponent = Box, sizes = ['auto', '1fr'], gridColumnGap = 'calc(var(--ab-base-space) * 2)', gridRowGap = 'calc(var(--ab-base-space) * 2)', style, childrenToColumns = true, ...boxProps } = props;
|
|
18
18
|
columns = columns.map((c) => {
|
|
19
19
|
if (typeof c === 'string' || typeof c === 'number') {
|
|
20
20
|
c = {
|
|
@@ -699,7 +699,7 @@ export const Select = function (props) {
|
|
|
699
699
|
valueContainer: (baseStyle) => {
|
|
700
700
|
return {
|
|
701
701
|
...baseStyle,
|
|
702
|
-
padding: props.size === 'small' ? `0 var(--ab-space
|
|
702
|
+
padding: props.size === 'small' ? `0 var(--ab-base-space)` : baseStyle.padding,
|
|
703
703
|
...props.styles?.valueContainer,
|
|
704
704
|
};
|
|
705
705
|
},
|
|
@@ -221,7 +221,7 @@ export function TreeDropdown(props) {
|
|
|
221
221
|
};
|
|
222
222
|
if (!hasChildren) {
|
|
223
223
|
// @ts-ignore - don't leave any space for the > expand icon, as there are no children
|
|
224
|
-
treeListStyle['--infinite-group-row-column-nesting'] = 'var(--ab-space
|
|
224
|
+
treeListStyle['--infinite-group-row-column-nesting'] = 'calc(var(--ab-base-space) * 2)';
|
|
225
225
|
}
|
|
226
226
|
const treeList = (React.createElement(TreeList, { primaryKey: props.primaryKey ?? 'id', treeFilterFunction: filterFunction, columnHeaderHeight: 30, onReady: ({ api }) => {
|
|
227
227
|
setTreeListApi(api);
|
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: "22.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1770905030327 || Date.now(),
|
|
4
|
+
VERSION: "22.0.0-canary.8" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -314,6 +314,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
314
314
|
isOpt: boolean;
|
|
315
315
|
}[];
|
|
316
316
|
};
|
|
317
|
+
AdaptableColumnsContext: {
|
|
318
|
+
name: string;
|
|
319
|
+
kind: string;
|
|
320
|
+
desc: string;
|
|
321
|
+
props: {
|
|
322
|
+
name: string;
|
|
323
|
+
kind: string;
|
|
324
|
+
desc: string;
|
|
325
|
+
}[];
|
|
326
|
+
};
|
|
317
327
|
AdaptableColumnSummary: {
|
|
318
328
|
name: string;
|
|
319
329
|
kind: string;
|
|
@@ -364,6 +374,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
364
374
|
ref: string;
|
|
365
375
|
}[];
|
|
366
376
|
};
|
|
377
|
+
AdaptableContainerValue: {
|
|
378
|
+
name: string;
|
|
379
|
+
kind: string;
|
|
380
|
+
desc: string;
|
|
381
|
+
};
|
|
367
382
|
AdaptableContextMenuItem: {
|
|
368
383
|
name: string;
|
|
369
384
|
kind: string;
|
|
@@ -384,6 +399,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
384
399
|
desc: string;
|
|
385
400
|
}[];
|
|
386
401
|
};
|
|
402
|
+
AdaptableCSSSelector: {
|
|
403
|
+
name: string;
|
|
404
|
+
kind: string;
|
|
405
|
+
desc: string;
|
|
406
|
+
props: {
|
|
407
|
+
name: string;
|
|
408
|
+
kind: string;
|
|
409
|
+
desc: string;
|
|
410
|
+
}[];
|
|
411
|
+
};
|
|
387
412
|
AdaptableCustomIcon: {
|
|
388
413
|
name: string;
|
|
389
414
|
kind: string;
|
|
@@ -889,6 +914,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
889
914
|
desc: string;
|
|
890
915
|
}[];
|
|
891
916
|
};
|
|
917
|
+
AdaptableRowContext: {
|
|
918
|
+
name: string;
|
|
919
|
+
kind: string;
|
|
920
|
+
desc: string;
|
|
921
|
+
props: {
|
|
922
|
+
name: string;
|
|
923
|
+
kind: string;
|
|
924
|
+
desc: string;
|
|
925
|
+
}[];
|
|
926
|
+
};
|
|
892
927
|
AdaptableSaveStateFunction: {
|
|
893
928
|
name: string;
|
|
894
929
|
kind: string;
|
|
@@ -2244,6 +2279,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2244
2279
|
ref: string;
|
|
2245
2280
|
})[];
|
|
2246
2281
|
};
|
|
2282
|
+
ContainerContext: {
|
|
2283
|
+
name: string;
|
|
2284
|
+
kind: string;
|
|
2285
|
+
desc: string;
|
|
2286
|
+
};
|
|
2247
2287
|
ContainerOptions: {
|
|
2248
2288
|
name: string;
|
|
2249
2289
|
kind: string;
|
|
@@ -4148,6 +4188,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4148
4188
|
isOpt?: undefined;
|
|
4149
4189
|
})[];
|
|
4150
4190
|
};
|
|
4191
|
+
InitContainerContext: {
|
|
4192
|
+
name: string;
|
|
4193
|
+
kind: string;
|
|
4194
|
+
desc: string;
|
|
4195
|
+
props: {
|
|
4196
|
+
name: string;
|
|
4197
|
+
kind: string;
|
|
4198
|
+
desc: string;
|
|
4199
|
+
}[];
|
|
4200
|
+
};
|
|
4151
4201
|
InitialState: {
|
|
4152
4202
|
name: string;
|
|
4153
4203
|
kind: string;
|
|
@@ -6310,6 +6360,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
6310
6360
|
noCode?: undefined;
|
|
6311
6361
|
})[];
|
|
6312
6362
|
};
|
|
6363
|
+
UserInterfaceState: {
|
|
6364
|
+
name: string;
|
|
6365
|
+
kind: string;
|
|
6366
|
+
desc: string;
|
|
6367
|
+
props: {
|
|
6368
|
+
name: string;
|
|
6369
|
+
kind: string;
|
|
6370
|
+
desc: string;
|
|
6371
|
+
isOpt: boolean;
|
|
6372
|
+
defVal: string;
|
|
6373
|
+
}[];
|
|
6374
|
+
};
|
|
6313
6375
|
UserMenuItem: {
|
|
6314
6376
|
name: string;
|
|
6315
6377
|
kind: string;
|