@adaptabletools/adaptable 11.0.0-canary.4 → 11.0.0-canary.5
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/base.css +130 -67
- package/bundle.cjs.js +86 -86
- package/index.css +130 -67
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +10 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
- package/src/AdaptableOptions/QueryLanguageOptions.d.ts +0 -4
- package/src/AdaptableOptions/StateOptions.d.ts +2 -1
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +1 -0
- package/src/Api/AlertApi.d.ts +2 -3
- package/src/Api/EventApi.d.ts +8 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +0 -12
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +15 -9
- package/src/Api/Implementation/ApiBase.d.ts +2 -0
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
- package/src/Api/Implementation/InternalApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +11 -0
- package/src/Api/Implementation/QueryApiImpl.js +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +4 -5
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/OpenFinApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +29 -0
- package/src/Api/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +2 -4
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
- package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +3 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
- package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/GridRedux.js +3 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -1
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
- package/src/Redux/Store/AdaptableStore.js +5 -4
- package/src/Strategy/AlertModule.js +4 -3
- package/src/Strategy/ConditionalStyleModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
- package/src/Strategy/FreeTextColumnModule.js +10 -0
- package/src/Strategy/LayoutModule.js +1 -6
- package/src/Strategy/ToolPanelModule.js +5 -3
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +0 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -4
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
- package/src/Utilities/Helpers/CalendarHelper.js +220 -55
- package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/DataService.js +6 -1
- package/src/Utilities/Services/QueryLanguageService.js +16 -11
- package/src/Utilities/Services/ReportService.js +6 -2
- package/src/Utilities/Services/TeamSharingService.js +5 -3
- package/src/View/AdaptablePopover/index.js +6 -1
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
- package/src/View/AdaptableWizardView/helper.js +3 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +0 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +4 -1
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +3 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +25 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
- package/src/View/Components/ScopeComponent.js +4 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +5 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +3 -1
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +7 -0
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
- package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +3 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -4
- package/src/View/Filter/FilterViewPanel.js +1 -3
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +5 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
- package/src/View/Query/ExpandedQueryPopup.js +9 -2
- package/src/View/Query/QueryViewPanel.js +3 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
- package/src/View/UIHelper.js +4 -1
- package/src/View/Wizard/AdaptableWizard.js +12 -3
- package/src/View/Wizard/OnePageAdaptableWizard.js +5 -1
- package/src/agGrid/Adaptable.d.ts +2 -3
- package/src/agGrid/Adaptable.js +96 -54
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/ApplicationIcon.d.ts +1 -0
- package/src/components/ApplicationIcon.js +2 -2
- package/src/components/Dashboard/Dashboard.js +4 -1
- package/src/components/Dropdown/index.js +8 -1
- package/src/components/ExpressionEditor/EditorInputReactive.js +3 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
- package/src/components/ExpressionEditor/index.js +9 -2
- package/src/components/SizedContainer/index.js +7 -1
- package/src/components/WindowModal/WindowModal.js +4 -1
- package/src/metamodel/adaptable.metamodel.d.ts +55 -24
- package/src/metamodel/adaptable.metamodel.js +179 -98
- package/src/types.d.ts +2 -1
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -44,7 +44,13 @@ class LayoutEditorWizard extends React.Component {
|
|
|
44
44
|
this.onLayoutChange = (layout) => {
|
|
45
45
|
layout = Object.assign(Object.assign({}, layout), { Name: this.state.layoutName });
|
|
46
46
|
this.updateLayout(layout);
|
|
47
|
-
this.setState({
|
|
47
|
+
this.setState({
|
|
48
|
+
layout,
|
|
49
|
+
errorMessage: this.getErrorMessage({
|
|
50
|
+
layout,
|
|
51
|
+
layoutName: this.state.layoutName,
|
|
52
|
+
}),
|
|
53
|
+
}, () => {
|
|
48
54
|
this.props.updateGoBackState();
|
|
49
55
|
});
|
|
50
56
|
};
|
|
@@ -33,13 +33,20 @@ class ExpandedQueryPopupComponent extends React.Component {
|
|
|
33
33
|
namedQuery: this.state.namedQuery,
|
|
34
34
|
setNamedQuery: (namedQuery) => this.setState({ namedQuery }),
|
|
35
35
|
} },
|
|
36
|
-
React.createElement(PanelWithButton_1.PanelWithButton, { headerText: "Current Query", bodyProps: {
|
|
36
|
+
React.createElement(PanelWithButton_1.PanelWithButton, { headerText: "Current Query", bodyProps: {
|
|
37
|
+
padding: 0,
|
|
38
|
+
style: { display: 'flex', flexDirection: 'column' },
|
|
39
|
+
}, glyphicon: this.props.moduleInfo.Glyph },
|
|
37
40
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: (expression) => this.setState({ expression }), initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getAllNamedQuery(), api: this.props.api }),
|
|
38
41
|
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, backgroundColor: "primary", alignItems: "center" },
|
|
39
42
|
React.createElement(SimpleButton_1.default, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
|
|
40
43
|
this.props.onClosePopup();
|
|
41
44
|
} }, "CLOSE"),
|
|
42
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, style: {
|
|
45
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, style: {
|
|
46
|
+
flex: 1,
|
|
47
|
+
color: 'var(--ab-color-error)',
|
|
48
|
+
textAlign: 'end',
|
|
49
|
+
} }, namedQueryValidationError),
|
|
43
50
|
React.createElement(SimpleButton_1.default, { variant: "raised", tone: "accent", "data-name": "action-run", margin: 1, onClick: () => {
|
|
44
51
|
if (this.state.namedQuery) {
|
|
45
52
|
this.props.onAddNamedQuery(this.state.namedQuery);
|
|
@@ -74,7 +74,9 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
74
74
|
let availableColumns = this.props.api.columnApi.getColumns().map((col) => {
|
|
75
75
|
return {
|
|
76
76
|
label: col.friendlyName,
|
|
77
|
-
onClick: () => this.setState({
|
|
77
|
+
onClick: () => this.setState({
|
|
78
|
+
expression: this.state.expression + `[${col.columnId}]`,
|
|
79
|
+
}),
|
|
78
80
|
};
|
|
79
81
|
});
|
|
80
82
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
@@ -18,8 +18,7 @@ const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
|
|
|
18
18
|
const QuickSearchPopupComponent = (props) => {
|
|
19
19
|
const [searchText, search] = useQuickSearchDebounced_1.useQuickSearchDebounced(props);
|
|
20
20
|
const [state, setState] = react_1.useState({
|
|
21
|
-
RunQueryAfterQuickSearch: props.api.internalApi.getAdaptableOptions().searchOptions
|
|
22
|
-
.filterResultsAfterQuickSearch,
|
|
21
|
+
RunQueryAfterQuickSearch: props.api.internalApi.getAdaptableOptions().searchOptions.filterResultsAfterQuickSearch,
|
|
23
22
|
EditedStyle: props.QuickSearchStyle,
|
|
24
23
|
});
|
|
25
24
|
const onUpdateStyle = (style) => {
|
|
@@ -28,7 +27,8 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
28
27
|
};
|
|
29
28
|
const onQuickSearchBehaviourChange = (checked) => {
|
|
30
29
|
setState(Object.assign(Object.assign({}, state), { RunQueryAfterQuickSearch: checked }));
|
|
31
|
-
props.api.internalApi.getAdaptableOptions().searchOptions.filterResultsAfterQuickSearch =
|
|
30
|
+
props.api.internalApi.getAdaptableOptions().searchOptions.filterResultsAfterQuickSearch =
|
|
31
|
+
checked;
|
|
32
32
|
};
|
|
33
33
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
34
34
|
React.createElement(Panel_1.default, { header: props.moduleInfo.FriendlyName + ' Text', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
|
|
@@ -64,11 +64,21 @@ exports.getScheduleSettingsValues = (data) => {
|
|
|
64
64
|
}
|
|
65
65
|
if (data.ScheduleType === Enums_1.ScheduleType.Glue42) {
|
|
66
66
|
const report = data;
|
|
67
|
-
return [
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
label: 'Report',
|
|
70
|
+
value: (report === null || report === void 0 ? void 0 : report.Glue42Report.ReportName) || 'Not Specified',
|
|
71
|
+
},
|
|
72
|
+
];
|
|
68
73
|
}
|
|
69
74
|
if (data.ScheduleType === Enums_1.ScheduleType.OpenFin) {
|
|
70
75
|
const report = data;
|
|
71
|
-
return [
|
|
76
|
+
return [
|
|
77
|
+
{
|
|
78
|
+
label: 'Report',
|
|
79
|
+
value: (report === null || report === void 0 ? void 0 : report.OpenFinReport.ReportName) || 'Not Specified',
|
|
80
|
+
},
|
|
81
|
+
];
|
|
72
82
|
}
|
|
73
83
|
return [];
|
|
74
84
|
};
|
package/src/View/UIHelper.js
CHANGED
|
@@ -133,7 +133,10 @@ function getModalContainer(adaptableOptions, document) {
|
|
|
133
133
|
let modalContainer;
|
|
134
134
|
if (adaptableOptions.containerOptions.modalContainer) {
|
|
135
135
|
// this has been set, so we use the property
|
|
136
|
-
modalContainer =
|
|
136
|
+
modalContainer =
|
|
137
|
+
typeof adaptableOptions.containerOptions.modalContainer === 'string'
|
|
138
|
+
? document.getElementById(adaptableOptions.containerOptions.modalContainer)
|
|
139
|
+
: adaptableOptions.containerOptions.modalContainer;
|
|
137
140
|
if (modalContainer) {
|
|
138
141
|
const modalContainerClassName = ' modal-container';
|
|
139
142
|
if (!modalContainer.className.includes(modalContainerClassName)) {
|
|
@@ -91,7 +91,10 @@ class AdaptableWizard extends React.Component {
|
|
|
91
91
|
let bodyElement = wizardStepInfo.Element;
|
|
92
92
|
let newElement = this.cloneWizardStep(bodyElement);
|
|
93
93
|
this.stepName = wizardStepInfo.StepName;
|
|
94
|
-
this.setState({
|
|
94
|
+
this.setState({
|
|
95
|
+
ActiveState: newElement,
|
|
96
|
+
IndexState: wizardStepInfo.Index,
|
|
97
|
+
});
|
|
95
98
|
}
|
|
96
99
|
ForceUpdateGoBackState() {
|
|
97
100
|
this.forceUpdate();
|
|
@@ -114,7 +117,10 @@ class AdaptableWizard extends React.Component {
|
|
|
114
117
|
let bodyElement = activeWizardInfo.Element;
|
|
115
118
|
let newElement = this.cloneWizardStep(bodyElement);
|
|
116
119
|
this.stepName = activeWizardInfo.StepName;
|
|
117
|
-
this.setState({
|
|
120
|
+
this.setState({
|
|
121
|
+
ActiveState: newElement,
|
|
122
|
+
IndexState: this.state.IndexState - decrement,
|
|
123
|
+
});
|
|
118
124
|
}
|
|
119
125
|
}
|
|
120
126
|
}
|
|
@@ -126,7 +132,10 @@ class AdaptableWizard extends React.Component {
|
|
|
126
132
|
let bodyElement = activeWizardInfo.Element;
|
|
127
133
|
let newElement = this.cloneWizardStep(bodyElement);
|
|
128
134
|
this.stepName = activeWizardInfo.StepName;
|
|
129
|
-
this.setState({
|
|
135
|
+
this.setState({
|
|
136
|
+
ActiveState: newElement,
|
|
137
|
+
IndexState: this.state.IndexState + increment,
|
|
138
|
+
});
|
|
130
139
|
}
|
|
131
140
|
}
|
|
132
141
|
handleClickFinish() {
|
|
@@ -191,7 +191,11 @@ exports.OnePageAdaptableWizard = (props) => {
|
|
|
191
191
|
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer" },
|
|
192
192
|
React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => { var _a; return (_a = props.onHide) === null || _a === void 0 ? void 0 : _a.call(props); }, tooltip: (_a = props.closeTooltip) !== null && _a !== void 0 ? _a : 'Close wizard', accessLevel: 'Full' }, (_b = props.closeText) !== null && _b !== void 0 ? _b : 'CLOSE'),
|
|
193
193
|
React.createElement(KeyHint_1.KeyHint, { ml: 2 }, "Esc"),
|
|
194
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, className: "ab-OnePageWizard__error", style: {
|
|
194
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, className: "ab-OnePageWizard__error", style: {
|
|
195
|
+
flex: 1,
|
|
196
|
+
color: 'var(--ab-color-error)',
|
|
197
|
+
textAlign: 'end',
|
|
198
|
+
} }, firstErrorMessage),
|
|
195
199
|
React.createElement(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: 'Full' }, "Finish")))))));
|
|
196
200
|
};
|
|
197
201
|
exports.OnePageWizardSummary = () => {
|
|
@@ -165,9 +165,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
165
165
|
private isInternallyRenderedColumn;
|
|
166
166
|
getDisplayValue(id: any, columnId: string): string | undefined;
|
|
167
167
|
getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
|
|
168
|
-
getDisplayValueFromRowNode(
|
|
169
|
-
|
|
170
|
-
getDisplayValueFromRawValue(columnId: string, rawValue: any, skipCellRenderers?: boolean): string | undefined;
|
|
168
|
+
getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): string | undefined;
|
|
169
|
+
getDisplayValueFromRawValue(columnId: string, rawValue: any): string | undefined;
|
|
171
170
|
private getFormattedValue;
|
|
172
171
|
private getNormalisedValueFromRowValue;
|
|
173
172
|
getRawValueFromRowNode(rowNode: RowNode, columnId: string): any;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -428,8 +428,16 @@ class Adaptable {
|
|
|
428
428
|
ReactDOM.render(AdaptableView_1.AdaptableApp({ Adaptable: this }), this.abContainerElement);
|
|
429
429
|
}
|
|
430
430
|
// create debounce methods that take a time based on user settings
|
|
431
|
-
this.throttleFilterOnEditDataChange = throttle_1.default(
|
|
432
|
-
|
|
431
|
+
this.throttleFilterOnEditDataChange = throttle_1.default(
|
|
432
|
+
// the extra function is to make sure we have a reference to ag-grid-api
|
|
433
|
+
() => this.gridOptions.api.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnUserDataChange.throttleDelay, {
|
|
434
|
+
trailing: true,
|
|
435
|
+
leading: false,
|
|
436
|
+
});
|
|
437
|
+
this.throttleFilterOnTickingDataChange = throttle_1.default(() => this.gridOptions.api.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnExternalDataChange.throttleDelay, {
|
|
438
|
+
trailing: true,
|
|
439
|
+
leading: false,
|
|
440
|
+
});
|
|
433
441
|
return this.api;
|
|
434
442
|
});
|
|
435
443
|
}
|
|
@@ -514,7 +522,7 @@ class Adaptable {
|
|
|
514
522
|
this.gridOptions.columnDefs.forEach(assignColId);
|
|
515
523
|
}
|
|
516
524
|
if ((_a = this.adaptableOptions.generalOptions) === null || _a === void 0 ? void 0 : _a.hideEmptyGroupRows) {
|
|
517
|
-
LoggingHelper_1.
|
|
525
|
+
LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: 'GeneralOptions.hideEmptyGroupRows' is deprecated and will no longer be evaluated!`);
|
|
518
526
|
// disabled due to showstopper starting with AG Grid v26
|
|
519
527
|
// the internal implementation of AG Grids GroupCellRenderer has changed A LOT!
|
|
520
528
|
// this.gridOptions.components = this.gridOptions.components || {};
|
|
@@ -730,12 +738,12 @@ class Adaptable {
|
|
|
730
738
|
const groupsCount = {};
|
|
731
739
|
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
732
740
|
var _a, _b, _c;
|
|
733
|
-
if (!((_b = (_a = columnGroup.
|
|
741
|
+
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
734
742
|
return acc;
|
|
735
743
|
}
|
|
736
744
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
737
|
-
const AllowGroupSplit = !columnGroup.
|
|
738
|
-
const FriendlyName = (_c = columnGroup.
|
|
745
|
+
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef().marryChildren;
|
|
746
|
+
const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
739
747
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
740
748
|
columnsInGroup.forEach((col) => {
|
|
741
749
|
const group = {
|
|
@@ -1106,7 +1114,10 @@ class Adaptable {
|
|
|
1106
1114
|
}
|
|
1107
1115
|
setColumnOrder(VisibleColumnList) {
|
|
1108
1116
|
const newColumnState = this.getSortedColumnStateForVisibleColumns(VisibleColumnList);
|
|
1109
|
-
this.gridOptions.columnApi.applyColumnState({
|
|
1117
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
1118
|
+
state: newColumnState,
|
|
1119
|
+
applyOrder: true,
|
|
1120
|
+
});
|
|
1110
1121
|
this.updateColumnsIntoStore();
|
|
1111
1122
|
}
|
|
1112
1123
|
persistLayout(layout) {
|
|
@@ -1260,7 +1271,10 @@ class Adaptable {
|
|
|
1260
1271
|
if (shouldUpdatePivoted) {
|
|
1261
1272
|
this.gridOptions.columnApi.setPivotMode(pivoted);
|
|
1262
1273
|
}
|
|
1263
|
-
this.gridOptions.columnApi.applyColumnState({
|
|
1274
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
1275
|
+
state: newColState,
|
|
1276
|
+
applyOrder: true,
|
|
1277
|
+
});
|
|
1264
1278
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
1265
1279
|
this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
|
|
1266
1280
|
// aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
|
|
@@ -1426,7 +1440,10 @@ class Adaptable {
|
|
|
1426
1440
|
}
|
|
1427
1441
|
});
|
|
1428
1442
|
}
|
|
1429
|
-
const selectedCellInfo = {
|
|
1443
|
+
const selectedCellInfo = {
|
|
1444
|
+
columns: columns,
|
|
1445
|
+
gridCells: selectedCells,
|
|
1446
|
+
};
|
|
1430
1447
|
this.api.internalApi.setSelectedCells(selectedCellInfo);
|
|
1431
1448
|
this._emit('CellsSelected');
|
|
1432
1449
|
this.agGridHelper.fireSelectionChangedEvent();
|
|
@@ -1676,18 +1693,15 @@ class Adaptable {
|
|
|
1676
1693
|
let returnValue;
|
|
1677
1694
|
if (this.useRowNodeLookUp) {
|
|
1678
1695
|
const rowNode = this.gridOptions.api.getRowNode(id);
|
|
1679
|
-
|
|
1680
|
-
if (gridCell) {
|
|
1681
|
-
returnValue = gridCell.displayValue;
|
|
1682
|
-
}
|
|
1696
|
+
return this.getDisplayValueFromRowNode(rowNode, columnId);
|
|
1683
1697
|
}
|
|
1684
1698
|
else {
|
|
1685
1699
|
let foundRow = false;
|
|
1686
1700
|
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1687
1701
|
if (!foundRow) {
|
|
1688
|
-
const
|
|
1689
|
-
if (
|
|
1690
|
-
returnValue =
|
|
1702
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
1703
|
+
if (id == primaryKeyValue) {
|
|
1704
|
+
returnValue = this.getDisplayValueFromRowNode(rowNode, columnId);
|
|
1691
1705
|
}
|
|
1692
1706
|
foundRow = true;
|
|
1693
1707
|
}
|
|
@@ -1713,15 +1727,14 @@ class Adaptable {
|
|
|
1713
1727
|
rowNode: rowNode,
|
|
1714
1728
|
};
|
|
1715
1729
|
}
|
|
1716
|
-
getDisplayValueFromRowNode(
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
return this.getDisplayValueFromRawValue(columnId, rawValue, true);
|
|
1730
|
+
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
1731
|
+
if (rowNode == null) {
|
|
1732
|
+
return undefined;
|
|
1733
|
+
}
|
|
1734
|
+
const rawValue = this.getRawValueFromRowNode(rowNode, columnId);
|
|
1735
|
+
return this.getDisplayValueFromRawValue(columnId, rawValue);
|
|
1723
1736
|
}
|
|
1724
|
-
getDisplayValueFromRawValue(columnId, rawValue
|
|
1737
|
+
getDisplayValueFromRawValue(columnId, rawValue) {
|
|
1725
1738
|
const abColumn = this.api.columnApi.getColumnFromId(columnId);
|
|
1726
1739
|
const isRenderedColumn = this.api.columnApi.isFormatNumericStyleColumn(abColumn);
|
|
1727
1740
|
if (isRenderedColumn) {
|
|
@@ -1739,14 +1752,17 @@ class Adaptable {
|
|
|
1739
1752
|
if (colDef) {
|
|
1740
1753
|
if (typeof colDef.valueFormatter == 'function') {
|
|
1741
1754
|
const formattedValue = this.getFormattedValue(rawValue, columnId, colDef, colDef.valueFormatter);
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1755
|
+
// Never use cellRenderer:
|
|
1756
|
+
// - when a string, you never know if it is HTML or a normal string
|
|
1757
|
+
// - when an object, cannot be used
|
|
1758
|
+
// if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1759
|
+
// return this.agGridHelper.getRenderedValue(colDef, formattedValue);
|
|
1760
|
+
// }
|
|
1745
1761
|
return formattedValue || '';
|
|
1746
1762
|
}
|
|
1747
|
-
if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1748
|
-
|
|
1749
|
-
}
|
|
1763
|
+
// if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1764
|
+
// return this.agGridHelper.getRenderedValue(colDef, rawValue);
|
|
1765
|
+
// }
|
|
1750
1766
|
}
|
|
1751
1767
|
return this.agGridHelper.getCleanValue(rawValue);
|
|
1752
1768
|
}
|
|
@@ -1784,9 +1800,10 @@ class Adaptable {
|
|
|
1784
1800
|
if (dataType === 'Boolean') {
|
|
1785
1801
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : returnValue;
|
|
1786
1802
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1803
|
+
// Do not normalize dates to Date type
|
|
1804
|
+
// - breaks when rendering in filter-form
|
|
1805
|
+
// - breaks quick-search; the Date is transformed to string;
|
|
1806
|
+
// -- an incorrect comparison is made (new Date().toString).incudes('query)
|
|
1790
1807
|
return returnValue;
|
|
1791
1808
|
}
|
|
1792
1809
|
getRawValueFromRowNode(rowNode, columnId) {
|
|
@@ -2525,10 +2542,9 @@ class Adaptable {
|
|
|
2525
2542
|
const node = event.node;
|
|
2526
2543
|
const result = RowNode_dispatchLocalEvent.apply(this, arguments);
|
|
2527
2544
|
const extractGridApiFromRowNode = (rowNode) => {
|
|
2528
|
-
var _a, _b
|
|
2545
|
+
var _a, _b;
|
|
2529
2546
|
// starting with AG Grid 26.1.0 the gridApi is wrapped in a Beans property
|
|
2530
|
-
|
|
2531
|
-
const rowNodeApi = (_c = (_b = (_a = rowNode) === null || _a === void 0 ? void 0 : _a.beans) === null || _b === void 0 ? void 0 : _b.gridApi) !== null && _c !== void 0 ? _c : (_d = rowNode) === null || _d === void 0 ? void 0 : _d.gridApi;
|
|
2547
|
+
const rowNodeApi = (_b = (_a = rowNode) === null || _a === void 0 ? void 0 : _a.beans) === null || _b === void 0 ? void 0 : _b.gridApi;
|
|
2532
2548
|
if (!rowNodeApi) {
|
|
2533
2549
|
LoggingHelper_1.LogAdaptableWarning(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
|
|
2534
2550
|
}
|
|
@@ -2638,7 +2654,7 @@ class Adaptable {
|
|
|
2638
2654
|
try {
|
|
2639
2655
|
// it is very important that this method is executed as soon as possible and BEFORE the updateColDefsForSpecialColumns() method
|
|
2640
2656
|
// this will ensure that the columns are recreated as expected (see method implementation&comments for more details)
|
|
2641
|
-
this.cleanupFloatingFilters_WORKAROUND();
|
|
2657
|
+
//this.cleanupFloatingFilters_WORKAROUND();
|
|
2642
2658
|
this.updateColDefsForSpecialColumns();
|
|
2643
2659
|
this.applyCurrentTheme();
|
|
2644
2660
|
this.applyFinalRendering();
|
|
@@ -2799,16 +2815,18 @@ class Adaptable {
|
|
|
2799
2815
|
readonlyClassName,
|
|
2800
2816
|
highlightAlertClassName,
|
|
2801
2817
|
]
|
|
2802
|
-
|
|
2803
|
-
.
|
|
2818
|
+
// we flatten the array because 'userCellClass' might return a string[]
|
|
2819
|
+
.flat()
|
|
2820
|
+
.filter((x) => !!x);
|
|
2821
|
+
const returnValueHash = returnValue.join(' ');
|
|
2804
2822
|
const primaryKey = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2805
2823
|
const key = `${primaryKey}:${params.colDef.colId}`;
|
|
2806
2824
|
if (classNameMap[key] &&
|
|
2807
|
-
classNameMap[key] !==
|
|
2825
|
+
classNameMap[key] !== returnValueHash &&
|
|
2808
2826
|
// only hard-reset when removing class-names
|
|
2809
2827
|
// ag-grid does not remove class-names, it accumulates them
|
|
2810
2828
|
// https://www.ag-grid.com/javascript-data-grid/cell-styles/#refresh-of-styles
|
|
2811
|
-
|
|
2829
|
+
returnValueHash.length < ((_a = classNameMap[key]) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2812
2830
|
setTimeout(() => {
|
|
2813
2831
|
/**
|
|
2814
2832
|
* This is called inside a getter function, inside ag-grid.
|
|
@@ -2818,14 +2836,18 @@ class Adaptable {
|
|
|
2818
2836
|
params.api.redrawRows({ rowNodes: [params.node] });
|
|
2819
2837
|
}, 0);
|
|
2820
2838
|
}
|
|
2821
|
-
classNameMap[key] =
|
|
2822
|
-
return
|
|
2839
|
+
classNameMap[key] = returnValueHash;
|
|
2840
|
+
return returnValue.length ? returnValue : undefined;
|
|
2823
2841
|
};
|
|
2824
2842
|
return cellClass;
|
|
2825
2843
|
});
|
|
2826
2844
|
}
|
|
2827
2845
|
getExcelClassNameForCell(colId, primaryKeyValue) {
|
|
2828
|
-
|
|
2846
|
+
let primaryKeyString = `${primaryKeyValue}`;
|
|
2847
|
+
if (primaryKeyString.indexOf(' ') > 0) {
|
|
2848
|
+
primaryKeyString.replace(/\s/g, '_');
|
|
2849
|
+
}
|
|
2850
|
+
return `--excel-cell-${colId}-${primaryKeyString}`;
|
|
2829
2851
|
}
|
|
2830
2852
|
setupColumnCellEditor({ colId, col }) {
|
|
2831
2853
|
const adaptableColumn = this.api.columnApi.getColumnFromId(colId);
|
|
@@ -2916,6 +2938,7 @@ class Adaptable {
|
|
|
2916
2938
|
if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
|
|
2917
2939
|
// fallback to the formatColumn property if no Layout custom header is provided
|
|
2918
2940
|
resultHeaderName = formatColumn.HeaderName;
|
|
2941
|
+
LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: 'FormatColumn.HeaderName' is deprecated: use 'Layout.ColumnHeadersMap' instead`);
|
|
2919
2942
|
}
|
|
2920
2943
|
// required here for the initial layout rendering
|
|
2921
2944
|
abColumn.friendlyName = resultHeaderName;
|
|
@@ -3493,7 +3516,10 @@ class Adaptable {
|
|
|
3493
3516
|
}
|
|
3494
3517
|
return state;
|
|
3495
3518
|
});
|
|
3496
|
-
this.gridOptions.columnApi.applyColumnState({
|
|
3519
|
+
this.gridOptions.columnApi.applyColumnState({
|
|
3520
|
+
state: newColumnState,
|
|
3521
|
+
applyOrder: true,
|
|
3522
|
+
});
|
|
3497
3523
|
this.gridOptions.api.onSortChanged();
|
|
3498
3524
|
}
|
|
3499
3525
|
clearColumnSort() {
|
|
@@ -3550,7 +3576,9 @@ class Adaptable {
|
|
|
3550
3576
|
});
|
|
3551
3577
|
}
|
|
3552
3578
|
else {
|
|
3553
|
-
const transaction = this.gridOptions.api.applyTransaction({
|
|
3579
|
+
const transaction = this.gridOptions.api.applyTransaction({
|
|
3580
|
+
update: dataRows,
|
|
3581
|
+
});
|
|
3554
3582
|
return Promise.resolve(transaction === null || transaction === void 0 ? void 0 : transaction.update);
|
|
3555
3583
|
}
|
|
3556
3584
|
}
|
|
@@ -3591,7 +3619,9 @@ class Adaptable {
|
|
|
3591
3619
|
});
|
|
3592
3620
|
}
|
|
3593
3621
|
else {
|
|
3594
|
-
const transaction = this.gridOptions.api.applyTransaction({
|
|
3622
|
+
const transaction = this.gridOptions.api.applyTransaction({
|
|
3623
|
+
remove: dataRows,
|
|
3624
|
+
});
|
|
3595
3625
|
return Promise.resolve(transaction.remove);
|
|
3596
3626
|
}
|
|
3597
3627
|
}
|
|
@@ -3865,9 +3895,10 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3865
3895
|
alertHighlightClassName,
|
|
3866
3896
|
this.getConditionalStyleRowClass(conditionalStyles.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName)), params),
|
|
3867
3897
|
]
|
|
3868
|
-
|
|
3869
|
-
.
|
|
3870
|
-
|
|
3898
|
+
// we flatten it because 'userGetRowClass' might return a string[]
|
|
3899
|
+
.flat()
|
|
3900
|
+
.filter((x) => !!x);
|
|
3901
|
+
return (returnValue === null || returnValue === void 0 ? void 0 : returnValue.length) ? returnValue : undefined;
|
|
3871
3902
|
};
|
|
3872
3903
|
});
|
|
3873
3904
|
}
|
|
@@ -3999,9 +4030,17 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3999
4030
|
const cellStyle = typeof colDef.cellStyle === 'function' ? colDef.cellStyle(cellParams) : {};
|
|
4000
4031
|
const excelStyles = [];
|
|
4001
4032
|
// add user defined excel styles
|
|
4002
|
-
|
|
4033
|
+
let userColDefCellClass = this.getUserColDefProperty(column.getColId(), 'cellClass');
|
|
4034
|
+
const userDefinedCellClass = typeof userColDefCellClass === 'function'
|
|
4035
|
+
? userColDefCellClass(cellParams)
|
|
4036
|
+
: userColDefCellClass;
|
|
4003
4037
|
const userDefinedExcelStyle = userDefinedCellClass &&
|
|
4004
|
-
userExcelStyles.find((excelStyle) =>
|
|
4038
|
+
userExcelStyles.find((excelStyle) => {
|
|
4039
|
+
var _a;
|
|
4040
|
+
return typeof userDefinedCellClass === 'string'
|
|
4041
|
+
? userDefinedCellClass === excelStyle.id
|
|
4042
|
+
: (_a = userDefinedCellClass === null || userDefinedCellClass === void 0 ? void 0 : userDefinedCellClass.includes) === null || _a === void 0 ? void 0 : _a.call(userDefinedCellClass, excelStyle.id);
|
|
4043
|
+
});
|
|
4005
4044
|
if (userDefinedExcelStyle) {
|
|
4006
4045
|
excelStyles.push(userDefinedExcelStyle);
|
|
4007
4046
|
}
|
|
@@ -4019,9 +4058,10 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4019
4058
|
if (!excelStyles.length) {
|
|
4020
4059
|
return;
|
|
4021
4060
|
}
|
|
4022
|
-
const
|
|
4061
|
+
const cellClass = typeof colDef.cellClass === 'function'
|
|
4023
4062
|
? colDef.cellClass(cellParams)
|
|
4024
4063
|
: this.getExcelClassNameForCell(column.getId(), this.getPrimaryKeyValueFromRowNode(node));
|
|
4064
|
+
const cellClassId = Array.isArray(cellClass) ? cellClass.join(' ') : cellClass;
|
|
4025
4065
|
const finalCellExcelStyle = Object.assign({}, ...excelStyles, {
|
|
4026
4066
|
id: cellClassId,
|
|
4027
4067
|
});
|
|
@@ -4170,7 +4210,9 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4170
4210
|
const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
4171
4211
|
const licenseKey = globalObject.ADAPTABLE_LICENSE_KEY ||
|
|
4172
4212
|
this.api.internalApi.getAdaptableOptions().licenseKey;
|
|
4173
|
-
return new LicenseService_1.LicenseService(this, licenseKey, {
|
|
4213
|
+
return new LicenseService_1.LicenseService(this, licenseKey, {
|
|
4214
|
+
publishedAt: publishTimestamp_1.default,
|
|
4215
|
+
});
|
|
4174
4216
|
}
|
|
4175
4217
|
}
|
|
4176
4218
|
exports.Adaptable = Adaptable;
|
|
@@ -117,7 +117,7 @@ class AdaptableDateEditor {
|
|
|
117
117
|
react_dom_1.unmountComponentAtNode(this.el);
|
|
118
118
|
}
|
|
119
119
|
shouldClearExistingValue(params) {
|
|
120
|
-
return params.
|
|
120
|
+
return params.key === all_modules_1.KeyCode.BACKSPACE || params.key === all_modules_1.KeyCode.DELETE;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
exports.AdaptableDateEditor = AdaptableDateEditor;
|
|
@@ -93,7 +93,7 @@ class AdaptableNumberEditor {
|
|
|
93
93
|
react_dom_1.unmountComponentAtNode(this.el);
|
|
94
94
|
}
|
|
95
95
|
shouldClearExistingValue(params) {
|
|
96
|
-
return params.
|
|
96
|
+
return params.key === all_modules_1.KeyCode.BACKSPACE || params.key === all_modules_1.KeyCode.DELETE;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
exports.AdaptableNumberEditor = AdaptableNumberEditor;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ApplicationIcon = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
exports.ApplicationIcon = ({ icon }) => {
|
|
6
|
+
exports.ApplicationIcon = ({ icon, className }) => {
|
|
7
7
|
if (!icon) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
let width = icon.style && icon.style.width ? icon.style.width : 'var(--ab-cmp-simple-button__width)';
|
|
11
11
|
let height = icon.style && icon.style.height ? icon.style.height : 'var(--ab-cmp-simple-button__height)';
|
|
12
|
-
return
|
|
12
|
+
return React.createElement("img", { className: className, src: icon.src, style: { width: width, height: height } });
|
|
13
13
|
};
|
|
@@ -14,7 +14,10 @@ function Dashboard(props) {
|
|
|
14
14
|
const [collapsed, setCollapsed] = useProperty_1.default(props, 'collapsed', false);
|
|
15
15
|
const [floating, setFloating] = useProperty_1.default(props, 'floating', false);
|
|
16
16
|
const [inline, setInline] = useProperty_1.default(props, 'inline', false);
|
|
17
|
-
const [position, setPosition] = useProperty_1.default(props, 'position', {
|
|
17
|
+
const [position, setPosition] = useProperty_1.default(props, 'position', {
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
});
|
|
18
21
|
const expanded = !floating && !collapsed;
|
|
19
22
|
const { handleRef, targetRef } = useDraggable_1.default({
|
|
20
23
|
onDrop(dx, dy) {
|
|
@@ -90,7 +90,14 @@ const Dropdown = (props) => {
|
|
|
90
90
|
React.createElement("select", { ref: selectRef, tabIndex: -1, disabled: disabled, value: value == null ? '' : value, onChange: (e) => {
|
|
91
91
|
const selected = finalOptions.filter((o) => o.value == e.target.value)[0];
|
|
92
92
|
onChange(selected, e);
|
|
93
|
-
}, style: {
|
|
93
|
+
}, style: {
|
|
94
|
+
opacity: 0,
|
|
95
|
+
width: '100%',
|
|
96
|
+
height: '100%',
|
|
97
|
+
top: 0,
|
|
98
|
+
left: 0,
|
|
99
|
+
zIndex: 1,
|
|
100
|
+
}, onMouseDown: onMouseDown, name: name, multiple: multiple, autoFocus: autoFocus }, finalOptions.map((o) => {
|
|
94
101
|
return (React.createElement("option", { key: o.value, value: o.value }, o.label));
|
|
95
102
|
})),
|
|
96
103
|
showClearButton && selectedOption ? renderClearButton() : null));
|
|
@@ -19,7 +19,9 @@ function EditorInputReactive(props) {
|
|
|
19
19
|
? moduleExpressionFunctions.observableFunctions
|
|
20
20
|
: moduleExpressionFunctions.aggregationFunctions;
|
|
21
21
|
const whereClauseExpressionsFns = Object.assign(Object.assign({}, moduleExpressionFunctions.booleanFunctions), moduleExpressionFunctions.scalarFunctions);
|
|
22
|
-
const [value, setValue] = useProperty_1.default(props, 'value', '', {
|
|
22
|
+
const [value, setValue] = useProperty_1.default(props, 'value', '', {
|
|
23
|
+
onChange: props.onChange,
|
|
24
|
+
});
|
|
23
25
|
const [reactiveValue, whereClauseValue] = value.split(' WHERE ');
|
|
24
26
|
const updateReactiveValue = (value) => {
|
|
25
27
|
let fullExpressionString = value;
|
|
@@ -5,7 +5,10 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const rebass_1 = require("rebass");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
exports.ExpressionFunctionDocumentation = (props) => {
|
|
8
|
-
return props.expressionFunction ? (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation", my: 2, p: 2, style: {
|
|
8
|
+
return props.expressionFunction ? (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation", my: 2, p: 2, style: {
|
|
9
|
+
background: 'var(--ab-color-primary)',
|
|
10
|
+
borderRadius: 'var(--ab__border-radius)',
|
|
11
|
+
} },
|
|
9
12
|
props.expressionFunction.description && (React.createElement(rebass_1.Box, { mb: 3, style: { fontWeight: 'bold' }, "data-name": "expression-editor-documentation-description" }, props.expressionFunction.description)),
|
|
10
13
|
props.expressionFunction.signatures && (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation-signatures" },
|
|
11
14
|
React.createElement("b", null, "Signatures"),
|
|
@@ -66,7 +66,11 @@ function ExpressionEditor(props) {
|
|
|
66
66
|
: '', onChange: (e) => {
|
|
67
67
|
setData(Object.assign(Object.assign({}, data), { [column.columnId]: new Date(e.target.value) }));
|
|
68
68
|
}, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: data[column.columnId], onChange: (checked) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: checked })), disabled: column.readOnly })) : null))))));
|
|
69
|
-
const namedQueries = (React.createElement("div", null, props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: {
|
|
69
|
+
const namedQueries = (React.createElement("div", null, props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: {
|
|
70
|
+
padding: 3,
|
|
71
|
+
marginTop: 'var(--ab-space-2)',
|
|
72
|
+
marginBottom: 'var(--ab-space-2)',
|
|
73
|
+
}, backgroundColor: "primarylight" },
|
|
70
74
|
' ',
|
|
71
75
|
React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
|
|
72
76
|
background: 'var(--ab-color-primary)',
|
|
@@ -163,7 +167,10 @@ const renderQueryHints = (type) => {
|
|
|
163
167
|
description: "The sum of the 'PnL' column values in all rows where named query 'CurrencyDollar' is evaluated to TRUE is greater than 5 Billions",
|
|
164
168
|
});
|
|
165
169
|
}
|
|
166
|
-
return examples.length ? (React.createElement(rebass_1.Box, { "data-name": "expression-hints", my: 2, p: 2, style: {
|
|
170
|
+
return examples.length ? (React.createElement(rebass_1.Box, { "data-name": "expression-hints", my: 2, p: 2, style: {
|
|
171
|
+
background: 'var(--ab-color-primary)',
|
|
172
|
+
borderRadius: 'var(--ab__border-radius)',
|
|
173
|
+
} },
|
|
167
174
|
React.createElement(rebass_1.Box, null,
|
|
168
175
|
React.createElement(rebass_1.Text, { marginBottom: 2 },
|
|
169
176
|
React.createElement("b", null, "Examples"),
|