@salutejs/plasma-new-hope 0.339.1-canary.2312.18923951101.0 → 0.340.0-canary.2314.18974837629.0
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/cjs/components/Combobox/ComboboxNew/Combobox.css +19 -0
 - package/cjs/components/Combobox/ComboboxNew/Combobox.js +58 -11
 - package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
 - package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
 - package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
 - package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +8 -2
 - package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
 - package/cjs/components/Combobox/ComboboxNew/reducers/treePathReducer.js +123 -0
 - package/cjs/components/Combobox/ComboboxNew/reducers/treePathReducer.js.map +1 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.css +57 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js +96 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js.map +1 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js +30 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js.map +1 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles_1auklgl.css +2 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.css +54 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js +127 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js.map +1 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js +205 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js.map +1 -0
 - package/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles_7nhjnm.css +15 -0
 - package/cjs/index.css +19 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +50 -10
 - package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +35 -3
 - package/emotion/cjs/components/Combobox/ComboboxNew/reducers/index.js +1 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/reducers/treePathReducer.js +140 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js +126 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js +36 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.types.js +4 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js +148 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js +183 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.types.js +4 -0
 - package/emotion/cjs/components/Combobox/ComboboxNew/ui/index.js +1 -0
 - package/emotion/cjs/examples/components/ChipGroup /ChipGroup.config.js +214 -0
 - package/emotion/cjs/examples/components/Combobox/Combobox.config.js +15 -15
 - package/emotion/cjs/examples/components/Combobox/Combobox.js +0 -15
 - package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +52 -12
 - package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
 - package/emotion/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +35 -3
 - package/emotion/es/components/Combobox/ComboboxNew/reducers/index.js +1 -0
 - package/emotion/es/components/Combobox/ComboboxNew/reducers/treePathReducer.js +123 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js +75 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js +13 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.types.js +1 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js +97 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js +119 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.types.js +1 -0
 - package/emotion/es/components/Combobox/ComboboxNew/ui/index.js +1 -0
 - package/emotion/es/examples/components/ChipGroup /ChipGroup.config.js +204 -0
 - package/emotion/es/examples/components/Combobox/Combobox.config.js +15 -15
 - package/es/components/Combobox/ComboboxNew/Combobox.css +19 -0
 - package/es/components/Combobox/ComboboxNew/Combobox.js +59 -12
 - package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
 - package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
 - package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
 - package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +8 -2
 - package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
 - package/es/components/Combobox/ComboboxNew/reducers/treePathReducer.js +118 -0
 - package/es/components/Combobox/ComboboxNew/reducers/treePathReducer.js.map +1 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.css +57 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js +88 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js.map +1 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js +25 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js.map +1 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles_1auklgl.css +2 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.css +54 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js +119 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js.map +1 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js +187 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js.map +1 -0
 - package/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles_7nhjnm.css +15 -0
 - package/es/index.css +19 -0
 - package/package.json +2 -2
 - package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +50 -10
 - package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +35 -3
 - package/styled-components/cjs/components/Combobox/ComboboxNew/reducers/index.js +1 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/reducers/treePathReducer.js +140 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js +126 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js +50 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/TreeList/TreeList.types.js +4 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js +148 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js +296 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.types.js +4 -0
 - package/styled-components/cjs/components/Combobox/ComboboxNew/ui/index.js +1 -0
 - package/styled-components/cjs/examples/components/ChipGroup /ChipGroup.config.js +214 -0
 - package/styled-components/cjs/examples/components/Combobox/Combobox.config.js +12 -4
 - package/styled-components/cjs/examples/components/Combobox/Combobox.js +0 -15
 - package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +52 -12
 - package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +35 -3
 - package/styled-components/es/components/Combobox/ComboboxNew/reducers/index.js +1 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/reducers/treePathReducer.js +123 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.js +75 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.js +27 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/TreeList/TreeList.types.js +1 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.js +97 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.js +232 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.types.js +1 -0
 - package/styled-components/es/components/Combobox/ComboboxNew/ui/index.js +1 -0
 - package/styled-components/es/examples/components/ChipGroup /ChipGroup.config.js +204 -0
 - package/styled-components/es/examples/components/Combobox/Combobox.config.js +12 -4
 - package/styled-components/es/examples/components/Combobox/Combobox.js +7 -0
 - package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
 - package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +2 -0
 - package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts.map +1 -1
 - package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +17 -3
 - package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
 - package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts +2 -1
 - package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts.map +1 -1
 - package/types/components/Combobox/ComboboxNew/reducers/index.d.ts +1 -0
 - package/types/components/Combobox/ComboboxNew/reducers/index.d.ts.map +1 -1
 - package/types/components/Combobox/ComboboxNew/reducers/treePathReducer.d.ts +18 -0
 - package/types/components/Combobox/ComboboxNew/reducers/treePathReducer.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/TreeList.d.ts +4 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/TreeList.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.d.ts +6 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/TreeList.styles.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/TreeList.types.d.ts +11 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/TreeList.types.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.d.ts +4 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.d.ts +62 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.styles.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.types.d.ts +6 -0
 - package/types/components/Combobox/ComboboxNew/ui/TreeList/ui/Item/Item.types.d.ts.map +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/index.d.ts +1 -0
 - package/types/components/Combobox/ComboboxNew/ui/index.d.ts.map +1 -1
 - package/types/components/Select/ui/TreeList/ui/Item/Item.types.d.ts +0 -8
 - package/types/components/Select/ui/TreeList/ui/Item/Item.types.d.ts.map +1 -1
 - package/types/examples/components/ChipGroup /ChipGroup.config.d.ts.map +1 -0
 - package/types/examples/components/ChipGroup /ChipGroup.d.ts.map +1 -0
 - package/types/examples/components/Combobox/Combobox.config.d.ts.map +1 -1
 - package/types/examples/components/Combobox/Combobox.d.ts +48 -0
 - package/types/examples/components/Combobox/Combobox.d.ts.map +1 -1
 - package/emotion/cjs/examples/components/ChipGroup/ChipGroup.config.js +0 -35
 - package/emotion/es/examples/components/ChipGroup/ChipGroup.config.js +0 -25
 - package/styled-components/cjs/examples/components/ChipGroup/ChipGroup.config.js +0 -141
 - package/styled-components/es/examples/components/ChipGroup/ChipGroup.config.js +0 -131
 - package/types/examples/components/ChipGroup/ChipGroup.config.d.ts.map +0 -1
 - package/types/examples/components/ChipGroup/ChipGroup.d.ts.map +0 -1
 - /package/emotion/cjs/examples/components/{ChipGroup → ChipGroup }/ChipGroup.js +0 -0
 - /package/emotion/es/examples/components/{ChipGroup → ChipGroup }/ChipGroup.js +0 -0
 - /package/styled-components/cjs/examples/components/{ChipGroup → ChipGroup }/ChipGroup.js +0 -0
 - /package/styled-components/es/examples/components/{ChipGroup → ChipGroup }/ChipGroup.js +0 -0
 - /package/types/examples/components/{ChipGroup → ChipGroup }/ChipGroup.config.d.ts +0 -0
 - /package/types/examples/components/{ChipGroup → ChipGroup }/ChipGroup.d.ts +0 -0
 
| 
         @@ -1,16 +1 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            "use strict";
         
     | 
| 
       2 
     | 
    
         
            -
            Object.defineProperty(exports, "__esModule", {
         
     | 
| 
       3 
     | 
    
         
            -
                value: true
         
     | 
| 
       4 
     | 
    
         
            -
            });
         
     | 
| 
       5 
     | 
    
         
            -
            Object.defineProperty(exports, "Combobox", {
         
     | 
| 
       6 
     | 
    
         
            -
                enumerable: true,
         
     | 
| 
       7 
     | 
    
         
            -
                get: function() {
         
     | 
| 
       8 
     | 
    
         
            -
                    return Combobox;
         
     | 
| 
       9 
     | 
    
         
            -
                }
         
     | 
| 
       10 
     | 
    
         
            -
            });
         
     | 
| 
       11 
     | 
    
         
            -
            var _engines = require("../../../engines");
         
     | 
| 
       12 
     | 
    
         
            -
            var _ = require("../../..");
         
     | 
| 
       13 
     | 
    
         
            -
            var _Comboboxconfig = require("./Combobox.config");
         
     | 
| 
       14 
     | 
    
         
            -
            var mergedConfig = (0, _engines.mergeConfig)(_.comboboxNewConfig, _Comboboxconfig.config);
         
     | 
| 
       15 
     | 
    
         
            -
            var ComboboxComponent = (0, _engines.component)(mergedConfig);
         
     | 
| 
       16 
     | 
    
         
            -
            var Combobox = ComboboxComponent;
         
     | 
| 
         @@ -136,8 +136,8 @@ import { classes } from "./Combobox.tokens"; 
     | 
|
| 
       136 
136 
     | 
    
         
             
            import { FloatingPopover } from "./FloatingPopover";
         
     | 
| 
       137 
137 
     | 
    
         
             
            import { useKeyNavigation, getItemByFocused } from "./hooks/useKeyboardNavigation";
         
     | 
| 
       138 
