@adaptabletools/adaptable 10.0.4-canary.5 → 11.0.0-canary.0
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 +1 -5
- package/bundle.cjs.js +115 -113
- package/index.css +1 -7
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +4 -7
- 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/ToolPanelOptions.d.ts +0 -14
- 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/FlashingCellApi.d.ts +35 -24
- 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/FlashingCellApiImpl.d.ts +8 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +39 -24
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +0 -4
- package/src/Api/Implementation/InternalApiImpl.js +1 -7
- 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 -4
- 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/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/FlashingCellState.d.ts +14 -19
- 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.js +1 -1
- 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/AdaptableStore.js +10 -20
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +0 -3
- package/src/Strategy/AlertModule.js +1 -1
- 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/FilterModule.js +3 -2
- package/src/Strategy/FlashingCellModule.js +4 -4
- 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/Utilities/getFlashingTargetViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +9 -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/Helpers/AdaptableHelper.js +2 -2
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/ObjectFactory.d.ts +0 -10
- package/src/Utilities/ObjectFactory.js +2 -65
- package/src/Utilities/Services/EntitlementService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +7 -11
- package/src/View/AdaptableView.js +1 -7
- 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 +1 -0
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +4 -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 +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -1
- 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 +5 -4
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +45 -80
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +8 -1
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/Dashboard/Dashboard.js +11 -34
- package/src/View/Dashboard/DashboardPopup.js +22 -14
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -2
- package/src/View/FlashingCell/Wizard/FlashingCellDurationWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +6 -6
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -3
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +3 -2
- package/src/View/Query/Wizard/NamedQueryWizard.js +10 -7
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/Shortcut/shortcutKeys.js +0 -1
- package/src/View/UIHelper.d.ts +0 -4
- package/src/View/UIHelper.js +1 -34
- package/src/agGrid/Adaptable.d.ts +10 -5
- package/src/agGrid/Adaptable.js +59 -49
- package/src/agGrid/agGridHelper.d.ts +1 -2
- package/src/agGrid/agGridHelper.js +7 -4
- package/src/agGrid/agGridMenuHelper.js +11 -7
- package/src/components/ApplicationIcon.d.ts +1 -1
- 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/metamodel/adaptable.metamodel.d.ts +58 -91
- package/src/metamodel/adaptable.metamodel.js +239 -288
- 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/components/ChartContainer/index.d.ts +0 -15
- package/src/components/ChartContainer/index.js +0 -22
|
@@ -5,7 +5,7 @@ const ModuleConstants_1 = require("../../../Utilities/Constants/ModuleConstants"
|
|
|
5
5
|
exports.isValidFlashingCellRules = (flashingCell, api, context) => {
|
|
6
6
|
let valid = true;
|
|
7
7
|
if (!flashingCell.Rule.Predicate && !flashingCell.Rule.BooleanExpression) {
|
|
8
|
-
return 'No
|
|
8
|
+
return 'No Rule defined for Flashing Cell';
|
|
9
9
|
}
|
|
10
10
|
if (valid && flashingCell.Rule.Predicate) {
|
|
11
11
|
valid = api.predicateApi.isValidPredicate(flashingCell.Rule.Predicate);
|
|
@@ -91,11 +91,12 @@ exports.GridInfoPopup = (props) => {
|
|
|
91
91
|
let gridSummaries = CreateGridSummaries(propValueColItems).map((x, index) => {
|
|
92
92
|
return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: index, colItems: x });
|
|
93
93
|
});
|
|
94
|
+
const showRadioButtons = [showGridSummary, showAdaptableOptions, showColumnInfo].filter((item) => item).length > 1;
|
|
94
95
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Grid Info', glyphicon: 'info-sign' },
|
|
95
|
-
React.createElement(rebass_1.Flex, { marginBottom: 2, padding: 3 },
|
|
96
|
+
React.createElement(rebass_1.Flex, { marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
|
|
96
97
|
showGridSummary && (React.createElement(Radio_1.default, { "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Grid Summary")),
|
|
97
98
|
showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "Adaptable Options")),
|
|
98
|
-
showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Column Info"))),
|
|
99
|
+
showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Column Info"))))),
|
|
99
100
|
state.ActiveTab == 'GridSummary' && (React.createElement(rebass_1.Box, { margin: 2 },
|
|
100
101
|
React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { colItems: propValueColItems, items: gridSummaries }))),
|
|
101
102
|
state.ActiveTab == 'AdaptableOptions' && React.createElement(AdaptableOptionsComponent_1.AdaptableOptionsComponent, { api: props.api }),
|
|
@@ -19,13 +19,16 @@ function NamedQueryWizard(props) {
|
|
|
19
19
|
: ObjectFactory_1.default.CreateEmptyNamedQuery();
|
|
20
20
|
});
|
|
21
21
|
const dispatch = react_redux_1.useDispatch();
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
const handleFinish = () => {
|
|
23
|
+
if (props.data) {
|
|
24
|
+
dispatch(QueryRedux.NamedQueryEdit(namedQuery));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
dispatch(QueryRedux.NamedQueryAdd(namedQuery));
|
|
28
|
+
}
|
|
29
|
+
props.onFinishWizard(namedQuery);
|
|
30
|
+
};
|
|
31
|
+
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, onFinish: handleFinish, sections: [
|
|
29
32
|
{
|
|
30
33
|
title: 'Expression',
|
|
31
34
|
details: 'Specify the query expression',
|
|
@@ -40,7 +40,7 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
40
40
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
41
41
|
React.createElement(FormLayout_1.default, { columns: [1, 2] },
|
|
42
42
|
React.createElement(FormLayout_1.FormRow, null,
|
|
43
|
-
React.createElement(CheckBox_1.CheckBox, { value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Run
|
|
43
|
+
React.createElement(CheckBox_1.CheckBox, { value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Run Simultaneous Query"))))),
|
|
44
44
|
React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
|
|
45
45
|
};
|
|
46
46
|
function mapStateToProps(state, ownProps) {
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -32,8 +32,6 @@ export declare function getEmptyConfigState(): EditableConfigEntityState;
|
|
|
32
32
|
export declare function getDescriptionForDataType(dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown'): "string" | "number" | "date";
|
|
33
33
|
export declare function getPlaceHolderforDataType(dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown'): "Enter Value" | "Enter Number" | "Enter Date";
|
|
34
34
|
export declare function getModalContainer(adaptableOptions: AdaptableOptions, document: Document): HTMLElement;
|
|
35
|
-
export declare function getChartContainer(adaptableOptions: AdaptableOptions, document: Document, showModal: boolean): HTMLElement;
|
|
36
|
-
export declare function isValidUserChartContainer(adaptableOptions: AdaptableOptions, document: Document): boolean;
|
|
37
35
|
export declare function IsEmptyStyle(style: AdaptableStyle): boolean;
|
|
38
36
|
export declare function IsNotEmptyStyle(style: AdaptableStyle): boolean;
|
|
39
37
|
export declare function getMessageTypeByStatusColour(statusColour: StatusColour): AdaptableMessageType;
|
|
@@ -62,8 +60,6 @@ export declare const UIHelper: {
|
|
|
62
60
|
getDescriptionForDataType: typeof getDescriptionForDataType;
|
|
63
61
|
getPlaceHolderforDataType: typeof getPlaceHolderforDataType;
|
|
64
62
|
getModalContainer: typeof getModalContainer;
|
|
65
|
-
getChartContainer: typeof getChartContainer;
|
|
66
|
-
isValidUserChartContainer: typeof isValidUserChartContainer;
|
|
67
63
|
IsEmptyStyle: typeof IsEmptyStyle;
|
|
68
64
|
IsNotEmptyStyle: typeof IsNotEmptyStyle;
|
|
69
65
|
getMessageTypeByStatusColour: typeof getMessageTypeByStatusColour;
|
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,
|
|
@@ -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;
|
|
@@ -253,7 +253,6 @@ export declare class Adaptable implements IAdaptable {
|
|
|
253
253
|
setupColumnCellEditor({ colId, col }: ColumnSetupInfo): void;
|
|
254
254
|
setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
255
255
|
setupColumnTooltipValueGetter({ col, colId }: ColumnSetupInfo): void;
|
|
256
|
-
setupColumnTooltipField({ col, colId, colDef }: ColumnSetupInfo): void;
|
|
257
256
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
258
257
|
getUserDefinedHeaderName(columnId: string): string;
|
|
259
258
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
@@ -289,8 +288,12 @@ export declare class Adaptable implements IAdaptable {
|
|
|
289
288
|
getColumnCount(): number;
|
|
290
289
|
getVisibleRowCount(): number;
|
|
291
290
|
getVisibleColumnCount(): number;
|
|
292
|
-
selectColumns(columnIds: string[]
|
|
293
|
-
|
|
291
|
+
selectColumns(columnIds: string[], config?: {
|
|
292
|
+
keepExistingSelection?: boolean;
|
|
293
|
+
}): void;
|
|
294
|
+
selectColumn(columnId: string, config?: {
|
|
295
|
+
keepExistingSelection?: boolean;
|
|
296
|
+
}): void;
|
|
294
297
|
selectAll(): void;
|
|
295
298
|
deselectAll(): void;
|
|
296
299
|
hideColumn(columnId: string): void;
|
|
@@ -328,6 +331,8 @@ export declare class Adaptable implements IAdaptable {
|
|
|
328
331
|
private getConditionalStyleRowClass;
|
|
329
332
|
private getConditionalStyleRowStyle;
|
|
330
333
|
private getGridOptionsApi;
|
|
334
|
+
canGenerateCharts(): boolean;
|
|
335
|
+
canHaveSparklines(): boolean;
|
|
331
336
|
canExportToExcel(): boolean;
|
|
332
337
|
exportToExcel(reportData: ReportData, fileName: string): void;
|
|
333
338
|
private setExcelStylesForExport;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -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;
|
|
@@ -340,7 +340,8 @@ class Adaptable {
|
|
|
340
340
|
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
341
341
|
if (!this.getDefaultGroupOrderComparator(this.gridOptions) &&
|
|
342
342
|
this.adaptableOptions.generalOptions.autoOrderGroupedColumns) {
|
|
343
|
-
this.gridOptions.defaultGroupOrderComparator =
|
|
343
|
+
this.gridOptions.defaultGroupOrderComparator =
|
|
344
|
+
this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
344
345
|
}
|
|
345
346
|
// we prefer the grid to be NOT instantiated so that we can do it
|
|
346
347
|
// perhaps in future we will force instantiation only?
|
|
@@ -360,8 +361,8 @@ class Adaptable {
|
|
|
360
361
|
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
361
362
|
// Set up Modules - we set up all the Modules suitable for AG Grid
|
|
362
363
|
// But users can make some hidden or readonly in their entitlements
|
|
363
|
-
this.
|
|
364
|
-
this.forPlugins((plugin) => plugin.afterInitModules(this, this.
|
|
364
|
+
this.adaptableModules = this.agGridHelper.setUpModules();
|
|
365
|
+
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
365
366
|
// also try to set it early, here, if the grid is initialized - needed for AdapTable tool panel
|
|
366
367
|
if (this.gridOptions.api) {
|
|
367
368
|
this.gridOptions.api.__adaptable = this;
|
|
@@ -476,13 +477,13 @@ class Adaptable {
|
|
|
476
477
|
if (eventName == AdaptableStore_1.INIT_STATE) {
|
|
477
478
|
this._adaptableReady = true;
|
|
478
479
|
LoggingHelper_1.LogAdaptableInfo(`Updating obsolete configuration/state`);
|
|
479
|
-
this.
|
|
480
|
+
this.adaptableModules.forEach((m) => m.updateOldConfig());
|
|
480
481
|
// call stuff here
|
|
481
482
|
// and reset state also?
|
|
482
483
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
483
484
|
this.api.eventApi.emit('AdaptableReady', {
|
|
484
485
|
adaptableApi: this.api,
|
|
485
|
-
gridOptions: this.adaptableOptions.
|
|
486
|
+
gridOptions: this.adaptableOptions.gridOptions,
|
|
486
487
|
});
|
|
487
488
|
}
|
|
488
489
|
});
|
|
@@ -592,12 +593,9 @@ class Adaptable {
|
|
|
592
593
|
}
|
|
593
594
|
// 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
595
|
let grid;
|
|
595
|
-
const modules =
|
|
596
|
+
const modules = this.adaptableOptions.modules || [];
|
|
596
597
|
this.agGridModules = [...this.agGridModules, ...modules];
|
|
597
598
|
const agGridContainer = this.getAgGridContainerElement();
|
|
598
|
-
if (this.gridOptions.modules) {
|
|
599
|
-
delete this.gridOptions.modules;
|
|
600
|
-
}
|
|
601
599
|
grid = new all_modules_1.Grid(agGridContainer, this.gridOptions, { modules });
|
|
602
600
|
// add our adaptable object to the grid options api object
|
|
603
601
|
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
@@ -1950,10 +1948,8 @@ class Adaptable {
|
|
|
1950
1948
|
];
|
|
1951
1949
|
}
|
|
1952
1950
|
getColDefsForFreeTextColumns() {
|
|
1953
|
-
const specialColumnsAreFilterable = this.api.internalApi.getAdaptableOptions().filterOptions
|
|
1954
|
-
|
|
1955
|
-
const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable)
|
|
1956
|
-
.FreeTextColumnSettings;
|
|
1951
|
+
const specialColumnsAreFilterable = this.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns;
|
|
1952
|
+
const defaultFreeTextColumnSettings = ObjectFactory_1.CreateEmptyFreeTextColumn(specialColumnsAreFilterable).FreeTextColumnSettings;
|
|
1957
1953
|
return this.api.freeTextColumnApi.getAllFreeTextColumn().map((freeTextColumn) => {
|
|
1958
1954
|
const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
|
|
1959
1955
|
const dataTypeEditor = freeTextColumn.DataType === 'Number'
|
|
@@ -1962,6 +1958,14 @@ class Adaptable {
|
|
|
1962
1958
|
? AdaptableDateEditor_1.AdaptableDateEditor
|
|
1963
1959
|
: null;
|
|
1964
1960
|
LoggingHelper_1.LogAdaptableInfo('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
|
|
1961
|
+
const columnTypes = [
|
|
1962
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1963
|
+
this.agGridHelper.getAgGridDataType(freeTextColumn.DataType),
|
|
1964
|
+
];
|
|
1965
|
+
if (freeTextColumn.FreeTextColumnSettings &&
|
|
1966
|
+
ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(freeTextColumn.FreeTextColumnSettings.ColumnTypes)) {
|
|
1967
|
+
columnTypes.push(...freeTextColumn.FreeTextColumnSettings.ColumnTypes);
|
|
1968
|
+
}
|
|
1965
1969
|
return {
|
|
1966
1970
|
headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
|
|
1967
1971
|
colId: freeTextColumn.ColumnId,
|
|
@@ -1980,10 +1984,7 @@ class Adaptable {
|
|
|
1980
1984
|
cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
|
|
1981
1985
|
? 'agLargeTextCellEditor'
|
|
1982
1986
|
: 'agTextCellEditor'),
|
|
1983
|
-
type:
|
|
1984
|
-
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1985
|
-
this.agGridHelper.getAgGridDataType(freeTextColumn.DataType),
|
|
1986
|
-
],
|
|
1987
|
+
type: columnTypes,
|
|
1987
1988
|
valueSetter: (params) => {
|
|
1988
1989
|
return (params.data[freeTextColumn.ColumnId] = params.newValue);
|
|
1989
1990
|
},
|
|
@@ -2092,13 +2093,20 @@ class Adaptable {
|
|
|
2092
2093
|
.enableFilterOnSpecialColumns
|
|
2093
2094
|
? this.adaptableOptions.filterOptions.enableFilterOnSpecialColumns
|
|
2094
2095
|
: true;
|
|
2095
|
-
const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(specialColumnsAreFilterable)
|
|
2096
|
-
.CalculatedColumnSettings;
|
|
2096
|
+
const defaultCalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(specialColumnsAreFilterable).CalculatedColumnSettings;
|
|
2097
2097
|
return this.api.calculatedColumnApi.getAllCalculatedColumn().map((calculatedColumn) => {
|
|
2098
2098
|
var _a;
|
|
2099
2099
|
const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
|
|
2100
2100
|
if (!calculatedColumnSettings.DataType) {
|
|
2101
|
-
calculatedColumnSettings.DataType =
|
|
2101
|
+
calculatedColumnSettings.DataType =
|
|
2102
|
+
this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
2103
|
+
}
|
|
2104
|
+
const columnTypes = [
|
|
2105
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
2106
|
+
this.agGridHelper.getAgGridDataType(calculatedColumnSettings.DataType),
|
|
2107
|
+
];
|
|
2108
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
|
|
2109
|
+
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
2102
2110
|
}
|
|
2103
2111
|
const newColDef = {
|
|
2104
2112
|
headerName: calculatedColumn.FriendlyName
|
|
@@ -2117,10 +2125,7 @@ class Adaptable {
|
|
|
2117
2125
|
enablePivot: calculatedColumnSettings.Pivotable,
|
|
2118
2126
|
suppressMenu: calculatedColumnSettings.SuppressMenu,
|
|
2119
2127
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
2120
|
-
type:
|
|
2121
|
-
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
2122
|
-
this.agGridHelper.getAgGridDataType(calculatedColumnSettings.DataType),
|
|
2123
|
-
],
|
|
2128
|
+
type: columnTypes,
|
|
2124
2129
|
valueGetter: (params) => {
|
|
2125
2130
|
var _a;
|
|
2126
2131
|
return this.CalculatedColumnExpressionService.ComputeExpressionValue((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression, params.node);
|
|
@@ -2474,8 +2479,7 @@ class Adaptable {
|
|
|
2474
2479
|
this.onSortChanged();
|
|
2475
2480
|
this.debouncedSetSelectedCells();
|
|
2476
2481
|
});
|
|
2477
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions
|
|
2478
|
-
.showGroupingTotalsAsHeader;
|
|
2482
|
+
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions.showGroupingTotalsAsHeader;
|
|
2479
2483
|
/**
|
|
2480
2484
|
* Use Case: Model has updated
|
|
2481
2485
|
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
@@ -2671,7 +2675,6 @@ class Adaptable {
|
|
|
2671
2675
|
this.setupColumnCellStyle(colSetupInfo);
|
|
2672
2676
|
this.setupColumnCellClass(colSetupInfo);
|
|
2673
2677
|
this.setupColumnTooltipValueGetter(colSetupInfo);
|
|
2674
|
-
this.setupColumnTooltipField(colSetupInfo);
|
|
2675
2678
|
this.setupColumnValueGetter(colSetupInfo);
|
|
2676
2679
|
this.setupColumnAggFunc(colSetupInfo);
|
|
2677
2680
|
this.setupColumnFilter(colSetupInfo);
|
|
@@ -2862,10 +2865,6 @@ class Adaptable {
|
|
|
2862
2865
|
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
2863
2866
|
}
|
|
2864
2867
|
}
|
|
2865
|
-
const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
|
|
2866
|
-
if (sparkline) {
|
|
2867
|
-
return this.agGridHelper.createSparklineCellRendererComp(sparkline);
|
|
2868
|
-
}
|
|
2869
2868
|
});
|
|
2870
2869
|
}
|
|
2871
2870
|
setupColumnTooltipValueGetter({ col, colId }) {
|
|
@@ -2906,14 +2905,6 @@ class Adaptable {
|
|
|
2906
2905
|
}
|
|
2907
2906
|
});
|
|
2908
2907
|
}
|
|
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
2908
|
setupColumnHeader({ col, abColumn }) {
|
|
2918
2909
|
var _a, _b;
|
|
2919
2910
|
const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
|
|
@@ -2922,8 +2913,7 @@ class Adaptable {
|
|
|
2922
2913
|
// set the default to the AG Grid provided values
|
|
2923
2914
|
// from https://github.com/ag-grid/ag-grid/blob/v26.1.0/community-modules/core/src/ts/columns/columnModel.ts#L2515
|
|
2924
2915
|
let resultHeaderName = userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(col.getColDef().field);
|
|
2925
|
-
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout()
|
|
2926
|
-
.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2916
|
+
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout().ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2927
2917
|
if (layoutCustomHeader) {
|
|
2928
2918
|
resultHeaderName = layoutCustomHeader;
|
|
2929
2919
|
}
|
|
@@ -3410,14 +3400,28 @@ class Adaptable {
|
|
|
3410
3400
|
getVisibleColumnCount() {
|
|
3411
3401
|
return this.gridOptions.columnApi.getAllColumns().filter((c) => c.isVisible()).length;
|
|
3412
3402
|
}
|
|
3413
|
-
selectColumns(columnIds) {
|
|
3414
|
-
|
|
3403
|
+
selectColumns(columnIds, config) {
|
|
3404
|
+
if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
|
|
3405
|
+
this.gridOptions.api.clearRangeSelection();
|
|
3406
|
+
}
|
|
3407
|
+
const rowCount = this.gridOptions.api.getDisplayedRowCount();
|
|
3408
|
+
columnIds.forEach((colId) => {
|
|
3409
|
+
const cellRangeParams = {
|
|
3410
|
+
rowStartIndex: 0,
|
|
3411
|
+
rowEndIndex: rowCount - 1,
|
|
3412
|
+
columnStart: colId,
|
|
3413
|
+
columnEnd: colId,
|
|
3414
|
+
};
|
|
3415
|
+
this.gridOptions.api.addCellRange(cellRangeParams);
|
|
3416
|
+
});
|
|
3415
3417
|
}
|
|
3416
|
-
selectColumn(columnId) {
|
|
3417
|
-
|
|
3418
|
+
selectColumn(columnId, config) {
|
|
3419
|
+
if (!(config === null || config === void 0 ? void 0 : config.keepExistingSelection)) {
|
|
3420
|
+
this.gridOptions.api.clearRangeSelection();
|
|
3421
|
+
}
|
|
3418
3422
|
const cellRangeParams = {
|
|
3419
3423
|
rowStartIndex: 0,
|
|
3420
|
-
rowEndIndex: this.gridOptions.api.getDisplayedRowCount(),
|
|
3424
|
+
rowEndIndex: this.gridOptions.api.getDisplayedRowCount() - 1,
|
|
3421
3425
|
columnStart: columnId,
|
|
3422
3426
|
columnEnd: columnId,
|
|
3423
3427
|
};
|
|
@@ -3898,6 +3902,12 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
3898
3902
|
}
|
|
3899
3903
|
return this.gridOptions.api;
|
|
3900
3904
|
}
|
|
3905
|
+
canGenerateCharts() {
|
|
3906
|
+
return this.isModulePresent('charts') && this.gridOptions.enableCharts;
|
|
3907
|
+
}
|
|
3908
|
+
canHaveSparklines() {
|
|
3909
|
+
return this.isModulePresent('sparklines');
|
|
3910
|
+
}
|
|
3901
3911
|
canExportToExcel() {
|
|
3902
3912
|
return this.isModulePresent('excel-export');
|
|
3903
3913
|
}
|
|
@@ -4160,7 +4170,7 @@ class AdaptableNoCodeWizard {
|
|
|
4160
4170
|
*/
|
|
4161
4171
|
constructor(adaptableOptions, extraOptions = {}) {
|
|
4162
4172
|
const defaultInit = async ({ gridOptions, adaptableOptions }) => {
|
|
4163
|
-
adaptableOptions.
|
|
4173
|
+
adaptableOptions.gridOptions = gridOptions;
|
|
4164
4174
|
return await Adaptable.init(adaptableOptions);
|
|
4165
4175
|
};
|
|
4166
4176
|
this.adaptableOptions = adaptableOptions;
|
|
@@ -4194,7 +4204,7 @@ class AdaptableNoCodeWizard {
|
|
|
4194
4204
|
ReactDOM.unmountComponentAtNode(container);
|
|
4195
4205
|
this.init({
|
|
4196
4206
|
adaptableOptions,
|
|
4197
|
-
gridOptions: adaptableOptions.
|
|
4207
|
+
gridOptions: adaptableOptions.gridOptions,
|
|
4198
4208
|
});
|
|
4199
4209
|
} })), container);
|
|
4200
4210
|
}
|
|
@@ -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;
|
|
@@ -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) {
|
|
@@ -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) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
|
|
6
|
+
exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props),
|
|
7
|
+
React.createElement("g", { transform: "matrix(0.966625, 0, 0, 0.966625, -161.245651, -58.219734)" },
|
|
8
|
+
React.createElement("g", { transform: "matrix(1, 0, 0, 1, 167.951233, 60.368694)" },
|
|
9
|
+
React.createElement("path", { d: "M 14.67 5 L 14.67 19 L 9.33 19 L 9.33 5 L 14.67 5 Z M 15.67 19 L 21 19 L 20.99 11.456 L 15.67 11.459 L 15.67 19 Z M 8.33 19 L 8.33 5 L 3 5 L 3 19 L 8.33 19 Z" })),
|
|
10
|
+
React.createElement("path", { d: "M 188.844 62.299 L 186.844 62.299 L 186.844 65.299 L 183.844 65.299 C 183.854 65.309 183.844 67.299 183.844 67.299 L 186.844 67.299 L 186.844 70.289 C 186.854 70.299 188.844 70.289 188.844 70.289 L 188.844 67.299 L 191.844 67.299 L 191.844 65.299 L 188.844 65.299 L 188.844 62.299 Z" }))));
|
|
@@ -47,6 +47,7 @@ const import_export_1 = tslib_1.__importDefault(require("./import-export"));
|
|
|
47
47
|
const calculated_column_1 = tslib_1.__importDefault(require("./calculated-column"));
|
|
48
48
|
const cell_summary_1 = tslib_1.__importDefault(require("./cell-summary"));
|
|
49
49
|
const column_chooser_1 = tslib_1.__importDefault(require("./column-chooser"));
|
|
50
|
+
const column_add_1 = tslib_1.__importDefault(require("./column-add"));
|
|
50
51
|
const cell_validation_1 = tslib_1.__importDefault(require("./cell-validation"));
|
|
51
52
|
const column_filter_1 = tslib_1.__importDefault(require("./column-filter"));
|
|
52
53
|
const column_info_1 = tslib_1.__importDefault(require("./column-info"));
|
|
@@ -136,6 +137,7 @@ const allIcons = {
|
|
|
136
137
|
chart: chart_1.default,
|
|
137
138
|
'cell-summary': cell_summary_1.default,
|
|
138
139
|
'column-chooser': column_chooser_1.default,
|
|
140
|
+
'column-add': column_add_1.default,
|
|
139
141
|
'column-filter': column_filter_1.default,
|
|
140
142
|
'data-source': data_source_1.default,
|
|
141
143
|
export: export_1.default,
|