@adaptabletools/adaptable-cjs 21.0.0-canary.6 → 21.0.0-canary.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +10 -0
- package/base.css.map +1 -1
- package/index.css +8 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/Api/Internal/PredicateInternalApi.d.ts +1 -1
- package/src/Api/Internal/PredicateInternalApi.js +1 -1
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +1 -0
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +2 -0
- package/src/View/Components/ColumnFilter/ColumnFilter.js +28 -13
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.d.ts +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +3 -2
- package/src/View/Components/EntityRulesEditor/index.js +1 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +0 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/agGrid/AgGridFilterAdapter.js +1 -0
- package/src/components/OverlayTrigger/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +7 -5
- package/src/components/Select/Select.d.ts +0 -1
- package/src/components/Select/Select.js +12 -5
- package/src/components/Tooltip/index.js +1 -1
- package/src/env.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConstrainRect = exports.getConstrainElement = void 0;
|
|
3
|
+
exports.ensurePortalElement = exports.getConstrainRect = exports.getConstrainElement = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
@@ -44,27 +44,29 @@ const ensurePortalElement = () => {
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
if (portalElement) {
|
|
47
|
-
return;
|
|
47
|
+
return portalElement;
|
|
48
48
|
}
|
|
49
49
|
portalElement = document.createElement('div');
|
|
50
50
|
portalElement.style.position = 'absolute';
|
|
51
51
|
portalElement.style.zIndex = OVERLAY_TRIGGER_Z_INDEX.toString();
|
|
52
52
|
portalElement.style.top = '0px';
|
|
53
53
|
portalElement.style.left = '0px';
|
|
54
|
+
portalElement.dataset.name = 'OverlayTriggerPortal';
|
|
54
55
|
document.body.appendChild(portalElement);
|
|
56
|
+
return portalElement;
|
|
55
57
|
};
|
|
58
|
+
exports.ensurePortalElement = ensurePortalElement;
|
|
56
59
|
const defaultProps = {
|
|
57
60
|
showEvent: 'mouseenter',
|
|
58
61
|
hideEvent: 'mouseleave',
|
|
59
62
|
anchor: 'vertical',
|
|
60
63
|
targetOffset: 10,
|
|
61
|
-
defaultZIndex: 1000000,
|
|
62
64
|
opacityTransitionDuration: '250ms',
|
|
63
65
|
};
|
|
64
66
|
const OverlayTrigger = React.forwardRef((givenProps, ref) => {
|
|
65
67
|
const props = { ...defaultProps, ...givenProps };
|
|
66
68
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
67
|
-
let { visible: _, showTriangle, showEvent, hideEvent, render, targetOffset, preventPortalEventPropagation = false,
|
|
69
|
+
let { visible: _, showTriangle, showEvent, hideEvent, render, targetOffset, preventPortalEventPropagation = false, anchor, hideDelay = 0, opacityTransitionDuration, onVisibleChange, alignPosition = [
|
|
68
70
|
// overlay - target
|
|
69
71
|
['TopLeft', 'BottomLeft'],
|
|
70
72
|
['TopRight', 'BottomRight'],
|
|
@@ -111,7 +113,7 @@ const OverlayTrigger = React.forwardRef((givenProps, ref) => {
|
|
|
111
113
|
doSetVisible(true);
|
|
112
114
|
}, 50), []);
|
|
113
115
|
const prevVisible = (0, usePrevious_1.default)(visible, false);
|
|
114
|
-
ensurePortalElement();
|
|
116
|
+
(0, exports.ensurePortalElement)();
|
|
115
117
|
const onShow = React.useCallback((event) => {
|
|
116
118
|
const target = targetRef.current;
|
|
117
119
|
if (event && preventPortalEventPropagation && !(0, contains_1.default)(target, event.target)) {
|
|
@@ -48,7 +48,6 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
48
48
|
'aria-label'?: string;
|
|
49
49
|
size?: 'small' | 'normal';
|
|
50
50
|
isCreatable?: boolean;
|
|
51
|
-
menuPortalTarget?: HTMLElement;
|
|
52
51
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
53
52
|
};
|
|
54
53
|
export declare const Select: <SelectValue extends unknown, IsMulti extends boolean = false>(props: SelectProps<SelectValue, IsMulti>) => React.JSX.Element;
|
|
@@ -13,7 +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
|
|
16
|
+
const OverlayTrigger_1 = require("../OverlayTrigger");
|
|
17
17
|
const resizableDirections = {
|
|
18
18
|
right: true,
|
|
19
19
|
bottom: true,
|
|
@@ -162,7 +162,10 @@ const Select = function (props) {
|
|
|
162
162
|
}
|
|
163
163
|
else {
|
|
164
164
|
selectedOption = findOptionByValue(props.value);
|
|
165
|
-
if (!selectedOption &&
|
|
165
|
+
if (!selectedOption &&
|
|
166
|
+
props.value !== undefined &&
|
|
167
|
+
props.value !== null &&
|
|
168
|
+
props.value !== '') {
|
|
166
169
|
selectedOption = {
|
|
167
170
|
value: props.value,
|
|
168
171
|
label: props.value,
|
|
@@ -489,7 +492,7 @@ const Select = function (props) {
|
|
|
489
492
|
}, [props.onInputChange, isMulti]);
|
|
490
493
|
return (React.createElement(SelectComponent, { ref: ref, openMenuOnClick: searchableInMenulist ? false : undefined, openMenuOnFocus: searchableInMenulist ? false : undefined, menuIsOpen: searchableInMenulist ? isSelectMenuOpen : undefined, isSearchable: searchableInline, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
491
494
|
// This needed so the menu is not clipped by overflow: hidden
|
|
492
|
-
menuPortalTarget:
|
|
495
|
+
menuPortalTarget: (0, OverlayTrigger_1.ensurePortalElement)(), isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
493
496
|
if (isMulti) {
|
|
494
497
|
const value = option.map((x) => x?.value);
|
|
495
498
|
props.onChange(value);
|
|
@@ -538,7 +541,9 @@ const Select = function (props) {
|
|
|
538
541
|
menuPortal: (baseStyle) => {
|
|
539
542
|
return {
|
|
540
543
|
...baseStyle,
|
|
541
|
-
|
|
544
|
+
// needed to avoid tooltips from being displayed under this menu
|
|
545
|
+
// as otherwise react-select uses zIndex 1
|
|
546
|
+
zIndex: 'auto',
|
|
542
547
|
textAlign: 'left',
|
|
543
548
|
};
|
|
544
549
|
},
|
|
@@ -546,7 +551,9 @@ const Select = function (props) {
|
|
|
546
551
|
menu: (baseStyle, state) => {
|
|
547
552
|
return {
|
|
548
553
|
...baseStyle,
|
|
549
|
-
|
|
554
|
+
// needed to avoid tooltips from being displayed under this menu
|
|
555
|
+
// as otherwise react-select uses zIndex 1
|
|
556
|
+
zIndex: 'auto',
|
|
550
557
|
boxShadow: 'var(--ab-cmp-select-menu__box-shadow)',
|
|
551
558
|
minWidth: `var(--ab-cmp-select-menu__min-width)`,
|
|
552
559
|
width: resizable ? '100%' : `${Math.max(maxLabelLength, 10)}ch`,
|
|
@@ -4,6 +4,6 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
5
|
const OverlayTrigger_1 = tslib_1.__importDefault(require("../OverlayTrigger"));
|
|
6
6
|
const Tooltip = ({ label, children }) => {
|
|
7
|
-
return (React.createElement(OverlayTrigger_1.default, {
|
|
7
|
+
return (React.createElement(OverlayTrigger_1.default, { className: "ab-Tooltip", render: () => label }, children));
|
|
8
8
|
};
|
|
9
9
|
exports.default = Tooltip;
|
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: 1757350970300 || Date.now(),
|
|
6
|
+
VERSION: "21.0.0-canary.8" || '--current-version--',
|
|
7
7
|
};
|