@adaptabletools/adaptable 10.0.2 → 10.0.4-canary.2
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +84 -32
- package/bundle.cjs.js +350 -0
- package/index.css +100 -34
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +24 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +22 -15
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +108 -6
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +49 -5
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +5 -8
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
- package/src/Api/Events/AlertFired.d.ts +2 -1
- package/src/Api/Events/BaseEventInfo.d.ts +10 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
- package/src/Api/Events/CellChanged.d.ts +2 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
- package/src/Api/Events/DashboardChanged.d.ts +2 -1
- package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
- package/src/Api/Events/GridDataChanged.d.ts +2 -1
- package/src/Api/Events/LayoutChanged.d.ts +2 -1
- package/src/Api/Events/LiveDataChanged.d.ts +2 -1
- package/src/Api/Events/SearchChanged.d.ts +2 -1
- package/src/Api/Events/SelectionChanged.d.ts +2 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
- package/src/Api/Events/ThemeChanged.d.ts +2 -1
- package/src/Api/GridApi.d.ts +44 -18
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +22 -15
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +12 -3
- package/src/Api/Implementation/ColumnApiImpl.js +79 -44
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -41
- package/src/Api/Implementation/DashboardApiImpl.js +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
- package/src/Api/Implementation/GridApiImpl.js +30 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -2
- package/src/Api/Implementation/InternalApiImpl.js +21 -5
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +19 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +15 -11
- package/src/Api/Implementation/UserInterfaceApiImpl.js +73 -91
- package/src/Api/InternalApi.d.ts +4 -2
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +19 -9
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +5 -1
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -38
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +3 -3
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +11 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +25 -16
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +13 -105
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +7 -7
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -4
- package/src/Strategy/ExportModule.js +59 -62
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +22 -9
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +8 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
- package/src/Utilities/Helpers/DateHelper.js +30 -20
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +14 -2
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/ReportService.js +13 -12
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +57 -38
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +18 -9
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +74 -35
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +21 -4
- package/src/agGrid/Adaptable.d.ts +28 -11
- package/src/agGrid/Adaptable.js +326 -168
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +46 -46
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +55 -47
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/ExpressionEditor/index.js +7 -7
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +176 -52
- package/src/metamodel/adaptable.metamodel.js +659 -366
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -3,7 +3,7 @@ import { IExportModule } from './Interface/IExportModule';
|
|
|
3
3
|
import { ExportDestination } from '../PredefinedConfig/Common/Enums';
|
|
4
4
|
import { Report } from '../PredefinedConfig/ExportState';
|
|
5
5
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
6
|
-
import { AdaptableMenuItem,
|
|
6
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
8
8
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
9
9
|
export declare class ExportModule extends AdaptableModuleBase implements IExportModule {
|
|
@@ -12,7 +12,7 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
12
12
|
getExplicitlyReferencedColumnIds(report: Report): string[];
|
|
13
13
|
getReferencedNamedQueryNames(report: Report): string[];
|
|
14
14
|
updateOldConfig(): void;
|
|
15
|
-
addContextMenuItems(menuContext:
|
|
15
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
export(report: Report, exportDestination: ExportDestination | string): void;
|
|
17
17
|
private isCustomDestination;
|
|
18
18
|
private convertReportToJSON;
|
|
@@ -24,6 +24,4 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
|
|
|
24
24
|
getTeamSharingAction(): TeamSharingImportInfo<Report>;
|
|
25
25
|
private isEmptyReportData;
|
|
26
26
|
private showEmptyExportWarning;
|
|
27
|
-
private showExportIndicator;
|
|
28
|
-
private hideExportIndicator;
|
|
29
27
|
}
|
|
@@ -14,7 +14,6 @@ const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
|
14
14
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
15
15
|
const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
|
|
16
16
|
const ObjectFactory_1 = require("../Utilities/ObjectFactory");
|
|
17
|
-
const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
|
|
18
17
|
class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
18
|
constructor(api) {
|
|
20
19
|
super(ModuleConstants.ExportModuleId, 'Export', 'export-data', 'ExportPopup', 'Export data from the Grid to numerous locations in numerous formatso', api);
|
|
@@ -27,7 +26,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
27
26
|
this.api.scopeApi.scopeHasColumns(report.Scope)) {
|
|
28
27
|
return this.api.scopeApi
|
|
29
28
|
.getColumnsForScope(report.Scope)
|
|
30
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
29
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
31
30
|
}
|
|
32
31
|
return [];
|
|
33
32
|
}
|
|
@@ -53,68 +52,72 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
52
|
this.api.exportApi.editReports(reportsToEdit);
|
|
54
53
|
}
|
|
55
54
|
addContextMenuItems(menuContext) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
const canExport = !menuContext.isRowGroupColumn &&
|
|
56
|
+
this.isModuleAvailable() &&
|
|
57
|
+
menuContext.selectedCellInfo &&
|
|
58
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
|
|
59
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
|
|
60
|
+
if (!canExport) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const selectedCellReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_CELLS_REPORT);
|
|
64
|
+
const menuItems = [];
|
|
65
|
+
for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
|
|
66
|
+
menuItems.push(this.createColumnMenuItemClickFunction(destination, this.moduleInfo.Glyph, () => this.export(selectedCellReport, destination)));
|
|
67
|
+
}
|
|
68
|
+
for (const customDestination of this.api.exportApi.getAllCustomDestination()) {
|
|
69
|
+
menuItems.push(this.createColumnMenuItemClickFunction(customDestination.name, this.moduleInfo.Glyph, () => this.export(selectedCellReport, customDestination.name)));
|
|
66
70
|
}
|
|
67
|
-
return [
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
label: 'Export Selected Cells',
|
|
74
|
+
isVisible: true,
|
|
75
|
+
icon: this.moduleInfo.Glyph,
|
|
76
|
+
subItems: menuItems,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
68
79
|
}
|
|
69
80
|
export(report, exportDestination) {
|
|
70
|
-
this.
|
|
71
|
-
// setTimeout required to give the export indicator a head-start to render
|
|
72
|
-
setTimeout(() => {
|
|
81
|
+
this.api.internalApi.executeWithProgressIndicator(`${report.Name} Export in progress...`, () => {
|
|
73
82
|
var _a;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
else if (customDestination) {
|
|
86
|
-
customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
|
|
87
|
-
}
|
|
83
|
+
if (this.isCustomDestination(exportDestination)) {
|
|
84
|
+
const customDestination = (_a = this.api.internalApi
|
|
85
|
+
.getAdaptableOptions()
|
|
86
|
+
.exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
|
|
87
|
+
if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
|
|
88
|
+
this.api.internalApi.dispatchReduxAction(SystemRedux.SystemExportCustomDestinationPopupShow({
|
|
89
|
+
ReportName: report.Name,
|
|
90
|
+
ExportDestination: customDestination,
|
|
91
|
+
}));
|
|
88
92
|
}
|
|
89
|
-
else {
|
|
90
|
-
|
|
91
|
-
case Enums_1.ExportDestination.Excel:
|
|
92
|
-
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
93
|
-
// WYSIWYG is fully delegated to the ag-grid excel export
|
|
94
|
-
this.api.exportApi.exportVisualDataToExcel();
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
this.convertReportToExcel(report);
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
case Enums_1.ExportDestination.Clipboard:
|
|
101
|
-
this.copyToClipboard(report);
|
|
102
|
-
break;
|
|
103
|
-
case Enums_1.ExportDestination.CSV:
|
|
104
|
-
this.convertReportToCsv(report);
|
|
105
|
-
break;
|
|
106
|
-
case Enums_1.ExportDestination.JSON:
|
|
107
|
-
this.convertReportToJSON(report);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
93
|
+
else if (customDestination) {
|
|
94
|
+
customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
|
|
110
95
|
}
|
|
111
|
-
this.hideExportIndicator();
|
|
112
96
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
else {
|
|
98
|
+
switch (exportDestination) {
|
|
99
|
+
case Enums_1.ExportDestination.Excel:
|
|
100
|
+
if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
101
|
+
// WYSIWYG is fully delegated to the ag-grid excel export
|
|
102
|
+
this.api.exportApi.exportVisualDataToExcel();
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
this.convertReportToExcel(report);
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case Enums_1.ExportDestination.Clipboard:
|
|
109
|
+
this.copyToClipboard(report);
|
|
110
|
+
break;
|
|
111
|
+
case Enums_1.ExportDestination.CSV:
|
|
112
|
+
this.convertReportToCsv(report);
|
|
113
|
+
break;
|
|
114
|
+
case Enums_1.ExportDestination.JSON:
|
|
115
|
+
this.convertReportToJSON(report);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
116
118
|
}
|
|
117
|
-
|
|
119
|
+
this.api.internalApi.hideProgressIndicator();
|
|
120
|
+
});
|
|
118
121
|
}
|
|
119
122
|
isCustomDestination(exportDestination) {
|
|
120
123
|
if (Object.values(Enums_1.ExportDestination).some((val) => val === exportDestination)) {
|
|
@@ -183,11 +186,5 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
183
186
|
alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
184
187
|
}));
|
|
185
188
|
}
|
|
186
|
-
showExportIndicator(label) {
|
|
187
|
-
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorShow(label));
|
|
188
|
-
}
|
|
189
|
-
hideExportIndicator() {
|
|
190
|
-
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorHide());
|
|
191
|
-
}
|
|
192
189
|
}
|
|
193
190
|
exports.ExportModule = ExportModule;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
|
-
import { AdaptableMenuItem,
|
|
3
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { ColumnFilter } from '../PredefinedConfig/FilterState';
|
|
6
6
|
import { IModule } from './Interface/IModule';
|
|
@@ -12,7 +12,7 @@ export declare class FilterModule extends AdaptableModuleBase implements IModule
|
|
|
12
12
|
getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
|
|
13
13
|
hasNamedQueryReferences(): boolean;
|
|
14
14
|
handleAdaptableReady(): void;
|
|
15
|
-
addContextMenuItems(menuContext:
|
|
15
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
16
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
17
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
18
18
|
}
|
|
@@ -32,7 +32,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
32
32
|
let menuItemClickFunction = undefined;
|
|
33
33
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
34
34
|
if (menuContext.adaptableColumn &&
|
|
35
|
-
menuContext.adaptableColumn.
|
|
35
|
+
menuContext.adaptableColumn.filterable &&
|
|
36
36
|
menuContext.isSingleSelectedColumn &&
|
|
37
37
|
menuContext.gridCell != null) {
|
|
38
38
|
let isMultiple = menuContext.selectedCellInfo.gridCells.length > 1;
|
|
@@ -42,7 +42,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
42
42
|
})
|
|
43
43
|
: [menuContext.gridCell.primaryKeyValue];
|
|
44
44
|
let clickFunction = () => {
|
|
45
|
-
this.api.filterApi.createColumnFilterForCell(menuContext.adaptableColumn.
|
|
45
|
+
this.api.filterApi.createColumnFilterForCell(menuContext.adaptableColumn.columnId, pkValues);
|
|
46
46
|
};
|
|
47
47
|
menuItemClickFunction = this.createColumnMenuItemClickFunction(isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction);
|
|
48
48
|
}
|
|
@@ -53,14 +53,14 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
53
|
let baseMenuItems = [];
|
|
54
54
|
if (column && this.api.gridApi.isQuickFilterAvailable()) {
|
|
55
55
|
const isFilterVisible = this.api.filterApi.isQuickFilterVisible();
|
|
56
|
-
if (this.isModuleEditable() && this.api.columnApi.usesAdaptableQuickFilter(column.
|
|
56
|
+
if (this.isModuleEditable() && this.api.columnApi.usesAdaptableQuickFilter(column.columnId)) {
|
|
57
57
|
baseMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide Quick Filter Bar' : 'Show Quick Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible ? FilterRedux.QuickFilterBarHide() : FilterRedux.QuickFilterBarShow()));
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
if (column && this.canCreateColumnMenuItem(column, 'ReadOnly', 'filter')) {
|
|
61
61
|
let existingColumnFilter = this.api.filterApi
|
|
62
62
|
.getAllColumnFilter()
|
|
63
|
-
.find((x) => x.ColumnId == column.
|
|
63
|
+
.find((x) => x.ColumnId == column.columnId);
|
|
64
64
|
if (existingColumnFilter) {
|
|
65
65
|
baseMenuItems.push(this.createColumnMenuItemReduxAction('Clear Filter', this.moduleInfo.Glyph, FilterRedux.ColumnFilterClear(existingColumnFilter)));
|
|
66
66
|
}
|
|
@@ -18,7 +18,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
18
18
|
if (this.api.scopeApi.scopeHasColumns(formatColumn.Scope)) {
|
|
19
19
|
return this.api.scopeApi
|
|
20
20
|
.getColumnsForScope(formatColumn.Scope)
|
|
21
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
21
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
22
22
|
}
|
|
23
23
|
return [];
|
|
24
24
|
}
|
|
@@ -133,7 +133,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
133
133
|
if (formatColumn) {
|
|
134
134
|
return formatColumn;
|
|
135
135
|
}
|
|
136
|
-
// special columns (
|
|
136
|
+
// special columns (Calculated, FreeText, Action) are not yet part of AG-GridS colDefs
|
|
137
137
|
// so we have to check if the given columnId is a special column
|
|
138
138
|
const isSpecialColumn = !!this.api.calculatedColumnApi.getCalculatedColumnForColumnId(columnId) ||
|
|
139
139
|
!!this.api.freeTextColumnApi.getFreeTextColumnById(columnId);
|
|
@@ -148,7 +148,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
148
148
|
addColumnMenuItems(column) {
|
|
149
149
|
var _a;
|
|
150
150
|
let returnColumnMenuItems = [];
|
|
151
|
-
if (column && this.isModuleEditable() && !column.
|
|
151
|
+
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
152
152
|
// not fullproof as might be an All but its generally pretty good
|
|
153
153
|
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(column);
|
|
154
154
|
let formatExists = formatColumn
|
|
@@ -165,8 +165,8 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
165
165
|
value: formatColumn,
|
|
166
166
|
};
|
|
167
167
|
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
168
|
-
if (column.
|
|
169
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.
|
|
168
|
+
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
169
|
+
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.columnId);
|
|
170
170
|
let hasCheckBox = formatColumn && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle);
|
|
171
171
|
if (hasCheckBox) {
|
|
172
172
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'check-box-outline', () => {
|
|
@@ -188,7 +188,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
188
188
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'check-box', () => {
|
|
189
189
|
let newFormatColumn = {
|
|
190
190
|
Scope: {
|
|
191
|
-
ColumnIds: [column.
|
|
191
|
+
ColumnIds: [column.columnId],
|
|
192
192
|
},
|
|
193
193
|
ColumnStyle: {
|
|
194
194
|
CheckBoxStyle: true,
|
|
@@ -24,7 +24,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
24
24
|
if (column && this.isModuleEditable()) {
|
|
25
25
|
if (this.api.freeTextColumnApi
|
|
26
26
|
.getAllFreeTextColumn()
|
|
27
|
-
.find((ftc) => ftc.ColumnId == column.
|
|
27
|
+
.find((ftc) => ftc.ColumnId == column.columnId)) {
|
|
28
28
|
let popupParam = {
|
|
29
29
|
column: column,
|
|
30
30
|
action: 'Edit',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
-
import { AdaptableMenuItem,
|
|
2
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { IModule } from './Interface/IModule';
|
|
5
5
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
@@ -8,5 +8,5 @@ export declare class GridInfoModule extends AdaptableModuleBase implements IModu
|
|
|
8
8
|
constructor(api: AdaptableApi);
|
|
9
9
|
getViewAccessLevel(): AccessLevel;
|
|
10
10
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
11
|
-
addContextMenuItems(menuContext:
|
|
11
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
|
-
import { AdaptableMenuItem,
|
|
2
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../../PredefinedConfig/Common/Menu';
|
|
3
3
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
4
4
|
import { TeamSharingImportInfo } from '../../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -35,7 +35,7 @@ export interface IModule {
|
|
|
35
35
|
AccessLevel: AccessLevel;
|
|
36
36
|
addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
37
37
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
38
|
-
addContextMenuItems(menuContext:
|
|
38
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
39
39
|
setModuleEntitlement(): void;
|
|
40
40
|
isModuleAvailable(): boolean;
|
|
41
41
|
isModuleEditable(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
|
|
3
|
-
import { AdaptableMenuItem,
|
|
3
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
6
6
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
@@ -14,6 +14,6 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
|
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
15
|
handleAdaptableReady(): void;
|
|
16
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
|
-
addContextMenuItems(menuContext:
|
|
17
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
18
18
|
getTeamSharingAction(): TeamSharingImportInfo<Layout>;
|
|
19
19
|
}
|
|
@@ -38,19 +38,32 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
38
38
|
addColumnMenuItems(column) {
|
|
39
39
|
let returnColumnMenuItems = [];
|
|
40
40
|
if (this.isModuleEditable()) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Hide Column', 'hide-column', () => {
|
|
47
|
-
this.api.columnApi.hideColumn(column.ColumnId);
|
|
41
|
+
const isReadOnlyLayout = this.api.layoutApi.isCurrentLayoutReadOnly();
|
|
42
|
+
if (!isReadOnlyLayout) {
|
|
43
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
44
|
+
action: 'Edit',
|
|
45
|
+
source: 'ColumnMenu',
|
|
48
46
|
}));
|
|
49
47
|
}
|
|
48
|
+
if (column) {
|
|
49
|
+
if (!isReadOnlyLayout) {
|
|
50
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Change Caption', 'edit', () => {
|
|
51
|
+
let newname = prompt('Enter a new Caption for the Column');
|
|
52
|
+
if (newname) {
|
|
53
|
+
this.api.layoutApi.setColumnCaption(column.columnId, newname);
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
if (column.hideable) {
|
|
58
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Hide Column', 'hide-column', () => {
|
|
59
|
+
this.api.columnApi.hideColumn(column.columnId);
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
50
63
|
let selectMenuItems = [];
|
|
51
64
|
if (column) {
|
|
52
65
|
selectMenuItems.push(this.createColumnMenuItemClickFunction('Column', 'column-chooser', () => {
|
|
53
|
-
this.api.columnApi.selectColumn(column.
|
|
66
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
54
67
|
}));
|
|
55
68
|
}
|
|
56
69
|
selectMenuItems.push(this.createColumnMenuItemClickFunction('Whole Grid', this.moduleInfo.Glyph, () => {
|
|
@@ -67,7 +80,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
67
80
|
}
|
|
68
81
|
addContextMenuItems(menuContext) {
|
|
69
82
|
let returnColumnMenuItems = [];
|
|
70
|
-
if (this.isModuleEditable()) {
|
|
83
|
+
if (this.isModuleEditable() && !this.api.layoutApi.isCurrentLayoutReadOnly()) {
|
|
71
84
|
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Edit Layout', this.moduleInfo.Popup, this.moduleInfo.Glyph, {
|
|
72
85
|
action: 'Edit',
|
|
73
86
|
source: 'ColumnMenu',
|
|
@@ -22,7 +22,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
if (this.api.scopeApi.scopeHasColumns(plusMinusNudge.Scope)) {
|
|
23
23
|
return this.api.scopeApi
|
|
24
24
|
.getColumnsForScope(plusMinusNudge.Scope)
|
|
25
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
25
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
26
26
|
}
|
|
27
27
|
return [];
|
|
28
28
|
}
|
|
@@ -52,7 +52,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
52
52
|
this.shouldHandleKeyDown = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(plusMinusNudges);
|
|
53
53
|
}
|
|
54
54
|
addColumnMenuItems(column) {
|
|
55
|
-
if (column && this.isModuleEditable() && column.
|
|
55
|
+
if (column && this.isModuleEditable() && column.dataType == 'Number') {
|
|
56
56
|
let popupParam = {
|
|
57
57
|
column: column,
|
|
58
58
|
action: 'New',
|
|
@@ -86,15 +86,14 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
86
86
|
let failedPreventEdits = [];
|
|
87
87
|
let side = direction == 'up' ? 1 : -1;
|
|
88
88
|
cellsToUpdate.forEach((gridCell) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
!selectedColumn.ReadOnly) {
|
|
89
|
+
if (gridCell.column &&
|
|
90
|
+
gridCell.column.dataType == Enums_1.DataType.Number &&
|
|
91
|
+
!gridCell.column.readOnly) {
|
|
93
92
|
let foundRule;
|
|
94
93
|
let replacementGridCell;
|
|
95
94
|
plusMinusNudges.forEach((pmr) => {
|
|
96
95
|
if (!foundRule) {
|
|
97
|
-
if (this.api.scopeApi.isColumnInScope(
|
|
96
|
+
if (this.api.scopeApi.isColumnInScope(gridCell.column, pmr.Scope)) {
|
|
98
97
|
if (this.api.gridApi.areCellsEditable([gridCell])) {
|
|
99
98
|
//for aggrid as we are getting strings sometimes
|
|
100
99
|
if (typeof gridCell.rawValue != 'number') {
|
|
@@ -109,7 +108,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
109
108
|
// computedValue= parseFloat(computedValue.toFixed(12));
|
|
110
109
|
replacementGridCell = {
|
|
111
110
|
primaryKeyValue: gridCell.primaryKeyValue,
|
|
112
|
-
|
|
111
|
+
column: gridCell.column,
|
|
113
112
|
rawValue: computedValue,
|
|
114
113
|
displayValue: computedValue,
|
|
115
114
|
normalisedValue: computedValue,
|
|
@@ -124,7 +123,7 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
124
123
|
const dataChangedEvent = this.api.internalApi.buildDataChangedInfo({
|
|
125
124
|
oldValue: Number(gridCell.rawValue),
|
|
126
125
|
newValue: replacementGridCell.rawValue,
|
|
127
|
-
|
|
126
|
+
column: gridCell.column,
|
|
128
127
|
primaryKeyValue: gridCell.primaryKeyValue,
|
|
129
128
|
rowNode: gridCell.rowNode,
|
|
130
129
|
trigger: 'edit',
|
|
@@ -4,13 +4,13 @@ import { IModuleActionReturn } from './Interface/IModuleActionReturn';
|
|
|
4
4
|
import { ISmartEditModule } from './Interface/ISmartEditModule';
|
|
5
5
|
import { PreviewInfo } from '../Utilities/Interface/Preview';
|
|
6
6
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
7
|
-
import { AdaptableMenuItem,
|
|
7
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
8
8
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
9
9
|
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
10
10
|
export declare class SmartEditModule extends AdaptableModuleBase implements ISmartEditModule {
|
|
11
11
|
constructor(api: AdaptableApi);
|
|
12
12
|
getViewAccessLevel(): AccessLevel;
|
|
13
|
-
addContextMenuItems(menuContext:
|
|
13
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
14
14
|
ApplySmartEdit(newValues: GridCell[]): void;
|
|
15
15
|
CheckCorrectCellSelection(): IModuleActionReturn<boolean>;
|
|
16
16
|
BuildPreviewValues(smartEditValue: number, smartEditOperation: MathOperation): PreviewInfo;
|
|
@@ -23,8 +23,8 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
23
23
|
let menuItemShowPopup = undefined;
|
|
24
24
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
25
25
|
if (menuContext.adaptableColumn &&
|
|
26
|
-
menuContext.adaptableColumn.
|
|
27
|
-
!menuContext.adaptableColumn.
|
|
26
|
+
menuContext.adaptableColumn.dataType == Enums_1.DataType.Number &&
|
|
27
|
+
!menuContext.adaptableColumn.readOnly &&
|
|
28
28
|
menuContext.isSelectedCell &&
|
|
29
29
|
menuContext.isSingleSelectedColumn &&
|
|
30
30
|
this.api.gridApi.areCellsEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -75,7 +75,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
75
75
|
}
|
|
76
76
|
let column = selectedCellInfo.columns[0];
|
|
77
77
|
if (column) {
|
|
78
|
-
if (column.
|
|
78
|
+
if (column.dataType != Enums_1.DataType.Number) {
|
|
79
79
|
return {
|
|
80
80
|
Alert: {
|
|
81
81
|
header: 'Smart Edit Error',
|
|
@@ -84,7 +84,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
84
84
|
},
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
if (column.
|
|
87
|
+
if (column.readOnly) {
|
|
88
88
|
return {
|
|
89
89
|
Alert: {
|
|
90
90
|
header: 'Smart Edit Error',
|
|
@@ -109,12 +109,11 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
109
109
|
BuildPreviewValues(smartEditValue, smartEditOperation) {
|
|
110
110
|
let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
|
|
111
111
|
let previewResults = [];
|
|
112
|
-
let
|
|
112
|
+
let column;
|
|
113
113
|
if (!this.api.internalApi.isGridInPivotMode()) {
|
|
114
114
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(selectedCellInfo.columns)) {
|
|
115
|
-
|
|
115
|
+
column = this.api.columnApi.getColumnFromId(selectedCellInfo.columns[0].columnId);
|
|
116
116
|
if (column) {
|
|
117
|
-
columnId = column.ColumnId;
|
|
118
117
|
selectedCellInfo.gridCells.forEach((selectedCell) => {
|
|
119
118
|
let newValue;
|
|
120
119
|
switch (smartEditOperation) {
|
|
@@ -138,7 +137,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
138
137
|
let dataChangedEvent = this.api.internalApi.buildDataChangedInfo({
|
|
139
138
|
oldValue: Number(selectedCell.rawValue),
|
|
140
139
|
newValue: newValue,
|
|
141
|
-
|
|
140
|
+
column: selectedCell.column,
|
|
142
141
|
primaryKeyValue: selectedCell.primaryKeyValue,
|
|
143
142
|
rowNode: selectedCell.rowNode,
|
|
144
143
|
trigger: 'edit',
|
|
@@ -159,7 +158,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
return {
|
|
162
|
-
|
|
161
|
+
column: column,
|
|
163
162
|
previewResults: previewResults,
|
|
164
163
|
previewValidationSummary: PreviewHelper_1.PreviewHelper.GetPreviewValidationSummary(previewResults),
|
|
165
164
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
-
import { AdaptableMenuItem,
|
|
2
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { IModule } from './Interface/IModule';
|
|
5
5
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
6
6
|
export declare class SystemStatusModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
9
|
-
addContextMenuItems(menuContext:
|
|
9
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
10
10
|
}
|
|
@@ -25,6 +25,7 @@ export declare const SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE: number;
|
|
|
25
25
|
export declare const CHART_DEFAULT_REFRESH_RATE: number;
|
|
26
26
|
export declare const QUICK_SEARCH_DEFAULT_BACK_COLOR: string;
|
|
27
27
|
export declare const QUICK_SEARCH_DEFAULT_FORE_COLOR: string;
|
|
28
|
+
export declare const QUICK_SEARCH_DEBOUNCE_TIME: number;
|
|
28
29
|
export declare const CELL_SUMMARY_DEFAULT_OPERATION: SummaryOperation | string;
|
|
29
30
|
export declare const SYSTEM_DEFAULT_CHART_VISIBILITY: ChartVisibility;
|
|
30
31
|
export declare const SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE: AdaptableMessageType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_DATA_SOURCE_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.CURRENT_CHART_NAME_STATE_PROPERTY = exports.ALERT_DEFAULT_LOG_TO_CONSOLE = exports.ALERT_DEFAULT_HIGHLIGHT_ROW = exports.ALERT_DEFAULT_HIGHLIGHT_CELL = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.ALERT_DEFAULT_RANGE_OPERAND_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.CHART_DEFAULT_YAXIS_TOTAL = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.SYSTEM_DEFAULT_CHART_VISIBILITY = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.CHART_DEFAULT_REFRESH_RATE = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
3
|
+
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_DATA_SOURCE_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.CURRENT_CHART_NAME_STATE_PROPERTY = exports.ALERT_DEFAULT_LOG_TO_CONSOLE = exports.ALERT_DEFAULT_HIGHLIGHT_ROW = exports.ALERT_DEFAULT_HIGHLIGHT_CELL = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.ALERT_DEFAULT_RANGE_OPERAND_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.CHART_DEFAULT_YAXIS_TOTAL = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.SYSTEM_DEFAULT_CHART_VISIBILITY = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.CHART_DEFAULT_REFRESH_RATE = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
4
4
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
5
5
|
const ChartEnums_1 = require("../../PredefinedConfig/Common/ChartEnums");
|
|
6
6
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
@@ -35,6 +35,7 @@ exports.CHART_DEFAULT_REFRESH_RATE = 3; // refresh the chart every 3 seconds if
|
|
|
35
35
|
// Quick Search
|
|
36
36
|
exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = UIHelper_1.getHexForName(UIHelper_1.LIGHT_YELLOW);
|
|
37
37
|
exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = UIHelper_1.getHexForName(UIHelper_1.BLACK);
|
|
38
|
+
exports.QUICK_SEARCH_DEBOUNCE_TIME = 350;
|
|
38
39
|
// Cells Summary
|
|
39
40
|
exports.CELL_SUMMARY_DEFAULT_OPERATION = Enums_1.SummaryOperation.Sum;
|
|
40
41
|
// system
|
|
@@ -4,29 +4,29 @@ export declare const BulkUpdateModuleId: ModuleConstants;
|
|
|
4
4
|
export declare const CalculatedColumnModuleId: ModuleConstants;
|
|
5
5
|
export declare const CellSummaryModuleId: ModuleConstants;
|
|
6
6
|
export declare const ChartModuleId: ModuleConstants;
|
|
7
|
-
export declare const FilterModuleId: ModuleConstants;
|
|
8
7
|
export declare const ConditionalStyleModuleId: ModuleConstants;
|
|
9
8
|
export declare const CustomSortModuleId: ModuleConstants;
|
|
10
9
|
export declare const DashboardModuleId: ModuleConstants;
|
|
10
|
+
export declare const DataChangeHistoryModuleId: ModuleConstants;
|
|
11
11
|
export declare const DataSourceModuleId: ModuleConstants;
|
|
12
12
|
export declare const ExportModuleId: ModuleConstants;
|
|
13
|
+
export declare const FilterModuleId: ModuleConstants;
|
|
13
14
|
export declare const FormatColumnModuleId: ModuleConstants;
|
|
14
15
|
export declare const FreeTextColumnModuleId: ModuleConstants;
|
|
15
|
-
export declare const OpenFinModuleId: ModuleConstants;
|
|
16
16
|
export declare const Glue42ModuleId: ModuleConstants;
|
|
17
|
+
export declare const GridInfoModuleId: ModuleConstants;
|
|
17
18
|
export declare const IPushPullModuleId: ModuleConstants;
|
|
18
19
|
export declare const LayoutModuleId: ModuleConstants;
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const SparklineColumnModuleId: ModuleConstants;
|
|
20
|
+
export declare const OpenFinModuleId: ModuleConstants;
|
|
21
21
|
export declare const PlusMinusModuleId: ModuleConstants;
|
|
22
|
+
export declare const QueryModuleId: ModuleConstants;
|
|
22
23
|
export declare const QuickSearchModuleId: ModuleConstants;
|
|
23
24
|
export declare const ScheduleModuleId: ModuleConstants;
|
|
24
25
|
export declare const ShortcutModuleId: ModuleConstants;
|
|
25
26
|
export declare const SmartEditModuleId: ModuleConstants;
|
|
27
|
+
export declare const SparklineColumnModuleId: ModuleConstants;
|
|
26
28
|
export declare const StateManagementModuleId: ModuleConstants;
|
|
27
29
|
export declare const SystemStatusModuleId: ModuleConstants;
|
|
28
30
|
export declare const TeamSharingModuleId: ModuleConstants;
|
|
29
31
|
export declare const ThemeModuleId: ModuleConstants;
|
|
30
32
|
export declare const ToolPanelModuleId: ModuleConstants;
|
|
31
|
-
export declare const QueryModuleId: ModuleConstants;
|
|
32
|
-
export declare const DataChangeHistoryModuleId: ModuleConstants;
|