@adaptabletools/adaptable 13.0.0-canary.1 → 13.0.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +23 -1
- package/agGrid.js +23 -1
- package/base.css +1 -0
- package/bundle.cjs.js +158 -158
- 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 +3 -0
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +42 -14
- package/src/Api/ConditionalStyleApi.d.ts +20 -0
- package/src/Api/FormatColumnApi.d.ts +42 -3
- package/src/Api/Implementation/DashboardApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +17 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +94 -14
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +0 -2
- package/src/Api/Implementation/QueryLanguageApiImpl.js +0 -3
- package/src/Api/QueryLanguageApi.d.ts +0 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
- package/src/PredefinedConfig/FormatColumnState.d.ts +19 -0
- 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/FormatColumnModule.d.ts +2 -9
- package/src/Strategy/FormatColumnModule.js +5 -1
- package/src/Strategy/Interface/IModule.d.ts +10 -10
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -5
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +4 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +4 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +4 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +4 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
- package/src/Utilities/Extensions/TypeExtensions.js +5 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +5 -3
- package/src/Utilities/Services/QueryLanguageService.js +92 -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/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/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/FormatColumn/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +9 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +66 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +20 -2
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +14 -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/Adaptable.d.ts +11 -0
- package/src/agGrid/Adaptable.js +134 -66
- package/src/agGrid/FilterWrapper.js +4 -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/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 +47 -29
- 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 +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -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
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -475,7 +485,7 @@ class Adaptable {
|
|
|
475
485
|
}
|
|
476
486
|
if (this.abContainerElement != null) {
|
|
477
487
|
this.abContainerElement.innerHTML = '';
|
|
478
|
-
|
|
488
|
+
this.unmountReactRoot = this.renderReactRoot((0, AdaptableView_1.AdaptableApp)({ Adaptable: this }), this.abContainerElement);
|
|
479
489
|
}
|
|
480
490
|
// create debounce methods that take a time based on user settings
|
|
481
491
|
this.throttleFilterOnEditDataChange = (0, throttle_1.default)(
|
|
@@ -888,51 +898,68 @@ class Adaptable {
|
|
|
888
898
|
this.gridOptions.api.setColumnDefs(colDefs);
|
|
889
899
|
this.updateColumnsIntoStore(); // todo remove this from here!!!
|
|
890
900
|
}
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
901
|
+
getFormatColumnSpecialColumnStyle(formatColumn, abColumn, params) {
|
|
902
|
+
const columnStyle = formatColumn.ColumnStyle;
|
|
903
|
+
let style = {};
|
|
904
|
+
const gradientStyle = columnStyle === null || columnStyle === void 0 ? void 0 : columnStyle.GradientStyle;
|
|
905
|
+
if (gradientStyle) {
|
|
906
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, abColumn, params.node, params.value);
|
|
907
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, abColumn, params.node, params.value);
|
|
908
|
+
const clampedValue = (0, clamp_1.default)(params.value, min, max);
|
|
909
|
+
let cellBackColor;
|
|
910
|
+
let reverseGradient = false;
|
|
911
|
+
if (gradientStyle.ColumnComparison) {
|
|
912
|
+
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
const matchingRange = gradientStyle.CellRanges.find((r) => (r.Min == 'Col-Min' || r.Min <= clampedValue) &&
|
|
916
|
+
(r.Max == 'Col-Max' || r.Max >= clampedValue));
|
|
917
|
+
if (matchingRange) {
|
|
918
|
+
cellBackColor = matchingRange.Color;
|
|
919
|
+
reverseGradient = matchingRange.ReverseGradient;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
const increase = Math.abs(max - min);
|
|
923
|
+
const percentage = ((params.value - min) / increase) * 100;
|
|
924
|
+
let alpha = Number((percentage / 100).toPrecision(2));
|
|
925
|
+
if (reverseGradient) {
|
|
926
|
+
alpha = 1 - alpha;
|
|
927
|
+
}
|
|
928
|
+
const preparedColor = (0, StyleHelper_1.getVariableColor)(cellBackColor);
|
|
929
|
+
style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
|
|
894
930
|
}
|
|
895
|
-
if (
|
|
896
|
-
|
|
931
|
+
if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
|
|
932
|
+
style.paddingTop = 0;
|
|
933
|
+
style.paddingBottom = 0;
|
|
897
934
|
}
|
|
935
|
+
return style;
|
|
936
|
+
}
|
|
937
|
+
getFormatColumnColumnStyle(formatColumns) {
|
|
938
|
+
// first has more precedence, then they need to be applied in reverse order
|
|
939
|
+
return formatColumns.reduceRight((style, formatColumn) => {
|
|
940
|
+
const formatColumnStyle = this.convertAdaptableStyleToCSS(formatColumn.Style);
|
|
941
|
+
return Object.assign(Object.assign({}, style), formatColumnStyle);
|
|
942
|
+
}, {});
|
|
943
|
+
}
|
|
944
|
+
getFormatColumnCellStyle(abColumn, formatColumn, formatColumnsWithStyle, params) {
|
|
898
945
|
let style = {};
|
|
899
946
|
// percent bar && do we show text
|
|
900
947
|
const columnStyle = formatColumn.ColumnStyle;
|
|
901
948
|
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;
|
|
949
|
+
if (columnStyle &&
|
|
950
|
+
!this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params)) {
|
|
951
|
+
return style;
|
|
932
952
|
}
|
|
953
|
+
style = Object.assign(Object.assign({}, style), this.getFormatColumnSpecialColumnStyle(formatColumn, abColumn, params));
|
|
933
954
|
}
|
|
934
955
|
else if (formatColumn.Style) {
|
|
935
|
-
|
|
956
|
+
const activeFormatColumnsWithStyle = formatColumnsWithStyle.filter((formatColumn) => {
|
|
957
|
+
return this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params);
|
|
958
|
+
});
|
|
959
|
+
if (!activeFormatColumnsWithStyle.length) {
|
|
960
|
+
return style;
|
|
961
|
+
}
|
|
962
|
+
style = Object.assign(Object.assign({}, style), this.getFormatColumnColumnStyle(activeFormatColumnsWithStyle));
|
|
936
963
|
}
|
|
937
964
|
if (formatColumn.CellAlignment) {
|
|
938
965
|
switch (formatColumn.CellAlignment) {
|
|
@@ -949,6 +976,30 @@ class Adaptable {
|
|
|
949
976
|
}
|
|
950
977
|
return style;
|
|
951
978
|
}
|
|
979
|
+
getFormatColumnCellClass(formatColumns, abColumn, params) {
|
|
980
|
+
const classNames = formatColumns
|
|
981
|
+
.map((formatColumn) => {
|
|
982
|
+
var _a, _b;
|
|
983
|
+
if (((_a = formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName) &&
|
|
984
|
+
this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params)) {
|
|
985
|
+
return (_b = formatColumn.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
986
|
+
}
|
|
987
|
+
})
|
|
988
|
+
.filter((x) => !!x);
|
|
989
|
+
return classNames;
|
|
990
|
+
}
|
|
991
|
+
getFormatColumnRowClass(formatColumns, params) {
|
|
992
|
+
const classNames = formatColumns
|
|
993
|
+
.map((formatColumn) => {
|
|
994
|
+
var _a, _b;
|
|
995
|
+
if (((_a = formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName) &&
|
|
996
|
+
this.api.formatColumnApi.isFormatColumnActiveForRow(formatColumn, params)) {
|
|
997
|
+
return (_b = formatColumn.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
998
|
+
}
|
|
999
|
+
})
|
|
1000
|
+
.filter((x) => !!x);
|
|
1001
|
+
return classNames;
|
|
1002
|
+
}
|
|
952
1003
|
getActiveAlertWithHighlightCell(col, params) {
|
|
953
1004
|
return this.api.internalApi.getAdaptableAlertWithHighlightCell(col.columnId, params.node);
|
|
954
1005
|
}
|
|
@@ -2489,7 +2540,7 @@ class Adaptable {
|
|
|
2489
2540
|
return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
|
|
2490
2541
|
}
|
|
2491
2542
|
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;
|
|
2543
|
+
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
2544
|
if (this.gridOptions && this.gridOptions.api) {
|
|
2494
2545
|
this.gridOptions.api.removeEventListener(core_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
|
|
2495
2546
|
this.gridOptions.api.removeEventListener(core_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
|
|
@@ -2563,37 +2614,37 @@ class Adaptable {
|
|
|
2563
2614
|
return;
|
|
2564
2615
|
}
|
|
2565
2616
|
if (abContainerElement != null) {
|
|
2566
|
-
|
|
2617
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
2567
2618
|
}
|
|
2568
2619
|
this.gridContainerElement = null;
|
|
2569
2620
|
this.abContainerElement = null;
|
|
2570
|
-
(
|
|
2621
|
+
(_b = this.adaptableStore) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2571
2622
|
this.adaptableStore = null;
|
|
2572
2623
|
this.gridOptions = null;
|
|
2573
2624
|
this.adaptableOptions = null;
|
|
2574
|
-
(
|
|
2625
|
+
(_d = (_c = this.CalculatedColumnExpressionService) === null || _c === void 0 ? void 0 : _c.destroy) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
2575
2626
|
this.CalculatedColumnExpressionService = null;
|
|
2576
|
-
(
|
|
2627
|
+
(_f = (_e = this.DataService) === null || _e === void 0 ? void 0 : _e.destroy) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
2577
2628
|
this.DataService = null;
|
|
2578
|
-
(
|
|
2629
|
+
(_h = (_g = this.EntitlementService) === null || _g === void 0 ? void 0 : _g.destroy) === null || _h === void 0 ? void 0 : _h.call(_g);
|
|
2579
2630
|
this.EntitlementService = null;
|
|
2580
|
-
(
|
|
2631
|
+
(_k = (_j = this.ReportService) === null || _j === void 0 ? void 0 : _j.destroy) === null || _k === void 0 ? void 0 : _k.call(_j);
|
|
2581
2632
|
this.ReportService = null;
|
|
2582
|
-
(
|
|
2633
|
+
(_m = (_l = this.ModuleService) === null || _l === void 0 ? void 0 : _l.destroy) === null || _m === void 0 ? void 0 : _m.call(_l);
|
|
2583
2634
|
this.ModuleService = null;
|
|
2584
|
-
(
|
|
2635
|
+
(_p = (_o = this.ValidationService) === null || _o === void 0 ? void 0 : _o.destroy) === null || _p === void 0 ? void 0 : _p.call(_o);
|
|
2585
2636
|
this.ValidationService = null;
|
|
2586
|
-
(
|
|
2637
|
+
(_r = (_q = this.QueryLanguageService) === null || _q === void 0 ? void 0 : _q.destroy) === null || _r === void 0 ? void 0 : _r.call(_q);
|
|
2587
2638
|
this.QueryLanguageService = null;
|
|
2588
|
-
(
|
|
2639
|
+
(_t = (_s = this.AlertService) === null || _s === void 0 ? void 0 : _s.destroy) === null || _t === void 0 ? void 0 : _t.call(_s);
|
|
2589
2640
|
this.AlertService = null;
|
|
2590
|
-
(
|
|
2641
|
+
(_v = (_u = this.TeamSharingService) === null || _u === void 0 ? void 0 : _u.destroy) === null || _v === void 0 ? void 0 : _v.call(_u);
|
|
2591
2642
|
this.TeamSharingService = null;
|
|
2592
|
-
(
|
|
2643
|
+
(_x = (_w = this.RowEditService) === null || _w === void 0 ? void 0 : _w.destroy) === null || _x === void 0 ? void 0 : _x.call(_w);
|
|
2593
2644
|
this.RowEditService = null;
|
|
2594
|
-
(
|
|
2645
|
+
(_z = (_y = this.MetamodelService) === null || _y === void 0 ? void 0 : _y.destroy) === null || _z === void 0 ? void 0 : _z.call(_y);
|
|
2595
2646
|
this.MetamodelService = null;
|
|
2596
|
-
(
|
|
2647
|
+
(_1 = (_0 = this.LicenseService) === null || _0 === void 0 ? void 0 : _0.destroy) === null || _1 === void 0 ? void 0 : _1.call(_0);
|
|
2597
2648
|
this.LicenseService = null;
|
|
2598
2649
|
this.isDestroyed = true;
|
|
2599
2650
|
}
|
|
@@ -3140,15 +3191,17 @@ class Adaptable {
|
|
|
3140
3191
|
borderColor: null,
|
|
3141
3192
|
};
|
|
3142
3193
|
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
3194
|
+
const formatColumnsWithStyle = this.api.formatColumnApi.getColumnFormatColumnsWithStyle(abColumn);
|
|
3143
3195
|
const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
|
|
3144
3196
|
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
3145
3197
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
3146
3198
|
const cellStyle = (params) => {
|
|
3147
3199
|
const formatColumnCellStyle = formatColumn
|
|
3148
|
-
? this.getFormatColumnCellStyle(abColumn, formatColumn, params)
|
|
3200
|
+
? this.getFormatColumnCellStyle(abColumn, formatColumn, formatColumnsWithStyle, params)
|
|
3149
3201
|
: undefined;
|
|
3150
3202
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
3151
|
-
const
|
|
3203
|
+
const conditionalStyleObj = this.getConditionalStyleCellStyle(conditionalStyles, abColumn, params);
|
|
3204
|
+
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
3205
|
return result;
|
|
3153
3206
|
};
|
|
3154
3207
|
return cellStyle;
|
|
@@ -3156,9 +3209,7 @@ class Adaptable {
|
|
|
3156
3209
|
}
|
|
3157
3210
|
setupColumnCellClass({ col, colId, abColumn }) {
|
|
3158
3211
|
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;
|
|
3212
|
+
const formatColumns = this.api.formatColumnApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
3162
3213
|
const conditionalStyles = this.api.conditionalStyleApi
|
|
3163
3214
|
.getConditionalStylesForColumn(abColumn)
|
|
3164
3215
|
.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName));
|
|
@@ -3175,7 +3226,9 @@ class Adaptable {
|
|
|
3175
3226
|
const returnValue = [
|
|
3176
3227
|
this.getExcelClassNameForCell(colId, primaryKeyValue),
|
|
3177
3228
|
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
3178
|
-
|
|
3229
|
+
formatColumns.length
|
|
3230
|
+
? this.getFormatColumnCellClass(formatColumns, abColumn, params)
|
|
3231
|
+
: null,
|
|
3179
3232
|
hasConditionalStylesWithClassNames
|
|
3180
3233
|
? this.getConditionalStyleCellClass(conditionalStyles, abColumn, params)
|
|
3181
3234
|
: null,
|
|
@@ -3397,7 +3450,7 @@ class Adaptable {
|
|
|
3397
3450
|
});
|
|
3398
3451
|
}
|
|
3399
3452
|
setupColumnValueFormatter({ col, abColumn }) {
|
|
3400
|
-
this.setColDefProperty(col, 'valueFormatter', () => {
|
|
3453
|
+
this.setColDefProperty(col, 'valueFormatter', (params) => {
|
|
3401
3454
|
const formatColumn = this.api.formatColumnApi.getFormatColumnWithDisplayFormatForColumn(abColumn);
|
|
3402
3455
|
if (!formatColumn) {
|
|
3403
3456
|
return;
|
|
@@ -3432,7 +3485,12 @@ class Adaptable {
|
|
|
3432
3485
|
};
|
|
3433
3486
|
}
|
|
3434
3487
|
}
|
|
3435
|
-
|
|
3488
|
+
if (valueFormatter) {
|
|
3489
|
+
return (params) => {
|
|
3490
|
+
const rulePasses = this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params);
|
|
3491
|
+
return rulePasses ? valueFormatter(params) : params.value;
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3436
3494
|
}
|
|
3437
3495
|
});
|
|
3438
3496
|
}
|
|
@@ -4317,10 +4375,11 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4317
4375
|
setupRowStyling() {
|
|
4318
4376
|
// first get the conditional style state
|
|
4319
4377
|
const conditionalStyles = this.api.conditionalStyleApi.getRowConditionalStyles();
|
|
4378
|
+
const formatColumnsStyles = this.api.formatColumnApi.getRowFormatColumnsWithStyle();
|
|
4320
4379
|
// Set any Row Styles (i.e. items without a classname)
|
|
4321
4380
|
this.setGridOptionsProperty('getRowStyle', (userGetRowStyle) => {
|
|
4322
4381
|
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));
|
|
4382
|
+
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
4383
|
return result;
|
|
4325
4384
|
};
|
|
4326
4385
|
});
|
|
@@ -4334,6 +4393,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4334
4393
|
highlightClassName,
|
|
4335
4394
|
alertHighlightClassName,
|
|
4336
4395
|
this.getConditionalStyleRowClass(conditionalStyles.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName)), params),
|
|
4396
|
+
this.getFormatColumnRowClass(formatColumnsStyles, params),
|
|
4337
4397
|
]
|
|
4338
4398
|
// we flatten it because 'userGetRowClass' might return a string[]
|
|
4339
4399
|
.flat()
|
|
@@ -4376,6 +4436,14 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4376
4436
|
}
|
|
4377
4437
|
}
|
|
4378
4438
|
}
|
|
4439
|
+
getFormatColumnRowStyle(formatColumns, params) {
|
|
4440
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(formatColumns)) {
|
|
4441
|
+
const formatColumnWithRowStyle = formatColumns.find((formatColumn) => this.api.formatColumnApi.isFormatColumnActiveForRow(formatColumn, params));
|
|
4442
|
+
if (formatColumnWithRowStyle) {
|
|
4443
|
+
return this.convertAdaptableStyleToCSS(formatColumnWithRowStyle.Style);
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4379
4447
|
getGridOptionsApi() {
|
|
4380
4448
|
if (!this.gridOptions.api) {
|
|
4381
4449
|
(0, LoggingHelper_1.ConsoleLogError)('There is a problem with your instance of AG Grid - it has no gridApi object. Please contact Support.');
|
|
@@ -4754,15 +4822,15 @@ class AdaptableNoCodeWizard {
|
|
|
4754
4822
|
// this allows people to customize the wizard dimensions & styling
|
|
4755
4823
|
// when it's visible
|
|
4756
4824
|
container.classList.add('adaptable--in-wizard');
|
|
4757
|
-
|
|
4825
|
+
const unmount = (0, renderReactRoot_1.renderReactRoot)(React.createElement(AdaptableWizardView_1.default, Object.assign(Object.assign({ adaptableOptions: this.adaptableOptions }, this.extraOptions), { onInit: (adaptableOptions) => {
|
|
4758
4826
|
container.classList.remove('adaptable--in-wizard');
|
|
4759
|
-
|
|
4827
|
+
unmount();
|
|
4760
4828
|
this.init({
|
|
4761
4829
|
adaptableOptions,
|
|
4762
4830
|
gridOptions: adaptableOptions.gridOptions,
|
|
4763
4831
|
agGridModules: [...this.agGridModules],
|
|
4764
4832
|
});
|
|
4765
|
-
} })), container);
|
|
4833
|
+
} })), container, true);
|
|
4766
4834
|
}
|
|
4767
4835
|
}
|
|
4768
4836
|
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,11 @@ 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
|
+
this.unmountReactRoot();
|
|
51
50
|
this.filterContainer = null;
|
|
52
51
|
}
|
|
53
52
|
};
|
|
@@ -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
|
};
|
|
@@ -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 & {
|
|
@@ -15,4 +15,4 @@ export declare type DatepickerProps = Omit<BoxProps, 'value' | 'onChange' | 'def
|
|
|
15
15
|
showWeekNumber?: boolean;
|
|
16
16
|
showOutsideDays?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignSelf" | "backgroundColor" | "color" | "content" | "flex" | "fontSize" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "mt" | "
|
|
18
|
+
export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "showClearButton" | "onHide" | "showOutsideDays" | "showWeekNumber" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -16,10 +16,12 @@ declare type TypeProps = {
|
|
|
16
16
|
onDismiss?: () => void;
|
|
17
17
|
dismissOnClickOutside?: boolean;
|
|
18
18
|
};
|
|
19
|
-
export interface DialogProps extends BoxProps, TypeProps {
|
|
19
|
+
export interface DialogProps extends Omit<BoxProps, 'ref'>, TypeProps {
|
|
20
20
|
}
|
|
21
21
|
export declare type DialogRefType = {
|
|
22
22
|
bringToFront: VoidFunction;
|
|
23
23
|
};
|
|
24
|
-
export declare const Dialog: React.
|
|
24
|
+
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
} & React.RefAttributes<DialogRefType>>;
|
|
25
27
|
export default Dialog;
|
|
@@ -14,7 +14,7 @@ const useAutoFocus_1 = tslib_1.__importDefault(require("../utils/useAutoFocus"))
|
|
|
14
14
|
const icons_1 = require("../icons");
|
|
15
15
|
const WindowModal_1 = require("../WindowModal");
|
|
16
16
|
const baseClassName = 'ab-Dialog';
|
|
17
|
-
exports.Dialog = React.forwardRef((props,
|
|
17
|
+
exports.Dialog = React.forwardRef((props, dialogRef) => {
|
|
18
18
|
let { modal, fixed, focusOnBrowserVisible = false, autoFocus = true, className, children, modalProps, dismissOnClickOutside = false, onDismiss, windowModal, windowModalProps } = props, boxProps = tslib_1.__rest(props, ["modal", "fixed", "focusOnBrowserVisible", "autoFocus", "className", "children", "modalProps", "dismissOnClickOutside", "onDismiss", "windowModal", "windowModalProps"]);
|
|
19
19
|
modal = props.modal === undefined ? true : props.modal;
|
|
20
20
|
fixed = props.fixed === undefined ? true : props.fixed;
|
|
@@ -76,7 +76,7 @@ exports.Dialog = React.forwardRef((props, ref) => {
|
|
|
76
76
|
boxRef.current.focus();
|
|
77
77
|
}
|
|
78
78
|
}, [boxRef]);
|
|
79
|
-
React.useImperativeHandle(
|
|
79
|
+
React.useImperativeHandle(dialogRef, () => ({
|
|
80
80
|
bringToFront,
|
|
81
81
|
}));
|
|
82
82
|
(0, react_1.useEffect)(() => {
|
|
@@ -5,7 +5,7 @@ import { ExpandedProps } from './useExpanded';
|
|
|
5
5
|
import DropdownButtonItem from './DropdownButtonItem';
|
|
6
6
|
import { OverlayTriggerProps } from '../OverlayTrigger';
|
|
7
7
|
export declare const DROPDOWN_ICON: JSX.Element;
|
|
8
|
-
export declare type DropdownButtonProps = BoxProps & React.HTMLProps<HTMLElement> & SimpleButtonProps & ExpandedProps & {
|
|
8
|
+
export declare type DropdownButtonProps = React.PropsWithChildren<Omit<BoxProps, 'ref'>> & Omit<React.HTMLProps<HTMLElement>, 'ref'> & SimpleButtonProps & ExpandedProps & {
|
|
9
9
|
collapseOnItemClick?: boolean;
|
|
10
10
|
columns?: string[];
|
|
11
11
|
overlayProps?: OverlayTriggerProps;
|
|
@@ -23,7 +23,24 @@ export declare type DropdownButtonProps = BoxProps & React.HTMLProps<HTMLElement
|
|
|
23
23
|
isItemDisabled?: (item: DropdownButtonItem) => boolean | undefined;
|
|
24
24
|
showToggleIcon?: boolean;
|
|
25
25
|
};
|
|
26
|
-
declare const DropdownButton: React.
|
|
27
|
-
|
|
28
|
-
}
|
|
26
|
+
declare const DropdownButton: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & {
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
} & Omit<React.HTMLProps<HTMLElement>, "ref"> & SimpleButtonProps & ExpandedProps & {
|
|
29
|
+
collapseOnItemClick?: boolean;
|
|
30
|
+
columns?: string[];
|
|
31
|
+
overlayProps?: OverlayTriggerProps;
|
|
32
|
+
listOffset?: number;
|
|
33
|
+
items?: DropdownButtonItem[];
|
|
34
|
+
idProperty?: string;
|
|
35
|
+
showClearButton?: boolean;
|
|
36
|
+
focusOnClear?: boolean;
|
|
37
|
+
onClear?: () => void;
|
|
38
|
+
clearButtonProps?: SimpleButtonProps;
|
|
39
|
+
listItemClassName?: string;
|
|
40
|
+
listStyle?: React.CSSProperties;
|
|
41
|
+
listMinWidth?: number;
|
|
42
|
+
listItemStyle?: React.CSSProperties | ((item: DropdownButtonItem, index: number) => React.CSSProperties);
|
|
43
|
+
isItemDisabled?: (item: DropdownButtonItem) => boolean | undefined;
|
|
44
|
+
showToggleIcon?: boolean;
|
|
45
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
29
46
|
export default DropdownButton;
|