@adaptabletools/adaptable 10.0.4-canary.5 → 11.0.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +19 -15
- package/bundle.cjs.js +121 -115
- package/index.css +20 -17
- package/package.json +32 -32
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -4
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +7 -9
- package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +31 -0
- package/src/AdaptableOptions/{ChartPluginOptions.js → FlashingCellOptions.js} +0 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +2 -2
- package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -7
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +14 -2
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +1 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -15
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -0
- package/src/Api/AdaptableApi.d.ts +6 -6
- package/src/Api/ChartingApi.d.ts +9 -0
- package/src/Api/{ChartApi.js → ChartingApi.js} +0 -0
- package/src/Api/ColumnApi.d.ts +11 -1
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/EventApi.d.ts +3 -3
- package/src/Api/Events/AdaptableReady.d.ts +1 -1
- package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
- package/src/Api/Events/SearchChanged.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +35 -24
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ChartingApiImpl.js +10 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ColumnApiImpl.js +9 -3
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +0 -16
- package/src/Api/Implementation/DashboardApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +42 -29
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +5 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +0 -5
- package/src/Api/Implementation/InternalApiImpl.js +1 -15
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Implementation/PluginsApiImpl.d.ts +0 -2
- package/src/Api/Implementation/PluginsApiImpl.js +0 -6
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/QueryApiImpl.js +1 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/InternalApi.d.ts +0 -5
- package/src/Api/PluginsApi.d.ts +0 -2
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +38 -38
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -19
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/DashboardState.d.ts +4 -4
- package/src/PredefinedConfig/FlashingCellState.d.ts +16 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/SystemState.d.ts +0 -4
- package/src/PredefinedConfig/ThemeState.d.ts +2 -1
- package/src/Redux/ActionsReducers/DashboardRedux.d.ts +0 -7
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -12
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -21
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +1 -2
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +21 -21
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +0 -3
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/CalculatedColumnModule.js +17 -12
- package/src/Strategy/ChartingModule.d.ts +7 -0
- package/src/Strategy/ChartingModule.js +15 -0
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FilterModule.js +3 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +35 -19
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.js +15 -3
- package/src/Strategy/QueryModule.d.ts +1 -1
- package/src/Strategy/QueryModule.js +1 -3
- package/src/Strategy/SetingsPanelModule.d.ts +1 -0
- package/src/Strategy/SetingsPanelModule.js +7 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +11 -0
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.d.ts +3 -0
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.js +10 -0
- package/src/Utilities/Constants/ConfigConstants.d.ts +0 -1
- package/src/Utilities/Constants/ConfigConstants.js +1 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +0 -9
- package/src/Utilities/Constants/GeneralConstants.js +1 -12
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -2
- package/src/Utilities/Constants/ModuleConstants.js +2 -3
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +19 -18
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -4
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/ObjectFactory.d.ts +0 -10
- package/src/Utilities/ObjectFactory.js +6 -67
- package/src/Utilities/Services/EntitlementService.js +1 -1
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +7 -11
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/View/AdaptableView.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +4 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +3 -3
- package/src/View/AdaptableWizardView/index.js +1 -1
- package/src/View/Alert/AlertEmptyView.js +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +11 -24
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +16 -4
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
- package/src/View/Components/ModuleValueSelector/index.d.ts +3 -1
- package/src/View/Components/ModuleValueSelector/index.js +1 -1
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +9 -7
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +46 -81
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +11 -4
- package/src/View/Components/ValueSelector/index.d.ts +2 -0
- package/src/View/Components/ValueSelector/index.js +5 -5
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +10 -5
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
- package/src/View/Dashboard/Dashboard.js +14 -36
- package/src/View/Dashboard/DashboardPopup.js +24 -16
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -2
- package/src/View/Export/Wizard/NewReportWizard.js +13 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
- package/src/View/FlashingCell/Wizard/{FlashingCellDurationWizardSection.d.ts → FlashingCellSettingsWizardSection.d.ts} +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +81 -0
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -8
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +8 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +13 -5
- package/src/View/GridInfo/GridInfoPopup.js +3 -2
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
- package/src/View/Query/QueryViewPanel.js +12 -9
- package/src/View/Query/Wizard/NamedQueryWizard.js +13 -8
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
- package/src/View/Shortcut/shortcutKeys.js +0 -1
- package/src/View/SpecialColumnSettingsWizardStep.d.ts +9 -0
- package/src/View/SpecialColumnSettingsWizardStep.js +63 -0
- package/src/View/UIHelper.d.ts +0 -4
- package/src/View/UIHelper.js +1 -34
- package/src/View/Wizard/AdaptableWizard.js +1 -1
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/agGrid/Adaptable.d.ts +10 -7
- package/src/agGrid/Adaptable.js +80 -57
- package/src/agGrid/agGridHelper.d.ts +1 -2
- package/src/agGrid/agGridHelper.js +8 -5
- package/src/agGrid/agGridMenuHelper.js +12 -8
- package/src/components/ApplicationIcon.d.ts +1 -1
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Dashboard/DashboardManager.d.ts +5 -3
- package/src/components/Dashboard/DashboardManager.js +33 -27
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/Overlay.js +1 -1
- package/src/components/WindowModal/WindowModal.js +17 -2
- package/src/components/icons/column-add.d.ts +3 -0
- package/src/components/icons/column-add.js +10 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/utils/useDraggable.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +58 -91
- package/src/metamodel/adaptable.metamodel.js +248 -297
- package/src/types.d.ts +4 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/ChartPluginOptions.d.ts +0 -20
- package/src/Api/ChartApi.d.ts +0 -20
- package/src/Api/Implementation/SparklineColumnApiImpl.d.ts +0 -9
- package/src/Api/Implementation/SparklineColumnApiImpl.js +0 -24
- package/src/Api/SparklineColumnApi.d.ts +0 -23
- package/src/Api/SparklineColumnApi.js +0 -2
- package/src/PredefinedConfig/ChartState.d.ts +0 -144
- package/src/PredefinedConfig/ChartState.js +0 -2
- package/src/PredefinedConfig/Common/ChartEnums.d.ts +0 -123
- package/src/PredefinedConfig/Common/ChartEnums.js +0 -152
- package/src/PredefinedConfig/SparklineColumnState.d.ts +0 -40
- package/src/PredefinedConfig/SparklineColumnState.js +0 -2
- package/src/Redux/ActionsReducers/SparklineColumnRedux.d.ts +0 -35
- package/src/Redux/ActionsReducers/SparklineColumnRedux.js +0 -70
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.js +0 -56
- package/src/Utilities/Defaults/DefaultPieChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultPieChartProperties.js +0 -13
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.js +0 -25
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.d.ts +0 -11
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.js +0 -28
- package/src/View/Components/Popups/AdaptableChart.d.ts +0 -18
- package/src/View/Components/Popups/AdaptableChart.js +0 -40
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.d.ts +0 -7
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.js +0 -2
- package/src/View/FlashingCell/Wizard/FlashingCellDurationWizardSection.js +0 -60
- package/src/components/ChartContainer/index.d.ts +0 -15
- package/src/components/ChartContainer/index.js +0 -22
package/src/View/UIHelper.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.
|
|
3
|
+
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.getPlaceHolderforDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const EditableConfigEntityState_1 = require("./Components/SharedProps/EditableConfigEntityState");
|
|
6
6
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
7
7
|
const StringExtensions_1 = require("../Utilities/Extensions/StringExtensions");
|
|
8
|
-
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
9
8
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
10
9
|
exports.BLACK = 'Black';
|
|
11
10
|
exports.WHITE = 'White';
|
|
@@ -148,36 +147,6 @@ function getModalContainer(adaptableOptions, document) {
|
|
|
148
147
|
return modalContainer;
|
|
149
148
|
}
|
|
150
149
|
exports.getModalContainer = getModalContainer;
|
|
151
|
-
function getChartContainer(adaptableOptions, document, showModal) {
|
|
152
|
-
let chartContainer;
|
|
153
|
-
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(adaptableOptions.containerOptions.chartContainer)) {
|
|
154
|
-
// they have provided one so get that
|
|
155
|
-
chartContainer = document.getElementById(adaptableOptions.containerOptions.chartContainer);
|
|
156
|
-
if (chartContainer) {
|
|
157
|
-
const chartContainerClassName = ' chart-container';
|
|
158
|
-
if (!chartContainer.className.includes(chartContainerClassName)) {
|
|
159
|
-
chartContainer.className += chartContainerClassName;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
LoggingHelper_1.LogAdaptableError(`Chart div called '${adaptableOptions.containerOptions.chartContainer}' not found: so creating standard div`);
|
|
164
|
-
chartContainer = document.getElementById('ad');
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
// not provided one so return whole document if modal, or 'chart' if not
|
|
169
|
-
chartContainer = showModal ? document.body : document.getElementById('ad');
|
|
170
|
-
}
|
|
171
|
-
return chartContainer;
|
|
172
|
-
}
|
|
173
|
-
exports.getChartContainer = getChartContainer;
|
|
174
|
-
function isValidUserChartContainer(adaptableOptions, document) {
|
|
175
|
-
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(adaptableOptions.containerOptions.chartContainer)) {
|
|
176
|
-
return document.getElementById(adaptableOptions.containerOptions.chartContainer) != null;
|
|
177
|
-
}
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
exports.isValidUserChartContainer = isValidUserChartContainer;
|
|
181
150
|
function IsEmptyStyle(style) {
|
|
182
151
|
return !IsNotEmptyStyle(style);
|
|
183
152
|
}
|
|
@@ -496,8 +465,6 @@ exports.UIHelper = {
|
|
|
496
465
|
getDescriptionForDataType,
|
|
497
466
|
getPlaceHolderforDataType,
|
|
498
467
|
getModalContainer,
|
|
499
|
-
getChartContainer,
|
|
500
|
-
isValidUserChartContainer,
|
|
501
468
|
IsEmptyStyle,
|
|
502
469
|
IsNotEmptyStyle,
|
|
503
470
|
getMessageTypeByStatusColour,
|
|
@@ -9,7 +9,7 @@ const rebass_1 = require("rebass");
|
|
|
9
9
|
const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
|
|
10
10
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
11
11
|
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
12
|
-
const kebabCase_1 = tslib_1.__importDefault(require("lodash
|
|
12
|
+
const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
|
|
13
13
|
exports.AdaptableWizardContext = React.createContext({
|
|
14
14
|
data: null,
|
|
15
15
|
updateGoBackState: () => { },
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { AdaptableObject } from '../../../PredefinedConfig/Common/AdaptableObject';
|
|
3
3
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
4
4
|
import { ModuleInfo } from '../../../Strategy/Interface/IModule';
|
|
5
|
+
import { ModuleParams } from '../../Components/SharedProps/ModuleViewPopupProps';
|
|
5
6
|
export interface AdaptableWizardStep {
|
|
6
7
|
canNext(): boolean;
|
|
7
8
|
canBack(): boolean;
|
|
@@ -44,4 +45,5 @@ export interface AdaptableOnePageWizardProps<T extends AdaptableObject> {
|
|
|
44
45
|
name: string;
|
|
45
46
|
label?: string;
|
|
46
47
|
};
|
|
48
|
+
popupParams?: ModuleParams;
|
|
47
49
|
}
|
|
@@ -9,7 +9,7 @@ const rebass_1 = require("rebass");
|
|
|
9
9
|
const QueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QueryRedux"));
|
|
10
10
|
const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
|
|
11
11
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
12
|
-
const kebabCase_1 = tslib_1.__importDefault(require("lodash
|
|
12
|
+
const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
|
|
13
13
|
const useProperty_1 = tslib_1.__importDefault(require("../../components/utils/useProperty"));
|
|
14
14
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
15
15
|
const isMacLike_1 = require("../../Utilities/isMacLike");
|
|
@@ -42,7 +42,7 @@ declare type RuntimeConfig = {
|
|
|
42
42
|
};
|
|
43
43
|
export declare class Adaptable implements IAdaptable {
|
|
44
44
|
api: AdaptableApi;
|
|
45
|
-
|
|
45
|
+
adaptableModules: IModuleCollection;
|
|
46
46
|
adaptableStore: IAdaptableStore;
|
|
47
47
|
adaptableOptions: AdaptableOptions;
|
|
48
48
|
CalculatedColumnExpressionService: ICalculatedColumnExpressionService;
|
|
@@ -54,8 +54,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
54
54
|
QueryLanguageService: IQueryLanguageService;
|
|
55
55
|
AlertService: IAlertService;
|
|
56
56
|
TeamSharingService: ITeamSharingService;
|
|
57
|
-
private LicenseService;
|
|
58
57
|
MetamodelService: IMetamodelService;
|
|
58
|
+
private LicenseService;
|
|
59
59
|
embedColumnMenu: boolean;
|
|
60
60
|
gridOptions: GridOptions;
|
|
61
61
|
isInitialised: boolean;
|
|
@@ -129,8 +129,6 @@ export declare class Adaptable implements IAdaptable {
|
|
|
129
129
|
private getAlertCellClass;
|
|
130
130
|
private getAlertRowClass;
|
|
131
131
|
private getAlertRowStyle;
|
|
132
|
-
private getFlashingCellRowStyle;
|
|
133
|
-
private getFlashingCellStyleFor;
|
|
134
132
|
private getFlashingCellStyle;
|
|
135
133
|
private getCellHighlightStyle;
|
|
136
134
|
private getRowHighlightStyle;
|
|
@@ -253,7 +251,6 @@ export declare class Adaptable implements IAdaptable {
|
|
|
253
251
|
setupColumnCellEditor({ colId, col }: ColumnSetupInfo): void;
|
|
254
252
|
setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
255
253
|
setupColumnTooltipValueGetter({ col, colId }: ColumnSetupInfo): void;
|
|
256
|
-
setupColumnTooltipField({ col, colId, colDef }: ColumnSetupInfo): void;
|
|
257
254
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
258
255
|
getUserDefinedHeaderName(columnId: string): string;
|
|
259
256
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
@@ -289,8 +286,12 @@ export declare class Adaptable implements IAdaptable {
|
|
|
289
286
|
getColumnCount(): number;
|
|
290
287
|
getVisibleRowCount(): number;
|
|
291
288
|
getVisibleColumnCount(): number;
|
|
292
|
-
selectColumns(columnIds: string[]
|
|
293
|
-
|
|
289
|
+
selectColumns(columnIds: string[], config?: {
|
|
290
|
+
keepExistingSelection?: boolean;
|
|
291
|
+
}): void;
|
|
292
|
+
selectColumn(columnId: string, config?: {
|
|
293
|
+
keepExistingSelection?: boolean;
|
|
294
|
+
}): void;
|
|
294
295
|
selectAll(): void;
|
|
295
296
|
deselectAll(): void;
|
|
296
297
|
hideColumn(columnId: string): void;
|
|
@@ -328,6 +329,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
328
329
|
private getConditionalStyleRowClass;
|
|
329
330
|
private getConditionalStyleRowStyle;
|
|
330
331
|
private getGridOptionsApi;
|
|
332
|
+
canGenerateCharts(): boolean;
|
|
333
|
+
canHaveSparklines(): boolean;
|
|
331
334
|
canExportToExcel(): boolean;
|
|
332
335
|
exportToExcel(reportData: ReportData, fileName: string): void;
|
|
333
336
|
private setExcelStylesForExport;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.bindAdaptableAgGrid = exports.AdaptableNoCodeWizard = exports.Adaptable = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const all_modules_1 = require("@ag-grid-community/all-modules");
|
|
6
|
-
const debounce_1 = tslib_1.__importDefault(require("lodash
|
|
7
|
-
const isEqual_1 = tslib_1.__importDefault(require("lodash
|
|
8
|
-
const throttle_1 = tslib_1.__importDefault(require("lodash
|
|
9
|
-
const uniqBy_1 = tslib_1.__importDefault(require("lodash
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
|
+
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
8
|
+
const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
|
|
9
|
+
const uniqBy_1 = tslib_1.__importDefault(require("lodash/uniqBy"));
|
|
10
10
|
const React = tslib_1.__importStar(require("react"));
|
|
11
11
|
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
12
|
-
const clamp_1 = tslib_1.__importDefault(require("lodash
|
|
12
|
+
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
13
13
|
const AdaptableApiImpl_1 = require("../Api/Implementation/AdaptableApiImpl");
|
|
14
14
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
15
15
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -314,7 +314,7 @@ class Adaptable {
|
|
|
314
314
|
AdaptableHelper_1.default.checkAdaptableOptions(this.adaptableOptions);
|
|
315
315
|
this.runtimeConfig = runtimeConfig || {};
|
|
316
316
|
this.agGridModules = this.runtimeConfig.modules || [];
|
|
317
|
-
this.gridOptions = this.adaptableOptions.
|
|
317
|
+
this.gridOptions = this.adaptableOptions.gridOptions;
|
|
318
318
|
if (this.hasAutogeneratedPrimaryKey() && !this.gridOptions.getRowNodeId) {
|
|
319
319
|
this.gridOptions.getRowNodeId = (rowData) => {
|
|
320
320
|
var _a;
|
|
@@ -360,8 +360,8 @@ class Adaptable {
|
|
|
360
360
|
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
361
361
|
// Set up Modules - we set up all the Modules suitable for AG Grid
|
|
362
362
|
// But users can make some hidden or readonly in their entitlements
|
|
363
|
-
this.
|
|
364
|
-
this.forPlugins((plugin) => plugin.afterInitModules(this, this.
|
|
363
|
+
this.adaptableModules = this.agGridHelper.setUpModules();
|
|
364
|
+
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
365
365
|
// also try to set it early, here, if the grid is initialized - needed for AdapTable tool panel
|
|
366
366
|
if (this.gridOptions.api) {
|
|
367
367
|
this.gridOptions.api.__adaptable = this;
|
|
@@ -476,13 +476,13 @@ class Adaptable {
|
|
|
476
476
|
if (eventName == AdaptableStore_1.INIT_STATE) {
|
|
477
477
|
this._adaptableReady = true;
|
|
478
478
|
LoggingHelper_1.LogAdaptableInfo(`Updating obsolete configuration/state`);
|
|
479
|
-
this.
|
|
479
|
+
this.adaptableModules.forEach((m) => m.updateOldConfig());
|
|
480
480
|
// call stuff here
|
|
481
481
|
// and reset state also?
|
|
482
482
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
483
483
|
this.api.eventApi.emit('AdaptableReady', {
|
|
484
484
|
adaptableApi: this.api,
|
|
485
|
-
gridOptions: this.adaptableOptions.
|
|
485
|
+
gridOptions: this.adaptableOptions.gridOptions,
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
488
|
});
|
|
@@ -592,12 +592,9 @@ class Adaptable {
|
|
|
592
592
|
}
|
|
593
593
|
// now create the grid itself - it is done this way as previously when we instantiated the Grid 'properly' it got created as J.Grid
|
|
594
594
|
let grid;
|
|
595
|
-
const modules =
|
|
595
|
+
const modules = this.adaptableOptions.modules || [];
|
|
596
596
|
this.agGridModules = [...this.agGridModules, ...modules];
|
|
597
597
|
const agGridContainer = this.getAgGridContainerElement();
|
|
598
|
-
if (this.gridOptions.modules) {
|
|
599
|
-
delete this.gridOptions.modules;
|
|
600
|
-
}
|
|
601
598
|
grid = new all_modules_1.Grid(agGridContainer, this.gridOptions, { modules });
|
|
602
599
|
// add our adaptable object to the grid options api object
|
|
603
600
|
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
@@ -905,13 +902,12 @@ class Adaptable {
|
|
|
905
902
|
}
|
|
906
903
|
return null;
|
|
907
904
|
}
|
|
908
|
-
|
|
909
|
-
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
910
|
-
return this.getFlashingCellStyleFor(primaryKeyValue);
|
|
911
|
-
}
|
|
912
|
-
getFlashingCellStyleFor(primaryKey, colId) {
|
|
905
|
+
getFlashingCellStyle(col, params) {
|
|
913
906
|
var _a;
|
|
914
|
-
const
|
|
907
|
+
const primaryKey = params.node.aggData
|
|
908
|
+
? params.node.id
|
|
909
|
+
: this.getPrimaryKeyValueFromRowNode(params.node);
|
|
910
|
+
const flashingCell = this.api.internalApi.getAdaptableFlashingCellFor(primaryKey, col.columnId);
|
|
915
911
|
if (!flashingCell) {
|
|
916
912
|
return {};
|
|
917
913
|
}
|
|
@@ -921,10 +917,6 @@ class Adaptable {
|
|
|
921
917
|
? flashingCell.flashingCellDefinition.DownChangeStyle
|
|
922
918
|
: flashingCell.flashingCellDefinition.NeutralChangeStyle)) !== null && _a !== void 0 ? _a : {});
|
|
923
919
|
}
|
|
924
|
-
getFlashingCellStyle(col, params) {
|
|
925
|
-
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
926
|
-
return this.getFlashingCellStyleFor(primaryKeyValue, col.columnId);
|
|
927
|
-
}
|
|
928
920
|
getCellHighlightStyle(col, params) {
|
|
929
921
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
930
922
|
const cellHightlight = this.api.internalApi
|
|
@@ -1955,6 +1947,7 @@ class Adaptable {
|
|
|
1955
1947
|
const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable)
|
|
1956
1948
|
.FreeTextColumnSettings;
|
|
1957
1949
|
return this.api.freeTextColumnApi.getAllFreeTextColumn().map((freeTextColumn) => {
|
|
1950
|
+
var _a;
|
|
1958
1951
|
const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
|
|
1959
1952
|
const dataTypeEditor = freeTextColumn.DataType === 'Number'
|
|
1960
1953
|
? AdaptableNumberEditor_1.AdaptableNumberEditor
|
|
@@ -1962,6 +1955,13 @@ class Adaptable {
|
|
|
1962
1955
|
? AdaptableDateEditor_1.AdaptableDateEditor
|
|
1963
1956
|
: null;
|
|
1964
1957
|
LoggingHelper_1.LogAdaptableInfo('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
|
|
1958
|
+
const columnTypes = [
|
|
1959
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1960
|
+
this.agGridHelper.getAgGridDataType(freeTextColumn.DataType),
|
|
1961
|
+
];
|
|
1962
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty((_a = freeTextColumn === null || freeTextColumn === void 0 ? void 0 : freeTextColumn.FreeTextColumnSettings) === null || _a === void 0 ? void 0 : _a.ColumnTypes)) {
|
|
1963
|
+
columnTypes.push(...freeTextColumn.FreeTextColumnSettings.ColumnTypes);
|
|
1964
|
+
}
|
|
1965
1965
|
return {
|
|
1966
1966
|
headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
|
|
1967
1967
|
colId: freeTextColumn.ColumnId,
|
|
@@ -1980,10 +1980,7 @@ class Adaptable {
|
|
|
1980
1980
|
cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
|
|
1981
1981
|
? 'agLargeTextCellEditor'
|
|
1982
1982
|
: 'agTextCellEditor'),
|
|
1983
|
-
type:
|
|
1984
|
-
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1985
|
-
this.agGridHelper.getAgGridDataType(freeTextColumn.DataType),
|
|
1986
|
-
],
|
|
1983
|
+
type: columnTypes,
|
|
1987
1984
|
valueSetter: (params) => {
|
|
1988
1985
|
return (params.data[freeTextColumn.ColumnId] = params.newValue);
|
|
1989
1986
|
},
|
|
@@ -2100,6 +2097,13 @@ class Adaptable {
|
|
|
2100
2097
|
if (!calculatedColumnSettings.DataType) {
|
|
2101
2098
|
calculatedColumnSettings.DataType = this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
2102
2099
|
}
|
|
2100
|
+
const columnTypes = [
|
|
2101
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
2102
|
+
this.agGridHelper.getAgGridDataType(calculatedColumnSettings.DataType),
|
|
2103
|
+
];
|
|
2104
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
|
|
2105
|
+
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
2106
|
+
}
|
|
2103
2107
|
const newColDef = {
|
|
2104
2108
|
headerName: calculatedColumn.FriendlyName
|
|
2105
2109
|
? calculatedColumn.FriendlyName
|
|
@@ -2117,10 +2121,7 @@ class Adaptable {
|
|
|
2117
2121
|
enablePivot: calculatedColumnSettings.Pivotable,
|
|
2118
2122
|
suppressMenu: calculatedColumnSettings.SuppressMenu,
|
|
2119
2123
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
2120
|
-
type:
|
|
2121
|
-
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
2122
|
-
this.agGridHelper.getAgGridDataType(calculatedColumnSettings.DataType),
|
|
2123
|
-
],
|
|
2124
|
+
type: columnTypes,
|
|
2124
2125
|
valueGetter: (params) => {
|
|
2125
2126
|
var _a;
|
|
2126
2127
|
return this.CalculatedColumnExpressionService.ComputeExpressionValue((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression, params.node);
|
|
@@ -2438,7 +2439,6 @@ class Adaptable {
|
|
|
2438
2439
|
*/
|
|
2439
2440
|
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, (params) => {
|
|
2440
2441
|
if (params.finished == true && params.type == 'columnResized' && params.column) {
|
|
2441
|
-
this._emit('ColumnResized', params.column.getColId());
|
|
2442
2442
|
this.debouncedSaveGridLayout();
|
|
2443
2443
|
}
|
|
2444
2444
|
});
|
|
@@ -2671,7 +2671,6 @@ class Adaptable {
|
|
|
2671
2671
|
this.setupColumnCellStyle(colSetupInfo);
|
|
2672
2672
|
this.setupColumnCellClass(colSetupInfo);
|
|
2673
2673
|
this.setupColumnTooltipValueGetter(colSetupInfo);
|
|
2674
|
-
this.setupColumnTooltipField(colSetupInfo);
|
|
2675
2674
|
this.setupColumnValueGetter(colSetupInfo);
|
|
2676
2675
|
this.setupColumnAggFunc(colSetupInfo);
|
|
2677
2676
|
this.setupColumnFilter(colSetupInfo);
|
|
@@ -2862,10 +2861,6 @@ class Adaptable {
|
|
|
2862
2861
|
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
2863
2862
|
}
|
|
2864
2863
|
}
|
|
2865
|
-
const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
|
|
2866
|
-
if (sparkline) {
|
|
2867
|
-
return this.agGridHelper.createSparklineCellRendererComp(sparkline);
|
|
2868
|
-
}
|
|
2869
2864
|
});
|
|
2870
2865
|
}
|
|
2871
2866
|
setupColumnTooltipValueGetter({ col, colId }) {
|
|
@@ -2906,14 +2901,6 @@ class Adaptable {
|
|
|
2906
2901
|
}
|
|
2907
2902
|
});
|
|
2908
2903
|
}
|
|
2909
|
-
setupColumnTooltipField({ col, colId, colDef }) {
|
|
2910
|
-
this.setColDefProperty(col, 'tooltipField', () => {
|
|
2911
|
-
const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
|
|
2912
|
-
if (sparkline) {
|
|
2913
|
-
return sparkline.ShowToolTip ? colDef.field : '';
|
|
2914
|
-
}
|
|
2915
|
-
});
|
|
2916
|
-
}
|
|
2917
2904
|
setupColumnHeader({ col, abColumn }) {
|
|
2918
2905
|
var _a, _b;
|
|
2919
2906
|
const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
|
|
@@ -3166,14 +3153,30 @@ class Adaptable {
|
|
|
3166
3153
|
if (oldValue == newValue) {
|
|
3167
3154
|
return;
|
|
3168
3155
|
}
|
|
3169
|
-
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
3170
|
-
if (!primaryKeyValue) {
|
|
3171
|
-
return;
|
|
3172
|
-
}
|
|
3173
3156
|
const abColumn = this.api.columnApi.getColumnFromId(colId);
|
|
3174
3157
|
if (!abColumn) {
|
|
3175
3158
|
return;
|
|
3176
3159
|
}
|
|
3160
|
+
if (this.isGroupRowNode(rowNode)) {
|
|
3161
|
+
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
3162
|
+
oldValue: oldValue,
|
|
3163
|
+
newValue: newValue,
|
|
3164
|
+
column: abColumn,
|
|
3165
|
+
/**
|
|
3166
|
+
* A grouped row does not have an underling data item.
|
|
3167
|
+
* Because of this we use the rowNode.id as an identifier.
|
|
3168
|
+
*/
|
|
3169
|
+
primaryKeyValue: rowNode.id,
|
|
3170
|
+
rowNode: rowNode,
|
|
3171
|
+
trigger: 'aggChange',
|
|
3172
|
+
});
|
|
3173
|
+
this.DataService.CreateDataChangedEvent(dataChangedInfo);
|
|
3174
|
+
return;
|
|
3175
|
+
}
|
|
3176
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
3177
|
+
if (!primaryKeyValue) {
|
|
3178
|
+
return;
|
|
3179
|
+
}
|
|
3177
3180
|
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
3178
3181
|
oldValue: oldValue,
|
|
3179
3182
|
newValue: newValue,
|
|
@@ -3410,14 +3413,28 @@ class Adaptable {
|
|
|
3410
3413
|
getVisibleColumnCount() {
|
|
3411
3414
|
return this.gridOptions.columnApi.getAllColumns().filter((c) => c.isVisible()).length;
|
|
3412
3415
|
}
|
|
3413
|
-
selectColumns(columnIds) {
|
|
3414
|
-
|
|
3416
|
+
selectColumns(columnIds, config) {
|
|
3417
|
+
if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
|
|
3418
|
+
this.gridOptions.api.clearRangeSelection();
|
|
3419
|
+
}
|
|
3420
|
+
const rowCount = this.gridOptions.api.getDisplayedRowCount();
|
|
3421
|
+
columnIds.forEach((colId) => {
|
|
3422
|
+
const cellRangeParams = {
|
|
3423
|
+
rowStartIndex: 0,
|
|
3424
|
+
rowEndIndex: rowCount - 1,
|
|
3425
|
+
columnStart: colId,
|
|
3426
|
+
columnEnd: colId,
|
|
3427
|
+
};
|
|
3428
|
+
this.gridOptions.api.addCellRange(cellRangeParams);
|
|
3429
|
+
});
|
|
3415
3430
|
}
|
|
3416
|
-
selectColumn(columnId) {
|
|
3417
|
-
|
|
3431
|
+
selectColumn(columnId, config) {
|
|
3432
|
+
if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
|
|
3433
|
+
this.gridOptions.api.clearRangeSelection();
|
|
3434
|
+
}
|
|
3418
3435
|
const cellRangeParams = {
|
|
3419
3436
|
rowStartIndex: 0,
|
|
3420
|
-
rowEndIndex: this.gridOptions.api.getDisplayedRowCount(),
|
|
3437
|
+
rowEndIndex: this.gridOptions.api.getDisplayedRowCount() - 1,
|
|
3421
3438
|
columnStart: columnId,
|
|
3422
3439
|
columnEnd: columnId,
|
|
3423
3440
|
};
|
|
@@ -3898,6 +3915,12 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3898
3915
|
}
|
|
3899
3916
|
return this.gridOptions.api;
|
|
3900
3917
|
}
|
|
3918
|
+
canGenerateCharts() {
|
|
3919
|
+
return this.isModulePresent('charts') && this.gridOptions.enableCharts;
|
|
3920
|
+
}
|
|
3921
|
+
canHaveSparklines() {
|
|
3922
|
+
return this.isModulePresent('sparklines');
|
|
3923
|
+
}
|
|
3901
3924
|
canExportToExcel() {
|
|
3902
3925
|
return this.isModulePresent('excel-export');
|
|
3903
3926
|
}
|
|
@@ -4160,7 +4183,7 @@ class AdaptableNoCodeWizard {
|
|
|
4160
4183
|
*/
|
|
4161
4184
|
constructor(adaptableOptions, extraOptions = {}) {
|
|
4162
4185
|
const defaultInit = async ({ gridOptions, adaptableOptions }) => {
|
|
4163
|
-
adaptableOptions.
|
|
4186
|
+
adaptableOptions.gridOptions = gridOptions;
|
|
4164
4187
|
return await Adaptable.init(adaptableOptions);
|
|
4165
4188
|
};
|
|
4166
4189
|
this.adaptableOptions = adaptableOptions;
|
|
@@ -4194,7 +4217,7 @@ class AdaptableNoCodeWizard {
|
|
|
4194
4217
|
ReactDOM.unmountComponentAtNode(container);
|
|
4195
4218
|
this.init({
|
|
4196
4219
|
adaptableOptions,
|
|
4197
|
-
gridOptions: adaptableOptions.
|
|
4220
|
+
gridOptions: adaptableOptions.gridOptions,
|
|
4198
4221
|
});
|
|
4199
4222
|
} })), container);
|
|
4200
4223
|
}
|
|
@@ -4,7 +4,6 @@ import { AdaptableColumn, AdaptableColumnGroup } from '../PredefinedConfig/Commo
|
|
|
4
4
|
import { AdaptableNodeComparerFunction } from '../PredefinedConfig/Common/AdaptableComparerFunction';
|
|
5
5
|
import { DataType } from '../PredefinedConfig/Common/Enums';
|
|
6
6
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
7
|
-
import { SparklineColumn } from '../PredefinedConfig/SparklineColumnState';
|
|
8
7
|
import { IModule } from '../Strategy/Interface/IModule';
|
|
9
8
|
import { IPPStyle } from '../Utilities/Interface/IPPStyle';
|
|
10
9
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
@@ -22,7 +21,6 @@ export declare class agGridHelper {
|
|
|
22
21
|
getAgGridDarkThemeName(): string;
|
|
23
22
|
setUpModules(): Map<AdaptableModule, IModule>;
|
|
24
23
|
TrySetUpNodeIds(): boolean;
|
|
25
|
-
createSparklineCellRendererComp(sparkline: SparklineColumn): ICellRendererFunc | undefined;
|
|
26
24
|
createCheckboxRendererComp(columnId: string, isReadOnly: boolean): ICellRendererFunc | undefined;
|
|
27
25
|
createNumericStyleRendererFunc(formatColumn: FormatColumn): ICellRendererFunc;
|
|
28
26
|
getCleanValue(value: string): string | undefined;
|
|
@@ -46,6 +44,7 @@ export declare class agGridHelper {
|
|
|
46
44
|
private getColumnPinnedPosition;
|
|
47
45
|
private isColumnFixed;
|
|
48
46
|
private isColumnGrouped;
|
|
47
|
+
private isColumnSparkline;
|
|
49
48
|
private getColumnDataType;
|
|
50
49
|
private getabColDefValue;
|
|
51
50
|
getAgGridDataType(dataType: DataType): string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.agGridHelper = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const clamp_1 = tslib_1.__importDefault(require("lodash
|
|
5
|
+
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
6
6
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
7
7
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
8
8
|
const AlertModule_1 = require("../Strategy/AlertModule");
|
|
@@ -40,6 +40,7 @@ const CheckboxRenderer_1 = require("./CheckboxRenderer");
|
|
|
40
40
|
const DataChangeHistoryModule_1 = require("../Strategy/DataChangeHistoryModule");
|
|
41
41
|
const FlashingCellModule_1 = require("../Strategy/FlashingCellModule");
|
|
42
42
|
const SetingsPanelModule_1 = require("../Strategy/SetingsPanelModule");
|
|
43
|
+
const ChartingModule_1 = require("../Strategy/ChartingModule");
|
|
43
44
|
const tinycolor = require('tinycolor2');
|
|
44
45
|
/**
|
|
45
46
|
* Adaptable AG Grid implementation is getting really big and unwieldy
|
|
@@ -97,6 +98,7 @@ class agGridHelper {
|
|
|
97
98
|
modules.set(ModuleConstants.ThemeModuleId, new ThemeModule_1.ThemeModule(api));
|
|
98
99
|
modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule_1.GridInfoModule(api));
|
|
99
100
|
modules.set(ModuleConstants.SettingsPanelModuleId, new SetingsPanelModule_1.SettingsPanelModule(api));
|
|
101
|
+
modules.set(ModuleConstants.ChartingModuleId, new ChartingModule_1.ChartingModule(api));
|
|
100
102
|
return modules;
|
|
101
103
|
}
|
|
102
104
|
TrySetUpNodeIds() {
|
|
@@ -116,9 +118,6 @@ class agGridHelper {
|
|
|
116
118
|
};
|
|
117
119
|
return true;
|
|
118
120
|
}
|
|
119
|
-
createSparklineCellRendererComp(sparkline) {
|
|
120
|
-
return this.adaptable.lookupPlugins('sparklineColumnRenderer', sparkline);
|
|
121
|
-
}
|
|
122
121
|
createCheckboxRendererComp(columnId, isReadOnly) {
|
|
123
122
|
return CheckboxRenderer_1.getCheckboxRendererForColumn(columnId, isReadOnly, this.adaptable.api);
|
|
124
123
|
}
|
|
@@ -239,8 +238,8 @@ class agGridHelper {
|
|
|
239
238
|
isGrouped: this.isColumnGrouped(colDef),
|
|
240
239
|
isFixed: this.isColumnFixed(colDef),
|
|
241
240
|
pinned: this.getColumnPinnedPosition(colDef),
|
|
242
|
-
isSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
|
|
243
241
|
isExcludedFromQuickSearch: false,
|
|
242
|
+
isSparkline: this.isColumnSparkline(colDef),
|
|
244
243
|
};
|
|
245
244
|
if (abColumn.aggregatable) {
|
|
246
245
|
abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
|
|
@@ -438,6 +437,10 @@ class agGridHelper {
|
|
|
438
437
|
}
|
|
439
438
|
return false;
|
|
440
439
|
}
|
|
440
|
+
isColumnSparkline(colDef) {
|
|
441
|
+
// see https://www.ag-grid.com/javascript-data-grid/sparklines-overview/#enabling-sparklines
|
|
442
|
+
return (colDef === null || colDef === void 0 ? void 0 : colDef.cellRenderer) === 'agSparklineCellRenderer';
|
|
443
|
+
}
|
|
441
444
|
getColumnDataType(column, logWarning = true) {
|
|
442
445
|
// Some columns can have no ID or Title. we return string as a consequence but it needs testing
|
|
443
446
|
if (!column) {
|
|
@@ -4,7 +4,7 @@ exports.agGridMenuHelper = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
|
|
6
6
|
const icons_1 = require("../components/icons");
|
|
7
|
-
const flatten_1 = tslib_1.__importDefault(require("lodash
|
|
7
|
+
const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
|
|
8
8
|
// tslint:disable-next-line: class-name
|
|
9
9
|
class agGridMenuHelper {
|
|
10
10
|
constructor(adaptable, gridOptions) {
|
|
@@ -21,7 +21,8 @@ class agGridMenuHelper {
|
|
|
21
21
|
let userColumnMenuItems = [];
|
|
22
22
|
//First get Ag Grid Column Items
|
|
23
23
|
agGridColumnMenuItems.push(...this.createAgGridColumnMenuItems(originalgetMainMenuItems, params));
|
|
24
|
-
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
24
|
+
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
25
|
+
.showAdaptableColumnMenu;
|
|
25
26
|
let hasAdaptableColumnMenuItems = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
26
27
|
if (hasAdaptableColumnMenuItems) {
|
|
27
28
|
agGridColumnMenuItems.push('separator');
|
|
@@ -55,7 +56,8 @@ class agGridMenuHelper {
|
|
|
55
56
|
let agGridContextMenuItems = [];
|
|
56
57
|
let adaptableContextMenuItems = [];
|
|
57
58
|
let userContextMenuItems = [];
|
|
58
|
-
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
59
|
+
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
60
|
+
.showAdaptableContextMenu;
|
|
59
61
|
let hasAdaptableContextMenuItems = showAdaptableContextMenu == null || showAdaptableContextMenu !== false;
|
|
60
62
|
let userDefinedContextMenuItems = this.adaptable.adaptableOptions.menuOptions.contextMenuItems;
|
|
61
63
|
let hasUserDefinedContextMenuItems = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(userDefinedContextMenuItems);
|
|
@@ -230,7 +232,7 @@ class agGridMenuHelper {
|
|
|
230
232
|
if (adaptableColumn) {
|
|
231
233
|
clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
|
|
232
234
|
}
|
|
233
|
-
let selectedCellInfo = this.adaptable.
|
|
235
|
+
let selectedCellInfo = this.adaptable.api.gridApi.getSelectedCellInfo();
|
|
234
236
|
if (clickedCell && selectedCellInfo) {
|
|
235
237
|
let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
|
|
236
238
|
gc.column == clickedCell.column &&
|
|
@@ -267,7 +269,7 @@ class agGridMenuHelper {
|
|
|
267
269
|
}
|
|
268
270
|
createAdaptableContextMenuItems(menuContext) {
|
|
269
271
|
let columnMenuItems = [];
|
|
270
|
-
this.adaptable.
|
|
272
|
+
this.adaptable.adaptableModules.forEach((s) => {
|
|
271
273
|
let menuItems = s.addContextMenuItems(menuContext);
|
|
272
274
|
if (menuItems) {
|
|
273
275
|
columnMenuItems.push(...menuItems);
|
|
@@ -283,7 +285,8 @@ class agGridMenuHelper {
|
|
|
283
285
|
// here we create agGrid Menu items based on Adaptable Menu Items
|
|
284
286
|
// user has ability to decide whether to show or not
|
|
285
287
|
let contextMenuItems = [];
|
|
286
|
-
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
288
|
+
let showAdaptableContextMenu = this.adaptable.adaptableOptions.menuOptions
|
|
289
|
+
.showAdaptableContextMenu;
|
|
287
290
|
if (showAdaptableContextMenu == null || showAdaptableContextMenu !== false) {
|
|
288
291
|
adaptableMenuItems.forEach((adaptableMenuItem) => {
|
|
289
292
|
if (adaptableMenuItem) {
|
|
@@ -318,10 +321,11 @@ class agGridMenuHelper {
|
|
|
318
321
|
// method to get all the Adaptable Menu Items - together with running the function where user can choose whether or not to display
|
|
319
322
|
getAdaptableMenuItemsColumnHeader(adaptableColumn, menuContext) {
|
|
320
323
|
const adaptableMenuItems = [];
|
|
321
|
-
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
324
|
+
let showAdaptableColumnMenu = this.adaptable.adaptableOptions.menuOptions
|
|
325
|
+
.showAdaptableColumnMenu;
|
|
322
326
|
let runCheck = showAdaptableColumnMenu == null || showAdaptableColumnMenu !== false;
|
|
323
327
|
// if (adaptableColumn != null) {
|
|
324
|
-
this.adaptable.
|
|
328
|
+
this.adaptable.adaptableModules.forEach((s) => {
|
|
325
329
|
let menuItems = s.addColumnMenuItems(adaptableColumn);
|
|
326
330
|
if (menuItems) {
|
|
327
331
|
if (runCheck) {
|
|
@@ -29,7 +29,7 @@ function Dashboard(props) {
|
|
|
29
29
|
top: position.y,
|
|
30
30
|
};
|
|
31
31
|
const renderTabs = () => (React.createElement("div", { className: "ab-Dashboard__tabs" }, children &&
|
|
32
|
-
React.Children.map(children, (child, index) => (React.createElement("button", { className: join_1.default('ab-Dashboard__tab', !collapsed && activeTabIndex === index ? 'ab-Dashboard__tab--active' : ''), key: index, onClick: () => {
|
|
32
|
+
React.Children.map(children, (child, index) => (React.createElement("button", { type: "button", className: join_1.default('ab-Dashboard__tab', !collapsed && activeTabIndex === index ? 'ab-Dashboard__tab--active' : ''), key: index, onClick: () => {
|
|
33
33
|
if (activeTabIndex === index) {
|
|
34
34
|
setCollapsed(!collapsed);
|
|
35
35
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { DashboardTab } from '../../PredefinedConfig/DashboardState';
|
|
3
3
|
import { AdaptableDashboardToolbar } from '../../PredefinedConfig/Common/Types';
|
|
4
4
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
@@ -6,10 +6,12 @@ export interface DashboardToolbar {
|
|
|
6
6
|
Id: AdaptableDashboardToolbar | string;
|
|
7
7
|
Title: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface DashboardManagerProps {
|
|
10
10
|
tabs: DashboardTab[];
|
|
11
11
|
onTabsChange: (tabs: DashboardTab[]) => void;
|
|
12
12
|
availableToolbars: DashboardToolbar[];
|
|
13
13
|
api: AdaptableApi;
|
|
14
|
-
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const DashboardManager: React.FunctionComponent<DashboardManagerProps>;
|
|
15
17
|
export default DashboardManager;
|