138 
     | 
    
         
             
            import { initialItemsTransform, updateAncestors, updateDescendants, updateSingleAncestors, filterItems, getItemId, getTextValue } from "./utils";
         
     | 
| 
       139 
     | 
    
         
            -
            import { Inner, StyledTextField, VirtualList, SelectAll } from "./ui";
         
     | 
| 
       140 
     | 
    
         
            -
            import { pathReducer, focusedPathReducer } from "./reducers";
         
     | 
| 
      
 139 
     | 
    
         
            +
            import { Inner, StyledTextField, VirtualList, SelectAll, TreeList } from "./ui";
         
     | 
| 
      
 140 
     | 
    
         
            +
            import { pathReducer, focusedPathReducer, treePathReducer } from "./reducers";
         
     | 
| 
       141 
141 
     | 
    
         
             
            import { getPathMap, getTreeMaps } from "./hooks/getPathMaps";
         
     | 
| 
       142 
142 
     | 
    
         
             
            import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState, StyledLeftHelper, ListWrapper } from "./Combobox.styles";
         
     | 
| 
       143 
143 
     | 
    
         
             
            import { base as viewCSS } from "./variations/_view/base";
         
     | 
| 
         @@ -149,7 +149,7 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       149 
149 
     | 
    
         
             
             */ export var comboboxRoot = function(Root) {
         
     | 
| 
       150 
150 
     | 
    
         
             
                return /*#__PURE__*/ forwardRef(function(props, ref) {
         
     | 
| 
       151 
151 
     | 
    
         
             
                    var _getItemByFocused;
         
     | 
| 
       152 
     | 
    
         
            -
                    var name = props.name, multiple = props.multiple, outerValue = props.value, outerOnChange = props.onChange, defaultValue = props.defaultValue, isTargetAmount = props.isTargetAmount, targetAmount = props.targetAmount, items = props.items, _props_placement = props.placement, placement = _props_placement === void 0 ? 'bottom-start' : _props_placement, label = props.label, placeholder = props.placeholder, helperText = props.helperText, contentLeft = props.contentLeft, textBefore = props.textBefore, textAfter = props.textAfter, _props_variant = props.variant, variant = _props_variant === void 0 ? 'normal' : _props_variant, listOverflow = props.listOverflow, listHeight = props.listHeight, listMaxHeight = props.listMaxHeight, listWidth = props.listWidth, portal = props.portal, renderItem = props.renderItem, view = props.view, size = props.size, labelPlacement = props.labelPlacement, keepPlaceholder = props.keepPlaceholder, _props_readOnly = props.readOnly, readOnly = _props_readOnly === void 0 ? false : _props_readOnly, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, _props_alwaysOpened = props.alwaysOpened, alwaysOpened = _props_alwaysOpened === void 0 ? false : _props_alwaysOpened, filter = props.filter, outerCloseAfterSelect = props.closeAfterSelect, renderValue = props.renderValue, zIndex = props.zIndex, beforeList = props.beforeList, afterList = props.afterList, _props_virtual = props.virtual, virtual = _props_virtual === void 0 ? false : _props_virtual, hintView = props.hintView, hintSize = props.hintSize, emptyStateDescription = props.emptyStateDescription, onChangeValue = props.onChangeValue, onScroll = props.onScroll, onToggle = props.onToggle, _props_mode = props.mode, mode = _props_mode === void 0 ? 'default' : _props_mode, _props_chipClickArea = props.chipClickArea, chipClickArea = _props_chipClickArea === void 0 ? 'full' : _props_chipClickArea, // @ts-ignore
         
     | 
| 
      
 152 
     | 
    
         
            +
                    var name = props.name, multiple = props.multiple, outerValue = props.value, outerOnChange = props.onChange, defaultValue = props.defaultValue, isTargetAmount = props.isTargetAmount, targetAmount = props.targetAmount, items = props.items, _props_treeView = props.treeView, treeView = _props_treeView === void 0 ? false : _props_treeView, _props_arrowPlacement = props.arrowPlacement, arrowPlacement = _props_arrowPlacement === void 0 ? 'left' : _props_arrowPlacement, _props_placement = props.placement, placement = _props_placement === void 0 ? 'bottom-start' : _props_placement, label = props.label, placeholder = props.placeholder, helperText = props.helperText, contentLeft = props.contentLeft, textBefore = props.textBefore, textAfter = props.textAfter, _props_variant = props.variant, variant = _props_variant === void 0 ? 'normal' : _props_variant, listOverflow = props.listOverflow, listHeight = props.listHeight, listMaxHeight = props.listMaxHeight, listWidth = props.listWidth, portal = props.portal, renderItem = props.renderItem, view = props.view, size = props.size, labelPlacement = props.labelPlacement, keepPlaceholder = props.keepPlaceholder, _props_readOnly = props.readOnly, readOnly = _props_readOnly === void 0 ? false : _props_readOnly, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, _props_alwaysOpened = props.alwaysOpened, alwaysOpened = _props_alwaysOpened === void 0 ? false : _props_alwaysOpened, filter = props.filter, outerCloseAfterSelect = props.closeAfterSelect, renderValue = props.renderValue, zIndex = props.zIndex, beforeList = props.beforeList, afterList = props.afterList, _props_virtual = props.virtual, virtual = _props_virtual === void 0 ? false : _props_virtual, hintView = props.hintView, hintSize = props.hintSize, emptyStateDescription = props.emptyStateDescription, onChangeValue = props.onChangeValue, onScroll = props.onScroll, onToggle = props.onToggle, _props_mode = props.mode, mode = _props_mode === void 0 ? 'default' : _props_mode, _props_chipClickArea = props.chipClickArea, chipClickArea = _props_chipClickArea === void 0 ? 'full' : _props_chipClickArea, // @ts-ignore
         
     | 
| 
       153 
153 
     | 
    
         
             
                    _offset = props._offset, rest = _object_without_properties(props, [
         
     | 
| 
       154 
154 
     | 
    
         
             
                        "name",
         
     | 
| 
       155 
155 
     | 
    
         
             
                        "multiple",
         
     | 
| 
         @@ -159,6 +159,8 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       159 
159 
     | 
    
         
             
                        "isTargetAmount",
         
     | 
| 
       160 
160 
     | 
    
         
             
                        "targetAmount",
         
     | 
| 
       161 
161 
     | 
    
         
             
                        "items",
         
     | 
| 
      
 162 
     | 
    
         
            +
                        "treeView",
         
     | 
| 
      
 163 
     | 
    
         
            +
                        "arrowPlacement",
         
     | 
| 
       162 
164 
     | 
    
         
             
                        "placement",
         
     | 
| 
       163 
165 
     | 
    
         
             
                        "label",
         
     | 
| 
       164 
166 
     | 
    
         
             
                        "placeholder",
         
     | 
| 
         @@ -207,7 +209,7 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       207 
209 
     | 
    
         
             
                        return getTreeMaps(transformedItems);
         
     | 
| 
       208 
210 
     | 
    
         
             
                    }, [
         
     | 
| 
       209 
211 
     | 
    
         
             
                        items
         
     | 
| 
       210 
     | 
    
         
            -
                    ]),  
     | 
| 
      
 212 
     | 
    
         
            +
                    ]), 3), valueToCheckedMap = _useMemo[0], valueToItemMap = _useMemo[1], valueToPathMap = _useMemo[2];
         
     | 
| 
       211 
213 
     | 
    
         
             
                    var _useState = _sliced_to_array(useState(getTextValue(multiple, outerValue, valueToItemMap, renderValue)), 2), textValue = _useState[0], setTextValue = _useState[1];
         
     | 
| 
       212 
214 
     | 
    
         
             
                    var _useState1 = _sliced_to_array(useState(multiple ? [] : ''), 2), internalValue = _useState1[0], setInternalValue = _useState1[1];
         
     | 
| 
       213 
215 
     | 
    
         
             
                    var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
         
     | 
| 
         @@ -237,6 +239,7 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       237 
239 
     | 
    
         
             
                    var _useReducer = _sliced_to_array(useReducer(pathReducer, initialPath), 2), path = _useReducer[0], dispatchPath = _useReducer[1];
         
     | 
| 
       238 
240 
     | 
    
         
             
                    var _useReducer1 = _sliced_to_array(useReducer(focusedPathReducer, []), 2), focusedPath = _useReducer1[0], dispatchFocusedPath = _useReducer1[1];
         
     | 
| 
       239 
241 
     | 
    
         
             
                    var _useState2 = _sliced_to_array(useState(valueToCheckedMap), 2), checked = _useState2[0], setChecked = _useState2[1];
         
     | 
| 
      
 242 
     | 
    
         
            +
                    var _useReducer2 = _sliced_to_array(useReducer(treePathReducer, {}), 2), treePath = _useReducer2[0], dispatchTreePath = _useReducer2[1];
         
     | 
| 
       240 
243 
     | 
    
         
             
                    var isCurrentListOpen = Boolean(path[0]);
         
     | 
| 
       241 
244 
     | 
    
         
             
                    var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
         
     | 
| 
       242 
245 
     | 
    
         
             
                    var withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;
         
     | 
| 
         @@ -321,6 +324,9 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       321 
