@adaptabletools/adaptable 22.0.0-canary.1 → 22.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 +55 -37
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/FormatColumnState.d.ts +0 -8
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -0
- package/src/Api/Implementation/ApiBase.js +1 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +1 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
- package/src/Api/Implementation/DataImportApiImpl.js +1 -0
- package/src/Api/Implementation/DataSetApiImpl.js +1 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +16 -14
- package/src/Api/Implementation/ExportApiImpl.js +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
- package/src/Api/Implementation/GridApiImpl.js +17 -16
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +1 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +1 -0
- package/src/Api/Implementation/NoteApiImpl.js +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -1
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
- package/src/Redux/Store/AdaptableStore.js +49 -43
- package/src/Strategy/AdaptableModuleBase.js +4 -0
- package/src/Strategy/AlertModule.js +1 -0
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +1 -0
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/LayoutModule.js +2 -1
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +1 -0
- package/src/Strategy/ShortcutModule.js +2 -0
- package/src/Strategy/TeamSharingModule.js +10 -10
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +3 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/MenuItem.js +18 -0
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
- package/src/Utilities/Services/AlertService.js +6 -4
- package/src/Utilities/Services/AnnotationsService.js +4 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
- package/src/Utilities/Services/ChartingService.js +1 -0
- package/src/Utilities/Services/DataService.js +10 -2
- package/src/Utilities/Services/Fdc3Service.js +5 -3
- package/src/Utilities/Services/FlashingCellService.js +5 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +4 -3
- package/src/Utilities/Services/QueryLanguageService.js +6 -5
- package/src/Utilities/Services/RowFormService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +10 -7
- package/src/Utilities/Services/TeamSharingService.js +3 -1
- package/src/Utilities/Services/ThemeService.js +11 -9
- package/src/Utilities/Services/ValidationService.js +1 -0
- package/src/Utilities/createAgStatusPanelComponent.js +3 -0
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +24 -11
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +8 -8
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +16 -17
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
- package/src/View/Components/ExpressionWizard.js +5 -5
- package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
- package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.js +20 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/CustomSort/CustomSortSummary.js +13 -13
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FormatColumn/FormatColumnSummary.js +13 -13
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -23
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +13 -13
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
- package/src/View/Theme/ThemePopup.js +13 -16
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +15 -0
- package/src/agGrid/Adaptable.js +4 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +104 -38
- package/src/agGrid/AdaptableFilterHandler.js +4 -0
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +10 -0
- package/src/agGrid/AgGridAdapter.js +11 -1
- package/src/agGrid/AgGridColumnAdapter.js +5 -18
- package/src/agGrid/AgGridExportAdapter.js +10 -9
- package/src/agGrid/AgGridFilterAdapter.js +4 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.js +3 -0
- package/src/agGrid/AgGridMenuAdapter.js +1 -0
- package/src/agGrid/AgGridModulesAdapter.js +2 -1
- package/src/agGrid/AgGridOptionsService.js +3 -0
- package/src/agGrid/AgGridThemeAdapter.js +2 -0
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/components/overlayBaseZIndex.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +17 -14
- package/src/devTools/index.js +54 -53
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +11 -11
- package/src/layout-manager/src/LMLogger.js +7 -0
- package/src/layout-manager/src/index.js +56 -51
- package/src/metamodel/adaptable.metamodel.d.ts +66 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +5 -0
- package/src/migration/VersionUpgrade.js +1 -0
- package/src/migration/VersionUpgrade17.js +1 -2
- package/src/migration/VersionUpgrade22.d.ts +6 -0
- package/src/migration/VersionUpgrade22.js +27 -0
- package/src/parser/src/ExpressionEvaluationError.js +1 -0
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -3,6 +3,7 @@ import { iconToString } from '../components/icons';
|
|
|
3
3
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
4
4
|
import { MENU_SEPARATOR } from '../Utilities/Constants/GeneralConstants';
|
|
5
5
|
export class AgGridMenuAdapter {
|
|
6
|
+
_adaptableInstance;
|
|
6
7
|
constructor(_adaptableInstance) {
|
|
7
8
|
this._adaptableInstance = _adaptableInstance;
|
|
8
9
|
}
|
|
@@ -2,9 +2,10 @@ import { AdaptableLogger } from '.';
|
|
|
2
2
|
import { AllEnterpriseModule } from 'ag-grid-enterprise';
|
|
3
3
|
export const AG_GRID_VERSION = AllEnterpriseModule.version;
|
|
4
4
|
export class AgGridModulesAdapter {
|
|
5
|
+
adaptableInstance;
|
|
6
|
+
allAgGridModules = new Set();
|
|
5
7
|
constructor(adaptableInstance) {
|
|
6
8
|
this.adaptableInstance = adaptableInstance;
|
|
7
|
-
this.allAgGridModules = new Set();
|
|
8
9
|
this.allAgGridModules = this.extractAgGridModuleNames(AllEnterpriseModule);
|
|
9
10
|
}
|
|
10
11
|
destroy() {
|
|
@@ -97,6 +97,11 @@ export const ReactActionColumnRenderer = (props) => {
|
|
|
97
97
|
React.createElement(ActionButtons, { buttons: actionButtons, adaptableApi: adaptable.api, context: buttonContext, rerender: rerender })));
|
|
98
98
|
};
|
|
99
99
|
export class ActionColumnRenderer {
|
|
100
|
+
eGui;
|
|
101
|
+
eventListener;
|
|
102
|
+
unmountReactRoot;
|
|
103
|
+
layoutSwitchUnsubscribe;
|
|
104
|
+
actionButtons;
|
|
100
105
|
// gets called once before the renderer is used
|
|
101
106
|
init(params) {
|
|
102
107
|
const adaptable = params.context.__adaptable;
|
|
@@ -3,6 +3,8 @@ import { renderWithAdaptableContext } from '../../View/renderWithAdaptableContex
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
5
5
|
return class BadgetRenderer {
|
|
6
|
+
eGui;
|
|
7
|
+
unmountReactRoot;
|
|
6
8
|
getAdaptableInstance(params) {
|
|
7
9
|
const adaptable = params.context.__adaptable;
|
|
8
10
|
return adaptable;
|
|
@@ -5,6 +5,7 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
return class PercentBarRenderer {
|
|
8
|
+
eGui;
|
|
8
9
|
init(params) {
|
|
9
10
|
const min = api.styledColumnApi.internalApi.getNumericStyleMinValue(styledColumn, abColumn, params.node, params.value);
|
|
10
11
|
const max = api.styledColumnApi.internalApi.getNumericStyleMaxValue(styledColumn, abColumn, params.node, params.value);
|
|
@@ -94,9 +94,12 @@ export const AdaptableReactDateEditor = forwardRef((props, ref) => {
|
|
|
94
94
|
* We strongly recommend you specify a `colDef.valueParser` function
|
|
95
95
|
*/
|
|
96
96
|
export class AdaptableDateEditor {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
value;
|
|
98
|
+
el;
|
|
99
|
+
params;
|
|
100
|
+
editor;
|
|
101
|
+
unmountReactRoot;
|
|
102
|
+
valueParser = defaultDateValueParser;
|
|
100
103
|
init(params) {
|
|
101
104
|
this.value = getStartValue(params);
|
|
102
105
|
const { valueParser } = params.column.getColDef();
|
|
@@ -81,18 +81,13 @@ AdaptableReactNumberEditor.displayName = 'AdaptableReactNumberEditor';
|
|
|
81
81
|
* Number Editor provided by AdapTable and used by default for all `number` columns
|
|
82
82
|
*/
|
|
83
83
|
export class AdaptableNumberEditor {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
newValue: value,
|
|
92
|
-
})
|
|
93
|
-
: value;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
84
|
+
value;
|
|
85
|
+
columnId;
|
|
86
|
+
el;
|
|
87
|
+
params;
|
|
88
|
+
editor;
|
|
89
|
+
valueParser = defaultValueParser;
|
|
90
|
+
unmountReactRoot;
|
|
96
91
|
init(params) {
|
|
97
92
|
this.value = getStartValue(params);
|
|
98
93
|
this.params = params;
|
|
@@ -143,4 +138,13 @@ export class AdaptableNumberEditor {
|
|
|
143
138
|
destroy() {
|
|
144
139
|
this.unmountReactRoot?.();
|
|
145
140
|
}
|
|
141
|
+
onValueChange = (value) => {
|
|
142
|
+
this.value = this.valueParser
|
|
143
|
+
? this.valueParser({
|
|
144
|
+
...this.params,
|
|
145
|
+
oldValue: this.params.value,
|
|
146
|
+
newValue: value,
|
|
147
|
+
})
|
|
148
|
+
: value;
|
|
149
|
+
};
|
|
146
150
|
}
|
|
@@ -65,19 +65,13 @@ AdaptableReactPercentageEditor.displayName = 'AdaptableReactPercentageEditor';
|
|
|
65
65
|
* Used to edit percentage columns as percentages (similar to how its done in Excel)
|
|
66
66
|
*/
|
|
67
67
|
export class AdaptablePercentageEditor {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
newValue: value,
|
|
76
|
-
})
|
|
77
|
-
: value;
|
|
78
|
-
this.value = NumberExtensions.divideBy100(newValue);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
68
|
+
value;
|
|
69
|
+
columnId;
|
|
70
|
+
el;
|
|
71
|
+
params;
|
|
72
|
+
editor;
|
|
73
|
+
valueParser = defaultValueParser;
|
|
74
|
+
unmountReactRoot;
|
|
81
75
|
init(params) {
|
|
82
76
|
this.value = getStartValue(params);
|
|
83
77
|
this.params = params;
|
|
@@ -128,4 +122,14 @@ export class AdaptablePercentageEditor {
|
|
|
128
122
|
destroy() {
|
|
129
123
|
this.unmountReactRoot?.();
|
|
130
124
|
}
|
|
125
|
+
onValueChange = (value) => {
|
|
126
|
+
const newValue = this.valueParser
|
|
127
|
+
? this.valueParser({
|
|
128
|
+
...this.params,
|
|
129
|
+
oldValue: this.params.value,
|
|
130
|
+
newValue: value,
|
|
131
|
+
})
|
|
132
|
+
: value;
|
|
133
|
+
this.value = NumberExtensions.divideBy100(newValue);
|
|
134
|
+
};
|
|
131
135
|
}
|
package/src/agGrid/index.d.ts
CHANGED
|
@@ -2,5 +2,11 @@ import { Adaptable, AdaptableNoCodeWizard as ABWizard } from './Adaptable';
|
|
|
2
2
|
import { AdaptableLogger as ABLogger } from './AdaptableLogger';
|
|
3
3
|
export { default as AdaptableWizardView } from '../View/AdaptableWizardView';
|
|
4
4
|
export default Adaptable;
|
|
5
|
+
/**
|
|
6
|
+
* AdapTable's No Code Wizard
|
|
7
|
+
*/
|
|
5
8
|
export declare const AdaptableNoCodeWizard: typeof ABWizard;
|
|
9
|
+
/**
|
|
10
|
+
* AdapTable's Logger
|
|
11
|
+
*/
|
|
6
12
|
export declare const AdaptableLogger: typeof ABLogger;
|
package/src/agGrid/index.js
CHANGED
|
@@ -4,5 +4,11 @@ AdaptableNoCodeWizard as ABWizard, } from './Adaptable';
|
|
|
4
4
|
import { AdaptableLogger as ABLogger } from './AdaptableLogger';
|
|
5
5
|
export { default as AdaptableWizardView } from '../View/AdaptableWizardView';
|
|
6
6
|
export default Adaptable;
|
|
7
|
+
/**
|
|
8
|
+
* AdapTable's No Code Wizard
|
|
9
|
+
*/
|
|
7
10
|
export const AdaptableNoCodeWizard = ABWizard;
|
|
11
|
+
/**
|
|
12
|
+
* AdapTable's Logger
|
|
13
|
+
*/
|
|
8
14
|
export const AdaptableLogger = ABLogger;
|
|
@@ -8,5 +8,5 @@ export function DashboardToolbar(props) {
|
|
|
8
8
|
React.createElement(Flex, { className: "ab-Dashboard__toolbar-title twa:items-center twa:justify-center twa:px-2 twa:pb-1 twa:opacity-70", flexDirection: "row" },
|
|
9
9
|
React.createElement("span", { className: "twa:text-2" }, props.title),
|
|
10
10
|
props.showConfigure && (React.createElement(SimpleButton, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
|
|
11
|
-
props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
|
|
11
|
+
props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose?.() })))));
|
|
12
12
|
}
|
|
@@ -112,7 +112,7 @@ export const Datepicker = React.forwardRef((props, ref) => {
|
|
|
112
112
|
}, accessLevel: 'Full' })) : null;
|
|
113
113
|
const calendarButton = (React.createElement(SimpleButton, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, className: "twa:p-0", onClick: () => setVisible(true) }));
|
|
114
114
|
const overlayDOMRef = useRef(null);
|
|
115
|
-
return (React.createElement(Flex,
|
|
115
|
+
return (React.createElement(Flex, { className: "twa:flex-1" },
|
|
116
116
|
React.createElement(OverlayTrigger, { visible: visible, render: () => (React.createElement(DatepickerOverlay, { overlayDOMRef: overlayDOMRef, onMouseDown: props.onMouseDown, onHide: () => setVisible(false), onKeyDown: (e) => {
|
|
117
117
|
if (e.key === 'Escape' || e.key === 'Enter') {
|
|
118
118
|
setVisible(false, e.key);
|
|
@@ -3,7 +3,6 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { BaseEditorInput } from './BaseEditorInput';
|
|
4
4
|
import { editorButtonsSearch } from './editorButtonsSearch';
|
|
5
5
|
import { useExpressionEditor } from './EditorContext';
|
|
6
|
-
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
7
6
|
import { editorButtonsAggregatedScalar } from './editorButtonsAggregatedScalar';
|
|
8
7
|
import { cumulativeAggregatedExpressionFunctions, quantileAggregatedExpressionFunctions, } from '../../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
9
8
|
import { editorButtonsCumulativeAggregatedScalar } from './editorButtonsCumulativeAggregatedScalar';
|
|
@@ -49,8 +48,25 @@ function EditorInput(props) {
|
|
|
49
48
|
};
|
|
50
49
|
}, [props.type]);
|
|
51
50
|
const { setSelectedFunction } = useExpressionEditor();
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
let queryName;
|
|
52
|
+
switch (props.type) {
|
|
53
|
+
case 'boolean':
|
|
54
|
+
queryName = 'Create an Expression that returns true / false';
|
|
55
|
+
break;
|
|
56
|
+
case 'scalar':
|
|
57
|
+
queryName = "Create an Expression that returns a single value of any type";
|
|
58
|
+
break;
|
|
59
|
+
case 'aggregatedScalar':
|
|
60
|
+
queryName = "Create an Expression that evaluates multiple rows and returns a value of any type";
|
|
61
|
+
break;
|
|
62
|
+
case 'cumulativeAggregatedScalar':
|
|
63
|
+
queryName = "Create a Cumulative Expression";
|
|
64
|
+
break;
|
|
65
|
+
case 'quantileAggregatedScalar':
|
|
66
|
+
queryName = "Create a Quantile Expression";
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
return (React.createElement(BaseEditorInput, { type: 'main', value: props.value, placeholder: queryName, onChange: props.onChange, onSelectedFunctionChange: setSelectedFunction, expressionFunctions: expressionFunctions, editorButtons: props.type === 'aggregatedScalar'
|
|
54
70
|
? editorButtonsAggregatedScalar
|
|
55
71
|
: props.type === 'cumulativeAggregatedScalar'
|
|
56
72
|
? editorButtonsCumulativeAggregatedScalar
|
|
@@ -249,7 +249,7 @@ export function TreeDropdown(props) {
|
|
|
249
249
|
} }, children));
|
|
250
250
|
} },
|
|
251
251
|
React.createElement(FieldWrap, { style: props.fieldStyle, className: "twa:w-full" },
|
|
252
|
-
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", placeholder: props.placeholder ?? 'Select a value', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
252
|
+
React.createElement(Input, { type: "text", readOnly: true, "data-name": "Select Values", "aria-expanded": visible, placeholder: props.placeholder ?? 'Select a value', className: `twa:w-full ${props.clearable ? 'twa:pr-0' : ''}`, value: props.toDisplayValue ? props.toDisplayValue(value) : toDisplayValueDefault(value), onFocus: () => {
|
|
253
253
|
if (!visible) {
|
|
254
254
|
setVisible(true);
|
|
255
255
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const OVERLAY_BASE_Z_INDEX =
|
|
1
|
+
export const OVERLAY_BASE_Z_INDEX = 9_999_999;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { useCallback, useRef } from 'react';
|
|
2
2
|
class SectionSelector {
|
|
3
|
+
scrollTop = 0;
|
|
4
|
+
node;
|
|
5
|
+
boxHeight;
|
|
6
|
+
childrenHeights = [];
|
|
7
|
+
maxScrollTop;
|
|
3
8
|
constructor(node) {
|
|
4
|
-
this.scrollTop = 0;
|
|
5
|
-
this.childrenHeights = [];
|
|
6
|
-
this.select = (scrollTop) => {
|
|
7
|
-
this.refreshFromDOM();
|
|
8
|
-
const relativeCurrentHeight = (scrollTop * this.boxHeight) / this.maxScrollTop;
|
|
9
|
-
let heightSum = 0;
|
|
10
|
-
for (let i = 0, len = this.childrenHeights.length; i < len; i++) {
|
|
11
|
-
heightSum += this.childrenHeights[i];
|
|
12
|
-
if (heightSum > relativeCurrentHeight) {
|
|
13
|
-
return i;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return this.childrenHeights.length - 1;
|
|
17
|
-
};
|
|
18
9
|
this.node = node;
|
|
19
10
|
this.refreshFromDOM();
|
|
20
11
|
}
|
|
@@ -33,6 +24,18 @@ class SectionSelector {
|
|
|
33
24
|
height,
|
|
34
25
|
};
|
|
35
26
|
}
|
|
27
|
+
select = (scrollTop) => {
|
|
28
|
+
this.refreshFromDOM();
|
|
29
|
+
const relativeCurrentHeight = (scrollTop * this.boxHeight) / this.maxScrollTop;
|
|
30
|
+
let heightSum = 0;
|
|
31
|
+
for (let i = 0, len = this.childrenHeights.length; i < len; i++) {
|
|
32
|
+
heightSum += this.childrenHeights[i];
|
|
33
|
+
if (heightSum > relativeCurrentHeight) {
|
|
34
|
+
return i;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return this.childrenHeights.length - 1;
|
|
38
|
+
};
|
|
36
39
|
}
|
|
37
40
|
export const useContainerScrollObserver = (callback) => {
|
|
38
41
|
const containerNodeRef = useRef(null);
|
package/src/devTools/index.js
CHANGED
|
@@ -22,66 +22,32 @@ function getColor(identifier) {
|
|
|
22
22
|
return color;
|
|
23
23
|
}
|
|
24
24
|
export class DevToolsMarker {
|
|
25
|
+
adaptableId;
|
|
25
26
|
static create(adaptableId) {
|
|
26
27
|
return new DevToolsMarker(adaptableId);
|
|
27
28
|
}
|
|
29
|
+
markerDetails = {
|
|
30
|
+
label: '',
|
|
31
|
+
track: '',
|
|
32
|
+
trackGroup: undefined,
|
|
33
|
+
color: undefined,
|
|
34
|
+
details: [],
|
|
35
|
+
tooltip: undefined,
|
|
36
|
+
};
|
|
37
|
+
stopped = false;
|
|
28
38
|
constructor(adaptableId) {
|
|
29
39
|
this.adaptableId = adaptableId;
|
|
30
|
-
this.markerDetails = {
|
|
31
|
-
label: '',
|
|
32
|
-
track: '',
|
|
33
|
-
trackGroup: undefined,
|
|
34
|
-
color: undefined,
|
|
35
|
-
details: [],
|
|
36
|
-
tooltip: undefined,
|
|
37
|
-
};
|
|
38
|
-
this.stopped = false;
|
|
39
|
-
this.start = (startDetails) => {
|
|
40
|
-
if (this.markerDetails.startTs) {
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
const start = performance.now();
|
|
44
|
-
this.markerDetails.details = startDetails?.details ?? [];
|
|
45
|
-
this.markerDetails.startTs = start;
|
|
46
|
-
return this;
|
|
47
|
-
};
|
|
48
|
-
this.end = (markerDetails = {}) => {
|
|
49
|
-
if (this.stopped) {
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
this.stopped = true;
|
|
53
|
-
const start = markerDetails.startTs ?? this.markerDetails.startTs;
|
|
54
|
-
const end = markerDetails.endTs ?? this.markerDetails.endTs ?? performance.now();
|
|
55
|
-
let color = markerDetails.color || this.markerDetails.color || '';
|
|
56
|
-
const trackGroup = markerDetails.trackGroup ||
|
|
57
|
-
this.markerDetails.trackGroup ||
|
|
58
|
-
`AdapTable (${this.adaptableId})`;
|
|
59
|
-
const details = [...(this.markerDetails.details || []), ...(markerDetails.details || [])];
|
|
60
|
-
const tooltip = markerDetails.tooltip || this.markerDetails.tooltip;
|
|
61
|
-
const label = markerDetails.label || this.markerDetails.label || 'Unknown';
|
|
62
|
-
const track = markerDetails.track || this.markerDetails.track || 'Unknown';
|
|
63
|
-
if (!color) {
|
|
64
|
-
const identifier = `${trackGroup}:${track}:${label}`;
|
|
65
|
-
color = getColor(identifier);
|
|
66
|
-
}
|
|
67
|
-
performance.measure(label, {
|
|
68
|
-
start,
|
|
69
|
-
end,
|
|
70
|
-
detail: {
|
|
71
|
-
devtools: {
|
|
72
|
-
dataType: 'track-entry',
|
|
73
|
-
trackGroup,
|
|
74
|
-
track,
|
|
75
|
-
color: color || 'primary',
|
|
76
|
-
properties: details.length > 0 ? details.map((detail) => [detail.name, detail.value]) : undefined,
|
|
77
|
-
tooltipText: tooltip,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
return this;
|
|
82
|
-
};
|
|
83
40
|
this.adaptableId = adaptableId;
|
|
84
41
|
}
|
|
42
|
+
start = (startDetails) => {
|
|
43
|
+
if (this.markerDetails.startTs) {
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
const start = performance.now();
|
|
47
|
+
this.markerDetails.details = startDetails?.details ?? [];
|
|
48
|
+
this.markerDetails.startTs = start;
|
|
49
|
+
return this;
|
|
50
|
+
};
|
|
85
51
|
get startTimestamp() {
|
|
86
52
|
return this.markerDetails.startTs;
|
|
87
53
|
}
|
|
@@ -131,6 +97,41 @@ export class DevToolsMarker {
|
|
|
131
97
|
return acc;
|
|
132
98
|
}, {});
|
|
133
99
|
}
|
|
100
|
+
end = (markerDetails = {}) => {
|
|
101
|
+
if (this.stopped) {
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
this.stopped = true;
|
|
105
|
+
const start = markerDetails.startTs ?? this.markerDetails.startTs;
|
|
106
|
+
const end = markerDetails.endTs ?? this.markerDetails.endTs ?? performance.now();
|
|
107
|
+
let color = markerDetails.color || this.markerDetails.color || '';
|
|
108
|
+
const trackGroup = markerDetails.trackGroup ||
|
|
109
|
+
this.markerDetails.trackGroup ||
|
|
110
|
+
`AdapTable (${this.adaptableId})`;
|
|
111
|
+
const details = [...(this.markerDetails.details || []), ...(markerDetails.details || [])];
|
|
112
|
+
const tooltip = markerDetails.tooltip || this.markerDetails.tooltip;
|
|
113
|
+
const label = markerDetails.label || this.markerDetails.label || 'Unknown';
|
|
114
|
+
const track = markerDetails.track || this.markerDetails.track || 'Unknown';
|
|
115
|
+
if (!color) {
|
|
116
|
+
const identifier = `${trackGroup}:${track}:${label}`;
|
|
117
|
+
color = getColor(identifier);
|
|
118
|
+
}
|
|
119
|
+
performance.measure(label, {
|
|
120
|
+
start,
|
|
121
|
+
end,
|
|
122
|
+
detail: {
|
|
123
|
+
devtools: {
|
|
124
|
+
dataType: 'track-entry',
|
|
125
|
+
trackGroup,
|
|
126
|
+
track,
|
|
127
|
+
color: color || 'primary',
|
|
128
|
+
properties: details.length > 0 ? details.map((detail) => [detail.name, detail.value]) : undefined,
|
|
129
|
+
tooltipText: tooltip,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
return this;
|
|
134
|
+
};
|
|
134
135
|
}
|
|
135
136
|
export function areAdaptableProfileTracksEnabled(adaptableId) {
|
|
136
137
|
const trakcsSupported = typeof performance !== 'undefined' &&
|
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: 1770107045244 || Date.now(),
|
|
4
|
+
VERSION: "22.0.0-canary.3" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -2,20 +2,20 @@ import { LMLogger } from './LMLogger';
|
|
|
2
2
|
function x(a, b) { }
|
|
3
3
|
const xtype = [1, '2'];
|
|
4
4
|
export class LMEmitter extends LMLogger {
|
|
5
|
+
destroyed = false;
|
|
6
|
+
suspended = false;
|
|
5
7
|
constructor(options) {
|
|
6
8
|
super(options);
|
|
7
|
-
this.destroyed = false;
|
|
8
|
-
this.suspended = false;
|
|
9
|
-
/**
|
|
10
|
-
* For each supported event, we have a Set that holds all the callbacks that should be executed
|
|
11
|
-
* when the event is triggered.
|
|
12
|
-
*/
|
|
13
|
-
this.eventSets = {
|
|
14
|
-
gridLayoutChanged: new Set(),
|
|
15
|
-
columnDefsChanged: new Set(),
|
|
16
|
-
rowModelUpdated: new Set(),
|
|
17
|
-
};
|
|
18
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* For each supported event, we have a Set that holds all the callbacks that should be executed
|
|
12
|
+
* when the event is triggered.
|
|
13
|
+
*/
|
|
14
|
+
eventSets = {
|
|
15
|
+
gridLayoutChanged: new Set(),
|
|
16
|
+
columnDefsChanged: new Set(),
|
|
17
|
+
rowModelUpdated: new Set(),
|
|
18
|
+
};
|
|
19
19
|
on(event, callback) {
|
|
20
20
|
this.eventSets[event].add(callback);
|
|
21
21
|
return () => {
|
|
@@ -4,6 +4,13 @@ const performanceTime = (previousTime) => {
|
|
|
4
4
|
return Math.round(previousTime ? now - previousTime : now);
|
|
5
5
|
};
|
|
6
6
|
export class LMLogger {
|
|
7
|
+
debugger;
|
|
8
|
+
infoLogger;
|
|
9
|
+
successLogger;
|
|
10
|
+
warnLogger;
|
|
11
|
+
errorLogger;
|
|
12
|
+
perfLogger;
|
|
13
|
+
debugId;
|
|
7
14
|
constructor(options) {
|
|
8
15
|
this.debugId = options.debugId;
|
|
9
16
|
this.debugger = debugFactory(this.debugId ? `LayoutManager:${this.debugId}` : 'LayoutManager');
|
|
@@ -139,59 +139,20 @@ function getDefaultColumnSizeStateForColDef(colId, colDef, options) {
|
|
|
139
139
|
return undefined;
|
|
140
140
|
}
|
|
141
141
|
export class LayoutManager extends LMEmitter {
|
|
142
|
+
gridApi;
|
|
143
|
+
fieldsToIds = {};
|
|
144
|
+
idsToFields = {};
|
|
145
|
+
idsToColDefs = {};
|
|
146
|
+
initialColumnWidths = {};
|
|
147
|
+
currentLayout = null;
|
|
148
|
+
layoutChangeDebounce;
|
|
149
|
+
_prevFiredLayout;
|
|
150
|
+
setGridOption_default;
|
|
151
|
+
suppressGlobalAgGridEventListener = false;
|
|
152
|
+
supressGlobalAgGridEventTimeoutId = null;
|
|
153
|
+
layoutManagerDebugId;
|
|
142
154
|
constructor(options) {
|
|
143
155
|
super({ debugId: options.debugId });
|
|
144
|
-
this.fieldsToIds = {};
|
|
145
|
-
this.idsToFields = {};
|
|
146
|
-
this.idsToColDefs = {};
|
|
147
|
-
this.initialColumnWidths = {};
|
|
148
|
-
this.currentLayout = null;
|
|
149
|
-
this.suppressGlobalAgGridEventListener = false;
|
|
150
|
-
this.supressGlobalAgGridEventTimeoutId = null;
|
|
151
|
-
this.globalAgGridEventListener = (type, event) => {
|
|
152
|
-
if (this.destroyed || this.suppressGlobalAgGridEventListener) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
if (type in COLUMN_EVENTS_THAT_TRIGGERS_AUTO_LAYOUT_SAVE) {
|
|
156
|
-
if (type === 'columnResized' && !event.finished) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
// called while dragging a column from the sidebar, to the row groups panel
|
|
160
|
-
if (type === 'displayedColumnsChanged' && event.source === 'uiColumnDragged') {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
this.warn(`globalAgGridEventListener-${type}`, event);
|
|
164
|
-
if (!this.currentLayout) {
|
|
165
|
-
const gridLayout = this.getLayoutModelFromGrid();
|
|
166
|
-
// if there's no layout set currently in AG Grid
|
|
167
|
-
// then emit the gridLayoutChanged event directly
|
|
168
|
-
// as we don't have a current layout to compare to
|
|
169
|
-
this.onGridLayoutChanged(gridLayout);
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const gridLayout = this.getLayoutModelFromGrid();
|
|
173
|
-
// but if we do have a current layout set
|
|
174
|
-
// then only emit the event if the layout has changed
|
|
175
|
-
if (!isGridLayoutSame({
|
|
176
|
-
layoutFromGrid: gridLayout,
|
|
177
|
-
layoutFromModel: this.currentLayout,
|
|
178
|
-
})) {
|
|
179
|
-
this.onGridLayoutChanged(gridLayout);
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
this.columnDefsChanged = (colDefs) => {
|
|
185
|
-
if (this.suppressGlobalAgGridEventListener) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
this.warn('onColumnDefsChanged');
|
|
189
|
-
this.indexColumns();
|
|
190
|
-
if (this.currentLayout) {
|
|
191
|
-
this.applyLayout(this.currentLayout);
|
|
192
|
-
}
|
|
193
|
-
this.emitSync('columnDefsChanged', colDefs);
|
|
194
|
-
};
|
|
195
156
|
this.layoutChangeDebounce = options.layoutChangeDebounce ?? 0;
|
|
196
157
|
if (this.layoutChangeDebounce) {
|
|
197
158
|
this.onGridLayoutChanged = debounce(this.onGridLayoutChanged, {
|
|
@@ -246,6 +207,50 @@ export class LayoutManager extends LMEmitter {
|
|
|
246
207
|
};
|
|
247
208
|
this.gridApi.setGridOption = setGridOption;
|
|
248
209
|
}
|
|
210
|
+
globalAgGridEventListener = (type, event) => {
|
|
211
|
+
if (this.destroyed || this.suppressGlobalAgGridEventListener) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if (type in COLUMN_EVENTS_THAT_TRIGGERS_AUTO_LAYOUT_SAVE) {
|
|
215
|
+
if (type === 'columnResized' && !event.finished) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
// called while dragging a column from the sidebar, to the row groups panel
|
|
219
|
+
if (type === 'displayedColumnsChanged' && event.source === 'uiColumnDragged') {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
this.warn(`globalAgGridEventListener-${type}`, event);
|
|
223
|
+
if (!this.currentLayout) {
|
|
224
|
+
const gridLayout = this.getLayoutModelFromGrid();
|
|
225
|
+
// if there's no layout set currently in AG Grid
|
|
226
|
+
// then emit the gridLayoutChanged event directly
|
|
227
|
+
// as we don't have a current layout to compare to
|
|
228
|
+
this.onGridLayoutChanged(gridLayout);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const gridLayout = this.getLayoutModelFromGrid();
|
|
232
|
+
// but if we do have a current layout set
|
|
233
|
+
// then only emit the event if the layout has changed
|
|
234
|
+
if (!isGridLayoutSame({
|
|
235
|
+
layoutFromGrid: gridLayout,
|
|
236
|
+
layoutFromModel: this.currentLayout,
|
|
237
|
+
})) {
|
|
238
|
+
this.onGridLayoutChanged(gridLayout);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
columnDefsChanged = (colDefs) => {
|
|
244
|
+
if (this.suppressGlobalAgGridEventListener) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
this.warn('onColumnDefsChanged');
|
|
248
|
+
this.indexColumns();
|
|
249
|
+
if (this.currentLayout) {
|
|
250
|
+
this.applyLayout(this.currentLayout);
|
|
251
|
+
}
|
|
252
|
+
this.emitSync('columnDefsChanged', colDefs);
|
|
253
|
+
};
|
|
249
254
|
indexColumns() {
|
|
250
255
|
const colDefs = this.gridApi.getColumnDefs();
|
|
251
256
|
this.fieldsToIds = {};
|