@adaptabletools/adaptable-cjs 21.0.0-canary.3 → 21.0.0-canary.5
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/package.json +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +7 -9
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +2 -13
- package/src/Api/Internal/FormatColumnInternalApi.js +4 -14
- package/src/Strategy/FlashingCellModule.js +3 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +8 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +5 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +5 -2
- package/src/Utilities/Services/QueryLanguageService.js +4 -3
- package/src/agGrid/AgGridColumnAdapter.js +10 -2
- package/src/components/Modal/index.d.ts +0 -1
- package/src/components/Modal/index.js +4 -2
- package/src/components/OverlayTrigger/index.js +3 -1
- package/src/components/Select/Select.js +3 -2
- package/src/components/WindowModal/useStacking.js +12 -3
- package/src/components/overlayBaseZIndex.d.ts +1 -0
- package/src/components/overlayBaseZIndex.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +26 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +5 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "21.0.0-canary.
|
|
3
|
+
"version": "21.0.0-canary.5",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -26,7 +26,7 @@ export interface FilterOptions<TData = any> {
|
|
|
26
26
|
*/
|
|
27
27
|
clearFiltersOnStartUp?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Provide custom values (or sorting / count info) when using
|
|
29
|
+
* Provide custom values (or sorting / count info) when using `In` Predicate in Column or Grid Filter
|
|
30
30
|
* @param context
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
@@ -208,17 +208,16 @@ export interface InFilterValue<ValueType = any> {
|
|
|
208
208
|
/**
|
|
209
209
|
* Result when providing custom values for the IN Column Filter
|
|
210
210
|
*/
|
|
211
|
-
export
|
|
211
|
+
export interface InFilterValueResult {
|
|
212
212
|
/**
|
|
213
213
|
* List of Items to display in the IN Column Filter
|
|
214
214
|
*/
|
|
215
215
|
values: InFilterValue[];
|
|
216
216
|
/**
|
|
217
|
-
*
|
|
218
|
-
* When FALSE, the values are filtered based on the current search text.
|
|
217
|
+
* If true, AdapTable will not filter the list using the current search value
|
|
219
218
|
*/
|
|
220
219
|
skipDefaultSearch?: boolean;
|
|
221
|
-
}
|
|
220
|
+
}
|
|
222
221
|
/**
|
|
223
222
|
* Information about items in the IN Column Filter
|
|
224
223
|
*/
|
|
@@ -249,11 +248,11 @@ export interface CustomInFilterValuesContext<TData = any> extends AdaptableColum
|
|
|
249
248
|
*/
|
|
250
249
|
defaultValues: Required<InFilterValueInfo>[];
|
|
251
250
|
/**
|
|
252
|
-
* Default values but
|
|
251
|
+
* Default values but sorted (if Column is sorted)
|
|
253
252
|
*/
|
|
254
253
|
sortedValues: Required<InFilterValueInfo>[];
|
|
255
254
|
/**
|
|
256
|
-
* Default values
|
|
255
|
+
* Default values in order which currently listed in the grid
|
|
257
256
|
*/
|
|
258
257
|
orderedValues: Required<InFilterValueInfo>[];
|
|
259
258
|
/**
|
|
@@ -261,8 +260,7 @@ export interface CustomInFilterValuesContext<TData = any> extends AdaptableColum
|
|
|
261
260
|
*/
|
|
262
261
|
currentSearchValue: string;
|
|
263
262
|
/**
|
|
264
|
-
*
|
|
265
|
-
* especially for async operations (e.g. server-side filtering).
|
|
263
|
+
* Previous filter result; avoids expensive recomputations (e.g for async op or server-side filtering)
|
|
266
264
|
*/
|
|
267
265
|
previousFilterResult?: InFilterValueResult;
|
|
268
266
|
}
|
|
@@ -529,7 +529,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
529
529
|
isValidExpression &&
|
|
530
530
|
this.getAdaptableApi()
|
|
531
531
|
.internalApi.getQueryLanguageService()
|
|
532
|
-
.evaluateBooleanExpression(expression, 'Alert', rowNode, dataChangedEvent);
|
|
532
|
+
.evaluateBooleanExpression(expression, 'Alert', rowNode, { dataChangedEvent });
|
|
533
533
|
}
|
|
534
534
|
catch (error) {
|
|
535
535
|
isSatisfiedExpression = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HeaderValueGetterParams, IRowNode } from 'ag-grid-enterprise';
|
|
1
|
+
import { Column, HeaderValueGetterParams, IRowNode } from 'ag-grid-enterprise';
|
|
2
2
|
import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, FormatColumnConfig, FormatColumnTarget, StringFormatterOptions } from '../../types';
|
|
3
3
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
4
4
|
export declare class FormatColumnInternalApi extends ApiBase {
|
|
@@ -85,7 +85,7 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
85
85
|
* @param column
|
|
86
86
|
* @param params
|
|
87
87
|
*/
|
|
88
|
-
formatColumnShouldRenderInCell(formatColumn: FormatColumn, column: AdaptableColumn, rowNode: IRowNode, cellValue: any): boolean;
|
|
88
|
+
formatColumnShouldRenderInCell(formatColumn: FormatColumn, column: AdaptableColumn, rowNode: IRowNode, cellValue: any, pivotResultColumn?: Column): boolean;
|
|
89
89
|
/**
|
|
90
90
|
* Checks if format column is relevant for a given Column Header
|
|
91
91
|
*
|
|
@@ -95,17 +95,6 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
95
95
|
formatColumnShouldRenderInHeader(formatColumn: FormatColumn, column: AdaptableColumn): boolean;
|
|
96
96
|
private evaluatePredicate;
|
|
97
97
|
private evaluateExpression;
|
|
98
|
-
/**
|
|
99
|
-
* Extract from the given FormatColumns only the ones which are relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
100
|
-
*
|
|
101
|
-
* @param formatColumns
|
|
102
|
-
* @param column
|
|
103
|
-
* @param params
|
|
104
|
-
*/
|
|
105
|
-
getFormatColumnsRelevantForColumn(formatColumns: FormatColumn[], column: AdaptableColumn, params: {
|
|
106
|
-
node: IRowNode;
|
|
107
|
-
value: any;
|
|
108
|
-
}): FormatColumn[];
|
|
109
98
|
/**
|
|
110
99
|
* Extract from the given FormatColumns the one which is the most relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
111
100
|
*
|
|
@@ -226,7 +226,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
226
226
|
* @param column
|
|
227
227
|
* @param params
|
|
228
228
|
*/
|
|
229
|
-
formatColumnShouldRenderInCell(formatColumn, column, rowNode, cellValue) {
|
|
229
|
+
formatColumnShouldRenderInCell(formatColumn, column, rowNode, cellValue, pivotResultColumn) {
|
|
230
230
|
// suspended is important to be first
|
|
231
231
|
if (formatColumn.IsSuspended) {
|
|
232
232
|
return false;
|
|
@@ -274,7 +274,7 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
274
274
|
return this.evaluatePredicate(formatColumn, predicateDefHandlerContext);
|
|
275
275
|
} // then run the Expression
|
|
276
276
|
else if (formatColumn.Rule.BooleanExpression) {
|
|
277
|
-
return this.evaluateExpression(formatColumn, rowNode);
|
|
277
|
+
return this.evaluateExpression(formatColumn, rowNode, pivotResultColumn);
|
|
278
278
|
}
|
|
279
279
|
// nothing has passed then return false
|
|
280
280
|
return false;
|
|
@@ -298,29 +298,19 @@ class FormatColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
298
298
|
evaluatePredicate(formatColumn, predicateDefHandlerContext) {
|
|
299
299
|
return this.getPredicateApi().handleColumnPredicates(formatColumn.Rule?.Predicates, predicateDefHandlerContext, false);
|
|
300
300
|
}
|
|
301
|
-
evaluateExpression(formatColumn, node) {
|
|
301
|
+
evaluateExpression(formatColumn, node, pivotResultColumn) {
|
|
302
302
|
const isValidExpression = this.getExpressionApi().isValidBooleanExpression(formatColumn.Rule.BooleanExpression, ModuleConstants.FormatColumnModuleId, `Invalid format column rule '${formatColumn.Rule.BooleanExpression}'`);
|
|
303
303
|
try {
|
|
304
304
|
return (isValidExpression &&
|
|
305
305
|
this.getAdaptableApi()
|
|
306
306
|
.internalApi.getQueryLanguageService()
|
|
307
|
-
.evaluateBooleanExpression(formatColumn.Rule.BooleanExpression, ModuleConstants.FormatColumnModuleId, node));
|
|
307
|
+
.evaluateBooleanExpression(formatColumn.Rule.BooleanExpression, ModuleConstants.FormatColumnModuleId, node, { pivotResultColumn }));
|
|
308
308
|
}
|
|
309
309
|
catch (error) {
|
|
310
310
|
(0, AdaptableLogger_1.errorOnce)(error.message);
|
|
311
311
|
return false;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
/**
|
|
315
|
-
* Extract from the given FormatColumns only the ones which are relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
316
|
-
*
|
|
317
|
-
* @param formatColumns
|
|
318
|
-
* @param column
|
|
319
|
-
* @param params
|
|
320
|
-
*/
|
|
321
|
-
getFormatColumnsRelevantForColumn(formatColumns, column, params) {
|
|
322
|
-
return formatColumns.filter((formatColumn) => this.formatColumnShouldRenderInCell(formatColumn, column, params.node, params.value));
|
|
323
|
-
}
|
|
324
314
|
/**
|
|
325
315
|
* Extract from the given FormatColumns the one which is the most relevant for a given cell (intersection of given AdaptableColumn and RowNode)
|
|
326
316
|
*
|
|
@@ -89,7 +89,9 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
89
89
|
isValidExpression &&
|
|
90
90
|
this.api.internalApi
|
|
91
91
|
.getQueryLanguageService()
|
|
92
|
-
.evaluateBooleanExpression(expression, this.moduleInfo.ModuleName, rowNode,
|
|
92
|
+
.evaluateBooleanExpression(expression, this.moduleInfo.ModuleName, rowNode, {
|
|
93
|
+
dataChangedEvent: cellDataChangedInfo,
|
|
94
|
+
});
|
|
93
95
|
}
|
|
94
96
|
catch (error) {
|
|
95
97
|
isSatisfiedExpression = false;
|
|
@@ -64,6 +64,14 @@ exports.scalarExpressionFunctions = {
|
|
|
64
64
|
if (!column.queryable) {
|
|
65
65
|
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('COL', `Column name "${columnId}" is not queryable`);
|
|
66
66
|
}
|
|
67
|
+
// see #derived_pivot_cell_style
|
|
68
|
+
if (context.pivotResultColumn) {
|
|
69
|
+
const baseColumnId = context.pivotResultColumn.getColDef()?.pivotValueColumn?.getColId();
|
|
70
|
+
if (baseColumnId === columnId) {
|
|
71
|
+
// we evaluate the pivot result column instead of the base column
|
|
72
|
+
return context.adaptableApi?.gridApi.getNormalisedValueFromRowNode(context.node, context.pivotResultColumn.getColId());
|
|
73
|
+
}
|
|
74
|
+
}
|
|
67
75
|
return context.adaptableApi?.gridApi.getNormalisedValueFromRowNode(context.node, columnId);
|
|
68
76
|
},
|
|
69
77
|
description: 'Returns the value of a Column',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { IAdaptableService } from './IAdaptableService';
|
|
3
|
-
import { IRowNode } from 'ag-grid-enterprise';
|
|
3
|
+
import { Column, IRowNode } from 'ag-grid-enterprise';
|
|
4
4
|
import { CellDataChangedInfo } from '../../../AdaptableState/Common/CellDataChangedInfo';
|
|
5
5
|
import { RowDataChangedInfo } from '../../../AdaptableState/Common/RowDataChangedInfo';
|
|
6
6
|
import { AdaptableModule } from '../../../AdaptableState/Common/Types';
|
|
@@ -11,7 +11,10 @@ import { ScalarFunctionName } from '../../ExpressionFunctions/scalarExpressionFu
|
|
|
11
11
|
import { ObservableFunctionName } from '../../ExpressionFunctions/observableExpressionFunctions';
|
|
12
12
|
import { ExpressionFunctionMap } from '../../../parser/src/types';
|
|
13
13
|
export interface IQueryLanguageService extends IAdaptableService {
|
|
14
|
-
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: IRowNode,
|
|
14
|
+
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: IRowNode, evalContext?: {
|
|
15
|
+
dataChangedEvent?: CellDataChangedInfo;
|
|
16
|
+
pivotResultColumn?: Column;
|
|
17
|
+
}): boolean;
|
|
15
18
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
|
|
16
19
|
evaluateObservableExpression(expression: string, module: AdaptableModule): Observable<CellDataChangedInfo | RowDataChangedInfo>;
|
|
17
20
|
evaluateAggregatedBooleanExpression(expression: string, module: AdaptableModule): BooleanAggregationParameter;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRowNode } from 'ag-grid-enterprise';
|
|
1
|
+
import { Column, IRowNode } from 'ag-grid-enterprise';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AdaptableApi, RowDataChangedInfo } from '../../../types';
|
|
4
4
|
import { GlobalExpressionFunctionsContext } from '../../AdaptableOptions/ExpressionOptions';
|
|
@@ -16,7 +16,10 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
16
16
|
private cacheAggregatedScalarValidation;
|
|
17
17
|
private cacheModuleSpecificExpressionFunctions;
|
|
18
18
|
constructor(adaptableApi: AdaptableApi);
|
|
19
|
-
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any,
|
|
19
|
+
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any, evalContext?: {
|
|
20
|
+
dataChangedEvent?: CellDataChangedInfo;
|
|
21
|
+
pivotResultColumn?: Column;
|
|
22
|
+
}): any;
|
|
20
23
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
|
|
21
24
|
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule, getRowNodes?: () => IRowNode[]): ScalarAggregationParameter;
|
|
22
25
|
evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo | RowDataChangedInfo>;
|
|
@@ -21,7 +21,7 @@ class QueryLanguageService {
|
|
|
21
21
|
this.cacheAggregatedScalarValidation = new Map();
|
|
22
22
|
this.cacheModuleSpecificExpressionFunctions = new Map();
|
|
23
23
|
}
|
|
24
|
-
evaluateBooleanExpression(expression, module, rowNode,
|
|
24
|
+
evaluateBooleanExpression(expression, module, rowNode, evalContext) {
|
|
25
25
|
if (expression == undefined) {
|
|
26
26
|
// should never happen, but just in case
|
|
27
27
|
this.adaptableApi.logError('QueryLanguageService.evaluateBooleanExpression was called with an undefined expression');
|
|
@@ -33,7 +33,8 @@ class QueryLanguageService {
|
|
|
33
33
|
node: rowNode,
|
|
34
34
|
functions: booleanAndScalarFunctions,
|
|
35
35
|
evaluateCustomQueryVariable: this.evaluateCustomQueryVariable,
|
|
36
|
-
dataChangedEvent,
|
|
36
|
+
dataChangedEvent: evalContext?.dataChangedEvent,
|
|
37
|
+
pivotResultColumn: evalContext?.pivotResultColumn,
|
|
37
38
|
...this.adaptableApi.internalApi.buildBaseContext(),
|
|
38
39
|
});
|
|
39
40
|
}
|
|
@@ -125,7 +126,7 @@ class QueryLanguageService {
|
|
|
125
126
|
newValue: 100,
|
|
126
127
|
oldValue: 150,
|
|
127
128
|
};
|
|
128
|
-
this.evaluateBooleanExpression(expression, module, firstRowNode, dataChangedEvent);
|
|
129
|
+
this.evaluateBooleanExpression(expression, module, firstRowNode, { dataChangedEvent });
|
|
129
130
|
const result = {
|
|
130
131
|
isValid: true,
|
|
131
132
|
errorMessage: '',
|
|
@@ -319,7 +319,13 @@ class AgGridColumnAdapter {
|
|
|
319
319
|
const baseColumn = params.column.getColDef()?.pivotValueColumn;
|
|
320
320
|
if (baseColumn) {
|
|
321
321
|
const baseColDefCellStyle = baseColumn?.getColDef()?.cellStyle;
|
|
322
|
-
const baseColParams = {
|
|
322
|
+
const baseColParams = {
|
|
323
|
+
...params,
|
|
324
|
+
column: baseColumn,
|
|
325
|
+
// @ts-ignore
|
|
326
|
+
// #derived_pivot_cell_style
|
|
327
|
+
__pivotResultColumn: params.column,
|
|
328
|
+
};
|
|
323
329
|
baseStyles =
|
|
324
330
|
typeof baseColDefCellStyle === 'function'
|
|
325
331
|
? baseColDefCellStyle(baseColParams)
|
|
@@ -1144,7 +1150,9 @@ class AgGridColumnAdapter {
|
|
|
1144
1150
|
return {};
|
|
1145
1151
|
}
|
|
1146
1152
|
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1147
|
-
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInCell(formatColumn, abColumn, params.node, params.value
|
|
1153
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInCell(formatColumn, abColumn, params.node, params.value,
|
|
1154
|
+
// @ts-ignore see #derived_pivot_cell_style
|
|
1155
|
+
params.__pivotResultColumn);
|
|
1148
1156
|
});
|
|
1149
1157
|
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1150
1158
|
}
|
|
@@ -5,7 +5,6 @@ export declare const ensureLoadingScreenPortalElement: () => HTMLElement;
|
|
|
5
5
|
export interface ModalProps extends FlexProps {
|
|
6
6
|
isOpen?: boolean;
|
|
7
7
|
baseZIndex?: number;
|
|
8
|
-
backdropZIndexOffset?: number;
|
|
9
8
|
onBringToFront?: () => void;
|
|
10
9
|
}
|
|
11
10
|
export declare const Modal: React.FunctionComponent<React.PropsWithChildren<ModalProps>>;
|
|
@@ -11,6 +11,7 @@ const rebass_1 = require("rebass");
|
|
|
11
11
|
const Backdrop_1 = tslib_1.__importStar(require("./Backdrop"));
|
|
12
12
|
const uuid_1 = require("../utils/uuid");
|
|
13
13
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
14
|
+
const useStacking_1 = require("../WindowModal/useStacking");
|
|
14
15
|
let portalElement;
|
|
15
16
|
let loadingScreenPortalElement;
|
|
16
17
|
const ensurePortalElement = () => {
|
|
@@ -44,8 +45,9 @@ const Modal = (props) => {
|
|
|
44
45
|
const uuid = (0, react_1.useMemo)(() => (0, uuid_1.createUuid)(), []);
|
|
45
46
|
const counter = (0, react_1.useMemo)(() => globalCounter++, [isOpen]);
|
|
46
47
|
const openTimestamp = counter;
|
|
47
|
-
const backdropZIndexOffset =
|
|
48
|
-
const
|
|
48
|
+
const backdropZIndexOffset = 1;
|
|
49
|
+
const stacking = (0, useStacking_1.useStacking)();
|
|
50
|
+
const zIndex = stacking.zIndex;
|
|
49
51
|
return (0, react_dom_1.createPortal)(isOpen ? (React.createElement(React.Fragment, null,
|
|
50
52
|
React.createElement(Backdrop_1.default, { timestamp: openTimestamp, uuid: uuid, zIndex: zIndex - backdropZIndexOffset, onBringToFront: onBringToFront }),
|
|
51
53
|
React.createElement(react_remove_scroll_1.RemoveScroll, null,
|
|
@@ -17,6 +17,7 @@ const contains_1 = tslib_1.__importDefault(require("../utils/contains"));
|
|
|
17
17
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
18
18
|
const InfiniteTable_1 = require("../InfiniteTable");
|
|
19
19
|
const AdaptableContext_1 = require("../../View/AdaptableContext");
|
|
20
|
+
const overlayBaseZIndex_1 = require("../overlayBaseZIndex");
|
|
20
21
|
const getConstrainElement = (target, constrainTo) => {
|
|
21
22
|
let el = null;
|
|
22
23
|
if (typeof constrainTo === 'string') {
|
|
@@ -37,6 +38,7 @@ const getConstrainRect = (target, constrainTo) => {
|
|
|
37
38
|
};
|
|
38
39
|
exports.getConstrainRect = getConstrainRect;
|
|
39
40
|
let portalElement;
|
|
41
|
+
const OVERLAY_TRIGGER_Z_INDEX = overlayBaseZIndex_1.OVERLAY_BASE_Z_INDEX;
|
|
40
42
|
const ensurePortalElement = () => {
|
|
41
43
|
if (!(0, UIHelper_1.isBrowserDocumentAvailable)()) {
|
|
42
44
|
return;
|
|
@@ -46,7 +48,7 @@ const ensurePortalElement = () => {
|
|
|
46
48
|
}
|
|
47
49
|
portalElement = document.createElement('div');
|
|
48
50
|
portalElement.style.position = 'absolute';
|
|
49
|
-
portalElement.style.zIndex =
|
|
51
|
+
portalElement.style.zIndex = OVERLAY_TRIGGER_Z_INDEX.toString();
|
|
50
52
|
portalElement.style.top = '0px';
|
|
51
53
|
portalElement.style.left = '0px';
|
|
52
54
|
document.body.appendChild(portalElement);
|
|
@@ -13,6 +13,7 @@ const react_1 = require("react");
|
|
|
13
13
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
14
14
|
const re_resizable_1 = require("re-resizable");
|
|
15
15
|
const Tooltip_1 = tslib_1.__importDefault(require("../Tooltip"));
|
|
16
|
+
const overlayBaseZIndex_1 = require("../overlayBaseZIndex");
|
|
16
17
|
const resizableDirections = {
|
|
17
18
|
right: true,
|
|
18
19
|
bottom: true,
|
|
@@ -537,7 +538,7 @@ const Select = function (props) {
|
|
|
537
538
|
menuPortal: (baseStyle) => {
|
|
538
539
|
return {
|
|
539
540
|
...baseStyle,
|
|
540
|
-
zIndex:
|
|
541
|
+
zIndex: overlayBaseZIndex_1.OVERLAY_BASE_Z_INDEX,
|
|
541
542
|
textAlign: 'left',
|
|
542
543
|
};
|
|
543
544
|
},
|
|
@@ -545,7 +546,7 @@ const Select = function (props) {
|
|
|
545
546
|
menu: (baseStyle, state) => {
|
|
546
547
|
return {
|
|
547
548
|
...baseStyle,
|
|
548
|
-
zIndex:
|
|
549
|
+
zIndex: overlayBaseZIndex_1.OVERLAY_BASE_Z_INDEX,
|
|
549
550
|
boxShadow: 'var(--ab-cmp-select-menu__box-shadow)',
|
|
550
551
|
minWidth: `var(--ab-cmp-select-menu__min-width)`,
|
|
551
552
|
width: resizable ? '100%' : `${Math.max(maxLabelLength, 10)}ch`,
|
|
@@ -8,6 +8,15 @@ const setZIndexMap = {};
|
|
|
8
8
|
const zIndexMap = [];
|
|
9
9
|
// starts with 3000, to be above the default zIndex of the Modal component
|
|
10
10
|
const BASE_Z_INDEX = 3000;
|
|
11
|
+
const Z_INDEX_GAP = 5;
|
|
12
|
+
let GLOBAL_COUNTER = 0;
|
|
13
|
+
const getNewOffset = () => {
|
|
14
|
+
const counter = GLOBAL_COUNTER++;
|
|
15
|
+
return counter * Z_INDEX_GAP;
|
|
16
|
+
};
|
|
17
|
+
const getNewZIndex = () => {
|
|
18
|
+
return BASE_Z_INDEX + getNewOffset();
|
|
19
|
+
};
|
|
11
20
|
/**
|
|
12
21
|
* Used to facilitate the stacking between multiple opened windows.
|
|
13
22
|
* When calling 'bringToFront' brings caller to top.
|
|
@@ -15,7 +24,7 @@ const BASE_Z_INDEX = 3000;
|
|
|
15
24
|
*/
|
|
16
25
|
const useStacking = () => {
|
|
17
26
|
const modalZIndexId = React.useMemo(() => (0, uuid_1.createUuid)(), []);
|
|
18
|
-
const [zIndex, setZIndex] = React.useState(
|
|
27
|
+
const [zIndex, setZIndex] = React.useState(getNewZIndex);
|
|
19
28
|
React.useEffect(() => {
|
|
20
29
|
setZIndexMap[modalZIndexId] = setZIndex;
|
|
21
30
|
return () => {
|
|
@@ -34,8 +43,8 @@ const useStacking = () => {
|
|
|
34
43
|
else {
|
|
35
44
|
zIndexMap.push(modalZIndexId);
|
|
36
45
|
}
|
|
37
|
-
zIndexMap.forEach((id
|
|
38
|
-
setZIndexMap?.[id]?.(
|
|
46
|
+
zIndexMap.forEach((id) => {
|
|
47
|
+
setZIndexMap?.[id]?.(getNewZIndex());
|
|
39
48
|
});
|
|
40
49
|
}, []);
|
|
41
50
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OVERLAY_BASE_Z_INDEX = 9999999;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "21.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1757191030366 || Date.now(),
|
|
6
|
+
VERSION: "21.0.0-canary.5" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -2464,11 +2464,19 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2464
2464
|
name: string;
|
|
2465
2465
|
kind: string;
|
|
2466
2466
|
desc: string;
|
|
2467
|
-
props: {
|
|
2467
|
+
props: ({
|
|
2468
2468
|
name: string;
|
|
2469
2469
|
kind: string;
|
|
2470
2470
|
desc: string;
|
|
2471
|
-
|
|
2471
|
+
isOpt?: undefined;
|
|
2472
|
+
ref?: undefined;
|
|
2473
|
+
} | {
|
|
2474
|
+
name: string;
|
|
2475
|
+
kind: string;
|
|
2476
|
+
desc: string;
|
|
2477
|
+
isOpt: boolean;
|
|
2478
|
+
ref: string;
|
|
2479
|
+
})[];
|
|
2472
2480
|
};
|
|
2473
2481
|
CustomQueryVariableContext: {
|
|
2474
2482
|
name: string;
|
|
@@ -4086,6 +4094,22 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4086
4094
|
isOpt: boolean;
|
|
4087
4095
|
}[];
|
|
4088
4096
|
};
|
|
4097
|
+
InFilterValueResult: {
|
|
4098
|
+
name: string;
|
|
4099
|
+
kind: string;
|
|
4100
|
+
desc: string;
|
|
4101
|
+
props: ({
|
|
4102
|
+
name: string;
|
|
4103
|
+
kind: string;
|
|
4104
|
+
desc: string;
|
|
4105
|
+
isOpt: boolean;
|
|
4106
|
+
} | {
|
|
4107
|
+
name: string;
|
|
4108
|
+
kind: string;
|
|
4109
|
+
desc: string;
|
|
4110
|
+
isOpt?: undefined;
|
|
4111
|
+
})[];
|
|
4112
|
+
};
|
|
4089
4113
|
InitialState: {
|
|
4090
4114
|
name: string;
|
|
4091
4115
|
kind: string;
|