@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
|
@@ -83,6 +83,7 @@ class AdaptableReduxLocalStorageEngine {
|
|
|
83
83
|
return this.saveNow(state, getState);
|
|
84
84
|
}
|
|
85
85
|
saveNow(state, getState) {
|
|
86
|
+
var _a;
|
|
86
87
|
const config = {
|
|
87
88
|
adaptableId: this.adaptableId,
|
|
88
89
|
adaptableStateKey: this.adaptableStateKey,
|
|
@@ -92,7 +93,11 @@ class AdaptableReduxLocalStorageEngine {
|
|
|
92
93
|
if (getState) {
|
|
93
94
|
result = getState(state, config);
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
+
const promise = (_a = (this.persistState || persistState)(result, config)) === null || _a === void 0 ? void 0 : _a.catch(rejectWithMessage);
|
|
97
|
+
if (!(promise instanceof Promise)) {
|
|
98
|
+
LoggingHelper_1.ConsoleLogByMessageType('stateOptions.persistState should return a promise, it returned', 'Error', promise);
|
|
99
|
+
}
|
|
100
|
+
return promise;
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
function rejectWithMessage(error) {
|
|
@@ -22,7 +22,7 @@ export declare const LoadState: (State: {
|
|
|
22
22
|
[s: string]: ConfigState;
|
|
23
23
|
}) => LoadStateAction;
|
|
24
24
|
export declare class AdaptableStore implements IAdaptableStore {
|
|
25
|
-
private
|
|
25
|
+
private isAgGridReady;
|
|
26
26
|
TheStore: Redux.Store<AdaptableState>;
|
|
27
27
|
Load: Promise<any>;
|
|
28
28
|
private emitter;
|
|
@@ -36,9 +36,9 @@ export declare class AdaptableStore implements IAdaptableStore {
|
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @param adaptable The Adaptable instance
|
|
39
|
-
* @param
|
|
39
|
+
* @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
|
|
40
40
|
*/
|
|
41
|
-
constructor(adaptable: IAdaptable,
|
|
41
|
+
constructor(adaptable: IAdaptable, isAgGridReady: Promise<any>);
|
|
42
42
|
getCurrentStorageState(): AdaptableState;
|
|
43
43
|
saveStateNow(adaptable: IAdaptable): Promise<any>;
|
|
44
44
|
loadStore: (adaptable: IAdaptable, adaptableStateKey: string, predefinedConfig?: PredefinedConfig) => Promise<any>;
|
|
@@ -43,6 +43,7 @@ const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
|
|
|
43
43
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
44
44
|
const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
|
|
45
45
|
const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
|
|
46
|
+
const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
|
|
46
47
|
exports.INIT_STATE = 'INIT_STATE';
|
|
47
48
|
exports.LOAD_STATE = 'LOAD_STATE';
|
|
48
49
|
const NON_PERSIST_ACTIONS = {
|
|
@@ -50,6 +51,9 @@ const NON_PERSIST_ACTIONS = {
|
|
|
50
51
|
'@@INIT': true,
|
|
51
52
|
'@@redux/init': true,
|
|
52
53
|
[exports.INIT_STATE]: true,
|
|
54
|
+
// progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
|
|
55
|
+
[SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_SHOW]: true,
|
|
56
|
+
[SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_HIDE]: true,
|
|
53
57
|
};
|
|
54
58
|
exports.InitState = () => ({
|
|
55
59
|
type: exports.INIT_STATE,
|
|
@@ -62,13 +66,13 @@ class AdaptableStore {
|
|
|
62
66
|
/**
|
|
63
67
|
*
|
|
64
68
|
* @param adaptable The Adaptable instance
|
|
65
|
-
* @param
|
|
69
|
+
* @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
|
|
66
70
|
*/
|
|
67
|
-
constructor(adaptable,
|
|
71
|
+
constructor(adaptable, isAgGridReady) {
|
|
68
72
|
/*
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.
|
|
73
|
+
This is the main store for Adaptable State
|
|
74
|
+
*/
|
|
75
|
+
this.isAgGridReady = isAgGridReady;
|
|
72
76
|
this.loadStorageInProgress = false;
|
|
73
77
|
this.loadStateOnStartup = true; // set to false if you want no state
|
|
74
78
|
this.on = (eventName, callback) => {
|
|
@@ -91,8 +95,8 @@ class AdaptableStore {
|
|
|
91
95
|
this.TheStore.dispatch(exports.LoadState(adaptable.adaptableOptions.stateOptions.applyState(storedState)));
|
|
92
96
|
}
|
|
93
97
|
})
|
|
94
|
-
// we need
|
|
95
|
-
.then(() => this.
|
|
98
|
+
// we need AG Grid to be ready because several states(ex. Layout) depend on its API
|
|
99
|
+
.then(() => this.isAgGridReady)
|
|
96
100
|
.then(() => {
|
|
97
101
|
this.TheStore.dispatch(exports.InitState());
|
|
98
102
|
// END STATE LOAD
|
|
@@ -309,7 +313,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
309
313
|
*******************/
|
|
310
314
|
case SystemRedux.SYSTEM_FLASHING_ALERT_ADD:
|
|
311
315
|
case SystemRedux.SYSTEM_FLASHING_ALERT_DELETE: {
|
|
312
|
-
const { flashingAlert: FlashingAlert
|
|
316
|
+
const { flashingAlert: FlashingAlert } = action;
|
|
313
317
|
const { dataChangedInfo } = FlashingAlert;
|
|
314
318
|
let ret = next(action);
|
|
315
319
|
if (dataChangedInfo) {
|
|
@@ -382,7 +386,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
382
386
|
if (((_c = actionTyped.alert.alertDefinition.AlertProperties) === null || _c === void 0 ? void 0 : _c.HighlightCell) &&
|
|
383
387
|
actionTyped.alert.dataChangedInfo) {
|
|
384
388
|
let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
|
|
385
|
-
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
|
|
389
|
+
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
|
|
386
390
|
}
|
|
387
391
|
return ret;
|
|
388
392
|
}
|
|
@@ -398,7 +402,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
398
402
|
var _a;
|
|
399
403
|
if (((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) && alert.dataChangedInfo) {
|
|
400
404
|
let rowNode = alert.dataChangedInfo.rowNode;
|
|
401
|
-
adaptable.refreshCells([rowNode], [alert.dataChangedInfo.columnId], true);
|
|
405
|
+
adaptable.refreshCells([rowNode], [alert.dataChangedInfo.column.columnId], true);
|
|
402
406
|
}
|
|
403
407
|
});
|
|
404
408
|
return ret;
|
|
@@ -412,7 +416,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
412
416
|
let ret = next(action);
|
|
413
417
|
if (actionTyped.alert.dataChangedInfo) {
|
|
414
418
|
let rowNode = actionTyped.alert.dataChangedInfo.rowNode;
|
|
415
|
-
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.columnId], true);
|
|
419
|
+
adaptable.refreshCells([rowNode], [actionTyped.alert.dataChangedInfo.column.columnId], true);
|
|
416
420
|
}
|
|
417
421
|
return ret;
|
|
418
422
|
}
|
|
@@ -678,13 +682,15 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
678
682
|
case LayoutRedux.LAYOUT_EDIT:
|
|
679
683
|
case LayoutRedux.LAYOUT_SAVE:
|
|
680
684
|
case LayoutRedux.LAYOUT_DELETE:
|
|
685
|
+
case LayoutRedux.LAYOUT_SET_COLUMN_CAPTION:
|
|
681
686
|
case LayoutRedux.LAYOUT_SELECT: {
|
|
682
687
|
const oldLayoutState = middlewareAPI.getState().Layout;
|
|
683
688
|
let returnAction = next(action);
|
|
684
689
|
const newLayoutState = middlewareAPI.getState().Layout;
|
|
685
690
|
adaptable.api.layoutApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
|
|
686
691
|
if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
|
|
687
|
-
returnAction.type == LayoutRedux.LAYOUT_DELETE
|
|
692
|
+
returnAction.type == LayoutRedux.LAYOUT_DELETE ||
|
|
693
|
+
returnAction.type == LayoutRedux.LAYOUT_SET_COLUMN_CAPTION) {
|
|
688
694
|
let gridState = middlewareAPI.getState().Grid;
|
|
689
695
|
let currentLayout = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout);
|
|
690
696
|
if (gridState.CurrentLayout) {
|
|
@@ -1045,7 +1051,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1045
1051
|
case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
|
|
1046
1052
|
let returnAction = next(action);
|
|
1047
1053
|
const actionTyped = action;
|
|
1048
|
-
const [importStepActions, needsOverwriteConfirmation
|
|
1054
|
+
const [importStepActions, needsOverwriteConfirmation] = adaptable.api.internalApi
|
|
1049
1055
|
.getTeamSharingService()
|
|
1050
1056
|
.buildSharedEntityImportActions(actionTyped.SharedEntity);
|
|
1051
1057
|
const processImportAction = TeamSharingRedux.TeamSharingProcessImport(importStepActions);
|
|
@@ -1118,14 +1124,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1118
1124
|
.getSharedEntities(adaptableId)
|
|
1119
1125
|
.then((sharedEntities) => {
|
|
1120
1126
|
// check if remote server has a newer revision
|
|
1121
|
-
const [localRevision, remoteRevision
|
|
1127
|
+
const [localRevision, remoteRevision] = adaptable.api.internalApi
|
|
1122
1128
|
.getTeamSharingService()
|
|
1123
1129
|
.getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, sharedEntities);
|
|
1124
1130
|
if (remoteRevision > localRevision) {
|
|
1125
1131
|
// if remote has a newer version, we will NOT overwrite it
|
|
1126
1132
|
return;
|
|
1127
1133
|
}
|
|
1128
|
-
const [updatedSharedEntities, newActiveEntities
|
|
1134
|
+
const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
|
|
1129
1135
|
.getTeamSharingService()
|
|
1130
1136
|
.updateActiveSharedEntity(ChangedAdaptableObject, UserName, sharedEntities);
|
|
1131
1137
|
middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newActiveEntities));
|
|
@@ -1191,7 +1197,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1191
1197
|
case GridRedux.GRID_REFRESH_CELLS: {
|
|
1192
1198
|
const actionTyped = action;
|
|
1193
1199
|
let ret = next(action);
|
|
1194
|
-
adaptable.refreshCells(actionTyped.
|
|
1200
|
+
adaptable.refreshCells(actionTyped.rowNodes, actionTyped.columnIds, true);
|
|
1195
1201
|
return ret;
|
|
1196
1202
|
}
|
|
1197
1203
|
case GridRedux.GRID_SET_SORT: {
|
|
@@ -1242,6 +1248,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1242
1248
|
*******************/
|
|
1243
1249
|
case exports.INIT_STATE: {
|
|
1244
1250
|
let returnAction = next(action);
|
|
1251
|
+
if (adaptable.isDestroyed) {
|
|
1252
|
+
return returnAction;
|
|
1253
|
+
}
|
|
1245
1254
|
// make sure we have the grid columns in state, before we do any layout work
|
|
1246
1255
|
adaptable.updateColumnsIntoStore();
|
|
1247
1256
|
const layoutState = middlewareAPI.getState().Layout;
|
|
@@ -3,7 +3,7 @@ import { Action } from 'redux';
|
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
5
5
|
import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
|
|
6
|
-
import { AdaptableMenuItem,
|
|
6
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
8
8
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
9
9
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -33,7 +33,7 @@ export declare abstract class AdaptableModuleBase implements IModule {
|
|
|
33
33
|
addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
34
34
|
addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
|
|
35
35
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
36
|
-
addContextMenuItems(menuContext:
|
|
36
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
37
37
|
createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }: {
|
|
38
38
|
Label: string;
|
|
39
39
|
ComponentName: string;
|
|
@@ -118,26 +118,26 @@ class AdaptableModuleBase {
|
|
|
118
118
|
return false;
|
|
119
119
|
}
|
|
120
120
|
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(functionType)) {
|
|
121
|
-
if (functionType == 'sort' && !column.
|
|
122
|
-
return column.
|
|
121
|
+
if (functionType == 'sort' && !column.isSparkline) {
|
|
122
|
+
return column.sortable;
|
|
123
123
|
}
|
|
124
124
|
else if (functionType == 'editable') {
|
|
125
|
-
return !column.
|
|
125
|
+
return !column.readOnly;
|
|
126
126
|
}
|
|
127
127
|
else if (functionType == 'style') {
|
|
128
|
-
return !column.
|
|
128
|
+
return !column.isSparkline;
|
|
129
129
|
}
|
|
130
130
|
else if (functionType == 'sparkline') {
|
|
131
|
-
return column.
|
|
131
|
+
return column.isSparkline;
|
|
132
132
|
}
|
|
133
133
|
else if (functionType == 'numeric') {
|
|
134
|
-
return column.
|
|
134
|
+
return column.dataType == Enums_1.DataType.Number;
|
|
135
135
|
}
|
|
136
136
|
else if (functionType == 'filter') {
|
|
137
|
-
return column.
|
|
137
|
+
return column.filterable;
|
|
138
138
|
}
|
|
139
139
|
else if (functionType == 'quickfilter') {
|
|
140
|
-
return this.api.columnApi.usesAdaptableQuickFilter(column.
|
|
140
|
+
return this.api.columnApi.usesAdaptableQuickFilter(column.columnId);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
return true;
|
|
@@ -2,7 +2,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
|
|
|
2
2
|
import { AlertDefinition } from '../PredefinedConfig/AlertState';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
|
|
5
|
-
import { AdaptableMenuItem,
|
|
5
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
6
6
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
7
7
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
8
8
|
import { IModule } from './Interface/IModule';
|
|
@@ -14,7 +14,7 @@ export declare class AlertModule extends AdaptableModuleBase implements IModule
|
|
|
14
14
|
getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
|
|
15
15
|
updateOldConfig(): void;
|
|
16
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
|
-
addContextMenuItems(menuContext:
|
|
17
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
18
18
|
protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
|
|
19
19
|
private handleReactiveAlertTriggered;
|
|
20
20
|
private showAlertForDefinitions;
|
|
@@ -22,7 +22,8 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
}
|
|
23
23
|
if (this.api.internalApi.getAdaptableOptions().notificationsOptions
|
|
24
24
|
.dataChangeDetectionPolicy === 'formattedValue') {
|
|
25
|
-
const { oldValue, newValue
|
|
25
|
+
const { oldValue, newValue } = dataChangedInfo;
|
|
26
|
+
const columnId = dataChangedInfo.column.columnId;
|
|
26
27
|
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
|
|
27
28
|
const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
|
|
28
29
|
if (oldFormattedValue === newFormattedValue) {
|
|
@@ -50,7 +51,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
50
51
|
else if (this.api.scopeApi.scopeHasColumns(alertDefinition.Scope)) {
|
|
51
52
|
return this.api.scopeApi
|
|
52
53
|
.getColumnsForScope(alertDefinition.Scope)
|
|
53
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
54
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
54
55
|
}
|
|
55
56
|
return [];
|
|
56
57
|
}
|
|
@@ -62,7 +63,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
62
63
|
return this.api.queryApi.getReferencedNamedQueryNames(queryExpression);
|
|
63
64
|
}
|
|
64
65
|
updateOldConfig() {
|
|
65
|
-
var _a, _b
|
|
66
|
+
var _a, _b;
|
|
66
67
|
/*
|
|
67
68
|
Need to do 4 things here:
|
|
68
69
|
1. Make all (new) Flashing Alerts have a Predicate if none exists
|
|
@@ -71,7 +72,6 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
71
72
|
4. Convert old Updated Rows into Flashing Alerts
|
|
72
73
|
*/
|
|
73
74
|
let oldAlertDefinitions = [];
|
|
74
|
-
let newAlertDefinitions = [];
|
|
75
75
|
// 1. Make all (new) Flashing Alerts have a Predicate if none exists
|
|
76
76
|
(_a = this.api.alertApi
|
|
77
77
|
.getAlertState()
|
|
@@ -97,102 +97,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
97
97
|
oldAlertDefinitions.push(alertDefinition);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
-
// 3. Convert old Flashing Cells into Flashing Alerts
|
|
101
|
-
let flashingCellState = this.api.internalApi.getState().FlashingCell;
|
|
102
|
-
(_c = flashingCellState === null || flashingCellState === void 0 ? void 0 : flashingCellState.FlashingCells) === null || _c === void 0 ? void 0 : _c.forEach((flashingCell) => {
|
|
103
|
-
if (flashingCell.IsLive) {
|
|
104
|
-
let upColor = flashingCell.UpColor
|
|
105
|
-
? flashingCell.UpColor
|
|
106
|
-
: flashingCellState.DefaultUpColor
|
|
107
|
-
? flashingCellState.DefaultUpColor
|
|
108
|
-
: this.api.internalApi.getAdaptableOptions().notificationsOptions
|
|
109
|
-
.flashingAlertDefaultProperties.UpChangeStyle.BackColor;
|
|
110
|
-
let downColor = flashingCell.UpColor
|
|
111
|
-
? flashingCell.DownColor
|
|
112
|
-
: flashingCellState.DefautDownColor
|
|
113
|
-
? flashingCellState.DefautDownColor
|
|
114
|
-
: this.api.internalApi.getAdaptableOptions().notificationsOptions
|
|
115
|
-
.flashingAlertDefaultProperties.DownChangeStyle.BackColor;
|
|
116
|
-
let duration = flashingCell.FlashingCellDuration
|
|
117
|
-
? flashingCell.FlashingCellDuration
|
|
118
|
-
: flashingCellState.DefaultDuration
|
|
119
|
-
? flashingCellState.DefaultDuration
|
|
120
|
-
: this.api.internalApi.getAdaptableOptions().notificationsOptions
|
|
121
|
-
.flashingAlertDefaultProperties.FlashDuration;
|
|
122
|
-
let flashingAlertDefinition = {
|
|
123
|
-
Rule: {
|
|
124
|
-
Predicate: ANY_PREDICATE,
|
|
125
|
-
},
|
|
126
|
-
FlashTarget: 'cell',
|
|
127
|
-
FlashDuration: duration,
|
|
128
|
-
Scope: {
|
|
129
|
-
ColumnIds: [flashingCell.ColumnId],
|
|
130
|
-
},
|
|
131
|
-
UpChangeStyle: {
|
|
132
|
-
BackColor: upColor,
|
|
133
|
-
},
|
|
134
|
-
DownChangeStyle: {
|
|
135
|
-
BackColor: downColor,
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
// this.api.alertApi.addFlashingAlertDefinition(flashingAlertDefinition);
|
|
139
|
-
newAlertDefinitions.push(flashingAlertDefinition);
|
|
140
|
-
LoggingHelper_1.LogAdaptableWarning(`Updating incorrect Predefined Config for Flashing Alert: ${flashingCell.ColumnId}`);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
// 4. Convert old Updated Rows into Flashing Alerts
|
|
144
|
-
let updatedRowState = this.api.internalApi.getState().UpdatedRow;
|
|
145
|
-
if (updatedRowState === null || updatedRowState === void 0 ? void 0 : updatedRowState.EnableUpdatedRow) {
|
|
146
|
-
let flashingAlertDefinition = {
|
|
147
|
-
Rule: {
|
|
148
|
-
Predicate: ANY_PREDICATE,
|
|
149
|
-
},
|
|
150
|
-
FlashTarget: 'row',
|
|
151
|
-
Scope: {
|
|
152
|
-
All: true,
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
if (updatedRowState.Duration) {
|
|
156
|
-
flashingAlertDefinition.FlashDuration =
|
|
157
|
-
updatedRowState.Duration == 'Always' ? 'always' : updatedRowState.Duration;
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
flashingAlertDefinition.FlashDuration = 'always';
|
|
161
|
-
}
|
|
162
|
-
if (updatedRowState.UpColor) {
|
|
163
|
-
flashingAlertDefinition.UpChangeStyle = {
|
|
164
|
-
BackColor: updatedRowState.UpColor,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
flashingAlertDefinition.UpChangeStyle = undefined;
|
|
169
|
-
}
|
|
170
|
-
if (updatedRowState.DownColor) {
|
|
171
|
-
flashingAlertDefinition.DownChangeStyle = {
|
|
172
|
-
BackColor: updatedRowState.DownColor,
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
flashingAlertDefinition.DownChangeStyle = undefined;
|
|
177
|
-
}
|
|
178
|
-
if (updatedRowState.NeutralColor) {
|
|
179
|
-
flashingAlertDefinition.NeutralChangeStyle = {
|
|
180
|
-
BackColor: updatedRowState.NeutralColor,
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
flashingAlertDefinition.NeutralChangeStyle = undefined;
|
|
185
|
-
}
|
|
186
|
-
newAlertDefinitions.push(flashingAlertDefinition);
|
|
187
|
-
}
|
|
188
|
-
this.api.alertApi.addFlashingAlertDefinitions(newAlertDefinitions);
|
|
189
|
-
this.api.alertApi.editFlashingAlertDefinitions(oldAlertDefinitions);
|
|
190
|
-
this.api.internalApi.clearUpdatedRowState();
|
|
191
|
-
this.api.internalApi.clearFlashingCellState();
|
|
192
100
|
}
|
|
193
101
|
addColumnMenuItems(column) {
|
|
194
102
|
if (column && this.isModuleEditable()) {
|
|
195
|
-
if (!this.api.columnApi.isCalculatedColumn(column.
|
|
103
|
+
if (!this.api.columnApi.isCalculatedColumn(column.columnId)) {
|
|
196
104
|
const flashingAlertDefinitions = this.api.alertApi.getFlashingAlertDefinitions();
|
|
197
105
|
const flashingAlertForCurrentColumn = flashingAlertDefinitions.find((flashingAlertDefinition) => {
|
|
198
106
|
return this.api.scopeApi.isColumnInScope(column, flashingAlertDefinition.Scope);
|
|
@@ -205,7 +113,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
205
113
|
return [
|
|
206
114
|
this.createColumnMenuItemReduxAction('Add Flashing Alert', this.moduleInfo.Glyph, AlertRedux.FlashingAlertDefinitionAdd({
|
|
207
115
|
Scope: {
|
|
208
|
-
ColumnIds: [column.
|
|
116
|
+
ColumnIds: [column.columnId],
|
|
209
117
|
},
|
|
210
118
|
Rule: {
|
|
211
119
|
Predicate: { PredicateId: 'Any' },
|
|
@@ -229,7 +137,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
229
137
|
}
|
|
230
138
|
}
|
|
231
139
|
const flashingAlertForRow = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue);
|
|
232
|
-
const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.
|
|
140
|
+
const flashingAlertForCell = this.api.internalApi.getAdaptableFlashingAlertFor(menuContext.primaryKeyValue, menuContext.adaptableColumn.columnId);
|
|
233
141
|
if (flashingAlertForRow && flashingAlertForRow.flashTarget === 'row') {
|
|
234
142
|
items.push(this.createColumnMenuItemReduxAction('Clear Flashing Alert for Row', this.moduleInfo.Glyph, SystemRedux.SystemFlashingAlertDelete(flashingAlertForRow)));
|
|
235
143
|
}
|
|
@@ -272,12 +180,12 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
272
180
|
showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
|
|
273
181
|
alertDefinitions.forEach((alertDefinition) => {
|
|
274
182
|
// might be better to do a single alert with all the messages?
|
|
275
|
-
this.api.alertApi.showAlert(
|
|
183
|
+
this.api.alertApi.showAlert(dataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
|
|
276
184
|
});
|
|
277
185
|
}
|
|
278
186
|
showFlashingAlertsForDefinitions(dataChangedInfo, flashingAlertDefinitions = []) {
|
|
279
|
-
const allColumnIds = this.api.columnApi.getColumns().map((c) => c.
|
|
280
|
-
const columnDataType =
|
|
187
|
+
const allColumnIds = this.api.columnApi.getColumns().map((c) => c.columnId);
|
|
188
|
+
const columnDataType = dataChangedInfo.column.dataType;
|
|
281
189
|
const numeric = columnDataType === 'Number';
|
|
282
190
|
const isComparableType = numeric || columnDataType === 'Date';
|
|
283
191
|
let up = false;
|
|
@@ -292,7 +200,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
292
200
|
}
|
|
293
201
|
flashingAlertDefinitions.forEach((flashingAlertDefinition) => {
|
|
294
202
|
const flashTarget = this.api.alertApi.getFlashingAlertFlashTarget(flashingAlertDefinition);
|
|
295
|
-
const flashColumnIds = { [dataChangedInfo.columnId]: true };
|
|
203
|
+
const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
|
|
296
204
|
if (flashTarget === 'row') {
|
|
297
205
|
allColumnIds.forEach((colId) => {
|
|
298
206
|
flashColumnIds[colId] = true;
|
|
@@ -319,7 +227,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
319
227
|
}
|
|
320
228
|
getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
|
|
321
229
|
let relatedAlertDefinitions = definitions
|
|
322
|
-
.filter((v) => this.api.scopeApi.isColumnInScope(
|
|
230
|
+
.filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
|
|
323
231
|
.filter((alertDefinition) => !AdaptableQuery_1.isReactiveQuery(alertDefinition.Rule));
|
|
324
232
|
let triggeredAlerts = [];
|
|
325
233
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedAlertDefinitions)) {
|
|
@@ -353,7 +261,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
353
261
|
// TODO send real display value
|
|
354
262
|
displayValue: null,
|
|
355
263
|
node: dataChangedEvent.rowNode,
|
|
356
|
-
column:
|
|
264
|
+
column: dataChangedEvent.column,
|
|
357
265
|
}, defaultNoPredicateReturn);
|
|
358
266
|
}
|
|
359
267
|
getTeamSharingAction() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import { IBulkUpdateModule, BulkUpdateValidationResult } from './Interface/IBulkUpdateModule';
|
|
3
3
|
import { PreviewInfo } from '../Utilities/Interface/Preview';
|
|
4
|
-
import { AdaptableMenuItem,
|
|
4
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
import { AccessLevel, AdaptableApi } from '../types';
|
|
6
6
|
export declare class BulkUpdateModule extends AdaptableModuleBase implements IBulkUpdateModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
getViewAccessLevel(): AccessLevel;
|
|
9
|
-
addContextMenuItems(menuContext:
|
|
9
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
10
10
|
checkCorrectCellSelection(): BulkUpdateValidationResult;
|
|
11
11
|
buildPreviewValues(bulkUpdateValue: any): PreviewInfo;
|
|
12
12
|
}
|
|
@@ -20,7 +20,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
20
20
|
let menuItemShowPopup = undefined;
|
|
21
21
|
if (!menuContext.isRowGroupColumn && this.isModuleEditable()) {
|
|
22
22
|
if (menuContext.adaptableColumn &&
|
|
23
|
-
!menuContext.adaptableColumn.
|
|
23
|
+
!menuContext.adaptableColumn.readOnly &&
|
|
24
24
|
menuContext.isSelectedCell &&
|
|
25
25
|
menuContext.isSingleSelectedColumn &&
|
|
26
26
|
this.api.gridApi.areCellsEditable(menuContext.selectedCellInfo.gridCells)) {
|
|
@@ -70,7 +70,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
let selectedColumn = selectedCellInfo.columns[0];
|
|
73
|
-
if (selectedColumn && selectedColumn.
|
|
73
|
+
if (selectedColumn && selectedColumn.readOnly) {
|
|
74
74
|
return {
|
|
75
75
|
IsValid: false,
|
|
76
76
|
Alert: {
|
|
@@ -99,12 +99,12 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
101
101
|
let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
|
|
102
|
-
let
|
|
102
|
+
let column;
|
|
103
103
|
if (!this.api.internalApi.isGridInPivotMode()) {
|
|
104
104
|
if (selectedCellInfo != null && selectedCellInfo.columns.length > 0) {
|
|
105
|
-
|
|
105
|
+
column = this.api.columnApi.getColumnFromId(selectedCellInfo.columns[0].columnId);
|
|
106
106
|
let typedBulkUpdateValue;
|
|
107
|
-
switch (
|
|
107
|
+
switch (column.dataType) {
|
|
108
108
|
case Enums_1.DataType.Number:
|
|
109
109
|
typedBulkUpdateValue = Number(bulkUpdateValue);
|
|
110
110
|
break;
|
|
@@ -119,7 +119,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
119
119
|
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
120
120
|
oldValue: selectedCell.rawValue,
|
|
121
121
|
newValue: typedBulkUpdateValue,
|
|
122
|
-
|
|
122
|
+
column: selectedCell.column,
|
|
123
123
|
primaryKeyValue: selectedCell.primaryKeyValue,
|
|
124
124
|
rowNode: selectedCell.rowNode,
|
|
125
125
|
trigger: 'edit',
|
|
@@ -139,7 +139,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
return {
|
|
142
|
-
|
|
142
|
+
column: column,
|
|
143
143
|
previewResults: previewResults,
|
|
144
144
|
previewValidationSummary: PreviewHelper_1.PreviewHelper.GetPreviewValidationSummary(previewResults),
|
|
145
145
|
};
|
|
@@ -40,7 +40,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
40
40
|
if (column && this.isModuleEditable()) {
|
|
41
41
|
if (this.api.calculatedColumnApi
|
|
42
42
|
.getAllCalculatedColumn()
|
|
43
|
-
.find((cc) => cc.ColumnId == column.
|
|
43
|
+
.find((cc) => cc.ColumnId == column.columnId)) {
|
|
44
44
|
let popupParam = {
|
|
45
45
|
column: column,
|
|
46
46
|
action: 'Edit',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
3
3
|
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
4
|
-
import { AdaptableMenuItem,
|
|
4
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
5
5
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
6
6
|
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
7
7
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
8
8
|
export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
|
|
9
9
|
constructor(api: AdaptableApi);
|
|
10
10
|
getViewAccessLevel(): AccessLevel;
|
|
11
|
-
addContextMenuItems(menuContext:
|
|
11
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
12
12
|
createCellSummary(selectedCellInfo: SelectedCellInfo): CellSummmary;
|
|
13
13
|
}
|
|
@@ -38,14 +38,14 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
38
38
|
let allValues = [];
|
|
39
39
|
let numericColumns = [];
|
|
40
40
|
selectedCellInfo.columns.map((c) => {
|
|
41
|
-
if (c && c.
|
|
42
|
-
numericColumns.push(c.
|
|
41
|
+
if (c && c.dataType == Enums_1.DataType.Number) {
|
|
42
|
+
numericColumns.push(c.columnId);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
selectedCellInfo.gridCells.forEach((selectedCell) => {
|
|
46
46
|
let value = selectedCell.rawValue;
|
|
47
47
|
allValues.push(value);
|
|
48
|
-
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.columnId)) {
|
|
48
|
+
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(numericColumns, selectedCell.column.columnId)) {
|
|
49
49
|
let valueAsNumber = Number(value);
|
|
50
50
|
// possible that its not a number despite it being a numeric column
|
|
51
51
|
if (!isNaN(Number(valueAsNumber))) {
|
|
@@ -22,7 +22,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
else if (this.api.scopeApi.scopeHasColumns(conditionalStyle.Scope)) {
|
|
23
23
|
return this.api.scopeApi
|
|
24
24
|
.getColumnsForScope(conditionalStyle.Scope)
|
|
25
|
-
.map((adaptableColumn) => adaptableColumn.
|
|
25
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
26
26
|
}
|
|
27
27
|
return [];
|
|
28
28
|
}
|
|
@@ -73,7 +73,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
73
73
|
this.api.conditionalStyleApi.editConditionalStyles(oldConditionalStyles);
|
|
74
74
|
}
|
|
75
75
|
addColumnMenuItems(column) {
|
|
76
|
-
if (column && this.isModuleEditable() && !column.
|
|
76
|
+
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
77
77
|
let conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(column);
|
|
78
78
|
let firstConditionalStyle = ArrayExtensions_1.default.IsNotNullOrEmpty(conditionalStyles)
|
|
79
79
|
? conditionalStyles.find((cs) => this.api.scopeApi.isColumnInScopeColumns(column, cs.Scope))
|
|
@@ -160,7 +160,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
160
160
|
value: value,
|
|
161
161
|
oldValue: null,
|
|
162
162
|
displayValue: column
|
|
163
|
-
? this.api.gridApi.getDisplayValueFromRowNode(node, column.
|
|
163
|
+
? this.api.gridApi.getDisplayValueFromRowNode(node, column.columnId)
|
|
164
164
|
: value,
|
|
165
165
|
node: node,
|
|
166
166
|
column: column,
|
|
@@ -19,10 +19,10 @@ class CustomSortModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
addColumnMenuItems(column) {
|
|
22
|
-
if (column && this.isModuleEditable() && column.
|
|
22
|
+
if (column && this.isModuleEditable() && column.sortable) {
|
|
23
23
|
let customSort = this.api.customSortApi
|
|
24
24
|
.getAllCustomSort()
|
|
25
|
-
.find((x) => x.ColumnId == column.
|
|
25
|
+
.find((x) => x.ColumnId == column.columnId);
|
|
26
26
|
let label = customSort ? 'Edit ' : 'Create ';
|
|
27
27
|
// dont show a menu item if there is a custom sort that uses a comparer function
|
|
28
28
|
const columnSortComparer = this.api.internalApi.getCustomSortComparer(column);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
-
import { AdaptableMenuItem,
|
|
2
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
3
|
import { IModule } from './Interface/IModule';
|
|
4
4
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
5
5
|
export declare class DashboardModule extends AdaptableModuleBase implements IModule {
|
|
@@ -8,6 +8,6 @@ export declare class DashboardModule extends AdaptableModuleBase implements IMod
|
|
|
8
8
|
updateOldConfig(): void;
|
|
9
9
|
handleAdaptableReady(): void;
|
|
10
10
|
addColumnMenuItems(): AdaptableMenuItem[] | undefined;
|
|
11
|
-
addContextMenuItems(menuContext:
|
|
11
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
12
12
|
private buildMenuItems;
|
|
13
13
|
}
|
|
@@ -27,10 +27,10 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
|
|
|
27
27
|
if (this.api.internalApi.getState().System.DataChangeHistory.currentMode !== 'ACTIVE') {
|
|
28
28
|
return false;
|
|
29
29
|
}
|
|
30
|
-
if (this.api.internalApi.getAdaptableOptions().dataChangeHistoryOptions.
|
|
30
|
+
if (this.api.internalApi.getAdaptableOptions().dataChangeHistoryOptions.showDataChange) {
|
|
31
31
|
return this.api.internalApi
|
|
32
32
|
.getAdaptableOptions()
|
|
33
|
-
.dataChangeHistoryOptions.
|
|
33
|
+
.dataChangeHistoryOptions.showDataChange(dataChangedInfo);
|
|
34
34
|
}
|
|
35
35
|
return true;
|
|
36
36
|
}
|