@adaptabletools/adaptable 11.2.4 → 12.0.0-canary.1
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 +568 -273
- package/bundle.cjs.js +120 -120
- package/index.css +642 -270
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
- package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
- package/src/AdaptableOptions/EditOptions.d.ts +91 -4
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +9 -8
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +25 -23
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
- package/src/AdaptableOptions/{SmartEdit.js → MasterDetailPluginOptions.js} +0 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +95 -50
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +9 -4
- package/src/Api/ConditionalStyleApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/DashboardApi.d.ts +6 -19
- package/src/Api/DataSetApi.d.ts +40 -0
- package/src/Api/{DataSourceApi.js → DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +29 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/RowFormSubmitted.js} +0 -0
- package/src/Api/Events/SearchChanged.d.ts +4 -5
- package/src/Api/ExportApi.d.ts +2 -2
- package/src/Api/FilterApi.d.ts +28 -36
- package/src/Api/FormatColumnApi.d.ts +6 -0
- package/src/Api/GridApi.d.ts +15 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +5 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.js +17 -16
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +2 -24
- package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
- package/src/Api/Implementation/DashboardApiImpl.js +5 -29
- package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
- package/src/Api/Implementation/DataSetApiImpl.js +42 -0
- package/src/Api/Implementation/EventApiImpl.js +1 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FilterApiImpl.d.ts +11 -11
- package/src/Api/Implementation/FilterApiImpl.js +59 -72
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +45 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
- package/src/Api/Implementation/InternalApiImpl.js +51 -10
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +20 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PredicateApiImpl.js +19 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +5 -2
- package/src/Api/Implementation/SmartEditApiImpl.js +9 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +7 -25
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/LayoutApi.d.ts +16 -0
- package/src/Api/PredicateApi.d.ts +7 -0
- package/src/Api/SmartEditApi.d.ts +14 -3
- package/src/Api/TeamSharingApi.d.ts +18 -5
- package/src/Api/UserInterfaceApi.d.ts +4 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
- package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
- package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.js +1 -1
- package/src/PredefinedConfig/Common/FormContext.d.ts +8 -0
- package/src/PredefinedConfig/Common/FormContext.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +6 -5
- package/src/PredefinedConfig/Common/Types.js +2 -3
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +4 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +134 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
- package/src/Redux/Store/AdaptableStore.js +37 -39
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/BulkUpdateModule.js +3 -4
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +29 -16
- package/src/Strategy/DataSetModule.d.ts +25 -0
- package/src/Strategy/DataSetModule.js +65 -0
- package/src/Strategy/ExportModule.js +6 -1
- package/src/Strategy/FilterModule.d.ts +7 -11
- package/src/Strategy/FilterModule.js +26 -20
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +25 -2
- package/src/Strategy/PlusMinusModule.js +1 -4
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +7 -8
- package/src/Strategy/StatusBarModule.js +1 -3
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Utilities/Constants/GeneralConstants.d.ts +8 -2
- package/src/Utilities/Constants/GeneralConstants.js +8 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +24 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
- package/src/Utilities/ObjectFactory.d.ts +3 -6
- package/src/Utilities/ObjectFactory.js +3 -7
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +6 -7
- package/src/Utilities/Services/EntitlementService.js +7 -1
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
- package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/RowEditService.d.ts +26 -0
- package/src/Utilities/Services/RowEditService.js +197 -0
- package/src/Utilities/Services/TeamSharingService.js +4 -4
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
- package/src/View/Alert/ActiveAlertsPanel.js +15 -0
- package/src/View/Alert/AlertStatusSubPanel.js +3 -8
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +13 -7
- package/src/View/CellSummary/CellSummaryDetails.js +4 -4
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
- package/src/View/CellSummary/CellSummaryPopover.js +3 -6
- package/src/View/CellSummary/CellSummaryPopup.js +8 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
- package/src/View/Components/ExternalRenderer.d.ts +3 -6
- package/src/View/Components/ExternalRenderer.js +5 -5
- package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +10 -8
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
- package/src/View/Components/Popups/AdaptableToaster.js +29 -9
- package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
- package/src/View/Components/PreviewResultsPanel.js +3 -3
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- package/src/View/Components/WizardSummaryPage.js +2 -2
- package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
- package/src/View/Dashboard/CustomDashboardButton.js +47 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
- package/src/View/Dashboard/Dashboard.d.ts +1 -0
- package/src/View/Dashboard/Dashboard.js +8 -34
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
- package/src/View/DataSet/DataSetSelector.d.ts +7 -0
- package/src/View/DataSet/DataSetSelector.js +18 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
- package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
- package/src/View/DataSet/DataSetViewPanel.js +58 -0
- package/src/View/Filter/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +5 -5
- package/src/View/Filter/FilterSummary.js +5 -4
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +10 -13
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -7
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +4 -5
- package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
- package/src/View/StatusBar/StatusBarPanel.js +5 -4
- package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
- package/src/View/UIHelper.d.ts +4 -4
- package/src/View/UIHelper.js +10 -10
- package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
- package/src/agGrid/ActionColumnRenderer.js +9 -6
- package/src/agGrid/Adaptable.d.ts +7 -2
- package/src/agGrid/Adaptable.js +213 -69
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +7 -8
- package/src/agGrid/agGridHelper.js +68 -86
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/agGrid/rowEditIcons.d.ts +5 -0
- package/src/agGrid/rowEditIcons.js +10 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Datepicker/index.js +19 -18
- package/src/components/InfiniteTable/index.js +1 -0
- package/src/components/List/GridList/index.js +1 -1
- package/src/components/SelectList.d.ts +10 -0
- package/src/components/SelectList.js +9 -0
- package/src/components/WindowModal/WindowModal.d.ts +2 -0
- package/src/components/WindowModal/WindowModal.js +1 -1
- package/src/components/icons/{data-source.d.ts → add-row.d.ts} +0 -0
- package/src/components/icons/add-row.js +7 -0
- package/src/components/icons/data-set.d.ts +3 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +4 -2
- package/src/metamodel/adaptable.metamodel.d.ts +226 -69
- package/src/metamodel/adaptable.metamodel.js +532 -311
- package/src/types.d.ts +18 -13
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -9
- package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
- package/src/Api/DataSourceApi.d.ts +0 -58
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
- package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
- package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
- package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
- package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
- package/src/Strategy/DataSourceModule.d.ts +0 -20
- package/src/Strategy/DataSourceModule.js +0 -56
- package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
- package/src/View/Components/Forms/AdaptableForm.js +0 -21
- package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
- package/src/View/DataSource/DataSourceViewPanel.js +0 -69
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
|
@@ -341,18 +341,17 @@ class ReportService {
|
|
|
341
341
|
: // type === formattedValue
|
|
342
342
|
this.adaptableApi.gridApi.getFormattedValueFromRawValue(columnId, cellRawValue);
|
|
343
343
|
}
|
|
344
|
-
computeCellExportValueFormat(
|
|
344
|
+
computeCellExportValueFormat(columnDataType) {
|
|
345
345
|
const exportOptions = this.adaptableApi.internalApi.getAdaptableOptions().exportOptions;
|
|
346
346
|
if (exportOptions.exportFormatType === 'rawValue' ||
|
|
347
347
|
exportOptions.exportFormatType === 'formattedValue') {
|
|
348
348
|
return exportOptions.exportFormatType;
|
|
349
349
|
}
|
|
350
350
|
// format is customized based on column data type
|
|
351
|
-
switch (
|
|
351
|
+
switch (columnDataType) {
|
|
352
352
|
case 'String':
|
|
353
353
|
return exportOptions.exportFormatType.string;
|
|
354
354
|
case 'Number':
|
|
355
|
-
case 'NumberArray':
|
|
356
355
|
return exportOptions.exportFormatType.number;
|
|
357
356
|
case 'Date':
|
|
358
357
|
return exportOptions.exportFormatType.date;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IRowEditService } from './Interface/IRowEditService';
|
|
2
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
3
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
4
|
+
import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
|
|
5
|
+
import { CreateRowFormContext, EditRowFormContext } from '../../AdaptableOptions/EditOptions';
|
|
6
|
+
export declare class RowEditService implements IRowEditService {
|
|
7
|
+
private adaptableApi;
|
|
8
|
+
private adaptableInstance;
|
|
9
|
+
private rowEditFormOptions;
|
|
10
|
+
constructor(adaptableApi: AdaptableApi);
|
|
11
|
+
buildRowEditForm(rowNode: RowNode): AdaptableForm<EditRowFormContext>;
|
|
12
|
+
buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateRowFormContext>;
|
|
13
|
+
private buildRowForm;
|
|
14
|
+
private getFormTitle;
|
|
15
|
+
private getFormDescription;
|
|
16
|
+
private buildFormParamContext;
|
|
17
|
+
private buildRowFormFields;
|
|
18
|
+
private buildRowFormButtons;
|
|
19
|
+
private isColumnEditable;
|
|
20
|
+
private buildFormField;
|
|
21
|
+
private getFormFieldLabel;
|
|
22
|
+
private buildFormFieldLabelContext;
|
|
23
|
+
private getFieldTypeFromColumnType;
|
|
24
|
+
private getFieldValueOptions;
|
|
25
|
+
private autoHandleActionRowButtons;
|
|
26
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RowEditService = void 0;
|
|
4
|
+
class RowEditService {
|
|
5
|
+
constructor(adaptableApi) {
|
|
6
|
+
this.adaptableApi = adaptableApi;
|
|
7
|
+
this.adaptableInstance = this.adaptableApi.internalApi.getAdaptableInstance();
|
|
8
|
+
this.rowEditFormOptions =
|
|
9
|
+
this.adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.editOptions.rowFormOptions;
|
|
10
|
+
if (this.adaptableInstance.adaptableOptions.userInterfaceOptions.actionOptions
|
|
11
|
+
.autoHandleActionRowButtons) {
|
|
12
|
+
this.adaptableInstance.api.eventApi.on('RowFormSubmitted', (eventInfo) => this.autoHandleActionRowButtons(eventInfo));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
buildRowEditForm(rowNode) {
|
|
16
|
+
return this.buildRowForm('rowEdited', rowNode);
|
|
17
|
+
}
|
|
18
|
+
buildRowCreateForm(clonedRowNode) {
|
|
19
|
+
return this.buildRowForm('rowCreated', clonedRowNode);
|
|
20
|
+
}
|
|
21
|
+
buildRowForm(type, rowNode) {
|
|
22
|
+
const formFields = this.buildRowFormFields(type, rowNode);
|
|
23
|
+
const formButtons = this.buildRowFormButtons(type, rowNode);
|
|
24
|
+
const formTitle = this.getFormTitle(type, rowNode);
|
|
25
|
+
const formDescription = this.getFormDescription(type, rowNode);
|
|
26
|
+
const rowForm = {
|
|
27
|
+
title: formTitle,
|
|
28
|
+
description: formDescription,
|
|
29
|
+
fields: formFields,
|
|
30
|
+
buttons: formButtons,
|
|
31
|
+
};
|
|
32
|
+
return rowForm;
|
|
33
|
+
}
|
|
34
|
+
getFormTitle(type, rowNode) {
|
|
35
|
+
if (this.rowEditFormOptions.formTitle == undefined) {
|
|
36
|
+
return type === 'rowCreated' ? 'Create New Row' : 'Edit Row';
|
|
37
|
+
}
|
|
38
|
+
return typeof this.rowEditFormOptions.formTitle === 'function'
|
|
39
|
+
? this.rowEditFormOptions.formTitle(this.buildFormParamContext(type, rowNode))
|
|
40
|
+
: this.rowEditFormOptions.formTitle;
|
|
41
|
+
}
|
|
42
|
+
getFormDescription(type, rowNode) {
|
|
43
|
+
return typeof this.rowEditFormOptions.formDescription === 'function'
|
|
44
|
+
? this.rowEditFormOptions.formDescription(this.buildFormParamContext(type, rowNode))
|
|
45
|
+
: this.rowEditFormOptions.formDescription;
|
|
46
|
+
}
|
|
47
|
+
buildFormParamContext(type, rowNode) {
|
|
48
|
+
return {
|
|
49
|
+
rowNode,
|
|
50
|
+
adaptableApi: this.adaptableApi,
|
|
51
|
+
type: type,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
buildRowFormFields(type, rowNode) {
|
|
55
|
+
const relevantColumns = this.adaptableApi.columnApi
|
|
56
|
+
.getColumns()
|
|
57
|
+
.filter((column) => {
|
|
58
|
+
// if there is NO rowNode, do NOT display the non-editable fields as they will be empty
|
|
59
|
+
return !!rowNode || this.isColumnEditable(column, rowNode);
|
|
60
|
+
})
|
|
61
|
+
.filter((column) => !this.adaptableApi.columnApi.isActionRowButtonColumn(column.columnId));
|
|
62
|
+
return relevantColumns.map((column) => this.buildFormField(type, column, rowNode));
|
|
63
|
+
}
|
|
64
|
+
buildRowFormButtons(type, rowNode) {
|
|
65
|
+
// 1. check if there are custom user provided buttons
|
|
66
|
+
if (Array.isArray(this.rowEditFormOptions.formButtons)) {
|
|
67
|
+
return this.rowEditFormOptions.formButtons;
|
|
68
|
+
}
|
|
69
|
+
// 2. else return the standard ones
|
|
70
|
+
const cancelButton = {
|
|
71
|
+
label: 'Cancel',
|
|
72
|
+
buttonStyle: {
|
|
73
|
+
variant: 'raised',
|
|
74
|
+
tone: 'neutral',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
const saveButton = {
|
|
78
|
+
label: 'Save',
|
|
79
|
+
buttonStyle: {
|
|
80
|
+
variant: 'raised',
|
|
81
|
+
tone: 'success',
|
|
82
|
+
},
|
|
83
|
+
onClick: (button, context) => {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
const eventInfo = type === 'rowCreated'
|
|
86
|
+
? {
|
|
87
|
+
type: 'rowCreated',
|
|
88
|
+
formData: context.formData,
|
|
89
|
+
adaptableApi: context.adaptableApi,
|
|
90
|
+
clonedRowNode: rowNode,
|
|
91
|
+
}
|
|
92
|
+
: {
|
|
93
|
+
type: 'rowEdited',
|
|
94
|
+
formData: context.formData,
|
|
95
|
+
rowNode: rowNode,
|
|
96
|
+
adaptableApi: context.adaptableApi,
|
|
97
|
+
};
|
|
98
|
+
this.adaptableApi.eventApi.emit('RowFormSubmitted', eventInfo);
|
|
99
|
+
(_b = (_a = this.adaptableInstance.adaptableOptions.editOptions.rowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
return [cancelButton, saveButton];
|
|
103
|
+
}
|
|
104
|
+
isColumnEditable(column, rowNode) {
|
|
105
|
+
return rowNode
|
|
106
|
+
? this.adaptableInstance.isCellEditable(rowNode, this.adaptableInstance.getAgGridColumnForColumnId(column.columnId))
|
|
107
|
+
: !column.readOnly;
|
|
108
|
+
}
|
|
109
|
+
buildFormField(type, column, rowNode) {
|
|
110
|
+
const isColumnEditable = this.isColumnEditable(column, rowNode);
|
|
111
|
+
const fieldValueOptions = this.getFieldValueOptions(column, rowNode);
|
|
112
|
+
const fieldType = isColumnEditable
|
|
113
|
+
? !!(fieldValueOptions === null || fieldValueOptions === void 0 ? void 0 : fieldValueOptions.length)
|
|
114
|
+
? 'select'
|
|
115
|
+
: this.getFieldTypeFromColumnType(column)
|
|
116
|
+
: 'textOutput';
|
|
117
|
+
const defaultValue = rowNode
|
|
118
|
+
? isColumnEditable
|
|
119
|
+
? this.adaptableInstance.getRawValueFromRowNode(rowNode, column.columnId)
|
|
120
|
+
: this.adaptableInstance.getDisplayValueFromRowNode(rowNode, column.columnId)
|
|
121
|
+
: null;
|
|
122
|
+
return {
|
|
123
|
+
label: this.getFormFieldLabel(type, column, rowNode),
|
|
124
|
+
name: column.columnId,
|
|
125
|
+
defaultValue,
|
|
126
|
+
fieldType,
|
|
127
|
+
options: fieldValueOptions,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
getFormFieldLabel(type, column, rowNode) {
|
|
131
|
+
const customFieldLabel = typeof this.rowEditFormOptions.formFieldLabel === 'function'
|
|
132
|
+
? this.rowEditFormOptions.formFieldLabel(this.buildFormFieldLabelContext(type, column, rowNode))
|
|
133
|
+
: undefined;
|
|
134
|
+
return customFieldLabel !== null && customFieldLabel !== void 0 ? customFieldLabel : column.friendlyName;
|
|
135
|
+
}
|
|
136
|
+
buildFormFieldLabelContext(type, column, rowNode) {
|
|
137
|
+
return {
|
|
138
|
+
rowNode,
|
|
139
|
+
column,
|
|
140
|
+
adaptableApi: this.adaptableApi,
|
|
141
|
+
type: type,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
getFieldTypeFromColumnType(column) {
|
|
145
|
+
switch (column.dataType) {
|
|
146
|
+
case 'Boolean':
|
|
147
|
+
return 'checkbox';
|
|
148
|
+
case 'Date':
|
|
149
|
+
return 'date';
|
|
150
|
+
case 'Number':
|
|
151
|
+
return 'number';
|
|
152
|
+
default:
|
|
153
|
+
// everything else is a plain text input
|
|
154
|
+
return 'text';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
getFieldValueOptions(column, rowNode) {
|
|
158
|
+
const editLookUpItem = this.adaptableApi.userInterfaceApi.getEditLookUpItemForColumn(column);
|
|
159
|
+
if (!editLookUpItem) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const gridCell = rowNode
|
|
163
|
+
? this.adaptableInstance.getGridCellFromRowNode(rowNode, column.columnId)
|
|
164
|
+
: undefined;
|
|
165
|
+
const editLookUpValues = this.adaptableApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, column, gridCell);
|
|
166
|
+
return editLookUpValues === null || editLookUpValues === void 0 ? void 0 : editLookUpValues.map((value) => ({
|
|
167
|
+
value,
|
|
168
|
+
label: value,
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
autoHandleActionRowButtons(rowEditedFormInfo) {
|
|
172
|
+
const { adaptableApi } = rowEditedFormInfo;
|
|
173
|
+
if (rowEditedFormInfo.type === 'rowEdited') {
|
|
174
|
+
const { rowNode, formData } = rowEditedFormInfo;
|
|
175
|
+
const newRowData = Object.assign(Object.assign({}, rowNode.data), formData);
|
|
176
|
+
adaptableApi.gridApi.updateGridData([newRowData]);
|
|
177
|
+
}
|
|
178
|
+
if (rowEditedFormInfo.type === 'rowDeleted') {
|
|
179
|
+
const { rowNode } = rowEditedFormInfo;
|
|
180
|
+
const deletedRowData = rowNode.data;
|
|
181
|
+
adaptableApi.gridApi.deleteGridData([deletedRowData]);
|
|
182
|
+
}
|
|
183
|
+
if (rowEditedFormInfo.type === 'rowCreated') {
|
|
184
|
+
const { formData } = rowEditedFormInfo;
|
|
185
|
+
const setPrimaryKeyValueFunction = adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.userInterfaceOptions
|
|
186
|
+
.actionOptions.setPrimaryKeyValue;
|
|
187
|
+
const newRowData = typeof setPrimaryKeyValueFunction === 'function'
|
|
188
|
+
? setPrimaryKeyValueFunction({
|
|
189
|
+
rowData: formData,
|
|
190
|
+
adaptableApi,
|
|
191
|
+
})
|
|
192
|
+
: Object.assign({}, formData);
|
|
193
|
+
adaptableApi.gridApi.addGridData([newRowData], { addIndex: 0 });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.RowEditService = RowEditService;
|
|
@@ -74,7 +74,7 @@ class TeamSharingService {
|
|
|
74
74
|
return importInfo === null || importInfo === void 0 ? void 0 : importInfo.AddAction(Entity);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
const existingSharedEntities = this.adaptableApi.
|
|
77
|
+
const existingSharedEntities = this.adaptableApi.internalApi.getLocalTeamSharingEntities();
|
|
78
78
|
const sharedEntityDependencyTree = this.getSharedEntityDependencyTree(importedSharedEntity, existingSharedEntities);
|
|
79
79
|
const importSteps = sharedEntityDependencyTree.map((sharedEntity) => ({
|
|
80
80
|
sharedEntity,
|
|
@@ -84,13 +84,13 @@ class TeamSharingService {
|
|
|
84
84
|
}
|
|
85
85
|
getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId, remoteSharedEntities) {
|
|
86
86
|
var _a, _b, _c, _d;
|
|
87
|
-
const localRevision = (_b = (_a = this.adaptableApi.
|
|
87
|
+
const localRevision = (_b = (_a = this.adaptableApi.internalApi.getState().TeamSharing.ActiveSharedEntityMap[changedAdaptableObjectId]) === null || _a === void 0 ? void 0 : _a.Revision) !== null && _b !== void 0 ? _b : -1;
|
|
88
88
|
const remoteRevision = (_d = (_c = remoteSharedEntities.find((sharedEntity) => sharedEntity.Entity.Uuid === changedAdaptableObjectId)) === null || _c === void 0 ? void 0 : _c.Revision) !== null && _d !== void 0 ? _d : -1;
|
|
89
89
|
return [localRevision, remoteRevision];
|
|
90
90
|
}
|
|
91
91
|
getStaleActiveSharedEntities() {
|
|
92
|
-
const sharedEntities = this.adaptableApi.
|
|
93
|
-
const activeEntities = this.adaptableApi.
|
|
92
|
+
const sharedEntities = this.adaptableApi.internalApi.getLocalTeamSharingEntities();
|
|
93
|
+
const activeEntities = this.adaptableApi.internalApi.getState().TeamSharing.ActiveSharedEntityMap;
|
|
94
94
|
const result = {};
|
|
95
95
|
sharedEntities
|
|
96
96
|
.filter((sharedEntity) => sharedEntity.Type === 'Active')
|
|
@@ -12,6 +12,7 @@ export interface AdaptablePopoverProps extends React.ClassAttributes<AdaptablePo
|
|
|
12
12
|
useButton?: boolean;
|
|
13
13
|
tooltipText?: string;
|
|
14
14
|
popoverMinWidth?: number;
|
|
15
|
+
popoverMaxWidth?: number;
|
|
15
16
|
popupPadding?: number;
|
|
16
17
|
}
|
|
17
18
|
export declare class AdaptablePopover extends React.Component<AdaptablePopoverProps, {}> {
|
|
@@ -11,7 +11,7 @@ const OverlayTrigger_1 = tslib_1.__importDefault(require("../../components/Overl
|
|
|
11
11
|
const rebass_1 = require("rebass");
|
|
12
12
|
class AdaptablePopover extends React.Component {
|
|
13
13
|
render() {
|
|
14
|
-
var _a, _b;
|
|
14
|
+
var _a, _b, _c;
|
|
15
15
|
let messageType = this.props.MessageType != null ? this.props.MessageType : 'Info';
|
|
16
16
|
const showIcon = (_a = this.props.showIcon) !== null && _a !== void 0 ? _a : true;
|
|
17
17
|
let useButton = this.props.useButton != null ? this.props.useButton : false;
|
|
@@ -23,11 +23,10 @@ class AdaptablePopover extends React.Component {
|
|
|
23
23
|
margin: '0px',
|
|
24
24
|
padding: '0px',
|
|
25
25
|
minWidth: popoverMinWidth,
|
|
26
|
-
maxWidth: 300,
|
|
26
|
+
maxWidth: (_b = this.props.popoverMaxWidth) !== null && _b !== void 0 ? _b : 300,
|
|
27
27
|
} },
|
|
28
|
-
title ? (React.createElement(rebass_1.Text, { fontSize:
|
|
29
|
-
|
|
30
|
-
React.createElement(rebass_1.Box, { className: "ab-Popover__body", padding: (_b = this.props.popupPadding) !== null && _b !== void 0 ? _b : 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
|
|
28
|
+
title ? (React.createElement(rebass_1.Text, { fontSize: 4, padding: 2 }, title)) : null,
|
|
29
|
+
React.createElement(rebass_1.Box, { className: "ab-Popover__body", padding: (_c = this.props.popupPadding) !== null && _c !== void 0 ? _c : 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
|
|
31
30
|
const icon = 'info'; // - think this is wrong - UIHelper.getGlyphByMessageType(messageType);
|
|
32
31
|
const color = UIHelper_1.UIHelper.getColorByMessageType(messageType);
|
|
33
32
|
const iconStyle = {
|
|
@@ -37,7 +36,7 @@ class AdaptablePopover extends React.Component {
|
|
|
37
36
|
return (React.createElement(rebass_1.Flex, { alignItems: "center", className: this.props.className },
|
|
38
37
|
React.createElement(OverlayTrigger_1.default, { showTriangle: true, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
|
|
39
38
|
overflow: 'visible',
|
|
40
|
-
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
39
|
+
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
41
40
|
this.props.children,
|
|
42
41
|
showIcon && React.createElement(icons_1.Icon, { name: icon }))))));
|
|
43
42
|
}
|
|
@@ -33,7 +33,7 @@ class AdaptableView extends React.Component {
|
|
|
33
33
|
, {
|
|
34
34
|
// we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
|
|
35
35
|
// instance is destroyed and re-created many times
|
|
36
|
-
containerId: adaptableOptions.adaptableId, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
36
|
+
containerId: adaptableOptions.adaptableId, enableMultiContainer: true, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
37
37
|
(watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
|
|
38
38
|
React.createElement(WindowPopups_1.WindowPopups, null),
|
|
39
39
|
React.createElement(FormPopups_1.FormPopups, null),
|
|
@@ -26,7 +26,7 @@ const QuickSearchViewPanel_1 = require("./QuickSearch/QuickSearchViewPanel");
|
|
|
26
26
|
const SmartEditViewPanel_1 = require("./SmartEdit/SmartEditViewPanel");
|
|
27
27
|
const SystemStatusViewPanel_1 = require("./SystemStatus/SystemStatusViewPanel");
|
|
28
28
|
const ThemeViewPanel_1 = require("./Theme/ThemeViewPanel");
|
|
29
|
-
const
|
|
29
|
+
const DataSetViewPanel_1 = require("./DataSet/DataSetViewPanel");
|
|
30
30
|
const DataChangeHistoryPopup_1 = require("./DataChangeHistory/DataChangeHistoryPopup");
|
|
31
31
|
const DataChangeHistoryViewPanel_1 = require("./DataChangeHistory/DataChangeHistoryViewPanel");
|
|
32
32
|
const StateManagementViewPanel_1 = require("./StateManagement/StateManagementViewPanel");
|
|
@@ -59,7 +59,7 @@ exports.AdaptableViewPanelFactory = new Map([
|
|
|
59
59
|
[ModuleConstants.SmartEditModuleId, SmartEditViewPanel_1.SmartEditViewPanelControl],
|
|
60
60
|
[ModuleConstants.SystemStatusModuleId, SystemStatusViewPanel_1.SystemStatusViewPanel],
|
|
61
61
|
[ModuleConstants.ThemeModuleId, ThemeViewPanel_1.ThemeViewPanelControl],
|
|
62
|
-
[ModuleConstants.
|
|
62
|
+
[ModuleConstants.DataSetModuleId, DataSetViewPanel_1.DataSetViewPanelControl],
|
|
63
63
|
[ModuleConstants.DataChangeHistoryModuleId, DataChangeHistoryViewPanel_1.DataChangeHistoryViewPanelControl],
|
|
64
64
|
[ModuleConstants.StateManagementModuleId, StateManagementViewPanel_1.StateManagementViewPanel],
|
|
65
65
|
]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActiveAlertsPanel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
7
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
|
+
const AdaptableObjectCompactList_1 = require("../Components/AdaptableObjectList/AdaptableObjectCompactList");
|
|
9
|
+
const react_redux_1 = require("react-redux");
|
|
10
|
+
exports.ActiveAlertsPanel = () => {
|
|
11
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
12
|
+
const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
|
|
13
|
+
const alerts = react_redux_1.useSelector((state) => state.System.AdaptableAlerts);
|
|
14
|
+
return React.createElement(AdaptableObjectCompactList_1.AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
|
|
15
|
+
};
|
|
@@ -5,16 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
-
const AlertsPanel_1 = require("./AlertsPanel");
|
|
9
8
|
const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
|
|
10
9
|
const StatusBarPanel_1 = require("../StatusBar/StatusBarPanel");
|
|
11
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
12
10
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
11
|
+
const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
|
|
13
12
|
const initialStyle = { color: '', background: '' };
|
|
14
13
|
exports.AlertStatusPanel = () => {
|
|
15
14
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
15
|
const [style, setStyle] = React.useState(initialStyle);
|
|
17
|
-
const dispatch = react_redux_1.useDispatch();
|
|
18
16
|
const module = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
|
|
19
17
|
const statusbarHighlightDuration = adaptable.adaptableOptions.alertOptions.statusbarHighlightDuration;
|
|
20
18
|
/**
|
|
@@ -49,9 +47,6 @@ exports.AlertStatusPanel = () => {
|
|
|
49
47
|
setStyle(initialStyle);
|
|
50
48
|
}, statusbarHighlightDuration);
|
|
51
49
|
}, [alerts]);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const handleDeleteAllAlerts = React.useCallback((alerts) => dispatch(SystemRedux.SystemAlertDeleteAll(alerts)), []);
|
|
55
|
-
let alertsPanel = (React.createElement(AlertsPanel_1.AlertsPanel, { Alerts: alerts, ShowPanel: true, ShowHeader: false, onClearAlert: handleDeleteAlert, onClearAllAlerts: handleDeleteAllAlerts }));
|
|
56
|
-
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
|
|
50
|
+
let alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
|
|
51
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { tooltip: module.moduleInfo.ModuleName, "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
|
|
57
52
|
};
|
|
@@ -6,10 +6,10 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
8
8
|
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
9
|
-
const AlertsPanel_1 = require("./AlertsPanel");
|
|
10
9
|
const rebass_1 = require("rebass");
|
|
11
10
|
const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
|
|
12
11
|
const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
|
|
12
|
+
const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
|
|
13
13
|
class AlertViewPanelComponent extends React.Component {
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
@@ -31,7 +31,7 @@ class AlertViewPanelComponent extends React.Component {
|
|
|
31
31
|
: this.props.AdaptableAlerts.length == 1
|
|
32
32
|
? '1 Alert'
|
|
33
33
|
: this.props.AdaptableAlerts.length + ' Alerts';
|
|
34
|
-
const alertsPanel =
|
|
34
|
+
const alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
|
|
35
35
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
36
36
|
return (React.createElement(rebass_1.Flex, { alignItems: "stretch", className: `ab-${elementType}__Alert__wrap` },
|
|
37
37
|
React.createElement(rebass_1.Flex, { style: { borderRadius: 'var(--ab__border-radius)' }, className: `ab-${elementType}__Alert__text`, marginRight: 2, padding: 2, color: buttonTextColor, backgroundColor: buttonBackground, fontSize: 'var( --ab-font-size-2)', alignItems: "center" }, collapsedText),
|
|
@@ -53,7 +53,7 @@ exports.AlertPreview = (_a) => {
|
|
|
53
53
|
return result;
|
|
54
54
|
}, [alertDefinition]);
|
|
55
55
|
return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
|
|
56
|
-
React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview,
|
|
56
|
+
React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, onClose: () => { } })));
|
|
57
57
|
};
|
|
58
58
|
exports.AlertDisplayWizardSection = (props) => {
|
|
59
59
|
var _a, _b, _c, _d;
|
|
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
|
|
8
8
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
9
|
-
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const PanelWithImage_1 = require("../Components/Panels/PanelWithImage");
|
|
11
10
|
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
12
11
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
@@ -34,7 +33,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
34
33
|
let dataTypeErrorMessage = '';
|
|
35
34
|
if (col && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue)) {
|
|
36
35
|
// check that the update value is a number for a numeric column. not issue for dates as we dont allow free text
|
|
37
|
-
if (col.dataType ==
|
|
36
|
+
if (col.dataType == 'Number') {
|
|
38
37
|
if (isNaN(Number(this.props.BulkUpdateValue))) {
|
|
39
38
|
hasDataTypeError = true;
|
|
40
39
|
dataTypeErrorMessage = 'This column only accepts numbers';
|
|
@@ -50,7 +49,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
50
49
|
return null;
|
|
51
50
|
}
|
|
52
51
|
return (React.createElement(PanelWithImage_1.PanelWithImage, { bodyProps: { padding: 2 }, flex: 1, glyphicon: this.props.moduleInfo.Glyph, header: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), variant: "primary" },
|
|
53
|
-
col.dataType ==
|
|
52
|
+
col.dataType == 'Date' ? (React.createElement(React.Fragment, null,
|
|
54
53
|
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, "Enter a date value. Alternatively, tick the checkbox and select from an existing column value."),
|
|
55
54
|
React.createElement(rebass_1.Box, null,
|
|
56
55
|
React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, onChange: (checked) => this.onUseColumnValuesSelectorChanged(checked), checked: this.state.useSelector },
|
|
@@ -59,7 +59,7 @@ class BulkUpdateViewPanelComponent extends React.Component {
|
|
|
59
59
|
!shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(ButtonApply_1.ButtonApply, { marginLeft: 2, className: `ab-${elementType}__BulkUpdate__apply`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
|
|
60
60
|
(this.props.PreviewInfo != null &&
|
|
61
61
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Update')),
|
|
62
|
-
!shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
|
|
62
|
+
!shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
|
|
63
63
|
}
|
|
64
64
|
onColumnValueSelectedChanged(selectedColumnValue) {
|
|
65
65
|
this.props.onBulkUpdateValueChange(selectedColumnValue);
|
|
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const rebass_1 = require("rebass");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
|
-
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
|
|
11
10
|
const Tabs_1 = require("../../../components/Tabs");
|
|
12
11
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
@@ -65,8 +64,8 @@ exports.CalculatedColumnExpressionWizardSection = (props) => {
|
|
|
65
64
|
const setCalculatedColumnExpression = (calculatedColumnQuery) => {
|
|
66
65
|
const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
|
|
67
66
|
const dataType = calculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumnQuery);
|
|
68
|
-
const Pivotable = dataType ==
|
|
69
|
-
const Aggregatable = dataType ==
|
|
67
|
+
const Pivotable = dataType == 'String';
|
|
68
|
+
const Aggregatable = dataType == 'Number';
|
|
70
69
|
props.onChange(Object.assign(Object.assign({}, data), { Query: calculatedColumnQuery, CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Pivotable,
|
|
71
70
|
Aggregatable }) }));
|
|
72
71
|
};
|
|
@@ -4,7 +4,6 @@ exports.CalculatedColumnSettingsWizardSection = exports.isValidCalculatedColumnS
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
-
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
8
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
8
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
10
9
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
@@ -64,16 +63,16 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
64
63
|
const validCheck = exports.isValidCalculatedColumnSettings(data, api);
|
|
65
64
|
const ErrorMessage = validCheck === true ? null : validCheck;
|
|
66
65
|
let options = [
|
|
67
|
-
{ value:
|
|
68
|
-
{ value:
|
|
69
|
-
{ value:
|
|
70
|
-
{ value:
|
|
66
|
+
{ value: 'Number', label: 'Number' },
|
|
67
|
+
{ value: 'String', label: 'String' },
|
|
68
|
+
{ value: 'Date', label: 'Date' },
|
|
69
|
+
{ value: 'Boolean', label: 'Boolean' },
|
|
71
70
|
];
|
|
72
71
|
const [ColumnNameFocused, setColumnNameFocused] = react_1.useState(false);
|
|
73
72
|
const ColumnName = data.FriendlyName;
|
|
74
73
|
const ColumnId = data.ColumnId;
|
|
75
74
|
let { DataType: dataType } = (_a = data.CalculatedColumnSettings) !== null && _a !== void 0 ? _a : {};
|
|
76
|
-
const { Width, ShowToolTip, HeaderToolTip } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
|
|
75
|
+
const { Width, ShowToolTip, HeaderToolTip, ExternallyEvaluatedExpression } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
|
|
77
76
|
const handleSpecialColumnSettingsChange = (settings) => {
|
|
78
77
|
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), settings) }));
|
|
79
78
|
};
|
|
@@ -118,7 +117,14 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
118
117
|
}) })),
|
|
119
118
|
' ',
|
|
120
119
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
121
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip"))
|
|
120
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")),
|
|
121
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
122
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-external-expression-evaluation", onChange: (checked) => handleSpecialColumnSettingsChange({ ExternallyEvaluatedExpression: checked }), checked: ExternallyEvaluatedExpression }, "Suppress Expression Evaluation"),
|
|
123
|
+
ExternallyEvaluatedExpression && (React.createElement(rebass_1.Box, { "data-name": "note-external-expression-evaluation", p: 2, style: {
|
|
124
|
+
background: 'var(--ab-color-primary)',
|
|
125
|
+
borderRadius: 'var(--ab__border-radius)',
|
|
126
|
+
whiteSpace: 'pre-wrap',
|
|
127
|
+
} }, "The column value is loaded from the row data property with the same name as the ColumnId"))))))),
|
|
122
128
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
123
129
|
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
124
130
|
};
|
|
@@ -6,14 +6,14 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const EmptyContent_1 = tslib_1.__importDefault(require("../../components/EmptyContent"));
|
|
7
7
|
const InfiniteTable_1 = require("../../components/InfiniteTable");
|
|
8
8
|
const columnsMap = new Map([
|
|
9
|
-
['Operation', { field: 'Operation',
|
|
10
|
-
['Value', { field: 'Value',
|
|
9
|
+
['Operation', { field: 'Operation', defaultFlex: 1 }],
|
|
10
|
+
['Value', { field: 'Value', defaultFlex: 1 }],
|
|
11
11
|
]);
|
|
12
12
|
const tableDOMProps = {
|
|
13
13
|
style: {
|
|
14
14
|
height: '100%',
|
|
15
|
-
minWidth: '
|
|
16
|
-
minHeight:
|
|
15
|
+
minWidth: '20rem',
|
|
16
|
+
minHeight: 380,
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
class CellSummaryDetails extends React.Component {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CellSummmary } from '../../PredefinedConfig/Common/CellSummary';
|
|
3
|
-
export interface CellSummaryPopoverProps
|
|
3
|
+
export interface CellSummaryPopoverProps {
|
|
4
4
|
CellSummary: CellSummmary;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
7
|
-
render(): any;
|
|
8
|
-
}
|
|
6
|
+
export declare const CellSummaryPopover: React.FunctionComponent<CellSummaryPopoverProps>;
|
|
@@ -4,9 +4,6 @@ exports.CellSummaryPopover = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const CellSummaryDetails_1 = require("./CellSummaryDetails");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.CellSummaryPopover = CellSummaryPopover;
|
|
7
|
+
exports.CellSummaryPopover = (props) => {
|
|
8
|
+
return React.createElement(CellSummaryDetails_1.CellSummaryDetails, { CellSummary: props.CellSummary });
|
|
9
|
+
};
|
|
@@ -9,6 +9,14 @@ const CellSummaryDetails_1 = require("./CellSummaryDetails");
|
|
|
9
9
|
const PanelWithButton_1 = require("../Components/Panels/PanelWithButton");
|
|
10
10
|
class CellSummaryPopupComponent extends React.Component {
|
|
11
11
|
componentDidMount() {
|
|
12
|
+
var _a, _b, _c;
|
|
13
|
+
if (((_a = this.props.popupParams) === null || _a === void 0 ? void 0 : _a.source) === 'ColumnMenu' && ((_b = this.props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
|
|
14
|
+
// if the summary was requested from the column menu, we need to select the entire column
|
|
15
|
+
// afterwards, we will go on with the cell summary logic, as that will evaluate the current(column) cell selection
|
|
16
|
+
this.props.api.columnApi.selectColumn((_c = this.props.popupParams) === null || _c === void 0 ? void 0 : _c.column.columnId);
|
|
17
|
+
// we also need to update the internal state of the selected cells
|
|
18
|
+
this.props.api.internalApi.getAdaptableInstance().setSelectedCells();
|
|
19
|
+
}
|
|
12
20
|
this.props.onCreateCellSummary();
|
|
13
21
|
}
|
|
14
22
|
render() {
|
|
@@ -11,5 +11,5 @@ exports.CellSummaryStatusBarSubPanelPopover = () => {
|
|
|
11
11
|
return cellSummary && cellSummary.Count ? (summary) : (
|
|
12
12
|
// the extra wrapper is added because the empty text is rendered
|
|
13
13
|
// inside a EmptyContent, hat has position absolute
|
|
14
|
-
React.createElement("div", { style: { position: 'relative', width:
|
|
14
|
+
React.createElement("div", { style: { position: 'relative', width: '100%', height: 80 } }, summary));
|
|
15
15
|
};
|
|
@@ -14,7 +14,7 @@ exports.CellSummaryStatusPanel = () => {
|
|
|
14
14
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
15
15
|
const dispatch = react_redux_1.useDispatch();
|
|
16
16
|
const cellSummaryApi = adaptable.api.cellSummaryApi;
|
|
17
|
-
const
|
|
17
|
+
const module = adaptable.ModuleService.getModuleById(ModuleConstants.CellSummaryModuleId);
|
|
18
18
|
const text = `${cellSummaryApi.getCurrentCellSummaryOperation()}: ${(_a = cellSummaryApi.getCurrentCellSummaryOperationValue()) !== null && _a !== void 0 ? _a : 'N/A'}`;
|
|
19
19
|
const onAction = () => {
|
|
20
20
|
adaptable.api.cellSummaryApi.showCellSummaryPopup();
|
|
@@ -32,5 +32,5 @@ exports.CellSummaryStatusPanel = () => {
|
|
|
32
32
|
checkSelectedCells();
|
|
33
33
|
return () => cleanupEvent === null || cleanupEvent === void 0 ? void 0 : cleanupEvent();
|
|
34
34
|
}, []);
|
|
35
|
-
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { icon:
|
|
35
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { tooltip: module.moduleInfo.ModuleName, "data-name": module.moduleInfo.ModuleName, icon: module.moduleInfo.Glyph, onAction: onAction, content: text, popover: CellSummaryStatusBarSubPanelPopover_1.CellSummaryStatusBarSubPanelPopover, popoverMinWidth: 360 }));
|
|
36
36
|
};
|