@adaptabletools/adaptable 24.0.0-canary.8 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +2 -3
- package/agGrid.js +2 -3
- package/aql.d.ts +29 -1
- package/aql.js +49 -1
- package/devtools.d.ts +55 -1
- package/index.css +0 -19
- package/index.d.ts +2 -3
- package/index.js +2 -3
- package/package.json +1 -1
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +24 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +97 -69
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +113 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +0 -2
- package/src/AdaptableOptions/ChartingOptions.d.ts +11 -5
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +30 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +0 -2
- package/src/AdaptableOptions/CommentOptions.d.ts +12 -4
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +31 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +0 -3
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +3 -2
- package/src/AdaptableOptions/EditOptions.d.ts +18 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +23 -0
- package/src/AdaptableOptions/ExpressionOptions.d.ts +0 -3
- package/src/AdaptableOptions/Fdc3Options.d.ts +77 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +13 -8
- package/src/AdaptableOptions/LayoutOptions.d.ts +16 -3
- package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -1
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +0 -2
- package/src/AdaptableOptions/RowFormOptions.d.ts +9 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +10 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -2
- package/src/AdaptableState/AdaptableState.d.ts +98 -4
- package/src/AdaptableState/AlertState.d.ts +20 -21
- package/src/AdaptableState/ApplicationState.d.ts +5 -3
- package/src/AdaptableState/BaseState.d.ts +9 -2
- package/src/AdaptableState/CalculatedColumnState.d.ts +10 -8
- package/src/AdaptableState/ChartingState.d.ts +10 -5
- package/src/AdaptableState/CommentState.d.ts +10 -4
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +6 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +3 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +38 -1
- package/src/AdaptableState/Common/AdaptableFilterState.d.ts +3 -1
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +3 -1
- package/src/AdaptableState/Common/AdaptableForm.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +27 -1
- package/src/AdaptableState/Common/AdaptableIcon.d.ts +4 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +9 -1
- package/src/AdaptableState/Common/AdaptableQuery.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +6 -8
- package/src/AdaptableState/Common/AggregationColumns.d.ts +15 -6
- package/src/AdaptableState/Common/ButtonStyle.d.ts +3 -1
- package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +6 -2
- package/src/AdaptableState/Common/CellHighlightInfo.d.ts +4 -2
- package/src/AdaptableState/Common/CellSummary.d.ts +33 -0
- package/src/AdaptableState/Common/ColumnFilter.d.ts +3 -1
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +4 -2
- package/src/AdaptableState/Common/ColumnScope.d.ts +32 -1
- package/src/AdaptableState/Common/ColumnSetupInfo.d.ts +17 -0
- package/src/AdaptableState/Common/ColumnSort.d.ts +3 -1
- package/src/AdaptableState/Common/CompactCalculatedColumnEditorInfo.d.ts +3 -0
- package/src/AdaptableState/Common/DataChangedScope.d.ts +3 -1
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +3 -1
- package/src/AdaptableState/Common/Entitlement.d.ts +4 -2
- package/src/AdaptableState/Common/Enums.d.ts +21 -0
- package/src/AdaptableState/Common/ExtendedLayout.d.ts +3 -1
- package/src/AdaptableState/Common/Fdc3Context.d.ts +9 -0
- package/src/AdaptableState/Common/Fdc3Intent.d.ts +6 -0
- package/src/AdaptableState/Common/GridFilter.d.ts +3 -1
- package/src/AdaptableState/Common/MenuItem.d.ts +9 -0
- package/src/AdaptableState/Common/RowHighlightInfo.d.ts +4 -2
- package/src/AdaptableState/Common/RowScope.d.ts +3 -1
- package/src/AdaptableState/Common/RowSummary.d.ts +14 -4
- package/src/AdaptableState/Common/RowsHighlightInfo.d.ts +5 -3
- package/src/AdaptableState/Common/Schedule.d.ts +10 -2
- package/src/AdaptableState/Common/SpecialColumnSettings.d.ts +3 -1
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +4 -2
- package/src/AdaptableState/Common/TransposeConfig.d.ts +1 -1
- package/src/AdaptableState/Common/Types.d.ts +9 -0
- package/src/AdaptableState/CustomSortState.d.ts +8 -5
- package/src/AdaptableState/DashboardState.d.ts +14 -10
- package/src/AdaptableState/ExportState.d.ts +12 -4
- package/src/AdaptableState/FlashingCellState.d.ts +8 -5
- package/src/AdaptableState/FormatColumnState.d.ts +28 -8
- package/src/AdaptableState/FreeTextColumnState.d.ts +14 -8
- package/src/AdaptableState/IPushPullState.d.ts +39 -3
- package/src/AdaptableState/InitialState.d.ts +9 -9
- package/src/AdaptableState/InternalState.d.ts +183 -3
- package/src/AdaptableState/LayoutState.d.ts +64 -21
- package/src/AdaptableState/NamedQueryState.d.ts +16 -4
- package/src/AdaptableState/NoteState.d.ts +7 -3
- package/src/AdaptableState/OpenFinState.d.ts +12 -2
- package/src/AdaptableState/PlusMinusState.d.ts +8 -4
- package/src/AdaptableState/PopupState.d.ts +29 -1
- package/src/AdaptableState/QuickSearchState.d.ts +5 -3
- package/src/AdaptableState/Selection/GridCell.d.ts +5 -3
- package/src/AdaptableState/Selection/GridCellRange.d.ts +8 -7
- package/src/AdaptableState/Selection/SelectedCellInfo.d.ts +1 -1
- package/src/AdaptableState/ShortcutState.d.ts +7 -3
- package/src/AdaptableState/StatusBarState.d.ts +7 -6
- package/src/AdaptableState/StyledColumnState.d.ts +46 -14
- package/src/AdaptableState/TeamSharingState.d.ts +46 -2
- package/src/AdaptableState/ThemeState.d.ts +24 -2
- package/src/AdaptableState/ToolPanelState.d.ts +10 -5
- package/src/AdaptableState/UserInterfaceState.d.ts +2 -2
- package/src/AdaptableState/Uuid.d.ts +6 -0
- package/src/Api/ActionColumnApi.d.ts +3 -1
- package/src/Api/AdaptableApi.d.ts +54 -50
- package/src/Api/AlertApi.d.ts +20 -12
- package/src/Api/ApplicationApi.d.ts +6 -2
- package/src/Api/BulkUpdateApi.d.ts +2 -1
- package/src/Api/CalculatedColumnApi.d.ts +4 -1
- package/src/Api/CalendarApi.d.ts +10 -0
- package/src/Api/CellSummaryApi.d.ts +9 -3
- package/src/Api/ChartingApi.d.ts +22 -7
- package/src/Api/ColumnApi.d.ts +71 -4
- package/src/Api/ColumnFilterApi.d.ts +13 -3
- package/src/Api/ColumnMenuApi.d.ts +13 -2
- package/src/Api/ColumnScopeApi.d.ts +27 -1
- package/src/Api/CommentApi.d.ts +10 -7
- package/src/Api/ContextMenuApi.d.ts +11 -1
- package/src/Api/CustomSortApi.d.ts +6 -2
- package/src/Api/DashboardApi.d.ts +30 -9
- package/src/Api/DataChangeHistoryApi.d.ts +9 -3
- package/src/Api/DataImportApi.d.ts +1 -1
- package/src/Api/EntitlementApi.d.ts +6 -1
- package/src/Api/EventApi.d.ts +67 -19
- package/src/Api/Events/AdaptableReady.d.ts +6 -2
- package/src/Api/Events/AdaptableStateChanged.d.ts +9 -5
- package/src/Api/Events/AdaptableStateReloaded.d.ts +7 -3
- package/src/Api/Events/AlertFired.d.ts +8 -2
- package/src/Api/Events/BeforeAdaptableStateChange.d.ts +6 -2
- package/src/Api/Events/CalculatedColumnChanged.d.ts +7 -3
- package/src/Api/Events/CellChanged.d.ts +6 -2
- package/src/Api/Events/CellSelectionChanged.d.ts +6 -2
- package/src/Api/Events/ChartChanged.d.ts +16 -8
- package/src/Api/Events/CommentChanged.d.ts +8 -2
- package/src/Api/Events/CustomToolbarConfigured.d.ts +6 -2
- package/src/Api/Events/DashboardChanged.d.ts +27 -6
- package/src/Api/Events/DataImported.d.ts +8 -4
- package/src/Api/Events/DataSetSelected.d.ts +6 -2
- package/src/Api/Events/Fdc3MessageInfo.d.ts +14 -4
- package/src/Api/Events/FlashingCellDisplayed.d.ts +6 -2
- package/src/Api/Events/GridFilterApplied.d.ts +11 -3
- package/src/Api/Events/GridSorted.d.ts +6 -2
- package/src/Api/Events/LayoutChanged.d.ts +36 -5
- package/src/Api/Events/LiveDataChanged.d.ts +21 -5
- package/src/Api/Events/NoteChanged.d.ts +5 -1
- package/src/Api/Events/ReportScheduleRan.d.ts +7 -3
- package/src/Api/Events/RowChanged.d.ts +6 -2
- package/src/Api/Events/RowFormSubmitted.d.ts +28 -12
- package/src/Api/Events/RowSelectionChanged.d.ts +6 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +6 -2
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +6 -2
- package/src/Api/Events/ThemeSelected.d.ts +6 -2
- package/src/Api/ExportApi.d.ts +59 -32
- package/src/Api/ExpressionApi.d.ts +24 -1
- package/src/Api/Fdc3Api.d.ts +16 -3
- package/src/Api/FlashingCellApi.d.ts +6 -1
- package/src/Api/FormatColumnApi.d.ts +18 -11
- package/src/Api/FreeTextColumnApi.d.ts +4 -2
- package/src/Api/GridApi.d.ts +92 -19
- package/src/Api/IPushPullApi.d.ts +19 -2
- package/src/Api/Internal/EventInternalApi.d.ts +2 -1
- package/src/Api/Internal/EventInternalApi.js +7 -0
- package/src/Api/InteropioPluginApi.d.ts +2 -1
- package/src/Api/LayoutApi.d.ts +29 -15
- package/src/Api/NamedQueryApi.d.ts +10 -6
- package/src/Api/NoteApi.d.ts +15 -11
- package/src/Api/OpenFinApi.d.ts +8 -2
- package/src/Api/OptionsApi.d.ts +43 -1
- package/src/Api/PluginsApi.d.ts +6 -1
- package/src/Api/PlusMinusApi.d.ts +2 -1
- package/src/Api/QuickSearchApi.d.ts +6 -1
- package/src/Api/RowFormApi.d.ts +8 -7
- package/src/Api/ShortcutApi.d.ts +3 -1
- package/src/Api/SmartEditApi.d.ts +4 -1
- package/src/Api/StateApi.d.ts +30 -2
- package/src/Api/StatusBarApi.d.ts +2 -0
- package/src/Api/StyledColumnApi.d.ts +23 -12
- package/src/Api/SystemStatusApi.d.ts +18 -6
- package/src/Api/TeamSharingApi.d.ts +8 -1
- package/src/Api/ThemeApi.d.ts +18 -9
- package/src/Api/ToolPanelApi.d.ts +12 -7
- package/src/Api/UserInterfaceApi.d.ts +10 -1
- package/src/Redux/Store/AdaptableStore.js +1 -1
- package/src/agGrid/Adaptable.d.ts +0 -12
- package/src/agGrid/Adaptable.js +0 -52
- package/src/agGrid/AdaptableFrameworkComponent.d.ts +12 -0
- package/src/agGrid/AdaptableLogger.d.ts +74 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -0
- package/src/agGrid/index.d.ts +1 -6
- package/src/agGrid/index.js +1 -3
- package/src/aql/ExpressionEvaluation.d.ts +27 -0
- package/src/aql/types.d.ts +22 -0
- package/src/env.js +2 -2
- package/src/migration/legacyAdaptableQuery.d.ts +29 -4
- package/src/setupDevTools.js +223 -0
- package/src/types.d.ts +0 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +0 -99
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.js +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +0 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +0 -19
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -337
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +0 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +0 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +0 -30
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -162
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +0 -18
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +0 -12
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +0 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -131
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +0 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -30
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +0 -80
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +0 -100
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +0 -11
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +0 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +0 -21
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +0 -63
- package/src/View/AdaptableWizardView/Utilities/Utils.d.ts +0 -1
- package/src/View/AdaptableWizardView/Utilities/Utils.js +0 -21
- package/src/View/AdaptableWizardView/Utilities/helper.d.ts +0 -19
- package/src/View/AdaptableWizardView/Utilities/helper.js +0 -81
- package/src/View/AdaptableWizardView/Wizard.d.ts +0 -57
- package/src/View/AdaptableWizardView/Wizard.js +0 -98
- package/src/View/AdaptableWizardView/index.d.ts +0 -4
- package/src/View/AdaptableWizardView/index.js +0 -4
package/src/setupDevTools.js
CHANGED
|
@@ -3,6 +3,9 @@ import { ADAPTABLE_VERSION } from './EnvVars';
|
|
|
3
3
|
import { resolveVisibleSettingsPanelNavigationGroups } from './Utilities/Helpers/SettingsPanelHelper';
|
|
4
4
|
import { isTransientReduxAction } from './Redux/Store/isTransientReduxAction';
|
|
5
5
|
import { isPivotLayout } from './Utilities/Helpers/Layouts/LayoutHelper';
|
|
6
|
+
import { formatColumnInspectorPinning, formatColumnInspectorSizing, } from './View/Layout/Utilities/columnLayoutHelpers';
|
|
7
|
+
import { getVariableColor } from './Utilities/Helpers/StyleHelper';
|
|
8
|
+
import { isSummaryColorLabel, parseSummaryLabelValueString, } from './View/Wizard/SummaryColorTag';
|
|
6
9
|
import { debug } from '@infinite-table/infinite-react';
|
|
7
10
|
import { colorSchemeDark, colorSchemeLight, themeQuartz } from 'ag-grid-enterprise';
|
|
8
11
|
import { warnOnce } from './agGrid/AdaptableLogger';
|
|
@@ -192,6 +195,25 @@ function ensureDevToolsReady() {
|
|
|
192
195
|
postStateChangeMessage(adaptableId, { api: registration.api });
|
|
193
196
|
}
|
|
194
197
|
}
|
|
198
|
+
function handleGetColumnInfoMessage(payload) {
|
|
199
|
+
const adaptableId = payload?.adaptableId;
|
|
200
|
+
if (!adaptableId) {
|
|
201
|
+
console.warn('Adaptable DevTools: get-column-info message missing adaptableId');
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
try {
|
|
205
|
+
const registration = resolveRegistration(adaptableId);
|
|
206
|
+
const columnInfo = buildColumnDetail(adaptableId, registration, payload.columnId);
|
|
207
|
+
window.postMessage(buildMessageForExtension({
|
|
208
|
+
type: 'column-info',
|
|
209
|
+
adaptableId,
|
|
210
|
+
columnInfo,
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
catch (error) {
|
|
214
|
+
console.warn(error.message);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
195
217
|
function handleOpenSettingsPanelMessage(payload) {
|
|
196
218
|
const { adaptableId, moduleName } = payload ?? {};
|
|
197
219
|
if (!adaptableId) {
|
|
@@ -495,6 +517,189 @@ function buildColumns(api) {
|
|
|
495
517
|
isActionColumn: action.has(column.columnId),
|
|
496
518
|
}));
|
|
497
519
|
}
|
|
520
|
+
const COLUMN_INFO_MODULES = [
|
|
521
|
+
'Alert',
|
|
522
|
+
'CalculatedColumn',
|
|
523
|
+
'CustomSort',
|
|
524
|
+
'FormatColumn',
|
|
525
|
+
'FlashingCell',
|
|
526
|
+
'PlusMinus',
|
|
527
|
+
'Shortcut',
|
|
528
|
+
'StyledColumn',
|
|
529
|
+
];
|
|
530
|
+
function isElement(value) {
|
|
531
|
+
return Boolean(value && typeof value === 'object' && 'props' in value);
|
|
532
|
+
}
|
|
533
|
+
function collectTagParts(node, into) {
|
|
534
|
+
if (node == null || typeof node === 'boolean') {
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
if (typeof node === 'string' || typeof node === 'number') {
|
|
538
|
+
const text = String(node).trim();
|
|
539
|
+
if (text) {
|
|
540
|
+
into.texts.push(text);
|
|
541
|
+
}
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
if (Array.isArray(node)) {
|
|
545
|
+
node.forEach((child) => collectTagParts(child, into));
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
if (!isElement(node)) {
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const color = node.props?.color;
|
|
552
|
+
if (typeof color === 'string' && color && node.props?.children == null) {
|
|
553
|
+
into.color = getVariableColor(color);
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
collectTagParts(node.props?.children, into);
|
|
557
|
+
}
|
|
558
|
+
function valueToTag(value, variant, italic) {
|
|
559
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
560
|
+
const text = String(value).trim();
|
|
561
|
+
if (!text) {
|
|
562
|
+
return undefined;
|
|
563
|
+
}
|
|
564
|
+
const parsed = parseSummaryLabelValueString(text);
|
|
565
|
+
if (parsed && isSummaryColorLabel(parsed.label)) {
|
|
566
|
+
return { text: parsed.label, color: getVariableColor(parsed.value), variant, italic };
|
|
567
|
+
}
|
|
568
|
+
return { text, variant, italic };
|
|
569
|
+
}
|
|
570
|
+
const parts = { texts: [] };
|
|
571
|
+
collectTagParts(value, parts);
|
|
572
|
+
if (!parts.texts.length && !parts.color) {
|
|
573
|
+
return undefined;
|
|
574
|
+
}
|
|
575
|
+
return { text: parts.texts.join(' '), color: parts.color, variant, italic };
|
|
576
|
+
}
|
|
577
|
+
function viewItemLabel(item) {
|
|
578
|
+
if (typeof item.label === 'string' && item.label.trim()) {
|
|
579
|
+
return item.label.trim();
|
|
580
|
+
}
|
|
581
|
+
return item.name ?? '';
|
|
582
|
+
}
|
|
583
|
+
function serializeViewItems(items) {
|
|
584
|
+
const rows = [];
|
|
585
|
+
for (const item of items) {
|
|
586
|
+
const variant = item.tagVariant === 'default' ? undefined : item.tagVariant;
|
|
587
|
+
const italic = item.tagClassName?.includes('italic') ? true : undefined;
|
|
588
|
+
const tags = (item.values ?? [])
|
|
589
|
+
.map((value) => valueToTag(value, variant, italic))
|
|
590
|
+
.filter((tag) => tag != null);
|
|
591
|
+
if (!tags.length) {
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
rows.push({ label: viewItemLabel(item), tags });
|
|
595
|
+
}
|
|
596
|
+
return rows;
|
|
597
|
+
}
|
|
598
|
+
function summaryRow(key, value) {
|
|
599
|
+
if (value == null || value === '' || value === false) {
|
|
600
|
+
return undefined;
|
|
601
|
+
}
|
|
602
|
+
return { key, value: String(value) };
|
|
603
|
+
}
|
|
604
|
+
function yesNo(value) {
|
|
605
|
+
return value ? 'Yes' : 'No';
|
|
606
|
+
}
|
|
607
|
+
function buildColumnDetail(adaptableId, registration, columnId) {
|
|
608
|
+
const api = registration.api;
|
|
609
|
+
const columns = api.columnApi.getColumns();
|
|
610
|
+
const options = columns.map((column) => ({
|
|
611
|
+
id: column.columnId,
|
|
612
|
+
friendlyName: column.friendlyName,
|
|
613
|
+
}));
|
|
614
|
+
if (!columns.length) {
|
|
615
|
+
return { columnId: '', columns: [], summary: [], scopedObjects: [] };
|
|
616
|
+
}
|
|
617
|
+
const resolvedId = columnId || columns[0].columnId;
|
|
618
|
+
const column = api.columnApi.getColumnWithColumnId(resolvedId);
|
|
619
|
+
if (!column) {
|
|
620
|
+
throw new Error(`Adaptable DevTools: unknown column "${resolvedId}" on "${adaptableId}". Columns: ${options
|
|
621
|
+
.map((option) => `"${option.id}"`)
|
|
622
|
+
.join(', ')}.`);
|
|
623
|
+
}
|
|
624
|
+
const layout = api.layoutApi.getCurrentLayout();
|
|
625
|
+
const visible = new Set(api.columnApi.getVisibleColumns().map((entry) => entry.columnId));
|
|
626
|
+
const resolveDefaultWidth = (id) => registration.instance?.getDefaultColumnWidthForCol(id) ?? 0;
|
|
627
|
+
const columnFilter = api.filterApi.columnFilterApi.getColumnFilterForColumn(column.columnId);
|
|
628
|
+
const filterText = columnFilter
|
|
629
|
+
? api.filterApi.columnFilterApi.columnFilterToString(columnFilter)
|
|
630
|
+
: '';
|
|
631
|
+
const summary = [
|
|
632
|
+
summaryRow('Column Id', column.columnId),
|
|
633
|
+
summaryRow('Header', column.friendlyName),
|
|
634
|
+
summaryRow('Data Type', column.dataType),
|
|
635
|
+
summaryRow('Column Types', column.columnTypes?.join(', ')),
|
|
636
|
+
summaryRow('Primary Key Column', column.isPrimaryKey ? 'Yes' : undefined),
|
|
637
|
+
summaryRow('Calculated Column', column.isCalculatedColumn ? 'Yes' : undefined),
|
|
638
|
+
summaryRow('Free Text Column', column.isFreeTextColumn ? 'Yes' : undefined),
|
|
639
|
+
summaryRow('Action Column', column.isActionColumn ? 'Yes' : undefined),
|
|
640
|
+
summaryRow('Sparkline Column', column.isSparkline ? 'Yes' : undefined),
|
|
641
|
+
summaryRow('Column Group', column.columnGroup?.friendlyName),
|
|
642
|
+
{ key: 'Visible', value: yesNo(visible.has(column.columnId)) },
|
|
643
|
+
{ key: 'Pinning', value: formatColumnInspectorPinning(layout, column.columnId) },
|
|
644
|
+
{
|
|
645
|
+
key: 'Width',
|
|
646
|
+
value: (() => {
|
|
647
|
+
const explicit = formatColumnInspectorSizing(column.columnId, layout.ColumnSizing?.[column.columnId], resolveDefaultWidth);
|
|
648
|
+
return explicit === 'Default' ? String(resolveDefaultWidth(column.columnId)) : explicit;
|
|
649
|
+
})(),
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
key: 'Sorting',
|
|
653
|
+
value: (layout.ColumnSorts ?? []).find((sort) => sort.ColumnId === column.columnId)?.SortOrder ??
|
|
654
|
+
'None',
|
|
655
|
+
},
|
|
656
|
+
summaryRow('Row Grouped', column.groupable ? yesNo(column.isGrouped) : undefined),
|
|
657
|
+
{ key: 'Groupable', value: yesNo(column.groupable) },
|
|
658
|
+
{ key: 'Aggregatable', value: yesNo(column.aggregatable) },
|
|
659
|
+
summaryRow('Aggregation Function', column.aggregatable ? column.aggregationFunction : undefined),
|
|
660
|
+
{ key: 'Filterable', value: yesNo(column.filterable) },
|
|
661
|
+
summaryRow('Column Filter', column.filterable ? filterText : undefined),
|
|
662
|
+
{ key: 'Hideable', value: yesNo(column.hideable) },
|
|
663
|
+
{ key: 'Editable', value: yesNo(!column.readOnly) },
|
|
664
|
+
{ key: 'Moveable', value: yesNo(column.moveable) },
|
|
665
|
+
{ key: 'Pivotable', value: yesNo(column.pivotable) },
|
|
666
|
+
{ key: 'Queryable', value: yesNo(column.queryable) },
|
|
667
|
+
{ key: 'Exportable', value: yesNo(column.exportable) },
|
|
668
|
+
{ key: 'Sortable', value: yesNo(column.sortable) },
|
|
669
|
+
].filter((row) => row != null);
|
|
670
|
+
const moduleService = api.internalApi.getModuleService();
|
|
671
|
+
const scopedObjects = [];
|
|
672
|
+
for (const moduleName of COLUMN_INFO_MODULES) {
|
|
673
|
+
const module = moduleService.getModuleById(moduleName);
|
|
674
|
+
if (!module?.isModuleVisible() || !module.toViewAll) {
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
if (module.moduleInfo.ModuleName === 'CalculatedColumn' && !column.isCalculatedColumn) {
|
|
678
|
+
continue;
|
|
679
|
+
}
|
|
680
|
+
const itemsInScope = module.toViewAll().filter((item) => {
|
|
681
|
+
if ('Scope' in item.abObject) {
|
|
682
|
+
return api.columnScopeApi.isColumnInScope(column, item.abObject.Scope);
|
|
683
|
+
}
|
|
684
|
+
if ('ColumnId' in item.abObject) {
|
|
685
|
+
return item.abObject.ColumnId === column.columnId;
|
|
686
|
+
}
|
|
687
|
+
return false;
|
|
688
|
+
});
|
|
689
|
+
for (const item of itemsInScope) {
|
|
690
|
+
const rows = serializeViewItems(item.items);
|
|
691
|
+
if (rows.length) {
|
|
692
|
+
scopedObjects.push({ module: module.moduleInfo.FriendlyName, rows });
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
return {
|
|
697
|
+
columnId: column.columnId,
|
|
698
|
+
columns: options,
|
|
699
|
+
summary,
|
|
700
|
+
scopedObjects,
|
|
701
|
+
};
|
|
702
|
+
}
|
|
498
703
|
function buildGridInfo(adaptableId, api) {
|
|
499
704
|
const { licenseKey, userName, primaryKey } = buildInstanceSummary(api);
|
|
500
705
|
const currentLayout = api.layoutApi.getCurrentLayout();
|
|
@@ -557,6 +762,7 @@ Omit adaptableId when one instance is mounted.
|
|
|
557
762
|
getState(id?, section?) -> full AdapTable State, or one section such as 'Layout' or 'FormatColumn'
|
|
558
763
|
getPersistentState(id?) -> the user state AdapTable persists; pass it to the MCP check_state / migrate_state tools
|
|
559
764
|
getColumns(id?) -> [{ id, friendlyName, dataType, visible, ... }]; { id, dataType } is the MCP "columns" input
|
|
765
|
+
getColumnInfo(id?, columnId?) -> read-only Column Info: summary and Settings Panel tags for objects scoped to that column
|
|
560
766
|
getLogs(id?, { level?, channel?, limit? }) -> recent AdapTable log messages, buffered without localStorage.debug
|
|
561
767
|
getRecentActions(id?, limit?) -> recent state-changing actions
|
|
562
768
|
restoreState(id, state) -> Promise; restores a snapshot from getState()/getPersistentState()
|
|
@@ -600,6 +806,11 @@ function createDevToolsGlobal() {
|
|
|
600
806
|
const { api } = resolveRegistration(adaptableId);
|
|
601
807
|
return serializeForPostMessage(buildColumns(api));
|
|
602
808
|
},
|
|
809
|
+
getColumnInfo(adaptableId, columnId) {
|
|
810
|
+
const registration = resolveRegistration(adaptableId);
|
|
811
|
+
const id = adaptableId ?? registration.api.optionsApi.getAdaptableId();
|
|
812
|
+
return serializeForPostMessage(buildColumnDetail(id, registration, columnId));
|
|
813
|
+
},
|
|
603
814
|
getGridInfo(adaptableId) {
|
|
604
815
|
const registration = resolveRegistration(adaptableId);
|
|
605
816
|
const id = adaptableId ?? registration.api.optionsApi.getAdaptableId();
|
|
@@ -693,6 +904,7 @@ export function listenForDevTools(adaptableInstance) {
|
|
|
693
904
|
const handlers = {
|
|
694
905
|
'restore-state': handleRestoreStateMessage,
|
|
695
906
|
'open-settings-panel': handleOpenSettingsPanelMessage,
|
|
907
|
+
'get-column-info': handleGetColumnInfoMessage,
|
|
696
908
|
'load-variant': handleLoadVariantMessage,
|
|
697
909
|
'theme-var-change': handleThemeVarChangeMessage,
|
|
698
910
|
'apply-theme': handleApplyThemeMessage,
|
|
@@ -812,6 +1024,17 @@ function buildMessageForExtension(params) {
|
|
|
812
1024
|
},
|
|
813
1025
|
};
|
|
814
1026
|
}
|
|
1027
|
+
if (type === 'column-info') {
|
|
1028
|
+
return {
|
|
1029
|
+
...messageBase,
|
|
1030
|
+
url,
|
|
1031
|
+
type,
|
|
1032
|
+
payload: {
|
|
1033
|
+
adaptableId,
|
|
1034
|
+
columnInfo: payload?.columnInfo,
|
|
1035
|
+
},
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
815
1038
|
if (type === 'state-change') {
|
|
816
1039
|
return {
|
|
817
1040
|
...messageBase,
|
package/src/types.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ export type { ExpressionCategory, OfficialExpressionCategory, ExpressionReturnTy
|
|
|
3
3
|
export { isAST_Function, getExpressionArgColumnId, EXPRESSION_CATEGORIES, EXPRESSION_RETURN_TYPES, } from "../vendor/aql/index.js";
|
|
4
4
|
export type { AdaptableLogger } from './../src/agGrid/AdaptableLogger';
|
|
5
5
|
export type { AgGridConfig } from './AdaptableInterfaces/IAdaptable';
|
|
6
|
-
export type { AdaptableConfig } from './View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig';
|
|
7
|
-
export type { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard, } from './AdaptableInterfaces/AdaptableNoCodeWizard';
|
|
8
6
|
export type { ScalarFunctionName, AggregationCallableName as AggregatedScalarFunctionName, } from "../vendor/aql/index.js";
|
|
9
7
|
export type { AdaptableOptions } from './AdaptableOptions/AdaptableOptions';
|
|
10
8
|
export { AdaptablePlugin } from './AdaptableOptions/AdaptablePlugin';
|