@salutejs/plasma-new-hope 0.339.0-canary.2286.18557548158.0 → 0.339.0-canary.2288.18653805742.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/Attach/Attach.css +68 -24
- package/cjs/components/Attach/Attach.js +177 -32
- package/cjs/components/Attach/Attach.js.map +1 -1
- package/cjs/components/Attach/Attach.styles.js +46 -5
- package/cjs/components/Attach/Attach.styles.js.map +1 -1
- package/cjs/components/Attach/Attach.styles_14g2czk.css +8 -0
- package/cjs/components/Attach/Attach.tokens.js +21 -6
- package/cjs/components/Attach/Attach.tokens.js.map +1 -1
- package/cjs/components/Attach/components/AttachButton/AttachButton.css +82 -15
- package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.css +105 -0
- package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +29 -0
- package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js.map +1 -0
- package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +21 -0
- package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js.map +1 -0
- package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles_3t6n6e.css +2 -0
- package/cjs/components/Attach/ui/Cell/Cell.css +60 -0
- package/cjs/components/Attach/ui/Cell/Cell.js +46 -0
- package/cjs/components/Attach/ui/Cell/Cell.js.map +1 -0
- package/cjs/components/Attach/ui/Cell/Cell.styles.js +1 -1
- package/{es/components/Attach/ui/Cell/Cell.styles_69w962.css → cjs/components/Attach/ui/Cell/Cell.styles_lpj30y.css} +1 -1
- package/cjs/components/Attach/ui/Dropdown/Dropdown.css +100 -0
- package/cjs/components/Attach/ui/Dropdown/Dropdown.js +69 -0
- package/cjs/components/Attach/ui/Dropdown/Dropdown.js.map +1 -0
- package/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js +22 -0
- package/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js.map +1 -0
- package/cjs/components/Attach/ui/Dropdown/Dropdown.styles_1ge65dg.css +1 -0
- package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.css +3 -0
- package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js +23 -0
- package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js.map +1 -0
- package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +15 -0
- package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js.map +1 -0
- package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles_5yseaa.css +1 -0
- package/cjs/components/Attach/utils/getFilenameParts.js +21 -0
- package/cjs/components/Attach/utils/getFilenameParts.js.map +1 -0
- package/cjs/components/Attach/variations/_size/base.js +1 -1
- package/cjs/components/Attach/variations/_size/base.js.map +1 -1
- package/cjs/components/Attach/variations/_size/base_1x0gzlt.css +1 -0
- package/cjs/components/Attach/variations/_view/base.js +1 -1
- package/cjs/components/Attach/variations/_view/base_d9xz7t.css +1 -0
- package/cjs/components/Pagination/Pagination.css +0 -19
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +0 -19
- package/cjs/components/Select/Select.css +0 -19
- package/cjs/components/Select/Select.js +9 -42
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.tokens.js +0 -2
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/hooks/useKeyboardNavigation.js +1 -185
- package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +3 -7
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Table/Table.css +0 -19
- package/cjs/components/Table/ui/Cell/Cell.css +0 -19
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +0 -19
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +0 -19
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +0 -19
- package/cjs/components/Tree/utils/traverseTree.js +23 -2
- package/cjs/components/Tree/utils/traverseTree.js.map +1 -1
- package/cjs/components/_Icon/Icon.assets/DotsHorizontalOutline.js +27 -0
- package/cjs/components/_Icon/Icon.assets/DotsHorizontalOutline.js.map +1 -0
- package/cjs/components/_Icon/Icons/IconDotsHorizontalOutline.js +31 -0
- package/cjs/components/_Icon/Icons/IconDotsHorizontalOutline.js.map +1 -0
- package/cjs/index.css +17 -28
- package/cjs/index.js +0 -2
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Attach/Attach.js +190 -28
- package/emotion/cjs/components/Attach/Attach.styles.js +33 -14
- package/emotion/cjs/components/Attach/Attach.tokens.js +21 -6
- package/emotion/cjs/components/Attach/components/AttachButton/AttachButton.js +3 -4
- package/emotion/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +64 -0
- package/emotion/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +33 -0
- package/emotion/cjs/components/Attach/components/HiddenWidthHelper/index.js +11 -0
- package/emotion/cjs/components/Attach/components/index.js +19 -0
- package/emotion/cjs/components/Attach/ui/Cell/Cell.js +67 -2
- package/emotion/cjs/components/Attach/ui/Dropdown/Dropdown.js +225 -0
- package/emotion/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js +26 -0
- package/emotion/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js +26 -0
- package/emotion/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +21 -0
- package/emotion/cjs/components/Attach/ui/index.js +29 -0
- package/emotion/cjs/components/Attach/utils/getFilenameParts.js +23 -0
- package/emotion/cjs/components/Attach/utils/index.js +4 -0
- package/emotion/cjs/components/Attach/variations/_size/base.js +1 -1
- package/emotion/cjs/components/Select/Select.js +6 -31
- package/emotion/cjs/components/Select/Select.tokens.js +0 -2
- package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +0 -166
- package/emotion/cjs/components/Select/hooks/usePathMaps.js +3 -35
- package/emotion/cjs/components/Select/reducers/index.js +0 -1
- package/emotion/cjs/components/Select/ui/index.js +0 -1
- package/emotion/cjs/components/Tree/utils/traverseTree.js +60 -2
- package/emotion/cjs/examples/components/Attach/Attach.config.js +18 -18
- package/emotion/cjs/examples/components/Select/Select.config.js +24 -24
- package/emotion/cjs/utils/index.js +0 -4
- package/emotion/es/components/Attach/Attach.js +193 -31
- package/emotion/es/components/Attach/Attach.styles.js +30 -14
- package/emotion/es/components/Attach/Attach.tokens.js +21 -6
- package/emotion/es/components/Attach/components/AttachButton/AttachButton.js +1 -2
- package/emotion/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +13 -0
- package/emotion/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +10 -0
- package/emotion/es/components/Attach/components/HiddenWidthHelper/index.js +1 -0
- package/emotion/es/components/Attach/components/index.js +2 -0
- package/emotion/es/components/Attach/ui/Cell/Cell.js +25 -1
- package/emotion/es/components/Attach/ui/Dropdown/Dropdown.js +174 -0
- package/emotion/es/components/Attach/ui/Dropdown/Dropdown.styles.js +11 -0
- package/emotion/es/components/Attach/ui/MoreTrigger/MoreTrigger.js +11 -0
- package/emotion/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +6 -0
- package/emotion/es/components/Attach/ui/index.js +6 -0
- package/emotion/es/components/Attach/utils/getFilenameParts.js +13 -0
- package/emotion/es/components/Attach/utils/index.js +1 -0
- package/emotion/es/components/Attach/variations/_size/base.js +1 -1
- package/emotion/es/components/Select/Select.js +8 -33
- package/emotion/es/components/Select/Select.tokens.js +0 -2
- package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +0 -166
- package/emotion/es/components/Select/hooks/usePathMaps.js +4 -36
- package/emotion/es/components/Select/reducers/index.js +0 -1
- package/emotion/es/components/Select/ui/index.js +0 -1
- package/emotion/es/components/Tree/utils/traverseTree.js +59 -1
- package/emotion/es/examples/components/Attach/Attach.config.js +18 -18
- package/emotion/es/examples/components/Select/Select.config.js +24 -24
- package/emotion/es/utils/index.js +0 -1
- package/es/components/Attach/Attach.css +68 -24
- package/es/components/Attach/Attach.js +180 -35
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/Attach.styles.js +46 -6
- package/es/components/Attach/Attach.styles.js.map +1 -1
- package/es/components/Attach/Attach.styles_14g2czk.css +8 -0
- package/es/components/Attach/Attach.tokens.js +21 -6
- package/es/components/Attach/Attach.tokens.js.map +1 -1
- package/es/components/Attach/components/AttachButton/AttachButton.css +82 -15
- package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.css +105 -0
- package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +21 -0
- package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js.map +1 -0
- package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +16 -0
- package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js.map +1 -0
- package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles_3t6n6e.css +2 -0
- package/es/components/Attach/ui/Cell/Cell.css +60 -0
- package/es/components/Attach/ui/Cell/Cell.js +38 -0
- package/es/components/Attach/ui/Cell/Cell.js.map +1 -0
- package/es/components/Attach/ui/Cell/Cell.styles.js +1 -1
- package/{cjs/components/Attach/ui/Cell/Cell.styles_69w962.css → es/components/Attach/ui/Cell/Cell.styles_lpj30y.css} +1 -1
- package/es/components/Attach/ui/Dropdown/Dropdown.css +100 -0
- package/es/components/Attach/ui/Dropdown/Dropdown.js +61 -0
- package/es/components/Attach/ui/Dropdown/Dropdown.js.map +1 -0
- package/es/components/Attach/ui/Dropdown/Dropdown.styles.js +18 -0
- package/es/components/Attach/ui/Dropdown/Dropdown.styles.js.map +1 -0
- package/es/components/Attach/ui/Dropdown/Dropdown.styles_1ge65dg.css +1 -0
- package/es/components/Attach/ui/MoreTrigger/MoreTrigger.css +3 -0
- package/es/components/Attach/ui/MoreTrigger/MoreTrigger.js +15 -0
- package/es/components/Attach/ui/MoreTrigger/MoreTrigger.js.map +1 -0
- package/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +11 -0
- package/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js.map +1 -0
- package/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles_5yseaa.css +1 -0
- package/es/components/Attach/utils/getFilenameParts.js +17 -0
- package/es/components/Attach/utils/getFilenameParts.js.map +1 -0
- package/es/components/Attach/variations/_size/base.js +1 -1
- package/es/components/Attach/variations/_size/base.js.map +1 -1
- package/es/components/Attach/variations/_size/base_1x0gzlt.css +1 -0
- package/es/components/Attach/variations/_view/base.js +1 -1
- package/es/components/Attach/variations/_view/base_d9xz7t.css +1 -0
- package/es/components/Pagination/Pagination.css +0 -19
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +0 -19
- package/es/components/Select/Select.css +0 -19
- package/es/components/Select/Select.js +9 -42
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.tokens.js +0 -2
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/hooks/useKeyboardNavigation.js +1 -185
- package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +3 -7
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Table/Table.css +0 -19
- package/es/components/Table/ui/Cell/Cell.css +0 -19
- package/es/components/Table/ui/EditableCell/EditableCell.css +0 -19
- package/es/components/Table/ui/HeadCell/HeadCell.css +0 -19
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +0 -19
- package/es/components/Tree/utils/traverseTree.js +23 -2
- package/es/components/Tree/utils/traverseTree.js.map +1 -1
- package/es/components/_Icon/Icon.assets/DotsHorizontalOutline.js +19 -0
- package/es/components/_Icon/Icon.assets/DotsHorizontalOutline.js.map +1 -0
- package/es/components/_Icon/Icons/IconDotsHorizontalOutline.js +23 -0
- package/es/components/_Icon/Icons/IconDotsHorizontalOutline.js.map +1 -0
- package/es/index.css +17 -28
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Attach/Attach.js +190 -28
- package/styled-components/cjs/components/Attach/Attach.styles.js +40 -12
- package/styled-components/cjs/components/Attach/Attach.tokens.js +21 -6
- package/styled-components/cjs/components/Attach/components/AttachButton/AttachButton.js +3 -4
- package/styled-components/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +64 -0
- package/styled-components/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +39 -0
- package/styled-components/cjs/components/Attach/components/HiddenWidthHelper/index.js +11 -0
- package/styled-components/cjs/components/Attach/components/index.js +19 -0
- package/styled-components/cjs/components/Attach/ui/Cell/Cell.js +67 -2
- package/styled-components/cjs/components/Attach/ui/Dropdown/Dropdown.js +225 -0
- package/styled-components/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js +45 -0
- package/styled-components/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js +26 -0
- package/styled-components/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +24 -0
- package/styled-components/cjs/components/Attach/ui/index.js +29 -0
- package/styled-components/cjs/components/Attach/utils/getFilenameParts.js +23 -0
- package/styled-components/cjs/components/Attach/utils/index.js +4 -0
- package/styled-components/cjs/components/Attach/variations/_size/base.js +5 -2
- package/styled-components/cjs/components/Select/Select.js +6 -31
- package/styled-components/cjs/components/Select/Select.tokens.js +0 -2
- package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +0 -166
- package/styled-components/cjs/components/Select/hooks/usePathMaps.js +3 -35
- package/styled-components/cjs/components/Select/reducers/index.js +0 -1
- package/styled-components/cjs/components/Select/ui/index.js +0 -1
- package/styled-components/cjs/components/Tree/utils/traverseTree.js +60 -2
- package/styled-components/cjs/examples/components/Attach/Attach.config.js +64 -32
- package/styled-components/cjs/examples/components/Select/Select.config.js +4 -12
- package/styled-components/cjs/utils/index.js +0 -4
- package/styled-components/es/components/Attach/Attach.js +193 -31
- package/styled-components/es/components/Attach/Attach.styles.js +37 -12
- package/styled-components/es/components/Attach/Attach.tokens.js +21 -6
- package/styled-components/es/components/Attach/components/AttachButton/AttachButton.js +1 -2
- package/styled-components/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +13 -0
- package/styled-components/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +16 -0
- package/styled-components/es/components/Attach/components/HiddenWidthHelper/index.js +1 -0
- package/styled-components/es/components/Attach/components/index.js +2 -0
- package/styled-components/es/components/Attach/ui/Cell/Cell.js +25 -1
- package/styled-components/es/components/Attach/ui/Dropdown/Dropdown.js +174 -0
- package/styled-components/es/components/Attach/ui/Dropdown/Dropdown.styles.js +30 -0
- package/styled-components/es/components/Attach/ui/MoreTrigger/MoreTrigger.js +11 -0
- package/styled-components/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +9 -0
- package/styled-components/es/components/Attach/ui/index.js +6 -0
- package/styled-components/es/components/Attach/utils/getFilenameParts.js +13 -0
- package/styled-components/es/components/Attach/utils/index.js +1 -0
- package/styled-components/es/components/Attach/variations/_size/base.js +5 -2
- package/styled-components/es/components/Select/Select.js +8 -33
- package/styled-components/es/components/Select/Select.tokens.js +0 -2
- package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +0 -166
- package/styled-components/es/components/Select/hooks/usePathMaps.js +4 -36
- package/styled-components/es/components/Select/reducers/index.js +0 -1
- package/styled-components/es/components/Select/ui/index.js +0 -1
- package/styled-components/es/components/Tree/utils/traverseTree.js +59 -1
- package/styled-components/es/examples/components/Attach/Attach.config.js +64 -32
- package/styled-components/es/examples/components/Select/Select.config.js +4 -12
- package/styled-components/es/utils/index.js +0 -1
- package/types/components/Attach/Attach.d.ts.map +1 -1
- package/types/components/Attach/Attach.styles.d.ts +9 -2
- package/types/components/Attach/Attach.styles.d.ts.map +1 -1
- package/types/components/Attach/Attach.tokens.d.ts +13 -0
- package/types/components/Attach/Attach.tokens.d.ts.map +1 -1
- package/types/components/Attach/Attach.types.d.ts +85 -9
- package/types/components/Attach/Attach.types.d.ts.map +1 -1
- package/types/components/Attach/components/AttachButton/AttachButton.d.ts.map +1 -1
- package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.d.ts +10 -0
- package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.d.ts.map +1 -0
- package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.d.ts +3 -0
- package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.d.ts.map +1 -0
- package/types/components/Attach/components/HiddenWidthHelper/index.d.ts +2 -0
- package/types/components/Attach/components/HiddenWidthHelper/index.d.ts.map +1 -0
- package/types/components/Attach/components/index.d.ts +3 -0
- package/types/components/Attach/components/index.d.ts.map +1 -0
- package/types/components/Attach/ui/Cell/Cell.d.ts +14 -1
- package/types/components/Attach/ui/Cell/Cell.d.ts.map +1 -1
- package/types/components/Attach/ui/Dropdown/Dropdown.d.ts +12 -0
- package/types/components/Attach/ui/Dropdown/Dropdown.d.ts.map +1 -0
- package/types/components/Attach/ui/Dropdown/Dropdown.styles.d.ts +31 -0
- package/types/components/Attach/ui/Dropdown/Dropdown.styles.d.ts.map +1 -0
- package/types/components/Attach/ui/MoreTrigger/MoreTrigger.d.ts +6 -0
- package/types/components/Attach/ui/MoreTrigger/MoreTrigger.d.ts.map +1 -0
- package/types/components/Attach/ui/MoreTrigger/MoreTrigger.styles.d.ts +2 -0
- package/types/components/Attach/ui/MoreTrigger/MoreTrigger.styles.d.ts.map +1 -0
- package/types/components/Attach/ui/index.d.ts +7 -0
- package/types/components/Attach/ui/index.d.ts.map +1 -0
- package/types/components/Attach/utils/getFilenameParts.d.ts +8 -0
- package/types/components/Attach/utils/getFilenameParts.d.ts.map +1 -0
- package/types/components/Attach/utils/index.d.ts +1 -0
- package/types/components/Attach/utils/index.d.ts.map +1 -1
- package/types/components/Attach/variations/_size/base.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +0 -12
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +0 -2
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +2 -26
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/hooks/useKeyboardNavigation.d.ts +2 -6
- package/types/components/Select/hooks/useKeyboardNavigation.d.ts.map +1 -1
- package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
- package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
- package/types/components/Select/reducers/index.d.ts +0 -1
- package/types/components/Select/reducers/index.d.ts.map +1 -1
- package/types/components/Select/ui/index.d.ts +0 -1
- package/types/components/Select/ui/index.d.ts.map +1 -1
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts +0 -12
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts.map +1 -1
- package/types/components/Tree/utils/traverseTree.d.ts.map +1 -1
- package/types/examples/components/Attach/Attach.config.d.ts.map +1 -1
- package/types/examples/components/Attach/Attach.d.ts +448 -16
- package/types/examples/components/Attach/Attach.d.ts.map +1 -1
- package/types/examples/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/components/Select/Select.d.ts +0 -12
- package/types/examples/components/Select/Select.d.ts.map +1 -1
- package/types/types/MakeNever.d.ts +4 -0
- package/types/types/MakeNever.d.ts.map +1 -0
- package/types/types/index.d.ts +1 -0
- package/types/types/index.d.ts.map +1 -1
- package/types/utils/index.d.ts +0 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Attach/Attach.styles_pso18d.css +0 -7
- package/cjs/components/Attach/variations/_size/base_kpo9at.css +0 -1
- package/cjs/components/Attach/variations/_view/base_1nvsg1b.css +0 -1
- package/cjs/components/Select/reducers/treePathReducer.js +0 -87
- package/cjs/components/Select/reducers/treePathReducer.js.map +0 -1
- package/cjs/components/Select/ui/TreeList/TreeList.css +0 -57
- package/cjs/components/Select/ui/TreeList/TreeList.js +0 -90
- package/cjs/components/Select/ui/TreeList/TreeList.js.map +0 -1
- package/cjs/components/Select/ui/TreeList/TreeList.styles.js +0 -30
- package/cjs/components/Select/ui/TreeList/TreeList.styles.js.map +0 -1
- package/cjs/components/Select/ui/TreeList/TreeList.styles_1t38mek.css +0 -2
- package/cjs/components/Select/ui/TreeList/ui/Item/Item.css +0 -54
- package/cjs/components/Select/ui/TreeList/ui/Item/Item.js +0 -71
- package/cjs/components/Select/ui/TreeList/ui/Item/Item.js.map +0 -1
- package/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -214
- package/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js.map +0 -1
- package/cjs/components/Select/ui/TreeList/ui/Item/Item.styles_i0dby2.css +0 -15
- package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -89
- package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js.map +0 -1
- package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -89
- package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js.map +0 -1
- package/cjs/utils/deepCopy.js +0 -30
- package/cjs/utils/deepCopy.js.map +0 -1
- package/emotion/cjs/components/Select/reducers/treePathReducer.js +0 -98
- package/emotion/cjs/components/Select/ui/TreeList/TreeList.js +0 -124
- package/emotion/cjs/components/Select/ui/TreeList/TreeList.styles.js +0 -36
- package/emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.js +0 -101
- package/emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -186
- package/emotion/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -112
- package/emotion/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -112
- package/emotion/cjs/utils/deepCopy.js +0 -82
- package/emotion/es/components/Select/reducers/treePathReducer.js +0 -81
- package/emotion/es/components/Select/ui/TreeList/TreeList.js +0 -73
- package/emotion/es/components/Select/ui/TreeList/TreeList.styles.js +0 -13
- package/emotion/es/components/Select/ui/TreeList/ui/Item/Item.js +0 -50
- package/emotion/es/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -122
- package/emotion/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -61
- package/emotion/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -61
- package/emotion/es/utils/deepCopy.js +0 -72
- package/es/components/Attach/Attach.styles_pso18d.css +0 -7
- package/es/components/Attach/variations/_size/base_kpo9at.css +0 -1
- package/es/components/Attach/variations/_view/base_1nvsg1b.css +0 -1
- package/es/components/Select/reducers/treePathReducer.js +0 -82
- package/es/components/Select/reducers/treePathReducer.js.map +0 -1
- package/es/components/Select/ui/TreeList/TreeList.css +0 -57
- package/es/components/Select/ui/TreeList/TreeList.js +0 -82
- package/es/components/Select/ui/TreeList/TreeList.js.map +0 -1
- package/es/components/Select/ui/TreeList/TreeList.styles.js +0 -25
- package/es/components/Select/ui/TreeList/TreeList.styles.js.map +0 -1
- package/es/components/Select/ui/TreeList/TreeList.styles_1t38mek.css +0 -2
- package/es/components/Select/ui/TreeList/ui/Item/Item.css +0 -54
- package/es/components/Select/ui/TreeList/ui/Item/Item.js +0 -63
- package/es/components/Select/ui/TreeList/ui/Item/Item.js.map +0 -1
- package/es/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -196
- package/es/components/Select/ui/TreeList/ui/Item/Item.styles.js.map +0 -1
- package/es/components/Select/ui/TreeList/ui/Item/Item.styles_i0dby2.css +0 -15
- package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -81
- package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js.map +0 -1
- package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -81
- package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js.map +0 -1
- package/es/utils/deepCopy.js +0 -26
- package/es/utils/deepCopy.js.map +0 -1
- package/styled-components/cjs/components/Select/reducers/treePathReducer.js +0 -98
- package/styled-components/cjs/components/Select/ui/TreeList/TreeList.js +0 -124
- package/styled-components/cjs/components/Select/ui/TreeList/TreeList.styles.js +0 -50
- package/styled-components/cjs/components/Select/ui/TreeList/TreeList.types.js +0 -4
- package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.js +0 -101
- package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -300
- package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.types.js +0 -4
- package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -112
- package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -112
- package/styled-components/cjs/utils/deepCopy.js +0 -82
- package/styled-components/es/components/Select/reducers/treePathReducer.js +0 -81
- package/styled-components/es/components/Select/ui/TreeList/TreeList.js +0 -73
- package/styled-components/es/components/Select/ui/TreeList/TreeList.styles.js +0 -27
- package/styled-components/es/components/Select/ui/TreeList/TreeList.types.js +0 -1
- package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.js +0 -50
- package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -236
- package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.types.js +0 -1
- package/styled-components/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -61
- package/styled-components/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -61
- package/styled-components/es/utils/deepCopy.js +0 -72
- package/types/components/Select/reducers/treePathReducer.d.ts +0 -14
- package/types/components/Select/reducers/treePathReducer.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/TreeList.d.ts +0 -4
- package/types/components/Select/ui/TreeList/TreeList.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/TreeList.styles.d.ts +0 -6
- package/types/components/Select/ui/TreeList/TreeList.styles.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/TreeList.types.d.ts +0 -9
- package/types/components/Select/ui/TreeList/TreeList.types.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/ui/Item/Item.d.ts +0 -4
- package/types/components/Select/ui/TreeList/ui/Item/Item.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/ui/Item/Item.styles.d.ts +0 -64
- package/types/components/Select/ui/TreeList/ui/Item/Item.styles.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/ui/Item/Item.types.d.ts +0 -14
- package/types/components/Select/ui/TreeList/ui/Item/Item.types.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.d.ts +0 -4
- package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.d.ts.map +0 -1
- package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.d.ts +0 -4
- package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.d.ts.map +0 -1
- package/types/utils/deepCopy.d.ts +0 -2
- package/types/utils/deepCopy.d.ts.map +0 -1
- /package/emotion/cjs/{components/Select/ui/TreeList/TreeList.types.js → types/MakeNever.js} +0 -0
- /package/emotion/es/{components/Select/ui/TreeList/TreeList.types.js → types/MakeNever.js} +0 -0
- /package/{emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.types.js → styled-components/cjs/types/MakeNever.js} +0 -0
- /package/{emotion/es/components/Select/ui/TreeList/ui/Item/Item.types.js → styled-components/es/types/MakeNever.js} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "MoreTrigger", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return MoreTrigger;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
12
|
+
var _Icon = require("../../../_Icon");
|
|
13
|
+
var _MoreTriggerstyles = require("./MoreTrigger.styles");
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
var MoreTrigger = function(param) {
|
|
20
|
+
var size = param.size;
|
|
21
|
+
var iconSize = size === 'xs' ? 'xs' : 's';
|
|
22
|
+
return /*#__PURE__*/ _react.default.createElement(_MoreTriggerstyles.IconWrapper, null, /*#__PURE__*/ _react.default.createElement(_Icon.IconDotsHorizontalOutline, {
|
|
23
|
+
size: iconSize,
|
|
24
|
+
color: "inherit"
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "IconWrapper", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return IconWrapper;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
12
|
+
var _Attachtokens = require("../../Attach.tokens");
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var IconWrapper = _styledcomponents.default.div.withConfig({
|
|
19
|
+
displayName: "MoreTrigger.styles__IconWrapper",
|
|
20
|
+
componentId: "sc-eb1a5e62-0"
|
|
21
|
+
})([
|
|
22
|
+
"line-height:0;height:fit-content;padding:var(",
|
|
23
|
+
");"
|
|
24
|
+
], _Attachtokens.tokens.moreIconPadding);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "StyledIconButtonCancel", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _IconButtonstyles.StyledIconButtonCancel;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
_export_star(require("./Button/Button"), exports);
|
|
12
|
+
_export_star(require("./Cell/Cell"), exports);
|
|
13
|
+
_export_star(require("./IconButton/IconButton"), exports);
|
|
14
|
+
_export_star(require("./MoreTrigger/MoreTrigger"), exports);
|
|
15
|
+
_export_star(require("./Dropdown/Dropdown"), exports);
|
|
16
|
+
var _IconButtonstyles = require("./IconButton/IconButton.styles");
|
|
17
|
+
function _export_star(from, to) {
|
|
18
|
+
Object.keys(from).forEach(function(k) {
|
|
19
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
20
|
+
Object.defineProperty(to, k, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function() {
|
|
23
|
+
return from[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return from;
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "getFilenameParts", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getFilenameParts;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _extractExtension = require("./extractExtension");
|
|
12
|
+
var _getFileicon = require("./getFileicon");
|
|
13
|
+
var getFilenameParts = function(filename, size, customIcon) {
|
|
14
|
+
var extension = (0, _extractExtension.extractExtension)(filename) || '';
|
|
15
|
+
var filenameWithoutExtension = filename.slice(0, -1 - ((extension === null || extension === void 0 ? void 0 : extension.length) || 0)) || '';
|
|
16
|
+
var cellContentLeft = customIcon || (0, _getFileicon.getFileIcon)(extension, size);
|
|
17
|
+
return {
|
|
18
|
+
extension: extension,
|
|
19
|
+
filenameWithoutExtension: filenameWithoutExtension,
|
|
20
|
+
cellContentLeft: cellContentLeft,
|
|
21
|
+
isVisible: true
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -14,7 +14,11 @@ _export(exports, {
|
|
|
14
14
|
},
|
|
15
15
|
get getFileIcon () {
|
|
16
16
|
return _getFileicon.getFileIcon;
|
|
17
|
+
},
|
|
18
|
+
get getFilenameParts () {
|
|
19
|
+
return _getFilenameParts.getFilenameParts;
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
22
|
var _extractExtension = require("./extractExtension");
|
|
20
23
|
var _getFileicon = require("./getFileicon");
|
|
24
|
+
var _getFilenameParts = require("./getFilenameParts");
|
|
@@ -19,6 +19,10 @@ var base = (0, _styledcomponents.css)([
|
|
|
19
19
|
");}&.",
|
|
20
20
|
"{row-gap:var(",
|
|
21
21
|
");column-gap:var(",
|
|
22
|
+
");}.",
|
|
23
|
+
"{column-gap:var(",
|
|
24
|
+
");}.",
|
|
25
|
+
"{column-gap:var(",
|
|
22
26
|
");}&.",
|
|
23
27
|
"{row-gap:var(",
|
|
24
28
|
");}",
|
|
@@ -28,7 +32,6 @@ var base = (0, _styledcomponents.css)([
|
|
|
28
32
|
");font-weight:var(",
|
|
29
33
|
");letter-spacing:var(",
|
|
30
34
|
");line-height:var(",
|
|
31
|
-
");height:var(",
|
|
32
35
|
");}",
|
|
33
36
|
"{font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);}}"
|
|
34
|
-
], _Attachtokens.classes.horizontal, _Attachtokens.tokens.horizontalGap, _Attachtokens.classes.vertical, _Attachtokens.tokens.verticalGap, _Attachtokens.classes.auto, _Attachtokens.tokens.verticalGap, _Attachtokens.tokens.horizontalGap, _Attachtokens.classes.withHelperText, _Attachtokens.tokens.verticalGapWithHelperText, _Attachstyles.FilenameWrapper, _Attachtokens.tokens.cellTitleFontFamily, _Attachtokens.tokens.cellTitleFontSize, _Attachtokens.tokens.cellTitleFontStyle, _Attachtokens.tokens.cellTitleFontWeight, _Attachtokens.tokens.cellTitleLetterSpacing, _Attachtokens.tokens.cellTitleLineHeight,
|
|
37
|
+
], _Attachtokens.classes.horizontal, _Attachtokens.tokens.horizontalGap, _Attachtokens.classes.vertical, _Attachtokens.tokens.verticalGap, _Attachtokens.classes.auto, _Attachtokens.tokens.verticalGap, _Attachtokens.tokens.horizontalGap, _Attachtokens.classes.horizontal, _Attachtokens.tokens.horizontalGap, _Attachtokens.classes.auto, _Attachtokens.tokens.horizontalGap, _Attachtokens.classes.withHelperText, _Attachtokens.tokens.verticalGapWithHelperText, _Attachstyles.FilenameWrapper, _Attachtokens.tokens.cellTitleFontFamily, _Attachtokens.tokens.cellTitleFontSize, _Attachtokens.tokens.cellTitleFontStyle, _Attachtokens.tokens.cellTitleFontWeight, _Attachtokens.tokens.cellTitleLetterSpacing, _Attachtokens.tokens.cellTitleLineHeight, _Attachstyles.StyledHelperText);
|
|
@@ -178,7 +178,7 @@ var selectRoot = function(Root) {
|
|
|
178
178
|
return /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
|
|
179
179
|
var _getItemByFocused;
|
|
180
180
|
var // eslint-disable-block @typescript-eslint/ban-ts-comment
|
|
181
|
-
id = props.id, outerValue = props.value, outerOnChange = props.onChange, _props_target = props.target, target = _props_target === void 0 ? 'textfield-like' : _props_target, items = props.items,
|
|
181
|
+
id = props.id, outerValue = props.value, outerOnChange = props.onChange, _props_target = props.target, target = _props_target === void 0 ? 'textfield-like' : _props_target, items = props.items, _props_placement = props.placement, placement = _props_placement === void 0 ? 'bottom' : _props_placement, label = props.label, labelPlacement = props.labelPlacement, placeholder = props.placeholder, helperText = props.helperText, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, _props_readOnly = props.readOnly, readOnly = _props_readOnly === void 0 ? false : _props_readOnly, outerView = props.view, size = props.size, listOverflow = props.listOverflow, listHeight = props.listHeight, listMaxHeight = props.listMaxHeight, listWidth = props.listWidth, contentLeft = props.contentLeft, onScrollBottom = props.onScrollBottom, onScroll = props.onScroll, chipView = props.chipView, _props_variant = props.variant, variant = _props_variant === void 0 ? 'normal' : _props_variant, portal = props.portal, renderValue = props.renderValue, renderItem = props.renderItem, status = props.status, onItemSelect = props.onItemSelect, separator = props.separator, outerCloseAfterSelect = props.closeAfterSelect, isTargetAmount = props.isTargetAmount, beforeList = props.beforeList, afterList = props.afterList, zIndex = props.zIndex, name = props.name, defaultValue = props.defaultValue, _props_virtual = props.virtual, virtual = _props_virtual === void 0 ? false : _props_virtual, onToggle = props.onToggle, chipType = props.chipType, multiselect = props.multiselect, _props_mode = props.mode, mode = _props_mode === void 0 ? 'default' : _props_mode, chipClickArea = props.chipClickArea, // @ts-ignore
|
|
182
182
|
_offset = props._offset, // Извлекаем пропсы для required и hint, чтобы они не попадали в DOM.
|
|
183
183
|
// @ts-ignore
|
|
184
184
|
required = props.required, // @ts-ignore
|
|
@@ -199,8 +199,6 @@ var selectRoot = function(Root) {
|
|
|
199
199
|
"onChange",
|
|
200
200
|
"target",
|
|
201
201
|
"items",
|
|
202
|
-
"treeView",
|
|
203
|
-
"arrowPlacement",
|
|
204
202
|
"placement",
|
|
205
203
|
"label",
|
|
206
204
|
"labelPlacement",
|
|
@@ -259,14 +257,13 @@ var selectRoot = function(Root) {
|
|
|
259
257
|
items
|
|
260
258
|
]);
|
|
261
259
|
// Создаем структуры для быстрой работы с деревом
|
|
262
|
-
var _usePathMaps1 = _sliced_to_array((0, _usePathMaps.usePathMaps)(transformedItems),
|
|
260
|
+
var _usePathMaps1 = _sliced_to_array((0, _usePathMaps.usePathMaps)(transformedItems), 4), pathMap = _usePathMaps1[0], focusedToValueMap = _usePathMaps1[1], valueToCheckedMap = _usePathMaps1[2], valueToItemMap = _usePathMaps1[3];
|
|
263
261
|
var _useState = _sliced_to_array((0, _react.useState)(props.multiselect ? [] : ''), 2), internalValue = _useState[0], setInternalValue = _useState[1];
|
|
264
262
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
265
263
|
var floatingPopoverRef = (0, _react.useRef)(null);
|
|
266
264
|
// Состояния дерева элементов
|
|
267
265
|
var _useReducer = _sliced_to_array((0, _react.useReducer)(_reducers.pathReducer, []), 2), path = _useReducer[0], dispatchPath = _useReducer[1];
|
|
268
|
-
var _useReducer1 = _sliced_to_array((0, _react.useReducer)(_reducers.
|
|
269
|
-
var _useReducer2 = _sliced_to_array((0, _react.useReducer)(_reducers.focusedPathReducer, []), 2), focusedPath = _useReducer2[0], dispatchFocusedPath = _useReducer2[1];
|
|
266
|
+
var _useReducer1 = _sliced_to_array((0, _react.useReducer)(_reducers.focusedPathReducer, []), 2), focusedPath = _useReducer1[0], dispatchFocusedPath = _useReducer1[1];
|
|
270
267
|
var _useState1 = _sliced_to_array((0, _react.useState)(valueToCheckedMap), 2), checked = _useState1[0], setChecked = _useState1[1];
|
|
271
268
|
var isCurrentListOpen = Boolean(path[0]);
|
|
272
269
|
var activeDescendantItemValue = ((_getItemByFocused = (0, _useKeyboardNavigation.getItemByFocused)(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value.toString()) || '';
|
|
@@ -335,9 +332,6 @@ var selectRoot = function(Root) {
|
|
|
335
332
|
dispatchPath({
|
|
336
333
|
type: 'reset'
|
|
337
334
|
});
|
|
338
|
-
dispatchTreePath({
|
|
339
|
-
type: 'reset'
|
|
340
|
-
});
|
|
341
335
|
// Скроллим чипы к левому краю при закрытии компонента
|
|
342
336
|
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');
|
|
343
337
|
if (multiselect && value.length > 0 && el) {
|
|
@@ -400,9 +394,6 @@ var selectRoot = function(Root) {
|
|
|
400
394
|
dispatchFocusedPath({
|
|
401
395
|
type: 'reset'
|
|
402
396
|
});
|
|
403
|
-
dispatchTreePath({
|
|
404
|
-
type: 'reset'
|
|
405
|
-
});
|
|
406
397
|
}
|
|
407
398
|
if (onChange) {
|
|
408
399
|
onChange(newValues, item);
|
|
@@ -427,9 +418,6 @@ var selectRoot = function(Root) {
|
|
|
427
418
|
dispatchFocusedPath({
|
|
428
419
|
type: 'reset'
|
|
429
420
|
});
|
|
430
|
-
dispatchTreePath({
|
|
431
|
-
type: 'reset'
|
|
432
|
-
});
|
|
433
421
|
}
|
|
434
422
|
// Закрываем список, если элемент уже выбран.
|
|
435
423
|
if (mode === 'radio' && isCurrentChecked) {
|
|
@@ -467,11 +455,7 @@ var selectRoot = function(Root) {
|
|
|
467
455
|
pathMap: pathMap,
|
|
468
456
|
focusedToValueMap: focusedToValueMap,
|
|
469
457
|
handleListToggle: handleListToggle,
|
|
470
|
-
handlePressDown: handlePressDown
|
|
471
|
-
treePath: treePath,
|
|
472
|
-
dispatchTreePath: dispatchTreePath,
|
|
473
|
-
treeView: treeView,
|
|
474
|
-
valueToPathMap: valueToPathMap
|
|
458
|
+
handlePressDown: handlePressDown
|
|
475
459
|
}).onKeyDown;
|
|
476
460
|
// В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.
|
|
477
461
|
// Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.
|
|
@@ -546,11 +530,7 @@ var selectRoot = function(Root) {
|
|
|
546
530
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
547
531
|
// @ts-ignore
|
|
548
532
|
// eslint-disable-next-line no-underscore-dangle
|
|
549
|
-
_checkboxAppearance: rest._checkboxAppearance
|
|
550
|
-
treePath: treePath,
|
|
551
|
-
dispatchTreePath: dispatchTreePath,
|
|
552
|
-
arrowPlacement: arrowPlacement,
|
|
553
|
-
valueToPathMap: valueToPathMap
|
|
533
|
+
_checkboxAppearance: rest._checkboxAppearance
|
|
554
534
|
}
|
|
555
535
|
}, /*#__PURE__*/ _react.default.createElement(_FloatingPopover.FloatingPopover, {
|
|
556
536
|
ref: floatingPopoverRef,
|
|
@@ -599,12 +579,7 @@ var selectRoot = function(Root) {
|
|
|
599
579
|
chipView: chipView,
|
|
600
580
|
disabled: disabled,
|
|
601
581
|
readOnly: readOnly
|
|
602
|
-
}, rest),
|
|
603
|
-
items: items,
|
|
604
|
-
listMaxHeight: listMaxHeight,
|
|
605
|
-
onScroll: virtual ? undefined : handleScroll,
|
|
606
|
-
virtual: virtual
|
|
607
|
-
}) : /*#__PURE__*/ _react.default.createElement(_Selectstyles.ListWrapper, {
|
|
582
|
+
}, rest), /*#__PURE__*/ _react.default.createElement(_Selectstyles.ListWrapper, {
|
|
608
583
|
ref: listWrapperRef,
|
|
609
584
|
listWidth: listWidth
|
|
610
585
|
}, /*#__PURE__*/ _react.default.createElement(_Selectstyles.Ul, {
|
|
@@ -54,8 +54,6 @@ var tokens = {
|
|
|
54
54
|
itemDisabledOpacity: '--plasma-select-item-disabled-opacity',
|
|
55
55
|
itemDisabledColor: '--plasma-select-item-disabled-color',
|
|
56
56
|
itemIconColor: '--plasma-select-item-icon-color',
|
|
57
|
-
itemGap: '--plasma-select-item-gap',
|
|
58
|
-
itemTreeOffsetWidth: '--plasma-select-item-tree-offset-width',
|
|
59
57
|
cellPadding: '--plasma-select-cell-padding',
|
|
60
58
|
cellPaddingLeftContent: '--plasma-select-cell-padding-left-content',
|
|
61
59
|
cellPaddingContent: '--plasma-select-cell-padding-content',
|
|
@@ -19,7 +19,6 @@ _export(exports, {
|
|
|
19
19
|
return useKeyNavigation;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
var _treePathReducer = require("../reducers/treePathReducer");
|
|
23
22
|
var JUMP_SIZE = 10;
|
|
24
23
|
var keys = {
|
|
25
24
|
Enter: 'Enter',
|
|
@@ -43,39 +42,6 @@ var getItemByFocused = function(focusedPath, focusedToValueMap) {
|
|
|
43
42
|
return focusedToValueMap.get(focusedPathAsString);
|
|
44
43
|
};
|
|
45
44
|
var useKeyNavigation = function(param) {
|
|
46
|
-
var focusedPath = param.focusedPath, dispatchFocusedPath = param.dispatchFocusedPath, path = param.path, dispatchPath = param.dispatchPath, pathMap = param.pathMap, focusedToValueMap = param.focusedToValueMap, handleListToggle = param.handleListToggle, handlePressDown = param.handlePressDown, treePath = param.treePath, dispatchTreePath = param.dispatchTreePath, treeView = param.treeView, valueToPathMap = param.valueToPathMap;
|
|
47
|
-
if (treeView) {
|
|
48
|
-
return keyboardNavigationTree({
|
|
49
|
-
focusedPath: focusedPath,
|
|
50
|
-
dispatchFocusedPath: dispatchFocusedPath,
|
|
51
|
-
path: path,
|
|
52
|
-
dispatchPath: dispatchPath,
|
|
53
|
-
pathMap: pathMap,
|
|
54
|
-
focusedToValueMap: focusedToValueMap,
|
|
55
|
-
handleListToggle: handleListToggle,
|
|
56
|
-
handlePressDown: handlePressDown,
|
|
57
|
-
treePath: treePath,
|
|
58
|
-
dispatchTreePath: dispatchTreePath,
|
|
59
|
-
treeView: treeView,
|
|
60
|
-
valueToPathMap: valueToPathMap
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
return keyboardNavigationDefault({
|
|
64
|
-
focusedPath: focusedPath,
|
|
65
|
-
dispatchFocusedPath: dispatchFocusedPath,
|
|
66
|
-
path: path,
|
|
67
|
-
dispatchPath: dispatchPath,
|
|
68
|
-
pathMap: pathMap,
|
|
69
|
-
focusedToValueMap: focusedToValueMap,
|
|
70
|
-
handleListToggle: handleListToggle,
|
|
71
|
-
handlePressDown: handlePressDown,
|
|
72
|
-
treePath: treePath,
|
|
73
|
-
dispatchTreePath: dispatchTreePath,
|
|
74
|
-
treeView: treeView,
|
|
75
|
-
valueToPathMap: valueToPathMap
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
var keyboardNavigationDefault = function(param) {
|
|
79
45
|
var focusedPath = param.focusedPath, dispatchFocusedPath = param.dispatchFocusedPath, path = param.path, dispatchPath = param.dispatchPath, pathMap = param.pathMap, focusedToValueMap = param.focusedToValueMap, handleListToggle = param.handleListToggle, handlePressDown = param.handlePressDown;
|
|
80
46
|
var currentIndex = (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[focusedPath.length - 1]) || 0;
|
|
81
47
|
var currentLength = pathMap.get(path === null || path === void 0 ? void 0 : path[focusedPath.length - 1]) || 0;
|
|
@@ -340,135 +306,3 @@ var keyboardNavigationDefault = function(param) {
|
|
|
340
306
|
onKeyDown: onKeyDown
|
|
341
307
|
};
|
|
342
308
|
};
|
|
343
|
-
var keyboardNavigationTree = function(param) {
|
|
344
|
-
var focusedPath = param.focusedPath, dispatchFocusedPath = param.dispatchFocusedPath, path = param.path, dispatchPath = param.dispatchPath, pathMap = param.pathMap, focusedToValueMap = param.focusedToValueMap, handleListToggle = param.handleListToggle, handlePressDown = param.handlePressDown, treePath = param.treePath, dispatchTreePath = param.dispatchTreePath, valueToPathMap = param.valueToPathMap;
|
|
345
|
-
var _currentItem_parent_items, _currentItem_parent;
|
|
346
|
-
var currentIndex = (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[focusedPath.length - 1]) || 0;
|
|
347
|
-
var currentItem = getItemByFocused(focusedPath, focusedToValueMap);
|
|
348
|
-
var currentLength = (currentItem === null || currentItem === void 0 ? void 0 : (_currentItem_parent = currentItem.parent) === null || _currentItem_parent === void 0 ? void 0 : (_currentItem_parent_items = _currentItem_parent.items) === null || _currentItem_parent_items === void 0 ? void 0 : _currentItem_parent_items.length) || pathMap.get('root') || 0;
|
|
349
|
-
var onKeyDown = function(event) {
|
|
350
|
-
switch(event.code){
|
|
351
|
-
case keys.ArrowUp:
|
|
352
|
-
{
|
|
353
|
-
if (focusedPath.length) {
|
|
354
|
-
if (currentIndex > 0) {
|
|
355
|
-
dispatchFocusedPath({
|
|
356
|
-
type: 'change_last_focus',
|
|
357
|
-
value: currentIndex - 1
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
} else {
|
|
361
|
-
dispatchPath({
|
|
362
|
-
type: 'opened_first_level'
|
|
363
|
-
});
|
|
364
|
-
dispatchFocusedPath({
|
|
365
|
-
type: 'set_initial_focus'
|
|
366
|
-
});
|
|
367
|
-
handleListToggle(true);
|
|
368
|
-
}
|
|
369
|
-
break;
|
|
370
|
-
}
|
|
371
|
-
case keys.ArrowDown:
|
|
372
|
-
{
|
|
373
|
-
if (focusedPath.length) {
|
|
374
|
-
if (currentIndex + 1 < currentLength) {
|
|
375
|
-
dispatchFocusedPath({
|
|
376
|
-
type: 'change_last_focus',
|
|
377
|
-
value: currentIndex + 1
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
} else {
|
|
381
|
-
dispatchPath({
|
|
382
|
-
type: 'opened_first_level'
|
|
383
|
-
});
|
|
384
|
-
dispatchFocusedPath({
|
|
385
|
-
type: 'set_initial_focus'
|
|
386
|
-
});
|
|
387
|
-
handleListToggle(true);
|
|
388
|
-
}
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
case keys.ArrowLeft:
|
|
392
|
-
{
|
|
393
|
-
if (path[0]) {
|
|
394
|
-
if (focusedPath.length) {
|
|
395
|
-
var isCurrentLevelOpened = (0, _treePathReducer.keyExists)(treePath, valueToPathMap.get((currentItem === null || currentItem === void 0 ? void 0 : currentItem.value.toString()) || '') || []);
|
|
396
|
-
if (isCurrentLevelOpened) {
|
|
397
|
-
dispatchTreePath({
|
|
398
|
-
type: 'toggled_level',
|
|
399
|
-
value: valueToPathMap.get((currentItem === null || currentItem === void 0 ? void 0 : currentItem.value.toString()) || '') || []
|
|
400
|
-
});
|
|
401
|
-
} else if (focusedPath.length === 1) {
|
|
402
|
-
handleListToggle(false);
|
|
403
|
-
} else {
|
|
404
|
-
dispatchFocusedPath({
|
|
405
|
-
type: 'return_prev_focus'
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
break;
|
|
411
|
-
}
|
|
412
|
-
case keys.ArrowRight:
|
|
413
|
-
{
|
|
414
|
-
if (path[0]) {
|
|
415
|
-
if (!focusedPath.length) {
|
|
416
|
-
break;
|
|
417
|
-
}
|
|
418
|
-
if ((currentItem === null || currentItem === void 0 ? void 0 : currentItem.disabled) || (currentItem === null || currentItem === void 0 ? void 0 : currentItem.isDisabled)) {
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
if (currentItem === null || currentItem === void 0 ? void 0 : currentItem.items) {
|
|
422
|
-
var isCurrentLevelOpened1 = (0, _treePathReducer.keyExists)(treePath, valueToPathMap.get(currentItem.value.toString()) || []);
|
|
423
|
-
if (isCurrentLevelOpened1) {
|
|
424
|
-
dispatchFocusedPath({
|
|
425
|
-
type: 'add_focus',
|
|
426
|
-
value: 0
|
|
427
|
-
});
|
|
428
|
-
} else {
|
|
429
|
-
dispatchTreePath({
|
|
430
|
-
type: 'toggled_level',
|
|
431
|
-
value: valueToPathMap.get(currentItem.value.toString()) || []
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
break;
|
|
437
|
-
}
|
|
438
|
-
case keys.Space:
|
|
439
|
-
case keys.Enter:
|
|
440
|
-
{
|
|
441
|
-
event.preventDefault();
|
|
442
|
-
if (!path[0]) {
|
|
443
|
-
dispatchPath({
|
|
444
|
-
type: 'opened_first_level'
|
|
445
|
-
});
|
|
446
|
-
dispatchFocusedPath({
|
|
447
|
-
type: 'set_initial_focus'
|
|
448
|
-
});
|
|
449
|
-
break;
|
|
450
|
-
}
|
|
451
|
-
if (!currentItem || (currentItem === null || currentItem === void 0 ? void 0 : currentItem.disabled) || (currentItem === null || currentItem === void 0 ? void 0 : currentItem.isDisabled)) {
|
|
452
|
-
break;
|
|
453
|
-
}
|
|
454
|
-
handlePressDown(currentItem);
|
|
455
|
-
break;
|
|
456
|
-
}
|
|
457
|
-
case keys.Tab:
|
|
458
|
-
case keys.Escape:
|
|
459
|
-
{
|
|
460
|
-
if (path[0]) {
|
|
461
|
-
handleListToggle(false);
|
|
462
|
-
}
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
default:
|
|
466
|
-
{
|
|
467
|
-
break;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
return {
|
|
472
|
-
onKeyDown: onKeyDown
|
|
473
|
-
};
|
|
474
|
-
};
|
|
@@ -9,55 +9,24 @@ Object.defineProperty(exports, "usePathMaps", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _utils = require("../../../utils");
|
|
12
|
-
function _array_like_to_array(arr, len) {
|
|
13
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
14
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
15
|
-
return arr2;
|
|
16
|
-
}
|
|
17
|
-
function _array_without_holes(arr) {
|
|
18
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
19
|
-
}
|
|
20
|
-
function _iterable_to_array(iter) {
|
|
21
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
22
|
-
}
|
|
23
|
-
function _non_iterable_spread() {
|
|
24
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25
|
-
}
|
|
26
|
-
function _to_consumable_array(arr) {
|
|
27
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
28
|
-
}
|
|
29
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
30
|
-
if (!o) return;
|
|
31
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
32
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
33
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
34
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
35
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
36
|
-
}
|
|
37
12
|
var usePathMaps = function(items) {
|
|
38
13
|
var pathMap = new Map();
|
|
39
14
|
var focusedToValueMap = new Map();
|
|
40
15
|
var valueToCheckedMap = new Map();
|
|
41
16
|
var valueToItemMap = new Map();
|
|
42
|
-
var valueToPathMap = new Map();
|
|
43
17
|
pathMap.set('root', (items === null || items === void 0 ? void 0 : items.length) || 0);
|
|
44
18
|
var rec = function(items) {
|
|
45
|
-
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ''
|
|
19
|
+
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
46
20
|
items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
|
|
47
21
|
var value = item.value, innerItems = item.items;
|
|
48
22
|
var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
|
|
49
23
|
focusedToValueMap.set(currIndex, item);
|
|
50
24
|
valueToCheckedMap.set(value, false);
|
|
51
|
-
valueToPathMap.set(value.toString(), _to_consumable_array(path).concat([
|
|
52
|
-
value.toString()
|
|
53
|
-
]));
|
|
54
25
|
if ((0, _utils.isEmpty)(innerItems) || !innerItems) {
|
|
55
26
|
valueToItemMap.set(value, item);
|
|
56
27
|
} else {
|
|
57
28
|
pathMap.set(value, innerItems.length);
|
|
58
|
-
rec(innerItems, currIndex
|
|
59
|
-
value.toString()
|
|
60
|
-
]));
|
|
29
|
+
rec(innerItems, currIndex);
|
|
61
30
|
}
|
|
62
31
|
});
|
|
63
32
|
};
|
|
@@ -66,7 +35,6 @@ var usePathMaps = function(items) {
|
|
|
66
35
|
pathMap,
|
|
67
36
|
focusedToValueMap,
|
|
68
37
|
valueToCheckedMap,
|
|
69
|
-
valueToItemMap
|
|
70
|
-
valueToPathMap
|
|
38
|
+
valueToItemMap
|
|
71
39
|
];
|
|
72
40
|
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
_export_star(require("./pathReducer"), exports);
|
|
6
6
|
_export_star(require("./focusedPathReducer"), exports);
|
|
7
|
-
_export_star(require("./treePathReducer"), exports);
|
|
8
7
|
function _export_star(from, to) {
|
|
9
8
|
Object.keys(from).forEach(function(k) {
|
|
10
9
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -6,7 +6,6 @@ _export_star(require("./Inner/Inner"), exports);
|
|
|
6
6
|
_export_star(require("./Target/Target"), exports);
|
|
7
7
|
_export_star(require("./VirtualList/VirtualList"), exports);
|
|
8
8
|
_export_star(require("./SelectAll/SelectAll"), exports);
|
|
9
|
-
_export_star(require("./TreeList/TreeList"), exports);
|
|
10
9
|
function _export_star(from, to) {
|
|
11
10
|
Object.keys(from).forEach(function(k) {
|
|
12
11
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -9,13 +9,15 @@ Object.defineProperty(exports, "traverseTree", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _dedupe = /*#__PURE__*/ _interop_require_default(require("classnames/dedupe"));
|
|
12
|
-
var _utils = require("../../../utils");
|
|
13
12
|
var _Treetokens = require("../Tree.tokens");
|
|
14
13
|
function _array_like_to_array(arr, len) {
|
|
15
14
|
if (len == null || len > arr.length) len = arr.length;
|
|
16
15
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
17
16
|
return arr2;
|
|
18
17
|
}
|
|
18
|
+
function _array_with_holes(arr) {
|
|
19
|
+
if (Array.isArray(arr)) return arr;
|
|
20
|
+
}
|
|
19
21
|
function _array_without_holes(arr) {
|
|
20
22
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
21
23
|
}
|
|
@@ -27,12 +29,46 @@ function _interop_require_default(obj) {
|
|
|
27
29
|
function _iterable_to_array(iter) {
|
|
28
30
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
29
31
|
}
|
|
32
|
+
function _iterable_to_array_limit(arr, i) {
|
|
33
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
34
|
+
if (_i == null) return;
|
|
35
|
+
var _arr = [];
|
|
36
|
+
var _n = true;
|
|
37
|
+
var _d = false;
|
|
38
|
+
var _s, _e;
|
|
39
|
+
try {
|
|
40
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
41
|
+
_arr.push(_s.value);
|
|
42
|
+
if (i && _arr.length === i) break;
|
|
43
|
+
}
|
|
44
|
+
} catch (err) {
|
|
45
|
+
_d = true;
|
|
46
|
+
_e = err;
|
|
47
|
+
} finally{
|
|
48
|
+
try {
|
|
49
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
50
|
+
} finally{
|
|
51
|
+
if (_d) throw _e;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return _arr;
|
|
55
|
+
}
|
|
56
|
+
function _non_iterable_rest() {
|
|
57
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
|
+
}
|
|
30
59
|
function _non_iterable_spread() {
|
|
31
60
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
32
61
|
}
|
|
62
|
+
function _sliced_to_array(arr, i) {
|
|
63
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
64
|
+
}
|
|
33
65
|
function _to_consumable_array(arr) {
|
|
34
66
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
35
67
|
}
|
|
68
|
+
function _type_of(obj) {
|
|
69
|
+
"@swc/helpers - typeof";
|
|
70
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
71
|
+
}
|
|
36
72
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
37
73
|
if (!o) return;
|
|
38
74
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
@@ -41,6 +77,28 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
41
77
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
42
78
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
43
79
|
}
|
|
80
|
+
// Blazing-fast хелпер для глубокого копирования объектов.
|
|
81
|
+
// Ссылки на функции (React-компоненты) сохраняются.
|
|
82
|
+
var deepCopy = function(obj) {
|
|
83
|
+
if (obj === null || (typeof obj === "undefined" ? "undefined" : _type_of(obj)) !== 'object') {
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
if (Array.isArray(obj)) {
|
|
87
|
+
return obj.map(function(item) {
|
|
88
|
+
return deepCopy(item);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (obj.$$typeof === Symbol.for('react.element') || obj.$$typeof === Symbol.for('react.fragment') || _type_of(obj === null || obj === void 0 ? void 0 : obj.$$typeof) === 'symbol') {
|
|
92
|
+
return obj;
|
|
93
|
+
}
|
|
94
|
+
return Object.fromEntries(Object.entries(obj).map(function(param) {
|
|
95
|
+
var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
|
|
96
|
+
return [
|
|
97
|
+
key,
|
|
98
|
+
deepCopy(value)
|
|
99
|
+
];
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
44
102
|
// Поиск в глубину для обхода узлов дерева.
|
|
45
103
|
var dfs = function(node, selectedKeys, rootParentsSelected, parents) {
|
|
46
104
|
var _node_children, _parents_filter_;
|
|
@@ -87,7 +145,7 @@ var getRootParentsSelectedChildren = function(node, selectedKeysSet) {
|
|
|
87
145
|
};
|
|
88
146
|
var traverseTree = function(items, selectedKeys) {
|
|
89
147
|
var selectedKeysSet = new Set(selectedKeys);
|
|
90
|
-
var copyItems =
|
|
148
|
+
var copyItems = deepCopy(items);
|
|
91
149
|
var rootParentsSelected = getRootParentsSelectedChildren({
|
|
92
150
|
key: 'root',
|
|
93
151
|
children: copyItems
|