@bigbinary/neetoui 8.2.69 → 8.2.71

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.
@@ -26,7 +26,7 @@ import 'react-i18next';
26
26
  import './useRecentlyUsedColors-CvgVrIg-.js';
27
27
  import './Dropdown.js';
28
28
  import './index-C9RIWUPw.js';
29
- export { D as default } from './index-3JST4vYS.js';
29
+ export { D as default } from './index-C_NVUIv9.js';
30
30
  import './Input.js';
31
31
  import './Label.js';
32
32
  import './MultiEmailInput.js';
@@ -62,7 +62,7 @@ import './Switch.js';
62
62
  import './Tab.js';
63
63
  import 'antd/lib/table';
64
64
  import 'react-drag-listview';
65
- import './useRestoreScrollPosition-DGr_35PJ.js';
65
+ import './useRestoreScrollPosition-BTy4iNK-.js';
66
66
  import 'react-resizable';
67
67
  import './Tag.js';
68
68
  import './Toastr.js';
package/dist/Select.js CHANGED
@@ -6,7 +6,7 @@ import React__default, { forwardRef, useRef, useState, useEffect, useCallback }
6
6
  import classnames from 'classnames';
7
7
  import { isPresent, _existsBy } from '@bigbinary/neeto-cist';
8
8
  import { Down, Close } from '@bigbinary/neeto-icons';
9
- import { prop, assoc, flatten, pluck } from 'ramda';
9
+ import { prop, mergeDeepRight, assoc, flatten, pluck } from 'ramda';
10
10
  import { u as useStateManager, S as Select$1, h as handleInputChange, a as useCreatable, C as CreatableSelect, c as components } from './react-select-creatable.esm-Dx_vEnyD.js';
11
11
  import _extends from '@babel/runtime/helpers/esm/extends';
12
12
  import '@babel/runtime/helpers/objectSpread2';
@@ -207,7 +207,7 @@ var AsyncCreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
207
207
  });
208
208
 
209
209
  var _excluded = ["children"],