324 
     | 
    
         
             
                            dispatchPath({
         
     | 
| 
       322 
325 
     | 
    
         
             
                                type: 'reset'
         
     | 
| 
       323 
326 
     | 
    
         
             
                            });
         
     | 
| 
      
 327 
     | 
    
         
            +
                            dispatchTreePath({
         
     | 
| 
      
 328 
     | 
    
         
            +
                                type: 'reset'
         
     | 
| 
      
 329 
     | 
    
         
            +
                            });
         
     | 
| 
       324 
330 
     | 
    
         
             
                            // Скроллим чипы к левому краю при закрытии компонента
         
     | 
| 
       325 
331 
     | 
    
         
             
                            var el = rootRef === null || rootRef === void 0 ? void 0 : (_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.querySelector('.input-scrollable-wrapper');
         
     | 
| 
       326 
332 
     | 
    
         
             
                            if (multiple && value.length > 0 && el) {
         
     | 
| 
         @@ -384,6 +390,9 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       384 
390 
     | 
    
         
             
                            dispatchFocusedPath({
         
     | 
| 
       385 
391 
     | 
    
         
             
                                type: 'reset'
         
     | 
| 
       386 
392 
     | 
    
         
             
                            });
         
     | 
| 
      
 393 
     | 
    
         
            +
                            dispatchTreePath({
         
     | 
| 
      
 394 
     | 
    
         
            +
                                type: 'reset'
         
     | 
| 
      
 395 
     | 
    
         
            +
                            });
         
     | 
| 
       387 
396 
     | 
    
         
             
                        }
         
     | 
| 
       388 
397 
     | 
    
         
             
                        if (onChange) {
         
     | 
| 
       389 
398 
     | 
    
         
             
                            onChange(newValues, item);
         
     | 
| 
         @@ -409,6 +418,9 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       409 
418 
     | 
    
         
             
                            dispatchFocusedPath({
         
     | 
| 
       410 
419 
     | 
    
         
             
                                type: 'reset'
         
     | 
| 
       411 
420 
     | 
    
         
             
                            });
         
     | 
| 
      
 421 
     | 
    
         
            +
                            dispatchTreePath({
         
     | 
| 
      
 422 
     | 
    
         
            +
                                type: 'reset'
         
     | 
| 
      
 423 
     | 
    
         
            +
                            });
         
     | 
| 
       412 
424 
     | 
    
         
             
                        }
         
     | 
| 
       413 
425 
     | 
    
         
             
                        // Закрываем список, если элемент уже выбран.
         
     | 
| 
       414 
426 
     | 
    
         
             
                        if (mode === 'radio' && isCurrentChecked) {
         
     | 
| 
         @@ -539,6 +551,23 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       539 
551 
     | 
    
         
             
                    }, [
         
     | 
| 
       540 
552 
     | 
    
         
             
                        defaultValue
         
     | 
| 
       541 
553 
     | 
    
         
             
                    ]);
         
     | 
| 
      
 554 
     | 
    
         
            +
                    // Эффект для раскрытия дерева при поиске.
         
     | 
| 
      
 555 
     | 
    
         
            +
                    useLayoutEffect(function() {
         
     | 
| 
      
 556 
     | 
    
         
            +
                        if (treeView) {
         
     | 
| 
      
 557 
     | 
    
         
            +
                            if (textValue === '') {
         
     | 
| 
      
 558 
     | 
    
         
            +
                                dispatchTreePath({
         
     | 
| 
      
 559 
     | 
    
         
            +
                                    type: 'reset'
         
     | 
| 
      
 560 
     | 
    
         
            +
                                });
         
     | 
| 
      
 561 
     | 
    
         
            +
                            } else {
         
     | 
| 
      
 562 
     | 
    
         
            +
                                dispatchTreePath({
         
     | 
| 
      
 563 
     | 
    
         
            +
                                    type: 'expand_all',
         
     | 
| 
      
 564 
     | 
    
         
            +
                                    value: filteredItems
         
     | 
| 
      
 565 
     | 
    
         
            +
                                });
         
     | 
| 
      
 566 
     | 
    
         
            +
                            }
         
     | 
| 
      
 567 
     | 
    
         
            +
                        }
         
     | 
| 
      
 568 
     | 
    
         
            +
                    }, [
         
     | 
| 
      
 569 
     | 
    
         
            +
                        textValue
         
     | 
| 
      
 570 
     | 
    
         
            +
                    ]);
         
     | 
| 
       542 
571 
     | 
    
         
             
                    return /*#__PURE__*/ React.createElement(Root, {
         
     | 
| 
       543 
572 
     | 
    
         
             
                        size: size,
         
     | 
| 
       544 
573 
     | 
    
         
             
                        view: view,
         
     | 
| 
         @@ -571,7 +600,11 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       571 
600 
     | 
    
         
             
                            // eslint-disable-next-line @typescript-eslint/ban-ts-comment
         
     | 
| 
       572 
601 
     | 
    
         
             
                            // @ts-ignore
         
     | 
| 
       573 
602 
     | 
    
         
             
                            // eslint-disable-next-line no-underscore-dangle
         
     | 
| 
       574 
     | 
    
         
            -
                            _checkboxAppearance: rest._checkboxAppearance
         
     | 
| 
      
 603 
     | 
    
         
            +
                            _checkboxAppearance: rest._checkboxAppearance,
         
     | 
| 
      
 604 
     | 
    
         
            +
                            treePath: treePath,
         
     | 
| 
      
 605 
     | 
    
         
            +
                            dispatchTreePath: dispatchTreePath,
         
     | 
| 
      
 606 
     | 
    
         
            +
                            arrowPlacement: arrowPlacement,
         
     | 
| 
      
 607 
     | 
    
         
            +
                            valueToPathMap: valueToPathMap
         
     | 
| 
       575 
608 
     | 
    
         
             
                        }
         
     | 
| 
       576 
609 
     | 
    
         
             
                    }, /*#__PURE__*/ React.createElement(FloatingPopover, {
         
     | 
| 
       577 
610 
     | 
    
         
             
                        ref: floatingPopoverRef,
         
     | 
| 
         @@ -637,7 +670,18 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       637 
670 
     | 
    
         
             
                        disabled: disabled,
         
     | 
| 
       638 
671 
     | 
    
         
             
                        readOnly: readOnly,
         
     | 
| 
       639 
672 
     | 
    
         
             
                        name: name
         
     | 
| 
       640 
     | 
    
         
            -
                    }, /*#__PURE__*/ React.createElement( 
     | 
| 
      
 673 
     | 
    
         
            +
                    }, isEmpty(filteredItems) ? /*#__PURE__*/ React.createElement(StyledEmptyState, {
         
     | 
| 
      
 674 
     | 
    
         
            +
                        className: classes.emptyStateWrapper,
         
     | 
| 
      
 675 
     | 
    
         
            +
                        size: size,
         
     | 
| 
      
 676 
     | 
    
         
            +
                        description: emptyStateDescription || 'Ничего не найдено'
         
     | 
| 
      
 677 
     | 
    
         
            +
                    }) : /*#__PURE__*/ React.createElement(React.Fragment, null, treeView ? /*#__PURE__*/ React.createElement(TreeList, {
         
     | 
| 
      
 678 
     | 
    
         
            +
                        items: filteredItems,
         
     | 
| 
      
 679 
     | 
    
         
            +
                        listMaxHeight: listMaxHeight || listHeight,
         
     | 
| 
      
 680 
     | 
    
         
            +
                        onScroll: virtual ? undefined : onScroll,
         
     | 
| 
      
 681 
     | 
    
         
            +
                        virtual: virtual,
         
     | 
| 
      
 682 
     | 
    
         
            +
                        beforeList: beforeList,
         
     | 
| 
      
 683 
     | 
    
         
            +
                        afterList: afterList
         
     | 
| 
      
 684 
     | 
    
         
            +
                    }) : /*#__PURE__*/ React.createElement(ListWrapper, {
         
     | 
| 
       641 
685 
     | 
    
         
             
                        ref: listWrapperRef,
         
     | 
| 
       642 
686 
     | 
    
         
             
                        listWidth: listWidth
         
     | 
| 
       643 
687 
     | 
    
         
             
                    }, /*#__PURE__*/ React.createElement(Ul, {
         
     | 
| 
         @@ -647,11 +691,7 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       647 
691 
     | 
    
         
             
                        listMaxHeight: listMaxHeight || listHeight,
         
     | 
| 
       648 
692 
     | 
    
         
             
                        virtual: virtual,
         
     | 
| 
       649 
693 
     | 
    
         
             
                        onScroll: virtual ? undefined : onScroll
         
     | 
| 
       650 
     | 
    
         
            -
                    }, beforeList,  
     | 
| 
       651 
     | 
    
         
            -
                        className: classes.emptyStateWrapper,
         
     | 
| 
       652 
     | 
    
         
            -
                        size: size,
         
     | 
| 
       653 
     | 
    
         
            -
                        description: emptyStateDescription || 'Ничего не найдено'
         
     | 
| 
       654 
     | 
    
         
            -
                    }) : /*#__PURE__*/ React.createElement(React.Fragment, null, props.multiple && props.selectAllOptions && // TODO: #2004
         
     | 
| 
      
 694 
     | 
    
         
            +
                    }, beforeList, props.multiple && props.selectAllOptions && // TODO: #2004
         
     | 
| 
       655 
695 
     | 
    
         
             
                    /*#__PURE__*/ React.createElement(SelectAll, {
         
     | 
| 
       656 
696 
     | 
    
         
             
                        selectAllOptions: props.selectAllOptions,
         
     | 
| 
       657 
697 
     | 
    
         
             
                        variant: variant
         
     | 
| 
         @@ -670,7 +710,7 @@ import { Context } from "./Combobox.context"; 
     | 
|
| 
       670 
710 
     | 
    
         
             
                            listWidth: listWidth,
         
     | 
| 
       671 
711 
     | 
    
         
             
                            portal: listWrapperRef
         
     | 
| 
       672 
712 
     | 
    
         
             
                        });
         
     | 
| 
       673 
     | 
    
         
            -
                    }) 
     | 
