@itcase/ui 1.1.25 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cjs/Badge-C_bYrtVY.js → Badge-2JkquAEb.js} +6 -10
- package/dist/{Badge-CLV5v6N7.js → Badge-CrhdvxY6.js} +4 -4
- package/dist/Button-BA3ZeUjj.js +90 -0
- package/dist/Button-VkatyBmt.js +93 -0
- package/dist/{cjs/Divider-D92wY8Fn.js → Divider-BjB5MD6u.js} +4 -8
- package/dist/{Divider-Dhj6sMWd.js → Divider-U5UdY-ef.js} +2 -2
- package/dist/{DropdownItem-CkojAA8a.js → DropdownItem-bB-KYqcL.js} +7 -7
- package/dist/{cjs/DropdownItem-2Nqtx3Vi.js → DropdownItem-m4hdxHp6.js} +8 -13
- package/dist/{Group-DLmtajo8.js → Group-BXfLh7AZ.js} +3 -3
- package/dist/{cjs/Group-EFTg84wP.js → Group-Buo_BxGT.js} +5 -9
- package/dist/{cjs/Icon-C7ZJyN5o.js → Icon-Co5Mtpt_.js} +11 -17
- package/dist/{Icon-BLqnXYOO.js → Icon-CsE2-ieX.js} +10 -10
- package/dist/{Image-Bz4Fo3eB.js → Image-8t6PvsaZ.js} +2 -2
- package/dist/{cjs/Image-CCx6QWZj.js → Image-DrUlRMHa.js} +4 -8
- package/dist/{Input-CYDtAlO-.js → Input-BQ6Plt1n.js} +4 -4
- package/dist/{cjs/Input-vwyG3XF0.js → Input-C7gBdx1m.js} +5 -10
- package/dist/{Label-c3hONOHC.js → Label-BA_CnRBq.js} +5 -5
- package/dist/{cjs/Label-C2uLpNrU.js → Label-CpSzGRtr.js} +7 -11
- package/dist/{Link-DtzAAQn8.js → Link-Bqu5amIb.js} +8 -8
- package/dist/{cjs/Link-DRV1vzHd.js → Link-DQxoFKhI.js} +10 -15
- package/dist/{Loader-VCP1ZNcb.js → Loader-CJ8ZCdwy.js} +3 -3
- package/dist/{cjs/Loader-C2D6fJk1.js → Loader-fA11tUEJ.js} +5 -9
- package/dist/{MenuItem-BbU9r8_D.js → MenuItem-CNJfj0nV.js} +6 -6
- package/dist/{cjs/MenuItem-D6T9WRQk.js → MenuItem-DvIFaWkB.js} +7 -12
- package/dist/{cjs/Overlay-CkN2X1BM.js → Overlay-CFXouKnl.js} +4 -8
- package/dist/{Overlay-DNPslUfY.js → Overlay-DO5dnSRE.js} +2 -2
- package/dist/{cjs/Radio-Bvv59nEV.js → Radio-BQo97TZL.js} +7 -11
- package/dist/{Radio-BHqgR8WO.js → Radio-oMf0vN7T.js} +6 -6
- package/dist/{Scrollbar-DrRNpn12.js → Scrollbar-CrGXCZ_F.js} +2 -2
- package/dist/{cjs/Scrollbar-DOujlQOb.js → Scrollbar-DVlIZzvz.js} +2 -6
- package/dist/Switch-B5yVEqxz.js +14 -0
- package/dist/Switch-DEXsrPCo.js +12 -0
- package/dist/{Text-Dz-KPI5I.js → Text-CG3xPG27.js} +2 -2
- package/dist/{cjs/Text-B0SULA92.js → Text-_YhyTsQ1.js} +4 -8
- package/dist/{Title-zpOK2AxL.js → Title-BfSFPJtJ.js} +3 -3
- package/dist/{cjs/Title-Ckp30YSI.js → Title-zwP6c2U2.js} +6 -10
- package/dist/{Tooltip-IVq3_vb4.js → Tooltip-DJufHBiQ.js} +7 -7
- package/dist/{cjs/Tooltip-DREz-tP6.js → Tooltip-DkTKx9n-.js} +8 -13
- package/dist/cjs/components/Accordion.js +178 -15
- package/dist/cjs/components/Avatar.js +33 -14
- package/dist/cjs/components/Badge.js +4 -4
- package/dist/cjs/components/Breadcrumbs.js +88 -15
- package/dist/cjs/components/Button.js +9 -9
- package/dist/cjs/components/Caption.js +23 -7
- package/dist/cjs/components/Card.js +26 -8
- package/dist/cjs/components/Cell.js +70 -14
- package/dist/cjs/components/Checkbox.js +86 -8
- package/dist/cjs/components/Chips.js +75 -9
- package/dist/cjs/components/Choice.js +100 -15
- package/dist/cjs/components/Code.js +101 -8
- package/dist/cjs/components/ContextMenu.js +48 -13
- package/dist/cjs/components/CookiesWarning.js +56 -17
- package/dist/cjs/components/DadataHintField.js +31 -9
- package/dist/cjs/components/DatePicker.js +1158 -18
- package/dist/cjs/components/Divider.js +3 -3
- package/dist/cjs/components/Dot.js +32 -7
- package/dist/cjs/components/Drawer.js +12 -8
- package/dist/cjs/components/Dropdown.js +6 -6
- package/dist/cjs/components/Flex.js +116 -7
- package/dist/cjs/components/FormField.js +108 -27
- package/dist/cjs/components/Grid.js +148 -8
- package/dist/cjs/components/Group.js +3 -3
- package/dist/cjs/components/HTMLContent.js +83 -7
- package/dist/cjs/components/Icon.js +7 -7
- package/dist/cjs/components/Image.js +3 -3
- package/dist/cjs/components/Input.js +2 -2
- package/dist/cjs/components/InputMask.js +3 -8
- package/dist/cjs/components/InputPassword.js +112 -14
- package/dist/cjs/components/Label.js +5 -5
- package/dist/cjs/components/LanguageSelector.js +17 -11
- package/dist/cjs/components/Link.js +3 -3
- package/dist/cjs/components/List.js +43 -9
- package/dist/cjs/components/Loader.js +4 -4
- package/dist/cjs/components/Logo.js +37 -10
- package/dist/cjs/components/Menu.js +35 -11
- package/dist/cjs/components/MenuItem.js +5 -5
- package/dist/cjs/components/Modal.js +160 -12
- package/dist/cjs/components/Notification.js +41 -12
- package/dist/cjs/components/Overlay.js +3 -3
- package/dist/cjs/components/Page.js +39 -45
- package/dist/cjs/components/Pagination.js +97 -17
- package/dist/cjs/components/Panel.js +5 -9
- package/dist/cjs/components/Radio.js +4 -4
- package/dist/cjs/components/RangeSlider.js +48 -8
- package/dist/cjs/components/Response.js +78 -19
- package/dist/cjs/components/SVGContent.js +2 -6
- package/dist/cjs/components/ScrollOnDrag.js +4 -10
- package/dist/cjs/components/ScrollToView.js +56 -10
- package/dist/cjs/components/Scrollbar.js +2 -3
- package/dist/cjs/components/Search.js +123 -16
- package/dist/cjs/components/Segmented.js +91 -9
- package/dist/cjs/components/Select.js +115 -6775
- package/dist/cjs/components/SiteMenu.js +60 -14
- package/dist/cjs/components/Swiper.js +81 -9
- package/dist/cjs/components/Switch.js +2 -2
- package/dist/cjs/components/Tab.js +144 -14
- package/dist/cjs/components/Text.js +3 -3
- package/dist/cjs/components/Textarea.js +95 -8
- package/dist/cjs/components/Tile.js +50 -10
- package/dist/cjs/components/Title.js +2 -2
- package/dist/cjs/components/Tooltip.js +4 -4
- package/dist/cjs/components/Video.js +16 -6
- package/dist/cjs/components/Wrapper.js +43 -7
- package/dist/cjs/components.js +1 -213
- package/dist/cjs/context/Notifications.js +4 -9
- package/dist/cjs/context/UIContext.js +7 -12
- package/dist/cjs/hooks/useDeviceTargetClass.js +2 -7
- package/dist/cjs/hooks/useStyles.js +6 -12
- package/dist/components/Accordion.js +180 -13
- package/dist/components/Avatar.js +35 -12
- package/dist/components/Badge.js +4 -4
- package/dist/components/Breadcrumbs.js +90 -13
- package/dist/components/Button.js +9 -9
- package/dist/components/Caption.js +25 -5
- package/dist/components/Card.js +28 -6
- package/dist/components/Cell.js +72 -12
- package/dist/components/Checkbox.js +87 -5
- package/dist/components/Chips.js +76 -6
- package/dist/components/Choice.js +101 -12
- package/dist/components/Code.js +103 -6
- package/dist/components/ContextMenu.js +50 -11
- package/dist/components/CookiesWarning.js +58 -15
- package/dist/components/DadataHintField.js +33 -7
- package/dist/components/DatePicker.js +1161 -17
- package/dist/components/Divider.js +3 -3
- package/dist/components/Dot.js +34 -5
- package/dist/components/Drawer.js +12 -4
- package/dist/components/Dropdown.js +6 -6
- package/dist/components/Flex.js +118 -5
- package/dist/components/FormField.js +107 -22
- package/dist/components/Grid.js +149 -5
- package/dist/components/Group.js +3 -3
- package/dist/components/HTMLContent.js +85 -5
- package/dist/components/Icon.js +7 -7
- package/dist/components/Image.js +3 -3
- package/dist/components/Input.js +2 -2
- package/dist/components/InputMask.js +4 -4
- package/dist/components/InputPassword.js +113 -11
- package/dist/components/Label.js +5 -5
- package/dist/components/LanguageSelector.js +19 -9
- package/dist/components/Link.js +3 -3
- package/dist/components/List.js +45 -7
- package/dist/components/Loader.js +4 -4
- package/dist/components/Logo.js +38 -7
- package/dist/components/Menu.js +37 -9
- package/dist/components/MenuItem.js +5 -5
- package/dist/components/Modal.js +162 -10
- package/dist/components/Notification.js +42 -9
- package/dist/components/Overlay.js +3 -3
- package/dist/components/Page.js +3 -3
- package/dist/components/Pagination.js +99 -15
- package/dist/components/Panel.js +5 -5
- package/dist/components/Radio.js +4 -4
- package/dist/components/RangeSlider.js +50 -6
- package/dist/components/Response.js +79 -16
- package/dist/components/SVGContent.js +2 -2
- package/dist/components/ScrollOnDrag.js +5 -6
- package/dist/components/ScrollToView.js +58 -8
- package/dist/components/Scrollbar.js +2 -3
- package/dist/components/Search.js +124 -13
- package/dist/components/Segmented.js +92 -6
- package/dist/components/Select.js +38 -6674
- package/dist/components/SiteMenu.js +62 -12
- package/dist/components/Swiper.js +83 -7
- package/dist/components/Switch.js +2 -2
- package/dist/components/Tab.js +145 -11
- package/dist/components/Text.js +3 -3
- package/dist/components/Textarea.js +96 -5
- package/dist/components/Tile.js +52 -8
- package/dist/components/Title.js +2 -2
- package/dist/components/Tooltip.js +4 -4
- package/dist/components/Video.js +18 -4
- package/dist/components/Wrapper.js +45 -5
- package/dist/components.js +1 -95
- package/dist/context/Notifications.js +3 -3
- package/dist/context/UIContext.js +3 -3
- package/dist/css/components/Chips/Chips.css +1 -1
- package/dist/css/components/DatePicker/DatePicker.css +1 -1
- package/dist/css/components/Notification/Notification.css +11 -0
- package/dist/css/components/Notification/css/__item/notification__item_status.css +11 -0
- package/dist/css/components/Swiper/Swiper.css +0 -3
- package/dist/{components → types/components}/Button/Button.interface.d.ts +2 -2
- package/dist/{components → types/components}/Cell/Cell.interface.d.ts +4 -4
- package/dist/{components → types/components}/Chips/Chips.interface.d.ts +3 -3
- package/dist/{components → types/components}/Dropdown/Dropdown.interface.d.ts +8 -8
- package/dist/{components → types/components}/Flex/Flex.interface.d.ts +5 -5
- package/dist/{cjs → types}/components/Group/Group.interface.d.ts +4 -4
- package/dist/{components → types/components}/HTMLContent/HTMLContent.interface.d.ts +4 -4
- package/dist/{cjs → types}/components/Label/Label.interface.d.ts +5 -5
- package/dist/{cjs → types}/components/Logo/Logo.interface.d.ts +3 -3
- package/dist/{cjs → types}/components/MenuItem/MenuItem.interface.d.ts +7 -7
- package/dist/{cjs → types}/components/Pagination/Pagination.d.ts +2 -2
- package/dist/{cjs → types}/components/Pagination/Pagination.interface.d.ts +14 -5
- package/dist/{components → types/components}/Panel/Panel.interface.d.ts +3 -3
- package/dist/{cjs → types}/components/Segmented/Segmented.interface.d.ts +3 -3
- package/dist/types/components/Select/SelectClearIndicator.d.ts +11 -0
- package/dist/types/components/Select/SelectContainer.d.ts +2 -0
- package/dist/types/components/Select/SelectControl.d.ts +11 -0
- package/dist/types/components/Select/SelectDropdownIndicator.d.ts +13 -0
- package/dist/types/components/Select/SelectGroupHeading.d.ts +7 -0
- package/dist/types/components/Select/SelectIndicatorsContainer.d.ts +4 -0
- package/dist/types/components/Select/SelectInput.d.ts +12 -0
- package/dist/types/components/Select/SelectLoadingIndicator.d.ts +7 -0
- package/dist/types/components/Select/SelectMenu.d.ts +11 -0
- package/dist/types/components/Select/SelectMultiValueContainer.d.ts +1 -0
- package/dist/types/components/Select/SelectMultiValueLabel.d.ts +4 -0
- package/dist/types/components/Select/SelectMultiValueRemove.d.ts +4 -0
- package/dist/types/components/Select/SelectNoOptions.d.ts +12 -0
- package/dist/types/components/Select/SelectOption.d.ts +16 -0
- package/dist/types/components/Select/SelectPlaceholder.d.ts +11 -0
- package/dist/types/components/Select/SelectSingleValue.d.ts +12 -0
- package/dist/types/components/Select/SelectValueContainer.d.ts +11 -0
- package/dist/types/components/Select/index.d.ts +20 -0
- package/dist/{cjs → types}/components/Swiper/Swiper.interface.d.ts +3 -3
- package/dist/{components → types/components}/Tab/Tab.interface.d.ts +8 -7
- package/dist/{components → types/components}/Text/Text.interface.d.ts +4 -4
- package/dist/{components → types/components}/Tile/Tile.interface.d.ts +6 -6
- package/dist/{components → types/components}/Title/Title.interface.d.ts +4 -4
- package/dist/{cjs → types}/components/Tooltip/Tooltip.interface.d.ts +3 -3
- package/dist/{components → types/components}/Wrapper/Wrapper.interface.d.ts +3 -3
- package/dist/types/context/Notifications.d.ts +19 -0
- package/dist/types/context/UIContext.d.ts +11 -0
- package/dist/types/hooks/styleAttributes.d.ts +2 -0
- package/dist/{cjs → types}/hooks/styleAttributes.interface.d.ts +2 -2
- package/dist/types/hooks/useDeviceTargetClass.d.ts +1 -0
- package/dist/types/hooks/useMediaQueries.d.ts +7 -0
- package/dist/types/hooks/useStyles.d.ts +1 -0
- package/dist/types/icons/index.d.ts +10 -0
- package/dist/types/types/componentProps/align.d.ts +1 -0
- package/dist/types/types/componentProps/alignDirection.d.ts +1 -0
- package/dist/types/types/componentProps/justifyContent.d.ts +1 -0
- package/dist/types/types/componentProps/textAlign.d.ts +1 -0
- package/dist/types/types/componentProps/textColorActive.d.ts +2 -0
- package/dist/types/types/componentProps/textWrap.d.ts +1 -0
- package/dist/{cjs → types}/types/index.d.ts +6 -6
- package/package.json +33 -35
- package/dist/Accordion-FIIzpSgl.js +0 -177
- package/dist/Avatar-DR2A8Na8.js +0 -31
- package/dist/Breadcrumbs-CDKi6gOC.js +0 -88
- package/dist/Button-CSzPxWyC.js +0 -90
- package/dist/Caption-DDh0VFPJ.js +0 -25
- package/dist/Card-CvW4Qozl.js +0 -28
- package/dist/Cell-3We_qMvM.js +0 -68
- package/dist/Checkbox-0h4YosTW.js +0 -87
- package/dist/Chips-Bd3ZFosY.js +0 -76
- package/dist/Choice-CeQ9Il98.js +0 -97
- package/dist/Code-1WUXVzfb.js +0 -272
- package/dist/ContextMenuItem-KPAQQHlQ.js +0 -46
- package/dist/CookiesWarning-B30eAOND.js +0 -52
- package/dist/DadataHintField-CHJLsVjJ.js +0 -1103
- package/dist/DatePicker-Bf7t1yiM.js +0 -14136
- package/dist/Dot-Bc0Ly45H.js +0 -34
- package/dist/Drawer-DkLkFSmD.js +0 -139
- package/dist/FlexItem-DHmKl6e7.js +0 -118
- package/dist/GridRow-DRjyNWBh.js +0 -149
- package/dist/HTMLContent-CgbJTAy4.js +0 -85
- package/dist/InputPassword-DYBnRCtc.js +0 -108
- package/dist/LanguageSelector-D0A-uqch.js +0 -14
- package/dist/ListItem-BoCF7VH9.js +0 -44
- package/dist/Logo-DCx_YOA2.js +0 -37
- package/dist/Menu-C-TIWZeb.js +0 -34
- package/dist/ModalLoader-4OS81u94.js +0 -161
- package/dist/NotificationList-CmXca2zs.js +0 -40
- package/dist/Pagination-BAbFsztK.js +0 -86
- package/dist/RangeSlider-BPFVikab.js +0 -50
- package/dist/Response-BMRzGa5t.js +0 -74
- package/dist/ScrollToView-W6XhacKJ.js +0 -1821
- package/dist/SearchResult-6Vg0m_NA.js +0 -120
- package/dist/Segmented-BM1p7Ubz.js +0 -92
- package/dist/SiteMenuButton-DsYMvX6W.js +0 -58
- package/dist/Swiper-CXjE6qZR.js +0 -5138
- package/dist/Switch-0BHqovLA.js +0 -12
- package/dist/SwitchField-DCwEVCVg.js +0 -98
- package/dist/TabGroup-BLB4Ymcx.js +0 -144
- package/dist/Textarea-D3XSuMEm.js +0 -96
- package/dist/Tile-CNnauNx6.js +0 -52
- package/dist/Video-0z4mNz4P.js +0 -18
- package/dist/Wrapper-CJTkVfsd.js +0 -45
- package/dist/cjs/Accordion-Ba4Use_H.js +0 -186
- package/dist/cjs/Avatar-BKK80aBG.js +0 -37
- package/dist/cjs/Breadcrumbs-B7F96CYT.js +0 -96
- package/dist/cjs/Button-DH5f_2bV.js +0 -98
- package/dist/cjs/Caption-f-OM1D-G.js +0 -31
- package/dist/cjs/Card-BhnTRJN5.js +0 -34
- package/dist/cjs/Cell-Bc4BC1e3.js +0 -74
- package/dist/cjs/Checkbox-C5EikmBn.js +0 -94
- package/dist/cjs/Chips-wl8WgeWZ.js +0 -83
- package/dist/cjs/Choice-DJOKyu8I.js +0 -105
- package/dist/cjs/Code-BJFoJBYh.js +0 -279
- package/dist/cjs/ContextMenuItem-CLU1xPrC.js +0 -53
- package/dist/cjs/CookiesWarning-C-6cEf16.js +0 -59
- package/dist/cjs/DadataHintField-z7Mw-xDn.js +0 -1111
- package/dist/cjs/DatePicker-4tMTL9Nx.js +0 -14160
- package/dist/cjs/Dot-CKWexdtn.js +0 -40
- package/dist/cjs/Drawer-AQqI18ra.js +0 -146
- package/dist/cjs/FlexItem-2KlvlTJY.js +0 -125
- package/dist/cjs/GridRow-CAqZZGge.js +0 -157
- package/dist/cjs/HTMLContent-4vI2pdQC.js +0 -91
- package/dist/cjs/InputPassword-CbrEhEJB.js +0 -115
- package/dist/cjs/LanguageSelector-DZC_wwP6.js +0 -20
- package/dist/cjs/ListItem-B5rYml7Y.js +0 -51
- package/dist/cjs/Logo-CsOCRB7d.js +0 -44
- package/dist/cjs/Menu-KYRzB912.js +0 -40
- package/dist/cjs/ModalLoader-DRt-18Tr.js +0 -170
- package/dist/cjs/NotificationList-DETpx50O.js +0 -48
- package/dist/cjs/Pagination-DuykmIqr.js +0 -94
- package/dist/cjs/RangeSlider-Dy53bTyY.js +0 -57
- package/dist/cjs/Response-CTawELy2.js +0 -82
- package/dist/cjs/ScrollToView-DPhR0AQC.js +0 -1831
- package/dist/cjs/SearchResult-CfZvZ2Rg.js +0 -129
- package/dist/cjs/Segmented-D9L6q-Sa.js +0 -100
- package/dist/cjs/SiteMenuButton-CC0QccWu.js +0 -65
- package/dist/cjs/Swiper-Zh5xaPu3.js +0 -5145
- package/dist/cjs/Switch-K1p9h3aF.js +0 -19
- package/dist/cjs/SwitchField-C31Nbyyn.js +0 -108
- package/dist/cjs/TabGroup-BKWkofWW.js +0 -153
- package/dist/cjs/Textarea-tng0D_n7.js +0 -103
- package/dist/cjs/Tile-bPw3x_en.js +0 -58
- package/dist/cjs/Video-B_xqvgag.js +0 -24
- package/dist/cjs/Wrapper-DravIzND.js +0 -51
- package/dist/cjs/components/Button/Button.interface.d.ts +0 -77
- package/dist/cjs/components/Cell/Cell.interface.d.ts +0 -62
- package/dist/cjs/components/Chips/Chips.interface.d.ts +0 -44
- package/dist/cjs/components/Dropdown/Dropdown.interface.d.ts +0 -73
- package/dist/cjs/components/Flex/Flex.interface.d.ts +0 -120
- package/dist/cjs/components/HTMLContent/HTMLContent.interface.d.ts +0 -30
- package/dist/cjs/components/Panel/Panel.interface.d.ts +0 -56
- package/dist/cjs/components/Tab/Tab.interface.d.ts +0 -79
- package/dist/cjs/components/Text/Text.interface.d.ts +0 -54
- package/dist/cjs/components/Tile/Tile.interface.d.ts +0 -37
- package/dist/cjs/components/Title/Title.interface.d.ts +0 -50
- package/dist/cjs/components/Wrapper/Wrapper.interface.d.ts +0 -20
- package/dist/cjs/components/index.d.ts +0 -60
- package/dist/cjs/context/index.d.ts +0 -2
- package/dist/cjs/floating-ui.dom-ma2MDAMT.js +0 -1431
- package/dist/cjs/hooks/index.d.ts +0 -3
- package/dist/cjs/index.d.ts +0 -4
- package/dist/cjs/jsx-runtime-BBxmckJR.js +0 -1377
- package/dist/cjs/types/componentProps/align.d.ts +0 -1
- package/dist/cjs/types/componentProps/alignDirection.d.ts +0 -1
- package/dist/cjs/types/componentProps/justifyContent.d.ts +0 -1
- package/dist/cjs/types/componentProps/textAlign.d.ts +0 -1
- package/dist/cjs/types/componentProps/textColorActive.d.ts +0 -2
- package/dist/cjs/types/componentProps/textWrap.d.ts +0 -1
- package/dist/components/Accordion/Accordion.d.ts +0 -8
- package/dist/components/Accordion/Accordion.interface.d.ts +0 -70
- package/dist/components/Accordion/AccordionItem.d.ts +0 -8
- package/dist/components/Accordion/index.d.ts +0 -3
- package/dist/components/Avatar/Avatar.d.ts +0 -3
- package/dist/components/Avatar/Avatar.interface.d.ts +0 -29
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Badge/Badge.d.ts +0 -10
- package/dist/components/Badge/Badge.interface.d.ts +0 -33
- package/dist/components/Badge/index.d.ts +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.interface.d.ts +0 -71
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts +0 -8
- package/dist/components/Breadcrumbs/index.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -5
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Caption/Caption.d.ts +0 -3
- package/dist/components/Caption/Caption.interface.d.ts +0 -21
- package/dist/components/Caption/index.d.ts +0 -1
- package/dist/components/Card/Card.d.ts +0 -13
- package/dist/components/Card/Card.interface.d.ts +0 -29
- package/dist/components/Card/index.d.ts +0 -1
- package/dist/components/Cell/Cell.d.ts +0 -9
- package/dist/components/Cell/index.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -9
- package/dist/components/Checkbox/Checkbox.interface.d.ts +0 -56
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/Chips/Chips.d.ts +0 -4
- package/dist/components/Chips/index.d.ts +0 -1
- package/dist/components/Choice/Choice.d.ts +0 -5
- package/dist/components/Choice/Choice.interface.d.ts +0 -59
- package/dist/components/Choice/index.d.ts +0 -1
- package/dist/components/Code/Code.d.ts +0 -21
- package/dist/components/Code/Code.interface.d.ts +0 -33
- package/dist/components/Code/index.d.ts +0 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +0 -8
- package/dist/components/ContextMenu/ContextMenu.interface.d.ts +0 -36
- package/dist/components/ContextMenu/ContextMenuItem.d.ts +0 -3
- package/dist/components/ContextMenu/index.d.ts +0 -3
- package/dist/components/CookiesWarning/CookiesWarning.d.ts +0 -10
- package/dist/components/CookiesWarning/CookiesWarning.interface.d.ts +0 -16
- package/dist/components/CookiesWarning/index.d.ts +0 -2
- package/dist/components/DadataHintField/DadataHintField.d.ts +0 -3
- package/dist/components/DadataHintField/DadataHintField.interface.d.ts +0 -14
- package/dist/components/DadataHintField/index.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -3
- package/dist/components/DatePicker/DatePicker.interface.d.ts +0 -100
- package/dist/components/DatePicker/index.d.ts +0 -1
- package/dist/components/Divider/Divider.d.ts +0 -8
- package/dist/components/Divider/Divider.interface.d.ts +0 -31
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/Dot/Dot.d.ts +0 -6
- package/dist/components/Dot/Dot.interface.d.ts +0 -27
- package/dist/components/Dot/index.d.ts +0 -1
- package/dist/components/Drawer/Drawer.d.ts +0 -3
- package/dist/components/Drawer/Drawer.interface.d.ts +0 -16
- package/dist/components/Drawer/index.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts +0 -10
- package/dist/components/Dropdown/DropdownItem.d.ts +0 -10
- package/dist/components/Dropdown/index.d.ts +0 -3
- package/dist/components/Flex/Flex.d.ts +0 -8
- package/dist/components/Flex/FlexItem.d.ts +0 -8
- package/dist/components/Flex/index.d.ts +0 -3
- package/dist/components/FormField/ChoiceField.d.ts +0 -8
- package/dist/components/FormField/FormField.d.ts +0 -9
- package/dist/components/FormField/FormFiled.interface.d.ts +0 -77
- package/dist/components/FormField/PasswordField.d.ts +0 -9
- package/dist/components/FormField/SelectField.d.ts +0 -9
- package/dist/components/FormField/SwitchField.d.ts +0 -8
- package/dist/components/FormField/index.d.ts +0 -6
- package/dist/components/Grid/Grid.d.ts +0 -8
- package/dist/components/Grid/Grid.interface.d.ts +0 -142
- package/dist/components/Grid/GridItem.d.ts +0 -3
- package/dist/components/Grid/GridRow.d.ts +0 -8
- package/dist/components/Grid/index.d.ts +0 -4
- package/dist/components/Group/Group.d.ts +0 -9
- package/dist/components/Group/Group.interface.d.ts +0 -53
- package/dist/components/Group/index.d.ts +0 -1
- package/dist/components/HTMLContent/HTMLContent.d.ts +0 -3
- package/dist/components/HTMLContent/index.d.ts +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -5
- package/dist/components/Icon/Icon.interface.d.ts +0 -93
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Image/Image.d.ts +0 -3
- package/dist/components/Image/Image.interface.d.ts +0 -34
- package/dist/components/Image/index.d.ts +0 -1
- package/dist/components/Input/Input.d.ts +0 -5
- package/dist/components/Input/Input.interface.d.ts +0 -51
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/InputMask/Input.d.ts +0 -5
- package/dist/components/InputMask/Input.interface.d.ts +0 -53
- package/dist/components/InputMask/index.d.ts +0 -1
- package/dist/components/InputPassword/InputPassword.d.ts +0 -10
- package/dist/components/InputPassword/InputPassword.interface.d.ts +0 -52
- package/dist/components/InputPassword/index.d.ts +0 -1
- package/dist/components/Label/Label.d.ts +0 -9
- package/dist/components/Label/Label.interface.d.ts +0 -58
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/LanguageSelector/Label.interface.d.ts +0 -20
- package/dist/components/LanguageSelector/LanguageSelector.d.ts +0 -3
- package/dist/components/LanguageSelector/index.d.ts +0 -1
- package/dist/components/Link/Link.d.ts +0 -11
- package/dist/components/Link/Link.interface.d.ts +0 -61
- package/dist/components/Link/index.d.ts +0 -1
- package/dist/components/List/List.d.ts +0 -3
- package/dist/components/List/List.interface.d.ts +0 -28
- package/dist/components/List/ListItem.d.ts +0 -3
- package/dist/components/List/index.d.ts +0 -3
- package/dist/components/Loader/Loader.d.ts +0 -4
- package/dist/components/Loader/Loader.interface.d.ts +0 -30
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/Logo/Logo.d.ts +0 -4
- package/dist/components/Logo/Logo.interface.d.ts +0 -37
- package/dist/components/Logo/index.d.ts +0 -1
- package/dist/components/Menu/Menu.d.ts +0 -8
- package/dist/components/Menu/Menu.interface.d.ts +0 -20
- package/dist/components/Menu/index.d.ts +0 -1
- package/dist/components/MenuItem/MenuItem.d.ts +0 -11
- package/dist/components/MenuItem/MenuItem.interface.d.ts +0 -65
- package/dist/components/MenuItem/index.d.ts +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -4
- package/dist/components/Modal/Modal.interface.d.ts +0 -33
- package/dist/components/Modal/ModalLoader.d.ts +0 -3
- package/dist/components/Modal/index.d.ts +0 -3
- package/dist/components/Notification/Notification.interface.d.ts +0 -49
- package/dist/components/Notification/NotificationItem.d.ts +0 -10
- package/dist/components/Notification/NotificationList.d.ts +0 -3
- package/dist/components/Notification/index.d.ts +0 -3
- package/dist/components/Overlay/Overlay.d.ts +0 -3
- package/dist/components/Overlay/Overlay.interface.d.ts +0 -12
- package/dist/components/Overlay/index.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -13
- package/dist/components/Pagination/Pagination.interface.d.ts +0 -46
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/Panel/Panel.d.ts +0 -7
- package/dist/components/Panel/index.d.ts +0 -1
- package/dist/components/Radio/Radio.d.ts +0 -10
- package/dist/components/Radio/Radio.interface.d.ts +0 -53
- package/dist/components/Radio/index.d.ts +0 -1
- package/dist/components/RangeSlider/RangeSlider.d.ts +0 -3
- package/dist/components/RangeSlider/RangeSlider.interface.d.ts +0 -28
- package/dist/components/RangeSlider/index.d.ts +0 -1
- package/dist/components/Response/Response.d.ts +0 -4
- package/dist/components/Response/Response.interface.d.ts +0 -66
- package/dist/components/Response/index.d.ts +0 -1
- package/dist/components/SVGContent/SVGContent.d.ts +0 -3
- package/dist/components/SVGContent/SVGContent.interface.d.ts +0 -11
- package/dist/components/SVGContent/index.d.ts +0 -1
- package/dist/components/ScrollOnDrag/ScrollOnDrag.d.ts +0 -8
- package/dist/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +0 -18
- package/dist/components/ScrollOnDrag/index.d.ts +0 -1
- package/dist/components/ScrollToView/ScrollToView.d.ts +0 -2
- package/dist/components/ScrollToView/index.d.ts +0 -1
- package/dist/components/Scrollbar/Scrollbar.d.ts +0 -8
- package/dist/components/Scrollbar/Scrollbar.interface.d.ts +0 -10
- package/dist/components/Scrollbar/index.d.ts +0 -1
- package/dist/components/Search/Search.interface.d.ts +0 -69
- package/dist/components/Search/SearchInput.d.ts +0 -5
- package/dist/components/Search/SearchResult.d.ts +0 -4
- package/dist/components/Search/index.d.ts +0 -3
- package/dist/components/Segmented/Segmented.d.ts +0 -5
- package/dist/components/Segmented/Segmented.interface.d.ts +0 -42
- package/dist/components/Segmented/index.d.ts +0 -1
- package/dist/components/SiteMenu/SiteMenu.d.ts +0 -3
- package/dist/components/SiteMenu/SiteMenu.interface.d.ts +0 -23
- package/dist/components/SiteMenu/SiteMenuButton.d.ts +0 -3
- package/dist/components/SiteMenu/index.d.ts +0 -3
- package/dist/components/Swiper/Swiper.d.ts +0 -9
- package/dist/components/Swiper/Swiper.interface.d.ts +0 -58
- package/dist/components/Swiper/index.d.ts +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -4
- package/dist/components/Switch/Switch.interface.d.ts +0 -10
- package/dist/components/Switch/index.d.ts +0 -1
- package/dist/components/Tab/Tab.d.ts +0 -11
- package/dist/components/Tab/TabGroup.d.ts +0 -3
- package/dist/components/Tab/index.d.ts +0 -3
- package/dist/components/Text/Text.d.ts +0 -9
- package/dist/components/Text/index.d.ts +0 -1
- package/dist/components/Textarea/Textarea.d.ts +0 -9
- package/dist/components/Textarea/Textarea.interface.d.ts +0 -44
- package/dist/components/Textarea/index.d.ts +0 -1
- package/dist/components/Tile/Tile.d.ts +0 -9
- package/dist/components/Tile/index.d.ts +0 -1
- package/dist/components/Title/Title.d.ts +0 -9
- package/dist/components/Title/index.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -5
- package/dist/components/Tooltip/Tooltip.interface.d.ts +0 -44
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/Video/Video.d.ts +0 -3
- package/dist/components/Video/Video.interface.d.ts +0 -15
- package/dist/components/Video/index.d.ts +0 -1
- package/dist/components/Wrapper/Wrapper.d.ts +0 -9
- package/dist/components/Wrapper/index.d.ts +0 -1
- package/dist/components/index.d.ts +0 -60
- package/dist/context/index.d.ts +0 -2
- package/dist/floating-ui.dom-BV5qw-HP.js +0 -1423
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/styleAttributes.interface.d.ts +0 -161
- package/dist/index.d.ts +0 -4
- package/dist/jsx-runtime-C2uP7l8s.js +0 -1371
- package/dist/types/componentProps/align.d.ts +0 -1
- package/dist/types/componentProps/alignDirection.d.ts +0 -1
- package/dist/types/componentProps/alignment.d.ts +0 -1
- package/dist/types/componentProps/appearanceKeys.d.ts +0 -1
- package/dist/types/componentProps/borderColor.d.ts +0 -1
- package/dist/types/componentProps/borderColorHover.d.ts +0 -1
- package/dist/types/componentProps/borderType.d.ts +0 -1
- package/dist/types/componentProps/borderWidth.d.ts +0 -1
- package/dist/types/componentProps/captionPosition.d.ts +0 -1
- package/dist/types/componentProps/direction.d.ts +0 -1
- package/dist/types/componentProps/elevation.d.ts +0 -1
- package/dist/types/componentProps/emojiSize.d.ts +0 -1
- package/dist/types/componentProps/fill.d.ts +0 -1
- package/dist/types/componentProps/fillGradient.d.ts +0 -1
- package/dist/types/componentProps/fillHover.d.ts +0 -1
- package/dist/types/componentProps/fillType.d.ts +0 -1
- package/dist/types/componentProps/flexAlign.d.ts +0 -1
- package/dist/types/componentProps/flexGrow.d.ts +0 -1
- package/dist/types/componentProps/flexJustifyContent.d.ts +0 -1
- package/dist/types/componentProps/flexWrap.d.ts +0 -1
- package/dist/types/componentProps/gridAlign.d.ts +0 -1
- package/dist/types/componentProps/gridAlignSelf.d.ts +0 -1
- package/dist/types/componentProps/gridJustifyItems.d.ts +0 -1
- package/dist/types/componentProps/gridJustifySelf.d.ts +0 -1
- package/dist/types/componentProps/height.d.ts +0 -1
- package/dist/types/componentProps/horizontalContentAlign.d.ts +0 -1
- package/dist/types/componentProps/horizontalResizeMode.d.ts +0 -1
- package/dist/types/componentProps/iconFillSize.d.ts +0 -1
- package/dist/types/componentProps/iconSize.d.ts +0 -1
- package/dist/types/componentProps/itemColor.d.ts +0 -1
- package/dist/types/componentProps/justifyContent.d.ts +0 -1
- package/dist/types/componentProps/overflow.d.ts +0 -1
- package/dist/types/componentProps/position.d.ts +0 -1
- package/dist/types/componentProps/resizeMode.d.ts +0 -1
- package/dist/types/componentProps/shape.d.ts +0 -1
- package/dist/types/componentProps/size.d.ts +0 -1
- package/dist/types/componentProps/sizeInterface.d.ts +0 -1
- package/dist/types/componentProps/sizePX.d.ts +0 -1
- package/dist/types/componentProps/stacking.d.ts +0 -1
- package/dist/types/componentProps/state.d.ts +0 -1
- package/dist/types/componentProps/stateKeys.d.ts +0 -1
- package/dist/types/componentProps/svgFill.d.ts +0 -1
- package/dist/types/componentProps/textAlign.d.ts +0 -1
- package/dist/types/componentProps/textColor.d.ts +0 -1
- package/dist/types/componentProps/textColorActive.d.ts +0 -2
- package/dist/types/componentProps/textColorHover.d.ts +0 -1
- package/dist/types/componentProps/textGradient.d.ts +0 -1
- package/dist/types/componentProps/textSize.d.ts +0 -1
- package/dist/types/componentProps/textStyle.d.ts +0 -1
- package/dist/types/componentProps/textTag.d.ts +0 -1
- package/dist/types/componentProps/textWeight.d.ts +0 -1
- package/dist/types/componentProps/textWrap.d.ts +0 -1
- package/dist/types/componentProps/titleSize.d.ts +0 -1
- package/dist/types/componentProps/type.d.ts +0 -1
- package/dist/types/componentProps/underline.d.ts +0 -1
- package/dist/types/componentProps/verticalContentAlign.d.ts +0 -1
- package/dist/types/componentProps/verticalResizeMode.d.ts +0 -1
- package/dist/types/componentProps/width.d.ts +0 -1
- package/dist/types/componentProps/wrap.d.ts +0 -1
- package/dist/types/index.d.ts +0 -57
- /package/dist/{cjs/_tslib-CKiUdo7p.js → tslib.es6-CKiUdo7p.js} +0 -0
- /package/dist/{_tslib-S-VPg1Cw.js → tslib.es6-S-VPg1Cw.js} +0 -0
- /package/dist/{cjs → types}/components/Accordion/Accordion.d.ts +0 -0
- /package/dist/{cjs → types}/components/Accordion/Accordion.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Accordion/AccordionItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Accordion/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Avatar/Avatar.d.ts +0 -0
- /package/dist/{cjs → types}/components/Avatar/Avatar.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Avatar/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Badge/Badge.d.ts +0 -0
- /package/dist/{cjs → types}/components/Badge/Badge.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Badge/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/Breadcrumbs.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/BreadcrumbsItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Button/Button.d.ts +0 -0
- /package/dist/{cjs → types}/components/Button/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Caption/Caption.d.ts +0 -0
- /package/dist/{cjs → types}/components/Caption/Caption.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Caption/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Card/Card.d.ts +0 -0
- /package/dist/{cjs → types}/components/Card/Card.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Card/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Cell/Cell.d.ts +0 -0
- /package/dist/{cjs → types}/components/Cell/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{cjs → types}/components/Checkbox/Checkbox.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Checkbox/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Chips/Chips.d.ts +0 -0
- /package/dist/{cjs → types}/components/Chips/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Choice/Choice.d.ts +0 -0
- /package/dist/{cjs → types}/components/Choice/Choice.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Choice/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Code/Code.d.ts +0 -0
- /package/dist/{cjs → types}/components/Code/Code.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Code/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/ContextMenu.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/ContextMenu.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/ContextMenuItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/CookiesWarning/CookiesWarning.d.ts +0 -0
- /package/dist/{cjs → types}/components/CookiesWarning/CookiesWarning.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/CookiesWarning/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/DadataHintField/DadataHintField.d.ts +0 -0
- /package/dist/{cjs → types}/components/DadataHintField/DadataHintField.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/DadataHintField/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{cjs → types}/components/DatePicker/DatePicker.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/DatePicker/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Divider/Divider.d.ts +0 -0
- /package/dist/{cjs → types}/components/Divider/Divider.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Divider/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dot/Dot.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dot/Dot.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dot/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Drawer/Drawer.d.ts +0 -0
- /package/dist/{cjs → types}/components/Drawer/Drawer.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Drawer/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dropdown/Dropdown.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dropdown/DropdownItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dropdown/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Flex/Flex.d.ts +0 -0
- /package/dist/{cjs → types}/components/Flex/FlexItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Flex/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/ChoiceField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/FormField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/FormFiled.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/PasswordField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/SelectField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/SwitchField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/Grid.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/Grid.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/GridItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/GridRow.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Group/Group.d.ts +0 -0
- /package/dist/{cjs → types}/components/Group/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/HTMLContent/HTMLContent.d.ts +0 -0
- /package/dist/{cjs → types}/components/HTMLContent/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Icon/Icon.d.ts +0 -0
- /package/dist/{cjs → types}/components/Icon/Icon.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Icon/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Image/Image.d.ts +0 -0
- /package/dist/{cjs → types}/components/Image/Image.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Image/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Input/Input.d.ts +0 -0
- /package/dist/{cjs → types}/components/Input/Input.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Input/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputMask/Input.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputMask/Input.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputMask/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputPassword/InputPassword.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputPassword/InputPassword.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputPassword/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Label/Label.d.ts +0 -0
- /package/dist/{cjs → types}/components/Label/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/LanguageSelector/Label.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/LanguageSelector/LanguageSelector.d.ts +0 -0
- /package/dist/{cjs → types}/components/LanguageSelector/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Link/Link.d.ts +0 -0
- /package/dist/{cjs → types}/components/Link/Link.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Link/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/List.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/List.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/ListItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Loader/Loader.d.ts +0 -0
- /package/dist/{cjs → types}/components/Loader/Loader.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Loader/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Logo/Logo.d.ts +0 -0
- /package/dist/{cjs → types}/components/Logo/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Menu/Menu.d.ts +0 -0
- /package/dist/{cjs → types}/components/Menu/Menu.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Menu/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/MenuItem/MenuItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/MenuItem/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/Modal.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/Modal.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/ModalLoader.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/Notification.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/NotificationItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/NotificationList.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Overlay/Overlay.d.ts +0 -0
- /package/dist/{cjs → types}/components/Overlay/Overlay.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Overlay/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Pagination/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Panel/Panel.d.ts +0 -0
- /package/dist/{cjs → types}/components/Panel/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Radio/Radio.d.ts +0 -0
- /package/dist/{cjs → types}/components/Radio/Radio.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Radio/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/RangeSlider/RangeSlider.d.ts +0 -0
- /package/dist/{cjs → types}/components/RangeSlider/RangeSlider.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/RangeSlider/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Response/Response.d.ts +0 -0
- /package/dist/{cjs → types}/components/Response/Response.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Response/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/SVGContent/SVGContent.d.ts +0 -0
- /package/dist/{cjs → types}/components/SVGContent/SVGContent.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/SVGContent/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollOnDrag/ScrollOnDrag.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollOnDrag/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollToView/ScrollToView.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollToView/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Scrollbar/Scrollbar.d.ts +0 -0
- /package/dist/{cjs → types}/components/Scrollbar/Scrollbar.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Scrollbar/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/Search.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/SearchInput.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/SearchResult.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Segmented/Segmented.d.ts +0 -0
- /package/dist/{cjs → types}/components/Segmented/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/SiteMenu.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/SiteMenu.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/SiteMenuButton.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Swiper/Swiper.d.ts +0 -0
- /package/dist/{cjs → types}/components/Swiper/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Switch/Switch.d.ts +0 -0
- /package/dist/{cjs → types}/components/Switch/Switch.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Switch/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tab/Tab.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tab/TabGroup.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tab/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Text/Text.d.ts +0 -0
- /package/dist/{cjs → types}/components/Text/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Textarea/Textarea.d.ts +0 -0
- /package/dist/{cjs → types}/components/Textarea/Textarea.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Textarea/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tile/Tile.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tile/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Title/Title.d.ts +0 -0
- /package/dist/{cjs → types}/components/Title/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tooltip/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Video/Video.d.ts +0 -0
- /package/dist/{cjs → types}/components/Video/Video.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Video/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Wrapper/Wrapper.d.ts +0 -0
- /package/dist/{cjs → types}/components/Wrapper/index.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/alignment.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/appearanceKeys.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderColor.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderColorHover.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderType.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderWidth.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/captionPosition.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/direction.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/elevation.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/emojiSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fill.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fillGradient.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fillHover.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fillType.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexGrow.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexJustifyContent.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexWrap.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridAlignSelf.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridJustifyItems.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridJustifySelf.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/height.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/horizontalContentAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/horizontalResizeMode.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/iconFillSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/iconSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/itemColor.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/overflow.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/position.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/resizeMode.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/shape.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/size.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/sizeInterface.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/sizePX.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/stacking.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/state.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/stateKeys.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/svgFill.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textColor.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textColorHover.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textGradient.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textStyle.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textTag.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textWeight.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/titleSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/type.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/underline.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/verticalContentAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/verticalResizeMode.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/width.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/wrap.d.ts +0 -0
|
@@ -1,1111 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _tslib = require('./_tslib-CKiUdo7p.js');
|
|
4
|
-
var jsxRuntime = require('./jsx-runtime-BBxmckJR.js');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var crypto = require('crypto');
|
|
8
|
-
var Input = require('./Input-vwyG3XF0.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
-
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
14
|
-
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
15
|
-
|
|
16
|
-
function getDefaultExportFromCjs (x) {
|
|
17
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
|
|
23
|
-
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
24
|
-
|
|
25
|
-
if (ret !== void 0) {
|
|
26
|
-
return !!ret;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (objA === objB) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var keysA = Object.keys(objA);
|
|
38
|
-
var keysB = Object.keys(objB);
|
|
39
|
-
|
|
40
|
-
if (keysA.length !== keysB.length) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
45
|
-
|
|
46
|
-
// Test for A's keys different from B.
|
|
47
|
-
for (var idx = 0; idx < keysA.length; idx++) {
|
|
48
|
-
var key = keysA[idx];
|
|
49
|
-
|
|
50
|
-
if (!bHasOwnProperty(key)) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
var valueA = objA[key];
|
|
55
|
-
var valueB = objB[key];
|
|
56
|
-
|
|
57
|
-
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
58
|
-
|
|
59
|
-
if (ret === false || (ret === void 0 && valueA !== valueB)) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return true;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
var shallowEqual = /*@__PURE__*/getDefaultExportFromCjs(shallowequal);
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Returns a function, that, as long as it continues to be invoked, will not
|
|
71
|
-
* be triggered. The function will be called after it stops being called for
|
|
72
|
-
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
73
|
-
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
74
|
-
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
75
|
-
*
|
|
76
|
-
* @source underscore.js
|
|
77
|
-
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
78
|
-
* @param {Function} function to wrap
|
|
79
|
-
* @param {Number} timeout in ms (`100`)
|
|
80
|
-
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
81
|
-
* @api public
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
function debounce(func, wait, immediate){
|
|
85
|
-
var timeout, args, context, timestamp, result;
|
|
86
|
-
if (null == wait) wait = 100;
|
|
87
|
-
|
|
88
|
-
function later() {
|
|
89
|
-
var last = Date.now() - timestamp;
|
|
90
|
-
|
|
91
|
-
if (last < wait && last >= 0) {
|
|
92
|
-
timeout = setTimeout(later, wait - last);
|
|
93
|
-
} else {
|
|
94
|
-
timeout = null;
|
|
95
|
-
if (!immediate) {
|
|
96
|
-
result = func.apply(context, args);
|
|
97
|
-
context = args = null;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
var debounced = function(){
|
|
102
|
-
context = this;
|
|
103
|
-
args = arguments;
|
|
104
|
-
timestamp = Date.now();
|
|
105
|
-
var callNow = immediate && !timeout;
|
|
106
|
-
if (!timeout) timeout = setTimeout(later, wait);
|
|
107
|
-
if (callNow) {
|
|
108
|
-
result = func.apply(context, args);
|
|
109
|
-
context = args = null;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return result;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
debounced.clear = function() {
|
|
116
|
-
if (timeout) {
|
|
117
|
-
clearTimeout(timeout);
|
|
118
|
-
timeout = null;
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
debounced.flush = function() {
|
|
123
|
-
if (timeout) {
|
|
124
|
-
result = func.apply(context, args);
|
|
125
|
-
context = args = null;
|
|
126
|
-
|
|
127
|
-
clearTimeout(timeout);
|
|
128
|
-
timeout = null;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
return debounced;
|
|
133
|
-
}
|
|
134
|
-
// Adds compatibility for ES modules
|
|
135
|
-
debounce.debounce = debounce;
|
|
136
|
-
|
|
137
|
-
var debounce_1 = debounce;
|
|
138
|
-
|
|
139
|
-
let urlAlphabet =
|
|
140
|
-
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
141
|
-
|
|
142
|
-
const POOL_SIZE_MULTIPLIER = 128;
|
|
143
|
-
let pool, poolOffset;
|
|
144
|
-
let fillPool = bytes => {
|
|
145
|
-
if (!pool || pool.length < bytes) {
|
|
146
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
147
|
-
crypto__default.default.randomFillSync(pool);
|
|
148
|
-
poolOffset = 0;
|
|
149
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
150
|
-
crypto__default.default.randomFillSync(pool);
|
|
151
|
-
poolOffset = 0;
|
|
152
|
-
}
|
|
153
|
-
poolOffset += bytes;
|
|
154
|
-
};
|
|
155
|
-
let nanoid = (size = 21) => {
|
|
156
|
-
fillPool((size -= 0));
|
|
157
|
-
let id = '';
|
|
158
|
-
for (let i = poolOffset - size; i < poolOffset; i++) {
|
|
159
|
-
id += urlAlphabet[pool[i] & 63];
|
|
160
|
-
}
|
|
161
|
-
return id
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
var xhr;
|
|
165
|
-
var makeRequest = function (method, endpoint, data, cache, onReceiveData) {
|
|
166
|
-
if (xhr) {
|
|
167
|
-
xhr.abort();
|
|
168
|
-
}
|
|
169
|
-
var cacheKey;
|
|
170
|
-
if (cache) {
|
|
171
|
-
cacheKey = cache.serializeCacheKey({
|
|
172
|
-
headers: data.headers,
|
|
173
|
-
body: data.json,
|
|
174
|
-
url: endpoint,
|
|
175
|
-
method: method,
|
|
176
|
-
});
|
|
177
|
-
var cachedData = cache.get(cacheKey);
|
|
178
|
-
if (cachedData) {
|
|
179
|
-
onReceiveData(cachedData);
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
xhr = new XMLHttpRequest();
|
|
184
|
-
xhr.open(method, endpoint);
|
|
185
|
-
if (data.headers) {
|
|
186
|
-
Object.entries(data.headers).forEach(function (_a) {
|
|
187
|
-
var header = _a[0], headerValue = _a[1];
|
|
188
|
-
xhr.setRequestHeader(header, headerValue);
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
xhr.send(JSON.stringify(data.json));
|
|
192
|
-
xhr.onreadystatechange = function () {
|
|
193
|
-
var _a;
|
|
194
|
-
if (!xhr || xhr.readyState !== 4) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (xhr.status === 200) {
|
|
198
|
-
var payload = (_a = JSON.parse(xhr.response)) === null || _a === void 0 ? void 0 : _a.suggestions;
|
|
199
|
-
if (payload) {
|
|
200
|
-
cache === null || cache === void 0 ? void 0 : cache.set(cacheKey, payload);
|
|
201
|
-
onReceiveData(payload);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
var HttpCache = /** @class */ (function () {
|
|
208
|
-
function HttpCache() {
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Сгенерировать уникальный ключ кеша из параметров http-запроса
|
|
212
|
-
* @example
|
|
213
|
-
* ```ts
|
|
214
|
-
* cache.serializeCacheKey({
|
|
215
|
-
* url: 'https://example.com',
|
|
216
|
-
* body: { key: "value" },
|
|
217
|
-
* method: "POST"
|
|
218
|
-
* })
|
|
219
|
-
* ```
|
|
220
|
-
*/
|
|
221
|
-
HttpCache.prototype.serializeCacheKey = function (payload) {
|
|
222
|
-
try {
|
|
223
|
-
return JSON.stringify(payload);
|
|
224
|
-
}
|
|
225
|
-
catch (_e) {
|
|
226
|
-
// на случай попытки сериализации объекта с циклическими зависимостями внутри
|
|
227
|
-
return payload.url + String(Math.random());
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
return HttpCache;
|
|
231
|
-
}());
|
|
232
|
-
|
|
233
|
-
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
234
|
-
var extendStatics = function (d, b) {
|
|
235
|
-
extendStatics = Object.setPrototypeOf ||
|
|
236
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
237
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
238
|
-
return extendStatics(d, b);
|
|
239
|
-
};
|
|
240
|
-
return function (d, b) {
|
|
241
|
-
if (typeof b !== "function" && b !== null)
|
|
242
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
243
|
-
extendStatics(d, b);
|
|
244
|
-
function __() { this.constructor = d; }
|
|
245
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
246
|
-
};
|
|
247
|
-
})();
|
|
248
|
-
var minute = 60000;
|
|
249
|
-
var DefaultHttpCache = /** @class */ (function (_super) {
|
|
250
|
-
__extends$7(DefaultHttpCache, _super);
|
|
251
|
-
function DefaultHttpCache() {
|
|
252
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
253
|
-
_this._map = new Map();
|
|
254
|
-
_this._ttl = 10 * minute;
|
|
255
|
-
return _this;
|
|
256
|
-
}
|
|
257
|
-
Object.defineProperty(DefaultHttpCache, "shared", {
|
|
258
|
-
/**
|
|
259
|
-
* Синглтон
|
|
260
|
-
* @example
|
|
261
|
-
* ```ts
|
|
262
|
-
* cache.shared.get('key');
|
|
263
|
-
* ```
|
|
264
|
-
*/
|
|
265
|
-
get: function () {
|
|
266
|
-
if (!DefaultHttpCache.sharedInstance) {
|
|
267
|
-
DefaultHttpCache.sharedInstance = new DefaultHttpCache();
|
|
268
|
-
}
|
|
269
|
-
return DefaultHttpCache.sharedInstance;
|
|
270
|
-
},
|
|
271
|
-
enumerable: false,
|
|
272
|
-
configurable: true
|
|
273
|
-
});
|
|
274
|
-
Object.defineProperty(DefaultHttpCache.prototype, "ttl", {
|
|
275
|
-
/**
|
|
276
|
-
* Время жизни кеша в миллисекундах
|
|
277
|
-
* @example
|
|
278
|
-
* ```ts
|
|
279
|
-
* cache.ttl = 60000;
|
|
280
|
-
* cache.ttl = Infinity;
|
|
281
|
-
* cache.tll = 0;
|
|
282
|
-
*
|
|
283
|
-
* // негативные значения игнорируются
|
|
284
|
-
* cache.ttl = -1;
|
|
285
|
-
* cache.ttl = Number.NEGATIVE_INFINITY;
|
|
286
|
-
* ```
|
|
287
|
-
*/
|
|
288
|
-
get: function () {
|
|
289
|
-
return this._ttl;
|
|
290
|
-
},
|
|
291
|
-
set: function (ttl) {
|
|
292
|
-
if (typeof ttl === 'number' && ttl >= 0) {
|
|
293
|
-
this._ttl = ttl;
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
enumerable: false,
|
|
297
|
-
configurable: true
|
|
298
|
-
});
|
|
299
|
-
Object.defineProperty(DefaultHttpCache.prototype, "size", {
|
|
300
|
-
/**
|
|
301
|
-
* Количество элементов в кеше
|
|
302
|
-
*/
|
|
303
|
-
get: function () {
|
|
304
|
-
return this._map.size;
|
|
305
|
-
},
|
|
306
|
-
enumerable: false,
|
|
307
|
-
configurable: true
|
|
308
|
-
});
|
|
309
|
-
DefaultHttpCache.prototype.get = function (key) {
|
|
310
|
-
var data = this._map.get(key);
|
|
311
|
-
if (!data)
|
|
312
|
-
return null;
|
|
313
|
-
if (data.expires <= Date.now()) {
|
|
314
|
-
this.delete(key);
|
|
315
|
-
return null;
|
|
316
|
-
}
|
|
317
|
-
return data.data;
|
|
318
|
-
};
|
|
319
|
-
DefaultHttpCache.prototype.set = function (key, data) {
|
|
320
|
-
this._map.set(key, {
|
|
321
|
-
data: data,
|
|
322
|
-
expires: Date.now() + this.ttl,
|
|
323
|
-
});
|
|
324
|
-
return this;
|
|
325
|
-
};
|
|
326
|
-
DefaultHttpCache.prototype.delete = function (key) {
|
|
327
|
-
this._map.delete(key);
|
|
328
|
-
return this;
|
|
329
|
-
};
|
|
330
|
-
DefaultHttpCache.prototype.reset = function () {
|
|
331
|
-
this._map.clear();
|
|
332
|
-
return this;
|
|
333
|
-
};
|
|
334
|
-
return DefaultHttpCache;
|
|
335
|
-
}(HttpCache));
|
|
336
|
-
|
|
337
|
-
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
338
|
-
var extendStatics = function (d, b) {
|
|
339
|
-
extendStatics = Object.setPrototypeOf ||
|
|
340
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
341
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
342
|
-
return extendStatics(d, b);
|
|
343
|
-
};
|
|
344
|
-
return function (d, b) {
|
|
345
|
-
if (typeof b !== "function" && b !== null)
|
|
346
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
347
|
-
extendStatics(d, b);
|
|
348
|
-
function __() { this.constructor = d; }
|
|
349
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
350
|
-
};
|
|
351
|
-
})();
|
|
352
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
|
353
|
-
__assign = Object.assign || function(t) {
|
|
354
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
355
|
-
s = arguments[i];
|
|
356
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
357
|
-
t[p] = s[p];
|
|
358
|
-
}
|
|
359
|
-
return t;
|
|
360
|
-
};
|
|
361
|
-
return __assign.apply(this, arguments);
|
|
362
|
-
};
|
|
363
|
-
var BaseSuggestions = /** @class */ (function (_super) {
|
|
364
|
-
__extends$6(BaseSuggestions, _super);
|
|
365
|
-
function BaseSuggestions(props) {
|
|
366
|
-
var _this = _super.call(this, props) || this;
|
|
367
|
-
/**
|
|
368
|
-
* URL для загрузки подсказок, переопределяется в конкретном компоненте
|
|
369
|
-
*/
|
|
370
|
-
_this.loadSuggestionsUrl = '';
|
|
371
|
-
_this.dontPerformBlurHandler = false;
|
|
372
|
-
_this.getSuggestionsUrl = function () {
|
|
373
|
-
var url = _this.props.url;
|
|
374
|
-
return url || _this.loadSuggestionsUrl;
|
|
375
|
-
};
|
|
376
|
-
_this.setupDebounce = function (delay) {
|
|
377
|
-
if (typeof delay === 'number' && delay > 0) {
|
|
378
|
-
_this.fetchSuggestions = debounce_1.debounce(_this.performFetchSuggestions, delay);
|
|
379
|
-
}
|
|
380
|
-
else {
|
|
381
|
-
_this.fetchSuggestions = _this.performFetchSuggestions;
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
_this.fetchSuggestions = function () {
|
|
385
|
-
//
|
|
386
|
-
};
|
|
387
|
-
_this.handleInputFocus = function (event) {
|
|
388
|
-
_this.setState({ isFocused: true });
|
|
389
|
-
var suggestions = _this.state.suggestions;
|
|
390
|
-
if (suggestions.length === 0) {
|
|
391
|
-
_this.fetchSuggestions();
|
|
392
|
-
}
|
|
393
|
-
var inputProps = _this.props.inputProps;
|
|
394
|
-
if (inputProps && inputProps.onFocus) {
|
|
395
|
-
inputProps.onFocus(event);
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
_this.handleInputBlur = function (event) {
|
|
399
|
-
var _a = _this.state, suggestions = _a.suggestions, suggestionIndex = _a.suggestionIndex;
|
|
400
|
-
var _b = _this.props, selectOnBlur = _b.selectOnBlur, inputProps = _b.inputProps;
|
|
401
|
-
_this.setState({ isFocused: false });
|
|
402
|
-
if (suggestions.length === 0) {
|
|
403
|
-
_this.fetchSuggestions();
|
|
404
|
-
}
|
|
405
|
-
if (selectOnBlur && !_this.dontPerformBlurHandler) {
|
|
406
|
-
if (suggestions.length > 0) {
|
|
407
|
-
var suggestionIndexToSelect = suggestionIndex >= 0 && suggestionIndex < suggestions.length ? suggestionIndex : 0;
|
|
408
|
-
_this.selectSuggestion(suggestionIndexToSelect, true);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
_this.dontPerformBlurHandler = false;
|
|
412
|
-
if (inputProps && inputProps.onBlur) {
|
|
413
|
-
inputProps.onBlur(event);
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
_this.handleInputChange = function (event) {
|
|
417
|
-
var value = event.target.value;
|
|
418
|
-
var inputProps = _this.props.inputProps;
|
|
419
|
-
if (_this.didMount) {
|
|
420
|
-
_this.setState({ query: value, inputQuery: value, displaySuggestions: !!value }, function () {
|
|
421
|
-
_this.fetchSuggestions();
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
if (inputProps && inputProps.onChange) {
|
|
425
|
-
inputProps.onChange(event);
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
_this.handleInputKeyDown = function (event) {
|
|
429
|
-
_this.handleKeyboard(event);
|
|
430
|
-
var inputProps = _this.props.inputProps;
|
|
431
|
-
if (inputProps && inputProps.onKeyDown) {
|
|
432
|
-
inputProps.onKeyDown(event);
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
_this.handleInputKeyPress = function (event) {
|
|
436
|
-
_this.handleKeyboard(event);
|
|
437
|
-
var inputProps = _this.props.inputProps;
|
|
438
|
-
if (inputProps && inputProps.onKeyPress) {
|
|
439
|
-
inputProps.onKeyPress(event);
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
_this.handleKeyboard = function (event) {
|
|
443
|
-
var _a = _this.state, suggestions = _a.suggestions, suggestionIndex = _a.suggestionIndex, inputQuery = _a.inputQuery;
|
|
444
|
-
if (event.which === 40) {
|
|
445
|
-
// Arrow down
|
|
446
|
-
event.preventDefault();
|
|
447
|
-
if (suggestionIndex < suggestions.length - 1) {
|
|
448
|
-
var newSuggestionIndex = suggestionIndex + 1;
|
|
449
|
-
var newInputQuery = suggestions[newSuggestionIndex].value;
|
|
450
|
-
if (_this.didMount) {
|
|
451
|
-
_this.setState({ suggestionIndex: newSuggestionIndex, query: newInputQuery });
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
else if (event.which === 38) {
|
|
456
|
-
// Arrow up
|
|
457
|
-
event.preventDefault();
|
|
458
|
-
if (suggestionIndex >= 0) {
|
|
459
|
-
var newSuggestionIndex = suggestionIndex - 1;
|
|
460
|
-
var newInputQuery = newSuggestionIndex === -1 ? inputQuery : suggestions[newSuggestionIndex].value;
|
|
461
|
-
if (_this.didMount) {
|
|
462
|
-
_this.setState({ suggestionIndex: newSuggestionIndex, query: newInputQuery });
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
else if (event.which === 13) {
|
|
467
|
-
// Enter
|
|
468
|
-
event.preventDefault();
|
|
469
|
-
if (suggestionIndex >= 0) {
|
|
470
|
-
_this.selectSuggestion(suggestionIndex);
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
_this.performFetchSuggestions = function () {
|
|
475
|
-
var _a = _this.props, minChars = _a.minChars, token = _a.token;
|
|
476
|
-
var query = _this.state.query;
|
|
477
|
-
// Проверяем на минимальное количество символов для отправки
|
|
478
|
-
if (typeof minChars === 'number' && minChars > 0 && query.length < minChars) {
|
|
479
|
-
_this.setState({ suggestions: [], suggestionIndex: -1 });
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
makeRequest('POST', _this.getSuggestionsUrl(), {
|
|
483
|
-
headers: {
|
|
484
|
-
Accept: 'application/json',
|
|
485
|
-
Authorization: "Token ".concat(token),
|
|
486
|
-
'Content-Type': 'application/json',
|
|
487
|
-
},
|
|
488
|
-
json: _this.getLoadSuggestionsData(),
|
|
489
|
-
}, _this.httpCache, function (suggestions) {
|
|
490
|
-
if (_this.didMount) {
|
|
491
|
-
_this.setState({ suggestions: suggestions, suggestionIndex: -1 });
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
};
|
|
495
|
-
_this.onSuggestionClick = function (index, event) {
|
|
496
|
-
event.stopPropagation();
|
|
497
|
-
_this.selectSuggestion(index);
|
|
498
|
-
};
|
|
499
|
-
_this.selectSuggestion = function (index, isSilent) {
|
|
500
|
-
if (isSilent === void 0) { isSilent = false; }
|
|
501
|
-
var suggestions = _this.state.suggestions;
|
|
502
|
-
var _a = _this.props, selectOnBlur = _a.selectOnBlur, onChange = _a.onChange;
|
|
503
|
-
if (suggestions.length >= index - 1) {
|
|
504
|
-
var suggestion = suggestions[index];
|
|
505
|
-
if (selectOnBlur) {
|
|
506
|
-
_this.dontPerformBlurHandler = true;
|
|
507
|
-
}
|
|
508
|
-
_this.setState({ query: suggestion.value, inputQuery: suggestion.value, displaySuggestions: false }, function () {
|
|
509
|
-
if (!isSilent) {
|
|
510
|
-
_this.fetchSuggestions();
|
|
511
|
-
setTimeout(function () { return _this.setCursorToEnd(_this.textInput); });
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
if (onChange) {
|
|
515
|
-
onChange(suggestion);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
};
|
|
519
|
-
_this.setCursorToEnd = function (element) {
|
|
520
|
-
if (element) {
|
|
521
|
-
var valueLength = element.value.length;
|
|
522
|
-
if (element.selectionStart || element.selectionStart === 0) {
|
|
523
|
-
// eslint-disable-next-line no-param-reassign
|
|
524
|
-
element.selectionStart = valueLength;
|
|
525
|
-
// eslint-disable-next-line no-param-reassign
|
|
526
|
-
element.selectionEnd = valueLength;
|
|
527
|
-
element.focus();
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
_this.getHighlightWords = function () {
|
|
532
|
-
var inputQuery = _this.state.inputQuery;
|
|
533
|
-
var wordsToPass = ['г', 'респ', 'ул', 'р-н', 'село', 'деревня', 'поселок', 'пр-д', 'пл', 'к', 'кв', 'обл', 'д'];
|
|
534
|
-
var words = inputQuery.replace(',', '').split(' ');
|
|
535
|
-
words = words.filter(function (word) {
|
|
536
|
-
return wordsToPass.indexOf(word) < 0;
|
|
537
|
-
});
|
|
538
|
-
return words;
|
|
539
|
-
};
|
|
540
|
-
/**
|
|
541
|
-
* Функция, которая вернет уникальный key для списка React
|
|
542
|
-
* @param suggestion
|
|
543
|
-
*/
|
|
544
|
-
_this.getSuggestionKey = function (suggestion) { return suggestion.value; };
|
|
545
|
-
_this.focus = function () {
|
|
546
|
-
if (_this.textInput) {
|
|
547
|
-
_this.textInput.focus();
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
_this.setInputValue = function (value) {
|
|
551
|
-
_this.setState({ query: value || '', inputQuery: value || '' });
|
|
552
|
-
};
|
|
553
|
-
_this.didMount = false;
|
|
554
|
-
var _a = _this.props, defaultQuery = _a.defaultQuery, value = _a.value, delay = _a.delay;
|
|
555
|
-
var valueQuery = value ? value.value : undefined;
|
|
556
|
-
_this.setupDebounce(delay);
|
|
557
|
-
_this.state = {
|
|
558
|
-
query: defaultQuery || valueQuery || '',
|
|
559
|
-
inputQuery: defaultQuery || valueQuery || '',
|
|
560
|
-
isFocused: false,
|
|
561
|
-
displaySuggestions: true,
|
|
562
|
-
suggestions: [],
|
|
563
|
-
suggestionIndex: -1,
|
|
564
|
-
};
|
|
565
|
-
return _this;
|
|
566
|
-
}
|
|
567
|
-
BaseSuggestions.prototype.componentDidMount = function () {
|
|
568
|
-
this.didMount = true;
|
|
569
|
-
};
|
|
570
|
-
BaseSuggestions.prototype.componentDidUpdate = function (prevProps) {
|
|
571
|
-
var _a = this.props, value = _a.value, delay = _a.delay;
|
|
572
|
-
var _b = this.state, query = _b.query, inputQuery = _b.inputQuery;
|
|
573
|
-
if (!shallowEqual(prevProps.value, value)) {
|
|
574
|
-
var newQuery = value ? value.value : '';
|
|
575
|
-
if (query !== newQuery || inputQuery !== newQuery) {
|
|
576
|
-
this.setState({ query: newQuery, inputQuery: newQuery });
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
if (delay !== prevProps.delay) {
|
|
580
|
-
this.setupDebounce(delay);
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
BaseSuggestions.prototype.componentWillUnmount = function () {
|
|
584
|
-
this.didMount = false;
|
|
585
|
-
};
|
|
586
|
-
Object.defineProperty(BaseSuggestions.prototype, "uid", {
|
|
587
|
-
get: function () {
|
|
588
|
-
if (this.props.uid) {
|
|
589
|
-
return this.props.uid;
|
|
590
|
-
}
|
|
591
|
-
if (!this._uid) {
|
|
592
|
-
this._uid = nanoid();
|
|
593
|
-
}
|
|
594
|
-
return this._uid;
|
|
595
|
-
},
|
|
596
|
-
enumerable: false,
|
|
597
|
-
configurable: true
|
|
598
|
-
});
|
|
599
|
-
Object.defineProperty(BaseSuggestions.prototype, "httpCache", {
|
|
600
|
-
get: function () {
|
|
601
|
-
var _a = this.props, cacheProp = _a.httpCache, ttl = _a.httpCacheTtl;
|
|
602
|
-
if (!cacheProp) {
|
|
603
|
-
return null;
|
|
604
|
-
}
|
|
605
|
-
if (cacheProp instanceof HttpCache) {
|
|
606
|
-
return cacheProp;
|
|
607
|
-
}
|
|
608
|
-
var cache = DefaultHttpCache.shared;
|
|
609
|
-
if (typeof ttl === 'number') {
|
|
610
|
-
cache.ttl = ttl;
|
|
611
|
-
}
|
|
612
|
-
return cache;
|
|
613
|
-
},
|
|
614
|
-
enumerable: false,
|
|
615
|
-
configurable: true
|
|
616
|
-
});
|
|
617
|
-
BaseSuggestions.prototype.render = function () {
|
|
618
|
-
var _this = this;
|
|
619
|
-
var _a = this.props, inputProps = _a.inputProps, hintText = _a.hintText, containerClassName = _a.containerClassName, hintClassName = _a.hintClassName, suggestionsClassName = _a.suggestionsClassName, suggestionClassName = _a.suggestionClassName, currentSuggestionClassName = _a.currentSuggestionClassName, customInput = _a.customInput, children = _a.children;
|
|
620
|
-
var _b = this.state, query = _b.query, isFocused = _b.isFocused, suggestions = _b.suggestions, suggestionIndex = _b.suggestionIndex, displaySuggestions = _b.displaySuggestions;
|
|
621
|
-
var Component = typeof customInput !== 'undefined' ? customInput : 'input';
|
|
622
|
-
var optionsExpanded = isFocused && suggestions && displaySuggestions && suggestions.length > 0;
|
|
623
|
-
return (React__default.default.createElement("div", { role: "combobox", "aria-expanded": optionsExpanded ? 'true' : 'false', "aria-owns": this.uid, "aria-controls": this.uid, "aria-haspopup": "listbox", className: containerClassName || 'react-dadata react-dadata__container' },
|
|
624
|
-
React__default.default.createElement("div", null,
|
|
625
|
-
React__default.default.createElement(Component, __assign({ autoComplete: "off", className: "react-dadata__input" }, inputProps, { value: query, ref: function (input) {
|
|
626
|
-
_this.textInput = input;
|
|
627
|
-
}, onChange: this.handleInputChange, onKeyPress: this.handleInputKeyPress, onKeyDown: this.handleInputKeyDown, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur }))),
|
|
628
|
-
optionsExpanded && (React__default.default.createElement("ul", { id: this.uid, "aria-expanded": true, role: "listbox", className: suggestionsClassName || 'react-dadata__suggestions' },
|
|
629
|
-
typeof hintText !== 'undefined' && (React__default.default.createElement("div", { className: hintClassName || 'react-dadata__suggestion-note' }, hintText)),
|
|
630
|
-
suggestions.map(function (suggestion, index) {
|
|
631
|
-
var suggestionClass = suggestionClassName || 'react-dadata__suggestion';
|
|
632
|
-
if (index === suggestionIndex) {
|
|
633
|
-
suggestionClass += " ".concat(currentSuggestionClassName || 'react-dadata__suggestion--current');
|
|
634
|
-
}
|
|
635
|
-
return (React__default.default.createElement("button", { role: "option", "aria-selected": index === suggestionIndex ? 'true' : 'false', key: _this.getSuggestionKey(suggestion), onMouseDown: _this.onSuggestionClick.bind(_this, index), className: suggestionClass }, _this.renderOption(suggestion)));
|
|
636
|
-
}))),
|
|
637
|
-
children));
|
|
638
|
-
};
|
|
639
|
-
return BaseSuggestions;
|
|
640
|
-
}(React__default.default.PureComponent));
|
|
641
|
-
|
|
642
|
-
let IDX = 36;
|
|
643
|
-
let HEX = "";
|
|
644
|
-
while (IDX--) {
|
|
645
|
-
HEX += IDX.toString(36);
|
|
646
|
-
}
|
|
647
|
-
function uid(len = 11) {
|
|
648
|
-
let str = "";
|
|
649
|
-
let num = len;
|
|
650
|
-
while (num--) {
|
|
651
|
-
str += HEX[Math.random() * 36 | 0];
|
|
652
|
-
}
|
|
653
|
-
return str;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
const escapeRegexp = (term) => term.replace(/[|\\{}()[\]^$+*?.-]/g, (char) => `\\${char}`);
|
|
657
|
-
const termsToRegExpString = (terms) => terms.replace(/\s{2,}/g, " ").split(" ").join("|");
|
|
658
|
-
const regexpQuery = ({
|
|
659
|
-
terms,
|
|
660
|
-
matchExactly = false
|
|
661
|
-
}) => {
|
|
662
|
-
if (typeof terms !== "string") {
|
|
663
|
-
throw new TypeError("Expected a string");
|
|
664
|
-
}
|
|
665
|
-
const escapedTerms = escapeRegexp(terms.trim());
|
|
666
|
-
return `(${matchExactly ? escapedTerms : termsToRegExpString(escapedTerms)})`;
|
|
667
|
-
};
|
|
668
|
-
const buildRegexp = ({
|
|
669
|
-
terms,
|
|
670
|
-
matchExactly = false
|
|
671
|
-
}) => {
|
|
672
|
-
try {
|
|
673
|
-
const fromString = /^([/~@;%#'])(.*?)\1([gimsuy]*)$/.exec(terms);
|
|
674
|
-
if (fromString) {
|
|
675
|
-
return new RegExp(fromString[2], fromString[3]);
|
|
676
|
-
}
|
|
677
|
-
return new RegExp(regexpQuery({ terms, matchExactly }), "ig");
|
|
678
|
-
} catch (e) {
|
|
679
|
-
throw new TypeError("Expected terms to be either a string or a RegExp!");
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
const hasProp = (prop) => (obj) => obj !== null && typeof obj === "object" && prop in obj;
|
|
684
|
-
const hasMatch = hasProp("match");
|
|
685
|
-
const chunkExists = (chunk) => typeof chunk !== "undefined";
|
|
686
|
-
function clip({
|
|
687
|
-
curr,
|
|
688
|
-
next,
|
|
689
|
-
prev,
|
|
690
|
-
clipBy = 3
|
|
691
|
-
}) {
|
|
692
|
-
const words = curr.text.split(" ");
|
|
693
|
-
const len = words.length;
|
|
694
|
-
if (curr.match || clipBy >= len) {
|
|
695
|
-
return curr.text;
|
|
696
|
-
}
|
|
697
|
-
const ellipsis = "...";
|
|
698
|
-
if (chunkExists(next) && chunkExists(prev) && hasMatch(prev) && hasMatch(next)) {
|
|
699
|
-
if (len > clipBy * 2) {
|
|
700
|
-
return [
|
|
701
|
-
...words.slice(0, clipBy),
|
|
702
|
-
ellipsis,
|
|
703
|
-
...words.slice(-clipBy)
|
|
704
|
-
].join(" ");
|
|
705
|
-
}
|
|
706
|
-
return curr.text;
|
|
707
|
-
}
|
|
708
|
-
if (chunkExists(next) && hasMatch(next)) {
|
|
709
|
-
return [ellipsis, ...words.slice(-clipBy)].join(" ");
|
|
710
|
-
}
|
|
711
|
-
if (chunkExists(prev) && hasMatch(prev)) {
|
|
712
|
-
return [...words.slice(0, clipBy), ellipsis].join(" ");
|
|
713
|
-
}
|
|
714
|
-
return curr.text;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
var __defProp = Object.defineProperty;
|
|
718
|
-
var __defProps = Object.defineProperties;
|
|
719
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
720
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
721
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
722
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
723
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
724
|
-
var __spreadValues = (a, b) => {
|
|
725
|
-
for (var prop in b || (b = {}))
|
|
726
|
-
if (__hasOwnProp.call(b, prop))
|
|
727
|
-
__defNormalProp(a, prop, b[prop]);
|
|
728
|
-
if (__getOwnPropSymbols)
|
|
729
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
730
|
-
if (__propIsEnum.call(b, prop))
|
|
731
|
-
__defNormalProp(a, prop, b[prop]);
|
|
732
|
-
}
|
|
733
|
-
return a;
|
|
734
|
-
};
|
|
735
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
736
|
-
const hasLength = (str) => str.length > 0;
|
|
737
|
-
const highlightWords = ({
|
|
738
|
-
text,
|
|
739
|
-
query,
|
|
740
|
-
clipBy,
|
|
741
|
-
matchExactly = false
|
|
742
|
-
}) => {
|
|
743
|
-
const safeQuery = typeof query === "string" ? query.trim() : query;
|
|
744
|
-
if (safeQuery === "") {
|
|
745
|
-
return [
|
|
746
|
-
{
|
|
747
|
-
key: uid(),
|
|
748
|
-
text,
|
|
749
|
-
match: false
|
|
750
|
-
}
|
|
751
|
-
];
|
|
752
|
-
}
|
|
753
|
-
const searchRegexp = buildRegexp({ terms: query, matchExactly });
|
|
754
|
-
return text.split(searchRegexp).filter(hasLength).map((str) => ({
|
|
755
|
-
// Compose the object for a match
|
|
756
|
-
key: uid(),
|
|
757
|
-
text: str,
|
|
758
|
-
match: matchExactly ? str.toLowerCase() === safeQuery.toLowerCase() : searchRegexp.test(str)
|
|
759
|
-
})).map((chunk, index, chunks) => __spreadValues(__spreadValues({}, chunk), typeof clipBy === "number" && {
|
|
760
|
-
// We only overwrite the text if there is a clip
|
|
761
|
-
text: clip(__spreadProps(__spreadValues(__spreadValues({
|
|
762
|
-
curr: chunk
|
|
763
|
-
}, index < chunks.length - 1 && { next: chunks[index + 1] }), index > 0 && { prev: chunks[index - 1] }), {
|
|
764
|
-
// If this wasn't the first chunk, set the previous chunk
|
|
765
|
-
clipBy
|
|
766
|
-
}))
|
|
767
|
-
}));
|
|
768
|
-
};
|
|
769
|
-
|
|
770
|
-
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
771
|
-
var extendStatics = function (d, b) {
|
|
772
|
-
extendStatics = Object.setPrototypeOf ||
|
|
773
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
774
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
775
|
-
return extendStatics(d, b);
|
|
776
|
-
};
|
|
777
|
-
return function (d, b) {
|
|
778
|
-
if (typeof b !== "function" && b !== null)
|
|
779
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
780
|
-
extendStatics(d, b);
|
|
781
|
-
function __() { this.constructor = d; }
|
|
782
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
783
|
-
};
|
|
784
|
-
})();
|
|
785
|
-
var HighlightWords = /** @class */ (function (_super) {
|
|
786
|
-
__extends$5(HighlightWords, _super);
|
|
787
|
-
function HighlightWords() {
|
|
788
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
789
|
-
}
|
|
790
|
-
HighlightWords.prototype.render = function () {
|
|
791
|
-
var _a = this.props, text = _a.text, words = _a.words, highlightClassName = _a.highlightClassName, _b = _a.tagName, tagName = _b === void 0 ? 'span' : _b;
|
|
792
|
-
var query = typeof words === 'string' ? words : words.join(' ');
|
|
793
|
-
var chunks = highlightWords({ text: text, query: query });
|
|
794
|
-
return (React__default.default.createElement("span", { "aria-label": text }, chunks.map(function (chunk) {
|
|
795
|
-
if (!chunk.match) {
|
|
796
|
-
return React__default.default.createElement("span", { key: chunk.key, "aria-hidden": true }, chunk.text);
|
|
797
|
-
}
|
|
798
|
-
var Component = tagName;
|
|
799
|
-
return (React__default.default.createElement(Component, { key: chunk.key, className: highlightClassName, "aria-hidden": true }, chunk.text));
|
|
800
|
-
})));
|
|
801
|
-
};
|
|
802
|
-
return HighlightWords;
|
|
803
|
-
}(React.PureComponent));
|
|
804
|
-
|
|
805
|
-
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
806
|
-
var extendStatics = function (d, b) {
|
|
807
|
-
extendStatics = Object.setPrototypeOf ||
|
|
808
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
809
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
810
|
-
return extendStatics(d, b);
|
|
811
|
-
};
|
|
812
|
-
return function (d, b) {
|
|
813
|
-
if (typeof b !== "function" && b !== null)
|
|
814
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
815
|
-
extendStatics(d, b);
|
|
816
|
-
function __() { this.constructor = d; }
|
|
817
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
818
|
-
};
|
|
819
|
-
})();
|
|
820
|
-
/** @class */ ((function (_super) {
|
|
821
|
-
__extends$4(AddressSuggestions, _super);
|
|
822
|
-
function AddressSuggestions() {
|
|
823
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
824
|
-
_this.loadSuggestionsUrl = 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address';
|
|
825
|
-
_this.getLoadSuggestionsData = function () {
|
|
826
|
-
var _a = _this.props, count = _a.count, filterFromBound = _a.filterFromBound, filterToBound = _a.filterToBound, filterLocations = _a.filterLocations, filterLocationsBoost = _a.filterLocationsBoost, filterLanguage = _a.filterLanguage, filterRestrictValue = _a.filterRestrictValue;
|
|
827
|
-
var query = _this.state.query;
|
|
828
|
-
// TODO: Type this params
|
|
829
|
-
var requestPayload = {
|
|
830
|
-
query: query,
|
|
831
|
-
count: count || 10,
|
|
832
|
-
};
|
|
833
|
-
// Ограничение поиска по типу
|
|
834
|
-
if (filterFromBound && filterToBound) {
|
|
835
|
-
requestPayload.from_bound = { value: filterFromBound };
|
|
836
|
-
requestPayload.to_bound = { value: filterToBound };
|
|
837
|
-
}
|
|
838
|
-
// Язык подсказок
|
|
839
|
-
if (filterLanguage) {
|
|
840
|
-
requestPayload.language = filterLanguage;
|
|
841
|
-
}
|
|
842
|
-
// Сужение области поиска
|
|
843
|
-
if (filterLocations) {
|
|
844
|
-
requestPayload.locations = filterLocations;
|
|
845
|
-
}
|
|
846
|
-
// Приоритет города при ранжировании
|
|
847
|
-
if (filterLocationsBoost) {
|
|
848
|
-
requestPayload.locations_boost = filterLocationsBoost;
|
|
849
|
-
}
|
|
850
|
-
// @see https://confluence.hflabs.ru/pages/viewpage.action?pageId=1023737934
|
|
851
|
-
if (filterRestrictValue) {
|
|
852
|
-
requestPayload.restrict_value = true;
|
|
853
|
-
}
|
|
854
|
-
return requestPayload;
|
|
855
|
-
};
|
|
856
|
-
_this.renderOption = function (suggestion) {
|
|
857
|
-
var _a = _this.props, renderOption = _a.renderOption, highlightClassName = _a.highlightClassName;
|
|
858
|
-
var query = _this.state.query;
|
|
859
|
-
return renderOption ? (renderOption(suggestion, query)) : (React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), tagName: "mark", text: suggestion.value }));
|
|
860
|
-
};
|
|
861
|
-
return _this;
|
|
862
|
-
}
|
|
863
|
-
return AddressSuggestions;
|
|
864
|
-
})(BaseSuggestions));
|
|
865
|
-
|
|
866
|
-
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
867
|
-
var extendStatics = function (d, b) {
|
|
868
|
-
extendStatics = Object.setPrototypeOf ||
|
|
869
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
870
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
871
|
-
return extendStatics(d, b);
|
|
872
|
-
};
|
|
873
|
-
return function (d, b) {
|
|
874
|
-
if (typeof b !== "function" && b !== null)
|
|
875
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
876
|
-
extendStatics(d, b);
|
|
877
|
-
function __() { this.constructor = d; }
|
|
878
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
879
|
-
};
|
|
880
|
-
})();
|
|
881
|
-
var PartySuggestions = /** @class */ (function (_super) {
|
|
882
|
-
__extends$3(PartySuggestions, _super);
|
|
883
|
-
function PartySuggestions() {
|
|
884
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
885
|
-
_this.loadSuggestionsUrl = 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/party';
|
|
886
|
-
_this.getLoadSuggestionsData = function () {
|
|
887
|
-
var _a = _this.props, count = _a.count, filterStatus = _a.filterStatus, filterType = _a.filterType, filterOkved = _a.filterOkved, filterLocations = _a.filterLocations, filterLocationsBoost = _a.filterLocationsBoost;
|
|
888
|
-
var query = _this.state.query;
|
|
889
|
-
var requestPayload = {
|
|
890
|
-
query: query,
|
|
891
|
-
count: count || 10,
|
|
892
|
-
};
|
|
893
|
-
// Ограничение по статусу организации
|
|
894
|
-
if (filterStatus) {
|
|
895
|
-
requestPayload.status = filterStatus;
|
|
896
|
-
}
|
|
897
|
-
// Ограничение по ОКВЭД
|
|
898
|
-
// @see https://confluence.hflabs.ru/pages/viewpage.action?pageId=1093075333
|
|
899
|
-
if (filterOkved) {
|
|
900
|
-
requestPayload.okved = filterOkved;
|
|
901
|
-
}
|
|
902
|
-
// Ограничение по типу организации
|
|
903
|
-
if (filterType) {
|
|
904
|
-
requestPayload.type = filterType;
|
|
905
|
-
}
|
|
906
|
-
// Сужение области поиска
|
|
907
|
-
if (filterLocations) {
|
|
908
|
-
requestPayload.locations = filterLocations;
|
|
909
|
-
}
|
|
910
|
-
// Приоритет города при ранжировании
|
|
911
|
-
if (filterLocationsBoost) {
|
|
912
|
-
requestPayload.locations_boost = filterLocationsBoost;
|
|
913
|
-
}
|
|
914
|
-
return requestPayload;
|
|
915
|
-
};
|
|
916
|
-
_this.getSuggestionKey = function (suggestion) { return suggestion.data.hid; };
|
|
917
|
-
_this.renderOption = function (suggestion) {
|
|
918
|
-
var _a = _this.props, renderOption = _a.renderOption, highlightClassName = _a.highlightClassName;
|
|
919
|
-
var query = _this.state.query;
|
|
920
|
-
return renderOption ? (renderOption(suggestion, query)) : (React__default.default.createElement("div", null,
|
|
921
|
-
React__default.default.createElement("div", { className: suggestion.data.state.status === 'LIQUIDATED' ? 'react-dadata__suggestion--line-through' : undefined },
|
|
922
|
-
React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), text: suggestion.value })),
|
|
923
|
-
React__default.default.createElement("div", { className: "react-dadata__suggestion-subtitle" },
|
|
924
|
-
suggestion.data.inn && React__default.default.createElement("div", { className: "react-dadata__suggestion-subtitle-item" }, suggestion.data.inn),
|
|
925
|
-
suggestion.data.address && suggestion.data.address.value && (React__default.default.createElement("div", { className: "react-dadata__suggestion-subtitle-item" },
|
|
926
|
-
React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), text: suggestion.data.address.value }))))));
|
|
927
|
-
};
|
|
928
|
-
return _this;
|
|
929
|
-
}
|
|
930
|
-
return PartySuggestions;
|
|
931
|
-
}(BaseSuggestions));
|
|
932
|
-
|
|
933
|
-
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
934
|
-
var extendStatics = function (d, b) {
|
|
935
|
-
extendStatics = Object.setPrototypeOf ||
|
|
936
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
937
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
938
|
-
return extendStatics(d, b);
|
|
939
|
-
};
|
|
940
|
-
return function (d, b) {
|
|
941
|
-
if (typeof b !== "function" && b !== null)
|
|
942
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
943
|
-
extendStatics(d, b);
|
|
944
|
-
function __() { this.constructor = d; }
|
|
945
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
946
|
-
};
|
|
947
|
-
})();
|
|
948
|
-
/** @class */ ((function (_super) {
|
|
949
|
-
__extends$2(BankSuggestions, _super);
|
|
950
|
-
function BankSuggestions() {
|
|
951
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
952
|
-
_this.loadSuggestionsUrl = 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/bank';
|
|
953
|
-
_this.getLoadSuggestionsData = function () {
|
|
954
|
-
var _a = _this.props, count = _a.count, filterStatus = _a.filterStatus, filterType = _a.filterType, filterLocations = _a.filterLocations, filterLocationsBoost = _a.filterLocationsBoost;
|
|
955
|
-
var query = _this.state.query;
|
|
956
|
-
var requestPayload = {
|
|
957
|
-
query: query,
|
|
958
|
-
count: count || 10,
|
|
959
|
-
};
|
|
960
|
-
// Ограничение по статусу организации
|
|
961
|
-
if (filterStatus) {
|
|
962
|
-
requestPayload.status = filterStatus;
|
|
963
|
-
}
|
|
964
|
-
// Ограничение по типу организации
|
|
965
|
-
if (filterType) {
|
|
966
|
-
requestPayload.type = filterType;
|
|
967
|
-
}
|
|
968
|
-
// Сужение области поиска
|
|
969
|
-
if (filterLocations) {
|
|
970
|
-
requestPayload.locations = filterLocations;
|
|
971
|
-
}
|
|
972
|
-
// Приоритет города при ранжировании
|
|
973
|
-
if (filterLocationsBoost) {
|
|
974
|
-
requestPayload.locations_boost = filterLocationsBoost;
|
|
975
|
-
}
|
|
976
|
-
return requestPayload;
|
|
977
|
-
};
|
|
978
|
-
_this.getSuggestionKey = function (suggestion) { return "".concat(suggestion.data.bic); };
|
|
979
|
-
_this.renderOption = function (suggestion) {
|
|
980
|
-
var _a = _this.props, renderOption = _a.renderOption, highlightClassName = _a.highlightClassName;
|
|
981
|
-
var query = _this.state.query;
|
|
982
|
-
return renderOption ? (renderOption(suggestion, query)) : (React__default.default.createElement("div", null,
|
|
983
|
-
React__default.default.createElement("div", { className: suggestion.data.state.status === 'LIQUIDATED' ? 'react-dadata__suggestion--line-through' : undefined },
|
|
984
|
-
React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), text: suggestion.value })),
|
|
985
|
-
React__default.default.createElement("div", { className: "react-dadata__suggestion-subtitle" },
|
|
986
|
-
suggestion.data.bic && React__default.default.createElement("div", { className: "react-dadata__suggestion-subtitle-item" }, suggestion.data.bic),
|
|
987
|
-
suggestion.data.address && suggestion.data.address.value && (React__default.default.createElement("div", { className: "react-dadata__suggestion-subtitle-item" },
|
|
988
|
-
React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), text: suggestion.data.address.value }))))));
|
|
989
|
-
};
|
|
990
|
-
return _this;
|
|
991
|
-
}
|
|
992
|
-
return BankSuggestions;
|
|
993
|
-
})(BaseSuggestions));
|
|
994
|
-
|
|
995
|
-
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
996
|
-
var extendStatics = function (d, b) {
|
|
997
|
-
extendStatics = Object.setPrototypeOf ||
|
|
998
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
999
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
1000
|
-
return extendStatics(d, b);
|
|
1001
|
-
};
|
|
1002
|
-
return function (d, b) {
|
|
1003
|
-
if (typeof b !== "function" && b !== null)
|
|
1004
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1005
|
-
extendStatics(d, b);
|
|
1006
|
-
function __() { this.constructor = d; }
|
|
1007
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1008
|
-
};
|
|
1009
|
-
})();
|
|
1010
|
-
/** @class */ ((function (_super) {
|
|
1011
|
-
__extends$1(FioSuggestions, _super);
|
|
1012
|
-
function FioSuggestions() {
|
|
1013
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1014
|
-
_this.loadSuggestionsUrl = 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/fio';
|
|
1015
|
-
_this.getLoadSuggestionsData = function () {
|
|
1016
|
-
var _a = _this.props, count = _a.count, filterGender = _a.filterGender, filterParts = _a.filterParts;
|
|
1017
|
-
var query = _this.state.query;
|
|
1018
|
-
var requestPayload = {
|
|
1019
|
-
query: query,
|
|
1020
|
-
count: count || 10,
|
|
1021
|
-
};
|
|
1022
|
-
// Ограничение по полу
|
|
1023
|
-
if (filterGender) {
|
|
1024
|
-
requestPayload.gender = filterGender;
|
|
1025
|
-
}
|
|
1026
|
-
// Ограничение по части ФИО
|
|
1027
|
-
if (filterParts) {
|
|
1028
|
-
requestPayload.parts = filterParts;
|
|
1029
|
-
}
|
|
1030
|
-
return requestPayload;
|
|
1031
|
-
};
|
|
1032
|
-
_this.getSuggestionKey = function (suggestion) {
|
|
1033
|
-
return "name:".concat(suggestion.data.name || '', "surname:").concat(suggestion.data.surname || '', "patronymic:").concat(suggestion.data.patronymic || '');
|
|
1034
|
-
};
|
|
1035
|
-
_this.renderOption = function (suggestion) {
|
|
1036
|
-
var _a = _this.props, renderOption = _a.renderOption, highlightClassName = _a.highlightClassName;
|
|
1037
|
-
var query = _this.state.query;
|
|
1038
|
-
return renderOption ? (renderOption(suggestion, query)) : (React__default.default.createElement("div", null,
|
|
1039
|
-
React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), text: suggestion.value })));
|
|
1040
|
-
};
|
|
1041
|
-
return _this;
|
|
1042
|
-
}
|
|
1043
|
-
return FioSuggestions;
|
|
1044
|
-
})(BaseSuggestions));
|
|
1045
|
-
|
|
1046
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1047
|
-
var extendStatics = function (d, b) {
|
|
1048
|
-
extendStatics = Object.setPrototypeOf ||
|
|
1049
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1050
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
1051
|
-
return extendStatics(d, b);
|
|
1052
|
-
};
|
|
1053
|
-
return function (d, b) {
|
|
1054
|
-
if (typeof b !== "function" && b !== null)
|
|
1055
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1056
|
-
extendStatics(d, b);
|
|
1057
|
-
function __() { this.constructor = d; }
|
|
1058
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1059
|
-
};
|
|
1060
|
-
})();
|
|
1061
|
-
/** @class */ ((function (_super) {
|
|
1062
|
-
__extends(EmailSuggestions, _super);
|
|
1063
|
-
function EmailSuggestions() {
|
|
1064
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1065
|
-
_this.loadSuggestionsUrl = 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/email';
|
|
1066
|
-
_this.getLoadSuggestionsData = function () {
|
|
1067
|
-
var count = _this.props.count;
|
|
1068
|
-
var query = _this.state.query;
|
|
1069
|
-
return {
|
|
1070
|
-
query: query,
|
|
1071
|
-
count: count || 10,
|
|
1072
|
-
};
|
|
1073
|
-
};
|
|
1074
|
-
_this.getSuggestionKey = function (suggestion) { return suggestion.value; };
|
|
1075
|
-
_this.renderOption = function (suggestion) {
|
|
1076
|
-
var _a = _this.props, renderOption = _a.renderOption, highlightClassName = _a.highlightClassName;
|
|
1077
|
-
var query = _this.state.query;
|
|
1078
|
-
return renderOption ? (renderOption(suggestion, query)) : (React__default.default.createElement("div", null,
|
|
1079
|
-
React__default.default.createElement(HighlightWords, { highlightClassName: highlightClassName || 'react-dadata--highlighted', words: _this.getHighlightWords(), text: suggestion.value })));
|
|
1080
|
-
};
|
|
1081
|
-
return _this;
|
|
1082
|
-
}
|
|
1083
|
-
return EmailSuggestions;
|
|
1084
|
-
})(BaseSuggestions));
|
|
1085
|
-
|
|
1086
|
-
function DadataHintField(props) {
|
|
1087
|
-
var delay = props.delay, inputProps = props.inputProps, setValue = props.setValue, input = props.input, meta = props.meta, token = props.token;
|
|
1088
|
-
var dadataInputProps = React.useMemo(function () {
|
|
1089
|
-
return _tslib.__assign(_tslib.__assign({}, inputProps), { className: clsx__default.default('react-dadata__input', meta.active && 'input_state_focus', meta.error && meta.touched && "input_state_".concat(meta.error.key || 'error')),
|
|
1090
|
-
// https://www.npmjs.com/package/react-dadata
|
|
1091
|
-
// "Свойство value игнорируется."
|
|
1092
|
-
// value: input.value,
|
|
1093
|
-
inputValue: input.value, onFocus: input.onFocus, onBlur: input.onBlur, onChange: input.onChange });
|
|
1094
|
-
}, [
|
|
1095
|
-
inputProps,
|
|
1096
|
-
meta.active,
|
|
1097
|
-
meta.error,
|
|
1098
|
-
meta.touched,
|
|
1099
|
-
input.value,
|
|
1100
|
-
input.onFocus,
|
|
1101
|
-
input.onBlur,
|
|
1102
|
-
input.onChange,
|
|
1103
|
-
]);
|
|
1104
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(PartySuggestions, { customInput: DadataСustomInput, delay: delay || 750, inputProps: dadataInputProps, minChars: 3, token: token, onChange: setValue }));
|
|
1105
|
-
}
|
|
1106
|
-
function DadataСustomInput(props) {
|
|
1107
|
-
var inputValue = props.inputValue, otherProps = _tslib.__rest(props, ["inputValue"]);
|
|
1108
|
-
return jsxRuntime.jsxRuntimeExports.jsx(Input.Input, _tslib.__assign({}, otherProps, { value: inputValue }));
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
exports.DadataHintField = DadataHintField;
|