210
- _excluded2 = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components", "optionRemapping", "onMenuClose", "onMenuOpen", "onKeyDown"];
210
+ _excluded2 = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components", "optionRemapping", "onMenuClose", "onMenuOpen", "onKeyDown", "styles"];
211
211
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
212
212
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
213
213
  var SIZES = {
@@ -367,6 +367,8 @@ var Select = function Select(_ref2) {
367
367
  onMenuClose = _ref2.onMenuClose,
368
368
  onMenuOpen = _ref2.onMenuOpen,
369
369
  onKeyDown = _ref2.onKeyDown,
370
+ _ref2$styles = _ref2.styles,
371
+ styles = _ref2$styles === void 0 ? {} : _ref2$styles,
370
372
  otherProps = _objectWithoutProperties$1(_ref2, _excluded2);
371
373
  var inputId = useId(id);
372
374
  var isMenuOpen = useRef((_ref3 = (_otherProps$isMenuOpe = otherProps.isMenuOpen) !== null && _otherProps$isMenuOpe !== void 0 ? _otherProps$isMenuOpe : otherProps.defaultMenuIsOpen) !== null && _ref3 !== void 0 ? _ref3 : false);
@@ -385,9 +387,9 @@ var Select = function Select(_ref2) {
385
387
  }
386
388
  var portalProps = strategy === STRATEGIES.fixed && {
387
389
  menuPortalTarget: document.body,
388
- styles: {
390
+ styles: mergeDeepRight({
389
391
  menuPortal: assoc("zIndex", 999999)
390
- },
392
+ }, styles),
391
393
  menuPosition: "fixed"
392
394
  };
393
395
  var options = otherProps.options,
@@ -470,10 +472,10 @@ var Select = function Select(_ref2) {
470
472
  onKeyDown: handleKeyDown,
471
473
  onMenuClose: handleMenuClose,
472
474
  onMenuOpen: handleMenuOpen
473
- }, _objectSpread(_objectSpread({
475
+ }, _objectSpread(_objectSpread(_objectSpread({
474
476
  inputId: inputId,
475
477
  label: label
476
- }, portalProps), otherProps))), !!error && /*#__PURE__*/React__default.createElement("p", {
478
+ }, styles), portalProps), otherProps))), !!error && /*#__PURE__*/React__default.createElement("p", {
477
479
  className: "neeto-ui-input__error",
478
480
  "data-cy": "".concat(hyphenize(label), "-select-error"),
479
481
  "data-testid": "select-error"
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../node_modules/react-select/dist/react-select.esm.js","../node_modules/react-select/dist/useAsync-5d308f11.esm.js","../node_modules/react-select/async/dist/react-select-async.esm.js","../node_modules/react-select/async-creatable/dist/react-select-async-creatable.esm.js","../src/components/Select.jsx"],"sourcesContent":["import { u as useStateManager } from './useStateManager-7e1e8489.esm.js';\nexport { u as useStateManager } from './useStateManager-7e1e8489.esm.js';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef, useMemo } from 'react';\nimport { S as Select } from './Select-6efcc53a.esm.js';\nexport { c as createFilter, d as defaultTheme, m as mergeStyles } from './Select-6efcc53a.esm.js';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nexport { c as components } from './index-9f7dc477.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport 'memoize-one';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\n\nvar StateManagedSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var baseSelectProps = useStateManager(props);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, baseSelectProps));\n});\n\nvar NonceProvider = (function (_ref) {\n var nonce = _ref.nonce,\n children = _ref.children,\n cacheKey = _ref.cacheKey;\n var emotionCache = useMemo(function () {\n return createCache({\n key: cacheKey,\n nonce: nonce\n });\n }, [cacheKey, nonce]);\n return /*#__PURE__*/React.createElement(CacheProvider, {\n value: emotionCache\n }, children);\n});\n\nexport default StateManagedSelect;\nexport { NonceProvider };\n","import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';\nimport _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\nimport { useRef, useState, useEffect, useCallback } from 'react';\nimport { L as handleInputChange } from './index-9f7dc477.esm.js';\n\nvar _excluded = [\"defaultOptions\", \"cacheOptions\", \"loadOptions\", \"options\", \"isLoading\", \"onInputChange\", \"filterOption\"];\nfunction useAsync(_ref) {\n var _ref$defaultOptions = _ref.defaultOptions,\n propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,\n _ref$cacheOptions = _ref.cacheOptions,\n cacheOptions = _ref$cacheOptions === void 0 ? false : _ref$cacheOptions,\n propsLoadOptions = _ref.loadOptions;\n _ref.options;\n var _ref$isLoading = _ref.isLoading,\n propsIsLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,\n propsOnInputChange = _ref.onInputChange,\n _ref$filterOption = _ref.filterOption,\n filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,\n restSelectProps = _objectWithoutProperties(_ref, _excluded);\n var propsInputValue = restSelectProps.inputValue;\n var lastRequest = useRef(undefined);\n var mounted = useRef(false);\n var _useState = useState(Array.isArray(propsDefaultOptions) ? propsDefaultOptions : undefined),\n _useState2 = _slicedToArray(_useState, 2),\n defaultOptions = _useState2[0],\n setDefaultOptions = _useState2[1];\n var _useState3 = useState(typeof propsInputValue !== 'undefined' ? propsInputValue : ''),\n _useState4 = _slicedToArray(_useState3, 2),\n stateInputValue = _useState4[0],\n setStateInputValue = _useState4[1];\n var _useState5 = useState(propsDefaultOptions === true),\n _useState6 = _slicedToArray(_useState5, 2),\n isLoading = _useState6[0],\n setIsLoading = _useState6[1];\n var _useState7 = useState(undefined),\n _useState8 = _slicedToArray(_useState7, 2),\n loadedInputValue = _useState8[0],\n setLoadedInputValue = _useState8[1];\n var _useState9 = useState([]),\n _useState10 = _slicedToArray(_useState9, 2),\n loadedOptions = _useState10[0],\n setLoadedOptions = _useState10[1];\n var _useState11 = useState(false),\n _useState12 = _slicedToArray(_useState11, 2),\n passEmptyOptions = _useState12[0],\n setPassEmptyOptions = _useState12[1];\n var _useState13 = useState({}),\n _useState14 = _slicedToArray(_useState13, 2),\n optionsCache = _useState14[0],\n setOptionsCache = _useState14[1];\n var _useState15 = useState(undefined),\n _useState16 = _slicedToArray(_useState15, 2),\n prevDefaultOptions = _useState16[0],\n setPrevDefaultOptions = _useState16[1];\n var _useState17 = useState(undefined),\n _useState18 = _slicedToArray(_useState17, 2),\n prevCacheOptions = _useState18[0],\n setPrevCacheOptions = _useState18[1];\n if (cacheOptions !== prevCacheOptions) {\n setOptionsCache({});\n setPrevCacheOptions(cacheOptions);\n }\n if (propsDefaultOptions !== prevDefaultOptions) {\n setDefaultOptions(Array.isArray(propsDefaultOptions) ? propsDefaultOptions : undefined);\n setPrevDefaultOptions(propsDefaultOptions);\n }\n useEffect(function () {\n mounted.current = true;\n return function () {\n mounted.current = false;\n };\n }, []);\n var loadOptions = useCallback(function (inputValue, callback) {\n if (!propsLoadOptions) return callback();\n var loader = propsLoadOptions(inputValue, callback);\n if (loader && typeof loader.then === 'function') {\n loader.then(callback, function () {\n return callback();\n });\n }\n }, [propsLoadOptions]);\n useEffect(function () {\n if (propsDefaultOptions === true) {\n loadOptions(stateInputValue, function (options) {\n if (!mounted.current) return;\n setDefaultOptions(options || []);\n setIsLoading(!!lastRequest.current);\n });\n }\n // NOTE: this effect is designed to only run when the component mounts,\n // so we don't want to include any hook dependencies\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n var onInputChange = useCallback(function (newValue, actionMeta) {\n var inputValue = handleInputChange(newValue, actionMeta, propsOnInputChange);\n if (!inputValue) {\n lastRequest.current = undefined;\n setStateInputValue('');\n setLoadedInputValue('');\n setLoadedOptions([]);\n setIsLoading(false);\n setPassEmptyOptions(false);\n return;\n }\n if (cacheOptions && optionsCache[inputValue]) {\n setStateInputValue(inputValue);\n setLoadedInputValue(inputValue);\n setLoadedOptions(optionsCache[inputValue]);\n setIsLoading(false);\n setPassEmptyOptions(false);\n } else {\n var request = lastRequest.current = {};\n setStateInputValue(inputValue);\n setIsLoading(true);\n setPassEmptyOptions(!loadedInputValue);\n loadOptions(inputValue, function (options) {\n if (!mounted) return;\n if (request !== lastRequest.current) return;\n lastRequest.current = undefined;\n setIsLoading(false);\n setLoadedInputValue(inputValue);\n setLoadedOptions(options || []);\n setPassEmptyOptions(false);\n setOptionsCache(options ? _objectSpread(_objectSpread({}, optionsCache), {}, _defineProperty({}, inputValue, options)) : optionsCache);\n });\n }\n }, [cacheOptions, loadOptions, loadedInputValue, optionsCache, propsOnInputChange]);\n var options = passEmptyOptions ? [] : stateInputValue && loadedInputValue ? loadedOptions : defaultOptions || [];\n return _objectSpread(_objectSpread({}, restSelectProps), {}, {\n options: options,\n isLoading: isLoading || propsIsLoading,\n onInputChange: onInputChange,\n filterOption: filterOption\n });\n}\n\nexport { useAsync as u };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport { S as Select } from '../../dist/Select-6efcc53a.esm.js';\nimport { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';\nimport { u as useAsync } from '../../dist/useAsync-5d308f11.esm.js';\nexport { u as useAsync } from '../../dist/useAsync-5d308f11.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport '../../dist/index-9f7dc477.esm.js';\nimport '@emotion/react';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\nimport 'memoize-one';\n\nvar AsyncSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var stateManagedProps = useAsync(props);\n var selectProps = useStateManager(stateManagedProps);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, selectProps));\n});\n\nexport default AsyncSelect;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport { S as Select } from '../../dist/Select-6efcc53a.esm.js';\nimport { u as useAsync } from '../../dist/useAsync-5d308f11.esm.js';\nimport { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';\nimport { u as useCreatable } from '../../dist/useCreatable-ff70b556.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport '../../dist/index-9f7dc477.esm.js';\nimport '@emotion/react';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\nimport 'memoize-one';\n\nvar AsyncCreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var stateManagerProps = useAsync(props);\n var creatableProps = useStateManager(stateManagerProps);\n var selectProps = useCreatable(creatableProps);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, selectProps));\n});\n\nexport default AsyncCreatableSelect;\n","import React, { useEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { _existsBy, isPresent } from \"neetocist\";\nimport { Down, Close } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { prop, assoc, flatten, pluck } from \"ramda\";\nimport SelectInput, { components } from \"react-select\";\nimport Async from \"react-select/async\";\nimport AsyncCreatable from \"react-select/async-creatable\";\nimport Creatable from \"react-select/creatable\";\n\nimport { useId } from \"hooks\";\nimport { hyphenize } from \"utils\";\n\nimport Label from \"./Label\";\nimport Spinner from \"./Spinner\";\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst STRATEGIES = { default: \"default\", fixed: \"fixed\" };\n\nconst Control = ({ children, ...props }) => {\n const { selectProps, hasValue } = props;\n\n return (\n <components.Control {...props}>\n {/* hasValue is part of commonProps passed to custom components internally by react-select */}\n {hasValue && selectProps.isMulti && (\n <span className=\"neeto-ui-btn neeto-ui-btn--style-secondary neeto-ui-react-select__add-btn\">\n {selectProps.addButtonLabel || \"Add\"}\n </span>\n )}{\" \"}\n {children}\n </components.Control>\n );\n};\n\nconst DropdownIndicator = props => (\n <components.DropdownIndicator\n {...props}\n innerProps={{ ...props.innerProps, [\"data-cy\"]: \"action-select-indicator\" }}\n >\n <Down size={16} />\n </components.DropdownIndicator>\n);\n\nconst ClearIndicator = props => (\n <components.ClearIndicator\n {...props}\n innerProps={{ ...props.innerProps, \"data-cy\": \"clear-select-indicator\" }}\n >\n <Close size={16} />\n </components.ClearIndicator>\n);\n\nconst MultiValueRemove = props => (\n <components.MultiValueRemove {...props}>\n <Close size={16} />\n </components.MultiValueRemove>\n);\n\nconst CustomInput = props => {\n const { selectProps } = props;\n\n return (\n <components.Input\n {...props}\n data-cy={selectProps ? selectProps[\"data-cy\"] : \"select-input\"}\n data-testid={selectProps && selectProps[\"data-testid\"]}\n maxLength={selectProps && selectProps.maxLength}\n />\n );\n};\n\nconst CustomOption = props => {\n const ref = useRef();\n const { dataCy } = props.data;\n\n useEffect(() => {\n props.isSelected && ref.current.scrollIntoView();\n }, [props.isSelected]);\n\n return (\n <components.Option\n {...props}\n innerRef={ref}\n innerProps={{\n ...props.innerProps,\n \"data-cy\": dataCy || `${hyphenize(props.label)}-select-option`,\n }}\n />\n );\n};\n\nconst Placeholder = props => {\n const { selectProps } = props;\n\n return (\n <components.Placeholder\n {...props}\n innerProps={{\n ...props.innerProps,\n \"data-cy\": selectProps\n ? `${hyphenize(selectProps.label)}-select-placeholder`\n : \"select-placeholder\",\n }}\n />\n );\n};\n\nconst Menu = props => {\n const { selectProps } = props;\n\n return (\n <components.Menu\n {...props}\n innerProps={{\n ...props.innerProps,\n \"data-cy\": selectProps\n ? `${hyphenize(selectProps.label)}-select-menu`\n : \"select-menu\",\n }}\n />\n );\n};\n\nconst SingleValue = props => (\n <components.SingleValue\n {...props}\n innerProps={{ ...props.innerProps, \"data-cy\": \"select-single-value\" }}\n />\n);\n\nconst ValueContainer = props => {\n const { selectProps } = props;\n\n return (\n <components.ValueContainer\n {...props}\n innerProps={{\n ...props.innerProps,\n name: selectProps.name,\n \"data-cy\": selectProps\n ? `${hyphenize(selectProps.label)}-select-value-container`\n : \"select-value-container\",\n }}\n />\n );\n};\n\nconst MenuList = props => {\n const {\n fetchMore,\n totalOptionsCount,\n isAsyncLoadOptionEnabled,\n options,\n portalProps = {},\n } = props.selectProps;\n\n const hasMore =\n isAsyncLoadOptionEnabled && totalOptionsCount > options.length;\n\n const loaderRef = useRef();\n\n useEffect(() => {\n let observer = null;\n\n if (loaderRef.current && isAsyncLoadOptionEnabled) {\n observer = new IntersectionObserver(\n entries => entries[0].isIntersecting && fetchMore(),\n { root: null, rootMargin: \"0px\", threshold: 0.1 }\n );\n observer.observe(loaderRef.current);\n }\n\n return () => {\n if (!(loaderRef.current && isAsyncLoadOptionEnabled)) return;\n observer?.unobserve(loaderRef.current);\n };\n }, [hasMore]);\n\n return (\n <components.MenuList\n {...props}\n {...portalProps}\n innerProps={{ ...props.innerProps, [\"data-testid\"]: \"menu-list\" }}\n >\n {props.children}\n {hasMore && (\n <div\n className=\"neeto-ui-flex neeto-ui-w-full neeto-ui-items-center neeto-ui-justify-center neeto-ui-py-3\"\n data-testid=\"loader\"\n ref={loaderRef}\n >\n <Spinner />\n </div>\n )}\n </components.MenuList>\n );\n};\n\nconst Select = ({\n size = SIZES.medium,\n label = \"\",\n required = false,\n error = \"\",\n helpText = \"\",\n className = \"\",\n innerRef,\n isCreateable = false,\n strategy = STRATEGIES.default,\n id,\n labelProps,\n value,\n defaultValue,\n components: componentOverrides,\n optionRemapping = {},\n onMenuClose,\n onMenuOpen,\n onKeyDown,\n ...otherProps\n}) => {\n const inputId = useId(id);\n const isMenuOpen = useRef(\n otherProps.isMenuOpen ?? otherProps.defaultMenuIsOpen ?? false\n );\n\n let Parent = SelectInput;\n\n if (isCreateable) {\n Parent = Creatable;\n }\n\n if (otherProps.loadOptions) {\n Parent = isCreateable ? AsyncCreatable : Async;\n }\n\n if (optionRemapping.value) {\n otherProps.getOptionValue = prop(optionRemapping.value);\n }\n\n if (optionRemapping.label) {\n otherProps.getOptionLabel = prop(optionRemapping.label);\n }\n\n const portalProps = strategy === STRATEGIES.fixed && {\n menuPortalTarget: document.body,\n styles: { menuPortal: assoc(\"zIndex\", 999999) },\n menuPosition: \"fixed\",\n };\n\n const { options, defaultOptions, getOptionValue } = otherProps;\n\n const getRealOptionValue = option => {\n if (typeof getOptionValue !== \"function\") {\n return option.value;\n }\n\n return getOptionValue(option);\n };\n\n const findInOptions = value => {\n const { fetchMore, isMulti } = otherProps;\n if (!value || isMulti || isPresent(fetchMore)) {\n return value;\n }\n\n let currentOptions = options || defaultOptions;\n if (Array.isArray(value)) value = value[0];\n\n const isGrouped = _existsBy({ options: Array.isArray }, currentOptions);\n\n if (isGrouped) {\n currentOptions = flatten(pluck(\"options\", currentOptions));\n }\n\n return currentOptions?.filter(\n opt => getRealOptionValue(opt) === getRealOptionValue(value)\n );\n };\n\n const handleMenuOpen = () => {\n isMenuOpen.current = true;\n onMenuOpen?.();\n };\n\n const handleMenuClose = () => {\n isMenuOpen.current = false;\n onMenuClose?.();\n };\n\n const handleKeyDown = e => {\n if (!isMenuOpen.current) return;\n\n e.stopPropagation();\n onKeyDown?.(e);\n };\n\n return (\n <div\n className={classnames([\"neeto-ui-input__wrapper\", className])}\n data-cy={`${hyphenize(label)}-select-container-wrapper`}\n data-testid=\"select\"\n >\n {label && (\n <Label\n {...{ required }}\n data-cy={`${hyphenize(label)}-input-label`}\n data-testid=\"select-label\"\n htmlFor={inputId}\n {...labelProps}\n >\n {label}\n </Label>\n )}\n <Parent\n blurInputOnSelect={false}\n classNamePrefix=\"neeto-ui-react-select\"\n closeMenuOnSelect={!otherProps.isMulti}\n data-cy={`${hyphenize(label)}-select-container`}\n defaultValue={findInOptions(defaultValue)}\n ref={innerRef}\n value={findInOptions(value)}\n className={classnames([\"neeto-ui-react-select__container\"], {\n \"neeto-ui-react-select__container--error\": !!error,\n \"neeto-ui-react-select__container--small\": size === SIZES.small,\n \"neeto-ui-react-select__container--medium\": size === SIZES.medium,\n \"neeto-ui-react-select__container--large\": size === SIZES.large,\n })}\n components={{\n Input: CustomInput,\n Option: CustomOption,\n DropdownIndicator,\n ClearIndicator,\n MultiValueRemove,\n Placeholder,\n Menu,\n ValueContainer,\n MenuList,\n SingleValue,\n Control,\n ...componentOverrides,\n }}\n onKeyDown={handleKeyDown}\n onMenuClose={handleMenuClose}\n onMenuOpen={handleMenuOpen}\n {...{ inputId, label, ...portalProps, ...otherProps }}\n />\n {!!error && (\n <p\n className=\"neeto-ui-input__error\"\n data-cy={`${hyphenize(label)}-select-error`}\n data-testid=\"select-error\"\n >\n {error}\n </p>\n )}\n {helpText && (\n <p\n className=\"neeto-ui-input__help-text\"\n data-cy={`${hyphenize(label)}-select-help-text`}\n data-testid=\"select-help-text\"\n >\n {helpText}\n </p>\n )}\n </div>\n );\n};\n\nSelect.propTypes = {\n /**\n * To specify the default selected option.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n /**\n * To specify the placeholder text.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether the Select input is disabled.\n */\n isDisabled: PropTypes.bool,\n /**\n * To specify whether the Select input is clearable.\n */\n isClearable: PropTypes.bool,\n /**\n * To specify whether the Select input is searchable.\n */\n isSearchable: PropTypes.bool,\n /**\n * To specify the name for the Select input.\n */\n name: PropTypes.string,\n /**\n * The `options` prop expects an array of objects of the format `{ label: \"\", value: \"\" }`.\n *\n * If your array has different keys, you can specify them using this prop.\n *\n * Eg: `{ label: \"name\", value: \"id\" }` if `options` is an array of `{ name: \"\", id: \"\" }` objects.\n */\n optionRemapping: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To provide the options for the Select input.\n */\n options: PropTypes.array,\n /**\n * To specify the size of the Select component.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify positioning strategy for Select component.\n */\n strategy: PropTypes.oneOf(Object.values(STRATEGIES)),\n /**\n * To specify the text to be displayed above the Select component.\n */\n label: PropTypes.string,\n /**\n * To specify the label props to be passed to the Label component.\n */\n labelProps: PropTypes.object,\n /**\n * To specify whether the Select field is required or not.\n */\n required: PropTypes.bool,\n /**\n * To specify the error message to be displayed in the Select component.\n */\n error: PropTypes.string,\n /**\n * To specify the help text that appears below the Select component.\n */\n helpText: PropTypes.string,\n /**\n * To specify external classnames as overrides to the Select component.\n */\n className: PropTypes.string,\n /**\n * To specify whether the Select component is a creatable Select component.\n */\n isCreateable: PropTypes.bool,\n /**\n * To specify the ref to the Select component.\n */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n /**\n * Callback to load more options\n */\n fetchMore: PropTypes.func,\n /**\n * To specify if the total number of option available when lazy option load is enabled.\n */\n totalOptionsCount: PropTypes.number,\n /**\n * To specify if async options loading is enabled\n */\n isAsyncLoadOptionEnabled: PropTypes.bool,\n /**\n * To specify the label for the button shown in multi select\n */\n addButtonLabel: PropTypes.string,\n /**\n * To specify the extra props to be passed to the menu list.\n */\n portalProps: PropTypes.object,\n /**\n * Callback function which will be invoked when the menu is opened.\n */\n onMenuOpen: PropTypes.func,\n /**\n * Callback function which will be invoked when the menu is closed.\n */\n onMenuClose: PropTypes.func,\n /**\n * Callback function which will be invoked when a key is pressed.\n */\n onKeyDown: PropTypes.func,\n};\n\nexport default Select;\n"],"names":["Select","_excluded","_objectSpread","SIZES","small","medium","large","STRATEGIES","fixed","Control","_ref","children","props","_objectWithoutProperties","selectProps","hasValue","React","createElement","components","isMulti","className","addButtonLabel","DropdownIndicator","_extends","innerProps","_defineProperty","Down","size","ClearIndicator","Close","MultiValueRemove","CustomInput","Input","maxLength","CustomOption","ref","useRef","dataCy","data","useEffect","isSelected","current","scrollIntoView","Option","innerRef","concat","hyphenize","label","Placeholder","Menu","SingleValue","ValueContainer","name","MenuList","_props$selectProps","fetchMore","totalOptionsCount","isAsyncLoadOptionEnabled","options","_props$selectProps$po","portalProps","hasMore","length","loaderRef","observer","IntersectionObserver","entries","isIntersecting","root","rootMargin","threshold","observe","_observer","unobserve","Spinner","_ref2","_ref3","_otherProps$isMenuOpe","_ref2$size","_ref2$label","_ref2$required","required","_ref2$error","error","_ref2$helpText","helpText","_ref2$className","_ref2$isCreateable","isCreateable","_ref2$strategy","strategy","id","labelProps","value","defaultValue","componentOverrides","_ref2$optionRemapping","optionRemapping","onMenuClose","onMenuOpen","onKeyDown","otherProps","_excluded2","inputId","useId","isMenuOpen","defaultMenuIsOpen","Parent","SelectInput","Creatable","loadOptions","AsyncCreatable","Async","getOptionValue","prop","getOptionLabel","menuPortalTarget","document","body","styles","menuPortal","assoc","menuPosition","defaultOptions","getRealOptionValue","option","findInOptions","_currentOptions","isPresent","currentOptions","Array","isArray","isGrouped","_existsBy","flatten","pluck","filter","opt","handleMenuOpen","handleMenuClose","handleKeyDown","e","stopPropagation","classnames","Label","htmlFor","blurInputOnSelect","classNamePrefix","closeMenuOnSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAI,kBAAkB,gBAAgB,UAAU,CAAC,UAAU,KAAK,EAAE,GAAG,EAAE;AACvE,EAAE,IAAI,eAAe,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAC/C,EAAE,oBAAoB,KAAK,CAAC,aAAa,CAACA,QAAM,EAAE,QAAQ,CAAC;AAC3D,IAAI,GAAG,EAAE,GAAG;AACZ,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;AACvB,CAAC,CAAC;;ACxBF,IAAIC,WAAS,GAAG,CAAC,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AAC3H,SAAS,QAAQ,CAAC,IAAI,EAAE;AACxB,EAAE,IAAI,mBAAmB,GAAG,IAAI,CAAC,cAAc;AAC/C,IAAI,mBAAmB,GAAG,mBAAmB,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,mBAAmB;AACtF,IAAI,iBAAiB,GAAG,IAAI,CAAC,YAAY;AACzC,IAAI,YAAY,GAAG,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,iBAAiB;AAC3E,IAAI,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;AACxC,IAAI,IAAI,CAAC,OAAO,CAAC;AACjB,IAAI,IAAI,cAAc,GAAG,IAAI,CAAC,SAAS;AACvC,IAAI,cAAc,GAAG,cAAc,KAAK,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PA,OAAO;AAAExD,IAAAA,KAAK,EAALA,KAAAA;GAAUa,EAAAA,WAAW,CAAKyC,EAAAA,UAAU,CACnD,CAAA,CAAA,EACD,CAAC,CAAClB,KAAK,iBACNnE,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AACEG,IAAAA,SAAS,EAAC,uBAAuB;AACjC,IAAA,SAAA,EAAA,EAAA,CAAAyB,MAAA,CAAYC,SAAS,CAACC,KAAK,CAAC,EAAgB,eAAA,CAAA;IAC5C,aAAY,EAAA,cAAA;AAAc,GAAA,EAEzBoC,KAAK,CAET,EACAE,QAAQ,iBACPrE,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AACEG,IAAAA,SAAS,EAAC,2BAA2B;AACrC,IAAA,SAAA,EAAA,EAAA,CAAAyB,MAAA,CAAYC,SAAS,CAACC,KAAK,CAAC,EAAoB,mBAAA,CAAA;IAChD,aAAY,EAAA,kBAAA;GAEXsC,EAAAA,QAAQ,CAEZ,CACG,CAAA;AAEV;;;;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"Select.js","sources":["../node_modules/react-select/dist/react-select.esm.js","../node_modules/react-select/dist/useAsync-5d308f11.esm.js","../node_modules/react-select/async/dist/react-select-async.esm.js","../node_modules/react-select/async-creatable/dist/react-select-async-creatable.esm.js","../src/components/Select.jsx"],"sourcesContent":["import { u as useStateManager } from './useStateManager-7e1e8489.esm.js';\nexport { u as useStateManager } from './useStateManager-7e1e8489.esm.js';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef, useMemo } from 'react';\nimport { S as Select } from './Select-6efcc53a.esm.js';\nexport { c as createFilter, d as defaultTheme, m as mergeStyles } from './Select-6efcc53a.esm.js';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nexport { c as components } from './index-9f7dc477.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport 'memoize-one';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\n\nvar StateManagedSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var baseSelectProps = useStateManager(props);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, baseSelectProps));\n});\n\nvar NonceProvider = (function (_ref) {\n var nonce = _ref.nonce,\n children = _ref.children,\n cacheKey = _ref.cacheKey;\n var emotionCache = useMemo(function () {\n return createCache({\n key: cacheKey,\n nonce: nonce\n });\n }, [cacheKey, nonce]);\n return /*#__PURE__*/React.createElement(CacheProvider, {\n value: emotionCache\n }, children);\n});\n\nexport default StateManagedSelect;\nexport { NonceProvider };\n","import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';\nimport _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\nimport { useRef, useState, useEffect, useCallback } from 'react';\nimport { L as handleInputChange } from './index-9f7dc477.esm.js';\n\nvar _excluded = [\"defaultOptions\", \"cacheOptions\", \"loadOptions\", \"options\", \"isLoading\", \"onInputChange\", \"filterOption\"];\nfunction useAsync(_ref) {\n var _ref$defaultOptions = _ref.defaultOptions,\n propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,\n _ref$cacheOptions = _ref.cacheOptions,\n cacheOptions = _ref$cacheOptions === void 0 ? false : _ref$cacheOptions,\n propsLoadOptions = _ref.loadOptions;\n _ref.options;\n var _ref$isLoading = _ref.isLoading,\n propsIsLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,\n propsOnInputChange = _ref.onInputChange,\n _ref$filterOption = _ref.filterOption,\n filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,\n restSelectProps = _objectWithoutProperties(_ref, _excluded);\n var propsInputValue = restSelectProps.inputValue;\n var lastRequest = useRef(undefined);\n var mounted = useRef(false);\n var _useState = useState(Array.isArray(propsDefaultOptions) ? propsDefaultOptions : undefined),\n _useState2 = _slicedToArray(_useState, 2),\n defaultOptions = _useState2[0],\n setDefaultOptions = _useState2[1];\n var _useState3 = useState(typeof propsInputValue !== 'undefined' ? propsInputValue : ''),\n _useState4 = _slicedToArray(_useState3, 2),\n stateInputValue = _useState4[0],\n setStateInputValue = _useState4[1];\n var _useState5 = useState(propsDefaultOptions === true),\n _useState6 = _slicedToArray(_useState5, 2),\n isLoading = _useState6[0],\n setIsLoading = _useState6[1];\n var _useState7 = useState(undefined),\n _useState8 = _slicedToArray(_useState7, 2),\n loadedInputValue = _useState8[0],\n setLoadedInputValue = _useState8[1];\n var _useState9 = useState([]),\n _useState10 = _slicedToArray(_useState9, 2),\n loadedOptions = _useState10[0],\n setLoadedOptions = _useState10[1];\n var _useState11 = useState(false),\n _useState12 = _slicedToArray(_useState11, 2),\n passEmptyOptions = _useState12[0],\n setPassEmptyOptions = _useState12[1];\n var _useState13 = useState({}),\n _useState14 = _slicedToArray(_useState13, 2),\n optionsCache = _useState14[0],\n setOptionsCache = _useState14[1];\n var _useState15 = useState(undefined),\n _useState16 = _slicedToArray(_useState15, 2),\n prevDefaultOptions = _useState16[0],\n setPrevDefaultOptions = _useState16[1];\n var _useState17 = useState(undefined),\n _useState18 = _slicedToArray(_useState17, 2),\n prevCacheOptions = _useState18[0],\n setPrevCacheOptions = _useState18[1];\n if (cacheOptions !== prevCacheOptions) {\n setOptionsCache({});\n setPrevCacheOptions(cacheOptions);\n }\n if (propsDefaultOptions !== prevDefaultOptions) {\n setDefaultOptions(Array.isArray(propsDefaultOptions) ? propsDefaultOptions : undefined);\n setPrevDefaultOptions(propsDefaultOptions);\n }\n useEffect(function () {\n mounted.current = true;\n return function () {\n mounted.current = false;\n };\n }, []);\n var loadOptions = useCallback(function (inputValue, callback) {\n if (!propsLoadOptions) return callback();\n var loader = propsLoadOptions(inputValue, callback);\n if (loader && typeof loader.then === 'function') {\n loader.then(callback, function () {\n return callback();\n });\n }\n }, [propsLoadOptions]);\n useEffect(function () {\n if (propsDefaultOptions === true) {\n loadOptions(stateInputValue, function (options) {\n if (!mounted.current) return;\n setDefaultOptions(options || []);\n setIsLoading(!!lastRequest.current);\n });\n }\n // NOTE: this effect is designed to only run when the component mounts,\n // so we don't want to include any hook dependencies\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n var onInputChange = useCallback(function (newValue, actionMeta) {\n var inputValue = handleInputChange(newValue, actionMeta, propsOnInputChange);\n if (!inputValue) {\n lastRequest.current = undefined;\n setStateInputValue('');\n setLoadedInputValue('');\n setLoadedOptions([]);\n setIsLoading(false);\n setPassEmptyOptions(false);\n return;\n }\n if (cacheOptions && optionsCache[inputValue]) {\n setStateInputValue(inputValue);\n setLoadedInputValue(inputValue);\n setLoadedOptions(optionsCache[inputValue]);\n setIsLoading(false);\n setPassEmptyOptions(false);\n } else {\n var request = lastRequest.current = {};\n setStateInputValue(inputValue);\n setIsLoading(true);\n setPassEmptyOptions(!loadedInputValue);\n loadOptions(inputValue, function (options) {\n if (!mounted) return;\n if (request !== lastRequest.current) return;\n lastRequest.current = undefined;\n setIsLoading(false);\n setLoadedInputValue(inputValue);\n setLoadedOptions(options || []);\n setPassEmptyOptions(false);\n setOptionsCache(options ? _objectSpread(_objectSpread({}, optionsCache), {}, _defineProperty({}, inputValue, options)) : optionsCache);\n });\n }\n }, [cacheOptions, loadOptions, loadedInputValue, optionsCache, propsOnInputChange]);\n var options = passEmptyOptions ? [] : stateInputValue && loadedInputValue ? loadedOptions : defaultOptions || [];\n return _objectSpread(_objectSpread({}, restSelectProps), {}, {\n options: options,\n isLoading: isLoading || propsIsLoading,\n onInputChange: onInputChange,\n filterOption: filterOption\n });\n}\n\nexport { useAsync as u };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport { S as Select } from '../../dist/Select-6efcc53a.esm.js';\nimport { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';\nimport { u as useAsync } from '../../dist/useAsync-5d308f11.esm.js';\nexport { u as useAsync } from '../../dist/useAsync-5d308f11.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport '../../dist/index-9f7dc477.esm.js';\nimport '@emotion/react';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\nimport 'memoize-one';\n\nvar AsyncSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var stateManagedProps = useAsync(props);\n var selectProps = useStateManager(stateManagedProps);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, selectProps));\n});\n\nexport default AsyncSelect;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport { S as Select } from '../../dist/Select-6efcc53a.esm.js';\nimport { u as useAsync } from '../../dist/useAsync-5d308f11.esm.js';\nimport { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';\nimport { u as useCreatable } from '../../dist/useCreatable-ff70b556.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport '../../dist/index-9f7dc477.esm.js';\nimport '@emotion/react';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\nimport 'memoize-one';\n\nvar AsyncCreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var stateManagerProps = useAsync(props);\n var creatableProps = useStateManager(stateManagerProps);\n var selectProps = useCreatable(creatableProps);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, selectProps));\n});\n\nexport default AsyncCreatableSelect;\n","import React, { useEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { _existsBy, isPresent } from \"neetocist\";\nimport { Down, Close } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { prop, assoc, flatten, pluck, mergeDeepRight } from \"ramda\";\nimport SelectInput, { components } from \"react-select\";\nimport Async from \"react-select/async\";\nimport AsyncCreatable from \"react-select/async-creatable\";\nimport Creatable from \"react-select/creatable\";\n\nimport { useId } from \"hooks\";\nimport { hyphenize } from \"utils\";\n\nimport Label from \"./Label\";\nimport Spinner from \"./Spinner\";\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst STRATEGIES = { default: \"default\", fixed: \"fixed\" };\n\nconst Control = ({ children, ...props }) => {\n const { selectProps, hasValue } = props;\n\n return (\n <components.Control {...props}>\n {/* hasValue is part of commonProps passed to custom components internally by react-select */}\n {hasValue && selectProps.isMulti && (\n <span className=\"neeto-ui-btn neeto-ui-btn--style-secondary neeto-ui-react-select__add-btn\">\n {selectProps.addButtonLabel || \"Add\"}\n </span>\n )}{\" \"}\n {children}\n </components.Control>\n );\n};\n\nconst DropdownIndicator = props => (\n <components.DropdownIndicator\n {...props}\n innerProps={{ ...props.innerProps, [\"data-cy\"]: \"action-select-indicator\" }}\n >\n <Down size={16} />\n </components.DropdownIndicator>\n);\n\nconst ClearIndicator = props => (\n <components.ClearIndicator\n {...props}\n innerProps={{ ...props.innerProps, \"data-cy\": \"clear-select-indicator\" }}\n >\n <Close size={16} />\n </components.ClearIndicator>\n);\n\nconst MultiValueRemove = props => (\n <components.MultiValueRemove {...props}>\n <Close size={16} />\n </components.MultiValueRemove>\n);\n\nconst CustomInput = props => {\n const { selectProps } = props;\n\n return (\n <components.Input\n {...props}\n data-cy={selectProps ? selectProps[\"data-cy\"] : \"select-input\"}\n data-testid={selectProps && selectProps[\"data-testid\"]}\n maxLength={selectProps && selectProps.maxLength}\n />\n );\n};\n\nconst CustomOption = props => {\n const ref = useRef();\n const { dataCy } = props.data;\n\n useEffect(() => {\n props.isSelected && ref.current.scrollIntoView();\n }, [props.isSelected]);\n\n return (\n <components.Option\n {...props}\n innerRef={ref}\n innerProps={{\n ...props.innerProps,\n \"data-cy\": dataCy || `${hyphenize(props.label)}-select-option`,\n }}\n />\n );\n};\n\nconst Placeholder = props => {\n const { selectProps } = props;\n\n return (\n <components.Placeholder\n {...props}\n innerProps={{\n ...props.innerProps,\n \"data-cy\": selectProps\n ? `${hyphenize(selectProps.label)}-select-placeholder`\n : \"select-placeholder\",\n }}\n />\n );\n};\n\nconst Menu = props => {\n const { selectProps } = props;\n\n return (\n <components.Menu\n {...props}\n innerProps={{\n ...props.innerProps,\n \"data-cy\": selectProps\n ? `${hyphenize(selectProps.label)}-select-menu`\n : \"select-menu\",\n }}\n />\n );\n};\n\nconst SingleValue = props => (\n <components.SingleValue\n {...props}\n innerProps={{ ...props.innerProps, \"data-cy\": \"select-single-value\" }}\n />\n);\n\nconst ValueContainer = props => {\n const { selectProps } = props;\n\n return (\n <components.ValueContainer\n {...props}\n innerProps={{\n ...props.innerProps,\n name: selectProps.name,\n \"data-cy\": selectProps\n ? `${hyphenize(selectProps.label)}-select-value-container`\n : \"select-value-container\",\n }}\n />\n );\n};\n\nconst MenuList = props => {\n const {\n fetchMore,\n totalOptionsCount,\n isAsyncLoadOptionEnabled,\n options,\n portalProps = {},\n } = props.selectProps;\n\n const hasMore =\n isAsyncLoadOptionEnabled && totalOptionsCount > options.length;\n\n const loaderRef = useRef();\n\n useEffect(() => {\n let observer = null;\n\n if (loaderRef.current && isAsyncLoadOptionEnabled) {\n observer = new IntersectionObserver(\n entries => entries[0].isIntersecting && fetchMore(),\n { root: null, rootMargin: \"0px\", threshold: 0.1 }\n );\n observer.observe(loaderRef.current);\n }\n\n return () => {\n if (!(loaderRef.current && isAsyncLoadOptionEnabled)) return;\n observer?.unobserve(loaderRef.current);\n };\n }, [hasMore]);\n\n return (\n <components.MenuList\n {...props}\n {...portalProps}\n innerProps={{ ...props.innerProps, [\"data-testid\"]: \"menu-list\" }}\n >\n {props.children}\n {hasMore && (\n <div\n className=\"neeto-ui-flex neeto-ui-w-full neeto-ui-items-center neeto-ui-justify-center neeto-ui-py-3\"\n data-testid=\"loader\"\n ref={loaderRef}\n >\n <Spinner />\n </div>\n )}\n </components.MenuList>\n );\n};\n\nconst Select = ({\n size = SIZES.medium,\n label = \"\",\n required = false,\n error = \"\",\n helpText = \"\",\n className = \"\",\n innerRef,\n isCreateable = false,\n strategy = STRATEGIES.default,\n id,\n labelProps,\n value,\n defaultValue,\n components: componentOverrides,\n optionRemapping = {},\n onMenuClose,\n onMenuOpen,\n onKeyDown,\n styles = {},\n ...otherProps\n}) => {\n const inputId = useId(id);\n const isMenuOpen = useRef(\n otherProps.isMenuOpen ?? otherProps.defaultMenuIsOpen ?? false\n );\n\n let Parent = SelectInput;\n\n if (isCreateable) {\n Parent = Creatable;\n }\n\n if (otherProps.loadOptions) {\n Parent = isCreateable ? AsyncCreatable : Async;\n }\n\n if (optionRemapping.value) {\n otherProps.getOptionValue = prop(optionRemapping.value);\n }\n\n if (optionRemapping.label) {\n otherProps.getOptionLabel = prop(optionRemapping.label);\n }\n\n const portalProps = strategy === STRATEGIES.fixed && {\n menuPortalTarget: document.body,\n styles: mergeDeepRight({ menuPortal: assoc(\"zIndex\", 999999) }, styles),\n menuPosition: \"fixed\",\n };\n\n const { options, defaultOptions, getOptionValue } = otherProps;\n\n const getRealOptionValue = option => {\n if (typeof getOptionValue !== \"function\") {\n return option.value;\n }\n\n return getOptionValue(option);\n };\n\n const findInOptions = value => {\n const { fetchMore, isMulti } = otherProps;\n if (!value || isMulti || isPresent(fetchMore)) {\n return value;\n }\n\n let currentOptions = options || defaultOptions;\n if (Array.isArray(value)) value = value[0];\n\n const isGrouped = _existsBy({ options: Array.isArray }, currentOptions);\n\n if (isGrouped) {\n currentOptions = flatten(pluck(\"options\", currentOptions));\n }\n\n return currentOptions?.filter(\n opt => getRealOptionValue(opt) === getRealOptionValue(value)\n );\n };\n\n const handleMenuOpen = () => {\n isMenuOpen.current = true;\n onMenuOpen?.();\n };\n\n const handleMenuClose = () => {\n isMenuOpen.current = false;\n onMenuClose?.();\n };\n\n const handleKeyDown = e => {\n if (!isMenuOpen.current) return;\n\n e.stopPropagation();\n onKeyDown?.(e);\n };\n\n return (\n <div\n className={classnames([\"neeto-ui-input__wrapper\", className])}\n data-cy={`${hyphenize(label)}-select-container-wrapper`}\n data-testid=\"select\"\n >\n {label && (\n <Label\n {...{ required }}\n data-cy={`${hyphenize(label)}-input-label`}\n data-testid=\"select-label\"\n htmlFor={inputId}\n {...labelProps}\n >\n {label}\n </Label>\n )}\n <Parent\n blurInputOnSelect={false}\n classNamePrefix=\"neeto-ui-react-select\"\n closeMenuOnSelect={!otherProps.isMulti}\n data-cy={`${hyphenize(label)}-select-container`}\n defaultValue={findInOptions(defaultValue)}\n ref={innerRef}\n value={findInOptions(value)}\n className={classnames([\"neeto-ui-react-select__container\"], {\n \"neeto-ui-react-select__container--error\": !!error,\n \"neeto-ui-react-select__container--small\": size === SIZES.small,\n \"neeto-ui-react-select__container--medium\": size === SIZES.medium,\n \"neeto-ui-react-select__container--large\": size === SIZES.large,\n })}\n components={{\n Input: CustomInput,\n Option: CustomOption,\n DropdownIndicator,\n ClearIndicator,\n MultiValueRemove,\n Placeholder,\n Menu,\n ValueContainer,\n MenuList,\n SingleValue,\n Control,\n ...componentOverrides,\n }}\n onKeyDown={handleKeyDown}\n onMenuClose={handleMenuClose}\n onMenuOpen={handleMenuOpen}\n {...{ inputId, label, ...styles, ...portalProps, ...otherProps }}\n />\n {!!error && (\n <p\n className=\"neeto-ui-input__error\"\n data-cy={`${hyphenize(label)}-select-error`}\n data-testid=\"select-error\"\n >\n {error}\n </p>\n )}\n {helpText && (\n <p\n className=\"neeto-ui-input__help-text\"\n data-cy={`${hyphenize(label)}-select-help-text`}\n data-testid=\"select-help-text\"\n >\n {helpText}\n </p>\n )}\n </div>\n );\n};\n\nSelect.propTypes = {\n /**\n * To specify the default selected option.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n /**\n * To specify the placeholder text.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether the Select input is disabled.\n */\n isDisabled: PropTypes.bool,\n /**\n * To specify whether the Select input is clearable.\n */\n isClearable: PropTypes.bool,\n /**\n * To specify whether the Select input is searchable.\n */\n isSearchable: PropTypes.bool,\n /**\n * To specify the name for the Select input.\n */\n name: PropTypes.string,\n /**\n * The `options` prop expects an array of objects of the format `{ label: \"\", value: \"\" }`.\n *\n * If your array has different keys, you can specify them using this prop.\n *\n * Eg: `{ label: \"name\", value: \"id\" }` if `options` is an array of `{ name: \"\", id: \"\" }` objects.\n */\n optionRemapping: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To provide the options for the Select input.\n */\n options: PropTypes.array,\n /**\n * To specify the size of the Select component.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify positioning strategy for Select component.\n */\n strategy: PropTypes.oneOf(Object.values(STRATEGIES)),\n /**\n * To specify the text to be displayed above the Select component.\n */\n label: PropTypes.string,\n /**\n * To specify the label props to be passed to the Label component.\n */\n labelProps: PropTypes.object,\n /**\n * To specify whether the Select field is required or not.\n */\n required: PropTypes.bool,\n /**\n * To specify the error message to be displayed in the Select component.\n */\n error: PropTypes.string,\n /**\n * To specify the help text that appears below the Select component.\n */\n helpText: PropTypes.string,\n /**\n * To specify external classnames as overrides to the Select component.\n */\n className: PropTypes.string,\n /**\n * To specify whether the Select component is a creatable Select component.\n */\n isCreateable: PropTypes.bool,\n /**\n * To specify the ref to the Select component.\n */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n /**\n * Callback to load more options\n */\n fetchMore: PropTypes.func,\n /**\n * To specify if the total number of option available when lazy option load is enabled.\n */\n totalOptionsCount: PropTypes.number,\n /**\n * To specify if async options loading is enabled\n */\n isAsyncLoadOptionEnabled: PropTypes.bool,\n /**\n * To specify the label for the button shown in multi select\n */\n addButtonLabel: PropTypes.string,\n /**\n * To specify the extra props to be passed to the menu list.\n */\n portalProps: PropTypes.object,\n /**\n * Callback function which will be invoked when the menu is opened.\n */\n onMenuOpen: PropTypes.func,\n /**\n * Callback function which will be invoked when the menu is closed.\n */\n onMenuClose: PropTypes.func,\n /**\n * Callback function which will be invoked when a key is pressed.\n */\n onKeyDown: PropTypes.func,\n /**\n * To specify the styles for the Select component.\n */\n styles: PropTypes.object,\n};\n\nexport default Select;\n"],"names":["Select","_excluded","_objectSpread","SIZES","small","medium","large","STRATEGIES","fixed","Control","_ref","children","props","_objectWithoutProperties","selectProps","hasValue","React","createElement","components","isMulti","className","addButtonLabel","DropdownIndicator","_extends","innerProps","_defineProperty","Down","size","ClearIndicator","Close","MultiValueRemove","CustomInput","Input","maxLength","CustomOption","ref","useRef","dataCy","data","useEffect","isSelected","current","scrollIntoView","Option","innerRef","concat","hyphenize","label","Placeholder","Menu","SingleValue","ValueContainer","name","MenuList","_props$selectProps","fetchMore","totalOptionsCount","isAsyncLoadOptionEnabled","options","_props$selectProps$po","portalProps","hasMore","length","loaderRef","observer","IntersectionObserver","entries","isIntersecting","root","rootMargin","threshold","observe","_observer","unobserve","Spinner","_ref2","_ref3","_otherProps$isMenuOpe","_ref2$size","_ref2$label","_ref2$required","required","_ref2$error","error","_ref2$helpText","helpText","_ref2$className","_ref2$isCreateable","isCreateable","_ref2$strategy","strategy","id","labelProps","value","defaultValue","componentOverrides","_ref2$optionRemapping","optionRemapping","onMenuClose","onMenuOpen","onKeyDown","_ref2$styles","styles","otherProps","_excluded2","inputId","useId","isMenuOpen","defaultMenuIsOpen","Parent","SelectInput","Creatable","loadOptions","AsyncCreatable","Async","getOptionValue","prop","getOptionLabel","menuPortalTarget","document","body","mergeDeepRight","menuPortal","assoc","menuPosition","defaultOptions","getRealOptionValue","option","findInOptions","_currentOptions","isPresent","currentOptions","Array","isArray","isGrouped","_existsBy","flatten","pluck","filter","opt","handleMenuOpen","handleMenuClose","handleKeyDown","e","stopPropagation","classnames","Label","htmlFor","blurInputOnSelect","classNamePrefix","closeMenuOnSelect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAI,kBAAkB,gBAAgB,UAAU,CAAC,UAAU,KAAK,EAAE,GAAG,EAAE;AACvE,EAAE,IAAI,eAAe,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AAC/C,EAAE,oBAAoB,KAAK,CAAC,aAAa,CAACA,QAAM,EAAE,QAAQ,CAAC;AAC3D,IAAI,GAAG,EAAE,GAAG;AACZ,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;AACvB,CAAC,CAAC;;ACxBF,IAAIC,WAAS,GAAG,CAAC,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AAC3H,SAAS,QAAQ,CAAC,IAAI,EAAE;AACxB,EAAE,IAAI,mBAAmB,GAAG,IAAI,CAAC,cAAc;AAC/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7,7 +7,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
7
7
  import React__default, { useRef, useEffect, useState, useMemo, useCallback } from 'react';
8
8
  import classnames from 'classnames';
9
9
  import { isPresent, noop, snakeToCamelCase, camelToSnakeCase, isNotEmpty, modifyBy, dynamicArray } from '@bigbinary/neeto-cist';
10
- import { UpArrow, DownArrow, Left, Right, MenuHorizontal } from '@bigbinary/neeto-icons';
10
+ import { UpArrow, DownArrow, InfoRound, Left, Right, MenuHorizontal } from '@bigbinary/neeto-icons';
11
11
  import { isNil, move, isEmpty, all, includes, __, pipe, filter, pluck, equals, has, without, append, union, props, mergeLeft, assoc } from 'ramda';
12
12
  import ReactDragListView from 'react-drag-listview';
13
13
  import { useTranslation } from 'react-i18next';
@@ -20,8 +20,9 @@ import { u as useQueryParams } from './useQueryParams-b60CHFUx.js';
20
20
  import Button from './Button.js';
21
21
  import Callout from './Callout.js';
22
22
  import Typography from './Typography.js';
23
- import { T as TABLE_SORT_ORDERS, U as URL_SORT_ORDERS, H as HeaderCellMenu, C as COLUMN_FIXED_VALUES, S as SELECT_ALL_ROWS_CALLOUT_MOBILE_HEIGHT, a as SELECT_ALL_ROWS_CALLOUT_DESKTOP_HEIGHT, u as useRestoreScrollPosition } from './useRestoreScrollPosition-DGr_35PJ.js';
23
+ import { T as TABLE_SORT_ORDERS, U as URL_SORT_ORDERS, H as HeaderCellMenu, C as COLUMN_FIXED_VALUES, S as SELECT_ALL_ROWS_CALLOUT_MOBILE_HEIGHT, a as SELECT_ALL_ROWS_CALLOUT_DESKTOP_HEIGHT, u as useRestoreScrollPosition } from './useRestoreScrollPosition-BTy4iNK-.js';
24
24
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
25
+ import Popover from './Popover.js';
25
26
  import { Resizable } from 'react-resizable';
26
27
  import Spinner from './Spinner.js';
27
28
  import 'antd/locale/de_DE';
@@ -44,7 +45,6 @@ import './Tooltip.js';
44
45
  import '@tippyjs/react';
45
46
  import 'tippy.js';
46
47
  import './Dropdown.js';
47
- import './Popover.js';
48
48
  import 'zustand';
49
49
 
50
50
  var useTimeout = function useTimeout(callback, delay) {
@@ -181,6 +181,31 @@ var SortIcon = function SortIcon(_ref) {
181
181
  return null;
182
182
  };
183
183
 
184
+ var _excluded$5 = ["title", "description"];
185
+ var TitleWithInfoIcon = function TitleWithInfoIcon(_ref) {
186
+ var title = _ref.title,
187
+ description = _ref.description,
188
+ rest = _objectWithoutProperties(_ref, _excluded$5);
189
+ var popoverRef = useRef();
190
+ return /*#__PURE__*/React__default.createElement("span", {
191
+ className: "relative pr-5"
192
+ }, typeof title === "function" ? title(rest) : title, description && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
193
+ className: "neeto-ui-table__column-title-info-icon",
194
+ ref: popoverRef
195
+ }, /*#__PURE__*/React__default.createElement(InfoRound, {
196
+ color: "currentColor",
197
+ size: 14
198
+ })), /*#__PURE__*/React__default.createElement(Popover, {
199
+ appendTo: function appendTo() {
200
+ return document.body;
201
+ },
202
+ reference: popoverRef
203
+ }, /*#__PURE__*/React__default.createElement(Typography, {
204
+ lineHeight: "normal",
205
+ style: "body2"
206
+ }, description))));
207
+ };
208
+
184
209
  var _excluded$4 = ["children", "isSortable", "isAddEnabled", "sortedInfo", "onSort", "isHidable", "isDeletable", "isFixedColumn", "isColumnFreezeEnabled", "onColumnHide", "onAddColumn", "onColumnDelete", "onColumnFreeze", "onMoreActionClick", "column", "moreActions"];
