@adaptabletools/adaptable 13.0.0-canary.1 → 13.0.0-canary.10
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/agGrid.d.ts +23 -1
- package/agGrid.js +23 -1
- package/base.css +1 -0
- package/bundle.cjs.js +169 -169
- package/index.css +1 -0
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +7 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +108 -23
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
- package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +5 -0
- package/src/Api/ConditionalStyleApi.d.ts +20 -42
- package/src/Api/ConfigApi.d.ts +1 -2
- package/src/Api/FinsembleApi.d.ts +10 -0
- package/src/Api/FinsembleApi.js +2 -0
- package/src/Api/FormatColumnApi.d.ts +47 -3
- package/src/Api/Implementation/ColumnApiImpl.js +3 -3
- package/src/Api/Implementation/DashboardApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +18 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +97 -14
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.js +4 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PluginsApiImpl.js +6 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +0 -2
- package/src/Api/Implementation/QueryLanguageApiImpl.js +0 -3
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -2
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
- package/src/Api/InternalApi.d.ts +1 -0
- package/src/Api/PluginsApi.d.ts +5 -0
- package/src/Api/QueryLanguageApi.d.ts +0 -5
- package/src/Api/ToolPanelApi.d.ts +10 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
- package/src/PredefinedConfig/FormatColumnState.d.ts +19 -6
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
- package/src/Redux/Store/AdaptableStore.js +2 -0
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -0
- package/src/Strategy/ConditionalStyleModule.js +6 -0
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/FormatColumnModule.d.ts +4 -9
- package/src/Strategy/FormatColumnModule.js +52 -2
- package/src/Strategy/Interface/IModule.d.ts +11 -10
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -10
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
- package/src/Utilities/Extensions/TypeExtensions.js +5 -0
- package/src/Utilities/ObjectFactory.js +0 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
- package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +88 -39
- package/src/Utilities/license/LicenseDetails.d.ts +1 -1
- package/src/Utilities/license/decode.d.ts +1 -0
- package/src/Utilities/license/decode.js +1 -1
- package/src/View/AdaptablePopover/index.d.ts +2 -2
- package/src/View/AdaptableView.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/index.d.ts +1 -1
- package/src/View/ColorPicker.d.ts +1 -5
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonEdit.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
- package/src/View/Components/EntityRulesEditor/index.js +29 -19
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +4 -0
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +5 -2
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +2 -0
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +18 -0
- package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +29 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +20 -2
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -22
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +13 -0
- package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/constants.js +4 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +2 -2
- package/src/View/License/LicenseWatermark.d.ts +1 -1
- package/src/View/StateManagement/components/ClearButton.d.ts +1 -1
- package/src/View/StateManagement/components/LoadButton.d.ts +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +4 -4
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +3 -3
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.d.ts +3 -3
- package/src/View/Wizard/OnePageWizards.js +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +1 -0
- package/src/agGrid/ActionColumnRenderer.js +5 -5
- package/src/agGrid/Adaptable.d.ts +13 -2
- package/src/agGrid/Adaptable.js +142 -85
- package/src/agGrid/FilterWrapper.js +5 -5
- package/src/agGrid/FloatingFilterWrapper.js +3 -4
- package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -0
- package/src/agGrid/createAgStatusPanelComponent.js +3 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +3 -3
- package/src/components/CheckBox/index.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Dialog/index.d.ts +4 -2
- package/src/components/Dialog/index.js +2 -2
- package/src/components/DropdownButton/index.d.ts +21 -4
- package/src/components/DropdownButton/index.js +5 -6
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +4 -2
- package/src/components/Loader/Loader.d.ts +2 -2
- package/src/components/Logo/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/PopupWithFooter.d.ts +2 -2
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/src/components/SelectList.d.ts +1 -1
- package/src/components/SimpleButton/index.d.ts +4 -5
- package/src/components/SimpleButton/index.js +3 -2
- package/src/components/StylePreview.d.ts +1 -1
- package/src/components/Tag/Tag.d.ts +1 -1
- package/src/components/Textarea/index.d.ts +6 -4
- package/src/components/ToggleButton/index.d.ts +1 -1
- package/src/components/WindowModal/WindowModal.d.ts +1 -1
- package/src/components/icons/index.d.ts +3 -2
- package/src/components/icons/layout.d.ts +2 -1
- package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +100 -64
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +6 -3
- package/src/renderReactRoot.d.ts +3 -0
- package/src/renderReactRoot.js +54 -0
- package/src/types.d.ts +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Services/LicenseService.js +0 -1
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -8,7 +8,6 @@ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
|
8
8
|
const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
|
|
9
9
|
const uniqBy_1 = tslib_1.__importDefault(require("lodash/uniqBy"));
|
|
10
10
|
const React = tslib_1.__importStar(require("react"));
|
|
11
|
-
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
12
11
|
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
13
12
|
const AdaptableApiImpl_1 = require("../Api/Implementation/AdaptableApiImpl");
|
|
14
13
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
@@ -64,6 +63,7 @@ const AdaptableStatusBar_1 = require("../View/StatusBar/AdaptableStatusBar");
|
|
|
64
63
|
const RowEditService_1 = require("../Utilities/Services/RowEditService");
|
|
65
64
|
const weightedAverage_1 = require("./weightedAverage");
|
|
66
65
|
const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColumns");
|
|
66
|
+
const renderReactRoot_1 = require("../renderReactRoot");
|
|
67
67
|
const tinycolor = require('tinycolor2');
|
|
68
68
|
const GROUP_PATH_SEPARATOR = '/';
|
|
69
69
|
// IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
|
|
@@ -169,6 +169,8 @@ class Adaptable {
|
|
|
169
169
|
};
|
|
170
170
|
this._adaptableReady = false;
|
|
171
171
|
this.isDestroyed = false;
|
|
172
|
+
this.supressReact18RenderWarning = false;
|
|
173
|
+
this.renderReactRoot = (node, container) => (0, renderReactRoot_1.renderReactRoot)(node, container, this.supressReact18RenderWarning);
|
|
172
174
|
this.isPluginLoaded = (pluginId) => {
|
|
173
175
|
const plugins = this.adaptableOptions.plugins || [];
|
|
174
176
|
for (let i = 0, len = plugins.length; i < len; i++) {
|
|
@@ -274,7 +276,9 @@ class Adaptable {
|
|
|
274
276
|
else {
|
|
275
277
|
core_1.ModuleRegistry.registerModules(runtimeConfig.agGridModules);
|
|
276
278
|
}
|
|
277
|
-
return Adaptable.initInternal(adaptableOptions
|
|
279
|
+
return Adaptable.initInternal(adaptableOptions, {
|
|
280
|
+
supressReact18RenderWarning: true,
|
|
281
|
+
});
|
|
278
282
|
}
|
|
279
283
|
/**
|
|
280
284
|
* Lazy static constructor for Adaptable
|
|
@@ -337,6 +341,12 @@ class Adaptable {
|
|
|
337
341
|
// this is still used internally but should not be used externally as a preference
|
|
338
342
|
async init(adaptableOptions, runtimeConfig, _staticInit) {
|
|
339
343
|
var _a, _b, _c, _d, _e, _f;
|
|
344
|
+
if (runtimeConfig) {
|
|
345
|
+
this.supressReact18RenderWarning = !!runtimeConfig.supressReact18RenderWarning;
|
|
346
|
+
if (runtimeConfig.renderReactRoot) {
|
|
347
|
+
this.renderReactRoot = runtimeConfig.renderReactRoot;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
340
350
|
if (!_staticInit) {
|
|
341
351
|
(0, LoggingHelper_1.ConsoleLogWarning)(`
|
|
342
352
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -456,26 +466,20 @@ class Adaptable {
|
|
|
456
466
|
AdaptableHelper_1.default.checkValidPrimaryKey(this);
|
|
457
467
|
}, (e) => {
|
|
458
468
|
(0, LoggingHelper_1.ConsoleLogError)('Failed to Init Modules : ', e);
|
|
459
|
-
// for now we
|
|
469
|
+
// for now we initialize the grid even if initialising Modules has failed (perhaps revisit this?)
|
|
460
470
|
this.initInternalGridLogic();
|
|
461
471
|
this.api.internalApi.hideLoadingScreen(); // doesnt really help but at least clears the screen
|
|
462
472
|
}).then(async () => {
|
|
463
473
|
this.api.internalApi.hideLoadingScreen();
|
|
464
474
|
this.isInitialised = true;
|
|
465
475
|
this._adaptableReady = true;
|
|
466
|
-
// setTimeout(() => {
|
|
467
|
-
// this.api.eventApi.emit('AdaptableReady', {
|
|
468
|
-
// adaptableApi: this.api,
|
|
469
|
-
// gridOptions: this.adaptableOptions.gridOptions,
|
|
470
|
-
// });
|
|
471
|
-
// }, 0);
|
|
472
476
|
});
|
|
473
477
|
if (this.abContainerElement == null) {
|
|
474
478
|
this.abContainerElement = this.getAdaptableContainerElement();
|
|
475
479
|
}
|
|
476
480
|
if (this.abContainerElement != null) {
|
|
477
481
|
this.abContainerElement.innerHTML = '';
|
|
478
|
-
|
|
482
|
+
this.unmountReactRoot = this.renderReactRoot((0, AdaptableView_1.AdaptableApp)({ Adaptable: this }), this.abContainerElement);
|
|
479
483
|
}
|
|
480
484
|
// create debounce methods that take a time based on user settings
|
|
481
485
|
this.throttleFilterOnEditDataChange = (0, throttle_1.default)(
|
|
@@ -888,51 +892,68 @@ class Adaptable {
|
|
|
888
892
|
this.gridOptions.api.setColumnDefs(colDefs);
|
|
889
893
|
this.updateColumnsIntoStore(); // todo remove this from here!!!
|
|
890
894
|
}
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
895
|
+
getFormatColumnSpecialColumnStyle(formatColumn, abColumn, params) {
|
|
896
|
+
const columnStyle = formatColumn.ColumnStyle;
|
|
897
|
+
let style = {};
|
|
898
|
+
const gradientStyle = columnStyle === null || columnStyle === void 0 ? void 0 : columnStyle.GradientStyle;
|
|
899
|
+
if (gradientStyle) {
|
|
900
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, abColumn, params.node, params.value);
|
|
901
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, abColumn, params.node, params.value);
|
|
902
|
+
const clampedValue = (0, clamp_1.default)(params.value, min, max);
|
|
903
|
+
let cellBackColor;
|
|
904
|
+
let reverseGradient = false;
|
|
905
|
+
if (gradientStyle.ColumnComparison) {
|
|
906
|
+
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
const matchingRange = gradientStyle.CellRanges.find((r) => (r.Min == 'Col-Min' || r.Min <= clampedValue) &&
|
|
910
|
+
(r.Max == 'Col-Max' || r.Max >= clampedValue));
|
|
911
|
+
if (matchingRange) {
|
|
912
|
+
cellBackColor = matchingRange.Color;
|
|
913
|
+
reverseGradient = matchingRange.ReverseGradient;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
const increase = Math.abs(max - min);
|
|
917
|
+
const percentage = ((params.value - min) / increase) * 100;
|
|
918
|
+
let alpha = Number((percentage / 100).toPrecision(2));
|
|
919
|
+
if (reverseGradient) {
|
|
920
|
+
alpha = 1 - alpha;
|
|
921
|
+
}
|
|
922
|
+
const preparedColor = (0, StyleHelper_1.getVariableColor)(cellBackColor);
|
|
923
|
+
style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
|
|
894
924
|
}
|
|
895
|
-
if (
|
|
896
|
-
|
|
925
|
+
if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
|
|
926
|
+
style.paddingTop = 0;
|
|
927
|
+
style.paddingBottom = 0;
|
|
897
928
|
}
|
|
929
|
+
return style;
|
|
930
|
+
}
|
|
931
|
+
getFormatColumnColumnStyle(formatColumns) {
|
|
932
|
+
// first has more precedence, then they need to be applied in reverse order
|
|
933
|
+
return formatColumns.reduceRight((style, formatColumn) => {
|
|
934
|
+
const formatColumnStyle = this.convertAdaptableStyleToCSS(formatColumn.Style);
|
|
935
|
+
return Object.assign(Object.assign({}, style), formatColumnStyle);
|
|
936
|
+
}, {});
|
|
937
|
+
}
|
|
938
|
+
getFormatColumnCellStyle(abColumn, formatColumn, formatColumnsWithStyle, params) {
|
|
898
939
|
let style = {};
|
|
899
940
|
// percent bar && do we show text
|
|
900
941
|
const columnStyle = formatColumn.ColumnStyle;
|
|
901
942
|
if (columnStyle) {
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, abColumn, params.node, params.value);
|
|
906
|
-
const clampedValue = (0, clamp_1.default)(params.value, min, max);
|
|
907
|
-
let cellBackColor;
|
|
908
|
-
let reverseGradient = false;
|
|
909
|
-
if (gradientStyle.ColumnComparison) {
|
|
910
|
-
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
911
|
-
}
|
|
912
|
-
else {
|
|
913
|
-
const matchingRange = gradientStyle.CellRanges.find((r) => (r.Min == 'Col-Min' || r.Min <= clampedValue) &&
|
|
914
|
-
(r.Max == 'Col-Max' || r.Max >= clampedValue));
|
|
915
|
-
if (matchingRange) {
|
|
916
|
-
cellBackColor = matchingRange.Color;
|
|
917
|
-
reverseGradient = matchingRange.ReverseGradient;
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
const increase = Math.abs(max - min);
|
|
921
|
-
const percentage = ((params.value - min) / increase) * 100;
|
|
922
|
-
let alpha = Number((percentage / 100).toPrecision(2));
|
|
923
|
-
if (reverseGradient) {
|
|
924
|
-
alpha = 1 - alpha;
|
|
925
|
-
}
|
|
926
|
-
const preparedColor = (0, StyleHelper_1.getVariableColor)(cellBackColor);
|
|
927
|
-
style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
|
|
928
|
-
}
|
|
929
|
-
if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
|
|
930
|
-
style.paddingTop = 0;
|
|
931
|
-
style.paddingBottom = 0;
|
|
943
|
+
if (columnStyle &&
|
|
944
|
+
!this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params)) {
|
|
945
|
+
return style;
|
|
932
946
|
}
|
|
947
|
+
style = Object.assign(Object.assign({}, style), this.getFormatColumnSpecialColumnStyle(formatColumn, abColumn, params));
|
|
933
948
|
}
|
|
934
949
|
else if (formatColumn.Style) {
|
|
935
|
-
|
|
950
|
+
const activeFormatColumnsWithStyle = formatColumnsWithStyle.filter((formatColumn) => {
|
|
951
|
+
return this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params);
|
|
952
|
+
});
|
|
953
|
+
if (!activeFormatColumnsWithStyle.length) {
|
|
954
|
+
return style;
|
|
955
|
+
}
|
|
956
|
+
style = Object.assign(Object.assign({}, style), this.getFormatColumnColumnStyle(activeFormatColumnsWithStyle));
|
|
936
957
|
}
|
|
937
958
|
if (formatColumn.CellAlignment) {
|
|
938
959
|
switch (formatColumn.CellAlignment) {
|
|
@@ -949,6 +970,30 @@ class Adaptable {
|
|
|
949
970
|
}
|
|
950
971
|
return style;
|
|
951
972
|
}
|
|
973
|
+
getFormatColumnCellClass(formatColumns, abColumn, params) {
|
|
974
|
+
const classNames = formatColumns
|
|
975
|
+
.map((formatColumn) => {
|
|
976
|
+
var _a, _b;
|
|
977
|
+
if (((_a = formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName) &&
|
|
978
|
+
this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params)) {
|
|
979
|
+
return (_b = formatColumn.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
980
|
+
}
|
|
981
|
+
})
|
|
982
|
+
.filter((x) => !!x);
|
|
983
|
+
return classNames;
|
|
984
|
+
}
|
|
985
|
+
getFormatColumnRowClass(formatColumns, params) {
|
|
986
|
+
const classNames = formatColumns
|
|
987
|
+
.map((formatColumn) => {
|
|
988
|
+
var _a, _b;
|
|
989
|
+
if (((_a = formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName) &&
|
|
990
|
+
this.api.formatColumnApi.isFormatColumnActiveForRow(formatColumn, params)) {
|
|
991
|
+
return (_b = formatColumn.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
992
|
+
}
|
|
993
|
+
})
|
|
994
|
+
.filter((x) => !!x);
|
|
995
|
+
return classNames;
|
|
996
|
+
}
|
|
952
997
|
getActiveAlertWithHighlightCell(col, params) {
|
|
953
998
|
return this.api.internalApi.getAdaptableAlertWithHighlightCell(col.columnId, params.node);
|
|
954
999
|
}
|
|
@@ -2489,7 +2534,7 @@ class Adaptable {
|
|
|
2489
2534
|
return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
|
|
2490
2535
|
}
|
|
2491
2536
|
destroy(config) {
|
|
2492
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
2537
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
2493
2538
|
if (this.gridOptions && this.gridOptions.api) {
|
|
2494
2539
|
this.gridOptions.api.removeEventListener(core_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
|
|
2495
2540
|
this.gridOptions.api.removeEventListener(core_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
|
|
@@ -2563,37 +2608,37 @@ class Adaptable {
|
|
|
2563
2608
|
return;
|
|
2564
2609
|
}
|
|
2565
2610
|
if (abContainerElement != null) {
|
|
2566
|
-
|
|
2611
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
2567
2612
|
}
|
|
2568
2613
|
this.gridContainerElement = null;
|
|
2569
2614
|
this.abContainerElement = null;
|
|
2570
|
-
(
|
|
2615
|
+
(_b = this.adaptableStore) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2571
2616
|
this.adaptableStore = null;
|
|
2572
2617
|
this.gridOptions = null;
|
|
2573
2618
|
this.adaptableOptions = null;
|
|
2574
|
-
(
|
|
2619
|
+
(_d = (_c = this.CalculatedColumnExpressionService) === null || _c === void 0 ? void 0 : _c.destroy) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
2575
2620
|
this.CalculatedColumnExpressionService = null;
|
|
2576
|
-
(
|
|
2621
|
+
(_f = (_e = this.DataService) === null || _e === void 0 ? void 0 : _e.destroy) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
2577
2622
|
this.DataService = null;
|
|
2578
|
-
(
|
|
2623
|
+
(_h = (_g = this.EntitlementService) === null || _g === void 0 ? void 0 : _g.destroy) === null || _h === void 0 ? void 0 : _h.call(_g);
|
|
2579
2624
|
this.EntitlementService = null;
|
|
2580
|
-
(
|
|
2625
|
+
(_k = (_j = this.ReportService) === null || _j === void 0 ? void 0 : _j.destroy) === null || _k === void 0 ? void 0 : _k.call(_j);
|
|
2581
2626
|
this.ReportService = null;
|
|
2582
|
-
(
|
|
2627
|
+
(_m = (_l = this.ModuleService) === null || _l === void 0 ? void 0 : _l.destroy) === null || _m === void 0 ? void 0 : _m.call(_l);
|
|
2583
2628
|
this.ModuleService = null;
|
|
2584
|
-
(
|
|
2629
|
+
(_p = (_o = this.ValidationService) === null || _o === void 0 ? void 0 : _o.destroy) === null || _p === void 0 ? void 0 : _p.call(_o);
|
|
2585
2630
|
this.ValidationService = null;
|
|
2586
|
-
(
|
|
2631
|
+
(_r = (_q = this.QueryLanguageService) === null || _q === void 0 ? void 0 : _q.destroy) === null || _r === void 0 ? void 0 : _r.call(_q);
|
|
2587
2632
|
this.QueryLanguageService = null;
|
|
2588
|
-
(
|
|
2633
|
+
(_t = (_s = this.AlertService) === null || _s === void 0 ? void 0 : _s.destroy) === null || _t === void 0 ? void 0 : _t.call(_s);
|
|
2589
2634
|
this.AlertService = null;
|
|
2590
|
-
(
|
|
2635
|
+
(_v = (_u = this.TeamSharingService) === null || _u === void 0 ? void 0 : _u.destroy) === null || _v === void 0 ? void 0 : _v.call(_u);
|
|
2591
2636
|
this.TeamSharingService = null;
|
|
2592
|
-
(
|
|
2637
|
+
(_x = (_w = this.RowEditService) === null || _w === void 0 ? void 0 : _w.destroy) === null || _x === void 0 ? void 0 : _x.call(_w);
|
|
2593
2638
|
this.RowEditService = null;
|
|
2594
|
-
(
|
|
2639
|
+
(_z = (_y = this.MetamodelService) === null || _y === void 0 ? void 0 : _y.destroy) === null || _z === void 0 ? void 0 : _z.call(_y);
|
|
2595
2640
|
this.MetamodelService = null;
|
|
2596
|
-
(
|
|
2641
|
+
(_1 = (_0 = this.LicenseService) === null || _0 === void 0 ? void 0 : _0.destroy) === null || _1 === void 0 ? void 0 : _1.call(_0);
|
|
2597
2642
|
this.LicenseService = null;
|
|
2598
2643
|
this.isDestroyed = true;
|
|
2599
2644
|
}
|
|
@@ -3140,15 +3185,17 @@ class Adaptable {
|
|
|
3140
3185
|
borderColor: null,
|
|
3141
3186
|
};
|
|
3142
3187
|
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
3188
|
+
const formatColumnsWithStyle = this.api.formatColumnApi.getColumnFormatColumnsWithStyle(abColumn);
|
|
3143
3189
|
const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
|
|
3144
3190
|
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
3145
3191
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
3146
3192
|
const cellStyle = (params) => {
|
|
3147
3193
|
const formatColumnCellStyle = formatColumn
|
|
3148
|
-
? this.getFormatColumnCellStyle(abColumn, formatColumn, params)
|
|
3194
|
+
? this.getFormatColumnCellStyle(abColumn, formatColumn, formatColumnsWithStyle, params)
|
|
3149
3195
|
: undefined;
|
|
3150
3196
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
3151
|
-
const
|
|
3197
|
+
const conditionalStyleObj = this.getConditionalStyleCellStyle(conditionalStyles, abColumn, params);
|
|
3198
|
+
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultCellStyle), this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), formatColumnCellStyle), conditionalStyleObj), (isQuickSearchActive ? quickSearchStyle : undefined)), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
3152
3199
|
return result;
|
|
3153
3200
|
};
|
|
3154
3201
|
return cellStyle;
|
|
@@ -3156,9 +3203,7 @@ class Adaptable {
|
|
|
3156
3203
|
}
|
|
3157
3204
|
setupColumnCellClass({ col, colId, abColumn }) {
|
|
3158
3205
|
this.setColDefProperty(col, 'cellClass', (userCellClass) => {
|
|
3159
|
-
|
|
3160
|
-
const formatColumn = this.api.formatColumnApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
3161
|
-
const formatColumnStyleClassName = formatColumn && !formatColumn.IsSuspended ? (_a = formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName : null;
|
|
3206
|
+
const formatColumns = this.api.formatColumnApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
3162
3207
|
const conditionalStyles = this.api.conditionalStyleApi
|
|
3163
3208
|
.getConditionalStylesForColumn(abColumn)
|
|
3164
3209
|
.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName));
|
|
@@ -3175,7 +3220,9 @@ class Adaptable {
|
|
|
3175
3220
|
const returnValue = [
|
|
3176
3221
|
this.getExcelClassNameForCell(colId, primaryKeyValue),
|
|
3177
3222
|
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
3178
|
-
|
|
3223
|
+
formatColumns.length
|
|
3224
|
+
? this.getFormatColumnCellClass(formatColumns, abColumn, params)
|
|
3225
|
+
: null,
|
|
3179
3226
|
hasConditionalStylesWithClassNames
|
|
3180
3227
|
? this.getConditionalStyleCellClass(conditionalStyles, abColumn, params)
|
|
3181
3228
|
: null,
|
|
@@ -3353,13 +3400,6 @@ class Adaptable {
|
|
|
3353
3400
|
if (layoutCustomHeader) {
|
|
3354
3401
|
resultHeaderName = layoutCustomHeader;
|
|
3355
3402
|
}
|
|
3356
|
-
// check if the deprecated formatColumn header is used
|
|
3357
|
-
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.columnId);
|
|
3358
|
-
if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
|
|
3359
|
-
// fallback to the formatColumn property if no Layout custom header is provided
|
|
3360
|
-
resultHeaderName = formatColumn.HeaderName;
|
|
3361
|
-
(0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: 'FormatColumn.HeaderName' is deprecated: use 'Layout.ColumnHeadersMap' instead`);
|
|
3362
|
-
}
|
|
3363
3403
|
// required here for the initial layout rendering
|
|
3364
3404
|
abColumn.friendlyName = resultHeaderName;
|
|
3365
3405
|
return resultHeaderName;
|
|
@@ -3397,7 +3437,7 @@ class Adaptable {
|
|
|
3397
3437
|
});
|
|
3398
3438
|
}
|
|
3399
3439
|
setupColumnValueFormatter({ col, abColumn }) {
|
|
3400
|
-
this.setColDefProperty(col, 'valueFormatter', () => {
|
|
3440
|
+
this.setColDefProperty(col, 'valueFormatter', (params) => {
|
|
3401
3441
|
const formatColumn = this.api.formatColumnApi.getFormatColumnWithDisplayFormatForColumn(abColumn);
|
|
3402
3442
|
if (!formatColumn) {
|
|
3403
3443
|
return;
|
|
@@ -3432,7 +3472,12 @@ class Adaptable {
|
|
|
3432
3472
|
};
|
|
3433
3473
|
}
|
|
3434
3474
|
}
|
|
3435
|
-
|
|
3475
|
+
if (valueFormatter) {
|
|
3476
|
+
return (params) => {
|
|
3477
|
+
const rulePasses = this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params);
|
|
3478
|
+
return rulePasses ? valueFormatter(params) : params.value;
|
|
3479
|
+
};
|
|
3480
|
+
}
|
|
3436
3481
|
}
|
|
3437
3482
|
});
|
|
3438
3483
|
}
|
|
@@ -3675,23 +3720,25 @@ class Adaptable {
|
|
|
3675
3720
|
firstInfo.trigger == 'tick' ? this.filterOnTickingDataChange() : this.filterOnEditDataChange();
|
|
3676
3721
|
}
|
|
3677
3722
|
getExpressionStylesChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3678
|
-
const stylesWithExpression =
|
|
3723
|
+
const stylesWithExpression = [];
|
|
3724
|
+
stylesWithExpression.push(...this.api.conditionalStyleApi.getConditionalStylesWithExpression());
|
|
3725
|
+
stylesWithExpression.push(...this.api.formatColumnApi.getFormatColumnsWithExpression());
|
|
3679
3726
|
if (ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(stylesWithExpression)) {
|
|
3680
3727
|
return;
|
|
3681
3728
|
}
|
|
3682
3729
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3683
3730
|
if (!dataChangedScope.wholeRow) {
|
|
3684
|
-
stylesWithExpression.forEach((
|
|
3731
|
+
stylesWithExpression.forEach((styleModule) => {
|
|
3685
3732
|
if (!dataChangedScope.wholeRow) {
|
|
3686
|
-
const columnIds = this.api.queryLanguageApi.getColumnsFromExpression(
|
|
3733
|
+
const columnIds = this.api.queryLanguageApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
|
|
3687
3734
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3688
|
-
if (this.api.scopeApi.scopeIsAll(
|
|
3735
|
+
if (this.api.scopeApi.scopeIsAll(styleModule.Scope)) {
|
|
3689
3736
|
dataChangedScope.wholeRow = true;
|
|
3690
3737
|
return;
|
|
3691
3738
|
}
|
|
3692
3739
|
else {
|
|
3693
3740
|
this.api.scopeApi
|
|
3694
|
-
.getColumnsForScope(
|
|
3741
|
+
.getColumnsForScope(styleModule.Scope)
|
|
3695
3742
|
.map((c) => c.columnId)
|
|
3696
3743
|
.forEach((colId) => {
|
|
3697
3744
|
dataChangedScope.columnIds.add(colId);
|
|
@@ -4317,10 +4364,11 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4317
4364
|
setupRowStyling() {
|
|
4318
4365
|
// first get the conditional style state
|
|
4319
4366
|
const conditionalStyles = this.api.conditionalStyleApi.getRowConditionalStyles();
|
|
4367
|
+
const formatColumnsStyles = this.api.formatColumnApi.getRowFormatColumnsWithStyle();
|
|
4320
4368
|
// Set any Row Styles (i.e. items without a classname)
|
|
4321
4369
|
this.setGridOptionsProperty('getRowStyle', (userGetRowStyle) => {
|
|
4322
4370
|
return (params) => {
|
|
4323
|
-
const result = Object.assign(Object.assign(Object.assign(Object.assign({}, userGetRowStyle === null || userGetRowStyle === void 0 ? void 0 : userGetRowStyle(params)), this.getRowHighlightStyle(params)), this.getAlertRowStyle(params)), this.getConditionalStyleRowStyle(conditionalStyles, params));
|
|
4371
|
+
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, userGetRowStyle === null || userGetRowStyle === void 0 ? void 0 : userGetRowStyle(params)), this.getRowHighlightStyle(params)), this.getAlertRowStyle(params)), this.getConditionalStyleRowStyle(conditionalStyles, params)), this.getFormatColumnRowStyle(formatColumnsStyles, params));
|
|
4324
4372
|
return result;
|
|
4325
4373
|
};
|
|
4326
4374
|
});
|
|
@@ -4334,6 +4382,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4334
4382
|
highlightClassName,
|
|
4335
4383
|
alertHighlightClassName,
|
|
4336
4384
|
this.getConditionalStyleRowClass(conditionalStyles.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName)), params),
|
|
4385
|
+
this.getFormatColumnRowClass(formatColumnsStyles, params),
|
|
4337
4386
|
]
|
|
4338
4387
|
// we flatten it because 'userGetRowClass' might return a string[]
|
|
4339
4388
|
.flat()
|
|
@@ -4376,6 +4425,14 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4376
4425
|
}
|
|
4377
4426
|
}
|
|
4378
4427
|
}
|
|
4428
|
+
getFormatColumnRowStyle(formatColumns, params) {
|
|
4429
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(formatColumns)) {
|
|
4430
|
+
const formatColumnWithRowStyle = formatColumns.find((formatColumn) => this.api.formatColumnApi.isFormatColumnActiveForRow(formatColumn, params));
|
|
4431
|
+
if (formatColumnWithRowStyle) {
|
|
4432
|
+
return this.convertAdaptableStyleToCSS(formatColumnWithRowStyle.Style);
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4379
4436
|
getGridOptionsApi() {
|
|
4380
4437
|
if (!this.gridOptions.api) {
|
|
4381
4438
|
(0, LoggingHelper_1.ConsoleLogError)('There is a problem with your instance of AG Grid - it has no gridApi object. Please contact Support.');
|
|
@@ -4754,15 +4811,15 @@ class AdaptableNoCodeWizard {
|
|
|
4754
4811
|
// this allows people to customize the wizard dimensions & styling
|
|
4755
4812
|
// when it's visible
|
|
4756
4813
|
container.classList.add('adaptable--in-wizard');
|
|
4757
|
-
|
|
4814
|
+
const unmount = (0, renderReactRoot_1.renderReactRoot)(React.createElement(AdaptableWizardView_1.default, Object.assign(Object.assign({ adaptableOptions: this.adaptableOptions }, this.extraOptions), { onInit: (adaptableOptions) => {
|
|
4758
4815
|
container.classList.remove('adaptable--in-wizard');
|
|
4759
|
-
|
|
4816
|
+
unmount();
|
|
4760
4817
|
this.init({
|
|
4761
4818
|
adaptableOptions,
|
|
4762
4819
|
gridOptions: adaptableOptions.gridOptions,
|
|
4763
4820
|
agGridModules: [...this.agGridModules],
|
|
4764
4821
|
});
|
|
4765
|
-
} })), container);
|
|
4822
|
+
} })), container, true);
|
|
4766
4823
|
}
|
|
4767
4824
|
}
|
|
4768
4825
|
exports.AdaptableNoCodeWizard = AdaptableNoCodeWizard;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FilterWrapperFactory = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
6
4
|
const FilterForm_1 = require("../View/Components/FilterForm/FilterForm");
|
|
7
5
|
let FilterWrapperFactory = (adaptable) => {
|
|
8
6
|
return class FilterWrapper {
|
|
@@ -33,8 +31,9 @@ let FilterWrapperFactory = (adaptable) => {
|
|
|
33
31
|
return this.filterContainer;
|
|
34
32
|
}
|
|
35
33
|
afterGuiAttached(params) {
|
|
34
|
+
var _a;
|
|
36
35
|
//we always unmount first so the autofocus from the form works... in other grids we unmount when hidden
|
|
37
|
-
|
|
36
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
38
37
|
let column = adaptable.api.columnApi.getColumnFromId(this.column.getColId());
|
|
39
38
|
if (column) {
|
|
40
39
|
let filterContext = {
|
|
@@ -43,11 +42,12 @@ let FilterWrapperFactory = (adaptable) => {
|
|
|
43
42
|
ShowCloseButton: params != null && params.hidePopup != null,
|
|
44
43
|
};
|
|
45
44
|
adaptable.hideFilterFormPopup = params ? params.hidePopup : null;
|
|
46
|
-
|
|
45
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, FilterForm_1.FilterFormReact)(filterContext), this.filterContainer);
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
destroy() {
|
|
50
|
-
|
|
49
|
+
var _a;
|
|
50
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
51
51
|
this.filterContainer = null;
|
|
52
52
|
}
|
|
53
53
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FloatingFilterWrapperFactory = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
6
4
|
const QuickFilterForm_1 = require("../View/Components/FilterForm/QuickFilterForm");
|
|
7
5
|
const FloatingFilterWrapperFactory = (adaptable) => class FloatingFilterWrapper {
|
|
8
6
|
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
@@ -30,14 +28,15 @@ const FloatingFilterWrapperFactory = (adaptable) => class FloatingFilterWrapper
|
|
|
30
28
|
Adaptable: adaptable,
|
|
31
29
|
ShowCloseButton: false,
|
|
32
30
|
};
|
|
33
|
-
|
|
31
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, QuickFilterForm_1.QuickFilterFormReact)(filterContext), this.filterContainer);
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
getGui() {
|
|
37
35
|
return this.filterContainer;
|
|
38
36
|
}
|
|
39
37
|
destroy() {
|
|
40
|
-
|
|
38
|
+
var _a;
|
|
39
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
41
40
|
this.filterContainer = null;
|
|
42
41
|
}
|
|
43
42
|
};
|
|
@@ -13,6 +13,7 @@ export declare const createAgStatusPanelComponent: (component: React.FunctionCom
|
|
|
13
13
|
new (): {
|
|
14
14
|
params: IStatusPanelParams;
|
|
15
15
|
eGui: HTMLElement;
|
|
16
|
+
unmountReactRoot?: VoidFunction;
|
|
16
17
|
init(params: IStatusPanelParams): void;
|
|
17
18
|
render(): void;
|
|
18
19
|
getGui(): HTMLElement;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createAgStatusPanelComponent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
7
6
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
8
7
|
const createAgStatusPanelComponent = (component, adaptable, context) => {
|
|
9
8
|
return class StatusBarRenderer {
|
|
@@ -20,13 +19,14 @@ const createAgStatusPanelComponent = (component, adaptable, context) => {
|
|
|
20
19
|
context,
|
|
21
20
|
};
|
|
22
21
|
const children = (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(component, props), adaptable);
|
|
23
|
-
|
|
22
|
+
this.unmountReactRoot = adaptable.renderReactRoot(children, this.eGui);
|
|
24
23
|
}
|
|
25
24
|
getGui() {
|
|
26
25
|
return this.eGui;
|
|
27
26
|
}
|
|
28
27
|
destroy() {
|
|
29
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
};
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AdaptableDateEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_dom_1 = require("react-dom");
|
|
7
6
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
8
7
|
const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
|
|
9
8
|
const core_1 = require("@ag-grid-community/core");
|
|
@@ -111,10 +110,11 @@ class AdaptableDateEditor {
|
|
|
111
110
|
this.editor = editor;
|
|
112
111
|
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
113
112
|
} }));
|
|
114
|
-
|
|
113
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
|
|
115
114
|
}
|
|
116
115
|
destroy() {
|
|
117
|
-
|
|
116
|
+
var _a;
|
|
117
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
118
118
|
}
|
|
119
119
|
shouldClearExistingValue(params) {
|
|
120
120
|
return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
|
|
@@ -42,6 +42,7 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
|
|
|
42
42
|
private params;
|
|
43
43
|
private editor;
|
|
44
44
|
private valueParser;
|
|
45
|
+
private unmountReactRoot?;
|
|
45
46
|
init(params: AdaptableNumberCellEditorParams): void;
|
|
46
47
|
getGui(): HTMLDivElement;
|
|
47
48
|
getValue(): any;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AdaptableNumberEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_dom_1 = require("react-dom");
|
|
7
6
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
8
7
|
const InternalAdaptableNumberEditor_1 = require("./InternalAdaptableNumberEditor");
|
|
9
8
|
const core_1 = require("@ag-grid-community/core");
|
|
@@ -77,7 +76,7 @@ class AdaptableNumberEditor {
|
|
|
77
76
|
this.editor = editor;
|
|
78
77
|
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
79
78
|
} }));
|
|
80
|
-
|
|
79
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
|
|
81
80
|
this.getGui().addEventListener('keydown', (keyDownEvent) => {
|
|
82
81
|
adaptable._emit('CellEditorKeyDown', {
|
|
83
82
|
keyDownEvent,
|
|
@@ -90,7 +89,8 @@ class AdaptableNumberEditor {
|
|
|
90
89
|
});
|
|
91
90
|
}
|
|
92
91
|
destroy() {
|
|
93
|
-
|
|
92
|
+
var _a;
|
|
93
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
94
94
|
}
|
|
95
95
|
getStartValue(params) {
|
|
96
96
|
if (this.shouldClearExistingValue(params)) {
|
|
@@ -15,7 +15,7 @@ declare type TypeProps = {
|
|
|
15
15
|
gapDistance?: number | string;
|
|
16
16
|
childrenPosition?: 'start' | 'end';
|
|
17
17
|
};
|
|
18
|
-
export interface CheckBoxProps extends TypeProps, Omit<ContainerProps, keyof TypeProps>, Omit<React.HTMLProps<HTMLDivElement>, keyof TypeProps> {
|
|
18
|
+
export interface CheckBoxProps extends TypeProps, Omit<ContainerProps, keyof TypeProps>, Omit<React.HTMLProps<HTMLDivElement>, keyof TypeProps | 'ref'> {
|
|
19
19
|
}
|
|
20
20
|
declare const CheckBox: ({ children, checked, onChange, value, name, disabled, readOnly, variant, gapDistance, childrenPosition, as, ...props }: CheckBoxProps) => JSX.Element;
|
|
21
21
|
export declare const CheckBoxGroup: (props: FlexProps & {
|