@expressms/smartapp-ui 3.0.0-alpha.22 → 3.0.0-alpha.220
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/build/main/assets/icons/accepted-invite-status.svg +4 -0
- package/build/main/assets/icons/arrow-back.svg +3 -0
- package/build/main/assets/icons/arrow-down.svg +3 -0
- package/build/main/assets/icons/arrow-up.svg +3 -0
- package/build/main/assets/icons/attachment-loader.svg +3 -0
- package/build/main/assets/icons/avatar-loader.svg +3 -0
- package/build/main/assets/icons/button-loader.svg +3 -0
- package/build/main/assets/icons/calendar-arrow-next.svg +3 -0
- package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
- package/build/main/assets/icons/check-mark-square.svg +4 -0
- package/build/main/assets/icons/check-mark.svg +4 -0
- package/build/main/assets/icons/chevron.svg +3 -0
- package/build/main/assets/icons/chip-info.svg +5 -0
- package/build/main/assets/icons/clear.svg +3 -0
- package/build/main/assets/icons/close-modal.svg +3 -0
- package/build/main/assets/icons/close-stories.svg +4 -0
- package/build/main/assets/icons/close.svg +3 -0
- package/build/main/assets/icons/contact-info.svg +5 -0
- package/build/main/assets/icons/copy.svg +3 -0
- package/build/main/assets/icons/corporate-user.svg +3 -0
- package/build/main/assets/icons/crown.svg +5 -0
- package/build/main/assets/icons/declined-invite-status.svg +4 -0
- package/build/main/assets/icons/delete-chip.svg +3 -0
- package/build/main/assets/icons/department.svg +3 -0
- package/build/main/assets/icons/distribution.svg +12 -0
- package/build/main/assets/icons/doc-small.svg +11 -0
- package/build/main/assets/icons/doc.svg +11 -0
- package/build/main/assets/icons/download.svg +3 -0
- package/build/main/assets/icons/error.svg +5 -0
- package/build/main/assets/icons/external-link.svg +3 -0
- package/build/main/assets/icons/eye-off.svg +5 -0
- package/build/main/assets/icons/eye-on.svg +4 -0
- package/build/main/assets/icons/file-small.svg +11 -0
- package/build/main/assets/icons/file.svg +11 -0
- package/build/main/assets/icons/global-address-book-user.svg +4 -0
- package/build/main/assets/icons/group.svg +3 -0
- package/build/main/assets/icons/image-no-preview-small.svg +11 -0
- package/build/main/assets/icons/image-no-preview.svg +11 -0
- package/build/main/assets/icons/indeterminate-check-mark-square.svg +4 -0
- package/build/main/assets/icons/info.svg +5 -0
- package/build/main/assets/icons/input-arrow-down.svg +3 -0
- package/build/main/assets/icons/input-arrow-up.svg +3 -0
- package/build/main/assets/icons/job-position.svg +3 -0
- package/build/main/assets/icons/loader.svg +3 -0
- package/build/main/assets/icons/logout.svg +4 -0
- package/build/main/assets/icons/magnifying-glass.svg +3 -0
- package/build/main/assets/icons/mail.svg +3 -0
- package/build/main/assets/icons/meeting-room.svg +3 -0
- package/build/main/assets/icons/more.svg +3 -0
- package/build/main/assets/icons/my-contacts-user.svg +3 -0
- package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
- package/build/main/assets/icons/notification-close.svg +3 -0
- package/build/main/assets/icons/notification-error.svg +5 -0
- package/build/main/assets/icons/notification-failure-filled.svg +3 -0
- package/build/main/assets/icons/notification-failure.svg +3 -0
- package/build/main/assets/icons/notification-info-filled.svg +5 -0
- package/build/main/assets/icons/notification-info.svg +5 -0
- package/build/main/assets/icons/notification-success-filled.svg +4 -0
- package/build/main/assets/icons/notification-success.svg +4 -0
- package/build/main/assets/icons/office.svg +3 -0
- package/build/main/assets/icons/order.svg +6 -0
- package/build/main/assets/icons/pdf-small.svg +11 -0
- package/build/main/assets/icons/pdf.svg +11 -0
- package/build/main/assets/icons/play-small.svg +3 -0
- package/build/main/assets/icons/play.svg +3 -0
- package/build/main/assets/icons/plus.svg +4 -0
- package/build/main/assets/icons/ppt-small.svg +11 -0
- package/build/main/assets/icons/ppt.svg +11 -0
- package/build/main/assets/icons/private.svg +5 -0
- package/build/main/assets/icons/refresh.svg +3 -0
- package/build/main/assets/icons/remove.svg +3 -0
- package/build/main/assets/icons/search.svg +3 -0
- package/build/main/assets/icons/select-arrow-down.svg +3 -0
- package/build/main/assets/icons/select-arrow-up.svg +3 -0
- package/build/main/assets/icons/server.svg +3 -0
- package/build/main/assets/icons/story-loader.svg +3 -0
- package/build/main/assets/icons/tick.svg +10 -0
- package/build/main/assets/icons/trash.svg +3 -0
- package/build/main/assets/icons/txt-small.svg +11 -0
- package/build/main/assets/icons/txt.svg +11 -0
- package/build/main/assets/icons/video-no-preview-small.svg +11 -0
- package/build/main/assets/icons/video-no-preview.svg +11 -0
- package/build/main/assets/icons/warning-avatar.svg +4 -0
- package/build/main/assets/icons/xls-small.svg +11 -0
- package/build/main/assets/icons/xls.svg +11 -0
- package/build/main/assets/storybook/index.d.ts +27 -0
- package/build/main/assets/storybook/index.js +28 -0
- package/build/main/assets/storybook/index.js.map +1 -0
- package/build/main/constants/constants.d.ts +245 -0
- package/build/main/constants/constants.js +303 -0
- package/build/main/constants/constants.js.map +1 -0
- package/build/main/constants/index.d.ts +2 -0
- package/build/main/constants/index.js +3 -0
- package/build/main/constants/index.js.map +1 -0
- package/build/main/constants/types.d.ts +69 -0
- package/build/main/constants/types.js +2 -0
- package/build/main/constants/types.js.map +1 -0
- package/build/main/helpers/fontScale.d.ts +3 -0
- package/build/main/helpers/fontScale.js +17 -0
- package/build/main/helpers/fontScale.js.map +1 -0
- package/build/main/helpers/index.d.ts +34 -0
- package/build/main/helpers/index.js +205 -0
- package/build/main/helpers/index.js.map +1 -0
- package/build/main/hooks/useCharHintDisplay.d.ts +10 -0
- package/build/main/hooks/useCharHintDisplay.js +57 -0
- package/build/main/hooks/useCharHintDisplay.js.map +1 -0
- package/build/main/hooks/useFontScale.d.ts +1 -0
- package/build/main/hooks/useFontScale.js +19 -0
- package/build/main/hooks/useFontScale.js.map +1 -0
- package/build/main/hooks/useMobileLongTap.d.ts +16 -0
- package/build/main/hooks/useMobileLongTap.js +65 -0
- package/build/main/hooks/useMobileLongTap.js.map +1 -0
- package/build/main/hooks/useModal.d.ts +30 -0
- package/build/main/hooks/useModal.js +275 -0
- package/build/main/hooks/useModal.js.map +1 -0
- package/build/main/index.d.ts +40 -0
- package/build/main/index.js +41 -0
- package/build/main/index.js.map +1 -0
- package/build/main/styles/index.d.ts +1 -0
- package/build/main/styles/index.js +2 -0
- package/build/main/styles/index.js.map +1 -0
- package/build/main/styles/main.js +0 -0
- package/build/main/styles/styles.scss +14 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.js +53 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
- package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
- package/build/main//321/201omponents/ActionModal/index.js +2 -0
- package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
- package/build/main//321/201omponents/ActionModal/types.d.ts +23 -0
- package/build/main//321/201omponents/ActionModal/types.js +2 -0
- package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +201 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
- package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
- package/build/main//321/201omponents/AttachedFile/index.js +2 -0
- package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
- package/build/main//321/201omponents/AttachedFile/types.d.ts +23 -0
- package/build/main//321/201omponents/AttachedFile/types.js +2 -0
- package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +5 -0
- package/build/main//321/201omponents/Avatar/Avatar.js +257 -0
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
- package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
- package/build/main//321/201omponents/Avatar/index.js +2 -0
- package/build/main//321/201omponents/Avatar/index.js.map +1 -0
- package/build/main//321/201omponents/Avatar/types.d.ts +64 -0
- package/build/main//321/201omponents/Avatar/types.js +32 -0
- package/build/main//321/201omponents/Avatar/types.js.map +1 -0
- package/build/main//321/201omponents/Button/Button.d.ts +4 -0
- package/build/main//321/201omponents/Button/Button.js +68 -0
- package/build/main//321/201omponents/Button/Button.js.map +1 -0
- package/build/main//321/201omponents/Button/index.d.ts +1 -0
- package/build/main//321/201omponents/Button/index.js +2 -0
- package/build/main//321/201omponents/Button/index.js.map +1 -0
- package/build/main//321/201omponents/Button/types.d.ts +31 -0
- package/build/main//321/201omponents/Button/types.js +15 -0
- package/build/main//321/201omponents/Button/types.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.js +59 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
- package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
- package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
- package/build/main//321/201omponents/CachedImage/index.js +2 -0
- package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/types.d.ts +10 -0
- package/build/main//321/201omponents/CachedImage/types.js +2 -0
- package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +16 -0
- package/build/main//321/201omponents/Calendar/Calendar.js +294 -0
- package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
- package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
- package/build/main//321/201omponents/Calendar/index.js +2 -0
- package/build/main//321/201omponents/Calendar/index.js.map +1 -0
- package/build/main//321/201omponents/Calendar/types.d.ts +28 -0
- package/build/main//321/201omponents/Calendar/types.js +2 -0
- package/build/main//321/201omponents/Calendar/types.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +49 -0
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +71 -0
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +45 -0
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +66 -0
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
- package/build/main//321/201omponents/Charts/colors.d.ts +3 -0
- package/build/main//321/201omponents/Charts/colors.js +4 -0
- package/build/main//321/201omponents/Charts/colors.js.map +1 -0
- package/build/main//321/201omponents/Charts/constants.d.ts +42 -0
- package/build/main//321/201omponents/Charts/constants.js +43 -0
- package/build/main//321/201omponents/Charts/constants.js.map +1 -0
- package/build/main//321/201omponents/Charts/helpers.d.ts +17 -0
- package/build/main//321/201omponents/Charts/helpers.js +74 -0
- package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
- package/build/main//321/201omponents/Charts/index.d.ts +3 -0
- package/build/main//321/201omponents/Charts/index.js +4 -0
- package/build/main//321/201omponents/Charts/index.js.map +1 -0
- package/build/main//321/201omponents/Charts/types.d.ts +89 -0
- package/build/main//321/201omponents/Charts/types.js +2 -0
- package/build/main//321/201omponents/Charts/types.js.map +1 -0
- package/build/main//321/201omponents/Charts/useEvents.d.ts +5 -0
- package/build/main//321/201omponents/Charts/useEvents.js +45 -0
- package/build/main//321/201omponents/Charts/useEvents.js.map +1 -0
- package/build/main//321/201omponents/Charts/usePieEvents.d.ts +6 -0
- package/build/main//321/201omponents/Charts/usePieEvents.js +57 -0
- package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +8 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.js +48 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
- package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
- package/build/main//321/201omponents/Checkbox/index.js +2 -0
- package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
- package/build/main//321/201omponents/Checkbox/types.d.ts +14 -0
- package/build/main//321/201omponents/Checkbox/types.js +2 -0
- package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
- package/build/main//321/201omponents/Chip/Chip.d.ts +5 -0
- package/build/main//321/201omponents/Chip/Chip.js +288 -0
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
- package/build/main//321/201omponents/Chip/index.d.ts +1 -0
- package/build/main//321/201omponents/Chip/index.js +2 -0
- package/build/main//321/201omponents/Chip/index.js.map +1 -0
- package/build/main//321/201omponents/Chip/types.d.ts +39 -0
- package/build/main//321/201omponents/Chip/types.js +2 -0
- package/build/main//321/201omponents/Chip/types.js.map +1 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +13 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js +76 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js.map +1 -0
- package/build/main//321/201omponents/ChipDndContext/index.d.ts +1 -0
- package/build/main//321/201omponents/ChipDndContext/index.js +2 -0
- package/build/main//321/201omponents/ChipDndContext/index.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +64 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
- package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
- package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +31 -0
- package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
- package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +122 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
- package/build/main//321/201omponents/ContextMenu/index.js +2 -0
- package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/types.d.ts +41 -0
- package/build/main//321/201omponents/ContextMenu/types.js +2 -0
- package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +4 -0
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +49 -0
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -0
- package/build/main//321/201omponents/ContextMenuItem/index.d.ts +1 -0
- package/build/main//321/201omponents/ContextMenuItem/index.js +2 -0
- package/build/main//321/201omponents/ContextMenuItem/index.js.map +1 -0
- package/build/main//321/201omponents/ContextMenuItem/types.d.ts +28 -0
- package/build/main//321/201omponents/ContextMenuItem/types.js +6 -0
- package/build/main//321/201omponents/ContextMenuItem/types.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +12 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +281 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
- package/build/main//321/201omponents/CustomSelect/index.js +2 -0
- package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.js +78 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/types.d.ts +86 -0
- package/build/main//321/201omponents/CustomSelect/types.js +2 -0
- package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +67 -0
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
- package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.d.ts +12 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +42 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +13 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
- package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
- package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
- package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
- package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
- package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
- package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +4 -0
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +228 -0
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -0
- package/build/main//321/201omponents/DraggablePopup/index.d.ts +1 -0
- package/build/main//321/201omponents/DraggablePopup/index.js +2 -0
- package/build/main//321/201omponents/DraggablePopup/index.js.map +1 -0
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +90 -0
- package/build/main//321/201omponents/DraggablePopup/types.js +2 -0
- package/build/main//321/201omponents/DraggablePopup/types.js.map +1 -0
- package/build/main//321/201omponents/Error/Error.d.ts +4 -0
- package/build/main//321/201omponents/Error/Error.js +23 -0
- package/build/main//321/201omponents/Error/Error.js.map +1 -0
- package/build/main//321/201omponents/Error/index.d.ts +1 -0
- package/build/main//321/201omponents/Error/index.js +2 -0
- package/build/main//321/201omponents/Error/index.js.map +1 -0
- package/build/main//321/201omponents/Error/types.d.ts +10 -0
- package/build/main//321/201omponents/Error/types.js +2 -0
- package/build/main//321/201omponents/Error/types.js.map +1 -0
- package/build/main//321/201omponents/Flex/Flex.d.ts +2 -0
- package/build/main//321/201omponents/Flex/Flex.js +35 -0
- package/build/main//321/201omponents/Flex/Flex.js.map +1 -0
- package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +5 -0
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js +16 -0
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -0
- package/build/main//321/201omponents/Flex/HFlex/index.d.ts +1 -0
- package/build/main//321/201omponents/Flex/HFlex/index.js +2 -0
- package/build/main//321/201omponents/Flex/HFlex/index.js.map +1 -0
- package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +5 -0
- package/build/main//321/201omponents/Flex/VFlex/VFlex.js +16 -0
- package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +1 -0
- package/build/main//321/201omponents/Flex/VFlex/index.d.ts +1 -0
- package/build/main//321/201omponents/Flex/VFlex/index.js +2 -0
- package/build/main//321/201omponents/Flex/VFlex/index.js.map +1 -0
- package/build/main//321/201omponents/Flex/index.d.ts +3 -0
- package/build/main//321/201omponents/Flex/index.js +4 -0
- package/build/main//321/201omponents/Flex/index.js.map +1 -0
- package/build/main//321/201omponents/Flex/types.d.ts +21 -0
- package/build/main//321/201omponents/Flex/types.js +2 -0
- package/build/main//321/201omponents/Flex/types.js.map +1 -0
- package/build/main//321/201omponents/Header/Header.d.ts +5 -0
- package/build/main//321/201omponents/Header/Header.js +125 -0
- package/build/main//321/201omponents/Header/Header.js.map +1 -0
- package/build/main//321/201omponents/Header/index.d.ts +1 -0
- package/build/main//321/201omponents/Header/index.js +2 -0
- package/build/main//321/201omponents/Header/index.js.map +1 -0
- package/build/main//321/201omponents/Header/types.d.ts +47 -0
- package/build/main//321/201omponents/Header/types.js +2 -0
- package/build/main//321/201omponents/Header/types.js.map +1 -0
- package/build/main//321/201omponents/Input/Input.d.ts +4 -0
- package/build/main//321/201omponents/Input/Input.js +256 -0
- package/build/main//321/201omponents/Input/Input.js.map +1 -0
- package/build/main//321/201omponents/Input/index.d.ts +1 -0
- package/build/main//321/201omponents/Input/index.js +2 -0
- package/build/main//321/201omponents/Input/index.js.map +1 -0
- package/build/main//321/201omponents/Input/types.d.ts +37 -0
- package/build/main//321/201omponents/Input/types.js +2 -0
- package/build/main//321/201omponents/Input/types.js.map +1 -0
- package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
- package/build/main//321/201omponents/ListItem/ListItem.js +214 -0
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
- package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
- package/build/main//321/201omponents/ListItem/index.js +2 -0
- package/build/main//321/201omponents/ListItem/index.js.map +1 -0
- package/build/main//321/201omponents/ListItem/types.d.ts +47 -0
- package/build/main//321/201omponents/ListItem/types.js +2 -0
- package/build/main//321/201omponents/ListItem/types.js.map +1 -0
- package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
- package/build/main//321/201omponents/Loader/Loader.js +44 -0
- package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
- package/build/main//321/201omponents/Loader/index.d.ts +1 -0
- package/build/main//321/201omponents/Loader/index.js +2 -0
- package/build/main//321/201omponents/Loader/index.js.map +1 -0
- package/build/main//321/201omponents/Loader/types.d.ts +18 -0
- package/build/main//321/201omponents/Loader/types.js +2 -0
- package/build/main//321/201omponents/Loader/types.js.map +1 -0
- package/build/main//321/201omponents/Modal/Modal.d.ts +5 -0
- package/build/main//321/201omponents/Modal/Modal.js +397 -0
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
- package/build/main//321/201omponents/Modal/index.d.ts +1 -0
- package/build/main//321/201omponents/Modal/index.js +2 -0
- package/build/main//321/201omponents/Modal/index.js.map +1 -0
- package/build/main//321/201omponents/Modal/types.d.ts +77 -0
- package/build/main//321/201omponents/Modal/types.js +2 -0
- package/build/main//321/201omponents/Modal/types.js.map +1 -0
- package/build/main//321/201omponents/Notification/Notification.d.ts +4 -0
- package/build/main//321/201omponents/Notification/Notification.js +208 -0
- package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
- package/build/main//321/201omponents/Notification/constants.d.ts +34 -0
- package/build/main//321/201omponents/Notification/constants.js +59 -0
- package/build/main//321/201omponents/Notification/constants.js.map +1 -0
- package/build/main//321/201omponents/Notification/index.d.ts +1 -0
- package/build/main//321/201omponents/Notification/index.js +2 -0
- package/build/main//321/201omponents/Notification/index.js.map +1 -0
- package/build/main//321/201omponents/Notification/types.d.ts +64 -0
- package/build/main//321/201omponents/Notification/types.js +2 -0
- package/build/main//321/201omponents/Notification/types.js.map +1 -0
- package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
- package/build/main//321/201omponents/Profile/Profile.js +42 -0
- package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
- package/build/main//321/201omponents/Profile/index.d.ts +1 -0
- package/build/main//321/201omponents/Profile/index.js +2 -0
- package/build/main//321/201omponents/Profile/index.js.map +1 -0
- package/build/main//321/201omponents/Profile/types.d.ts +14 -0
- package/build/main//321/201omponents/Profile/types.js +2 -0
- package/build/main//321/201omponents/Profile/types.js.map +1 -0
- package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
- package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
- package/build/main//321/201omponents/ProgressBar/index.js +2 -0
- package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
- package/build/main//321/201omponents/ProgressBar/types.d.ts +7 -0
- package/build/main//321/201omponents/ProgressBar/types.js +2 -0
- package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
- package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
- package/build/main//321/201omponents/RadioButton/RadioButton.js +33 -0
- package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
- package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
- package/build/main//321/201omponents/RadioButton/index.js +2 -0
- package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
- package/build/main//321/201omponents/RadioButton/types.d.ts +12 -0
- package/build/main//321/201omponents/RadioButton/types.js +2 -0
- package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
- package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +5 -0
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js +140 -0
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
- package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
- package/build/main//321/201omponents/ScrollBar/index.js +2 -0
- package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
- package/build/main//321/201omponents/ScrollBar/types.d.ts +24 -0
- package/build/main//321/201omponents/ScrollBar/types.js +2 -0
- package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
- package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
- package/build/main//321/201omponents/Skeleton/Skeleton.js +59 -0
- package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
- package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
- package/build/main//321/201omponents/Skeleton/index.js +2 -0
- package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
- package/build/main//321/201omponents/Skeleton/types.d.ts +17 -0
- package/build/main//321/201omponents/Skeleton/types.js +2 -0
- package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
- package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
- package/build/main//321/201omponents/Stories/Stories.js +406 -0
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
- package/build/main//321/201omponents/Stories/index.d.ts +1 -0
- package/build/main//321/201omponents/Stories/index.js +2 -0
- package/build/main//321/201omponents/Stories/index.js.map +1 -0
- package/build/main//321/201omponents/Stories/types.d.ts +71 -0
- package/build/main//321/201omponents/Stories/types.js +16 -0
- package/build/main//321/201omponents/Stories/types.js.map +1 -0
- package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
- package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
- package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
- package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
- package/build/main//321/201omponents/Switcher/index.js +2 -0
- package/build/main//321/201omponents/Switcher/index.js.map +1 -0
- package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
- package/build/main//321/201omponents/Switcher/types.js +2 -0
- package/build/main//321/201omponents/Switcher/types.js.map +1 -0
- package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
- package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
- package/build/main//321/201omponents/SyncLoader/index.js +2 -0
- package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
- package/build/main//321/201omponents/SyncLoader/types.d.ts +8 -0
- package/build/main//321/201omponents/SyncLoader/types.js +2 -0
- package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
- package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
- package/build/main//321/201omponents/Textarea/Textarea.js +59 -0
- package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
- package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
- package/build/main//321/201omponents/Textarea/index.js +2 -0
- package/build/main//321/201omponents/Textarea/index.js.map +1 -0
- package/build/main//321/201omponents/Textarea/types.d.ts +13 -0
- package/build/main//321/201omponents/Textarea/types.js +2 -0
- package/build/main//321/201omponents/Textarea/types.js.map +1 -0
- package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
- package/build/main//321/201omponents/Toggle/Toggle.js +35 -0
- package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
- package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
- package/build/main//321/201omponents/Toggle/index.js +2 -0
- package/build/main//321/201omponents/Toggle/index.js.map +1 -0
- package/build/main//321/201omponents/Toggle/types.d.ts +12 -0
- package/build/main//321/201omponents/Toggle/types.js +2 -0
- package/build/main//321/201omponents/Toggle/types.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +40 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +98 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +5 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +24 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +104 -0
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +133 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +85 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +41 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +5 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +527 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.d.ts +8 -0
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.js +10 -0
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Hint.d.ts +6 -0
- package/build/main//321/201omponents/UserDropdown/components/Hint.js +21 -0
- package/build/main//321/201omponents/UserDropdown/components/Hint.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.d.ts +2 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.js +24 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Mask.d.ts +8 -0
- package/build/main//321/201omponents/UserDropdown/components/Mask.js +19 -0
- package/build/main//321/201omponents/UserDropdown/components/Mask.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Title.d.ts +5 -0
- package/build/main//321/201omponents/UserDropdown/components/Title.js +18 -0
- package/build/main//321/201omponents/UserDropdown/components/Title.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/constants.d.ts +65 -0
- package/build/main//321/201omponents/UserDropdown/constants.js +83 -0
- package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +148 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js +313 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
- package/build/main//321/201omponents/UserDropdown/index.js +2 -0
- package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +99 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/types.d.ts +356 -0
- package/build/main//321/201omponents/UserDropdown/types.js +2 -0
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
- package/build/main//321/201omponents/types.d.ts +2 -0
- package/build/main//321/201omponents/types.js +2 -0
- package/build/main//321/201omponents/types.js.map +1 -0
- package/package.json +13 -8
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { useEffect } from 'react';
|
|
23
|
+
import classNames from 'classnames';
|
|
24
|
+
import Color from 'color';
|
|
25
|
+
import { normal } from 'color-blend';
|
|
26
|
+
import { generateColor, generateFontFamilyStyle, isDarkTheme } from '../../helpers';
|
|
27
|
+
import { COLORS, THEME } from '../../constants';
|
|
28
|
+
import { ReactComponent as LoaderIcon } from '../../assets/icons/loader.svg';
|
|
29
|
+
import '../../styles/styles.scss';
|
|
30
|
+
export var DEFAULT_SYNC_LOADER_TEXT = 'Обновление';
|
|
31
|
+
var SyncLoader = function (_a) {
|
|
32
|
+
var isLoading = _a.isLoading, _b = _a.text, text = _b === void 0 ? DEFAULT_SYNC_LOADER_TEXT : _b, _c = _a.theme, theme = _c === void 0 ? THEME.default : _c, className = _a.className, styles = _a.styles, color = _a.color, fontFamily = _a.fontFamily;
|
|
33
|
+
var loaderColor = generateColor(color, COLORS.blue);
|
|
34
|
+
var generateBackgroundStyles = function () {
|
|
35
|
+
var _a = Color(loaderColor).rgb().object(), red = _a.r, green = _a.g, blue = _a.b;
|
|
36
|
+
var backgroundColorRGBA = { r: red, g: green, b: blue, a: 0.2 };
|
|
37
|
+
var WHITE_COLOR = { r: 255, g: 255, b: 255, a: 1 };
|
|
38
|
+
var BLACK_COLOR = { r: 61, g: 61, b: 61, a: 1 };
|
|
39
|
+
var _b = isDarkTheme(theme) ? normal(BLACK_COLOR, backgroundColorRGBA) : normal(WHITE_COLOR, backgroundColorRGBA), r = _b.r, g = _b.g, b = _b.b, a = _b.a;
|
|
40
|
+
return __assign({ background: "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(a, ")") }, styles);
|
|
41
|
+
};
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
var timerId;
|
|
44
|
+
var dots = document.querySelectorAll('.smartapp-sync-loader__text--dots__dot');
|
|
45
|
+
var animationEndFunction = function () {
|
|
46
|
+
dots.forEach(function (dot) { return (dot.style.display = 'none'); });
|
|
47
|
+
timerId = setTimeout(function () {
|
|
48
|
+
dots.forEach(function (dot) { return (dot.style.display = 'unset'); });
|
|
49
|
+
}, 150);
|
|
50
|
+
};
|
|
51
|
+
if (isLoading) {
|
|
52
|
+
dots[0].addEventListener('animationend', animationEndFunction);
|
|
53
|
+
}
|
|
54
|
+
return function () {
|
|
55
|
+
clearTimeout(timerId);
|
|
56
|
+
isLoading && dots[0].removeEventListener('animationend', animationEndFunction);
|
|
57
|
+
};
|
|
58
|
+
}, [isLoading]);
|
|
59
|
+
if (!isLoading) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return (_jsxs("div", __assign({ className: classNames('smartapp-sync-loader', className), style: generateBackgroundStyles() }, { children: [_jsx(LoaderIcon, { className: "smartapp-sync-loader__icon", style: { color: loaderColor } }), _jsxs("div", __assign({ style: __assign({}, generateFontFamilyStyle(fontFamily)), className: classNames({ 'smartapp-sync-loader__text': true, 'smartapp-sync-loader__text--dark': isDarkTheme(theme) }) }, { children: [text, _jsx("div", __assign({ className: "smartapp-sync-loader__text--dots" }, { children: __spreadArray([], Array(3), true).map(function (_, index) { return (_jsx("div", __assign({ className: "smartapp-sync-loader__text--dots__dot" }, { children: "." }), index)); }) }))] }))] })));
|
|
63
|
+
};
|
|
64
|
+
export default SyncLoader;
|
|
65
|
+
//# sourceMappingURL=SyncLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncLoader.js","sourceRoot":"","sources":["../../../../src/сomponents/SyncLoader/SyncLoader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,a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AAwB,EAAE,iBAC9F,KAAC,UAAU,IAAC,SAAS,EAAC,4BAA4B,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,GAAI,EACpF,wBACE,KAAK,eAAO,uBAAuB,CAAC,UAAU,CAAC,GAC/C,SAAS,EAAE,UAAU,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,kCAAkC,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,iBAEpH,IAAI,EACL,uBAAK,SAAS,EAAC,kCAAkC,gBAC9C,kBAAI,KAAK,CAAC,CAAC,CAAC,QAAE,GAAG,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,CAC/B,uBAAiB,SAAS,EAAC,uCAAuC,wBAAxD,KAAK,CAET,CACP,EAJgC,CAIhC,CAAC,IACE,KACF,KACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SyncLoader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/SyncLoader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/SyncLoader/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ITextareaProps } from './types';
|
|
2
|
+
import '../../styles/styles.scss';
|
|
3
|
+
declare const Textarea: ({ platform, fontFamily, isAdjustToTextHeight, textareaRef: outerTextareaRef, title, icon, error, minHeight, containerClassName, className, style, containerStyles, onChange, ...props }: ITextareaProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Textarea;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { useEffect, useRef } from 'react';
|
|
25
|
+
import classNames from 'classnames';
|
|
26
|
+
import { isEmpty, isNil } from 'lodash';
|
|
27
|
+
import { generateFontFamilyStyle } from '../../helpers';
|
|
28
|
+
import { DEFAULT_MIN_TEXTAREA_HEIGHT, MIN_TEXTAREA_HEIGHT } from '../../constants';
|
|
29
|
+
import '../../styles/styles.scss';
|
|
30
|
+
var Textarea = function (_a) {
|
|
31
|
+
var platform = _a.platform, fontFamily = _a.fontFamily, _b = _a.isAdjustToTextHeight, isAdjustToTextHeight = _b === void 0 ? false : _b, outerTextareaRef = _a.textareaRef, title = _a.title, icon = _a.icon, error = _a.error, minHeight = _a.minHeight, containerClassName = _a.containerClassName, className = _a.className, style = _a.style, containerStyles = _a.containerStyles, onChange = _a.onChange, props = __rest(_a, ["platform", "fontFamily", "isAdjustToTextHeight", "textareaRef", "title", "icon", "error", "minHeight", "containerClassName", "className", "style", "containerStyles", "onChange"]);
|
|
32
|
+
var localTextareaRef = useRef(null);
|
|
33
|
+
var textareaRef = outerTextareaRef || localTextareaRef;
|
|
34
|
+
var textareaMinHeight = minHeight ? Math.max(minHeight, MIN_TEXTAREA_HEIGHT) : DEFAULT_MIN_TEXTAREA_HEIGHT;
|
|
35
|
+
var textareaMinHeightPx = "".concat(textareaMinHeight, "px");
|
|
36
|
+
var handleInput = function () {
|
|
37
|
+
var textareaRefCurrent = textareaRef.current;
|
|
38
|
+
if (textareaRefCurrent && isAdjustToTextHeight) {
|
|
39
|
+
textareaRefCurrent.style.height = textareaMinHeightPx;
|
|
40
|
+
textareaRefCurrent.style.height = "".concat(textareaRefCurrent.scrollHeight + 2, "px");
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var handleChange = function (event) {
|
|
44
|
+
var value = event.target.value;
|
|
45
|
+
var textareaRefCurrent = textareaRef.current;
|
|
46
|
+
var valueLength = value.length;
|
|
47
|
+
onChange(event);
|
|
48
|
+
if (textareaRefCurrent && textareaRefCurrent.selectionStart === valueLength) {
|
|
49
|
+
textareaRefCurrent.scrollTop = textareaRefCurrent.scrollHeight;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
isAdjustToTextHeight && handleInput();
|
|
54
|
+
// eslint-disable-next-line
|
|
55
|
+
}, [isAdjustToTextHeight]);
|
|
56
|
+
return (_jsxs("div", __assign({ className: classNames('smartapp-textarea', containerClassName), style: __assign(__assign({}, generateFontFamilyStyle(fontFamily)), containerStyles) }, { children: [title && _jsx("div", __assign({ className: "smartapp-textarea__title" }, { children: title })), _jsxs("div", __assign({ className: "smartapp-textarea__container" }, { children: [_jsx("textarea", __assign({ ref: textareaRef, className: classNames('smartapp-textarea__container--field', "smartapp-textarea__container--field__".concat(platform), { 'smartapp-textarea__container--field__with-icon': !isNil(icon), 'smartapp-textarea__container--field__error': !isEmpty(error) }, className), style: __assign({ '--textarea-min-height': textareaMinHeightPx }, style), onChange: handleChange, onInput: handleInput }, props), textareaMinHeightPx), icon && _jsx("div", __assign({ className: "smartapp-textarea__container--icon" }, { children: icon }))] })), error && _jsx("div", __assign({ className: "smartapp-textarea__error" }, { children: error }))] })));
|
|
57
|
+
};
|
|
58
|
+
export default Textarea;
|
|
59
|
+
//# sourceMappingURL=Textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/сomponents/Textarea/Textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAiB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAElF,OAAO,0BAA0B,CAAA;AAEjC,IAAM,QAAQ,GAAG,UAAC,EAeD;IAdf,IAAA,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,4BAA4B,EAA5B,oBAAoB,mBAAG,KAAK,KAAA,EACf,gBAAgB,iBAAA,EAC7B,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,SAAS,eAAA,EACT,kBAAkB,wBAAA,EAClB,SAAS,eAAA,EACT,KAAK,WAAA,EACL,eAAe,qBAAA,EACf,QAAQ,cAAA,EACL,KAAK,cAdQ,mLAejB,CADS;IAER,IAAM,gBAAgB,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAA;IAC1D,IAAM,WAAW,GAAG,gBAAgB,IAAI,gBAAgB,CAAA;IACxD,IAAM,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CA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EAClD,EAAE,gDAAgD,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EACjI,SAAS,CACV,EACD,KAAK,EAAE,WAAE,uBAAuB,EAAE,mBAAmB,IAAK,KAAK,CAAmB,EAClF,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,WAAW,IAChB,KAAK,GAXJ,mBAAmB,CAYxB,EACD,IAAI,IAAI,uBAAK,SAAS,EAAC,oCAAoC,gBAAE,IAAI,IAAO,KACrE,EACL,KAAK,IAAI,uBAAK,SAAS,EAAC,0BAA0B,gBAAE,KAAK,IAAO,KAC7D,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Textarea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeEvent, ReactElement, RefObject, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { IFontFamilyProps, IPlatformProps, TStyles } from '../../constants';
|
|
3
|
+
export interface ITextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, IFontFamilyProps, IPlatformProps {
|
|
4
|
+
isAdjustToTextHeight?: boolean;
|
|
5
|
+
textareaRef?: RefObject<HTMLTextAreaElement | null>;
|
|
6
|
+
title?: string;
|
|
7
|
+
icon?: ReactElement;
|
|
8
|
+
error?: string;
|
|
9
|
+
minHeight?: number;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
containerStyles?: TStyles;
|
|
12
|
+
onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Textarea/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IToggleProps } from './types';
|
|
2
|
+
import '../../styles/styles.scss';
|
|
3
|
+
declare const Toggle: ({ id, isDisabled, isChecked, className, styles, checkedColor, checkedHoverColor, checkedPressedColor, onClick, }: IToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Toggle;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useRef } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import { generateColor } from '../../helpers';
|
|
16
|
+
import { COLORS, EVENT_LISTENER_TYPES } from '../../constants';
|
|
17
|
+
import '../../styles/styles.scss';
|
|
18
|
+
var DEFAULT_TOGGLE_ID = 'toggle';
|
|
19
|
+
var PRESSED_CLASS_NAME = 'smartapp-toggle-wrapper__pressed';
|
|
20
|
+
var Toggle = function (_a) {
|
|
21
|
+
var _b = _a.id, id = _b === void 0 ? DEFAULT_TOGGLE_ID : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isChecked, isChecked = _d === void 0 ? false : _d, className = _a.className, _e = _a.styles, styles = _e === void 0 ? {} : _e, checkedColor = _a.checkedColor, checkedHoverColor = _a.checkedHoverColor, checkedPressedColor = _a.checkedPressedColor, _f = _a.onClick, onClick = _f === void 0 ? function () { return undefined; } : _f;
|
|
22
|
+
var toggleRef = useRef(null);
|
|
23
|
+
var inputId = "smartapp-toggle-".concat(id);
|
|
24
|
+
var toggleStyles = __assign({ '--toggle-color': generateColor(checkedColor, COLORS.bgAccent), '--toggle-hover-color': generateColor(checkedHoverColor, COLORS.bgAccentHover), '--toggle-pressed-color': generateColor(checkedPressedColor, COLORS.bgAccentPressed) }, styles);
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
window.addEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp);
|
|
27
|
+
return function () { return window.removeEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp); };
|
|
28
|
+
}, []);
|
|
29
|
+
var handleClick = function () { return !isDisabled && onClick(); };
|
|
30
|
+
var handleMouseDown = function () { var _a; return (_a = toggleRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(PRESSED_CLASS_NAME); };
|
|
31
|
+
var handleMouseUp = function () { var _a; return (_a = toggleRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(PRESSED_CLASS_NAME); };
|
|
32
|
+
return (_jsx("div", __assign({ ref: toggleRef, className: classNames('smartapp-toggle-wrapper', className), style: toggleStyles }, { children: _jsxs("label", __assign({ htmlFor: inputId, className: "smartapp-toggle", onClick: handleClick }, { children: [_jsx("input", { type: "checkbox", id: inputId, checked: isChecked, disabled: true }), _jsx("span", { className: classNames('smartapp-slider', { 'smartapp-slider__checked': isChecked, 'smartapp-slider__disabled': isDisabled }), onMouseDown: handleMouseDown })] })) })));
|
|
33
|
+
};
|
|
34
|
+
export default Toggle;
|
|
35
|
+
//# sourceMappingURL=Toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../../src/сomponents/Toggle/Toggle.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAiB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,UAAU,MAAM,YAAY,C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AAM,OAAA,CAAC,UAAU,IAAI,OAAO,EAAE,EAAxB,CAAwB,CAAA;IAClD,IAAM,eAAe,GAAG,sBAAM,OAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA,EAAA,CAAA;IAClF,IAAM,aAAa,GAAG,sBAAM,OAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAA,EAAA,CAAA;IAEnF,OAAO,CACL,uBAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,gBACnG,0BAAO,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,WAAW,iBACvE,gBAAO,IAAI,EAAC,UAAU,EAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,SAAG,EACnE,eACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE,EAAE,0BAA0B,EAAE,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,CAAC,EAC5H,WAAW,EAAE,eAAe,GAC5B,KACI,IACJ,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Toggle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Toggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TStyles } from '../../constants';
|
|
2
|
+
export interface IToggleProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
isChecked?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
styles?: TStyles;
|
|
8
|
+
checkedColor?: string;
|
|
9
|
+
checkedHoverColor?: string;
|
|
10
|
+
checkedPressedColor?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Toggle/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IContactBottomSheet } from '../types';
|
|
2
|
+
import '../../../styles/styles.scss';
|
|
3
|
+
declare const ContactBottomSheet: ({ fontFamily, language, contactInfoTitle, avatar, name, email, serverName, company, department, companyPosition, handleCloseModal, onClickContactInfoCopyEmail, }: IContactBottomSheet) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default ContactBottomSheet;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import Avatar from '../../Avatar';
|
|
16
|
+
import ContactInfo from '../ContactInfo/ContactInfo';
|
|
17
|
+
import { COLORS, EVENT_LISTENER_TYPES } from '../../../constants';
|
|
18
|
+
import { AVATAR_SIZES } from '../../Avatar/types';
|
|
19
|
+
import { ReactComponent as CloseIcon } from '../../../assets/icons/close-modal.svg';
|
|
20
|
+
import { ReactComponent as CopyIcon } from '../../../assets/icons/copy.svg';
|
|
21
|
+
import { ReactComponent as CorporateUserIcon } from '../../../assets/icons/corporate-user.svg';
|
|
22
|
+
import '../../../styles/styles.scss';
|
|
23
|
+
var copyTextToClipboard = function (text) { var _a; return (_a = navigator === null || navigator === void 0 ? void 0 : navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(text); };
|
|
24
|
+
var ContactBottomSheet = function (_a) {
|
|
25
|
+
var fontFamily = _a.fontFamily, language = _a.language, contactInfoTitle = _a.contactInfoTitle, avatar = _a.avatar, name = _a.name, email = _a.email, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition, handleCloseModal = _a.handleCloseModal, onClickContactInfoCopyEmail = _a.onClickContactInfoCopyEmail;
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
var modalContent = document.querySelector('.smartapp-modal__content');
|
|
28
|
+
var handlePreventDefault = function (event) { return event.preventDefault(); };
|
|
29
|
+
modalContent === null || modalContent === void 0 ? void 0 : modalContent.addEventListener(EVENT_LISTENER_TYPES.touchend, handlePreventDefault);
|
|
30
|
+
return function () { return modalContent === null || modalContent === void 0 ? void 0 : modalContent.removeEventListener(EVENT_LISTENER_TYPES.touchend, handlePreventDefault); };
|
|
31
|
+
}, []);
|
|
32
|
+
var handleCopyEmailClick = function (event) {
|
|
33
|
+
event.stopPropagation();
|
|
34
|
+
copyTextToClipboard(email);
|
|
35
|
+
onClickContactInfoCopyEmail === null || onClickContactInfoCopyEmail === void 0 ? void 0 : onClickContactInfoCopyEmail();
|
|
36
|
+
};
|
|
37
|
+
return (_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet" }, { children: [contactInfoTitle && (_jsxs("div", __assign({ className: classNames('smartapp-contact-bottom-sheet__title', { 'mb-8': !!contactInfoTitle }) }, { children: [_jsx(CloseIcon, { className: "smartapp-contact-bottom-sheet__title--close", color: COLORS.textSecondary, onClick: handleCloseModal }), _jsx("div", __assign({ className: "smartapp-contact-bottom-sheet__title--text" }, { children: contactInfoTitle }))] }))), _jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, username: name, avatar: avatar, size: AVATAR_SIZES.size_40 }), _jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text" }, { children: [_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text__name" }, { children: [_jsx(CorporateUserIcon, {}), _jsx("div", { children: name })] })), _jsx("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text__email" }, { children: email }))] })), _jsx(CopyIcon, { className: "smartapp-contact-bottom-sheet__header--copy", onClick: handleCopyEmailClick })] })), _jsx(ContactInfo, { language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition })] })));
|
|
38
|
+
};
|
|
39
|
+
export default ContactBottomSheet;
|
|
40
|
+
//# sourceMappingURL=ContactBottomSheet.js.map
|
package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactBottomSheet.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACnF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC9F,OAAO,6BAA6B,CAAA;AAEpC,IAAM,mBAAmB,GAAG,UAAC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S,IAAC,SAAS,EAAC,6CAA6C,EAAC,KAAK,EAAE,MAAM,CAAC,aAAa,EAAE,OAAO,EAAE,gBAAgB,GAAI,EAC7H,uBAAK,SAAS,EAAC,4CAA4C,gBAAE,gBAAgB,IAAO,KAChF,CACP,EACD,wBAAK,SAAS,EAAC,uCAAuC,iBACpD,KAAC,MAAM,IAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,OAAO,GAAI,EAC9F,wBAAK,SAAS,EAAC,6CAA6C,iBAC1D,wBAAK,SAAS,EAAC,mDAAmD,iBAChE,KAAC,iBAAiB,KAAG,EACrB,wBAAM,IAAI,GAAO,KACb,EACN,uBAAK,SAAS,EAAC,oDAAoD,gBAAE,KAAK,IAAO,KAC7E,EACN,KAAC,QAAQ,IAAC,SAAS,EAAC,6CAA6C,EAAC,OAAO,EAAE,oBAAoB,GAAI,KAC/F,EACN,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,GAAI,KACnI,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IContactInfo } from '../types';
|
|
2
|
+
import '../../../styles/styles.scss';
|
|
3
|
+
declare const ContactInfo: ({ elementRef, language, serverName, company, department, companyPosition }: IContactInfo) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default ContactInfo;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var _a;
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { LANGUAGES } from '../../../constants';
|
|
15
|
+
import { ReactComponent as DepartmentIcon } from '../../../assets/icons/department.svg';
|
|
16
|
+
import { ReactComponent as JobPositionIcon } from '../../../assets/icons/job-position.svg';
|
|
17
|
+
import { ReactComponent as OfficeIcon } from '../../../assets/icons/office.svg';
|
|
18
|
+
import { ReactComponent as ServerIcon } from '../../../assets/icons/server.svg';
|
|
19
|
+
import '../../../styles/styles.scss';
|
|
20
|
+
var INFO_TITLE_TEXT = (_a = {},
|
|
21
|
+
_a[LANGUAGES.ru] = {
|
|
22
|
+
server: 'Адрес сервера',
|
|
23
|
+
company: 'Компания',
|
|
24
|
+
department: 'Отдел',
|
|
25
|
+
companyPosition: 'Должность',
|
|
26
|
+
},
|
|
27
|
+
_a[LANGUAGES.en] = {
|
|
28
|
+
server: 'Server address',
|
|
29
|
+
company: 'Company',
|
|
30
|
+
department: 'Department',
|
|
31
|
+
companyPosition: 'Position',
|
|
32
|
+
},
|
|
33
|
+
_a[LANGUAGES.de] = {
|
|
34
|
+
server: 'Serveradresse',
|
|
35
|
+
company: 'Firma',
|
|
36
|
+
department: 'Abteilung',
|
|
37
|
+
companyPosition: 'Position',
|
|
38
|
+
},
|
|
39
|
+
_a[LANGUAGES.es] = {
|
|
40
|
+
server: 'Dirección del servidor',
|
|
41
|
+
company: 'Empresa',
|
|
42
|
+
department: 'Sección',
|
|
43
|
+
companyPosition: 'Cargo',
|
|
44
|
+
},
|
|
45
|
+
_a[LANGUAGES.fr] = {
|
|
46
|
+
server: 'Adresse du serveur',
|
|
47
|
+
company: 'Société',
|
|
48
|
+
department: 'Département',
|
|
49
|
+
companyPosition: 'Poste',
|
|
50
|
+
},
|
|
51
|
+
_a[LANGUAGES.ar] = {
|
|
52
|
+
server: 'عنوان جهاز الخادم',
|
|
53
|
+
company: 'شركة',
|
|
54
|
+
department: 'الإدارة',
|
|
55
|
+
companyPosition: 'المنصب',
|
|
56
|
+
},
|
|
57
|
+
_a[LANGUAGES.ms] = {
|
|
58
|
+
server: 'Alamat pelayan',
|
|
59
|
+
company: 'Syarikat',
|
|
60
|
+
department: 'Jabatan',
|
|
61
|
+
companyPosition: 'Kedudukan',
|
|
62
|
+
},
|
|
63
|
+
_a[LANGUAGES.tr] = {
|
|
64
|
+
server: 'Sunucu adresi',
|
|
65
|
+
company: 'Şirket',
|
|
66
|
+
department: 'Bölüm',
|
|
67
|
+
companyPosition: 'Pozisyon',
|
|
68
|
+
},
|
|
69
|
+
_a[LANGUAGES.id] = {
|
|
70
|
+
server: 'Alamat server',
|
|
71
|
+
company: 'Nama perusahaan',
|
|
72
|
+
department: 'Departemen',
|
|
73
|
+
companyPosition: 'Posisi',
|
|
74
|
+
},
|
|
75
|
+
_a[LANGUAGES.uz] = {
|
|
76
|
+
server: 'Server manzili',
|
|
77
|
+
company: 'Kompaniya',
|
|
78
|
+
department: 'Bo‘lim',
|
|
79
|
+
companyPosition: 'Lavozim',
|
|
80
|
+
},
|
|
81
|
+
_a[LANGUAGES.kk] = {
|
|
82
|
+
server: 'Сервер мекенжайы',
|
|
83
|
+
company: 'Компания',
|
|
84
|
+
department: 'Бөлім',
|
|
85
|
+
companyPosition: 'Лауазым',
|
|
86
|
+
},
|
|
87
|
+
_a);
|
|
88
|
+
var ContactInfo = function (_a) {
|
|
89
|
+
var elementRef = _a.elementRef, language = _a.language, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition;
|
|
90
|
+
var _b = INFO_TITLE_TEXT[language], serverTitle = _b.server, companyTitle = _b.company, departmentTitle = _b.department, companyPositionTitle = _b.companyPosition;
|
|
91
|
+
var renderInfoItem = function (_a) {
|
|
92
|
+
var title = _a.title, info = _a.info, icon = _a.icon;
|
|
93
|
+
return (_jsxs("div", __assign({ className: "smartapp-contact-info__item" }, { children: [_jsx("div", __assign({ className: "smartapp-contact-info__item--icon" }, { children: icon })), _jsxs("div", __assign({ className: "smartapp-contact-info__item--text" }, { children: [_jsx("div", { children: title }), _jsx("div", { children: info })] }))] })));
|
|
94
|
+
};
|
|
95
|
+
return (_jsxs("div", __assign({ ref: elementRef, className: "smartapp-contact-info" }, { children: [serverName && renderInfoItem({ title: serverTitle, info: serverName, icon: _jsx(ServerIcon, {}) }), company && renderInfoItem({ title: companyTitle, info: company, icon: _jsx(OfficeIcon, {}) }), department && renderInfoItem({ title: departmentTitle, info: department, icon: _jsx(DepartmentIcon, {}) }), companyPosition && renderInfoItem({ title: companyPositionTitle, info: companyPosition, icon: _jsx(JobPositionIcon, {}) })] })));
|
|
96
|
+
};
|
|
97
|
+
export default ContactInfo;
|
|
98
|
+
//# sourceMappingURL=ContactInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactInfo.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/ContactInfo/ContactInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAC1F,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,6BAA6B,CAAA;AAKpC,IAAM,eAAe;IACnB,GAAC,SAAS,CAAC,EAAE,IAAG;QACd,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,UAAU;QACnB,UAAU,EAAE,OAAO;QACnB,eAAe,EAAE,WAAW;KAC7B;IACD,GAAC,SAAS,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,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,KAAC,eAAe,KAAG,EAAE,CAAC,KACjH,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ILoadingMessage } from '../types';
|
|
2
|
+
import '../../../styles/styles.scss';
|
|
3
|
+
export declare const LOADING_MESSAGE_ITEMS = 6;
|
|
4
|
+
declare const LoadingMessage: ({ isMenuShadowless, skeletonRowsCount }: ILoadingMessage) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default LoadingMessage;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useRef } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import { Skeleton } from '../../Skeleton';
|
|
16
|
+
import '../../../styles/styles.scss';
|
|
17
|
+
export var LOADING_MESSAGE_ITEMS = 6;
|
|
18
|
+
var LoadingMessage = function (_a) {
|
|
19
|
+
var _b = _a.isMenuShadowless, isMenuShadowless = _b === void 0 ? false : _b, _c = _a.skeletonRowsCount, skeletonRowsCount = _c === void 0 ? LOADING_MESSAGE_ITEMS : _c;
|
|
20
|
+
var ref = useRef(null);
|
|
21
|
+
return (_jsx("div", __assign({ ref: ref, className: classNames('smartapp-loading-message', { 'smartapp-loading-message__reduced-padding': isMenuShadowless }) }, { children: Array.from({ length: skeletonRowsCount }, function (_, index) { return (_jsxs("div", __assign({ className: classNames('smartapp-loading-message__item', { 'ph-0': isMenuShadowless }) }, { children: [_jsx(Skeleton, { containerRef: ref, circle: true, className: "smartapp-loading-message__item--circle" }), _jsxs("div", __assign({ className: "smartapp-loading-message__item--ellipse" }, { children: [_jsx(Skeleton, { containerRef: ref, className: "smartapp-loading-message__item--ellipse__first", borderRadius: 600 }), _jsx(Skeleton, { containerRef: ref, className: "smartapp-loading-message__item--ellipse__second", borderRadius: 600 })] }))] }), index)); }) })));
|
|
22
|
+
};
|
|
23
|
+
export default LoadingMessage;
|
|
24
|
+
//# sourceMappingURL=LoadingMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingMessage.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/LoadingMessage/LoadingMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,6BAA6B,CAAA;AAEpC,MAAM,CAAC,IAAM,qBAAqB,GAAG,CAAC,CAAA;AAEtC,IAAM,cAAc,GAAG,UAAC,EAAwF;QAAtF,wBAAwB,EAAxB,gBAAgB,mBAAG,KAAK,KAAA,EAAE,yBAAyC,EAAzC,iBAAiB,mBAAG,qBAAqB,KAAA;IAC3F,IAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAExC,OAAO,CACL,uBAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,EAAE,2CAA2C,EAAE,gBAAgB,EAAE,CAAC,gBAChI,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,CACvD,wBAAiB,SAAS,EAAE,UAAU,CAAC,gCAAgC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,iBACpG,KAAC,QAAQ,IAAC,YAAY,EAAE,GAAG,EAAE,MAAM,QAAC,SAAS,EAAC,wCAAwC,GAAG,EACzF,wBAAK,SAAS,EAAC,yCAAyC,iBACtD,KAAC,QAAQ,IAAC,YAAY,EAAE,GAAG,EAAE,SAAS,EAAC,gDAAgD,EAAC,YAAY,EAAE,GAAG,GAAI,EAC7G,KAAC,QAAQ,IAAC,YAAY,EAAE,GAAG,EAAE,SAAS,EAAC,iDAAiD,EAAC,YAAY,EAAE,GAAG,GAAI,KAC1G,MALE,KAAK,CAMT,CACP,EARwD,CAQxD,CAAC,IACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import React, { useEffect, useLayoutEffect, useRef } from 'react';
|
|
14
|
+
import { components } from 'react-select';
|
|
15
|
+
import { AutoSizer } from 'react-virtualized';
|
|
16
|
+
import { FixedSizeList } from 'react-window';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import LoadingMessage from '../LoadingMessage/LoadingMessage';
|
|
19
|
+
import SearchInCatalogButton from '../SearchInCatalogButton/SearchInCatalogButton';
|
|
20
|
+
import { checkIsMobilePlatform } from '../../../helpers';
|
|
21
|
+
import { USER_DROPDOWN_CHAR_HINT as CHAR_HINT, MIN_INPUT_SYMBOLS } from '../../../constants';
|
|
22
|
+
import '../../../styles/styles.scss';
|
|
23
|
+
var SKELETON_ROWS_COUNT = 3;
|
|
24
|
+
var MENU_ITEM_HEIGHT = 47;
|
|
25
|
+
var LIST_OVER_SCAN_COUNT = 5;
|
|
26
|
+
var PADDING_SIZE = 12;
|
|
27
|
+
var BUTTON_SIZE = 45;
|
|
28
|
+
var MIN_SCROLL_TOP = 10;
|
|
29
|
+
var MenuList = function (props) {
|
|
30
|
+
var _a;
|
|
31
|
+
var selectRef = props.selectRef, scrollFromTop = props.scrollFromTop, language = props.language, platform = props.platform, menuListMaxHeight = props.menuListMaxHeight, charHintClassName = props.charHintClassName, hasNextPage = props.hasNextPage, isLoading = props.isLoading, isUserTyping = props.isUserTyping, isCharHintVisible = props.isCharHintVisible, isNextPageLoading = props.isNextPageLoading, _b = props.isShowCatalogSearchButton, isShowCatalogSearchButton = _b === void 0 ? false : _b, isMenuShadowless = props.isMenuShadowless, children = props.children, onLoadNextPage = props.onLoadNextPage, onShowCatalogSearchButtonClick = props.onShowCatalogSearchButtonClick, setIsDelimiterVisible = props.setIsDelimiterVisible;
|
|
32
|
+
var selectRefCurrent = selectRef.current;
|
|
33
|
+
var inputValue = (_a = selectRefCurrent === null || selectRefCurrent === void 0 ? void 0 : selectRefCurrent.props) === null || _a === void 0 ? void 0 : _a.inputValue;
|
|
34
|
+
var inputValueLength = inputValue === null || inputValue === void 0 ? void 0 : inputValue.length;
|
|
35
|
+
var isCatalogSearchBtnListedLast = isShowCatalogSearchButton && !isMenuShadowless;
|
|
36
|
+
var isCatalogSearchBtnListedFirst = isShowCatalogSearchButton && isMenuShadowless;
|
|
37
|
+
var virtualizationListRef = useRef(null);
|
|
38
|
+
var virtualizationListOuterRef = useRef(null);
|
|
39
|
+
var lastElement = useRef(null);
|
|
40
|
+
var observer = useRef(new IntersectionObserver(function (entries) { return entries[0].isIntersecting && handleLoadNextPage(); }));
|
|
41
|
+
useEffect(function () {
|
|
42
|
+
var lastElementCurrent = lastElement.current;
|
|
43
|
+
var observerCurrent = observer.current;
|
|
44
|
+
lastElementCurrent && observerCurrent.observe(lastElementCurrent);
|
|
45
|
+
return function () {
|
|
46
|
+
lastElementCurrent && observerCurrent.unobserve(lastElementCurrent);
|
|
47
|
+
};
|
|
48
|
+
// eslint-disable-next-line
|
|
49
|
+
}, [lastElement.current]);
|
|
50
|
+
useLayoutEffect(function () {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
var scrollTop = (_b = (_a = virtualizationListOuterRef.current) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0;
|
|
53
|
+
setIsDelimiterVisible(scrollTop > MIN_SCROLL_TOP);
|
|
54
|
+
}, [setIsDelimiterVisible]);
|
|
55
|
+
var handleLoadNextPage = function () {
|
|
56
|
+
onLoadNextPage(inputValue);
|
|
57
|
+
if (virtualizationListRef.current) {
|
|
58
|
+
var scrollOffset = virtualizationListRef.current.state.scrollOffset;
|
|
59
|
+
scrollFromTop.current = scrollOffset + MENU_ITEM_HEIGHT * SKELETON_ROWS_COUNT;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
if (inputValueLength < MIN_INPUT_SYMBOLS)
|
|
63
|
+
return isCharHintVisible ? _jsx("div", __assign({ className: classNames('smartapp-menu-list__char-hint', charHintClassName) }, { children: CHAR_HINT[language] })) : null;
|
|
64
|
+
// For children like: "Loading" or "No Options" provided by 'react-select'
|
|
65
|
+
if (!Array.isArray(children))
|
|
66
|
+
return _jsx(_Fragment, { children: children });
|
|
67
|
+
var childrenLength = children.length;
|
|
68
|
+
var listChildrenHeight = childrenLength * MENU_ITEM_HEIGHT + PADDING_SIZE;
|
|
69
|
+
var maxMenuHeight = isCatalogSearchBtnListedLast ? menuListMaxHeight - BUTTON_SIZE : menuListMaxHeight;
|
|
70
|
+
var listHeight = listChildrenHeight > maxMenuHeight ? maxMenuHeight : listChildrenHeight;
|
|
71
|
+
var itemCount = hasNextPage ? childrenLength + SKELETON_ROWS_COUNT : childrenLength;
|
|
72
|
+
var isNextPageSkeletonsVisible = hasNextPage && !isNextPageLoading && !isLoading && !isUserTyping;
|
|
73
|
+
var isDataLoadingSkeletonsVisible = isNextPageLoading || isLoading || (isUserTyping && inputValueLength >= MIN_INPUT_SYMBOLS);
|
|
74
|
+
var isSkeletonsVisible = isNextPageSkeletonsVisible || isDataLoadingSkeletonsVisible;
|
|
75
|
+
var handleScroll = function (_a) {
|
|
76
|
+
var scrollOffset = _a.scrollOffset;
|
|
77
|
+
scrollFromTop.current = scrollOffset;
|
|
78
|
+
setIsDelimiterVisible(scrollOffset > MIN_SCROLL_TOP);
|
|
79
|
+
};
|
|
80
|
+
var renderSkeletons = function () { return isSkeletonsVisible && _jsx(LoadingMessage, { isMenuShadowless: isMenuShadowless, skeletonRowsCount: SKELETON_ROWS_COUNT }); };
|
|
81
|
+
var rowRenderer = function (_a) {
|
|
82
|
+
var index = _a.index, style = _a.style;
|
|
83
|
+
var isLastRow = index === childrenLength - 1;
|
|
84
|
+
var rowRef = isNextPageSkeletonsVisible ? lastElement : null;
|
|
85
|
+
return (_jsxs("div", __assign({ ref: rowRef, style: style, role: children[index] ? 'option' : '' }, { children: [children[index], isLastRow && renderSkeletons()] }), index));
|
|
86
|
+
};
|
|
87
|
+
return (_jsxs(_Fragment, { children: [isCatalogSearchBtnListedFirst && (_jsx(SearchInCatalogButton, { isMenuShadowless: true, language: language, onShowCatalogSearchButtonClick: onShowCatalogSearchButtonClick })), _jsx(components.MenuList, __assign({}, props, { children: _jsx(AutoSizer, __assign({ disableHeight: true }, { children: function (_a) {
|
|
88
|
+
var width = _a.width;
|
|
89
|
+
return (_jsxs("div", __assign({ style: {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
flexDirection: 'column',
|
|
92
|
+
height: isCatalogSearchBtnListedLast ? listHeight + BUTTON_SIZE : listHeight,
|
|
93
|
+
} }, { children: [_jsx(FixedSizeList, __assign({ outerRef: virtualizationListOuterRef, ref: virtualizationListRef, height: listHeight, itemCount: itemCount, itemSize: MENU_ITEM_HEIGHT, width: width, overscanCount: LIST_OVER_SCAN_COUNT, onScroll: handleScroll, initialScrollOffset: scrollFromTop.current, className: classNames('smartapp-menu-list', {
|
|
94
|
+
'smartapp-menu-list__with-button': isCatalogSearchBtnListedLast,
|
|
95
|
+
'smartapp-menu-list__shadowless': isMenuShadowless,
|
|
96
|
+
'smartapp-menu-list__shadowless--pt-0': isCatalogSearchBtnListedFirst,
|
|
97
|
+
'smartapp-menu-list__invisible-scroll': checkIsMobilePlatform(platform) && isMenuShadowless,
|
|
98
|
+
}), outerElementType: CustomOuterElement }, { children: rowRenderer })), isCatalogSearchBtnListedLast && (_jsx(SearchInCatalogButton, { language: language, width: width, onShowCatalogSearchButtonClick: onShowCatalogSearchButtonClick }))] })));
|
|
99
|
+
} })) }))] }));
|
|
100
|
+
};
|
|
101
|
+
var CustomOuterElement = React.forwardRef(function (props, ref) { return _jsx("div", __assign({ ref: ref }, props, { style: __assign({}, props.style) })); });
|
|
102
|
+
CustomOuterElement.displayName = 'CustomOuterElement';
|
|
103
|
+
export default MenuList;
|
|
104
|
+
//# sourceMappingURL=MenuList.js.map
|