185
210
  var CellContent = function CellContent(_ref) {
186
211
  var children = _ref.children,
@@ -206,7 +231,7 @@ var CellContent = function CellContent(_ref) {
206
231
  var isColumnHidable = isHidable && isPresent(onColumnHide);
207
232
  var isColumnDeletable = isDeletable && isPresent(onColumnDelete);
208
233
  var hasMoreActions = !isEmpty(moreActions) && isPresent(onMoreActionClick);
209
- var hasMoreMenu = isSortable || isPresent(column === null || column === void 0 ? void 0 : column.description) || isColumnHidable || isAddEnabled || hasMoreActions || isPresent(column) && isColumnFreezeEnabled;
234
+ var hasMoreMenu = isSortable || isColumnHidable || isAddEnabled || hasMoreActions || isPresent(column) && isColumnFreezeEnabled;
210
235
  return /*#__PURE__*/React__default.createElement("th", _extends({}, headerProps, {
211
236
  title: "",
212
237
  onClick: isSortable ? noop : headerProps.onClick
@@ -214,7 +239,7 @@ var CellContent = function CellContent(_ref) {
214
239
  className: "neeto-ui-flex neeto-ui-items-center neeto-ui-justify-between",
215
240
  "data-cy": "".concat(hyphenize(headerProps.title), "-header-title")
216
241
  }, /*#__PURE__*/React__default.createElement("div", {
217
- className: "neeto-ui-min-w-0 neeto-ui-flex-grow neeto-ui-truncate"
242
+ className: "neeto-ui-min-w-0 neeto-ui-flex-grow neeto-ui-truncate neeto-ui-table__column-title-content"
218
243
  }, children), hasMoreMenu && /*#__PURE__*/React__default.createElement(HeaderCellMenu, {
219
244
  column: column,
220
245
  hasMoreActions: hasMoreActions,
@@ -231,7 +256,6 @@ var CellContent = function CellContent(_ref) {
231
256
  onMoreActionClick: onMoreActionClick,
232
257
  onSort: onSort,
233
258
  sortedInfo: sortedInfo,
234
- columnTitle: headerProps.title,
235
259
  isHidable: isColumnHidable
236
260
  })));
237
261
  };
@@ -441,12 +465,19 @@ var useResizableColumns = function useResizableColumns(_ref) {
441
465
  isHidable: col.isHidable,
442
466
  isDeletable: col.isDeletable,
443
467
  moreActions: col.moreActions,
444
- column: col
468
+ column: col,
469
+ "data-text-align": column.align
445
470
  };
446
471
  },
447
472
  sortIcon: SortIcon,
448
473
  sortOrder: getColumnSortOrder(col, sortedInfo),
449
- fixed: fixed
474
+ fixed: fixed,
475
+ title: col.description ? function (props) {
476
+ return /*#__PURE__*/React__default.createElement(TitleWithInfoIcon, _extends({}, props, {
477
+ description: col.description,
478
+ title: col.title
479
+ }));
480
+ } : col.title
450
481
  });
