@expressms/smartapp-ui 2.9.17-alpha.4 → 3.0.0-alpha.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/build/main/assets/icons/arrow-down.svg +2 -2
- package/build/main/assets/icons/arrow-up.svg +2 -2
- package/build/main/assets/icons/attachment-loader.svg +2 -2
- package/build/main/assets/icons/avatar-arrow-down.svg +3 -0
- package/build/main/assets/icons/avatar-arrow-up.svg +3 -0
- package/build/main/assets/icons/{loader-medium.svg → avatar-loader.svg} +1 -1
- package/build/main/assets/icons/button-loader.svg +2 -2
- package/build/main/assets/icons/check-mark-square.svg +4 -0
- package/build/main/assets/icons/check-mark.svg +3 -3
- package/build/main/assets/icons/chip-info.svg +3 -1
- package/build/main/assets/icons/clear.svg +2 -2
- package/build/main/assets/icons/close-modal.svg +3 -0
- package/build/main/assets/icons/close.svg +2 -9
- package/build/main/assets/icons/contact-info.svg +3 -10
- package/build/main/assets/icons/corporate-user.svg +2 -9
- package/build/main/assets/icons/delete-chip.svg +2 -2
- package/build/main/assets/icons/doc-small.svg +11 -0
- package/build/main/assets/icons/doc.svg +11 -0
- package/build/main/assets/icons/eye-off.svg +4 -9
- 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 +10 -2
- package/build/main/assets/icons/global-address-book-user.svg +3 -9
- package/build/main/assets/icons/indeterminate-check-mark-square.svg +4 -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/magnifying-glass.svg +2 -2
- package/build/main/assets/icons/notification-close.svg +1 -1
- package/build/main/assets/icons/notification-failure.svg +2 -2
- package/build/main/assets/icons/notification-info.svg +4 -4
- package/build/main/assets/icons/notification-success.svg +3 -3
- 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/ppt-small.svg +11 -0
- package/build/main/assets/icons/ppt.svg +11 -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/warning-avatar.svg +1 -1
- 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 +2 -1
- package/build/main/assets/storybook/index.js +2 -1
- package/build/main/assets/storybook/index.js.map +1 -1
- package/build/main/constants/constants.d.ts +42 -23
- package/build/main/constants/constants.js +41 -23
- package/build/main/constants/constants.js.map +1 -1
- package/build/main/constants/types.d.ts +26 -0
- package/build/main/helpers/index.d.ts +13 -7
- package/build/main/helpers/index.js +69 -16
- package/build/main/helpers/index.js.map +1 -1
- package/build/main/hooks/useModal.d.ts +2 -1
- package/build/main/hooks/useModal.js +5 -8
- package/build/main/hooks/useModal.js.map +1 -1
- package/build/main/styles/styles.scss +2 -2
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +1 -1
- package/build/main//321/201omponents/ActionModal/ActionModal.js +13 -15
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -1
- package/build/main//321/201omponents/ActionModal/types.d.ts +2 -3
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +1 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +69 -33
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -1
- package/build/main//321/201omponents/AttachedFile/types.d.ts +3 -7
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +1 -1
- package/build/main//321/201omponents/Avatar/Avatar.js +24 -25
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
- package/build/main//321/201omponents/Avatar/types.d.ts +4 -4
- package/build/main//321/201omponents/Button/Button.d.ts +1 -1
- package/build/main//321/201omponents/Button/Button.js +13 -19
- package/build/main//321/201omponents/Button/Button.js.map +1 -1
- package/build/main//321/201omponents/Button/types.d.ts +7 -11
- package/build/main//321/201omponents/Button/types.js +1 -0
- package/build/main//321/201omponents/Button/types.js.map +1 -1
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +1 -1
- package/build/main//321/201omponents/Calendar/Calendar.js +13 -12
- package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -1
- package/build/main//321/201omponents/Calendar/types.d.ts +2 -1
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +1 -1
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +8 -7
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -1
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +1 -1
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +8 -7
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -1
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +1 -1
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +9 -8
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -1
- package/build/main//321/201omponents/Charts/constants.d.ts +0 -4
- package/build/main//321/201omponents/Charts/constants.js +1 -2
- package/build/main//321/201omponents/Charts/constants.js.map +1 -1
- package/build/main//321/201omponents/Charts/helpers.d.ts +2 -2
- package/build/main//321/201omponents/Charts/helpers.js +1 -1
- package/build/main//321/201omponents/Charts/helpers.js.map +1 -1
- package/build/main//321/201omponents/Charts/types.d.ts +3 -2
- package/build/main//321/201omponents/Charts/usePieEvents.js +1 -1
- package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -1
- package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +5 -1
- package/build/main//321/201omponents/Checkbox/Checkbox.js +24 -14
- package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -1
- package/build/main//321/201omponents/Checkbox/types.d.ts +2 -0
- package/build/main//321/201omponents/Chip/Chip.d.ts +1 -1
- package/build/main//321/201omponents/Chip/Chip.js +81 -25
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
- package/build/main//321/201omponents/Chip/types.d.ts +5 -2
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +19 -26
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -1
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +2 -2
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +1 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +3 -3
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
- package/build/main//321/201omponents/ContextMenu/types.d.ts +2 -2
- package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +25 -21
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +2 -2
- package/build/main//321/201omponents/CustomSelect/selectStyles.js +21 -18
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/types.d.ts +3 -4
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -1
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +3 -3
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -1
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +1 -1
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +5 -5
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -1
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +2 -2
- package/build/main//321/201omponents/Error/Error.d.ts +1 -1
- package/build/main//321/201omponents/Error/Error.js +3 -3
- package/build/main//321/201omponents/Error/Error.js.map +1 -1
- package/build/main//321/201omponents/Error/types.d.ts +2 -2
- package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +1 -1
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -1
- package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +1 -1
- package/build/main//321/201omponents/Header/Header.d.ts +1 -1
- package/build/main//321/201omponents/Header/Header.js +4 -4
- package/build/main//321/201omponents/Header/Header.js.map +1 -1
- package/build/main//321/201omponents/Header/types.d.ts +2 -2
- package/build/main//321/201omponents/Input/Input.d.ts +1 -1
- package/build/main//321/201omponents/Input/Input.js +68 -92
- package/build/main//321/201omponents/Input/Input.js.map +1 -1
- package/build/main//321/201omponents/Input/types.d.ts +6 -8
- package/build/main//321/201omponents/ListItem/ListItem.js +4 -4
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
- package/build/main//321/201omponents/ListItem/types.d.ts +2 -2
- package/build/main//321/201omponents/Loader/Loader.d.ts +1 -1
- package/build/main//321/201omponents/Loader/Loader.js +3 -3
- package/build/main//321/201omponents/Loader/Loader.js.map +1 -1
- package/build/main//321/201omponents/Loader/types.d.ts +2 -2
- package/build/main//321/201omponents/Modal/Modal.d.ts +1 -1
- package/build/main//321/201omponents/Modal/Modal.js +65 -56
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
- package/build/main//321/201omponents/Modal/types.d.ts +6 -7
- package/build/main//321/201omponents/Notification/Notification.d.ts +1 -1
- package/build/main//321/201omponents/Notification/Notification.js +51 -70
- package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
- package/build/main//321/201omponents/Notification/types.d.ts +3 -4
- package/build/main//321/201omponents/Profile/Profile.js +2 -2
- package/build/main//321/201omponents/Profile/Profile.js.map +1 -1
- package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +1 -1
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js +3 -3
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -1
- package/build/main//321/201omponents/ProgressBar/types.d.ts +2 -2
- package/build/main//321/201omponents/RadioButton/RadioButton.js +9 -13
- package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -1
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js +2 -2
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -1
- package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -1
- package/build/main//321/201omponents/Skeleton/types.d.ts +2 -2
- package/build/main//321/201omponents/Stories/Stories.js +15 -15
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
- package/build/main//321/201omponents/Stories/types.d.ts +2 -3
- package/build/main//321/201omponents/Switcher/Switcher.js +1 -1
- package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -1
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js +4 -4
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -1
- package/build/main//321/201omponents/SyncLoader/types.d.ts +2 -3
- package/build/main//321/201omponents/Textarea/Textarea.d.ts +1 -1
- package/build/main//321/201omponents/Textarea/Textarea.js +8 -48
- package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -1
- package/build/main//321/201omponents/Textarea/types.d.ts +2 -4
- package/build/main//321/201omponents/Toggle/Toggle.js +11 -14
- package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +5 -6
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +5 -7
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +8 -14
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +6 -10
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +2 -2
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +35 -50
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/helpers.js +1 -4
- package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +20 -36
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/types.d.ts +10 -4
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
- package/package.json +1 -2
- package/build/main/assets/icons/cancel-cross.svg +0 -3
- package/build/main/assets/icons/download.svg +0 -4
- package/build/main/assets/icons/eye.svg +0 -10
- package/build/main/assets/icons/notification-error.svg +0 -3
- package/build/main/assets/icons/notification-warning.svg +0 -5
|
@@ -21,17 +21,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { useEffect, useRef
|
|
24
|
+
import { useEffect, useRef } from 'react';
|
|
25
25
|
import classNames from 'classnames';
|
|
26
|
-
import { isEmpty
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
26
|
+
import { isEmpty } from 'lodash';
|
|
27
|
+
import { generateFontFamilyStyle } from '../../helpers';
|
|
28
|
+
import { MIN_TEXTAREA_HEIGHT } from '../../constants';
|
|
29
29
|
import '../../styles/styles.scss';
|
|
30
30
|
var Textarea = function (_a) {
|
|
31
|
-
var
|
|
31
|
+
var fontFamily = _a.fontFamily, _b = _a.isAdjustToTextHeight, isAdjustToTextHeight = _b === void 0 ? false : _b, title = _a.title, error = _a.error, containerClassName = _a.containerClassName, className = _a.className, containerStyles = _a.containerStyles, onChange = _a.onChange, props = __rest(_a, ["fontFamily", "isAdjustToTextHeight", "title", "error", "containerClassName", "className", "containerStyles", "onChange"]);
|
|
32
32
|
var textareaRef = useRef(null);
|
|
33
|
-
var _d = useState(maxCharacters || 0), remainingCharacters = _d[0], setRemainingCharacters = _d[1];
|
|
34
|
-
var _e = useState(null), timeoutId = _e[0], setTimeoutId = _e[1];
|
|
35
33
|
var handleInput = function () {
|
|
36
34
|
var textareaRefCurrent = textareaRef.current;
|
|
37
35
|
if (textareaRefCurrent && isAdjustToTextHeight) {
|
|
@@ -39,58 +37,20 @@ var Textarea = function (_a) {
|
|
|
39
37
|
textareaRefCurrent.style.height = "".concat(textareaRefCurrent.scrollHeight + 2, "px");
|
|
40
38
|
}
|
|
41
39
|
};
|
|
42
|
-
var isCounterVisible = function () {
|
|
43
|
-
if (isNil(maxCharacters)) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
// 30 percent of the maximum characters
|
|
47
|
-
var charactersToCompare = (maxCharacters * 30) / 100;
|
|
48
|
-
return remainingCharacters < charactersToCompare;
|
|
49
|
-
};
|
|
50
|
-
var handleSetTimeoutForCounter = function () {
|
|
51
|
-
var id = setTimeout(function () { return setTimeoutId(null); }, INPUT_COUNTER_TIMEOUT);
|
|
52
|
-
setTimeoutId(id);
|
|
53
|
-
};
|
|
54
|
-
var handleKeyDown = function () {
|
|
55
|
-
if (!remainingCharacters) {
|
|
56
|
-
!isNull(timeoutId) && clearTimeout(timeoutId);
|
|
57
|
-
handleSetTimeoutForCounter();
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
40
|
var handleChange = function (event) {
|
|
41
|
+
var value = event.target.value;
|
|
61
42
|
var textareaRefCurrent = textareaRef.current;
|
|
62
|
-
var valueLength =
|
|
43
|
+
var valueLength = value.length;
|
|
63
44
|
onChange(event);
|
|
64
45
|
if (textareaRefCurrent && textareaRefCurrent.selectionStart === valueLength) {
|
|
65
46
|
textareaRefCurrent.scrollTop = textareaRefCurrent.scrollHeight;
|
|
66
47
|
}
|
|
67
|
-
if (maxCharacters) {
|
|
68
|
-
var remainingCharacters_1 = maxCharacters - valueLength;
|
|
69
|
-
setRemainingCharacters(remainingCharacters_1);
|
|
70
|
-
if (!!remainingCharacters_1 && !isNull(timeoutId)) {
|
|
71
|
-
clearTimeout(timeoutId);
|
|
72
|
-
setTimeoutId(null);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
48
|
};
|
|
76
|
-
useEffect(function () {
|
|
77
|
-
if (!remainingCharacters) {
|
|
78
|
-
handleSetTimeoutForCounter();
|
|
79
|
-
}
|
|
80
|
-
}, [remainingCharacters]);
|
|
81
49
|
useEffect(function () {
|
|
82
50
|
isAdjustToTextHeight && handleInput();
|
|
83
51
|
// eslint-disable-next-line
|
|
84
52
|
}, [isAdjustToTextHeight]);
|
|
85
|
-
|
|
86
|
-
return isCounterVisible() && (_jsx("div", __assign({ className: classNames('smartapp-textarea__container--counter', {
|
|
87
|
-
'smartapp-textarea__container--counter__error': !isNull(timeoutId),
|
|
88
|
-
}) }, { children: remainingCharacters })));
|
|
89
|
-
};
|
|
90
|
-
return (_jsxs("div", __assign({ className: classNames('smartapp-textarea', containerClassName), style: 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', {
|
|
91
|
-
'smartapp-textarea__container--field__error': !isEmpty(error),
|
|
92
|
-
'smartapp-textarea__container--field__secondary-fill-type': isSecondaryFillType(fillType),
|
|
93
|
-
}, className), maxLength: maxCharacters, onKeyDown: handleKeyDown, onChange: handleChange, onInput: handleInput }, props)), renderCounter()] })), error && _jsx("div", __assign({ className: "smartapp-textarea__error" }, { children: error }))] })));
|
|
53
|
+
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 })), _jsx("div", __assign({ className: "smartapp-textarea__container" }, { children: _jsx("textarea", __assign({ ref: textareaRef, className: classNames('smartapp-textarea__container--field', { 'smartapp-textarea__container--field__error': !isEmpty(error) }, className), onChange: handleChange, onInput: handleInput }, props)) })), error && _jsx("div", __assign({ className: "smartapp-textarea__error" }, { children: error }))] })));
|
|
94
54
|
};
|
|
95
55
|
export default Textarea;
|
|
96
56
|
//# sourceMappingURL=Textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/сomponents/Textarea/Textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/сomponents/Textarea/Textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,0BAA0B,CAAA;AAEjC,IAAM,QAAQ,GAAG,UAAC,EAUD;IATf,IAAA,UAAU,gBAAA,EACV,4BAA4B,EAA5B,oBAAoB,mBAAG,KAAK,KAAA,EAC5B,KAAK,WAAA,EACL,KAAK,WAAA,EACL,kBAAkB,wBAAA,EAClB,SAAS,eAAA,EACT,eAAe,qBAAA,EACf,QAAQ,cAAA,EACL,KAAK,cATQ,0HAUjB,CADS;IAER,IAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAA;IAErD,IAAM,WAA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,IAAI,uBAAK,SAAS,EAAC,0BAA0B,gBAAE,KAAK,IAAO,KAC7D,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { ChangeEvent, TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface ITextareaProps extends
|
|
2
|
+
import { IFontFamilyProps, TStyles } from '../../constants';
|
|
3
|
+
export interface ITextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, IFontFamilyProps {
|
|
4
4
|
isAdjustToTextHeight?: boolean;
|
|
5
|
-
fillType?: 'primary' | 'secondary';
|
|
6
5
|
title?: string;
|
|
7
6
|
error?: string;
|
|
8
|
-
maxCharacters?: number;
|
|
9
7
|
containerClassName?: string;
|
|
10
8
|
containerStyles?: TStyles;
|
|
11
9
|
onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
@@ -12,27 +12,24 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect, useRef } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import { COLORS } from '../../constants';
|
|
16
15
|
import { generateColor } from '../../helpers';
|
|
16
|
+
import { COLORS, EVENT_LISTENER_TYPES } from '../../constants';
|
|
17
17
|
import '../../styles/styles.scss';
|
|
18
|
+
var DEFAULT_TOGGLE_ID = 'toggle';
|
|
19
|
+
var PRESSED_CLASS_NAME = 'smartapp-toggle-wrapper__pressed';
|
|
18
20
|
var Toggle = function (_a) {
|
|
19
|
-
var _b = _a.id, id = _b === void 0 ?
|
|
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;
|
|
20
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);
|
|
21
25
|
useEffect(function () {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
document.documentElement.style.setProperty('--toggle-pressed-color', generateColor(checkedPressedColor, COLORS.darkerBlue));
|
|
25
|
-
}, [checkedColor, checkedHoverColor, checkedPressedColor]);
|
|
26
|
-
useEffect(function () {
|
|
27
|
-
window.addEventListener('mouseup', handleMouseUp);
|
|
28
|
-
return function () {
|
|
29
|
-
window.removeEventListener('mouseup', handleMouseUp);
|
|
30
|
-
};
|
|
26
|
+
window.addEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp);
|
|
27
|
+
return function () { return window.removeEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp); };
|
|
31
28
|
}, []);
|
|
32
29
|
var handleClick = function () { return !isDisabled && onClick(); };
|
|
33
|
-
var handleMouseDown = function () { var _a; return (_a = toggleRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(
|
|
34
|
-
var handleMouseUp = function () { var _a; return (_a = toggleRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(
|
|
35
|
-
return (_jsx("div", __assign({ ref: toggleRef, className: classNames('smartapp-toggle-wrapper', className), style:
|
|
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 })] })) })));
|
|
36
33
|
};
|
|
37
34
|
export default Toggle;
|
|
38
35
|
//# sourceMappingURL=Toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../../src/сomponents/Toggle/Toggle.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,
|
|
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,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE9D,OAAO,0BAA0B,CAAA;AAEjC,IAAM,iBAAiB,GAAG,QAAQ,CAAA;AAClC,IAAM,kBAAkB,GAAG,kCAAkC,CAAA;AAE7D,IAAM,MAAM,GAAG,UAAC,EAUD;QATb,UAAsB,EAAtB,EAAE,mBAAG,iBAAiB,KAAA,EACtB,kBAAkB,EAAlB,UAAU,mBAAG,KAAK,KAAA,EAClB,iBAAiB,EAAjB,SAAS,mBAAG,KAAK,KAAA,EACjB,SAAS,eAAA,EACT,cAAW,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,YAAY,kBAAA,EACZ,iBAAiB,uBAAA,EACjB,mBAAmB,yBA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,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"}
|
package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IContactBottomSheet } from '../types';
|
|
2
2
|
import '../../../styles/styles.scss';
|
|
3
|
-
declare const ContactBottomSheet: ({ language, avatar, name, email, serverName, company, department, companyPosition }: IContactBottomSheet) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ContactBottomSheet: ({ fontFamily, language, avatar, name, email, serverName, company, department, companyPosition }: IContactBottomSheet) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ContactBottomSheet;
|
|
@@ -13,20 +13,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { useEffect } from 'react';
|
|
14
14
|
import Avatar from '../../Avatar';
|
|
15
15
|
import ContactInfo from '../ContactInfo/ContactInfo';
|
|
16
|
+
import { EVENT_LISTENER_TYPES } from '../../../constants';
|
|
16
17
|
import { AVATAR_SIZES } from '../../Avatar/types';
|
|
17
18
|
import { ReactComponent as CorporateUserIcon } from '../../../assets/icons/corporate-user.svg';
|
|
18
19
|
import '../../../styles/styles.scss';
|
|
19
20
|
var ContactBottomSheet = function (_a) {
|
|
20
|
-
var language = _a.language, avatar = _a.avatar, name = _a.name, email = _a.email, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition;
|
|
21
|
+
var fontFamily = _a.fontFamily, language = _a.language, avatar = _a.avatar, name = _a.name, email = _a.email, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition;
|
|
21
22
|
useEffect(function () {
|
|
22
23
|
var modalContent = document.querySelector('.smartapp-modal__content');
|
|
23
24
|
var handlePreventDefault = function (event) { return event.preventDefault(); };
|
|
24
|
-
modalContent === null || modalContent === void 0 ? void 0 : modalContent.addEventListener(
|
|
25
|
-
return function () {
|
|
26
|
-
modalContent === null || modalContent === void 0 ? void 0 : modalContent.removeEventListener('touchend', handlePreventDefault);
|
|
27
|
-
};
|
|
25
|
+
modalContent === null || modalContent === void 0 ? void 0 : modalContent.addEventListener(EVENT_LISTENER_TYPES.touchend, handlePreventDefault);
|
|
26
|
+
return function () { return modalContent === null || modalContent === void 0 ? void 0 : modalContent.removeEventListener(EVENT_LISTENER_TYPES.touchend, handlePreventDefault); };
|
|
28
27
|
}, []);
|
|
29
|
-
return (_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet" }, { children: [_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header" }, { children: [_jsx(Avatar, { username: name, avatar: avatar, size: AVATAR_SIZES.size_48 }), _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(ContactInfo, { language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition })] })));
|
|
28
|
+
return (_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet" }, { children: [_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, username: name, avatar: avatar, size: AVATAR_SIZES.size_48 }), _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(ContactInfo, { language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition })] })));
|
|
30
29
|
};
|
|
31
30
|
export default ContactBottomSheet;
|
|
32
31
|
//# sourceMappingURL=ContactBottomSheet.js.map
|
package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map
CHANGED
|
@@ -1 +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,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC9F,OAAO,6BAA6B,CAAA;AAEpC,IAAM,kBAAkB,GAAG,UAAC,
|
|
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,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC9F,OAAO,6BAA6B,CAAA;AAEpC,IAAM,kBAAkB,G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CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -13,17 +13,17 @@ var _a;
|
|
|
13
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import React, { useEffect, useRef, useState } from 'react';
|
|
15
15
|
import { components } from 'react-select';
|
|
16
|
-
import { FixedSizeList } from 'react-window';
|
|
17
16
|
import { AutoSizer } from 'react-virtualized';
|
|
17
|
+
import { FixedSizeList } from 'react-window';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import SearchInCatalogButton from '../SearchInCatalogButton/SearchInCatalogButton';
|
|
20
19
|
import LoadingMessage from '../LoadingMessage/LoadingMessage';
|
|
20
|
+
import SearchInCatalogButton from '../SearchInCatalogButton/SearchInCatalogButton';
|
|
21
21
|
import { LANGUAGES } from '../../../constants';
|
|
22
22
|
import '../../../styles/styles.scss';
|
|
23
23
|
var MIN_INPUT_SYMBOLS = 3;
|
|
24
24
|
var SKELETON_ROWS_COUNT = 3;
|
|
25
|
-
var MENU_ITEM_HEIGHT =
|
|
26
|
-
var MAX_MENU_HEIGHT =
|
|
25
|
+
var MENU_ITEM_HEIGHT = 47;
|
|
26
|
+
var MAX_MENU_HEIGHT = 220;
|
|
27
27
|
var LIST_OVER_SCAN_COUNT = 5;
|
|
28
28
|
var PADDING_SIZE = 12;
|
|
29
29
|
var BUTTON_SIZE = 48;
|
|
@@ -108,9 +108,7 @@ var MenuList = function (props) {
|
|
|
108
108
|
var index = _a.index, style = _a.style;
|
|
109
109
|
var isLastRow = index === childrenLength - 1;
|
|
110
110
|
var rowRef = isNextPageSkeletonsVisible ? lastElement : null;
|
|
111
|
-
return (_jsxs("div", __assign({ ref: rowRef, style: style, role: children[index] ? 'option' : '',
|
|
112
|
-
// добавляем класс для последнего элемента, чтобы скрыть разделитель
|
|
113
|
-
className: classNames({ 'smartapp-menu-list__item--last': isLastRow }) }, { children: [children[index], isLastRow && renderSkeletons()] }), index));
|
|
111
|
+
return (_jsxs("div", __assign({ ref: rowRef, style: style, role: children[index] ? 'option' : '' }, { children: [children[index], isLastRow && renderSkeletons()] }), index));
|
|
114
112
|
};
|
|
115
113
|
return (_jsx(components.MenuList, __assign({}, props, { children: _jsx(AutoSizer, __assign({ disableHeight: true }, { children: function (_a) {
|
|
116
114
|
var width = _a.width;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MenuList/MenuList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MenuList/MenuList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAA2B,MAAM,cAAc,CAAA;AACrE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,cAAc,MAAM,kCAAkC,CAAA;AAC7D,OAAO,qBAAqB,MAAM,gDAAgD,CAAA;AAClF,OAAO,EAAE,SAAS,EAAmB,MAAM,oBAAoB,CAAA;AAE/D,OAAO,6BAA6B,CAAA;AAEpC,IAAM,iBAAiB,GAAG,CAAC,CAAA;AAC3B,IAAM,mBAAmB,GAAG,CAAC,CAAA;AAC7B,IAAM,gBAAgB,GAAG,EAAE,CAAA;AAC3B,IAAM,eAAe,GAAG,GAAG,CAAA;AAC3B,IAAM,oBAAoB,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BAAqB,EAC1B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,oBAAoB,EACnC,QAAQ,EAAE,UAAC,EAAgB;oCAAd,YAAY,kBAAA;gCAAO,OAAA,CAAC,aAAa,CAAC,OAAO,GAAG,YAAY,CAAC;4BAAtC,CAAsC,EACtE,mBAAmB,EAAE,aAAa,CAAC,OAAO,EAC1C,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,CAAC,EAC7G,gBAAgB,EAAE,kBAAkB,gBAEnC,WAAW,IACE,EACf,yBAAyB,IAAI,CAC5B,KAAC,qBAAqB,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,8BAA8B,EAAE,8BAA8B,GAAI,CAC5H,KACG,CACP;YA1Be,CA0Bf,IACS,IACQ,CACvB,CAAA;AACH,CAAC,CAAA;AAED,IAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAsB,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,uBAAK,GAAG,EAAE,GAAG,IAAM,KAAK,IAAE,KAAK,eAAO,KAAK,CAAC,KAAK,KAAM,EAAvD,CAAuD,CAAC,CAAA;AAEzI,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA;AAErD,eAAe,QAAQ,CAAA"}
|
|
@@ -17,17 +17,17 @@ import classNames from 'classnames';
|
|
|
17
17
|
import { isEqual } from 'lodash';
|
|
18
18
|
import Avatar from '../../Avatar';
|
|
19
19
|
import Chip from '../../Chip';
|
|
20
|
-
import { generateAvatarIcon,
|
|
21
|
-
import {
|
|
20
|
+
import { generateAvatarIcon, generateFontFamilyStyle, isValueEqualToZero, renderUserIcon } from '../../../helpers';
|
|
21
|
+
import { COLORS } from '../../../constants';
|
|
22
22
|
import { AVATAR_SIZES } from '../../Avatar/types';
|
|
23
23
|
import '../../../styles/styles.scss';
|
|
24
24
|
var POPUP_APPEARANCE_DELAY = 1500;
|
|
25
25
|
var POPUP_HIDDEN_CLASSNAME = 'multi-value-info-hidden';
|
|
26
|
-
var POPUP_PADDINGS =
|
|
26
|
+
var POPUP_PADDINGS = 16;
|
|
27
27
|
var POPUP_MARGINS = 32;
|
|
28
28
|
var POPUP_MARGIN_TOP = 1;
|
|
29
29
|
var MultiValueLabel = function (props) {
|
|
30
|
-
var _a = props.data, value = _a.value, label = _a.label, name = _a.name, email = _a.email, uid = _a.uid, isResetChipsToInputValue = _a.isResetChipsToInputValue, avatar = _a.avatar, platform = _a.platform, contextMenuItems = _a.contextMenuItems, language = _a.language, userType = _a.userType, isMyContacts = _a.isMyContacts, isPrivateSchedule = _a.isPrivateSchedule, isNotRemovable = _a.isNotRemovable, isChipsCollapsable = _a.isChipsCollapsable, isSelectedChipHasTooltip = _a.isSelectedChipHasTooltip, isBusyAtSelectedTime = _a.isBusyAtSelectedTime, isLoading = _a.isLoading, isWarning = _a.isWarning, isInputFocused = _a.isInputFocused.current, collapsableChipsCount = _a.collapsableChipsCount.current, lastVisibleChipIndex = _a.lastVisibleChipIndex.current, transformCurrentChipToInputValue = props.transformCurrentChipToInputValue, _b = props.selectProps, isDisabled = _b.isDisabled, selectedUsers = _b.value, onChange = _b.onChange;
|
|
30
|
+
var _a = props.data, value = _a.value, label = _a.label, name = _a.name, email = _a.email, uid = _a.uid, isResetChipsToInputValue = _a.isResetChipsToInputValue, avatar = _a.avatar, platform = _a.platform, fontFamily = _a.fontFamily, contextMenuItems = _a.contextMenuItems, language = _a.language, userType = _a.userType, isMyContacts = _a.isMyContacts, isOrganizer = _a.isOrganizer, isPrivateSchedule = _a.isPrivateSchedule, isNotRemovable = _a.isNotRemovable, isChipsCollapsable = _a.isChipsCollapsable, isSelectedChipHasTooltip = _a.isSelectedChipHasTooltip, isBusyAtSelectedTime = _a.isBusyAtSelectedTime, isLoading = _a.isLoading, isWarning = _a.isWarning, isInputFocused = _a.isInputFocused.current, collapsableChipsCount = _a.collapsableChipsCount.current, lastVisibleChipIndex = _a.lastVisibleChipIndex.current, transformCurrentChipToInputValue = props.transformCurrentChipToInputValue, _b = props.selectProps, isDisabled = _b.isDisabled, selectedUsers = _b.value, onChange = _b.onChange, isChipsOutline = props.isChipsOutline;
|
|
31
31
|
var multiValueLabelRef = useRef(null);
|
|
32
32
|
var popupRef = useRef(null);
|
|
33
33
|
var popupContentRef = useRef(null);
|
|
@@ -81,7 +81,7 @@ var MultiValueLabel = function (props) {
|
|
|
81
81
|
setIsShowPopup(false);
|
|
82
82
|
(_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
83
83
|
};
|
|
84
|
-
var renderPopupContent = function () { return (_jsxs("div", __assign({ ref: popupContentRef, className: "smartapp-multi-value-label" }, { children: [_jsx(Avatar, { icon: generateAvatarIcon(userType), username: label, avatar: avatar, size: AVATAR_SIZES.size_32, isEye: isPrivateSchedule, outlineDefaultBackground:
|
|
84
|
+
var renderPopupContent = function () { return (_jsxs("div", __assign({ ref: popupContentRef, className: "smartapp-multi-value-label" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, icon: generateAvatarIcon(userType), username: label, avatar: avatar, size: AVATAR_SIZES.size_32, isEye: isPrivateSchedule, outlineDefaultBackground: COLORS.chip }), _jsxs("div", __assign({ className: "smartapp-multi-value-label__content" }, { children: [_jsxs("div", __assign({ className: "smartapp-multi-value-label__content--name" }, { children: [_jsx("div", __assign({ className: "smartapp-multi-value-label__content--name__icon" }, { children: renderUserIcon({ userType: userType, isMyContacts: isMyContacts }) })), _jsx("span", { children: name })] })), _jsx("div", __assign({ className: "smartapp-multi-value-label__content--email" }, { children: email }))] }))] }))); };
|
|
85
85
|
var handleOpenPopup = function () {
|
|
86
86
|
var popupRefCurrent = popupRef.current;
|
|
87
87
|
var popupContentRefCurrent = popupContentRef.current;
|
|
@@ -111,17 +111,11 @@ var MultiValueLabel = function (props) {
|
|
|
111
111
|
};
|
|
112
112
|
var handleClosePopup = function () { return timeoutId && clearTimeout(timeoutId); };
|
|
113
113
|
if (!isChipsCollapsable || isInputFocused || (!isInputFocused && userIndex < lastVisibleChipIndex) || noChipsCount) {
|
|
114
|
-
return (_jsx(components.MultiValueLabel, __assign({}, props, { innerProps: { ref: multiValueLabelRef } }, { children: _jsx(Popup, __assign({ ref: popupRef, onOpen: handleOpenPopup, onClose: handleClosePopup, arrow: false, open: isShowPopup, className: classNames('multi-value-info', hiddenClassName), contentStyle: {
|
|
115
|
-
'--multi-value-label-content-left': "".concat(left, "px"),
|
|
116
|
-
'--multi-value-label-content-top': "".concat(top, "px"),
|
|
117
|
-
'--multi-value-label-content-max-width': "".concat(popupContentMaxWidth, "px"),
|
|
118
|
-
}, trigger: function () { return (_jsx("div", __assign({ onMouseDown: handleMouseDown, onTouchEnd: handleTouchEnd, onContextMenu: handleContextMenu, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, { children: _jsx(Chip, { language: language, name: label, email: email, uid: uid, isOpenContextMenu: isOpenContextMenu, setIsOpenContextMenu: setIsOpenContextMenu, isMyContacts: isMyContacts, isWarning: isWarning, userType: userType, avatar: avatar, isLoading: isLoading, isError: isBusyAtSelectedTime, isDisabled: isDisabled || isNotRemovable, isEye: isPrivateSchedule, onDelete: handleDelete, contextMenuItems: contextMenuItems, platform: platform }) }))); } }, { children: renderPopupContent() })) })));
|
|
114
|
+
return (_jsx(components.MultiValueLabel, __assign({}, props, { innerProps: { ref: multiValueLabelRef } }, { children: _jsx(Popup, __assign({ ref: popupRef, onOpen: handleOpenPopup, onClose: handleClosePopup, arrow: false, open: isShowPopup, className: classNames('multi-value-info', hiddenClassName), contentStyle: __assign({ '--multi-value-label-content-left': "".concat(left, "px"), '--multi-value-label-content-top': "".concat(top, "px"), '--multi-value-label-content-max-width': "".concat(popupContentMaxWidth, "px") }, generateFontFamilyStyle(fontFamily)), trigger: function () { return (_jsx("div", __assign({ onMouseDown: handleMouseDown, onTouchEnd: handleTouchEnd, onContextMenu: handleContextMenu, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, { children: _jsx(Chip, { fontFamily: fontFamily, language: language, name: label, email: email, uid: uid, isOpenContextMenu: isOpenContextMenu, setIsOpenContextMenu: setIsOpenContextMenu, isMyContacts: isMyContacts, isOrganizerShort: isOrganizer, isWarning: isWarning, userType: userType, avatar: avatar, isLoading: isLoading, isError: isBusyAtSelectedTime, isDisabled: isDisabled || isNotRemovable, isEye: isPrivateSchedule, isOutline: isChipsOutline, onDelete: handleDelete, contextMenuItems: contextMenuItems, platform: platform }) }))); } }, { children: renderPopupContent() })) })));
|
|
119
115
|
}
|
|
120
116
|
if (isChipsCollapsable && !isInputFocused && userIndex === lastVisibleChipIndex && !noChipsCount) {
|
|
121
|
-
return (_jsxs("div", __assign({ className:
|
|
122
|
-
|
|
123
|
-
delimiter: '__',
|
|
124
|
-
additionalClassName: platform,
|
|
117
|
+
return (_jsxs("div", __assign({ className: classNames('multi-value-label-counter', "multi-value-label-counter__".concat(platform), {
|
|
118
|
+
'multi-value-label-counter__outline': isChipsOutline,
|
|
125
119
|
}), onTouchEnd: handleTouchEnd }, { children: ["+", collapsableChipsCount] })));
|
|
126
120
|
}
|
|
127
121
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiValueLabel.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MultiValueLabel/MultiValueLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"MultiValueLabel.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MultiValueLabel/MultiValueLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAClH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,6BAA6B,CAAA;AAEpC,IAAM,sBAAsB,GAAG,IAAI,CAAA;AACnC,IAAM,sBAAsB,GAAG,yBAAyB,CAAA;AACxD,IAAM,cAAc,GAAG,EAAE,CAAA;AACzB,IAAM,aAAa,GAAG,EAAE,CAAA;AACxB,IAAM,gBAAgB,GAAG,CAAC,CAAA;AAE1B,IAAM,eAAe,GAAG,UAAC,KAAU;IAE/B,IAAA,KA6BE,KAAK,KAJN,EAxBC,KAAK,WAAA,EACL,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,GAAG,SAAA,EACH,wBAAwB,8BAAA,EACxB,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,gBAAgB,sBAAA,EAChB,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,WAAW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AY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,WAAW,EAC7B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,oBAAoB,EAC7B,UAAU,EAAE,UAAU,IAAI,cAAc,EACxC,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,GAClB,IACE,CACP,EA/Bc,CA+Bd,gBAEA,kBAAkB,EAAE,IACf,IACmB,CAC9B,CAAA;KACF;IAED,IAAI,kBAAkB,IAAI,CAAC,cAAc,IAAI,SAAS,KAAK,oBAAoB,IAAI,CAAC,YAAY,EAAE;QAChG,OAAO,CACL,wBACE,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,qCAA8B,QAAQ,CAAE,EAAE;gBAC3F,oCAAoC,EAAE,cAAc;aACrD,CAAC,EACF,UAAU,EAAE,cAAc,sBAExB,qBAAqB,KACnB,CACP,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -11,15 +11,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect, useRef, useState } from 'react';
|
|
14
|
-
import Popup from 'reactjs-popup';
|
|
15
14
|
import { components } from 'react-select';
|
|
15
|
+
import Popup from 'reactjs-popup';
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import Avatar from '../../Avatar';
|
|
18
18
|
import ContactInfo from '../ContactInfo/ContactInfo';
|
|
19
|
-
import { generateAvatarIcon, isMobilePlatform, isWebPlatform, renderUserIcon } from '../../../helpers';
|
|
20
|
-
import { ReactComponent as ContactInfoIcon } from '../../../assets/icons/contact-info.svg';
|
|
19
|
+
import { generateAvatarIcon, generateFontFamilyStyle, isMobilePlatform, isWebPlatform, renderUserIcon } from '../../../helpers';
|
|
21
20
|
import { POPUP_ON_EVENT_TYPE, POPUP_VERTICAL_POSITION } from '../../../constants';
|
|
22
21
|
import { AVATAR_SIZES } from '../../Avatar/types';
|
|
22
|
+
import { ReactComponent as ContactInfoIcon } from '../../../assets/icons/contact-info.svg';
|
|
23
23
|
import '../../../styles/styles.scss';
|
|
24
24
|
var POPUP_APPEARANCE_DELAY = 1000;
|
|
25
25
|
var PADDING_LEFT = 8;
|
|
@@ -29,7 +29,7 @@ var EMPTY_SPACE = 8;
|
|
|
29
29
|
var POPUP_HIDDEN_CLASSNAME = 'contact-info-hidden';
|
|
30
30
|
var Option = function (props) {
|
|
31
31
|
var _a;
|
|
32
|
-
var _b = props.data, label = _b.label, avatar = _b.avatar, email = _b.email, serverName = _b.serverName, company = _b.company, department = _b.department, companyPosition = _b.companyPosition, isMyContacts = _b.isMyContacts, userType = _b.userType, platform = _b.platform, language = _b.language, setIsSearchable = _b.setIsSearchable, setModalData = _b.setModalData;
|
|
32
|
+
var _b = props.data, label = _b.label, avatar = _b.avatar, email = _b.email, serverName = _b.serverName, company = _b.company, department = _b.department, companyPosition = _b.companyPosition, isMyContacts = _b.isMyContacts, userType = _b.userType, platform = _b.platform, language = _b.language, fontFamily = _b.fontFamily, setIsSearchable = _b.setIsSearchable, setModalData = _b.setModalData;
|
|
33
33
|
var ref = useRef(null);
|
|
34
34
|
var contactInfoRef = useRef(null);
|
|
35
35
|
var popupRef = useRef(null);
|
|
@@ -71,14 +71,10 @@ var Option = function (props) {
|
|
|
71
71
|
setLeft(clientRectLeft);
|
|
72
72
|
setMaxWidth(clientRectWidth);
|
|
73
73
|
}, [clientRectLeft, clientRectWidth]);
|
|
74
|
-
var renderContactInfoPopup = function () { return (_jsx(Popup, __assign({ ref: popupRef, onOpen: calculatePopupVerticalPosition, onClose: handleClosePopup, className: classNames('contact-info', hiddenClassName), position: "".concat(popupVerticalPosition, " center"), contentStyle: {
|
|
75
|
-
'--contact-info-content-margin-top': "".concat(popupMarginTop, "px"),
|
|
76
|
-
'--contact-info-content-left': "".concat(left, "px"),
|
|
77
|
-
'--contact-info-content-max-width': "".concat(maxWidth, "px"),
|
|
78
|
-
}, on: [POPUP_ON_EVENT_TYPE.hover], mouseEnterDelay: POPUP_APPEARANCE_DELAY, trigger: function () { return (_jsx("div", { children: _jsx(Avatar, { icon: generateAvatarIcon(userType), username: label, avatar: avatar, size: AVATAR_SIZES.size_32 }) })); } }, { children: _jsx(ContactInfo, { elementRef: contactInfoRef, language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition }) }))); };
|
|
74
|
+
var renderContactInfoPopup = function () { return (_jsx(Popup, __assign({ arrow: false, ref: popupRef, onOpen: calculatePopupVerticalPosition, onClose: handleClosePopup, className: classNames('contact-info', hiddenClassName), position: "".concat(popupVerticalPosition, " center"), contentStyle: __assign({ '--contact-info-content-margin-top': "".concat(popupMarginTop, "px"), '--contact-info-content-left': "".concat(left, "px"), '--contact-info-content-max-width': "".concat(maxWidth, "px") }, generateFontFamilyStyle(fontFamily)), on: [POPUP_ON_EVENT_TYPE.hover], mouseEnterDelay: POPUP_APPEARANCE_DELAY, trigger: function () { return (_jsx("div", { children: _jsx(Avatar, { fontFamily: fontFamily, icon: generateAvatarIcon(userType), username: label, avatar: avatar, size: AVATAR_SIZES.size_32 }) })); } }, { children: _jsx(ContactInfo, { elementRef: contactInfoRef, language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition }) }))); };
|
|
79
75
|
return (_jsx(components.Option, __assign({}, props, { innerRef: function (el) {
|
|
80
76
|
ref.current = el;
|
|
81
|
-
} }, { children: _jsxs("div", __assign({ className: "smartapp-option" }, { children: [!isMyContacts && isWebPlatform(platform) ? (renderContactInfoPopup()) : (_jsx(Avatar, { username: label, avatar: avatar, size: AVATAR_SIZES.size_32 })), _jsxs("div", __assign({ className: "smartapp-option__container" }, { children: [_jsxs("div", __assign({ className: "smartapp-option__container--info" }, { children: [_jsxs("div", __assign({ className: "smartapp-option__container--info__name" }, { children: [renderUserIcon(userType, isMyContacts), _jsx("div", { children: label })] })), _jsx("div", __assign({ className: "smartapp-option__container--info__email" }, { children: email }))] })), renderContactInfoIcon()] }))] })) })));
|
|
77
|
+
} }, { children: _jsxs("div", __assign({ className: "smartapp-option" }, { children: [!isMyContacts && isWebPlatform(platform) ? (renderContactInfoPopup()) : (_jsx(Avatar, { fontFamily: fontFamily, username: label, avatar: avatar, size: AVATAR_SIZES.size_32 })), _jsxs("div", __assign({ className: "smartapp-option__container" }, { children: [_jsxs("div", __assign({ className: "smartapp-option__container--info" }, { children: [_jsxs("div", __assign({ className: "smartapp-option__container--info__name" }, { children: [renderUserIcon({ userType: userType, isMyContacts: isMyContacts }), _jsx("div", { children: label })] })), _jsx("div", __assign({ className: "smartapp-option__container--info__email" }, { children: email }))] })), renderContactInfoIcon()] }))] })) })));
|
|
82
78
|
};
|
|
83
79
|
export default Option;
|
|
84
80
|
//# sourceMappingURL=Option.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/Option/Option.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/Option/Option.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,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AY,cAAA,EAAE,CAAC,EAC3C,wBAAM,KAAK,GAAO,KACd,EACN,uBAAK,SAAS,EAAC,yCAAyC,gBAAE,KAAK,IAAO,KAClE,EACL,qBAAqB,EAAE,KACpB,KACF,IACY,CACrB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js
CHANGED
|
@@ -16,8 +16,8 @@ import { LANGUAGES } from '../../../constants';
|
|
|
16
16
|
import { ReactComponent as SearchIcon } from './../../../assets/icons/search.svg';
|
|
17
17
|
import '../../../styles/styles.scss';
|
|
18
18
|
var BUTTON_SIZE = 48;
|
|
19
|
-
var NO_OPTIONS_BUTTON_SIZE =
|
|
20
|
-
var SINGLE_BUTTON_SIZE =
|
|
19
|
+
var NO_OPTIONS_BUTTON_SIZE = 18;
|
|
20
|
+
var SINGLE_BUTTON_SIZE = 18;
|
|
21
21
|
var SEARCH_BUTTON_TEXT = (_a = {},
|
|
22
22
|
_a[LANGUAGES.ru] = 'Поиск в каталоге',
|
|
23
23
|
_a[LANGUAGES.en] = 'Search in catalog',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IUserDropdownProps } from './types';
|
|
2
2
|
import '../../styles/styles.scss';
|
|
3
3
|
export declare const EMAIL_FIELD = "email";
|
|
4
|
-
declare const UserDropdown: ({ platform, isDisabled, isLoading, isChipsVisible, isChipsCollapsable, isSelectedChipHasTooltip, isMenuCloseOnSelect, isFilteringDisabled, hasNextPage, isNextPageLoading, isInputHidden, isBackspaceChipToInput, isShowCatalogSearchButton, isDisabledMenuOffsetAtFullscreen, language, layoutType, externalInputValue, title, mask, placeholder, hint, onShowCatalogSearchButtonClick, noOptionsMessage, maxMembersCount,
|
|
4
|
+
declare const UserDropdown: ({ platform, fontFamily, isDisabled, isLoading, isChipsOutline, isChipsVisible, isChipsCollapsable, isSelectedChipHasTooltip, isMenuCloseOnSelect, isFilteringDisabled, hasNextPage, isNextPageLoading, isInputHidden, isBackspaceChipToInput, isShowCatalogSearchButton, isDisabledMenuOffsetAtFullscreen, language, layoutType, externalInputValue, title, mask, placeholder, hint, onShowCatalogSearchButtonClick, noOptionsMessage, maxMembersCount, menuPosition, autoFocus, containerClassName, containerStyles, selectedEntries, corporateEntries, myContactsEntries, emailsToExclude, onInputChange, onChange, onMenuOpen, onMenuClose, onLoadNextPage, }: IUserDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default UserDropdown;
|