@adaptabletools/adaptable 21.0.0-canary.5 → 21.0.0-canary.7

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.
@@ -9,7 +9,7 @@ import { useCallback, useMemo, useState } from 'react';
9
9
  import join from '../utils/join';
10
10
  import { Resizable } from 're-resizable';
11
11
  import Tooltip from '../Tooltip';
12
- import { OVERLAY_BASE_Z_INDEX } from '../overlayBaseZIndex';
12
+ import { ensurePortalElement } from '../OverlayTrigger';
13
13
  const resizableDirections = {
14
14
  right: true,
15
15
  bottom: true,
@@ -158,7 +158,10 @@ export const Select = function (props) {
158
158
  }
159
159
  else {
160
160
  selectedOption = findOptionByValue(props.value);
161
- if (!selectedOption && props.value !== undefined && props.value !== null) {
161
+ if (!selectedOption &&
162
+ props.value !== undefined &&
163
+ props.value !== null &&
164
+ props.value !== '') {
162
165
  selectedOption = {
163
166
  value: props.value,
164
167
  label: props.value,
@@ -485,7 +488,7 @@ export const Select = function (props) {
485
488
  }, [props.onInputChange, isMulti]);
486
489
  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: join(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
487
490
  // This needed so the menu is not clipped by overflow: hidden
488
- menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
491
+ menuPortalTarget: ensurePortalElement(), isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
489
492
  if (isMulti) {
490
493
  const value = option.map((x) => x?.value);
491
494
  props.onChange(value);
@@ -534,7 +537,9 @@ export const Select = function (props) {
534
537
  menuPortal: (baseStyle) => {
535
538
  return {
536
539
  ...baseStyle,
537
- zIndex: OVERLAY_BASE_Z_INDEX,
540
+ // needed to avoid tooltips from being displayed under this menu
541
+ // as otherwise react-select uses zIndex 1
542
+ zIndex: 'auto',
538
543
  textAlign: 'left',
539
544
  };
540
545
  },
@@ -542,7 +547,9 @@ export const Select = function (props) {
542
547
  menu: (baseStyle, state) => {
543
548
  return {
544
549
  ...baseStyle,
545
- zIndex: OVERLAY_BASE_Z_INDEX,
550
+ // needed to avoid tooltips from being displayed under this menu
551
+ // as otherwise react-select uses zIndex 1
552
+ zIndex: 'auto',
546
553
  boxShadow: 'var(--ab-cmp-select-menu__box-shadow)',
547
554
  minWidth: `var(--ab-cmp-select-menu__min-width)`,
548
555
  width: resizable ? '100%' : `${Math.max(maxLabelLength, 10)}ch`,
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import OverlayTrigger from '../OverlayTrigger';
3
3
  const Tooltip = ({ label, children }) => {
4
- return (React.createElement(OverlayTrigger, { defaultZIndex: 2000000, className: "ab-Tooltip", render: () => label }, children));
4
+ return (React.createElement(OverlayTrigger, { className: "ab-Tooltip", render: () => label }, children));
5
5
  };
6
6
  export default Tooltip;
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  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" || '',
3
- PUBLISH_TIMESTAMP: 1757190997535 || Date.now(),
4
- VERSION: "21.0.0-canary.5" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1757331083218 || Date.now(),
4
+ VERSION: "21.0.0-canary.7" || '--current-version--',
5
5
  };
@@ -1953,32 +1953,32 @@ export declare const ADAPTABLE_METAMODEL: {
1953
1953
  desc: string;
1954
1954
  isOpt: boolean;
1955
1955
  gridInfo: string;
1956
- noCode: string;
1957
1956
  defVal: string;
1957
+ noCode?: undefined;
1958
1958
  } | {
1959
1959
  name: string;
1960
1960
  kind: string;
1961
1961
  desc: string;
1962
1962
  isOpt: boolean;
1963
- gridInfo: string;
1964
1963
  defVal: string;
1964
+ gridInfo?: undefined;
1965
1965
  noCode?: undefined;
1966
1966
  } | {
1967
1967
  name: string;
1968
1968
  kind: string;
1969
1969
  desc: string;
1970
1970
  isOpt: boolean;
1971
+ gridInfo: string;
1972
+ noCode: string;
1971
1973
  defVal: string;
1972
- gridInfo?: undefined;
1973
- noCode?: undefined;
1974
1974
  } | {
1975
1975
  name: string;
1976
1976
  kind: string;
1977
1977
  desc: string;
1978
1978
  isOpt: boolean;
1979
1979
  gridInfo?: undefined;
1980
- noCode?: undefined;
1981
1980
  defVal?: undefined;
1981
+ noCode?: undefined;
1982
1982
  } | {
1983
1983
  name: string;
1984
1984
  kind: string;