@elliemae/ds-form-combobox 3.3.0-next.4 → 3.3.0-next.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.
- package/dist/cjs/config/useComboBox.js +4 -20
- package/dist/cjs/config/useComboBox.js.map +1 -1
- package/dist/cjs/parts/container/Container.js +6 -30
- package/dist/cjs/parts/container/Container.js.map +1 -1
- package/dist/cjs/parts/controls-input/ControlsInput.js +3 -18
- package/dist/cjs/parts/controls-input/ControlsInput.js.map +1 -1
- package/dist/cjs/parts/menu-list/useItemRenderer.js +14 -27
- package/dist/cjs/parts/menu-list/useItemRenderer.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js +3 -19
- package/dist/cjs/react-desc-prop-types.js.map +1 -1
- package/dist/esm/config/useComboBox.js +4 -22
- package/dist/esm/config/useComboBox.js.map +1 -1
- package/dist/esm/parts/container/Container.js +6 -32
- package/dist/esm/parts/container/Container.js.map +1 -1
- package/dist/esm/parts/controls-input/ControlsInput.js +3 -19
- package/dist/esm/parts/controls-input/ControlsInput.js.map +1 -1
- package/dist/esm/parts/menu-list/useItemRenderer.js +14 -29
- package/dist/esm/parts/menu-list/useItemRenderer.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +3 -21
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -50,9 +33,10 @@ var import_react_desc_prop_types = require("../react-desc-prop-types");
|
|
|
50
33
|
var import_useCorrectOptions = require("./useCorrectOptions");
|
|
51
34
|
var import_listHelper = require("../utils/listHelper");
|
|
52
35
|
const useComboBox = (props) => {
|
|
53
|
-
const defaultPropsWithInnerRef =
|
|
36
|
+
const defaultPropsWithInnerRef = {
|
|
37
|
+
...import_ComboBoxCTX.defaultProps,
|
|
54
38
|
innerRef: (0, import_react.useRef)(null)
|
|
55
|
-
}
|
|
39
|
+
};
|
|
56
40
|
const propsWithDefaults = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, defaultPropsWithInnerRef);
|
|
57
41
|
(0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefaults, import_react_desc_prop_types.ComboboxPropTypes);
|
|
58
42
|
const [showPopover, setShowPopover] = (0, import_react.useState)(false);
|
|
@@ -105,7 +89,7 @@ const useComboBox = (props) => {
|
|
|
105
89
|
}
|
|
106
90
|
}, [showPopover]);
|
|
107
91
|
const ctx = (0, import_react.useMemo)(() => ({
|
|
108
|
-
props:
|
|
92
|
+
props: { ...propsWithDefaults, filteredOptions: correctOptions },
|
|
109
93
|
virtualListHelpers,
|
|
110
94
|
menuState,
|
|
111
95
|
referenceElement,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useComboBox.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState, useRef, useCallback, useEffect } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { defaultProps } from '../ComboBoxCTX';\nimport { DSComboboxT, ComboboxPropTypes } from '../react-desc-prop-types';\nimport { DSComboboxInternalsT } from '../sharedTypes';\nimport { useCorrectOptions } from './useCorrectOptions';\nimport { getFirstOption } from '../utils/listHelper';\nexport const useComboBox = (props: DSComboboxT.Props): DSComboboxInternalsT.ComboBoxContextT => {\n const defaultPropsWithInnerRef = {\n ...defaultProps,\n innerRef: useRef(null),\n };\n\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultPropsWithInnerRef);\n useValidateTypescriptPropTypes(propsWithDefaults, ComboboxPropTypes);\n const [showPopover, setShowPopover] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>(null);\n const [showSelectedOptions, setShowSelectedOptions] = useState<boolean>(false);\n\n const [inputValue, setInputValue] = useState<string>('');\n const [hasFocus, setHasFocus] = useState<boolean>(false);\n\n const listRef = useRef<HTMLDivElement>(null);\n const wrapperListRef = useRef<HTMLDivElement>(null);\n\n const selectedOptionsRef = useRef<HTMLDivElement>(null);\n const controlsWrapperRef = useRef<HTMLDivElement>(null);\n const selectAllCheckboxRef = useRef<HTMLInputElement>(null);\n const toggleSelectionButtonRef = useRef<HTMLButtonElement>(null);\n const pillGroupRef = useRef<HTMLDivElement>(null);\n\n const { selectedValues, isMenuOpen, onMenuChange } = propsWithDefaults;\n\n const menuState = useMemo(() => {\n if (isMenuOpen !== undefined) return isMenuOpen;\n return showPopover;\n }, [showPopover, isMenuOpen]);\n\n const setMenuState = useCallback(\n (\n newState: boolean,\n reason: string,\n e: React.KeyboardEvent | React.MouseEvent | React.ChangeEvent<HTMLInputElement>,\n ) => {\n if (onMenuChange !== undefined) onMenuChange(newState, reason, e);\n setShowPopover(newState);\n },\n [onMenuChange],\n );\n // ---------------------------------------------------------------------------\n // Options with creatable option + filtered by selected\n // ---------------------------------------------------------------------------\n\n const correctOptions = useCorrectOptions(propsWithDefaults, inputValue, showSelectedOptions);\n\n // ===========================================================================\n // Virtualization setup\n // ===========================================================================\n\n const virtualListHelpers: ReturnType<typeof useVirtual> = useVirtual({\n size: correctOptions.length,\n parentRef: listRef,\n overscan: 15,\n paddingStart: 0,\n });\n\n // ===========================================================================\n // Scroll into view function\n // ===========================================================================\n const scrollOptionIntoView = useCallback(\n (dsId: string, opts = { align: 'center' }) => {\n virtualListHelpers.scrollToIndex(\n correctOptions.findIndex((opt) => opt.dsId === dsId),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n opts,\n );\n },\n [correctOptions, virtualListHelpers],\n );\n\n // ===========================================================================\n // Init focused option when opening the menu list\n // ===========================================================================\n\n const [focusOptionIdx, setFocusOptionIdx] = useState<string>('');\n\n useEffect(() => {\n // this code calculate the option to be focused when opening the menu\n // when losing focus we remove the focused one\n // when focus adquired again getFirstOption calculate the correct one\n if (!hasFocus) setFocusOptionIdx('');\n if (hasFocus && (!focusOptionIdx || inputValue || showSelectedOptions)) {\n const focusedValue = getFirstOption(correctOptions, selectedValues, inputValue);\n setFocusOptionIdx(focusedValue);\n scrollOptionIntoView(focusedValue, { align: 'center' });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showPopover, hasFocus, correctOptions, selectedValues, inputValue]);\n\n useEffect(() => {\n if (!showPopover) {\n setFocusOptionIdx('');\n setShowSelectedOptions(false);\n }\n }, [showPopover]);\n\n const ctx = useMemo(\n () => ({\n props: { ...propsWithDefaults, filteredOptions: correctOptions },\n virtualListHelpers,\n menuState,\n referenceElement,\n listRef,\n focusOptionIdx,\n selectedOptionsRef,\n controlsWrapperRef,\n selectAllCheckboxRef,\n inputValue,\n setInputValue,\n setMenuState,\n hasFocus,\n toggleSelectionButtonRef,\n pillGroupRef,\n showSelectedOptions,\n wrapperListRef,\n setShowSelectedOptions,\n setHasFocus,\n setFocusOptionIdx,\n scrollOptionIntoView,\n setReferenceElement,\n setShowPopover,\n }),\n [\n scrollOptionIntoView,\n setMenuState,\n correctOptions,\n hasFocus,\n propsWithDefaults,\n virtualListHelpers,\n inputValue,\n focusOptionIdx,\n wrapperListRef,\n showSelectedOptions,\n menuState,\n pillGroupRef,\n referenceElement,\n selectedOptionsRef,\n controlsWrapperRef,\n selectAllCheckboxRef,\n toggleSelectionButtonRef,\n listRef,\n ],\n );\n\n return ctx;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,mBAAkE;AAClE,2BAA2B;AAC3B,0BAA6E;AAC7E,yBAA6B;AAC7B,mCAA+C;AAE/C,+BAAkC;AAClC,wBAA+B;AACxB,MAAM,cAAc,CAAC,UAAoE;AAC9F,QAAM,2BAA2B;AAAA,IAC/B,GAAG;AAAA,IACH,UAAU,yBAAO,IAAI;AAAA,EACvB;AAEA,QAAM,oBAAoB,sDAA6B,OAAO,wBAAwB;AACtF,0DAA+B,mBAAmB,8CAAiB;AACnE,QAAM,CAAC,aAAa,kBAAkB,2BAAkB,KAAK;AAC7D,QAAM,CAAC,kBAAkB,uBAAuB,2BAA6B,IAAI;AACjF,QAAM,CAAC,qBAAqB,0BA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AU;AAC9E,wBAAkB,YAAY;AAC9B,2BAAqB,cAAc,EAAE,OAAO,SAAS,CAAC;AAAA,IACxD;AAAA,EAEF,GAAG,CAAC,aAAa,UAAU,gBAAgB,gBAAgB,UAAU,CAAC;AAEtE,8BAAU,MAAM;AACd,QAAI,CAAC,aAAa;AAChB,wBAAkB,EAAE;AACpB,6BAAuB,KAAK;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,MAAM,0BACV,MAAO;AAAA,IACL,OAAO,EAAE,GAAG,mBAAmB,iBAAiB,eAAe;AAAA,IAC/D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,34 +3,8 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __objRest = (source, exclude) => {
|
|
23
|
-
var target = {};
|
|
24
|
-
for (var prop in source)
|
|
25
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
-
target[prop] = source[prop];
|
|
27
|
-
if (source != null && __getOwnPropSymbols)
|
|
28
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
-
target[prop] = source[prop];
|
|
31
|
-
}
|
|
32
|
-
return target;
|
|
33
|
-
};
|
|
34
8
|
var __export = (target, all) => {
|
|
35
9
|
for (var name in all)
|
|
36
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -64,7 +38,7 @@ const Container = () => {
|
|
|
64
38
|
const { inline, innerRef, startPlacementPreference, placementOrderPreference, withoutPortal, zIndex } = props;
|
|
65
39
|
const globalAttributes = (0, import_ds_utilities.useGetGlobalAttributes)(props);
|
|
66
40
|
const xStyledProps = (0, import_ds_utilities.useGetXstyledProps)(props);
|
|
67
|
-
const
|
|
41
|
+
const { placeholder, onKeyDown, onChange, disabled, tabIndex, ...containerGlobals } = globalAttributes;
|
|
68
42
|
const handleMouseDown = (0, import_react.useCallback)((e) => {
|
|
69
43
|
e.preventDefault();
|
|
70
44
|
}, []);
|
|
@@ -82,10 +56,12 @@ const Container = () => {
|
|
|
82
56
|
window.removeEventListener("blur", closeMenuOnWindowBlur);
|
|
83
57
|
};
|
|
84
58
|
}, [setMenuState]);
|
|
85
|
-
return (0, import_react.useMemo)(() => /* @__PURE__ */ import_react.default.createElement(import_styled.StyledContainer,
|
|
59
|
+
return (0, import_react.useMemo)(() => /* @__PURE__ */ import_react.default.createElement(import_styled.StyledContainer, {
|
|
86
60
|
"data-testid": import_ComboboxDataTestids.ComboboxDataTestid.CONTAINER,
|
|
87
|
-
ref: setReferenceElement
|
|
88
|
-
|
|
61
|
+
ref: setReferenceElement,
|
|
62
|
+
...containerGlobals,
|
|
63
|
+
...xStyledProps
|
|
64
|
+
}, inline ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_controls.Controls, null), /* @__PURE__ */ import_react.default.createElement(import_menu_list.MenuList, null)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_controls.Controls, null), /* @__PURE__ */ import_react.default.createElement(import_ds_popperjs.DSPopperJS, {
|
|
89
65
|
customOffset: [0, 5],
|
|
90
66
|
referenceElement,
|
|
91
67
|
showPopover: menuState,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/container/Container.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\nimport React, { useCallback, useEffect, useMemo, useContext } from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledContainer, StyledPopperWrapper } from './styled';\nimport { Controls } from '../controls';\nimport { MenuList } from '../menu-list';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\n\nexport const Container = (): JSX.Element => {\n const { props, setMenuState, menuState, setReferenceElement, referenceElement } = useContext(ComboBoxContext);\n\n const { inline, innerRef, startPlacementPreference, placementOrderPreference, withoutPortal, zIndex } = props;\n const globalAttributes = useGetGlobalAttributes(props);\n const xStyledProps = useGetXstyledProps(props);\n // Removing possible collisionable props\n const { placeholder, onKeyDown, onChange, disabled, tabIndex, ...containerGlobals } = globalAttributes;\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setMenuState(false, 'blur');\n if (innerRef?.current) innerRef.current.blur();\n }, [innerRef, setMenuState]);\n\n useEffect(() => {\n const closeMenuOnWindowBlur = () => {\n setMenuState(false, 'blur');\n };\n\n window.addEventListener('blur', closeMenuOnWindowBlur);\n\n return () => {\n window.removeEventListener('blur', closeMenuOnWindowBlur);\n };\n }, [setMenuState]);\n\n return useMemo(\n () => (\n <StyledContainer\n data-testid={ComboboxDataTestid.CONTAINER}\n ref={setReferenceElement}\n {...containerGlobals}\n {...xStyledProps}\n >\n {inline ? (\n <>\n <Controls />\n <MenuList />\n </>\n ) : (\n <>\n <Controls />\n <DSPopperJS\n customOffset={[0, 5]}\n referenceElement={referenceElement}\n showPopover={menuState}\n closeContextMenu={handleCloseMenu}\n startPlacementPreference={startPlacementPreference}\n placementOrderPreference={placementOrderPreference}\n withoutPortal={withoutPortal}\n withoutArrow\n withoutAnimation\n zIndex={zIndex}\n >\n <StyledPopperWrapper tabIndex={-1} onMouseDown={handleMouseDown}>\n <MenuList />\n </StyledPopperWrapper>\n </DSPopperJS>\n </>\n )}\n </StyledContainer>\n ),\n [\n inline,\n setReferenceElement,\n containerGlobals,\n referenceElement,\n menuState,\n xStyledProps,\n handleCloseMenu,\n startPlacementPreference,\n placementOrderPreference,\n withoutPortal,\n zIndex,\n handleMouseDown,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;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AA,IACZ,kBAAgB;AAAA,IAChB;AAAA,KAEA,mDAAC;AAAA,IAAoB,UAAU;AAAA,IAAI,aAAa;AAAA,KAC9C,mDAAC,+BAAS,CACZ,CACF,CACF,CAEJ,GAEF;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,22 +3,8 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __objRest = (source, exclude) => {
|
|
11
|
-
var target = {};
|
|
12
|
-
for (var prop in source)
|
|
13
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
14
|
-
target[prop] = source[prop];
|
|
15
|
-
if (source != null && __getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
17
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
18
|
-
target[prop] = source[prop];
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
8
|
var __export = (target, all) => {
|
|
23
9
|
for (var name in all)
|
|
24
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -48,13 +34,12 @@ var import_useKeyboardNavigation = require("./useKeyboardNavigation");
|
|
|
48
34
|
var import_useControlsInput = require("./useControlsInput");
|
|
49
35
|
var import_ComboBoxCTX = require("../../ComboBoxCTX");
|
|
50
36
|
const ControlsInput = () => {
|
|
51
|
-
const
|
|
52
|
-
props:
|
|
53
|
-
} = _a, _c = _b, { autoFocus, placeholder, disabled, innerRef, onlySelectable } = _c, restProps = __objRest(_c, ["autoFocus", "placeholder", "disabled", "innerRef", "onlySelectable"]), {
|
|
37
|
+
const {
|
|
38
|
+
props: { autoFocus, placeholder, disabled, innerRef, onlySelectable, ...restProps },
|
|
54
39
|
focusOptionIdx,
|
|
55
40
|
inputValue,
|
|
56
41
|
menuState
|
|
57
|
-
} =
|
|
42
|
+
} = (0, import_react.useContext)(import_ComboBoxCTX.ComboBoxContext);
|
|
58
43
|
const { onInputKeyDown } = (0, import_useKeyboardNavigation.useKeyboardNavigation)();
|
|
59
44
|
const { spanReference, width, spanReferenceText, showPlaceholder, handleOnBlur, handleOnChange, handleOnFocus } = (0, import_useControlsInput.useControlsInput)();
|
|
60
45
|
const { tabIndex } = (0, import_ds_utilities.useGetGlobalAttributes)(restProps);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/controls-input/ControlsInput.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useContext } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { useGetGlobalAttributes } from '@elliemae/ds-utilities';\n\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport { StyledInput, StyledInputWrapper, StyledInputPlaceHolder, StyledInputWidthReference } from './styled';\nimport { useKeyboardNavigation } from './useKeyboardNavigation';\nimport { useControlsInput } from './useControlsInput';\nimport { ComboBoxContext } from '../../ComboBoxCTX';\n\nexport const ControlsInput = (): JSX.Element => {\n const {\n props: { autoFocus, placeholder, disabled, innerRef, onlySelectable, ...restProps },\n focusOptionIdx,\n inputValue,\n menuState,\n } = useContext(ComboBoxContext);\n const { onInputKeyDown } = useKeyboardNavigation();\n const { spanReference, width, spanReferenceText, showPlaceholder, handleOnBlur, handleOnChange, handleOnFocus } =\n useControlsInput();\n\n const { tabIndex } = useGetGlobalAttributes(restProps);\n\n return (\n <StyledInputWrapper>\n <StyledInputWidthReference ref={spanReference}>{spanReferenceText}</StyledInputWidthReference>\n {showPlaceholder && (\n <StyledInputPlaceHolder>\n <SimpleTruncatedTooltipText value={showPlaceholder}></SimpleTruncatedTooltipText>\n </StyledInputPlaceHolder>\n )}\n\n <StyledInput\n data-testid={ComboboxDataTestid.INPUT}\n autoFocus={autoFocus}\n placeholder={placeholder}\n aria-controls=\"combo-listbox\"\n aria-activedescendant={focusOptionIdx}\n aria-expanded={menuState}\n aria-haspopup=\"listbox\"\n aria-describedby=\"combobox-selected-items\"\n role=\"combobox\"\n disabled={disabled}\n style={{ width }}\n ref={innerRef}\n value={inputValue}\n type=\"text\"\n onKeyDown={onInputKeyDown}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n tabIndex={tabIndex}\n withoutCaret={onlySelectable}\n />\n </StyledInputWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAClC,uCAA2C;AAC3C,0BAAuC;AAEvC,iCAAmC;AACnC,oBAAmG;AACnG,mCAAsC;AACtC,8BAAiC;AACjC,yBAAgC;AAEzB,MAAM,gBAAgB,MAAmB;AAC9C,QAAM;AAAA,IACJ,OAAO,EAAE,WAAW,aAAa,UAAU,UAAU,mBAAmB;AAAA,IACxE;AAAA,IACA;AAAA,IACA;AAAA,MACE,6BAAW,kCAAe;AAC9B,QAAM,EAAE,mBAAmB,wDAAsB;AACjD,QAAM,EAAE,eAAe,OAAO,mBAAmB,iBAAiB,cAAc,gBAAgB,kBAC9F,8CAAiB;AAEnB,QAAM,EAAE,aAAa,gDAAuB,SAAS;AAErD,SACE,mDAAC,wCACC,mDAAC;AAAA,IAA0B,KAAK;AAAA,KAAgB,iBAAkB,GACjE,mBACC,mDAAC,4CACC,mDAAC;AAAA,IAA2B,OAAO;AAAA,GAAiB,CACtD,GAGF,mDAAC;AAAA,IACC,eAAa,8CAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA,iBAAc;AAAA,IACd,yBAAuB;AAAA,IACvB,iBAAe;AAAA,IACf,iBAAc;AAAA,IACd,oBAAiB;AAAA,IACjB,MAAK;AAAA,IACL;AAAA,IACA,OAAO,EAAE,MAAM;AAAA,IACf,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAK;AAAA,IACL,WAAW;AAAA,IACX,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,SAAS;AAAA,IACT;AAAA,IACA,cAAc;AAAA,GAChB,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -106,15 +89,19 @@ const useItemRenderer = () => {
|
|
|
106
89
|
innerRef: vItem.measureRef
|
|
107
90
|
};
|
|
108
91
|
if (option.type === import_constants.MENU_OPTION_TYPES.SECTION) {
|
|
109
|
-
return /* @__PURE__ */ import_react.default.createElement(import_ds_common.Section,
|
|
110
|
-
label: option.label
|
|
111
|
-
|
|
92
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ds_common.Section, {
|
|
93
|
+
label: option.label,
|
|
94
|
+
...generalProps
|
|
95
|
+
});
|
|
112
96
|
}
|
|
113
97
|
if (option.type === import_constants.MENU_OPTION_TYPES.SEPARATOR) {
|
|
114
|
-
return /* @__PURE__ */ import_react.default.createElement(import_ds_common.Separator,
|
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ds_common.Separator, {
|
|
99
|
+
...generalProps
|
|
100
|
+
});
|
|
115
101
|
}
|
|
116
102
|
if (option.type === import_constants.MENU_OPTION_TYPES.OPTION) {
|
|
117
|
-
return /* @__PURE__ */ import_react.default.createElement(CBItem,
|
|
103
|
+
return /* @__PURE__ */ import_react.default.createElement(CBItem, {
|
|
104
|
+
...generalProps,
|
|
118
105
|
value: option.value,
|
|
119
106
|
label: option.label,
|
|
120
107
|
dataTestid: import_ComboboxDataTestids.ComboboxDataTestid.OPTION,
|
|
@@ -126,13 +113,13 @@ const useItemRenderer = () => {
|
|
|
126
113
|
isActive: dsId === focusOptionIdx,
|
|
127
114
|
isSelected: (0, import_listHelper.isSelected)(selectedValues, option),
|
|
128
115
|
tabIndex: -1
|
|
129
|
-
})
|
|
116
|
+
});
|
|
130
117
|
}
|
|
131
118
|
if (type === import_constants.INTERNAL_MENU_OPTION_TYPES.CREATABLE) {
|
|
132
|
-
return /* @__PURE__ */ import_react.default.createElement(import_ds_common.SingleMenuItem,
|
|
119
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ds_common.SingleMenuItem, {
|
|
133
120
|
dataTestid: import_ComboboxDataTestids.ComboboxDataTestid.OPTION,
|
|
134
|
-
isActive: dsId === focusOptionIdx
|
|
135
|
-
|
|
121
|
+
isActive: dsId === focusOptionIdx,
|
|
122
|
+
...generalProps,
|
|
136
123
|
render: ({ label: labelCreatable }) => /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
|
|
137
124
|
p: "8px",
|
|
138
125
|
cols: ["min-content", "auto"],
|
|
@@ -141,7 +128,7 @@ const useItemRenderer = () => {
|
|
|
141
128
|
}, /* @__PURE__ */ import_react.default.createElement(import_styled.StyledCreatableLabel, null, "Add:"), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledCreatableValue, null, `"${labelCreatable}"`)),
|
|
142
129
|
label: option.label,
|
|
143
130
|
onClick: handleOnCreateClick
|
|
144
|
-
})
|
|
131
|
+
});
|
|
145
132
|
}
|
|
146
133
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
147
134
|
});
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/menu-list/useItemRenderer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { SingleMenuItem, MultiMenuItem, Section, Separator } from '@elliemae/ds-common';\nimport { ComboBoxContext } from '../../ComboBoxCTX';\nimport { StyledCreatableLabel, StyledCreatableValue } from './styled';\nimport { isSelected, getSuggestedValueOnChange } from '../../utils/listHelper';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport { DSComboboxT } from '../../react-desc-prop-types';\nimport { MENU_OPTION_TYPES, INTERNAL_MENU_OPTION_TYPES } from '../../constants';\nexport const useItemRenderer = (): Array<JSX.Element> | null => {\n const {\n props: { filteredOptions, onCreate, onChange, isNonClearable, selectedValues, onFilter, allOptions },\n setMenuState,\n inputValue,\n focusOptionIdx,\n setInputValue,\n virtualListHelpers,\n } = useContext(ComboBoxContext);\n\n const multiple = Array.isArray(selectedValues);\n const CBItem = multiple ? MultiMenuItem : SingleMenuItem;\n\n const handleOnCreateClick = useCallback(() => {\n if (inputValue && onCreate) {\n onCreate(inputValue);\n setInputValue('');\n if (onFilter) onFilter(allOptions, inputValue);\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);\n const handleClick = useCallback(\n (option: DSComboboxT.ItemOption, e: React.MouseEvent) => {\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n if (!option.disabled) {\n if (onFilter) onFilter(allOptions, inputValue);\n setInputValue('');\n if (!multiple) {\n setMenuState(false, 'selectOption', e);\n }\n onChange(getSuggestedValueOnChange(option, selectedValues, isNonClearable), option, e);\n }\n }\n // prevent for loosing focus on input control\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, selectedValues, allOptions, onChange, setMenuState, multiple],\n );\n\n // prevent blur from controls input\n const handleOnMouseDown = useCallback((e: React.MouseEvent<HTMLLIElement>) => {\n e.preventDefault();\n }, []);\n\n return useMemo(() => {\n if (!virtualListHelpers) {\n return null;\n }\n return virtualListHelpers.virtualItems.map((vItem) => {\n const option = filteredOptions[vItem.index];\n const { dsId, type, disabled } = option;\n const generalProps = {\n wrapperStyles: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${vItem.start}px)`,\n },\n\n key: `${dsId}`,\n innerRef: vItem.measureRef,\n };\n if (option.type === MENU_OPTION_TYPES.SECTION) {\n return <Section label={option.label} {...generalProps} />;\n }\n if (option.type === MENU_OPTION_TYPES.SEPARATOR) {\n return <Separator {...generalProps} />;\n }\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={disabled}\n onClick={(e: React.MouseEvent) => {\n handleClick(option, e);\n }}\n onMouseDown={handleOnMouseDown}\n isActive={dsId === focusOptionIdx}\n isSelected={isSelected(selectedValues, option)}\n tabIndex={-1}\n />\n );\n }\n if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {\n return (\n <SingleMenuItem\n dataTestid={ComboboxDataTestid.OPTION}\n isActive={dsId === focusOptionIdx}\n {...generalProps}\n render={({ label: labelCreatable }: { label: string }) => (\n <Grid p=\"8px\" cols={['min-content', 'auto']} gutter=\"xxs\" alignItems=\"center\">\n <StyledCreatableLabel>Add:</StyledCreatableLabel>\n <StyledCreatableValue>{`\"${labelCreatable}\"`}</StyledCreatableValue>\n </Grid>\n )}\n label={option.label}\n onClick={handleOnCreateClick}\n />\n );\n }\n return <></>;\n });\n }, [filteredOptions, focusOptionIdx, selectedValues, virtualListHelpers]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAwD;AACxD,qBAAqB;AACrB,uBAAkE;AAClE,yBAAgC;AAChC,oBAA2D;AAC3D,wBAAsD;AACtD,iCAAmC;AAEnC,uBAA8D;AACvD,MAAM,kBAAkB,MAAiC;AAC9D,QAAM;AAAA,IACJ,OAAO,EAAE,iBAAiB,UAAU,UAAU,gBAAgB,gBAAgB,UAAU;AAAA,IACxF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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__defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -46,7 +29,8 @@ var React = __toESM(require("react"));
|
|
|
46
29
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
47
30
|
function noop(..._args) {
|
|
48
31
|
}
|
|
49
|
-
const ComboboxPropTypes =
|
|
32
|
+
const ComboboxPropTypes = {
|
|
33
|
+
...import_ds_utilities.globalAttributesPropTypes,
|
|
50
34
|
placeholder: import_ds_utilities.PropTypes.string.description("input's placeholder value").defaultValue(""),
|
|
51
35
|
allOptions: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.array, import_ds_utilities.PropTypes.object]).isRequired.description("List of original options").defaultValue([]),
|
|
52
36
|
filteredOptions: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.array, import_ds_utilities.PropTypes.object]).description("List of filtered options to show in the menu based on the current internal input filter value").defaultValue([]),
|
|
@@ -67,5 +51,5 @@ const ComboboxPropTypes = __spreadProps(__spreadValues({}, import_ds_utilities.g
|
|
|
67
51
|
zIndex: import_ds_utilities.PropTypes.number.description("The z-index of the combobox menu").defaultValue(10),
|
|
68
52
|
innerRef: import_ds_utilities.PropTypes.object.description("ref to the components container"),
|
|
69
53
|
onlySelectable: import_ds_utilities.PropTypes.bool.description("filtering is disabled")
|
|
70
|
-
}
|
|
54
|
+
};
|
|
71
55
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\nimport React from 'react';\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-utilities';\nimport { DSMaskT } from '@elliemae/ds-form-helpers-mask-hooks';\nexport function noop<T extends unknown[]>(..._args: T): void {}\n\nexport declare namespace DSComboboxT {\n export interface CommonItemOptions {\n dsId: string;\n disabled?: boolean;\n render?: React.ComponentType<unknown>;\n }\n export interface ItemSeparatorOptions extends CommonItemOptions {\n type: 'separator';\n }\n\n export interface ItemSectionOptions extends CommonItemOptions {\n type: 'section';\n label: string;\n }\n\n export interface ItemOption extends CommonItemOptions {\n value: string;\n label: string;\n type: 'option';\n }\n\n export interface ItemCreatableOption extends CommonItemOptions {\n label: string;\n type: 'creatable';\n }\n\n export type OptionTypes = ItemOption | ItemSectionOptions | ItemSeparatorOptions | ItemCreatableOption;\n\n export type SelectedOptionsT = ItemOption[] | ItemOption | null;\n export interface PropsOptional {\n inputMinWidth?: number;\n menuMinWidth?: number;\n menuMaxHeight?: number;\n placeholder?: string;\n autoFocus?: boolean;\n filteredOptions: OptionTypes[];\n isMenuOpen?: boolean;\n onMenuChange?: (\n state: boolean,\n reason: string,\n e: React.KeyboardEvent | React.MouseEvent | React.ChangeEvent<HTMLInputElement>,\n ) => void;\n onCreate?: (label: string) => void;\n onFilter?: (newOptions: OptionTypes[], inputValue?: string) => void;\n onCancel?: () => void;\n onSelectAll?: (suggestedValue: OptionTypes[] | [], event: React.MouseEvent | React.KeyboardEvent) => null;\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>, value: ItemOption) => void;\n zIndex?: number;\n }\n\n export interface RequiredProps {\n allOptions: OptionTypes[];\n selectedValues: SelectedOptionsT;\n onChange: (\n suggestedValue: ItemOption | OptionTypes[] | null,\n selectedOption: ItemOption,\n event: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n }\n export interface DefaultProps {\n startPlacementPreference: string;\n placementOrderPreference: string[];\n hasError: boolean;\n inline: boolean;\n withoutPortal: boolean;\n isNonClearable: boolean;\n disabled: boolean;\n noOptionsMessage: string;\n innerRef: React.RefObject<HTMLInputElement>;\n useMask: DSMaskT.Hook | typeof noop;\n onlySelectable: boolean;\n }\n\n export interface Props extends Partial<DefaultProps>, RequiredProps, PropsOptional {}\n\n export interface InternalProps extends DefaultProps, RequiredProps, PropsOptional {}\n}\n\nexport const ComboboxPropTypes = {\n ...globalAttributesPropTypes,\n placeholder: PropTypes.string.description(\"input's placeholder value\").defaultValue(''),\n allOptions: PropTypes.oneOfType([PropTypes.array, PropTypes.object])\n .isRequired.description('List of original options')\n .defaultValue([]),\n filteredOptions: PropTypes.oneOfType([PropTypes.array, PropTypes.object])\n .description('List of filtered options to show in the menu based on the current internal input filter value')\n .defaultValue([]),\n selectedValues: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]).isRequired.description(\n 'Array of option or single option selected',\n ),\n disabled: PropTypes.bool.description('wheter or not the input is disabled').defaultValue('false'),\n autoFocus: PropTypes.bool.description('Whether the combo box uses auto focus or not').defaultValue('false'),\n hasError: PropTypes.bool.description('Whether the combo box has error or not').defaultValue('false'),\n noOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering')\n .defaultValue('No Matches Found'),\n onChange: PropTypes.func.isRequired\n .description('function triggered when an option is selected it will send the options selected')\n .defaultValue('() => {}'),\n onFilter: PropTypes.func.description('function triggered when user type in the combobox input').defaultValue(''),\n onCreate: PropTypes.func\n .description(\n 'function triggered when user select \"create\" a new item whenever is not a match in the all option list',\n )\n .defaultValue(''),\n onCancel: PropTypes.func.description('function triggered when user press ESC key').defaultValue('() => {}'),\n onMenuChange: PropTypes.func\n .description('function triggered when user open or close the menu list')\n .defaultValue('() => {}'),\n inputMinWidth: PropTypes.any.description('Minimum width for the combo box input controller').defaultValue(undefined),\n menuMinWidth: PropTypes.any.description('Minimum width for the dropdown menu').defaultValue(undefined),\n menuMaxHeight: PropTypes.any.description('Maximum height for the dropdown menu').defaultValue(undefined),\n withoutPortal: PropTypes.bool\n .description('Whether the combobox menu is rendered in a portal or not')\n .defaultValue(false),\n zIndex: PropTypes.number.description('The z-index of the combobox menu').defaultValue(10),\n innerRef: PropTypes.object.description('ref to the components container'),\n onlySelectable: PropTypes.bool.description('filtering is disabled'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAAqD;AAE9C,iBAAsC,OAAgB;AAAC;AAgFvD,MAAM,oBAAoB;AAAA,EAC/B,GAAG;AAAA,EACH,aAAa,8BAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,EAAE;AAAA,EACtF,YAAY,8BAAU,UAAU,CAAC,8BAAU,OAAO,8BAAU,MAAM,CAAC,EAChE,WAAW,YAAY,0BAA0B,EACjD,aAAa,CAAC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,uBAAuB;AACpE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import { useMemo, useState, useRef, useCallback, useEffect } from "react";
|
|
23
4
|
import { useVirtual } from "react-virtual";
|
|
@@ -27,9 +8,10 @@ import { ComboboxPropTypes } from "../react-desc-prop-types";
|
|
|
27
8
|
import { useCorrectOptions } from "./useCorrectOptions";
|
|
28
9
|
import { getFirstOption } from "../utils/listHelper";
|
|
29
10
|
const useComboBox = (props) => {
|
|
30
|
-
const defaultPropsWithInnerRef =
|
|
11
|
+
const defaultPropsWithInnerRef = {
|
|
12
|
+
...defaultProps,
|
|
31
13
|
innerRef: useRef(null)
|
|
32
|
-
}
|
|
14
|
+
};
|
|
33
15
|
const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultPropsWithInnerRef);
|
|
34
16
|
useValidateTypescriptPropTypes(propsWithDefaults, ComboboxPropTypes);
|
|
35
17
|
const [showPopover, setShowPopover] = useState(false);
|
|
@@ -82,7 +64,7 @@ const useComboBox = (props) => {
|
|
|
82
64
|
}
|
|
83
65
|
}, [showPopover]);
|
|
84
66
|
const ctx = useMemo(() => ({
|
|
85
|
-
props:
|
|
67
|
+
props: { ...propsWithDefaults, filteredOptions: correctOptions },
|
|
86
68
|
virtualListHelpers,
|
|
87
69
|
menuState,
|
|
88
70
|
referenceElement,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useComboBox.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState, useRef, useCallback, useEffect } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { defaultProps } from '../ComboBoxCTX';\nimport { DSComboboxT, ComboboxPropTypes } from '../react-desc-prop-types';\nimport { DSComboboxInternalsT } from '../sharedTypes';\nimport { useCorrectOptions } from './useCorrectOptions';\nimport { getFirstOption } from '../utils/listHelper';\nexport const useComboBox = (props: DSComboboxT.Props): DSComboboxInternalsT.ComboBoxContextT => {\n const defaultPropsWithInnerRef = {\n ...defaultProps,\n innerRef: useRef(null),\n };\n\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultPropsWithInnerRef);\n useValidateTypescriptPropTypes(propsWithDefaults, ComboboxPropTypes);\n const [showPopover, setShowPopover] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>(null);\n const [showSelectedOptions, setShowSelectedOptions] = useState<boolean>(false);\n\n const [inputValue, setInputValue] = useState<string>('');\n const [hasFocus, setHasFocus] = useState<boolean>(false);\n\n const listRef = useRef<HTMLDivElement>(null);\n const wrapperListRef = useRef<HTMLDivElement>(null);\n\n const selectedOptionsRef = useRef<HTMLDivElement>(null);\n const controlsWrapperRef = useRef<HTMLDivElement>(null);\n const selectAllCheckboxRef = useRef<HTMLInputElement>(null);\n const toggleSelectionButtonRef = useRef<HTMLButtonElement>(null);\n const pillGroupRef = useRef<HTMLDivElement>(null);\n\n const { selectedValues, isMenuOpen, onMenuChange } = propsWithDefaults;\n\n const menuState = useMemo(() => {\n if (isMenuOpen !== undefined) return isMenuOpen;\n return showPopover;\n }, [showPopover, isMenuOpen]);\n\n const setMenuState = useCallback(\n (\n newState: boolean,\n reason: string,\n e: React.KeyboardEvent | React.MouseEvent | React.ChangeEvent<HTMLInputElement>,\n ) => {\n if (onMenuChange !== undefined) onMenuChange(newState, reason, e);\n setShowPopover(newState);\n },\n [onMenuChange],\n );\n // ---------------------------------------------------------------------------\n // Options with creatable option + filtered by selected\n // ---------------------------------------------------------------------------\n\n const correctOptions = useCorrectOptions(propsWithDefaults, inputValue, showSelectedOptions);\n\n // ===========================================================================\n // Virtualization setup\n // ===========================================================================\n\n const virtualListHelpers: ReturnType<typeof useVirtual> = useVirtual({\n size: correctOptions.length,\n parentRef: listRef,\n overscan: 15,\n paddingStart: 0,\n });\n\n // ===========================================================================\n // Scroll into view function\n // ===========================================================================\n const scrollOptionIntoView = useCallback(\n (dsId: string, opts = { align: 'center' }) => {\n virtualListHelpers.scrollToIndex(\n correctOptions.findIndex((opt) => opt.dsId === dsId),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n opts,\n );\n },\n [correctOptions, virtualListHelpers],\n );\n\n // ===========================================================================\n // Init focused option when opening the menu list\n // ===========================================================================\n\n const [focusOptionIdx, setFocusOptionIdx] = useState<string>('');\n\n useEffect(() => {\n // this code calculate the option to be focused when opening the menu\n // when losing focus we remove the focused one\n // when focus adquired again getFirstOption calculate the correct one\n if (!hasFocus) setFocusOptionIdx('');\n if (hasFocus && (!focusOptionIdx || inputValue || showSelectedOptions)) {\n const focusedValue = getFirstOption(correctOptions, selectedValues, inputValue);\n setFocusOptionIdx(focusedValue);\n scrollOptionIntoView(focusedValue, { align: 'center' });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showPopover, hasFocus, correctOptions, selectedValues, inputValue]);\n\n useEffect(() => {\n if (!showPopover) {\n setFocusOptionIdx('');\n setShowSelectedOptions(false);\n }\n }, [showPopover]);\n\n const ctx = useMemo(\n () => ({\n props: { ...propsWithDefaults, filteredOptions: correctOptions },\n virtualListHelpers,\n menuState,\n referenceElement,\n listRef,\n focusOptionIdx,\n selectedOptionsRef,\n controlsWrapperRef,\n selectAllCheckboxRef,\n inputValue,\n setInputValue,\n setMenuState,\n hasFocus,\n toggleSelectionButtonRef,\n pillGroupRef,\n showSelectedOptions,\n wrapperListRef,\n setShowSelectedOptions,\n setHasFocus,\n setFocusOptionIdx,\n scrollOptionIntoView,\n setReferenceElement,\n setShowPopover,\n }),\n [\n scrollOptionIntoView,\n setMenuState,\n correctOptions,\n hasFocus,\n propsWithDefaults,\n virtualListHelpers,\n inputValue,\n focusOptionIdx,\n wrapperListRef,\n showSelectedOptions,\n menuState,\n pillGroupRef,\n referenceElement,\n selectedOptionsRef,\n controlsWrapperRef,\n selectAllCheckboxRef,\n toggleSelectionButtonRef,\n listRef,\n ],\n );\n\n return ctx;\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACO,MAAM,cAAc,CAAC,UAAoE;AAC9F,QAAM,2BAA2B;AAAA,IAC/B,GAAG;AAAA,IACH,UAAU,OAAO,IAAI;AAAA,EACvB;AAEA,QAAM,oBAAoB,6BAA6B,OAAO,wBAAwB;AACtF,iCAA+B,mBAAmB,iBAAiB;AACnE,QAAM,CAAC,aAAa,kBAAkB,SAAkB,KAAK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B,cAAc,sBAAsB;AACtE,YAAM,eAAe,eAAe,gBAAgB,gBAAgB,UAAU;AAC9E,wBAAkB,YAAY;AAC9B,2BAAqB,cAAc,EAAE,OAAO,SAAS,CAAC;AAAA,IACxD;AAAA,EAEF,GAAG,CAAC,aAAa,UAAU,gBAAgB,gBAAgB,UAAU,CAAC;AAEtE,YAAU,MAAM;AACd,QAAI,CAAC,aAAa;AAChB,wBAAkB,EAAE;AACpB,6BAAuB,KAAK;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,MAAM,QACV,MAAO;AAAA,IACL,OAAO,EAAE,GAAG,mBAAmB,iBAAiB,eAAe;AAAA,IAC/D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,32 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
|
-
var __objRest = (source, exclude) => {
|
|
19
|
-
var target = {};
|
|
20
|
-
for (var prop in source)
|
|
21
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
22
|
-
target[prop] = source[prop];
|
|
23
|
-
if (source != null && __getOwnPropSymbols)
|
|
24
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
25
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
26
|
-
target[prop] = source[prop];
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
};
|
|
30
2
|
import * as React from "react";
|
|
31
3
|
import React2, { useCallback, useEffect, useMemo, useContext } from "react";
|
|
32
4
|
import { useGetGlobalAttributes, useGetXstyledProps } from "@elliemae/ds-utilities";
|
|
@@ -41,7 +13,7 @@ const Container = () => {
|
|
|
41
13
|
const { inline, innerRef, startPlacementPreference, placementOrderPreference, withoutPortal, zIndex } = props;
|
|
42
14
|
const globalAttributes = useGetGlobalAttributes(props);
|
|
43
15
|
const xStyledProps = useGetXstyledProps(props);
|
|
44
|
-
const
|
|
16
|
+
const { placeholder, onKeyDown, onChange, disabled, tabIndex, ...containerGlobals } = globalAttributes;
|
|
45
17
|
const handleMouseDown = useCallback((e) => {
|
|
46
18
|
e.preventDefault();
|
|
47
19
|
}, []);
|
|
@@ -59,10 +31,12 @@ const Container = () => {
|
|
|
59
31
|
window.removeEventListener("blur", closeMenuOnWindowBlur);
|
|
60
32
|
};
|
|
61
33
|
}, [setMenuState]);
|
|
62
|
-
return useMemo(() => /* @__PURE__ */ React2.createElement(StyledContainer,
|
|
34
|
+
return useMemo(() => /* @__PURE__ */ React2.createElement(StyledContainer, {
|
|
63
35
|
"data-testid": ComboboxDataTestid.CONTAINER,
|
|
64
|
-
ref: setReferenceElement
|
|
65
|
-
|
|
36
|
+
ref: setReferenceElement,
|
|
37
|
+
...containerGlobals,
|
|
38
|
+
...xStyledProps
|
|
39
|
+
}, inline ? /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Controls, null), /* @__PURE__ */ React2.createElement(MenuList, null)) : /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Controls, null), /* @__PURE__ */ React2.createElement(DSPopperJS, {
|
|
66
40
|
customOffset: [0, 5],
|
|
67
41
|
referenceElement,
|
|
68
42
|
showPopover: menuState,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/container/Container.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useCallback, useEffect, useMemo, useContext } from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport ComboBoxContext from '../../ComboBoxCTX';\nimport { StyledContainer, StyledPopperWrapper } from './styled';\nimport { Controls } from '../controls';\nimport { MenuList } from '../menu-list';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\n\nexport const Container = (): JSX.Element => {\n const { props, setMenuState, menuState, setReferenceElement, referenceElement } = useContext(ComboBoxContext);\n\n const { inline, innerRef, startPlacementPreference, placementOrderPreference, withoutPortal, zIndex } = props;\n const globalAttributes = useGetGlobalAttributes(props);\n const xStyledProps = useGetXstyledProps(props);\n // Removing possible collisionable props\n const { placeholder, onKeyDown, onChange, disabled, tabIndex, ...containerGlobals } = globalAttributes;\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setMenuState(false, 'blur');\n if (innerRef?.current) innerRef.current.blur();\n }, [innerRef, setMenuState]);\n\n useEffect(() => {\n const closeMenuOnWindowBlur = () => {\n setMenuState(false, 'blur');\n };\n\n window.addEventListener('blur', closeMenuOnWindowBlur);\n\n return () => {\n window.removeEventListener('blur', closeMenuOnWindowBlur);\n };\n }, [setMenuState]);\n\n return useMemo(\n () => (\n <StyledContainer\n data-testid={ComboboxDataTestid.CONTAINER}\n ref={setReferenceElement}\n {...containerGlobals}\n {...xStyledProps}\n >\n {inline ? (\n <>\n <Controls />\n <MenuList />\n </>\n ) : (\n <>\n <Controls />\n <DSPopperJS\n customOffset={[0, 5]}\n referenceElement={referenceElement}\n showPopover={menuState}\n closeContextMenu={handleCloseMenu}\n startPlacementPreference={startPlacementPreference}\n placementOrderPreference={placementOrderPreference}\n withoutPortal={withoutPortal}\n withoutArrow\n withoutAnimation\n zIndex={zIndex}\n >\n <StyledPopperWrapper tabIndex={-1} onMouseDown={handleMouseDown}>\n <MenuList />\n </StyledPopperWrapper>\n </DSPopperJS>\n </>\n )}\n </StyledContainer>\n ),\n [\n inline,\n setReferenceElement,\n containerGlobals,\n referenceElement,\n menuState,\n xStyledProps,\n handleCloseMenu,\n startPlacementPreference,\n placementOrderPreference,\n withoutPortal,\n zIndex,\n handleMouseDown,\n ],\n );\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,YAAY,MAAmB;AAC1C,QAAM,EAAE,OAAO,cAAc,WAAW,qBAAqB,qBAAqB,WAAW,eAAe;AAE5G,QAAM,EAAE,QAAQ,UAAU,0BAA0B,0BAA0B,eAAe,WAAW;AACxG,QAAM,mBAAmB,uBA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 -1,19 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __objRest = (source, exclude) => {
|
|
6
|
-
var target = {};
|
|
7
|
-
for (var prop in source)
|
|
8
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
9
|
-
target[prop] = source[prop];
|
|
10
|
-
if (source != null && __getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
12
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
13
|
-
target[prop] = source[prop];
|
|
14
|
-
}
|
|
15
|
-
return target;
|
|
16
|
-
};
|
|
17
2
|
import * as React from "react";
|
|
18
3
|
import React2, { useContext } from "react";
|
|
19
4
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
@@ -24,13 +9,12 @@ import { useKeyboardNavigation } from "./useKeyboardNavigation";
|
|
|
24
9
|
import { useControlsInput } from "./useControlsInput";
|
|
25
10
|
import { ComboBoxContext } from "../../ComboBoxCTX";
|
|
26
11
|
const ControlsInput = () => {
|
|
27
|
-
const
|
|
28
|
-
props:
|
|
29
|
-
} = _a, _c = _b, { autoFocus, placeholder, disabled, innerRef, onlySelectable } = _c, restProps = __objRest(_c, ["autoFocus", "placeholder", "disabled", "innerRef", "onlySelectable"]), {
|
|
12
|
+
const {
|
|
13
|
+
props: { autoFocus, placeholder, disabled, innerRef, onlySelectable, ...restProps },
|
|
30
14
|
focusOptionIdx,
|
|
31
15
|
inputValue,
|
|
32
16
|
menuState
|
|
33
|
-
} =
|
|
17
|
+
} = useContext(ComboBoxContext);
|
|
34
18
|
const { onInputKeyDown } = useKeyboardNavigation();
|
|
35
19
|
const { spanReference, width, spanReferenceText, showPlaceholder, handleOnBlur, handleOnChange, handleOnFocus } = useControlsInput();
|
|
36
20
|
const { tabIndex } = useGetGlobalAttributes(restProps);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/controls-input/ControlsInput.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { useGetGlobalAttributes } from '@elliemae/ds-utilities';\n\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport { StyledInput, StyledInputWrapper, StyledInputPlaceHolder, StyledInputWidthReference } from './styled';\nimport { useKeyboardNavigation } from './useKeyboardNavigation';\nimport { useControlsInput } from './useControlsInput';\nimport { ComboBoxContext } from '../../ComboBoxCTX';\n\nexport const ControlsInput = (): JSX.Element => {\n const {\n props: { autoFocus, placeholder, disabled, innerRef, onlySelectable, ...restProps },\n focusOptionIdx,\n inputValue,\n menuState,\n } = useContext(ComboBoxContext);\n const { onInputKeyDown } = useKeyboardNavigation();\n const { spanReference, width, spanReferenceText, showPlaceholder, handleOnBlur, handleOnChange, handleOnFocus } =\n useControlsInput();\n\n const { tabIndex } = useGetGlobalAttributes(restProps);\n\n return (\n <StyledInputWrapper>\n <StyledInputWidthReference ref={spanReference}>{spanReferenceText}</StyledInputWidthReference>\n {showPlaceholder && (\n <StyledInputPlaceHolder>\n <SimpleTruncatedTooltipText value={showPlaceholder}></SimpleTruncatedTooltipText>\n </StyledInputPlaceHolder>\n )}\n\n <StyledInput\n data-testid={ComboboxDataTestid.INPUT}\n autoFocus={autoFocus}\n placeholder={placeholder}\n aria-controls=\"combo-listbox\"\n aria-activedescendant={focusOptionIdx}\n aria-expanded={menuState}\n aria-haspopup=\"listbox\"\n aria-describedby=\"combobox-selected-items\"\n role=\"combobox\"\n disabled={disabled}\n style={{ width }}\n ref={innerRef}\n value={inputValue}\n type=\"text\"\n onKeyDown={onInputKeyDown}\n onChange={handleOnChange}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n tabIndex={tabIndex}\n withoutCaret={onlySelectable}\n />\n </StyledInputWrapper>\n );\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEO,MAAM,gBAAgB,MAAmB;AAC9C,QAAM;AAAA,IACJ,OAAO,EAAE,WAAW,aAAa,UAAU,UAAU,mBAAmB;AAAA,IACxE;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW,eAAe;AAC9B,QAAM,EAAE,mBAAmB,sBAAsB;AACjD,QAAM,EAAE,eAAe,OAAO,mBAAmB,iBAAiB,cAAc,gBAAgB,kBAC9F,iBAAiB;AAEnB,QAAM,EAAE,aAAa,uBAAuB,SAAS;AAErD,SACE,qCAAC,0BACC,qCAAC;AAAA,IAA0B,KAAK;AAAA,KAAgB,iBAAkB,GACjE,mBACC,qCAAC,8BACC,qCAAC;AAAA,IAA2B,OAAO;AAAA,GAAiB,CACtD,GAGF,qCAAC;AAAA,IACC,eAAa,mBAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA,iBAAc;AAAA,IACd,yBAAuB;AAAA,IACvB,iBAAe;AAAA,IACf,iBAAc;AAAA,IACd,oBAAiB;AAAA,IACjB,MAAK;AAAA,IACL;AAAA,IACA,OAAO,EAAE,MAAM;AAAA,IACf,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAK;AAAA,IACL,WAAW;AAAA,IACX,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,SAAS;AAAA,IACT;AAAA,IACA,cAAc;AAAA,GAChB,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import React2, { useMemo, useContext, useCallback } from "react";
|
|
23
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
@@ -83,15 +64,19 @@ const useItemRenderer = () => {
|
|
|
83
64
|
innerRef: vItem.measureRef
|
|
84
65
|
};
|
|
85
66
|
if (option.type === MENU_OPTION_TYPES.SECTION) {
|
|
86
|
-
return /* @__PURE__ */ React2.createElement(Section,
|
|
87
|
-
label: option.label
|
|
88
|
-
|
|
67
|
+
return /* @__PURE__ */ React2.createElement(Section, {
|
|
68
|
+
label: option.label,
|
|
69
|
+
...generalProps
|
|
70
|
+
});
|
|
89
71
|
}
|
|
90
72
|
if (option.type === MENU_OPTION_TYPES.SEPARATOR) {
|
|
91
|
-
return /* @__PURE__ */ React2.createElement(Separator,
|
|
73
|
+
return /* @__PURE__ */ React2.createElement(Separator, {
|
|
74
|
+
...generalProps
|
|
75
|
+
});
|
|
92
76
|
}
|
|
93
77
|
if (option.type === MENU_OPTION_TYPES.OPTION) {
|
|
94
|
-
return /* @__PURE__ */ React2.createElement(CBItem,
|
|
78
|
+
return /* @__PURE__ */ React2.createElement(CBItem, {
|
|
79
|
+
...generalProps,
|
|
95
80
|
value: option.value,
|
|
96
81
|
label: option.label,
|
|
97
82
|
dataTestid: ComboboxDataTestid.OPTION,
|
|
@@ -103,13 +88,13 @@ const useItemRenderer = () => {
|
|
|
103
88
|
isActive: dsId === focusOptionIdx,
|
|
104
89
|
isSelected: isSelected(selectedValues, option),
|
|
105
90
|
tabIndex: -1
|
|
106
|
-
})
|
|
91
|
+
});
|
|
107
92
|
}
|
|
108
93
|
if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {
|
|
109
|
-
return /* @__PURE__ */ React2.createElement(SingleMenuItem,
|
|
94
|
+
return /* @__PURE__ */ React2.createElement(SingleMenuItem, {
|
|
110
95
|
dataTestid: ComboboxDataTestid.OPTION,
|
|
111
|
-
isActive: dsId === focusOptionIdx
|
|
112
|
-
|
|
96
|
+
isActive: dsId === focusOptionIdx,
|
|
97
|
+
...generalProps,
|
|
113
98
|
render: ({ label: labelCreatable }) => /* @__PURE__ */ React2.createElement(Grid, {
|
|
114
99
|
p: "8px",
|
|
115
100
|
cols: ["min-content", "auto"],
|
|
@@ -118,7 +103,7 @@ const useItemRenderer = () => {
|
|
|
118
103
|
}, /* @__PURE__ */ React2.createElement(StyledCreatableLabel, null, "Add:"), /* @__PURE__ */ React2.createElement(StyledCreatableValue, null, `"${labelCreatable}"`)),
|
|
119
104
|
label: option.label,
|
|
120
105
|
onClick: handleOnCreateClick
|
|
121
|
-
})
|
|
106
|
+
});
|
|
122
107
|
}
|
|
123
108
|
return /* @__PURE__ */ React2.createElement(React2.Fragment, null);
|
|
124
109
|
});
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/menu-list/useItemRenderer.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { SingleMenuItem, MultiMenuItem, Section, Separator } from '@elliemae/ds-common';\nimport { ComboBoxContext } from '../../ComboBoxCTX';\nimport { StyledCreatableLabel, StyledCreatableValue } from './styled';\nimport { isSelected, getSuggestedValueOnChange } from '../../utils/listHelper';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids';\nimport { DSComboboxT } from '../../react-desc-prop-types';\nimport { MENU_OPTION_TYPES, INTERNAL_MENU_OPTION_TYPES } from '../../constants';\nexport const useItemRenderer = (): Array<JSX.Element> | null => {\n const {\n props: { filteredOptions, onCreate, onChange, isNonClearable, selectedValues, onFilter, allOptions },\n setMenuState,\n inputValue,\n focusOptionIdx,\n setInputValue,\n virtualListHelpers,\n } = useContext(ComboBoxContext);\n\n const multiple = Array.isArray(selectedValues);\n const CBItem = multiple ? MultiMenuItem : SingleMenuItem;\n\n const handleOnCreateClick = useCallback(() => {\n if (inputValue && onCreate) {\n onCreate(inputValue);\n setInputValue('');\n if (onFilter) onFilter(allOptions, inputValue);\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);\n const handleClick = useCallback(\n (option: DSComboboxT.ItemOption, e: React.MouseEvent) => {\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n if (!option.disabled) {\n if (onFilter) onFilter(allOptions, inputValue);\n setInputValue('');\n if (!multiple) {\n setMenuState(false, 'selectOption', e);\n }\n onChange(getSuggestedValueOnChange(option, selectedValues, isNonClearable), option, e);\n }\n }\n // prevent for loosing focus on input control\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, selectedValues, allOptions, onChange, setMenuState, multiple],\n );\n\n // prevent blur from controls input\n const handleOnMouseDown = useCallback((e: React.MouseEvent<HTMLLIElement>) => {\n e.preventDefault();\n }, []);\n\n return useMemo(() => {\n if (!virtualListHelpers) {\n return null;\n }\n return virtualListHelpers.virtualItems.map((vItem) => {\n const option = filteredOptions[vItem.index];\n const { dsId, type, disabled } = option;\n const generalProps = {\n wrapperStyles: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${vItem.start}px)`,\n },\n\n key: `${dsId}`,\n innerRef: vItem.measureRef,\n };\n if (option.type === MENU_OPTION_TYPES.SECTION) {\n return <Section label={option.label} {...generalProps} />;\n }\n if (option.type === MENU_OPTION_TYPES.SEPARATOR) {\n return <Separator {...generalProps} />;\n }\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={disabled}\n onClick={(e: React.MouseEvent) => {\n handleClick(option, e);\n }}\n onMouseDown={handleOnMouseDown}\n isActive={dsId === focusOptionIdx}\n isSelected={isSelected(selectedValues, option)}\n tabIndex={-1}\n />\n );\n }\n if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {\n return (\n <SingleMenuItem\n dataTestid={ComboboxDataTestid.OPTION}\n isActive={dsId === focusOptionIdx}\n {...generalProps}\n render={({ label: labelCreatable }: { label: string }) => (\n <Grid p=\"8px\" cols={['min-content', 'auto']} gutter=\"xxs\" alignItems=\"center\">\n <StyledCreatableLabel>Add:</StyledCreatableLabel>\n <StyledCreatableValue>{`\"${labelCreatable}\"`}</StyledCreatableValue>\n </Grid>\n )}\n label={option.label}\n onClick={handleOnCreateClick}\n />\n );\n }\n return <></>;\n });\n }, [filteredOptions, focusOptionIdx, selectedValues, virtualListHelpers]);\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACO,MAAM,kBAAkB,MAAiC;AAC9D,QAAM;AAAA,IACJ,OAAO,EAAE,iBAAiB,UAAU,UAAU,g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
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import { globalAttributesPropTypes, PropTypes } from "@elliemae/ds-utilities";
|
|
23
4
|
function noop(..._args) {
|
|
24
5
|
}
|
|
25
|
-
const ComboboxPropTypes =
|
|
6
|
+
const ComboboxPropTypes = {
|
|
7
|
+
...globalAttributesPropTypes,
|
|
26
8
|
placeholder: PropTypes.string.description("input's placeholder value").defaultValue(""),
|
|
27
9
|
allOptions: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired.description("List of original options").defaultValue([]),
|
|
28
10
|
filteredOptions: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).description("List of filtered options to show in the menu based on the current internal input filter value").defaultValue([]),
|
|
@@ -43,7 +25,7 @@ const ComboboxPropTypes = __spreadProps(__spreadValues({}, globalAttributesPropT
|
|
|
43
25
|
zIndex: PropTypes.number.description("The z-index of the combobox menu").defaultValue(10),
|
|
44
26
|
innerRef: PropTypes.object.description("ref to the components container"),
|
|
45
27
|
onlySelectable: PropTypes.bool.description("filtering is disabled")
|
|
46
|
-
}
|
|
28
|
+
};
|
|
47
29
|
export {
|
|
48
30
|
ComboboxPropTypes,
|
|
49
31
|
noop
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\nimport React from 'react';\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-utilities';\nimport { DSMaskT } from '@elliemae/ds-form-helpers-mask-hooks';\nexport function noop<T extends unknown[]>(..._args: T): void {}\n\nexport declare namespace DSComboboxT {\n export interface CommonItemOptions {\n dsId: string;\n disabled?: boolean;\n render?: React.ComponentType<unknown>;\n }\n export interface ItemSeparatorOptions extends CommonItemOptions {\n type: 'separator';\n }\n\n export interface ItemSectionOptions extends CommonItemOptions {\n type: 'section';\n label: string;\n }\n\n export interface ItemOption extends CommonItemOptions {\n value: string;\n label: string;\n type: 'option';\n }\n\n export interface ItemCreatableOption extends CommonItemOptions {\n label: string;\n type: 'creatable';\n }\n\n export type OptionTypes = ItemOption | ItemSectionOptions | ItemSeparatorOptions | ItemCreatableOption;\n\n export type SelectedOptionsT = ItemOption[] | ItemOption | null;\n export interface PropsOptional {\n inputMinWidth?: number;\n menuMinWidth?: number;\n menuMaxHeight?: number;\n placeholder?: string;\n autoFocus?: boolean;\n filteredOptions: OptionTypes[];\n isMenuOpen?: boolean;\n onMenuChange?: (\n state: boolean,\n reason: string,\n e: React.KeyboardEvent | React.MouseEvent | React.ChangeEvent<HTMLInputElement>,\n ) => void;\n onCreate?: (label: string) => void;\n onFilter?: (newOptions: OptionTypes[], inputValue?: string) => void;\n onCancel?: () => void;\n onSelectAll?: (suggestedValue: OptionTypes[] | [], event: React.MouseEvent | React.KeyboardEvent) => null;\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>, value: ItemOption) => void;\n zIndex?: number;\n }\n\n export interface RequiredProps {\n allOptions: OptionTypes[];\n selectedValues: SelectedOptionsT;\n onChange: (\n suggestedValue: ItemOption | OptionTypes[] | null,\n selectedOption: ItemOption,\n event: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n }\n export interface DefaultProps {\n startPlacementPreference: string;\n placementOrderPreference: string[];\n hasError: boolean;\n inline: boolean;\n withoutPortal: boolean;\n isNonClearable: boolean;\n disabled: boolean;\n noOptionsMessage: string;\n innerRef: React.RefObject<HTMLInputElement>;\n useMask: DSMaskT.Hook | typeof noop;\n onlySelectable: boolean;\n }\n\n export interface Props extends Partial<DefaultProps>, RequiredProps, PropsOptional {}\n\n export interface InternalProps extends DefaultProps, RequiredProps, PropsOptional {}\n}\n\nexport const ComboboxPropTypes = {\n ...globalAttributesPropTypes,\n placeholder: PropTypes.string.description(\"input's placeholder value\").defaultValue(''),\n allOptions: PropTypes.oneOfType([PropTypes.array, PropTypes.object])\n .isRequired.description('List of original options')\n .defaultValue([]),\n filteredOptions: PropTypes.oneOfType([PropTypes.array, PropTypes.object])\n .description('List of filtered options to show in the menu based on the current internal input filter value')\n .defaultValue([]),\n selectedValues: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]).isRequired.description(\n 'Array of option or single option selected',\n ),\n disabled: PropTypes.bool.description('wheter or not the input is disabled').defaultValue('false'),\n autoFocus: PropTypes.bool.description('Whether the combo box uses auto focus or not').defaultValue('false'),\n hasError: PropTypes.bool.description('Whether the combo box has error or not').defaultValue('false'),\n noOptionsMessage: PropTypes.string\n .description('Custome message to be display when no matches found after filtering')\n .defaultValue('No Matches Found'),\n onChange: PropTypes.func.isRequired\n .description('function triggered when an option is selected it will send the options selected')\n .defaultValue('() => {}'),\n onFilter: PropTypes.func.description('function triggered when user type in the combobox input').defaultValue(''),\n onCreate: PropTypes.func\n .description(\n 'function triggered when user select \"create\" a new item whenever is not a match in the all option list',\n )\n .defaultValue(''),\n onCancel: PropTypes.func.description('function triggered when user press ESC key').defaultValue('() => {}'),\n onMenuChange: PropTypes.func\n .description('function triggered when user open or close the menu list')\n .defaultValue('() => {}'),\n inputMinWidth: PropTypes.any.description('Minimum width for the combo box input controller').defaultValue(undefined),\n menuMinWidth: PropTypes.any.description('Minimum width for the dropdown menu').defaultValue(undefined),\n menuMaxHeight: PropTypes.any.description('Maximum height for the dropdown menu').defaultValue(undefined),\n withoutPortal: PropTypes.bool\n .description('Whether the combobox menu is rendered in a portal or not')\n .defaultValue(false),\n zIndex: PropTypes.number.description('The z-index of the combobox menu').defaultValue(10),\n innerRef: PropTypes.object.description('ref to the components container'),\n onlySelectable: PropTypes.bool.description('filtering is disabled'),\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACGA;AAEO,iBAAsC,OAAgB;AAAC;AAgFvD,MAAM,oBAAoB;AAAA,EAC/B,GAAG;AAAA,EACH,aAAa,UAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,EAAE;AAAA,EACtF,YAAY,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC,EAChE,WAAW,YAAY,0BAA0B,EACjD,aAAa,CAAC,CAAC;AAAA,EAClB,iBAAiB,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC,EACrE,YAAY,+FAA+F,EAC3G,aAAa,CAAC,CAAC;AAAA,EAClB,gBAAgB,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,GAAG,UAAU,MAAM,CAAC,EAAE,WAAW,YACtG,2CACF;AAAA,EACA,UAAU,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,OAAO;AAAA,EAChG,WAAW,UAAU,KAAK,YAAY,8CAA8C,EAAE,aAAa,OAAO;AAAA,EAC1G,UAAU,UAAU,KAAK,YAAY,wCAAwC,EAAE,aAAa,OAAO;AAAA,EACnG,kBAAkB,UAAU,OACzB,YAAY,qEAAqE,EACjF,aAAa,kBAAkB;AAAA,EAClC,UAAU,UAAU,KAAK,WACtB,YAAY,iFAAiF,EAC7F,aAAa,UAAU;AAAA,EAC1B,UAAU,UAAU,KAAK,YAAY,yDAAyD,EAAE,aAAa,EAAE;AAAA,EAC/G,UAAU,UAAU,KACjB,YACC,wGACF,EACC,aAAa,EAAE;AAAA,EAClB,UAAU,UAAU,KAAK,YAAY,4CAA4C,EAAE,aAAa,UAAU;AAAA,EAC1G,cAAc,UAAU,KACrB,YAAY,0DAA0D,EACtE,aAAa,UAAU;AAAA,EAC1B,eAAe,UAAU,IAAI,YAAY,kDAAkD,EAAE,aAAa,MAAS;AAAA,EACnH,cAAc,UAAU,IAAI,YAAY,qCAAqC,EAAE,aAAa,MAAS;AAAA,EACrG,eAAe,UAAU,IAAI,YAAY,sCAAsC,EAAE,aAAa,MAAS;AAAA,EACvG,eAAe,UAAU,KACtB,YAAY,0DAA0D,EACtE,aAAa,KAAK;AAAA,EACrB,QAAQ,UAAU,OAAO,YAAY,kCAAkC,EAAE,aAAa,EAAE;AAAA,EACxF,UAAU,UAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,gBAAgB,UAAU,KAAK,YAAY,uBAAuB;AACpE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-combobox",
|
|
3
|
-
"version": "3.3.0-next.
|
|
3
|
+
"version": "3.3.0-next.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Combobox",
|
|
6
6
|
"files": [
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"indent": 4
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@elliemae/ds-button": "3.3.0-next.
|
|
39
|
-
"@elliemae/ds-common": "3.3.0-next.
|
|
40
|
-
"@elliemae/ds-form-checkbox": "3.3.0-next.
|
|
41
|
-
"@elliemae/ds-grid": "3.3.0-next.
|
|
42
|
-
"@elliemae/ds-icons": "3.3.0-next.
|
|
43
|
-
"@elliemae/ds-pills": "3.3.0-next.
|
|
44
|
-
"@elliemae/ds-popperjs": "3.3.0-next.
|
|
45
|
-
"@elliemae/ds-system": "3.3.0-next.
|
|
46
|
-
"@elliemae/ds-truncated-tooltip-text": "3.3.0-next.
|
|
47
|
-
"@elliemae/ds-utilities": "3.3.0-next.
|
|
38
|
+
"@elliemae/ds-button": "3.3.0-next.7",
|
|
39
|
+
"@elliemae/ds-common": "3.3.0-next.7",
|
|
40
|
+
"@elliemae/ds-form-checkbox": "3.3.0-next.7",
|
|
41
|
+
"@elliemae/ds-grid": "3.3.0-next.7",
|
|
42
|
+
"@elliemae/ds-icons": "3.3.0-next.7",
|
|
43
|
+
"@elliemae/ds-pills": "3.3.0-next.7",
|
|
44
|
+
"@elliemae/ds-popperjs": "3.3.0-next.7",
|
|
45
|
+
"@elliemae/ds-system": "3.3.0-next.7",
|
|
46
|
+
"@elliemae/ds-truncated-tooltip-text": "3.3.0-next.7",
|
|
47
|
+
"@elliemae/ds-utilities": "3.3.0-next.7",
|
|
48
48
|
"react-virtual": "~2.10.4",
|
|
49
49
|
"uid": "~2.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@elliemae/ds-form-helpers-mask-hooks": "3.3.0-next.
|
|
52
|
+
"@elliemae/ds-form-helpers-mask-hooks": "3.3.0-next.7",
|
|
53
53
|
"@elliemae/pui-theme": "~2.6.0",
|
|
54
54
|
"@testing-library/dom": "~8.13.0",
|
|
55
55
|
"@testing-library/jest-dom": "~5.16.4",
|