| 
      
 713 
     | 
    
         
            +
                    }), afterList))))))));
         
     | 
| 
       674 
714 
     | 
    
         
             
                });
         
     | 
| 
       675 
715 
     | 
    
         
             
            };
         
     | 
| 
       676 
716 
     | 
    
         
             
            export var comboboxConfig = {
         
     | 
| 
         @@ -33,6 +33,8 @@ export var tokens = { 
     | 
|
| 
       33 
33 
     | 
    
         
             
                itemIconMargin: '--plasma-combobox-item-icon-margin',
         
     | 
| 
       34 
34 
     | 
    
         
             
                itemBackgroundHover: '--plasma-combobox-item-background-hover',
         
     | 
| 
       35 
35 
     | 
    
         
             
                itemIconColor: '--plasma-combobox-item-icon-color',
         
     | 
| 
      
 36 
     | 
    
         
            +
                itemGap: '--plasma-select-item-gap',
         
     | 
| 
      
 37 
     | 
    
         
            +
                itemTreeOffsetWidth: '--plasma-select-item-tree-offset-width',
         
     | 
| 
       36 
38 
     | 
    
         
             
                cellPadding: '--plasma-combobox-cell-padding',
         
     | 
| 
       37 
39 
     | 
    
         
             
                cellPaddingLeftContent: '--plasma-combobox-cell-padding-left-content',
         
     | 
| 
       38 
40 
     | 
    
         
             
                cellPaddingContent: '--plasma-combobox-cell-padding-content',
         
     | 
| 
         @@ -1,3 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            function _array_like_to_array(arr, len) {
         
     | 
| 
      
 2 
     | 
    
         
            +
                if (len == null || len > arr.length) len = arr.length;
         
     | 
| 
      
 3 
     | 
    
         
            +
                for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
         
     | 
| 
      
 4 
     | 
    
         
            +
                return arr2;
         
     | 
| 
      
 5 
     | 
    
         
            +
            }
         
     | 
| 
      
 6 
     | 
    
         
            +
            function _array_without_holes(arr) {
         
     | 
| 
      
 7 
     | 
    
         
            +
                if (Array.isArray(arr)) return _array_like_to_array(arr);
         
     | 
| 
      
 8 
     | 
    
         
            +
            }
         
     | 
| 
      
 9 
     | 
    
         
            +
            function _iterable_to_array(iter) {
         
     | 
| 
      
 10 
     | 
    
         
            +
                if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
         
     | 
| 
      
 11 
     | 
    
         
            +
            }
         
     | 
| 
      
 12 
     | 
    
         
            +
            function _non_iterable_spread() {
         
     | 
| 
      
 13 
     | 
    
         
            +
                throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
         
     | 
| 
      
 14 
     | 
    
         
            +
            }
         
     | 
| 
      
 15 
     | 
    
         
            +
            function _to_consumable_array(arr) {
         
     | 
| 
      
 16 
     | 
    
         
            +
                return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
         
     | 
| 
      
 17 
     | 
    
         
            +
            }
         
     | 
| 
      
 18 
     | 
    
         
            +
            function _unsupported_iterable_to_array(o, minLen) {
         
     | 
| 
      
 19 
     | 
    
         
            +
                if (!o) return;
         
     | 
| 
      
 20 
     | 
    
         
            +
                if (typeof o === "string") return _array_like_to_array(o, minLen);
         
     | 
| 
      
 21 
     | 
    
         
            +
                var n = Object.prototype.toString.call(o).slice(8, -1);
         
     | 
| 
      
 22 
     | 
    
         
            +
                if (n === "Object" && o.constructor) n = o.constructor.name;
         
     | 
| 
      
 23 
     | 
    
         
            +
                if (n === "Map" || n === "Set") return Array.from(n);
         
     | 
| 
      
 24 
     | 
    
         
            +
                if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
         
     | 
| 
      
 25 
     | 
    
         
            +
            }
         
     | 
| 
       1 
26 
     | 
    
         
             
            import { isEmpty } from "../../../../utils";
         
     | 
| 
       2 
27 
     | 
    
         
             
            export var getPathMap = function(items) {
         
     | 
| 
       3 
28 
     | 
    
         
             
                var pathMap = new Map();
         
     | 
| 
         @@ -24,22 +49,29 @@ export var getPathMap = function(items) { 
     | 
|
| 
       24 
49 
     | 
    
         
             
            export var getTreeMaps = function(items) {
         
     | 
| 
       25 
50 
     | 
    
         
             
                var valueToCheckedMap = new Map();
         
     | 
| 
       26 
51 
     | 
    
         
             
                var valueToItemMap = new Map();
         
     | 
| 
      
 52 
     | 
    
         
            +
                var valueToPathMap = new Map();
         
     | 
| 
       27 
53 
     | 
    
         
             
                var rec = function(items) {
         
     | 
| 
       28 
     | 
    
         
            -
                    var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
         
     | 
| 
      
 54 
     | 
    
         
            +
                    var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '', path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
         
     | 
| 
       29 
55 
     | 
    
         
             
                    items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
         
     | 
| 
       30 
56 
     | 
    
         
             
                        var value = item.value, innerItems = item.items;
         
     | 
| 
       31 
57 
     | 
    
         
             
                        var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
         
     | 
| 
       32 
58 
     | 
    
         
             
                        valueToCheckedMap.set(value, false);
         
     | 
| 
      
 59 
     | 
    
         
            +
                        valueToPathMap.set(value.toString(), _to_consumable_array(path).concat([
         
     | 
| 
      
 60 
     | 
    
         
            +
                            value.toString()
         
     | 
| 
      
 61 
     | 
    
         
            +
                        ]));
         
     | 
| 
       33 
62 
     | 
    
         
             
                        if (isEmpty(innerItems) || !innerItems) {
         
     | 
| 
       34 
63 
     | 
    
         
             
                            valueToItemMap.set(value, item);
         
     | 
| 
       35 
64 
     | 
    
         
             
                        } else {
         
     | 
| 
       36 
     | 
    
         
            -
                            rec(innerItems, currIndex) 
     | 
| 
      
 65 
     | 
    
         
            +
                            rec(innerItems, currIndex, _to_consumable_array(path).concat([
         
     | 
| 
      
 66 
     | 
    
         
            +
                                value.toString()
         
     | 
| 
      
 67 
     | 
    
         
            +
                            ]));
         
     | 
| 
       37 
68 
     | 
    
         
             
                        }
         
     | 
| 
       38 
69 
     | 
    
         
             
                    });
         
     | 
| 
       39 
70 
     | 
    
         
             
                };
         
     | 
| 
       40 
71 
     | 
    
         
             
                rec(items);
         
     | 
| 
       41 
72 
     | 
    
         
             
                return [
         
     | 
| 
       42 
73 
     | 
    
         
             
                    valueToCheckedMap,
         
     | 
| 
       43 
     | 
    
         
            -
                    valueToItemMap
         
     | 
| 
      
 74 
     | 
    
         
            +
                    valueToItemMap,
         
     | 
| 
      
 75 
     | 
    
         
            +
                    valueToPathMap
         
     | 
| 
       44 
76 
     | 
    
         
             
                ];
         
     | 
| 
       45 
77 
     | 
    
         
             
            };
         
     | 
| 
         @@ -0,0 +1,123 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            function _type_of(obj) {
         
     | 
| 
      
 2 
     | 
    
         
            +
                "@swc/helpers - typeof";
         
     | 
| 
      
 3 
     | 
    
         
            +
                return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
         
     | 
| 
      
 4 
     | 
    
         
            +
            }
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { deepCopy } from "../../../../utils";
         
     | 
| 
      
 6 
     | 
    
         
            +
            // Утилита для поиска ключа в объекте по пути.
         
     | 
| 
      
 7 
     | 
    
         
            +
            export var keyExists = function(obj, path) {
         
     | 
| 
      
 8 
     | 
    
         
            +
                if ((typeof obj === "undefined" ? "undefined" : _type_of(obj)) !== 'object' || obj === null || !Array.isArray(path)) {
         
     | 
| 
      
 9 
     | 
    
         
            +
                    return false;
         
     | 
| 
      
 10 
     | 
    
         
            +
                }
         
     | 
| 
      
 11 
     | 
    
         
            +
                var current = obj;
         
     | 
| 
      
 12 
     | 
    
         
            +
                for(var i = 0; i < path.length; i++){
         
     | 
| 
      
 13 
     | 
    
         
            +
                    var key = path[i];
         
     | 
| 
      
 14 
     | 
    
         
            +
                    if (current === null || (typeof current === "undefined" ? "undefined" : _type_of(current)) !== 'object' || !(key in current)) {
         
     | 
| 
      
 15 
     | 
    
         
            +
                        return false;
         
     | 
| 
      
 16 
     | 
    
         
            +
                    }
         
     | 
| 
      
 17 
     | 
    
         
            +
                    current = current[key];
         
     | 
| 
      
 18 
     | 
    
         
            +
                }
         
     | 
| 
      
 19 
     | 
    
         
            +
                return true;
         
     | 
| 
      
 20 
     | 
    
         
            +
            };
         
     | 
| 
      
 21 
     | 
    
         
            +
            function createObjectAtPath(obj, path) {
         
     | 
| 
      
 22 
     | 
    
         
            +
                if ((typeof obj === "undefined" ? "undefined" : _type_of(obj)) !== 'object' || obj === null) {
         
     | 
| 
      
 23 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 24 
     | 
    
         
            +
                }
         
     | 
| 
      
 25 
     | 
    
         
            +
                var current = obj;
         
     | 
| 
      
 26 
     | 
    
         
            +
                for(var i = 0; i < path.length; i++){
         
     | 
| 
      
 27 
     | 
    
         
            +
                    var key = path[i];
         
     | 
| 
      
 28 
     | 
    
         
            +
                    if (i === path.length - 1) {
         
     | 
| 
      
 29 
     | 
    
         
            +
                        current[key] = {};
         
     | 
| 
      
 30 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 31 
     | 
    
         
            +
                    }
         
     | 
| 
      
 32 
     | 
    
         
            +
                    if (current[key] === undefined || current[key] === null) {
         
     | 
| 
      
 33 
     | 
    
         
            +
                        current[key] = {};
         
     | 
| 
      
 34 
     | 
    
         
            +
                    }
         
     | 
| 
      
 35 
     | 
    
         
            +
                    current = current[key];
         
     | 
| 
      
 36 
     | 
    
         
            +
                }
         
     | 
| 
      
 37 
     | 
    
         
            +
                return obj;
         
     | 
| 
      
 38 
     | 
    
         
            +
            }
         
     | 
| 
      
 39 
     | 
    
         
            +
            function removeObjectAtPath(obj, path) {
         
     | 
| 
      
 40 
     | 
    
         
            +
                if (path.length === 0) {
         
     | 
| 
      
 41 
     | 
    
         
            +
                    return obj;
         
     | 
| 
      
 42 
     | 
    
         
            +
                }
         
     | 
| 
      
 43 
     | 
    
         
            +
                var current = obj;
         
     | 
| 
      
 44 
     | 
    
         
            +
                for(var i = 0; i < path.length; i++){
         
     | 
| 
      
 45 
     | 
    
         
            +
                    var key = path[i];
         
     | 
| 
      
 46 
     | 
    
         
            +
                    if (current === null || (typeof current === "undefined" ? "undefined" : _type_of(current)) !== 'object' || !(key in current)) {
         
     | 
| 
      
 47 
     | 
    
         
            +
                        return obj;
         
     | 
| 
      
 48 
     | 
    
         
            +
                    }
         
     | 
| 
      
 49 
     | 
    
         
            +
                    if (i === path.length - 1) {
         
     | 
| 
      
 50 
     | 
    
         
            +
                        delete current[key];
         
     | 
| 
      
 51 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 52 
     | 
    
         
            +
                    }
         
     | 
| 
      
 53 
     | 
    
         
            +
                    current = current[key];
         
     | 
| 
      
 54 
     | 
    
         
            +
                }
         
     | 
| 
      
 55 
     | 
    
         
            +
                return obj;
         
     | 
| 
      
 56 
     | 
    
         
            +
            }
         
     | 
| 
      
 57 
     | 
    
         
            +
            // Утилита, которая получается на вход список отфильтрованных элементов
         
     | 
| 
      
 58 
     | 
    
         
            +
            // и возвращает объект путей раскрытых элементов дерева.
         
     | 
| 
      
 59 
     | 
    
         
            +
            function generateNestedTreePathFromFilteredItems(items) {
         
     | 
| 
      
 60 
     | 
    
         
            +
                var result = {};
         
     | 
| 
      
 61 
     | 
    
         
            +
                var buildTree = function(currentItems, currentLevel) {
         
     | 
| 
      
 62 
     | 
    
         
            +
                    if (!currentItems || !Array.isArray(currentItems)) return;
         
     | 
| 
      
 63 
     | 
    
         
            +
                    var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
         
     | 
| 
      
 64 
     | 
    
         
            +
                    try {
         
     | 
| 
      
 65 
     | 
    
         
            +
                        for(var _iterator = currentItems[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
         
     | 
| 
      
 66 
     | 
    
         
            +
                            var item = _step.value;
         
     | 
| 
      
 67 
     | 
    
         
            +
                            if (item === null || item === void 0 ? void 0 : item.value) {
         
     | 
| 
      
 68 
     | 
    
         
            +
                                // Создаем новый уровень для текущего значения
         
     | 
| 
      
 69 
     | 
    
         
            +
                                currentLevel[item === null || item === void 0 ? void 0 : item.value] = {};
         
     | 
| 
      
 70 
     | 
    
         
            +
                                // Рекурсивно обрабатываем дочерние элементы
         
     | 
| 
      
 71 
     | 
    
         
            +
                                if ((item === null || item === void 0 ? void 0 : item.items) && (item === null || item === void 0 ? void 0 : item.items.length) > 0) {
         
     | 
| 
      
 72 
     | 
    
         
            +
                                    buildTree(item === null || item === void 0 ? void 0 : item.items, currentLevel[item === null || item === void 0 ? void 0 : item.value]);
         
     | 
| 
      
 73 
     | 
    
         
            +
                                }
         
     | 
| 
      
 74 
     | 
    
         
            +
                            }
         
     | 
| 
      
 75 
     | 
    
         
            +
                        }
         
     | 
| 
      
 76 
     | 
    
         
            +
                    } catch (err) {
         
     | 
| 
      
 77 
     | 
    
         
            +
                        _didIteratorError = true;
         
     | 
| 
      
 78 
     | 
    
         
            +
                        _iteratorError = err;
         
     | 
| 
      
 79 
     | 
    
         
            +
                    } finally{
         
     | 
| 
      
 80 
     | 
    
         
            +
                        try {
         
     | 
| 
      
 81 
     | 
    
         
            +
                            if (!_iteratorNormalCompletion && _iterator.return != null) {
         
     | 
| 
      
 82 
     | 
    
         
            +
                                _iterator.return();
         
     | 
| 
      
 83 
     | 
    
         
            +
                            }
         
     | 
| 
      
 84 
     | 
    
         
            +
                        } finally{
         
     | 
| 
      
 85 
     | 
    
         
            +
                            if (_didIteratorError) {
         
     | 
| 
      
 86 
     | 
    
         
            +
                                throw _iteratorError;
         
     | 
| 
      
 87 
     | 
    
         
            +
                            }
         
     | 
| 
      
 88 
     | 
    
         
            +
                        }
         
     | 
| 
      
 89 
     | 
    
         
            +
                    }
         
     | 
| 
      
 90 
     | 
    
         
            +
                };
         
     | 
| 
      
 91 
     | 
    
         
            +
                buildTree(items, result);
         
     | 
| 
      
 92 
     | 
    
         
            +
                return result;
         
     | 
| 
      
 93 
     | 
    
         
            +
            }
         
     | 
| 
      
 94 
     | 
    
         
            +
            export function treePathReducer(state, action) {
         
     | 
| 
      
 95 
     | 
    
         
            +
                switch(action.type){
         
     | 
| 
      
 96 
     | 
    
         
            +
                    case 'reset':
         
     | 
| 
      
 97 
     | 
    
         
            +
                        {
         
     | 
| 
      
 98 
     | 
    
         
            +
                            return {};
         
     | 
| 
      
 99 
     | 
    
         
            +
                        }
         
     | 
| 
      
 100 
     | 
    
         
            +
                    case 'toggled_level':
         
     | 
| 
      
 101 
     | 
    
         
            +
                        {
         
     | 
| 
      
 102 
     | 
    
         
            +
                            var stateCopy = deepCopy(state);
         
     | 
| 
      
 103 
     | 
    
         
            +
                            var isTargetLevelOpened = keyExists(stateCopy, action.value);
         
     | 
| 
      
 104 
     | 
    
         
            +
                            if (isTargetLevelOpened) {
         
     | 
| 
      
 105 
     | 
    
         
            +
                                // нужно закрыть текущий уровень
         
     | 
| 
      
 106 
     | 
    
         
            +
                                removeObjectAtPath(stateCopy, action.value);
         
     | 
| 
      
 107 
     | 
    
         
            +
                            } else {
         
     | 
| 
      
 108 
     | 
    
         
            +
                                // нужно открыть требуемый уровень
         
     | 
| 
      
 109 
     | 
    
         
            +
                                createObjectAtPath(stateCopy, action.value);
         
     | 
| 
      
 110 
     | 
    
         
            +
                            }
         
     | 
| 
      
 111 
     | 
    
         
            +
                            return stateCopy;
         
     | 
| 
      
 112 
     | 
    
         
            +
                        }
         
     | 
| 
      
 113 
     | 
    
         
            +
                    case 'expand_all':
         
     | 
| 
      
 114 
     | 
    
         
            +
                        {
         
     | 
| 
      
 115 
     | 
    
         
            +
                            var filteredItem = action.value;
         
     | 
| 
      
 116 
     | 
    
         
            +
                            return generateNestedTreePathFromFilteredItems(filteredItem);
         
     | 
| 
      
 117 
     | 
    
         
            +
                        }
         
     | 
| 
      
 118 
     | 
    
         
            +
                    default:
         
     | 
| 
      
 119 
     | 
    
         
            +
                        {
         
     | 
| 
      
 120 
     | 
    
         
            +
                            return state;
         
     | 
| 
      
 121 
     | 
    
         
            +
                        }
         
     | 
| 
      
 122 
     | 
    
         
            +
                }
         
     | 
| 
      
 123 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,75 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import React, { useRef } from "react";
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { useVirtualizer } from "@tanstack/react-virtual";
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { getHeightAsNumber } from "../../../../../utils";
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { Item } from "./ui/Item/Item";
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { ListWrapper, ScrollContainer } from "./TreeList.styles";
         
     | 
| 
      
 6 
     | 
    
         
            +
            export var TreeList = function(param) {
         
     | 
| 
      
 7 
     | 
    
         
            +
                var items = param.items, listMaxHeight = param.listMaxHeight, onScroll = param.onScroll, virtual = param.virtual, beforeList = param.beforeList, afterList = param.afterList;
         
     | 
| 
      
 8 
     | 
    
         
            +
                if (virtual) {
         
     | 
| 
      
 9 
     | 
    
         
            +
                    return /*#__PURE__*/ React.createElement(VirtualTreeList, {
         
     | 
| 
      
 10 
     | 
    
         
            +
                        items: items,
         
     | 
| 
      
 11 
     | 
    
         
            +
                        listMaxHeight: listMaxHeight,
         
     | 
| 
      
 12 
     | 
    
         
            +
                        onScroll: onScroll,
         
     | 
| 
      
 13 
     | 
    
         
            +
                        beforeList: beforeList,
         
     | 
| 
      
 14 
     | 
    
         
            +
                        afterList: afterList
         
     | 
| 
      
 15 
     | 
    
         
            +
                    });
         
     | 
| 
      
 16 
     | 
    
         
            +
                }
         
     | 
| 
      
 17 
     | 
    
         
            +
                return /*#__PURE__*/ React.createElement(ListWrapper, null, /*#__PURE__*/ React.createElement(ScrollContainer, {
         
     | 
| 
      
 18 
     | 
    
         
            +
                    listMaxHeight: listMaxHeight,
         
     | 
| 
      
 19 
     | 
    
         
            +
                    onScroll: onScroll
         
     | 
| 
      
 20 
     | 
    
         
            +
                }, beforeList, items === null || items === void 0 ? void 0 : items.map(function(item, index) {
         
     | 
| 
      
 21 
     | 
    
         
            +
                    return /*#__PURE__*/ React.createElement(Item, {
         
     | 
| 
      
 22 
     | 
    
         
            +
                        key: index,
         
     | 
| 
      
 23 
     | 
    
         
            +
                        index: index,
         
     | 
| 
      
 24 
     | 
    
         
            +
                        item: item
         
     | 
| 
      
 25 
     | 
    
         
            +
                    });
         
     | 
| 
      
 26 
     | 
    
         
            +
                }), afterList));
         
     | 
| 
      
 27 
     | 
    
         
            +
            };
         
     | 
| 
      
 28 
     | 
    
         
            +
            var VirtualTreeList = function(param) {
         
     | 
| 
      
 29 
     | 
    
         
            +
                var _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, listMaxHeight = param.listMaxHeight, onScroll = param.onScroll, beforeList = param.beforeList, afterList = param.afterList;
         
     | 
| 
      
 30 
     | 
    
         
            +
                var _virtualItems_;
         
     | 
| 
      
 31 
     | 
    
         
            +
                var parentRef = useRef(null);
         
     | 
| 
      
 32 
     | 
    
         
            +
                var virtualizer = useVirtualizer({
         
     | 
| 
      
 33 
     | 
    
         
            +
                    count: items.length,
         
     | 
| 
      
 34 
     | 
    
         
            +
                    getScrollElement: function() {
         
     | 
| 
      
 35 
     | 
    
         
            +
                        return parentRef.current;
         
     | 
| 
      
 36 
     | 
    
         
            +
                    },
         
     | 
| 
      
 37 
     | 
    
         
            +
                    estimateSize: function() {
         
     | 
| 
      
 38 
     | 
    
         
            +
                        return 48;
         
     | 
| 
      
 39 
     | 
    
         
            +
                    }
         
     | 
| 
      
 40 
     | 
    
         
            +
                });
         
     | 
| 
      
 41 
     | 
    
         
            +
                var virtualItems = virtualizer.getVirtualItems();
         
     | 
| 
      
 42 
     | 
    
         
            +
                var _virtualItems__start;
         
     | 
| 
      
 43 
     | 
    
         
            +
                return /*#__PURE__*/ React.createElement(ListWrapper, null, beforeList, /*#__PURE__*/ React.createElement("div", {
         
     | 
| 
      
 44 
     | 
    
         
            +
                    ref: parentRef,
         
     | 
| 
      
 45 
     | 
    
         
            +
                    style: {
         
     | 
| 
      
 46 
     | 
    
         
            +
                        height: 'auto',
         
     | 
| 
      
 47 
     | 
    
         
            +
                        maxHeight: getHeightAsNumber(listMaxHeight),
         
     | 
| 
      
 48 
     | 
    
         
            +
                        overflowY: 'auto'
         
     | 
| 
      
 49 
     | 
    
         
            +
                    },
         
     | 
| 
      
 50 
     | 
    
         
            +
                    onScroll: onScroll
         
     | 
| 
      
 51 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement("div", {
         
     | 
| 
      
 52 
     | 
    
         
            +
                    style: {
         
     | 
| 
      
 53 
     | 
    
         
            +
                        height: virtualizer.getTotalSize(),
         
     | 
| 
      
 54 
     | 
    
         
            +
                        width: '100%',
         
     | 
| 
      
 55 
     | 
    
         
            +
                        position: 'relative'
         
     | 
| 
      
 56 
     | 
    
         
            +
                    }
         
     | 
| 
      
 57 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement("div", {
         
     | 
| 
      
 58 
     | 
    
         
            +
                    style: {
         
     | 
| 
      
 59 
     | 
    
         
            +
                        position: 'absolute',
         
     | 
| 
      
 60 
     | 
    
         
            +
                        top: 0,
         
     | 
| 
      
 61 
     | 
    
         
            +
                        left: 0,
         
     | 
| 
      
 62 
     | 
    
         
            +
                        width: '100%',
         
     | 
| 
      
 63 
     | 
    
         
            +
                        transform: "translateY(".concat((_virtualItems__start = (_virtualItems_ = virtualItems[0]) === null || _virtualItems_ === void 0 ? void 0 : _virtualItems_.start) !== null && _virtualItems__start !== void 0 ? _virtualItems__start : 0, "px)")
         
     | 
| 
      
 64 
     | 
    
         
            +
                    }
         
     | 
| 
      
 65 
     | 
    
         
            +
                }, virtualItems.map(function(virtualRow) {
         
     | 
| 
      
 66 
     | 
    
         
            +
                    return /*#__PURE__*/ React.createElement("div", {
         
     | 
| 
      
 67 
     | 
    
         
            +
                        key: virtualRow.key,
         
     | 
| 
      
 68 
     | 
    
         
            +
                        "data-index": virtualRow.index,
         
     | 
| 
      
 69 
     | 
    
         
            +
                        ref: virtualizer.measureElement
         
     | 
| 
      
 70 
     | 
    
         
            +
                    }, /*#__PURE__*/ React.createElement(Item, {
         
     | 
| 
      
 71 
     | 
    
         
            +
                        item: items[virtualRow.index],
         
     | 
| 
      
 72 
     | 
    
         
            +
                        index: virtualRow.index
         
     | 
| 
      
 73 
     | 
    
         
            +
                    }));
         
     | 
| 
      
 74 
     | 
    
         
            +
                })))), afterList);
         
     | 
| 
      
 75 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -0,0 +1,13 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import styled from "@emotion/styled";
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { constants, tokens } from "../../Combobox.tokens";
         
     | 
| 
      
 3 
     | 
    
         
            +
            export var ListWrapper = /*#__PURE__*/ styled("div", {
         
     | 
| 
      
 4 
     | 
    
         
            +
                target: "e1w1aqp20",
         
     | 
| 
      
 5 
     | 
    
         
            +
                label: "ListWrapper"
         
     | 
| 
      
 6 
     | 
    
         
            +
            })("width:100%;padding:calc(var(", tokens.padding, ") + var(", tokens.dropdownBorderWidth, ",0rem));border-radius:var(", tokens.borderRadius, ");box-sizing:border-box;background:var(", constants.background, ");box-shadow:", constants.boxShadow, ",inset 0 0 0 var(", tokens.dropdownBorderWidth, ",0rem) var(", tokens.dropdownBorderColor, ",transparent);", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Db21ib2JveC9Db21ib2JveE5ldy91aS9UcmVlTGlzdC9UcmVlTGlzdC5zdHlsZXMudHMiLCJzb3VyY2VzIjpbInNyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29tYm9ib3gvQ29tYm9ib3hOZXcvdWkvVHJlZUxpc3QvVHJlZUxpc3Quc3R5bGVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IFNlbGVjdFByb3BzIH0gZnJvbSAnc3JjL2NvbXBvbmVudHMvU2VsZWN0JztcblxuaW1wb3J0IHsgY29uc3RhbnRzLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9Db21ib2JveC50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgTGlzdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuICAgIHdpZHRoOiAxMDAlO1xuICAgIHBhZGRpbmc6IGNhbGModmFyKCR7dG9rZW5zLnBhZGRpbmd9KSArIHZhcigke3Rva2Vucy5kcm9wZG93bkJvcmRlcldpZHRofSwgMHJlbSkpO1xuICAgIGJvcmRlci1yYWRpdXM6IHZhcigke3Rva2Vucy5ib3JkZXJSYWRpdXN9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIGJhY2tncm91bmQ6IHZhcigke2NvbnN0YW50cy5iYWNrZ3JvdW5kfSk7XG4gICAgYm94LXNoYWRvdzogJHtjb25zdGFudHMuYm94U2hhZG93fSxcbiAgICAgICAgaW5zZXQgMCAwIDAgdmFyKCR7dG9rZW5zLmRyb3Bkb3duQm9yZGVyV2lkdGh9LCAwcmVtKSB2YXIoJHt0b2tlbnMuZHJvcGRvd25Cb3JkZXJDb2xvcn0sIHRyYW5zcGFyZW50KTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTY3JvbGxDb250YWluZXIgPSBzdHlsZWQuZGl2PHtcbiAgICBsaXN0TWF4SGVpZ2h0PzogU2VsZWN0UHJvcHNbJ2xpc3RNYXhIZWlnaHQnXTtcbn0+YFxuICAgIG1heC1oZWlnaHQ6ICR7KHsgbGlzdE1heEhlaWdodCB9KSA9PiBsaXN0TWF4SGVpZ2h0IHx8ICdhdXRvJ307XG4gICAgb3ZlcmZsb3cteDogaGlkZGVuO1xuICAgIG92ZXJmbG93LXk6IGF1dG87XG4gICAgYm9yZGVyLXJhZGl1czogY2FsYyh2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSkgLSAwLjEyNXJlbSAtIHZhcigke3Rva2Vucy5kcm9wZG93bkJvcmRlcldpZHRofSwgMHJlbSkpO1xuYDtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLMkIifQ== */");
         
     | 
| 
      
 7 
     | 
    
         
            +
            export var ScrollContainer = /*#__PURE__*/ styled("div", {
         
     | 
| 
      
 8 
     | 
    
         
            +
                target: "e1w1aqp21",
         
     | 
| 
      
 9 
     | 
    
         
            +
                label: "ScrollContainer"
         
     | 
| 
      
 10 
     | 
    
         
            +
            })("max-height:", function(param) {
         
     | 
| 
      
 11 
     | 
    
         
            +
                var listMaxHeight = param.listMaxHeight;
         
     | 
| 
      
 12 
     | 
    
         
            +
                return listMaxHeight || 'auto';
         
     | 
| 
      
 13 
     | 
    
         
            +
            }, ";overflow-x:hidden;overflow-y:auto;border-radius:calc(var(", tokens.borderRadius, ") - 0.125rem - var(", tokens.dropdownBorderWidth, ",0rem));", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Db21ib2JveC9Db21ib2JveE5ldy91aS9UcmVlTGlzdC9UcmVlTGlzdC5zdHlsZXMudHMiLCJzb3VyY2VzIjpbInNyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29tYm9ib3gvQ29tYm9ib3hOZXcvdWkvVHJlZUxpc3QvVHJlZUxpc3Quc3R5bGVzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IFNlbGVjdFByb3BzIH0gZnJvbSAnc3JjL2NvbXBvbmVudHMvU2VsZWN0JztcblxuaW1wb3J0IHsgY29uc3RhbnRzLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9Db21ib2JveC50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgTGlzdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuICAgIHdpZHRoOiAxMDAlO1xuICAgIHBhZGRpbmc6IGNhbGModmFyKCR7dG9rZW5zLnBhZGRpbmd9KSArIHZhcigke3Rva2Vucy5kcm9wZG93bkJvcmRlcldpZHRofSwgMHJlbSkpO1xuICAgIGJvcmRlci1yYWRpdXM6IHZhcigke3Rva2Vucy5ib3JkZXJSYWRpdXN9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIGJhY2tncm91bmQ6IHZhcigke2NvbnN0YW50cy5iYWNrZ3JvdW5kfSk7XG4gICAgYm94LXNoYWRvdzogJHtjb25zdGFudHMuYm94U2hhZG93fSxcbiAgICAgICAgaW5zZXQgMCAwIDAgdmFyKCR7dG9rZW5zLmRyb3Bkb3duQm9yZGVyV2lkdGh9LCAwcmVtKSB2YXIoJHt0b2tlbnMuZHJvcGRvd25Cb3JkZXJDb2xvcn0sIHRyYW5zcGFyZW50KTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTY3JvbGxDb250YWluZXIgPSBzdHlsZWQuZGl2PHtcbiAgICBsaXN0TWF4SGVpZ2h0PzogU2VsZWN0UHJvcHNbJ2xpc3RNYXhIZWlnaHQnXTtcbn0+YFxuICAgIG1heC1oZWlnaHQ6ICR7KHsgbGlzdE1heEhlaWdodCB9KSA9PiBsaXN0TWF4SGVpZ2h0IHx8ICdhdXRvJ307XG4gICAgb3ZlcmZsb3cteDogaGlkZGVuO1xuICAgIG92ZXJmbG93LXk6IGF1dG87XG4gICAgYm9yZGVyLXJhZGl1czogY2FsYyh2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSkgLSAwLjEyNXJlbSAtIHZhcigke3Rva2Vucy5kcm9wZG93bkJvcmRlcldpZHRofSwgMHJlbSkpO1xuYDtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlK0IifQ== */");
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            export { };
         
     | 
| 
         @@ -0,0 +1,97 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import React, { useContext } from "react";
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { classes } from "../../../../../../Select/Select.tokens";
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { sizeToIconSize } from "../../../../../../Select/utils";
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { keyExists } from "../../../../reducers/treePathReducer";
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { Context } from "../../../../Combobox.context";
         
     | 
| 
      
 6 
     | 
    
         
            +
            import { ItemWrapper, ChildItems, Offset, IconWrapper, StyledCheckboxWrapper, StyledCheckbox, StyledIndicator, StyledIconDone, StyledText, StyledWrapper, StyledCell, DisclosureIconWrapper, StyledArrowRight, Wrapper, StyledArrowLeft } from "./Item.styles";
         
     | 
| 
      
 7 
     | 
    
         
            +
            export var Item = function(param) {
         
     | 
| 
      
 8 
     | 
    
         
            +
                var item = param.item, index = param.index;
         
     | 
| 
      
 9 
     | 
    
         
            +
                var _valueToPathMap_get, _item_items;
         
     | 
| 
      
 10 
     | 
    
         
            +
                var label = item.label, value = item.value, disabled = item.disabled, contentLeft = item.contentLeft, contentRight = item.contentRight;
         
     | 
| 
      
 11 
     | 
    
         
            +
                var isLeaf = !(item === null || item === void 0 ? void 0 : item.items);
         
     | 
| 
      
 12 
     | 
    
         
            +
                var _useContext = useContext(Context), checked = _useContext.checked, multiple = _useContext.multiple, size = _useContext.size, variant = _useContext.variant, renderItem = _useContext.renderItem, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
         
     | 
| 
      
 13 
     | 
    
         
            +
                // @ts-ignore
         
     | 
| 
      
 14 
     | 
    
         
            +
                _checkboxAppearance = _useContext._checkboxAppearance, focusedPath = _useContext.focusedPath, treePath = _useContext.treePath, dispatchTreePath = _useContext.dispatchTreePath, arrowPlacement = _useContext.arrowPlacement, handleItemClick = _useContext.handleItemClick, handleCheckboxChange = _useContext.handleCheckboxChange, valueToPathMap = _useContext.valueToPathMap;
         
     | 
| 
      
 15 
     | 
    
         
            +
                var itemDisabled = disabled;
         
     | 
| 
      
 16 
     | 
    
         
            +
                var currentItemDepth = (((_valueToPathMap_get = valueToPathMap.get(item.value.toString())) === null || _valueToPathMap_get === void 0 ? void 0 : _valueToPathMap_get.length) || 0) - 1;
         
     | 
| 
      
 17 
     | 
    
         
            +
                var isCurrentLevelOpened = keyExists(treePath, valueToPathMap.get(value.toString()) || []);
         
     | 
| 
      
 18 
     | 
    
         
            +
                var withArrowInverse = isCurrentLevelOpened ? classes.arrowInverse : undefined;
         
     | 
| 
      
 19 
     | 
    
         
            +
                var focusedClass = currentItemDepth === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentItemDepth]) ? classes.dropdownItemIsFocused : undefined;
         
     | 
| 
      
 20 
     | 
    
         
            +
                var handleClick = function(e) {
         
     | 
| 
      
 21 
     | 
    
         
            +
                    if (!isLeaf) {
         
     | 
| 
      
 22 
     | 
    
         
            +
                        dispatchTreePath({
         
     | 
| 
      
 23 
     | 
    
         
            +
                            type: 'toggled_level',
         
     | 
| 
      
 24 
     | 
    
         
            +
                            value: valueToPathMap.get(value.toString()) || []
         
     | 
| 
      
 25 
     | 
    
         
            +
                        });
         
     | 
| 
      
 26 
     | 
    
         
            +
                    }
         
     | 
| 
      
 27 
     | 
    
         
            +
                    if (handleItemClick) {
         
     | 
| 
      
 28 
     | 
    
         
            +
                        handleItemClick(item, e);
         
     | 
| 
      
 29 
     | 
    
         
            +
                    }
         
     | 
| 
      
 30 
     | 
    
         
            +
                };
         
     | 
| 
      
 31 
     | 
    
         
            +
                var handleChange = function(e) {
         
     | 
| 
      
 32 
     | 
    
         
            +
                    if (itemDisabled) return;
         
     | 
| 
      
 33 
     | 
    
         
            +
                    e.stopPropagation();
         
     | 
| 
      
 34 
     | 
    
         
            +
                    handleCheckboxChange(item);
         
     | 
| 
      
 35 
     | 
    
         
            +
                };
         
     | 
| 
      
 36 
     | 
    
         
            +
                return /*#__PURE__*/ React.createElement(ItemWrapper, null, /*#__PURE__*/ React.createElement(Wrapper, {
         
     | 
| 
      
 37 
     | 
    
         
            +
                    className: focusedClass,
         
     | 
| 
      
 38 
     | 
    
         
            +
                    onClick: handleClick,
         
     | 
| 
      
 39 
     | 
    
         
            +
                    variant: variant,
         
     | 
| 
      
 40 
     | 
    
         
            +
                    role: "treeitem"
         
     | 
| 
      
 41 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement(Offset, {
         
     | 
| 
      
 42 
     | 
    
         
            +
                    depth: currentItemDepth
         
     | 
| 
      
 43 
     | 
    
         
            +
                }), arrowPlacement === 'left' && /*#__PURE__*/ React.createElement(DisclosureIconWrapper, {
         
     | 
| 
      
 44 
     | 
    
         
            +
                    visibility: isLeaf ? 'hidden' : 'visible'
         
     | 
| 
      
 45 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement(StyledArrowLeft, {
         
     | 
| 
      
 46 
     | 
    
         
            +
                    size: sizeToIconSize(size, variant),
         
     | 
| 
      
 47 
     | 
    
         
            +
                    color: "inherit",
         
     | 
| 
      
 48 
     | 
    
         
            +
                    className: withArrowInverse
         
     | 
| 
      
 49 
     | 
    
         
            +
                })), multiple && /*#__PURE__*/ React.createElement(IconWrapper, {
         
     | 
| 
      
 50 
     | 
    
         
            +
                    variant: variant
         
     | 
| 
      
 51 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement(StyledCheckboxWrapper, {
         
     | 
| 
      
 52 
     | 
    
         
            +
                    onClick: function(e) {
         
     | 
| 
      
 53 
     | 
    
         
            +
                        return e.stopPropagation();
         
     | 
| 
      
 54 
     | 
    
         
            +
                    }
         
     | 
| 
      
 55 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement(StyledCheckbox, {
         
     | 
| 
      
 56 
     | 
    
         
            +
                    disabled: itemDisabled,
         
     | 
| 
      
 57 
     | 
    
         
            +
                    checked: Boolean(checked.get(item.value)),
         
     | 
| 
      
 58 
     | 
    
         
            +
                    indeterminate: checked.get(item.value) === 'indeterminate',
         
     | 
| 
      
 59 
     | 
    
         
            +
                    onChange: handleChange,
         
     | 
| 
      
 60 
     | 
    
         
            +
                    appearance: _checkboxAppearance !== null && _checkboxAppearance !== void 0 ? _checkboxAppearance : 'default'
         
     | 
| 
      
 61 
     | 
    
         
            +
                }))), !multiple && arrowPlacement === 'right' && /*#__PURE__*/ React.createElement(IconWrapper, {
         
     | 
| 
      
 62 
     | 
    
         
            +
                    variant: variant
         
     | 
| 
      
 63 
     | 
    
         
            +
                }, checked.get(item.value) === 'dot' && /*#__PURE__*/ React.createElement(StyledIndicator, {
         
     | 
| 
      
 64 
     | 
    
         
            +
                    size: "s",
         
     | 
| 
      
 65 
     | 
    
         
            +
                    view: "default"
         
     | 
| 
      
 66 
     | 
    
         
            +
                }), checked.get(item.value) === 'done' && /*#__PURE__*/ React.createElement(StyledIconDone, {
         
     | 
| 
      
 67 
     | 
    
         
            +
                    size: sizeToIconSize(size, variant),
         
     | 
| 
      
 68 
     | 
    
         
            +
                    color: "inherit"
         
     | 
| 
      
 69 
     | 
    
         
            +
                })), renderItem ? /*#__PURE__*/ React.createElement(StyledText, null, renderItem(item)) : /*#__PURE__*/ React.createElement(StyledWrapper, null, /*#__PURE__*/ React.createElement(StyledCell, {
         
     | 
| 
      
 70 
     | 
    
         
            +
                    contentLeft: contentLeft,
         
     | 
| 
      
 71 
     | 
    
         
            +
                    contentRight: contentRight,
         
     | 
| 
      
 72 
     | 
    
         
            +
                    // TODO: #1548
         
     | 
| 
      
 73 
     | 
    
         
            +
                    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
         
     | 
| 
      
 74 
     | 
    
         
            +
                    // @ts-ignore
         
     | 
| 
      
 75 
     | 
    
         
            +
                    title: /*#__PURE__*/ React.createElement("span", null, label)
         
     | 
| 
      
 76 
     | 
    
         
            +
                })), !multiple && arrowPlacement === 'left' && /*#__PURE__*/ React.createElement(IconWrapper, {
         
     | 
| 
      
 77 
     | 
    
         
            +
                    variant: variant
         
     | 
| 
      
 78 
     | 
    
         
            +
                }, checked.get(item.value) === 'dot' && /*#__PURE__*/ React.createElement(StyledIndicator, {
         
     | 
| 
      
 79 
     | 
    
         
            +
                    size: "s",
         
     | 
| 
      
 80 
     | 
    
         
            +
                    view: "default"
         
     | 
| 
      
 81 
     | 
    
         
            +
                }), checked.get(item.value) === 'done' && /*#__PURE__*/ React.createElement(StyledIconDone, {
         
     | 
| 
      
 82 
     | 
    
         
            +
                    size: sizeToIconSize(size, variant),
         
     | 
| 
      
 83 
     | 
    
         
            +
                    color: "inherit"
         
     | 
| 
      
 84 
     | 
    
         
            +
                })), arrowPlacement === 'right' && /*#__PURE__*/ React.createElement(DisclosureIconWrapper, {
         
     | 
| 
      
 85 
     | 
    
         
            +
                    visibility: isLeaf ? 'hidden' : 'visible'
         
     | 
| 
      
 86 
     | 
    
         
            +
                }, /*#__PURE__*/ React.createElement(StyledArrowRight, {
         
     | 
| 
      
 87 
     | 
    
         
            +
                    size: sizeToIconSize(size, variant),
         
     | 
| 
      
 88 
     | 
    
         
            +
                    color: "inherit",
         
     | 
| 
      
 89 
     | 
    
         
            +
                    className: withArrowInverse
         
     | 
| 
      
 90 
     | 
    
         
            +
                }))), !isLeaf && isCurrentLevelOpened && /*#__PURE__*/ React.createElement(ChildItems, null, (_item_items = item.items) === null || _item_items === void 0 ? void 0 : _item_items.map(function(item, index) {
         
     | 
| 
      
 91 
     | 
    
         
            +
                    return /*#__PURE__*/ React.createElement(Item, {
         
     | 
| 
      
 92 
     | 
    
         
            +
                        item: item,
         
     | 
| 
      
 93 
     | 
    
         
            +
                        index: index,
         
     | 
| 
      
 94 
     | 
    
         
            +
                        key: index
         
     | 
| 
      
 95 
     | 
    
         
            +
                    });
         
     | 
| 
      
 96 
     | 
    
         
            +
                })));
         
     | 
| 
      
 97 
     | 
    
         
            +
            };
         
     |