@expressms/smartapp-ui 2.9.0 → 2.9.2
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/package.json +1 -1
- package/build/main/assets/icons/arrow-back.svg +0 -3
- package/build/main/assets/icons/arrow-down.svg +0 -3
- package/build/main/assets/icons/arrow-up.svg +0 -3
- package/build/main/assets/icons/attachment-loader.svg +0 -3
- package/build/main/assets/icons/button-loader.svg +0 -3
- package/build/main/assets/icons/cancel-cross.svg +0 -3
- package/build/main/assets/icons/check-mark.svg +0 -4
- package/build/main/assets/icons/clear.svg +0 -3
- package/build/main/assets/icons/close-stories.svg +0 -4
- package/build/main/assets/icons/close.svg +0 -10
- package/build/main/assets/icons/contact-info.svg +0 -12
- package/build/main/assets/icons/corporate-user.svg +0 -10
- package/build/main/assets/icons/crown.svg +0 -5
- package/build/main/assets/icons/delete-chip.svg +0 -3
- package/build/main/assets/icons/download.svg +0 -4
- package/build/main/assets/icons/error.svg +0 -5
- package/build/main/assets/icons/external-link.svg +0 -3
- package/build/main/assets/icons/eye-off.svg +0 -10
- package/build/main/assets/icons/eye.svg +0 -10
- package/build/main/assets/icons/file.svg +0 -3
- package/build/main/assets/icons/info.svg +0 -5
- package/build/main/assets/icons/loader.svg +0 -3
- package/build/main/assets/icons/logout.svg +0 -4
- package/build/main/assets/icons/magnifying-glass.svg +0 -3
- package/build/main/assets/icons/mail.svg +0 -3
- package/build/main/assets/icons/more.svg +0 -3
- package/build/main/assets/icons/my-contact-user.svg +0 -10
- package/build/main/assets/icons/notification-close.svg +0 -3
- package/build/main/assets/icons/notification-error.svg +0 -3
- package/build/main/assets/icons/notification-failure.svg +0 -3
- package/build/main/assets/icons/notification-info.svg +0 -5
- package/build/main/assets/icons/notification-success.svg +0 -4
- package/build/main/assets/icons/notification-warning.svg +0 -5
- package/build/main/assets/icons/order.svg +0 -6
- package/build/main/assets/icons/plus.svg +0 -4
- package/build/main/assets/icons/private.svg +0 -12
- package/build/main/assets/icons/refresh.svg +0 -3
- package/build/main/assets/icons/story-loader.svg +0 -3
- package/build/main/assets/icons/tick.svg +0 -10
- package/build/main/assets/icons/trash.svg +0 -3
- package/build/main/assets/icons/unread-mails.svg +0 -4
- package/build/main/assets/storybook/index.d.ts +0 -21
- package/build/main/assets/storybook/index.js +0 -22
- package/build/main/assets/storybook/index.js.map +0 -1
- package/build/main/constants/constants.d.ts +0 -152
- package/build/main/constants/constants.js +0 -172
- package/build/main/constants/constants.js.map +0 -1
- package/build/main/constants/index.d.ts +0 -2
- package/build/main/constants/index.js +0 -3
- package/build/main/constants/index.js.map +0 -1
- package/build/main/constants/types.d.ts +0 -24
- package/build/main/constants/types.js +0 -2
- package/build/main/constants/types.js.map +0 -1
- package/build/main/helpers/index.d.ts +0 -22
- package/build/main/helpers/index.js +0 -89
- package/build/main/helpers/index.js.map +0 -1
- package/build/main/hooks/useModal.d.ts +0 -21
- package/build/main/hooks/useModal.js +0 -60
- package/build/main/hooks/useModal.js.map +0 -1
- package/build/main/index.d.ts +0 -36
- package/build/main/index.js +0 -37
- package/build/main/index.js.map +0 -1
- package/build/main/styles/index.d.ts +0 -1
- package/build/main/styles/index.js +0 -2
- package/build/main/styles/index.js.map +0 -1
- package/build/main/styles/main.js +0 -0
- package/build/main/styles/styles.scss +0 -14
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +0 -4
- package/build/main//321/201omponents/ActionModal/ActionModal.js +0 -55
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +0 -1
- package/build/main//321/201omponents/ActionModal/index.d.ts +0 -1
- package/build/main//321/201omponents/ActionModal/index.js +0 -2
- package/build/main//321/201omponents/ActionModal/index.js.map +0 -1
- package/build/main//321/201omponents/ActionModal/types.d.ts +0 -24
- package/build/main//321/201omponents/ActionModal/types.js +0 -2
- package/build/main//321/201omponents/ActionModal/types.js.map +0 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +0 -8
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +0 -60
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +0 -1
- package/build/main//321/201omponents/AttachedFile/index.d.ts +0 -1
- package/build/main//321/201omponents/AttachedFile/index.js +0 -2
- package/build/main//321/201omponents/AttachedFile/index.js.map +0 -1
- package/build/main//321/201omponents/AttachedFile/types.d.ts +0 -25
- package/build/main//321/201omponents/AttachedFile/types.js +0 -2
- package/build/main//321/201omponents/AttachedFile/types.js.map +0 -1
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +0 -4
- package/build/main//321/201omponents/Avatar/Avatar.js +0 -135
- package/build/main//321/201omponents/Avatar/Avatar.js.map +0 -1
- package/build/main//321/201omponents/Avatar/index.d.ts +0 -1
- package/build/main//321/201omponents/Avatar/index.js +0 -2
- package/build/main//321/201omponents/Avatar/index.js.map +0 -1
- package/build/main//321/201omponents/Avatar/types.d.ts +0 -58
- package/build/main//321/201omponents/Avatar/types.js +0 -29
- package/build/main//321/201omponents/Avatar/types.js.map +0 -1
- package/build/main//321/201omponents/Button/Button.d.ts +0 -4
- package/build/main//321/201omponents/Button/Button.js +0 -63
- package/build/main//321/201omponents/Button/Button.js.map +0 -1
- package/build/main//321/201omponents/Button/index.d.ts +0 -1
- package/build/main//321/201omponents/Button/index.js +0 -2
- package/build/main//321/201omponents/Button/index.js.map +0 -1
- package/build/main//321/201omponents/Button/types.d.ts +0 -28
- package/build/main//321/201omponents/Button/types.js +0 -11
- package/build/main//321/201omponents/Button/types.js.map +0 -1
- package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +0 -4
- package/build/main//321/201omponents/CachedImage/CachedImage.js +0 -59
- package/build/main//321/201omponents/CachedImage/CachedImage.js.map +0 -1
- package/build/main//321/201omponents/CachedImage/helpers.d.ts +0 -3
- package/build/main//321/201omponents/CachedImage/helpers.js +0 -40
- package/build/main//321/201omponents/CachedImage/helpers.js.map +0 -1
- package/build/main//321/201omponents/CachedImage/index.d.ts +0 -1
- package/build/main//321/201omponents/CachedImage/index.js +0 -2
- package/build/main//321/201omponents/CachedImage/index.js.map +0 -1
- package/build/main//321/201omponents/CachedImage/types.d.ts +0 -10
- package/build/main//321/201omponents/CachedImage/types.js +0 -2
- package/build/main//321/201omponents/CachedImage/types.js.map +0 -1
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +0 -4
- package/build/main//321/201omponents/Calendar/Calendar.js +0 -97
- package/build/main//321/201omponents/Calendar/Calendar.js.map +0 -1
- package/build/main//321/201omponents/Calendar/index.d.ts +0 -1
- package/build/main//321/201omponents/Calendar/index.js +0 -2
- package/build/main//321/201omponents/Calendar/index.js.map +0 -1
- package/build/main//321/201omponents/Calendar/types.d.ts +0 -13
- package/build/main//321/201omponents/Calendar/types.js +0 -2
- package/build/main//321/201omponents/Calendar/types.js.map +0 -1
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +0 -4
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +0 -46
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +0 -1
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +0 -4
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +0 -71
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +0 -1
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +0 -4
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +0 -41
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +0 -1
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +0 -4
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +0 -63
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +0 -1
- package/build/main//321/201omponents/Charts/colors.d.ts +0 -3
- package/build/main//321/201omponents/Charts/colors.js +0 -4
- package/build/main//321/201omponents/Charts/colors.js.map +0 -1
- package/build/main//321/201omponents/Charts/constants.d.ts +0 -46
- package/build/main//321/201omponents/Charts/constants.js +0 -43
- package/build/main//321/201omponents/Charts/constants.js.map +0 -1
- package/build/main//321/201omponents/Charts/helpers.d.ts +0 -17
- package/build/main//321/201omponents/Charts/helpers.js +0 -73
- package/build/main//321/201omponents/Charts/helpers.js.map +0 -1
- package/build/main//321/201omponents/Charts/index.d.ts +0 -3
- package/build/main//321/201omponents/Charts/index.js +0 -4
- package/build/main//321/201omponents/Charts/index.js.map +0 -1
- package/build/main//321/201omponents/Charts/types.d.ts +0 -88
- package/build/main//321/201omponents/Charts/types.js +0 -2
- package/build/main//321/201omponents/Charts/types.js.map +0 -1
- package/build/main//321/201omponents/Charts/useEvents.d.ts +0 -5
- package/build/main//321/201omponents/Charts/useEvents.js +0 -45
- package/build/main//321/201omponents/Charts/useEvents.js.map +0 -1
- package/build/main//321/201omponents/Charts/usePieEvents.d.ts +0 -6
- package/build/main//321/201omponents/Charts/usePieEvents.js +0 -57
- package/build/main//321/201omponents/Charts/usePieEvents.js.map +0 -1
- package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +0 -4
- package/build/main//321/201omponents/Checkbox/Checkbox.js +0 -38
- package/build/main//321/201omponents/Checkbox/Checkbox.js.map +0 -1
- package/build/main//321/201omponents/Checkbox/index.d.ts +0 -1
- package/build/main//321/201omponents/Checkbox/index.js +0 -2
- package/build/main//321/201omponents/Checkbox/index.js.map +0 -1
- package/build/main//321/201omponents/Checkbox/types.d.ts +0 -12
- package/build/main//321/201omponents/Checkbox/types.js +0 -2
- package/build/main//321/201omponents/Checkbox/types.js.map +0 -1
- package/build/main//321/201omponents/Chip/Chip.d.ts +0 -4
- package/build/main//321/201omponents/Chip/Chip.js +0 -35
- package/build/main//321/201omponents/Chip/Chip.js.map +0 -1
- package/build/main//321/201omponents/Chip/index.d.ts +0 -1
- package/build/main//321/201omponents/Chip/index.js +0 -2
- package/build/main//321/201omponents/Chip/index.js.map +0 -1
- package/build/main//321/201omponents/Chip/types.d.ts +0 -13
- package/build/main//321/201omponents/Chip/types.js +0 -2
- package/build/main//321/201omponents/Chip/types.js.map +0 -1
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +0 -4
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +0 -70
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +0 -1
- package/build/main//321/201omponents/ConfirmationModal/index.d.ts +0 -1
- package/build/main//321/201omponents/ConfirmationModal/index.js +0 -2
- package/build/main//321/201omponents/ConfirmationModal/index.js.map +0 -1
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +0 -28
- package/build/main//321/201omponents/ConfirmationModal/types.js +0 -2
- package/build/main//321/201omponents/ConfirmationModal/types.js.map +0 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +0 -4
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +0 -82
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +0 -1
- package/build/main//321/201omponents/ContextMenu/index.d.ts +0 -1
- package/build/main//321/201omponents/ContextMenu/index.js +0 -2
- package/build/main//321/201omponents/ContextMenu/index.js.map +0 -1
- package/build/main//321/201omponents/ContextMenu/types.d.ts +0 -32
- package/build/main//321/201omponents/ContextMenu/types.js +0 -2
- package/build/main//321/201omponents/ContextMenu/types.js.map +0 -1
- package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +0 -12
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +0 -243
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +0 -1
- package/build/main//321/201omponents/CustomSelect/index.d.ts +0 -1
- package/build/main//321/201omponents/CustomSelect/index.js +0 -2
- package/build/main//321/201omponents/CustomSelect/index.js.map +0 -1
- package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +0 -16
- package/build/main//321/201omponents/CustomSelect/selectStyles.js +0 -67
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +0 -1
- package/build/main//321/201omponents/CustomSelect/types.d.ts +0 -64
- package/build/main//321/201omponents/CustomSelect/types.js +0 -2
- package/build/main//321/201omponents/CustomSelect/types.js.map +0 -1
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +0 -4
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +0 -57
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +0 -1
- package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +0 -1
- package/build/main//321/201omponents/CustomSelectProfiles/index.js +0 -2
- package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +0 -1
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +0 -12
- package/build/main//321/201omponents/CustomSelectProfiles/types.js +0 -2
- package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +0 -1
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +0 -4
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +0 -57
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +0 -1
- package/build/main//321/201omponents/DragAndDrop/index.d.ts +0 -1
- package/build/main//321/201omponents/DragAndDrop/index.js +0 -2
- package/build/main//321/201omponents/DragAndDrop/index.js.map +0 -1
- package/build/main//321/201omponents/DragAndDrop/types.d.ts +0 -24
- package/build/main//321/201omponents/DragAndDrop/types.js +0 -2
- package/build/main//321/201omponents/DragAndDrop/types.js.map +0 -1
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +0 -4
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +0 -223
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +0 -1
- package/build/main//321/201omponents/DraggablePopup/index.d.ts +0 -1
- package/build/main//321/201omponents/DraggablePopup/index.js +0 -2
- package/build/main//321/201omponents/DraggablePopup/index.js.map +0 -1
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +0 -87
- package/build/main//321/201omponents/DraggablePopup/types.js +0 -2
- package/build/main//321/201omponents/DraggablePopup/types.js.map +0 -1
- package/build/main//321/201omponents/Error/Error.d.ts +0 -4
- package/build/main//321/201omponents/Error/Error.js +0 -23
- package/build/main//321/201omponents/Error/Error.js.map +0 -1
- package/build/main//321/201omponents/Error/index.d.ts +0 -1
- package/build/main//321/201omponents/Error/index.js +0 -2
- package/build/main//321/201omponents/Error/index.js.map +0 -1
- package/build/main//321/201omponents/Error/types.d.ts +0 -10
- package/build/main//321/201omponents/Error/types.js +0 -2
- package/build/main//321/201omponents/Error/types.js.map +0 -1
- package/build/main//321/201omponents/Flex/Flex.d.ts +0 -2
- package/build/main//321/201omponents/Flex/Flex.js +0 -49
- package/build/main//321/201omponents/Flex/Flex.js.map +0 -1
- package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +0 -5
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js +0 -16
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +0 -1
- package/build/main//321/201omponents/Flex/HFlex/index.d.ts +0 -1
- package/build/main//321/201omponents/Flex/HFlex/index.js +0 -2
- package/build/main//321/201omponents/Flex/HFlex/index.js.map +0 -1
- package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +0 -5
- package/build/main//321/201omponents/Flex/VFlex/VFlex.js +0 -16
- package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +0 -1
- package/build/main//321/201omponents/Flex/VFlex/index.d.ts +0 -1
- package/build/main//321/201omponents/Flex/VFlex/index.js +0 -2
- package/build/main//321/201omponents/Flex/VFlex/index.js.map +0 -1
- package/build/main//321/201omponents/Flex/index.d.ts +0 -3
- package/build/main//321/201omponents/Flex/index.js +0 -4
- package/build/main//321/201omponents/Flex/index.js.map +0 -1
- package/build/main//321/201omponents/Flex/types.d.ts +0 -15
- package/build/main//321/201omponents/Flex/types.js +0 -2
- package/build/main//321/201omponents/Flex/types.js.map +0 -1
- package/build/main//321/201omponents/Header/Header.d.ts +0 -5
- package/build/main//321/201omponents/Header/Header.js +0 -124
- package/build/main//321/201omponents/Header/Header.js.map +0 -1
- package/build/main//321/201omponents/Header/index.d.ts +0 -1
- package/build/main//321/201omponents/Header/index.js +0 -2
- package/build/main//321/201omponents/Header/index.js.map +0 -1
- package/build/main//321/201omponents/Header/types.d.ts +0 -46
- package/build/main//321/201omponents/Header/types.js +0 -2
- package/build/main//321/201omponents/Header/types.js.map +0 -1
- package/build/main//321/201omponents/Input/Input.d.ts +0 -4
- package/build/main//321/201omponents/Input/Input.js +0 -207
- package/build/main//321/201omponents/Input/Input.js.map +0 -1
- package/build/main//321/201omponents/Input/index.d.ts +0 -1
- package/build/main//321/201omponents/Input/index.js +0 -2
- package/build/main//321/201omponents/Input/index.js.map +0 -1
- package/build/main//321/201omponents/Input/types.d.ts +0 -29
- package/build/main//321/201omponents/Input/types.js +0 -2
- package/build/main//321/201omponents/Input/types.js.map +0 -1
- package/build/main//321/201omponents/ListItem/ListItem.d.ts +0 -23
- package/build/main//321/201omponents/ListItem/ListItem.js +0 -208
- package/build/main//321/201omponents/ListItem/ListItem.js.map +0 -1
- package/build/main//321/201omponents/ListItem/index.d.ts +0 -1
- package/build/main//321/201omponents/ListItem/index.js +0 -2
- package/build/main//321/201omponents/ListItem/index.js.map +0 -1
- package/build/main//321/201omponents/ListItem/types.d.ts +0 -42
- package/build/main//321/201omponents/ListItem/types.js +0 -2
- package/build/main//321/201omponents/ListItem/types.js.map +0 -1
- package/build/main//321/201omponents/Loader/Loader.d.ts +0 -4
- package/build/main//321/201omponents/Loader/Loader.js +0 -44
- package/build/main//321/201omponents/Loader/Loader.js.map +0 -1
- package/build/main//321/201omponents/Loader/index.d.ts +0 -1
- package/build/main//321/201omponents/Loader/index.js +0 -2
- package/build/main//321/201omponents/Loader/index.js.map +0 -1
- package/build/main//321/201omponents/Loader/types.d.ts +0 -18
- package/build/main//321/201omponents/Loader/types.js +0 -2
- package/build/main//321/201omponents/Loader/types.js.map +0 -1
- package/build/main//321/201omponents/Modal/Modal.d.ts +0 -4
- package/build/main//321/201omponents/Modal/Modal.js +0 -143
- package/build/main//321/201omponents/Modal/Modal.js.map +0 -1
- package/build/main//321/201omponents/Modal/index.d.ts +0 -1
- package/build/main//321/201omponents/Modal/index.js +0 -2
- package/build/main//321/201omponents/Modal/index.js.map +0 -1
- package/build/main//321/201omponents/Modal/types.d.ts +0 -34
- package/build/main//321/201omponents/Modal/types.js +0 -2
- package/build/main//321/201omponents/Modal/types.js.map +0 -1
- package/build/main//321/201omponents/Notification/Notification.d.ts +0 -8
- package/build/main//321/201omponents/Notification/Notification.js +0 -217
- package/build/main//321/201omponents/Notification/Notification.js.map +0 -1
- package/build/main//321/201omponents/Notification/index.d.ts +0 -1
- package/build/main//321/201omponents/Notification/index.js +0 -2
- package/build/main//321/201omponents/Notification/index.js.map +0 -1
- package/build/main//321/201omponents/Notification/types.d.ts +0 -45
- package/build/main//321/201omponents/Notification/types.js +0 -2
- package/build/main//321/201omponents/Notification/types.js.map +0 -1
- package/build/main//321/201omponents/Profile/Profile.d.ts +0 -4
- package/build/main//321/201omponents/Profile/Profile.js +0 -42
- package/build/main//321/201omponents/Profile/Profile.js.map +0 -1
- package/build/main//321/201omponents/Profile/index.d.ts +0 -1
- package/build/main//321/201omponents/Profile/index.js +0 -2
- package/build/main//321/201omponents/Profile/index.js.map +0 -1
- package/build/main//321/201omponents/Profile/types.d.ts +0 -14
- package/build/main//321/201omponents/Profile/types.js +0 -2
- package/build/main//321/201omponents/Profile/types.js.map +0 -1
- package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +0 -4
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js +0 -66
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +0 -1
- package/build/main//321/201omponents/ProgressBar/index.d.ts +0 -1
- package/build/main//321/201omponents/ProgressBar/index.js +0 -2
- package/build/main//321/201omponents/ProgressBar/index.js.map +0 -1
- package/build/main//321/201omponents/ProgressBar/types.d.ts +0 -7
- package/build/main//321/201omponents/ProgressBar/types.js +0 -2
- package/build/main//321/201omponents/ProgressBar/types.js.map +0 -1
- package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +0 -4
- package/build/main//321/201omponents/RadioButton/RadioButton.js +0 -37
- package/build/main//321/201omponents/RadioButton/RadioButton.js.map +0 -1
- package/build/main//321/201omponents/RadioButton/index.d.ts +0 -1
- package/build/main//321/201omponents/RadioButton/index.js +0 -2
- package/build/main//321/201omponents/RadioButton/index.js.map +0 -1
- package/build/main//321/201omponents/RadioButton/types.d.ts +0 -12
- package/build/main//321/201omponents/RadioButton/types.js +0 -2
- package/build/main//321/201omponents/RadioButton/types.js.map +0 -1
- package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +0 -5
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js +0 -63
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +0 -1
- package/build/main//321/201omponents/ScrollBar/index.d.ts +0 -1
- package/build/main//321/201omponents/ScrollBar/index.js +0 -2
- package/build/main//321/201omponents/ScrollBar/index.js.map +0 -1
- package/build/main//321/201omponents/ScrollBar/types.d.ts +0 -20
- package/build/main//321/201omponents/ScrollBar/types.js +0 -2
- package/build/main//321/201omponents/ScrollBar/types.js.map +0 -1
- package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +0 -4
- package/build/main//321/201omponents/Skeleton/Skeleton.js +0 -59
- package/build/main//321/201omponents/Skeleton/Skeleton.js.map +0 -1
- package/build/main//321/201omponents/Skeleton/index.d.ts +0 -1
- package/build/main//321/201omponents/Skeleton/index.js +0 -2
- package/build/main//321/201omponents/Skeleton/index.js.map +0 -1
- package/build/main//321/201omponents/Skeleton/types.d.ts +0 -17
- package/build/main//321/201omponents/Skeleton/types.js +0 -2
- package/build/main//321/201omponents/Skeleton/types.js.map +0 -1
- package/build/main//321/201omponents/Stories/Stories.d.ts +0 -4
- package/build/main//321/201omponents/Stories/Stories.js +0 -300
- package/build/main//321/201omponents/Stories/Stories.js.map +0 -1
- package/build/main//321/201omponents/Stories/index.d.ts +0 -1
- package/build/main//321/201omponents/Stories/index.js +0 -2
- package/build/main//321/201omponents/Stories/index.js.map +0 -1
- package/build/main//321/201omponents/Stories/types.d.ts +0 -70
- package/build/main//321/201omponents/Stories/types.js +0 -16
- package/build/main//321/201omponents/Stories/types.js.map +0 -1
- package/build/main//321/201omponents/Switcher/Switcher.d.ts +0 -4
- package/build/main//321/201omponents/Switcher/Switcher.js +0 -34
- package/build/main//321/201omponents/Switcher/Switcher.js.map +0 -1
- package/build/main//321/201omponents/Switcher/index.d.ts +0 -1
- package/build/main//321/201omponents/Switcher/index.js +0 -2
- package/build/main//321/201omponents/Switcher/index.js.map +0 -1
- package/build/main//321/201omponents/Switcher/types.d.ts +0 -8
- package/build/main//321/201omponents/Switcher/types.js +0 -2
- package/build/main//321/201omponents/Switcher/types.js.map +0 -1
- package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +0 -5
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js +0 -65
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +0 -1
- package/build/main//321/201omponents/SyncLoader/index.d.ts +0 -1
- package/build/main//321/201omponents/SyncLoader/index.js +0 -2
- package/build/main//321/201omponents/SyncLoader/index.js.map +0 -1
- package/build/main//321/201omponents/SyncLoader/types.d.ts +0 -9
- package/build/main//321/201omponents/SyncLoader/types.js +0 -2
- package/build/main//321/201omponents/SyncLoader/types.js.map +0 -1
- package/build/main//321/201omponents/Textarea/Textarea.d.ts +0 -4
- package/build/main//321/201omponents/Textarea/Textarea.js +0 -96
- package/build/main//321/201omponents/Textarea/Textarea.js.map +0 -1
- package/build/main//321/201omponents/Textarea/index.d.ts +0 -1
- package/build/main//321/201omponents/Textarea/index.js +0 -2
- package/build/main//321/201omponents/Textarea/index.js.map +0 -1
- package/build/main//321/201omponents/Textarea/types.d.ts +0 -12
- package/build/main//321/201omponents/Textarea/types.js +0 -2
- package/build/main//321/201omponents/Textarea/types.js.map +0 -1
- package/build/main//321/201omponents/Toggle/Toggle.d.ts +0 -4
- package/build/main//321/201omponents/Toggle/Toggle.js +0 -38
- package/build/main//321/201omponents/Toggle/Toggle.js.map +0 -1
- package/build/main//321/201omponents/Toggle/index.d.ts +0 -1
- package/build/main//321/201omponents/Toggle/index.js +0 -2
- package/build/main//321/201omponents/Toggle/index.js.map +0 -1
- package/build/main//321/201omponents/Toggle/types.d.ts +0 -12
- package/build/main//321/201omponents/Toggle/types.js +0 -2
- package/build/main//321/201omponents/Toggle/types.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +0 -4
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +0 -31
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +0 -4
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +0 -82
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +0 -4
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +0 -23
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +0 -4
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +0 -121
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +0 -3
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +0 -100
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +0 -4
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +0 -91
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +0 -5
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +0 -447
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +0 -98
- package/build/main//321/201omponents/UserDropdown/helpers.js +0 -93
- package/build/main//321/201omponents/UserDropdown/helpers.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/index.d.ts +0 -1
- package/build/main//321/201omponents/UserDropdown/index.js +0 -2
- package/build/main//321/201omponents/UserDropdown/index.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +0 -15
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +0 -80
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +0 -1
- package/build/main//321/201omponents/UserDropdown/types.d.ts +0 -200
- package/build/main//321/201omponents/UserDropdown/types.js +0 -2
- package/build/main//321/201omponents/UserDropdown/types.js.map +0 -1
- package/build/main//321/201omponents/types.d.ts +0 -2
- package/build/main//321/201omponents/types.js +0 -2
- package/build/main//321/201omponents/types.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { IntRange } from '../types';
|
|
3
|
-
import { TStyles } from '../../constants';
|
|
4
|
-
export declare enum TButtonVariant {
|
|
5
|
-
primary = "primary",
|
|
6
|
-
secondary = "secondary"
|
|
7
|
-
}
|
|
8
|
-
export declare enum TButtonAppearance {
|
|
9
|
-
accent = "accent",
|
|
10
|
-
negative = "negative"
|
|
11
|
-
}
|
|
12
|
-
export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
|
-
title: string;
|
|
14
|
-
isDisabledClickable?: boolean;
|
|
15
|
-
isWaitingResponse?: boolean;
|
|
16
|
-
variant?: 'primary' | 'secondary';
|
|
17
|
-
appearance?: 'accent' | 'negative';
|
|
18
|
-
icon?: ReactElement;
|
|
19
|
-
loaderIcon?: ReactElement;
|
|
20
|
-
width?: IntRange<1, 101>;
|
|
21
|
-
className?: string;
|
|
22
|
-
styles?: TStyles;
|
|
23
|
-
}
|
|
24
|
-
export type TChangeTransitionDelay = {
|
|
25
|
-
transitionDelay: number;
|
|
26
|
-
titleEl: HTMLSpanElement | null;
|
|
27
|
-
iconEl: HTMLDivElement | null;
|
|
28
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export var TButtonVariant;
|
|
2
|
-
(function (TButtonVariant) {
|
|
3
|
-
TButtonVariant["primary"] = "primary";
|
|
4
|
-
TButtonVariant["secondary"] = "secondary";
|
|
5
|
-
})(TButtonVariant || (TButtonVariant = {}));
|
|
6
|
-
export var TButtonAppearance;
|
|
7
|
-
(function (TButtonAppearance) {
|
|
8
|
-
TButtonAppearance["accent"] = "accent";
|
|
9
|
-
TButtonAppearance["negative"] = "negative";
|
|
10
|
-
})(TButtonAppearance || (TButtonAppearance = {}));
|
|
11
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AACzB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
|
|
@@ -1,59 +0,0 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect, useLayoutEffect, useState } from 'react';
|
|
14
|
-
import classNames from 'classnames';
|
|
15
|
-
import { isBlobUrl, tryToLoadImageFromCache, tryToSaveImageToCache } from './helpers';
|
|
16
|
-
import '../../styles/styles.scss';
|
|
17
|
-
var IMAGE_LOADING_STATE;
|
|
18
|
-
(function (IMAGE_LOADING_STATE) {
|
|
19
|
-
IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["pending"] = 0] = "pending";
|
|
20
|
-
IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["success"] = 1] = "success";
|
|
21
|
-
IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["error"] = -1] = "error";
|
|
22
|
-
})(IMAGE_LOADING_STATE || (IMAGE_LOADING_STATE = {}));
|
|
23
|
-
var CachedImage = function (_a) {
|
|
24
|
-
var src = _a.src, alt = _a.alt, className = _a.className, styles = _a.styles, width = _a.width, height = _a.height, borderRadius = _a.borderRadius;
|
|
25
|
-
var _b = useState(''), url = _b[0], setUrl = _b[1];
|
|
26
|
-
var _c = useState(IMAGE_LOADING_STATE.pending), loadingState = _c[0], setLoadingState = _c[1];
|
|
27
|
-
useLayoutEffect(function () {
|
|
28
|
-
setUrl(src);
|
|
29
|
-
}, [src]);
|
|
30
|
-
// Очистка URL объекта после ошибки загрузки изображения
|
|
31
|
-
useEffect(function () {
|
|
32
|
-
if (loadingState === IMAGE_LOADING_STATE.error && isBlobUrl(url))
|
|
33
|
-
URL.revokeObjectURL(url);
|
|
34
|
-
return function () { return void 0; };
|
|
35
|
-
}, [loadingState, url]);
|
|
36
|
-
var isImageLoadingStatePending = function () { return loadingState === IMAGE_LOADING_STATE.pending; };
|
|
37
|
-
// Обработчик успешной загрузки изображения
|
|
38
|
-
var handleOnLoad = function () {
|
|
39
|
-
if (!isImageLoadingStatePending())
|
|
40
|
-
return;
|
|
41
|
-
setLoadingState(IMAGE_LOADING_STATE.success);
|
|
42
|
-
tryToSaveImageToCache(src);
|
|
43
|
-
};
|
|
44
|
-
// Обработчик ошибки загрузки изображения
|
|
45
|
-
var handleOnError = function () {
|
|
46
|
-
if (!isImageLoadingStatePending())
|
|
47
|
-
return;
|
|
48
|
-
setLoadingState(IMAGE_LOADING_STATE.error);
|
|
49
|
-
tryToLoadImageFromCache(src).then(function (blobUrl) { return blobUrl && setUrl(blobUrl); });
|
|
50
|
-
};
|
|
51
|
-
var generateImageStyles = function () {
|
|
52
|
-
var widthValue = width ? "".concat(width, "px") : '100%';
|
|
53
|
-
var heightValue = height ? "".concat(height, "px") : '100%';
|
|
54
|
-
return __assign({ minWidth: widthValue, minHeight: heightValue, width: widthValue, height: heightValue, borderRadius: "".concat(borderRadius, "px") }, styles);
|
|
55
|
-
};
|
|
56
|
-
return (_jsx("img", { className: classNames('smartapp-cached-image', className), style: generateImageStyles(), src: url, alt: alt, onLoad: handleOnLoad, onError: handleOnError }));
|
|
57
|
-
};
|
|
58
|
-
export default CachedImage;
|
|
59
|
-
//# sourceMappingURL=CachedImage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CachedImage.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/CachedImage.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAErF,OAAO,0BAA0B,CAAA;AAEjC,IAAK,mBAIJ;AAJD,WAAK,mBAAmB;IACtB,mEAAa,CAAA;IACb,mEAAa,CAAA;IACb,gEAAY,CAAA;AACd,CAAC,EAJI,mBAAmB,KAAnB,mBAAmB,QAIvB;AAED,IAAM,WAAW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,OAAO,CAAC,EAA1B,CAA0B,CAAC,CAAA;IAC5E,CAAC,CAAA;IAED,IAAM,mBAAmB,GAAG;QAC1B,IAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,UAAG,KAAK,OAAI,CAAC,CAAC,CAAC,MAAM,CAAA;QAChD,IAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,UAAG,MAAM,OAAI,CAAC,CAAC,CAAC,MAAM,CAAA;QAEnD,kBACE,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,UAAG,YAAY,OAAI,IAC9B,MAAM,EACV;IACH,CAAC,CAAA;IAED,OAAO,CACL,cACE,SAAS,EAAE,UAAU,CAAC,uBAAuB,EAAE,SAAS,CAAC,EACzD,KAAK,EAAE,mBAAmB,EAAE,EAC5B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,aAAa,GACtB,CACH,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var SMARTAPP_CACHE_STORAGE = 'smartapp-cache-storage';
|
|
2
|
-
var NETWORK_RESPONSE_ERROR = 'Network response was not ok';
|
|
3
|
-
var FAILED_TO_SAVE_IMAGE_TO_CACHE = 'Failed to save image to cache';
|
|
4
|
-
// Загрузка изображения из кэша
|
|
5
|
-
export var tryToLoadImageFromCache = function (url) {
|
|
6
|
-
return caches
|
|
7
|
-
.open(SMARTAPP_CACHE_STORAGE)
|
|
8
|
-
.then(function (cache) { return cache.match(url); })
|
|
9
|
-
.then(function (response) { return (response === null || response === void 0 ? void 0 : response.blob()) || null; })
|
|
10
|
-
.then(function (blob) { return (blob ? URL.createObjectURL(blob) : null); })
|
|
11
|
-
.catch(function () { return null; });
|
|
12
|
-
};
|
|
13
|
-
// Сохранение изображения в кэш
|
|
14
|
-
var saveImageToCache = function (url) {
|
|
15
|
-
return fetch(url, {
|
|
16
|
-
credentials: 'include',
|
|
17
|
-
})
|
|
18
|
-
.then(function (response) {
|
|
19
|
-
if (!response.ok)
|
|
20
|
-
throw new Error(NETWORK_RESPONSE_ERROR);
|
|
21
|
-
return caches.open(SMARTAPP_CACHE_STORAGE).then(function (cache) { return cache.put(url, response); });
|
|
22
|
-
})
|
|
23
|
-
.catch(function (error) { return console.error("".concat(FAILED_TO_SAVE_IMAGE_TO_CACHE, ":"), error); });
|
|
24
|
-
};
|
|
25
|
-
// Проверка наличия изображения в кэше и сохранение его при отсутствии
|
|
26
|
-
export var tryToSaveImageToCache = function (url) {
|
|
27
|
-
if (!url)
|
|
28
|
-
return Promise.resolve();
|
|
29
|
-
return caches
|
|
30
|
-
.open(SMARTAPP_CACHE_STORAGE)
|
|
31
|
-
.then(function (cache) { return cache.match(url); })
|
|
32
|
-
.then(function (response) {
|
|
33
|
-
if (!response)
|
|
34
|
-
return saveImageToCache(url);
|
|
35
|
-
return Promise.resolve();
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
// Функция для проверки, является ли URL объектом Blob
|
|
39
|
-
export var isBlobUrl = function (url) { return url.indexOf('blob:') === 0; };
|
|
40
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/helpers.ts"],"names":[],"mappings":"AAAA,IAAM,sBAAsB,GAAG,wBAAwB,CAAA;AACvD,IAAM,sBAAsB,GAAG,6BAA6B,CAAA;AAC5D,IAAM,6BAA6B,GAAG,+BAA+B,CAAA;AAErE,+BAA+B;AAC/B,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,GAAW;IACjD,OAAA,MAAM;SACH,IAAI,CAAC,sBAAsB,CAAC;SAC5B,IAAI,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,C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AAG,CAAC,EAAhB,CAAgB,CAAC;SACjC,IAAI,CAAC,UAAC,QAAQ;QACb,IAAI,CAAC,QAAQ;YAAE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAA;QAC3C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAED,sDAAsD;AACtD,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,GAAW,IAAK,OAAA,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAA1B,CAA0B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './CachedImage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ICalendarProps } from './types';
|
|
2
|
-
import '../../styles/styles.scss';
|
|
3
|
-
declare const CalendarDatepicker: ({ id, initialSelectedDate, initialSelectedDateRange, onChange, onChangeSelectedDateRange, isRange, width, isAnnualEvent, ...props }: ICalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export default CalendarDatepicker;
|
|
@@ -1,97 +0,0 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { useEffect, useState } from 'react';
|
|
25
|
-
import DatePicker, { registerLocale } from 'react-datepicker';
|
|
26
|
-
import { LANGUAGES } from '../../constants';
|
|
27
|
-
import { ReactComponent as ArrowUpIcon } from '../../assets/icons/arrow-up.svg';
|
|
28
|
-
import { ReactComponent as ArrowDownIcon } from '../../assets/icons/arrow-down.svg';
|
|
29
|
-
import '../../styles/styles.scss';
|
|
30
|
-
import ru from 'date-fns/locale/ru';
|
|
31
|
-
import en from 'date-fns/locale/en-US';
|
|
32
|
-
import ar from 'date-fns/locale/ar';
|
|
33
|
-
import fr from 'date-fns/locale/fr';
|
|
34
|
-
import es from 'date-fns/locale/es';
|
|
35
|
-
import de from 'date-fns/locale/de';
|
|
36
|
-
import ms from 'date-fns/locale/ms';
|
|
37
|
-
import tr from 'date-fns/locale/tr';
|
|
38
|
-
import id from 'date-fns/locale/id';
|
|
39
|
-
registerLocale(LANGUAGES.ru, ru);
|
|
40
|
-
registerLocale(LANGUAGES.ar, ar);
|
|
41
|
-
registerLocale(LANGUAGES.en, en);
|
|
42
|
-
registerLocale(LANGUAGES.fr, fr);
|
|
43
|
-
registerLocale(LANGUAGES.es, es);
|
|
44
|
-
registerLocale(LANGUAGES.de, de);
|
|
45
|
-
registerLocale(LANGUAGES.ms, ms);
|
|
46
|
-
registerLocale(LANGUAGES.tr, tr);
|
|
47
|
-
registerLocale(LANGUAGES.id, id);
|
|
48
|
-
var DATE_FORMAT;
|
|
49
|
-
(function (DATE_FORMAT) {
|
|
50
|
-
DATE_FORMAT["DATE_PICKER_FORMAT"] = "dd MMMM";
|
|
51
|
-
DATE_FORMAT["DAY_MONTH_YEAR"] = "d MMMM yyyy";
|
|
52
|
-
DATE_FORMAT["MONTH_YEAR"] = "LLLL yyyy";
|
|
53
|
-
DATE_FORMAT["MONTH"] = "LLLL";
|
|
54
|
-
})(DATE_FORMAT || (DATE_FORMAT = {}));
|
|
55
|
-
var READONLY_ATTRIBUTE = 'readonly';
|
|
56
|
-
var READONLY_ATTRIBUTE_VALUE = 'true';
|
|
57
|
-
var DATE_PICKER_FORMAT = DATE_FORMAT.DATE_PICKER_FORMAT, DAY_MONTH_YEAR = DATE_FORMAT.DAY_MONTH_YEAR, MONTH_YEAR = DATE_FORMAT.MONTH_YEAR, MONTH = DATE_FORMAT.MONTH;
|
|
58
|
-
var CalendarDatepicker = function (_a) {
|
|
59
|
-
var id = _a.id, initialSelectedDate = _a.initialSelectedDate, initialSelectedDateRange = _a.initialSelectedDateRange, onChange = _a.onChange, onChangeSelectedDateRange = _a.onChangeSelectedDateRange, _b = _a.isRange, isRange = _b === void 0 ? false : _b, width = _a.width, _c = _a.isAnnualEvent, isAnnualEvent = _c === void 0 ? false : _c, props = __rest(_a, ["id", "initialSelectedDate", "initialSelectedDateRange", "onChange", "onChangeSelectedDateRange", "isRange", "width", "isAnnualEvent"]);
|
|
60
|
-
var defaultSelectedDate = new Date();
|
|
61
|
-
var _d = useState(initialSelectedDate || defaultSelectedDate), selectedDate = _d[0], setSelectedDate = _d[1];
|
|
62
|
-
var _e = useState(initialSelectedDateRange || [defaultSelectedDate, defaultSelectedDate]), selectedDateRange = _e[0], setSelectedDateRange = _e[1];
|
|
63
|
-
var _f = useState(false), isActiveDatepicker = _f[0], setIsActiveDatepicker = _f[1];
|
|
64
|
-
var startDate = selectedDateRange[0], endDate = selectedDateRange[1];
|
|
65
|
-
var inline = props.inline;
|
|
66
|
-
useEffect(function () {
|
|
67
|
-
if (initialSelectedDate) {
|
|
68
|
-
setSelectedDate(initialSelectedDate);
|
|
69
|
-
onChange(initialSelectedDate);
|
|
70
|
-
}
|
|
71
|
-
/* eslint-disable-next-line */
|
|
72
|
-
}, [initialSelectedDate]);
|
|
73
|
-
useEffect(function () {
|
|
74
|
-
var element = document.getElementById(id);
|
|
75
|
-
element === null || element === void 0 ? void 0 : element.setAttribute(READONLY_ATTRIBUTE, READONLY_ATTRIBUTE_VALUE);
|
|
76
|
-
}, [id]);
|
|
77
|
-
var handleChangeDate = function (date) {
|
|
78
|
-
if (date) {
|
|
79
|
-
setSelectedDate(date);
|
|
80
|
-
onChange(date);
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
var handleChangeDateRange = function (period) {
|
|
84
|
-
setSelectedDateRange(period);
|
|
85
|
-
onChangeSelectedDateRange === null || onChangeSelectedDateRange === void 0 ? void 0 : onChangeSelectedDateRange(period);
|
|
86
|
-
};
|
|
87
|
-
var handleDatePickerClick = function () { return setIsActiveDatepicker(!isActiveDatepicker); };
|
|
88
|
-
var handleClickArrowButton = function () {
|
|
89
|
-
var element = document.getElementById(id);
|
|
90
|
-
element === null || element === void 0 ? void 0 : element.focus();
|
|
91
|
-
};
|
|
92
|
-
var annualEventFormat = isAnnualEvent ? DAY_MONTH_YEAR : DATE_PICKER_FORMAT;
|
|
93
|
-
var annualCalendarFormat = isAnnualEvent ? MONTH_YEAR : MONTH;
|
|
94
|
-
return (_jsx("div", __assign({ className: "smartapp-calendar-component", style: { width: "".concat(width, "%") } }, { children: isRange ? (_jsx(DatePicker, __assign({ id: id, selectsRange: true, startDate: startDate, endDate: endDate, dateFormat: annualEventFormat, className: "smartapp-calendar-input", onChange: handleChangeDateRange }, props))) : (_jsxs(_Fragment, { children: [_jsx(DatePicker, __assign({ id: id, selected: selectedDate, dateFormat: annualEventFormat, dateFormatCalendar: annualCalendarFormat, className: "smartapp-calendar-input", popperClassName: "popper-shadow", onChange: handleChangeDate, onFocus: handleDatePickerClick, onBlur: handleDatePickerClick }, props)), !inline && (_jsx("button", __assign({ onClick: handleClickArrowButton, className: "smartapp-calendar-input__arrow" }, { children: isActiveDatepicker ? _jsx(ArrowUpIcon, {}) : _jsx(ArrowDownIcon, {}) })))] })) })));
|
|
95
|
-
};
|
|
96
|
-
export default CalendarDatepicker;
|
|
97
|
-
//# sourceMappingURL=Calendar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../../src/сomponents/Calendar/Calendar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,UAAU,EAAE,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACtC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,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KAAG,IAClD,CACV,IACA,CACJ,IACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Calendar';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactDatePickerProps } from 'react-datepicker';
|
|
2
|
-
import { IntRange } from '../types';
|
|
3
|
-
export type TDateRange = [Date | null, Date | null];
|
|
4
|
-
export interface ICalendarProps extends ReactDatePickerProps {
|
|
5
|
-
id: string;
|
|
6
|
-
onChange: (date: Date) => void;
|
|
7
|
-
isAnnualEvent?: boolean;
|
|
8
|
-
initialSelectedDate?: Date;
|
|
9
|
-
initialSelectedDateRange?: TDateRange;
|
|
10
|
-
isRange?: boolean;
|
|
11
|
-
onChangeSelectedDateRange?: (period: TDateRange) => void;
|
|
12
|
-
width?: IntRange<1, 101>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Calendar/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,46 +0,0 @@
|
|
|
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 { useRef } from 'react';
|
|
14
|
-
import ReactEcharts from 'echarts-for-react';
|
|
15
|
-
import classNames from 'classnames';
|
|
16
|
-
import ChartLegend from '../ChartLegend/ChartLegend';
|
|
17
|
-
import { useEvents } from '../useEvents';
|
|
18
|
-
import { generateBarItem, generateLegendItems, generateXAxis, renderChartTooltip } from '../helpers';
|
|
19
|
-
import { DEFAULT_CHART_HEIGHT, LEGEND, OPTION_GRID, OPTION_TOOLTIP, OPTION_Y_AXIS, OPTIONS, TEXT_STYLE } from '../constants';
|
|
20
|
-
import '../../../styles/styles.scss';
|
|
21
|
-
var series = OPTIONS.series, shadow = OPTIONS.shadow, bar = OPTIONS.bar;
|
|
22
|
-
var option = function (_a) {
|
|
23
|
-
var data = _a.data, xAxis = _a.xAxis, tooltipXAxis = _a.tooltipXAxis;
|
|
24
|
-
return ({
|
|
25
|
-
legend: LEGEND,
|
|
26
|
-
tooltip: __assign(__assign({}, OPTION_TOOLTIP), { axisPointer: { type: shadow }, formatter: function (params) { return renderChartTooltip({ chartType: bar, params: params, tooltipXAxis: tooltipXAxis }); } }),
|
|
27
|
-
textStyle: TEXT_STYLE,
|
|
28
|
-
grid: __assign(__assign({}, OPTION_GRID), { right: 0 }),
|
|
29
|
-
xAxis: generateXAxis(xAxis),
|
|
30
|
-
yAxis: OPTION_Y_AXIS,
|
|
31
|
-
series: generateBarItem(data),
|
|
32
|
-
emphasis: { focus: series },
|
|
33
|
-
barMaxWidth: 32,
|
|
34
|
-
barMinWidth: 15,
|
|
35
|
-
itemStyle: { borderRadius: [5, 5, 0, 0] },
|
|
36
|
-
barGap: '40%',
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
var ChartBar = function (_a) {
|
|
40
|
-
var _b = _a.chartHeight, chartHeight = _b === void 0 ? DEFAULT_CHART_HEIGHT.bar : _b, title = _a.title, xAxis = _a.xAxis, tooltipXAxis = _a.tooltipXAxis, data = _a.data, legendUnits = _a.legendUnits;
|
|
41
|
-
var chartRef = useRef(null);
|
|
42
|
-
var _c = useEvents({ chartType: bar, chartRef: chartRef }), highlight = _c.highlight, downplay = _c.downplay;
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx("p", __assign({ className: classNames('smartapp-chart__title', 'mb-24') }, { children: title })), _jsx(ReactEcharts, { ref: chartRef, option: option({ data: data, xAxis: xAxis, tooltipXAxis: tooltipXAxis }), style: { height: chartHeight }, onEvents: { highlight: highlight, downplay: downplay } }), _jsx(ChartLegend, { chartRef: chartRef, chartType: bar, legendItems: generateLegendItems(bar, chartRef), legendUnits: legendUnits })] }));
|
|
44
|
-
};
|
|
45
|
-
export default ChartBar;
|
|
46
|
-
//# sourceMappingURL=ChartBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartBar.js","sourceRoot":"","sources":["../../../../../src/сomponents/Charts/ChartBar/ChartBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,YAA+B,MAAM,mBAAmB,CAAA;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE5H,OAAO,6BAA6B,CAAA;AAE5B,IAAA,MAAM,GAAkB,OAAO,OAAzB,EAAE,MAAM,GAAU,OAAO,OAAjB,EAAE,GAAG,GAAK,OAAO,IAAZ,CAAY;AAEvC,IAAM,MAAM,GAAG,UAAC,EAA0C;QAAxC,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,YAAY,kBAAA;I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EACb,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,YAAY,cAAA,EAAE,CAAC,EAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAC9B,QAAQ,EAAE,EAAE,SAAS,WAAA,EAAE,QAAQ,UAAA,EAAE,GACjC,EACF,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,mBAAmB,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,WAAW,GAAI,IAC7H,CACJ,CAAA;AACH,CAAC,CAAA;AACD,eAAe,QAAQ,CAAA"}
|
|
@@ -1,71 +0,0 @@
|
|
|
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, useState } from 'react';
|
|
23
|
-
import classNames from 'classnames';
|
|
24
|
-
import { calculateValue, isBarChart, isLineChart, isPieChart } from '../helpers';
|
|
25
|
-
import { DISPATCH_ACTION_TYPES, NUMBER_FORMATTER } from '../constants';
|
|
26
|
-
import '../../../styles/styles.scss';
|
|
27
|
-
var ChartLegend = function (_a) {
|
|
28
|
-
var chartRef = _a.chartRef, chartType = _a.chartType, legendItems = _a.legendItems, legendUnits = _a.legendUnits;
|
|
29
|
-
var _b = useState([]), activeLegendItems = _b[0], setActiveLegendItems = _b[1];
|
|
30
|
-
var getChartInstance = function () { var _a; return (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance(); };
|
|
31
|
-
var generateLegendValue = function (value, data) {
|
|
32
|
-
if (data === void 0) { data = []; }
|
|
33
|
-
if (isBarChart(chartType))
|
|
34
|
-
return calculateValue(data);
|
|
35
|
-
if (isLineChart(chartType))
|
|
36
|
-
return NUMBER_FORMATTER.format(calculateValue(data));
|
|
37
|
-
return value;
|
|
38
|
-
};
|
|
39
|
-
var generateDispatchActionData = function (name, seriesIndex) { return (isPieChart(chartType) ? { name: name } : { seriesIndex: seriesIndex }); };
|
|
40
|
-
var handleLegendMouseEnter = function (name, seriesIndex) {
|
|
41
|
-
var chartInstance = getChartInstance();
|
|
42
|
-
chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.dispatchAction(__assign({ type: DISPATCH_ACTION_TYPES.highlight }, generateDispatchActionData(name, seriesIndex)));
|
|
43
|
-
};
|
|
44
|
-
var handleLegendMouseLeave = function (name, seriesIndex) {
|
|
45
|
-
var chartInstance = getChartInstance();
|
|
46
|
-
chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.dispatchAction(__assign({ type: DISPATCH_ACTION_TYPES.downplay }, generateDispatchActionData(name, seriesIndex)));
|
|
47
|
-
};
|
|
48
|
-
var handleLegendClick = function (name) {
|
|
49
|
-
var chartInstance = getChartInstance();
|
|
50
|
-
setActiveLegendItems(function (prevActiveLegendItems) {
|
|
51
|
-
return prevActiveLegendItems.includes(name)
|
|
52
|
-
? prevActiveLegendItems.filter(function (legendItemName) { return legendItemName !== name; })
|
|
53
|
-
: __spreadArray(__spreadArray([], prevActiveLegendItems, true), [name], false);
|
|
54
|
-
});
|
|
55
|
-
chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.dispatchAction({ type: DISPATCH_ACTION_TYPES.legendToggleSelect, name: name });
|
|
56
|
-
isPieChart(chartType) && (chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.dispatchAction({ type: DISPATCH_ACTION_TYPES.highlight, name: name }));
|
|
57
|
-
};
|
|
58
|
-
useEffect(function () {
|
|
59
|
-
legendItems && setActiveLegendItems(legendItems.map(function (_a) {
|
|
60
|
-
var name = _a.name;
|
|
61
|
-
return name;
|
|
62
|
-
}));
|
|
63
|
-
}, [legendItems]);
|
|
64
|
-
return (_jsx("div", __assign({ className: classNames('smartapp-chart__legend', "smartapp-chart__legend--".concat(chartType)) }, { children: legendItems.map(function (_a, index) {
|
|
65
|
-
var name = _a.name, value = _a.value, data = _a.data, color = _a.itemStyle.color;
|
|
66
|
-
var inactiveLegendItem = !activeLegendItems.includes(name);
|
|
67
|
-
return (_jsxs("div", __assign({ className: "smartapp-chart__legend--item", onClick: function () { return handleLegendClick(name); }, onMouseEnter: function () { return handleLegendMouseEnter(name, index); }, onMouseLeave: function () { return handleLegendMouseLeave(name, index); } }, { children: [_jsx("div", __assign({ className: classNames('smartapp-chart__legend--item__name', { 'smartapp-chart__legend--item__name--inactive': inactiveLegendItem }) }, { children: name })), _jsxs("div", __assign({ className: classNames('smartapp-chart__legend--item__value', { 'smartapp-chart__legend--item__value--inactive': inactiveLegendItem }), style: { color: color } }, { children: [generateLegendValue(value, data), legendUnits] }))] }), name));
|
|
68
|
-
}) })));
|
|
69
|
-
};
|
|
70
|
-
export default ChartLegend;
|
|
71
|
-
//# sourceMappingURL=ChartLegend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartLegend.js","sourceRoot":"","sources":["../../../../../src/сomponents/Charts/ChartLegend/ChartLegend.tsx"],"names":[],"mappings":";;;;;;;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AC1E,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;IAEjB,OAAO,CACL,uBAAK,SAAS,EAAE,UAAU,CAAC,wBAAwB,EAAE,kCAA2B,SAAS,CAAE,CAAC,gBACzF,WAAW,CAAC,GAAG,CAAC,UAAC,EAA2C,EAAE,KAAK;gBAAhD,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,IAAI,UAAA,EAAe,KAAK,qBAAA;YACvD,IAAM,kBAAkB,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;YAE5D,OAAO,CACL,wBAEE,SAAS,EAAC,8BAA8B,EACxC,OAAO,EAAE,cAAM,OAAA,iBAAiB,CAAC,IAAI,CAAC,EAAvB,CAAuB,EACtC,YAAY,EAAE,cAAM,OAAA,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAnC,CAAmC,EACvD,YAAY,EAAE,cAAM,OAAA,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAnC,CAAmC,iBAEvD,uBAAK,SAAS,EAAE,UAAU,CAAC,oCAAoC,EAAE,EAAE,8CAA8C,EAAE,kBAAkB,EAAE,CAAC,gBACrI,IAAI,IACD,EACN,wBACE,SAAS,EAAE,UAAU,CAAC,qCAAqC,EAAE,EAAE,+CAA+C,EAAE,kBAAkB,EAAE,CAAC,EACrI,KAAK,EAAE,EAAE,KAAK,OAAA,EAAE,iBAEf,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,EAChC,WAAW,KACR,MAfD,IAAI,CAgBL,CACP,CAAA;QACH,CAAC,CAAC,IACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
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 { useRef } from 'react';
|
|
14
|
-
import ReactEcharts from 'echarts-for-react';
|
|
15
|
-
import classNames from 'classnames';
|
|
16
|
-
import ChartLegend from '../ChartLegend/ChartLegend';
|
|
17
|
-
import { useEvents } from '../useEvents';
|
|
18
|
-
import { generateLegendItems, generateLineItem, generateXAxis, renderChartTooltip } from '../helpers';
|
|
19
|
-
import { DEFAULT_CHART_HEIGHT, LEGEND, NUMBER_FORMATTER, OPTION_GRID, OPTION_TOOLTIP, OPTION_Y_AXIS, OPTIONS, TEXT_STYLE } from '../constants';
|
|
20
|
-
import '../../../styles/styles.scss';
|
|
21
|
-
var line = OPTIONS.line;
|
|
22
|
-
var option = function (_a) {
|
|
23
|
-
var data = _a.data, xAxis = _a.xAxis, tooltipXAxis = _a.tooltipXAxis;
|
|
24
|
-
return ({
|
|
25
|
-
textStyle: TEXT_STYLE,
|
|
26
|
-
legend: LEGEND,
|
|
27
|
-
tooltip: __assign(__assign({}, OPTION_TOOLTIP), { formatter: function (params) { return renderChartTooltip({ chartType: line, params: params, tooltipXAxis: tooltipXAxis }); } }),
|
|
28
|
-
grid: __assign(__assign({}, OPTION_GRID), { right: '10px' }),
|
|
29
|
-
xAxis: __assign({ boundaryGap: false }, generateXAxis(xAxis)),
|
|
30
|
-
yAxis: __assign(__assign({}, OPTION_Y_AXIS), { axisLabel: __assign(__assign({}, OPTION_Y_AXIS.axisLabel), { formatter: function (value) { return NUMBER_FORMATTER.format(value); } }) }),
|
|
31
|
-
series: generateLineItem(data),
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var ChartLine = function (_a) {
|
|
35
|
-
var _b = _a.chartHeight, chartHeight = _b === void 0 ? DEFAULT_CHART_HEIGHT.line : _b, title = _a.title, xAxis = _a.xAxis, tooltipXAxis = _a.tooltipXAxis, data = _a.data, legendUnits = _a.legendUnits;
|
|
36
|
-
var chartRef = useRef(null);
|
|
37
|
-
var _c = useEvents({ chartRef: chartRef, chartType: line }), highlight = _c.highlight, downplay = _c.downplay;
|
|
38
|
-
return (_jsxs(_Fragment, { children: [_jsx("p", __assign({ className: classNames('smartapp-chart__title', 'mb-24') }, { children: title })), _jsx(ReactEcharts, { ref: chartRef, option: option({ data: data, xAxis: xAxis, tooltipXAxis: tooltipXAxis }), style: { height: chartHeight }, onEvents: { highlight: highlight, downplay: downplay } }), _jsx(ChartLegend, { chartRef: chartRef, chartType: line, legendItems: generateLegendItems(line, chartRef), legendUnits: legendUnits })] }));
|
|
39
|
-
};
|
|
40
|
-
export default ChartLine;
|
|
41
|
-
//# sourceMappingURL=ChartLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartLine.js","sourceRoot":"","sources":["../../../../../src/сomponents/Charts/ChartLine/ChartLine.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9I,OAAO,6BAA6B,CAAA;AAE5B,IAAA,IAAI,GAAK,OAAO,KAAZ,CAAY;AAExB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AAM,EAAE,MAAM,CAAC,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,YAAY,cAAA,EAAE,CAAC,EAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAC9B,QAAQ,EAAE,EAAE,SAAS,WAAA,EAAE,QAAQ,UAAA,EAAE,GACjC,EACF,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,WAAW,GAAI,IAC/H,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
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 { useRef } from 'react';
|
|
14
|
-
import ReactEcharts from 'echarts-for-react';
|
|
15
|
-
import ChartLegend from '../ChartLegend/ChartLegend';
|
|
16
|
-
import { usePieEvents } from '../usePieEvents';
|
|
17
|
-
import { calculatePieChartPadding, calculatePieValue, generateLegendItems, renderPieChartTooltip } from '../helpers';
|
|
18
|
-
import { CENTER_HORIZONTAL_POSITION, CENTER_VERTICAL_POSITION, DEFAULT_CHART_HEIGHT, INSIDE_RADIUS, LEGEND, OPTIONS, OUTSIDE_RADIUS, PIE_TOOLTIP_CLASS_NAME, TEXT_STYLE, } from '../constants';
|
|
19
|
-
import { COLORS } from '../../../constants';
|
|
20
|
-
import { TEXT_COLOR } from '../colors';
|
|
21
|
-
import '../../../styles/styles.scss';
|
|
22
|
-
var center = OPTIONS.center, pie = OPTIONS.pie;
|
|
23
|
-
var white = COLORS.white, black = COLORS.black, blue = COLORS.blue;
|
|
24
|
-
var option = function (_a) {
|
|
25
|
-
var chartSize = _a.chartSize, data = _a.data, subtitle = _a.subtitle;
|
|
26
|
-
return ({
|
|
27
|
-
legend: LEGEND,
|
|
28
|
-
tooltip: { className: PIE_TOOLTIP_CLASS_NAME, borderColor: blue, formatter: renderPieChartTooltip },
|
|
29
|
-
series: [
|
|
30
|
-
{
|
|
31
|
-
type: pie,
|
|
32
|
-
data: data.map(function (item) { return (__assign(__assign({}, item), { itemStyle: { color: item.color } })); }),
|
|
33
|
-
radius: [INSIDE_RADIUS, OUTSIDE_RADIUS],
|
|
34
|
-
center: [CENTER_HORIZONTAL_POSITION, CENTER_VERTICAL_POSITION],
|
|
35
|
-
itemStyle: { borderRadius: 8, borderColor: white, borderWidth: 6 },
|
|
36
|
-
label: { show: false },
|
|
37
|
-
labelLine: { show: false },
|
|
38
|
-
width: chartSize,
|
|
39
|
-
height: chartSize,
|
|
40
|
-
left: center,
|
|
41
|
-
emphasis: { scaleSize: 12.5 },
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
title: {
|
|
45
|
-
text: subtitle,
|
|
46
|
-
left: center,
|
|
47
|
-
top: '42.5%',
|
|
48
|
-
textStyle: { color: TEXT_COLOR, fontSize: 14, fontWeight: 400 },
|
|
49
|
-
subtext: calculatePieValue(data),
|
|
50
|
-
subtextStyle: { color: black, fontSize: 32, fontWeight: 700 },
|
|
51
|
-
itemGap: 10,
|
|
52
|
-
},
|
|
53
|
-
textStyle: TEXT_STYLE,
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
var ChartPie = function (_a) {
|
|
57
|
-
var _b = _a.chartSize, chartSize = _b === void 0 ? DEFAULT_CHART_HEIGHT.pie : _b, data = _a.data, title = _a.title, subtitle = _a.subtitle, legendUnits = _a.legendUnits;
|
|
58
|
-
var chartRef = useRef(null);
|
|
59
|
-
var _c = usePieEvents({ chartRef: chartRef, data: data }), legendselectchanged = _c.legendselectchanged, mouseover = _c.mouseover, mouseout = _c.mouseout;
|
|
60
|
-
return (_jsxs(_Fragment, { children: [_jsx("p", __assign({ className: "smartapp-chart__title" }, { children: title })), _jsx(ReactEcharts, { ref: chartRef, option: option({ chartSize: chartSize - calculatePieChartPadding(chartSize), data: data, subtitle: subtitle }), style: { height: chartSize }, onEvents: { mouseover: mouseover, mouseout: mouseout, highlight: mouseover, downplay: mouseout, legendselectchanged: legendselectchanged } }), _jsx(ChartLegend, { chartRef: chartRef, chartType: pie, legendItems: generateLegendItems(pie, chartRef), legendUnits: legendUnits })] }));
|
|
61
|
-
};
|
|
62
|
-
export default ChartPie;
|
|
63
|
-
//# sourceMappingURL=ChartPie.js.map
|