451
482
  if (!has("ellipsis", col)) modifiedColumn.ellipsis = true;
452
483
  return modifiedColumn;
@@ -727,16 +758,6 @@ var Table = function Table(_ref) {
727
758
  style: "body2"
728
759
  }, "No Data")
729
760
  };
730
- var sortedColumnsWithAlignment = sortedColumns.map(function (sortedColumn) {
731
- return _objectSpread(_objectSpread({}, sortedColumn), {}, {
732
- onHeaderCell: function onHeaderCell(column) {
733
- var _sortedColumn$onHeade;
734
- return _objectSpread(_objectSpread({}, (_sortedColumn$onHeade = sortedColumn.onHeaderCell) === null || _sortedColumn$onHeade === void 0 ? void 0 : _sortedColumn$onHeade.call(sortedColumn, column)), {}, {
735
- "data-text-align": column.align
736
- });
737
- }
738
- });
739
- });
740
761
  var selectedRowKeys = bulkSelectedAllRows ? pluck(rowKey, rowData) : initialSelectedRowKeys;
741
762
  var showBulkSelectionCallout = useMemo(function () {
742
763
  return isIncludedIn(selectedRowKeys, pluck(rowKey, rowData)) && selectedRowKeys.length !== totalCount && !bulkSelectedAllRows;
@@ -899,7 +920,7 @@ var Table = function Table(_ref) {
899
920
  bordered: bordered,
900
921
  locale: locale,
901
922
  rowKey: rowKey,
902
- columns: sortedColumnsWithAlignment,
923
+ columns: sortedColumns,
903
924
  components: componentOverrides,
904
925
  dataSource: rowData,
905
926
  loading: {