@expressms/smartapp-ui 2.1.4 → 2.1.6
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/attachment-loader.svg +3 -0
- package/build/main/assets/icons/cancel-cross.svg +2 -2
- package/build/main/assets/icons/clear.svg +2 -9
- package/build/main/assets/icons/contact-info.svg +12 -0
- package/build/main/assets/icons/corporate-user.svg +10 -0
- package/build/main/assets/icons/crown.svg +1 -3
- package/build/main/assets/icons/delete-chip.svg +2 -9
- package/build/main/assets/icons/external-link.svg +2 -2
- package/build/main/assets/icons/my-contact-user.svg +10 -0
- package/build/main/assets/icons/trust-user.svg +10 -0
- package/build/main/assets/storybook/index.d.ts +2 -0
- package/build/main/assets/storybook/index.js +3 -0
- package/build/main/assets/storybook/index.js.map +1 -0
- package/build/main/constants/constants.d.ts +5 -2
- package/build/main/constants/constants.js +4 -1
- package/build/main/constants/constants.js.map +1 -1
- package/build/main/constants/types.d.ts +5 -0
- package/build/main/helpers/index.d.ts +3 -3
- package/build/main/helpers/index.js +3 -2
- package/build/main/helpers/index.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 +5 -5
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -1
- package/build/main//321/201omponents/ActionModal/types.d.ts +2 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +5 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +39 -6
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -1
- package/build/main//321/201omponents/AttachedFile/types.d.ts +10 -5
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +1 -1
- package/build/main//321/201omponents/Avatar/Avatar.js +10 -10
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
- package/build/main//321/201omponents/Avatar/types.d.ts +4 -2
- package/build/main//321/201omponents/Avatar/types.js.map +1 -1
- package/build/main//321/201omponents/Button/Button.d.ts +1 -1
- package/build/main//321/201omponents/Button/Button.js +2 -2
- package/build/main//321/201omponents/Button/Button.js.map +1 -1
- package/build/main//321/201omponents/Button/types.d.ts +2 -0
- package/build/main//321/201omponents/Button/types.js.map +1 -1
- package/build/main//321/201omponents/Chip/Chip.d.ts +1 -1
- package/build/main//321/201omponents/Chip/Chip.js +10 -4
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
- package/build/main//321/201omponents/Chip/types.d.ts +1 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +5 -5
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -1
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +1 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +1 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +3 -2
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -1
- package/build/main//321/201omponents/DragAndDrop/types.d.ts +5 -0
- package/build/main//321/201omponents/Modal/Modal.d.ts +1 -1
- package/build/main//321/201omponents/Modal/Modal.js +5 -5
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
- package/build/main//321/201omponents/Modal/types.d.ts +2 -1
- package/build/main//321/201omponents/Stories/Stories.js +5 -2
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
- package/build/main//321/201omponents/Textarea/Textarea.js +1 -1
- package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +24 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +31 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/GroupHeading/GroupHeading.d.ts +2 -0
- package/build/main//321/201omponents/UserDropdown/GroupHeading/GroupHeading.js +20 -0
- package/build/main//321/201omponents/UserDropdown/GroupHeading/GroupHeading.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +23 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +2 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +22 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +3 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +63 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +199 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/colors.d.ts +19 -0
- package/build/main//321/201omponents/UserDropdown/colors.js +20 -0
- package/build/main//321/201omponents/UserDropdown/colors.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +45 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js +49 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
- package/build/main//321/201omponents/UserDropdown/index.js +2 -0
- package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +17 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +62 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/types.d.ts +130 -0
- package/build/main//321/201omponents/UserDropdown/types.js +2 -0
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
- package/build/main//321/201omponents/index.d.ts +1 -0
- package/build/main//321/201omponents/index.js +1 -0
- package/build/main//321/201omponents/index.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,199 @@
|
|
|
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, useRef, useState } from 'react';
|
|
23
|
+
import Select from 'react-select';
|
|
24
|
+
import { debounce, isNil, isNull, uniqBy, flatten, isEmpty } from 'lodash';
|
|
25
|
+
import classNames from 'classnames';
|
|
26
|
+
import LoadingMessage from './LoadingMessage/LoadingMessage';
|
|
27
|
+
import MultiValueLabel from './MultiValueLabel/MultiValueLabel';
|
|
28
|
+
import GroupHeading from './GroupHeading/GroupHeading';
|
|
29
|
+
import Option from './Option/Option';
|
|
30
|
+
import { IndicatorSeparator, DropdownIndicator, LoadingIndicator, MultiValueRemove, generateCorporateOptionsToSelect, generateContactsOptionsToSelect, generateCorporateOption, generateContactsOption, } from './helpers';
|
|
31
|
+
import { getClassNames } from '../../helpers';
|
|
32
|
+
import { DEFAULT_INPUT_PADDING, ENTER_KEY, INPUT_BORDER_TYPE, INPUT_COUNTER_TIMEOUT, MASK_INPUT_PL, PLATFORM, THEME } from '../../constants';
|
|
33
|
+
import selectStyles from './selectStyles';
|
|
34
|
+
import '../../styles/styles.scss';
|
|
35
|
+
var MIN_INPUT_SYMBOLS = 3;
|
|
36
|
+
var GROUP_MY_CONTACTS = 'Мои контакты';
|
|
37
|
+
var EMAIL_FIELD = 'email';
|
|
38
|
+
var UserDropdown = function (_a) {
|
|
39
|
+
var _b = _a.theme, theme = _b === void 0 ? THEME.default : _b, _c = _a.platform, platform = _c === void 0 ? PLATFORM.web : _c, _d = _a.isFullScreen, isFullScreen = _d === void 0 ? false : _d, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isMenuCloseOnSelect, isMenuCloseOnSelect = _g === void 0 ? true : _g, title = _a.title, mask = _a.mask, placeholder = _a.placeholder, hint = _a.hint, noOptionsMessage = _a.noOptionsMessage, maxMembersCount = _a.maxMembersCount, _h = _a.borderType, borderType = _h === void 0 ? INPUT_BORDER_TYPE.intense : _h, _j = _a.selectedEntries, selectedEntries = _j === void 0 ? [] : _j, corporateEntries = _a.corporateEntries, myContactsEntries = _a.myContactsEntries, onInputChange = _a.onInputChange, onChange = _a.onChange, onMenuClose = _a.onMenuClose;
|
|
40
|
+
var _k = useState([]), selectedUsers = _k[0], setSelectedUsers = _k[1];
|
|
41
|
+
var _l = useState(null), timeoutId = _l[0], setTimeoutId = _l[1];
|
|
42
|
+
var _m = useState(''), paddingLeft = _m[0], setPaddingLeft = _m[1];
|
|
43
|
+
var _o = useState(false), isError = _o[0], setIsError = _o[1];
|
|
44
|
+
var selectRef = useRef(null);
|
|
45
|
+
var maskRef = useRef(null);
|
|
46
|
+
var generatePaddingLeft = function () {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
var maskWidth = ((_b = (_a = maskRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) || null;
|
|
49
|
+
return "".concat(maskWidth ? maskWidth + MASK_INPUT_PL : DEFAULT_INPUT_PADDING, "px");
|
|
50
|
+
};
|
|
51
|
+
var generateStyles = function () {
|
|
52
|
+
return selectStyles({
|
|
53
|
+
isLoading: isLoading,
|
|
54
|
+
isFullScreen: isFullScreen,
|
|
55
|
+
isMaxMembersAdded: maxMembersCount ? selectedUsers.length === maxMembersCount : false,
|
|
56
|
+
isDisabled: isDisabled,
|
|
57
|
+
isError: isError,
|
|
58
|
+
lastRowNumber: Math.ceil(selectedUsers.length / 2) + 1,
|
|
59
|
+
paddingLeft: paddingLeft,
|
|
60
|
+
borderType: borderType,
|
|
61
|
+
theme: theme,
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var generateNoOptionsMessage = function (_a) {
|
|
65
|
+
var inputValue = _a.inputValue;
|
|
66
|
+
return inputValue.length >= MIN_INPUT_SYMBOLS && !isNull(corporateEntries) && !isNull(myContactsEntries) ? noOptionsMessage : null;
|
|
67
|
+
};
|
|
68
|
+
var generateOptions = function () { return [
|
|
69
|
+
{
|
|
70
|
+
options: __spreadArray(__spreadArray([], generateCorporateOptionsToSelect({ options: (corporateEntries === null || corporateEntries === void 0 ? void 0 : corporateEntries.corpPhonebookEntries) || [], theme: theme, platform: platform }), true), generateCorporateOptionsToSelect({ options: (corporateEntries === null || corporateEntries === void 0 ? void 0 : corporateEntries.trustSearchEntries) || [], theme: theme, platform: platform, isTrustUser: true }), true),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: GROUP_MY_CONTACTS,
|
|
74
|
+
options: __spreadArray([], generateContactsOptionsToSelect({ options: myContactsEntries || [], theme: theme }), true),
|
|
75
|
+
},
|
|
76
|
+
]; };
|
|
77
|
+
var handleSetTimeoutForCounter = function () {
|
|
78
|
+
var id = setTimeout(function () { return setTimeoutId(null); }, INPUT_COUNTER_TIMEOUT);
|
|
79
|
+
setTimeoutId(id);
|
|
80
|
+
};
|
|
81
|
+
var requestDebounce = debounce(function (inputValue) {
|
|
82
|
+
onInputChange(inputValue);
|
|
83
|
+
}, 300);
|
|
84
|
+
var handleResetError = function () { return isError && setIsError(false); };
|
|
85
|
+
var handleMenuClose = function () {
|
|
86
|
+
handleResetError();
|
|
87
|
+
onMenuClose && onMenuClose();
|
|
88
|
+
};
|
|
89
|
+
var handleInputChange = function (inputValue) {
|
|
90
|
+
handleResetError();
|
|
91
|
+
if (inputValue.length >= MIN_INPUT_SYMBOLS) {
|
|
92
|
+
requestDebounce(inputValue);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var handleKeyDown = function (event) {
|
|
96
|
+
if (event.code === ENTER_KEY) {
|
|
97
|
+
var selectRefCurrent = selectRef.current;
|
|
98
|
+
var _a = selectRefCurrent.props, selectOptions = _a.options, inputValue = _a.inputValue, onChange_1 = _a.onChange, onInputChange_1 = _a.onInputChange;
|
|
99
|
+
var trimInputValue_1 = inputValue.trim();
|
|
100
|
+
var regex = new RegExp(/^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/);
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
if (regex.test(trimInputValue_1)) {
|
|
103
|
+
var isUserAlreadySelected = selectedUsers.find(function (_a) {
|
|
104
|
+
var email = _a.email;
|
|
105
|
+
return email === trimInputValue_1;
|
|
106
|
+
});
|
|
107
|
+
var options = flatten(selectOptions.map(function (_a) {
|
|
108
|
+
var options = _a.options;
|
|
109
|
+
return options;
|
|
110
|
+
}));
|
|
111
|
+
var existingUser = options.find(function (_a) {
|
|
112
|
+
var email = _a.email;
|
|
113
|
+
return email === trimInputValue_1;
|
|
114
|
+
});
|
|
115
|
+
onChange_1(__spreadArray(__spreadArray([], selectedUsers, true), [
|
|
116
|
+
existingUser || { value: trimInputValue_1, label: trimInputValue_1, email: trimInputValue_1, isEnteredByUser: true, theme: theme },
|
|
117
|
+
], false));
|
|
118
|
+
isUserAlreadySelected ? setIsError(true) : onInputChange_1('');
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
setIsError(true);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
var handleChange = function (newSelectedUsers) {
|
|
126
|
+
var uniqNewSelectedUsers = uniqBy(newSelectedUsers, EMAIL_FIELD);
|
|
127
|
+
var users = [];
|
|
128
|
+
uniqNewSelectedUsers.forEach(function (_a) {
|
|
129
|
+
var value = _a.value, isMyContacts = _a.isMyContacts, isEnteredByUser = _a.isEnteredByUser;
|
|
130
|
+
if (isEnteredByUser) {
|
|
131
|
+
users.push({ email: value });
|
|
132
|
+
}
|
|
133
|
+
else if (isMyContacts) {
|
|
134
|
+
var foundUser = myContactsEntries === null || myContactsEntries === void 0 ? void 0 : myContactsEntries.find(function (_a) {
|
|
135
|
+
var email = _a.email;
|
|
136
|
+
return value === email;
|
|
137
|
+
});
|
|
138
|
+
foundUser && users.push(foundUser);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
var foundUser = __spreadArray(__spreadArray([], ((corporateEntries === null || corporateEntries === void 0 ? void 0 : corporateEntries.corpPhonebookEntries) || []), true), ((corporateEntries === null || corporateEntries === void 0 ? void 0 : corporateEntries.trustSearchEntries) || []), true).find(function (_a) {
|
|
142
|
+
var contacts = _a.contacts;
|
|
143
|
+
return value === contacts[0].userHuid;
|
|
144
|
+
});
|
|
145
|
+
foundUser && users.push(foundUser);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
onChange(users);
|
|
149
|
+
setSelectedUsers(uniqNewSelectedUsers);
|
|
150
|
+
if (maxMembersCount) {
|
|
151
|
+
var isMaxUsersAdded = uniqNewSelectedUsers.length === maxMembersCount;
|
|
152
|
+
var remainingUsers = maxMembersCount - uniqNewSelectedUsers.length;
|
|
153
|
+
if (isMaxUsersAdded) {
|
|
154
|
+
!isNull(timeoutId) && clearTimeout(timeoutId);
|
|
155
|
+
handleSetTimeoutForCounter();
|
|
156
|
+
}
|
|
157
|
+
if (remainingUsers && !isNull(timeoutId)) {
|
|
158
|
+
clearTimeout(timeoutId);
|
|
159
|
+
setTimeoutId(null);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
var handleFilterOption = function (_a, inputValue) {
|
|
164
|
+
var _b = _a.data, label = _b.label, optionEmail = _b.email;
|
|
165
|
+
var isUserAlreadySelected = selectedUsers.find(function (_a) {
|
|
166
|
+
var email = _a.email;
|
|
167
|
+
return email === optionEmail;
|
|
168
|
+
});
|
|
169
|
+
var isContainsInputValue = label.toLowerCase().includes(inputValue.toLowerCase()) || optionEmail.toLowerCase().includes(inputValue.toLowerCase());
|
|
170
|
+
return !isEmpty(selectedUsers) ? !isUserAlreadySelected && isContainsInputValue : isContainsInputValue;
|
|
171
|
+
};
|
|
172
|
+
var renderCounter = function () {
|
|
173
|
+
return !isNil(maxMembersCount) && (_jsx("div", __assign({ className: classNames('smartapp-user-dropdown__title--counter', { 'smartapp-user-dropdown__title--counter__error': !isNull(timeoutId) }) }, { children: "".concat(selectedUsers.length, "/").concat(maxMembersCount) })));
|
|
174
|
+
};
|
|
175
|
+
var renderTitle = function () {
|
|
176
|
+
return title && (_jsxs("div", __assign({ className: "smartapp-user-dropdown__title" }, { children: [_jsx("p", __assign({ className: "smartapp-user-dropdown__title--text" }, { children: title })), renderCounter()] })));
|
|
177
|
+
};
|
|
178
|
+
var renderMask = function () {
|
|
179
|
+
return mask && (_jsx("div", __assign({ ref: maskRef, className: "smartapp-user-dropdown__container--mask" }, { children: mask })));
|
|
180
|
+
};
|
|
181
|
+
var renderHint = function () { return hint && _jsx("div", __assign({ className: "smartapp-user-dropdown__hint" }, { children: hint })); };
|
|
182
|
+
useEffect(function () {
|
|
183
|
+
setPaddingLeft(generatePaddingLeft());
|
|
184
|
+
}, [mask]);
|
|
185
|
+
useEffect(function () {
|
|
186
|
+
setSelectedUsers(function (prevSelectedUsers) { return prevSelectedUsers.map(function (selectedUser) { return (__assign(__assign({}, selectedUser), { theme: theme })); }); });
|
|
187
|
+
}, [theme]);
|
|
188
|
+
useEffect(function () {
|
|
189
|
+
if (!isEmpty(selectedEntries)) {
|
|
190
|
+
setSelectedUsers(selectedEntries.map(function (entity) {
|
|
191
|
+
return 'contacts' in entity ? generateCorporateOption({ option: entity, theme: theme }) : generateContactsOption({ option: entity, theme: theme });
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
// eslint-disable-next-line
|
|
195
|
+
}, [selectedEntries]);
|
|
196
|
+
return (_jsxs("div", __assign({ className: getClassNames({ className: 'smartapp-user-dropdown', delimiter: '__', additionalClassName: theme }) }, { children: [renderTitle(), _jsxs("div", __assign({ className: "smartapp-user-dropdown__container" }, { children: [renderMask(), _jsx(Select, { ref: selectRef, isMulti: true, isDisabled: isDisabled, closeMenuOnSelect: isMenuCloseOnSelect, isLoading: isLoading, isClearable: false, styles: generateStyles(), placeholder: placeholder || '', noOptionsMessage: generateNoOptionsMessage, loadingMessage: function () { return _jsx(LoadingMessage, { theme: theme }); }, value: selectedUsers, options: !isNull(corporateEntries) || !isNull(myContactsEntries) ? generateOptions() : undefined, filterOption: handleFilterOption, onInputChange: handleInputChange, onChange: handleChange, onMenuClose: handleMenuClose, onKeyDown: handleKeyDown, components: { MultiValueLabel: MultiValueLabel, MultiValueRemove: MultiValueRemove, GroupHeading: GroupHeading, Option: Option, IndicatorSeparator: IndicatorSeparator, DropdownIndicator: DropdownIndicator, LoadingIndicator: LoadingIndicator } })] })), renderHint()] })));
|
|
197
|
+
};
|
|
198
|
+
export default UserDropdown;
|
|
199
|
+
//# sourceMappingURL=UserDropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserDropdown.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/UserDropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,MAAsB,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAC1E,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,eAAe,MAAM,mCAAmC,CAAA;AAC/D,OAAO,YAAY,MAAM,6BAA6B,CAAA;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAU5I,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,0BAA0B,CAAA;AAEjC,IAAM,iBAAiB,GAAG,CAAC,CAAA;AAC3B,IAAM,iBAAiB,GAAG,cAAc,CAAA;AACxC,IAAM,WAAW,GAAG,OAAO,CAAA;AA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EACxB,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,gBAAgB,EAAE,wBAAwB,EAC1C,cAAc,EAAE,cAAM,OAAA,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,EAAhC,CAAgC,EACtD,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS,EAChG,YAAY,EAAE,kBAAkB,EAChC,aAAa,EAAE,iBAAiB,EAChC,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE,gBAAgB,kBAAA,EAAE,YAAY,cAAA,EAAE,MAAM,QAAA,EAAE,kBAAkB,oBAAA,EAAE,iBAAiB,mBAAA,EAAE,gBAAgB,kBAAA,EAAE,GAChI,KACE,EACL,UAAU,EAAE,KACT,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const blueColor = "rgba(71, 153, 227, 1)";
|
|
2
|
+
export declare const lighterGrayColor = "rgba(241, 241, 242, 1)";
|
|
3
|
+
export declare const lightGrayColor = "rgba(17, 17, 17, 0.3)";
|
|
4
|
+
export declare const grayColor = "rgba(183, 183, 183, 1)";
|
|
5
|
+
export declare const darkGrayColor = "rgba(158, 158, 158, 1)";
|
|
6
|
+
export declare const lighterBlackColor = "rgba(86, 86, 86, 1)";
|
|
7
|
+
export declare const lightBlackColor = "rgba(49, 49, 49, 1)";
|
|
8
|
+
export declare const blackColor = "rgba(26, 26, 26, 1)";
|
|
9
|
+
export declare const whiteBackgroundColor = "rgba(255, 255, 255, 1)";
|
|
10
|
+
export declare const grayBackgroundColor = "rgba(249, 249, 249, 1)";
|
|
11
|
+
export declare const darkGrayBackgroundColor = "rgba(0, 0, 0, 0.04)";
|
|
12
|
+
export declare const darkerGrayBackgroundColor = "rgba(0, 0, 0, 0.3)";
|
|
13
|
+
export declare const lighterBlackBackgroundColor = "rgba(66, 66, 66, 1)";
|
|
14
|
+
export declare const lightBlackBackgroundColor = "rgba(61, 61, 61, 1)";
|
|
15
|
+
export declare const blackBackgroundColor = "rgba(36, 36, 36, 1)";
|
|
16
|
+
export declare const intenseBorderColor = "rgba(217, 217, 217, 1)";
|
|
17
|
+
export declare const hoverBorderColor = "rgba(128, 128, 128, 1)";
|
|
18
|
+
export declare const redBorderColor = "rgba(237, 71, 71, 1)";
|
|
19
|
+
export declare const boxShadowColor = "rgba(0, 0, 0, 0.25)";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var blueColor = 'rgba(71, 153, 227, 1)';
|
|
2
|
+
export var lighterGrayColor = 'rgba(241, 241, 242, 1)';
|
|
3
|
+
export var lightGrayColor = 'rgba(17, 17, 17, 0.3)';
|
|
4
|
+
export var grayColor = 'rgba(183, 183, 183, 1)';
|
|
5
|
+
export var darkGrayColor = 'rgba(158, 158, 158, 1)';
|
|
6
|
+
export var lighterBlackColor = 'rgba(86, 86, 86, 1)';
|
|
7
|
+
export var lightBlackColor = 'rgba(49, 49, 49, 1)';
|
|
8
|
+
export var blackColor = 'rgba(26, 26, 26, 1)';
|
|
9
|
+
export var whiteBackgroundColor = 'rgba(255, 255, 255, 1)';
|
|
10
|
+
export var grayBackgroundColor = 'rgba(249, 249, 249, 1)';
|
|
11
|
+
export var darkGrayBackgroundColor = 'rgba(0, 0, 0, 0.04)';
|
|
12
|
+
export var darkerGrayBackgroundColor = 'rgba(0, 0, 0, 0.3)';
|
|
13
|
+
export var lighterBlackBackgroundColor = 'rgba(66, 66, 66, 1)';
|
|
14
|
+
export var lightBlackBackgroundColor = 'rgba(61, 61, 61, 1)';
|
|
15
|
+
export var blackBackgroundColor = 'rgba(36, 36, 36, 1)';
|
|
16
|
+
export var intenseBorderColor = 'rgba(217, 217, 217, 1)';
|
|
17
|
+
export var hoverBorderColor = 'rgba(128, 128, 128, 1)';
|
|
18
|
+
export var redBorderColor = 'rgba(237, 71, 71, 1)';
|
|
19
|
+
export var boxShadowColor = 'rgba(0, 0, 0, 0.25)';
|
|
20
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,SAAS,GAAG,uBAAuB,CAAA;AAChD,MAAM,CAAC,IAAM,gBAAgB,GAAG,wBAAwB,CAAA;AACxD,MAAM,CAAC,IAAM,cAAc,GAAG,uBAAuB,CAAA;AACrD,MAAM,CAAC,IAAM,SAAS,GAAG,wBAAwB,CAAA;AACjD,MAAM,CAAC,IAAM,aAAa,GAAG,wBAAwB,CAAA;AACrD,MAAM,CAAC,IAAM,iBAAiB,GAAG,qBAAqB,CAAA;AACtD,MAAM,CAAC,IAAM,eAAe,GAAG,qBAAqB,CAAA;AACpD,MAAM,CAAC,IAAM,UAAU,GAAG,qBAAqB,CAAA;AAE/C,MAAM,CAAC,IAAM,oBAAoB,GAAG,wBAAwB,CAAA;AAC5D,MAAM,CAAC,IAAM,mBAAmB,GAAG,wBAAwB,CAAA;AAC3D,MAAM,CAAC,IAAM,uBAAuB,GAAG,qBAAqB,CAAA;AAC5D,MAAM,CAAC,IAAM,yBAAyB,GAAG,oBAAoB,CAAA;AAC7D,MAAM,CAAC,IAAM,2BAA2B,GAAG,qBAAqB,CAAA;AAChE,MAAM,CAAC,IAAM,yBAAyB,GAAG,qBAAqB,CAAA;AAC9D,MAAM,CAAC,IAAM,oBAAoB,GAAG,qBAAqB,CAAA;AAEzD,MAAM,CAAC,IAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAC1D,MAAM,CAAC,IAAM,gBAAgB,GAAG,wBAAwB,CAAA;AACxD,MAAM,CAAC,IAAM,cAAc,GAAG,sBAAsB,CAAA;AAEpD,MAAM,CAAC,IAAM,cAAc,GAAG,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TGenerateContactsOption, TGenerateContactsOptionsToSelect, TGenerateCorporateOption, TGenerateCorporateOptionsToSelect } from './types';
|
|
2
|
+
export declare const generateCorporateOption: ({ option: { name, avatar, email, contacts, serverName, company, department, companyPosition }, theme, }: TGenerateCorporateOption) => {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
avatar: string | null;
|
|
6
|
+
email: string;
|
|
7
|
+
serverName: string | null;
|
|
8
|
+
company: string | null;
|
|
9
|
+
department: string | null;
|
|
10
|
+
companyPosition: string | null;
|
|
11
|
+
theme: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const generateCorporateOptionsToSelect: ({ options, theme, platform, isTrustUser }: TGenerateCorporateOptionsToSelect) => {
|
|
14
|
+
isTrustUser: boolean | undefined;
|
|
15
|
+
platform: string;
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
avatar: string | null;
|
|
19
|
+
email: string;
|
|
20
|
+
serverName: string | null;
|
|
21
|
+
company: string | null;
|
|
22
|
+
department: string | null;
|
|
23
|
+
companyPosition: string | null;
|
|
24
|
+
theme: string;
|
|
25
|
+
}[];
|
|
26
|
+
export declare const generateContactsOption: ({ option: { name, avatar, email }, theme }: TGenerateContactsOption) => {
|
|
27
|
+
value: string;
|
|
28
|
+
label: string;
|
|
29
|
+
avatar: string | null;
|
|
30
|
+
email: string;
|
|
31
|
+
isMyContacts: boolean;
|
|
32
|
+
theme: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const generateContactsOptionsToSelect: ({ options, theme }: TGenerateContactsOptionsToSelect) => {
|
|
35
|
+
value: string;
|
|
36
|
+
label: string;
|
|
37
|
+
avatar: string | null;
|
|
38
|
+
email: string;
|
|
39
|
+
isMyContacts: boolean;
|
|
40
|
+
theme: string;
|
|
41
|
+
}[];
|
|
42
|
+
export declare const IndicatorSeparator: () => null;
|
|
43
|
+
export declare const DropdownIndicator: () => null;
|
|
44
|
+
export declare const MultiValueRemove: () => null;
|
|
45
|
+
export declare const LoadingIndicator: () => null;
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
export var generateCorporateOption = function (_a) {
|
|
13
|
+
var _b = _a.option, name = _b.name, avatar = _b.avatar, email = _b.email, contacts = _b.contacts, serverName = _b.serverName, company = _b.company, department = _b.department, companyPosition = _b.companyPosition, theme = _a.theme;
|
|
14
|
+
return ({
|
|
15
|
+
value: contacts[0].userHuid,
|
|
16
|
+
label: name,
|
|
17
|
+
avatar: avatar,
|
|
18
|
+
email: email || contacts[0].contact,
|
|
19
|
+
serverName: serverName,
|
|
20
|
+
company: company,
|
|
21
|
+
department: department,
|
|
22
|
+
companyPosition: companyPosition,
|
|
23
|
+
theme: theme,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export var generateCorporateOptionsToSelect = function (_a) {
|
|
27
|
+
var options = _a.options, theme = _a.theme, platform = _a.platform, isTrustUser = _a.isTrustUser;
|
|
28
|
+
return options.map(function (option) { return (__assign(__assign({}, generateCorporateOption({ option: option, theme: theme })), { isTrustUser: isTrustUser, platform: platform })); });
|
|
29
|
+
};
|
|
30
|
+
export var generateContactsOption = function (_a) {
|
|
31
|
+
var _b = _a.option, name = _b.name, avatar = _b.avatar, email = _b.email, theme = _a.theme;
|
|
32
|
+
return ({
|
|
33
|
+
value: email,
|
|
34
|
+
label: name || email,
|
|
35
|
+
avatar: avatar,
|
|
36
|
+
email: email,
|
|
37
|
+
isMyContacts: true,
|
|
38
|
+
theme: theme,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export var generateContactsOptionsToSelect = function (_a) {
|
|
42
|
+
var options = _a.options, theme = _a.theme;
|
|
43
|
+
return options.map(function (option) { return generateContactsOption({ option: option, theme: theme }); });
|
|
44
|
+
};
|
|
45
|
+
export var IndicatorSeparator = function () { return null; };
|
|
46
|
+
export var DropdownIndicator = function () { return null; };
|
|
47
|
+
export var MultiValueRemove = function () { return null; };
|
|
48
|
+
export var LoadingIndicator = function () { return null; };
|
|
49
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,EAGb;QAFzB,cAA2F,EAAjF,IAAI,UAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,UAAU,gBAAA,EAAE,OAAO,aAAA,EAAE,UAAU,gBAAA,EAAE,eAAe,qBAAA,EACzF,KAAK,WAAA;IACyB,OAAA,CAAC;QAC/B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;QAC3B,KAAK,EAAE,IAAI;QACX,MAAM,QAAA;QACN,KAAK,EAAE,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;QACnC,UAAU,YAAA;QACV,OAAO,SAAA;QACP,UAAU,YAAA;QACV,eAAe,iBAAA;QACf,KAAK,OAAA;KACN,CAAC;AAV8B,CAU9B,CAAA;AAEF,MAAM,CAAC,IAAM,gCAAgC,GAAG,UAAC,EAA4E;QAA1E,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,WAAW,iBAAA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ponents/UserDropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TSelectStyles } from './types';
|
|
2
|
+
declare const _default: ({ isLoading, isFullScreen, isMaxMembersAdded, isDisabled, isError, lastRowNumber, paddingLeft, borderType, theme, }: TSelectStyles) => {
|
|
3
|
+
control: (provided: any, { menuIsOpen }: any) => any;
|
|
4
|
+
menu: (provided: any) => any;
|
|
5
|
+
group: (provided: any) => any;
|
|
6
|
+
groupHeading: (provided: any) => any;
|
|
7
|
+
menuList: (provided: any) => any;
|
|
8
|
+
valueContainer: (provided: any, { hasValue }: any) => any;
|
|
9
|
+
placeholder: (provided: any) => any;
|
|
10
|
+
input: (provided: any) => any;
|
|
11
|
+
multiValue: (provided: any) => any;
|
|
12
|
+
multiValueLabel: (provided: any) => any;
|
|
13
|
+
noOptionsMessage: (provided: any) => any;
|
|
14
|
+
loadingMessage: (provided: any) => any;
|
|
15
|
+
option: (provided: any) => any;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { isDarkTheme } from '../../helpers';
|
|
13
|
+
import { INPUT_BORDER_TYPE } from '../../constants';
|
|
14
|
+
import * as colors from './colors';
|
|
15
|
+
// eslint-disable-next-line import/no-anonymous-default-export
|
|
16
|
+
export default (function (_a) {
|
|
17
|
+
var isLoading = _a.isLoading, isFullScreen = _a.isFullScreen, isMaxMembersAdded = _a.isMaxMembersAdded, isDisabled = _a.isDisabled, isError = _a.isError, lastRowNumber = _a.lastRowNumber, paddingLeft = _a.paddingLeft, borderType = _a.borderType, theme = _a.theme;
|
|
18
|
+
return ({
|
|
19
|
+
control: function (provided, _a) {
|
|
20
|
+
var menuIsOpen = _a.menuIsOpen;
|
|
21
|
+
var intenseBorderColor = isDarkTheme(theme) ? colors.lighterBlackColor : colors.intenseBorderColor;
|
|
22
|
+
var paleBorderColor = isDarkTheme(theme) ? colors.lightBlackColor : colors.lighterGrayColor;
|
|
23
|
+
var grayBorderColor = borderType === INPUT_BORDER_TYPE.intense ? intenseBorderColor : paleBorderColor;
|
|
24
|
+
var borderColor = menuIsOpen ? colors.blueColor : grayBorderColor;
|
|
25
|
+
var hoverGrayBorderColor = isDarkTheme(theme) ? colors.hoverBorderColor : colors.grayColor;
|
|
26
|
+
var hoverBorderColor = menuIsOpen ? colors.blueColor : hoverGrayBorderColor;
|
|
27
|
+
var background = isDarkTheme(theme) ? colors.blackBackgroundColor : colors.whiteBackgroundColor;
|
|
28
|
+
var disabledBackground = isDarkTheme(theme) ? colors.lightBlackBackgroundColor : colors.lighterGrayColor;
|
|
29
|
+
return __assign(__assign({}, provided), { background: isDisabled ? disabledBackground : background, borderRadius: '8px', borderColor: isError ? colors.redBorderColor : isDisabled ? disabledBackground : borderColor, boxShadow: 'none', cursor: 'pointer', '&:hover': {
|
|
30
|
+
borderColor: isError ? colors.redBorderColor : hoverBorderColor,
|
|
31
|
+
} });
|
|
32
|
+
},
|
|
33
|
+
menu: function (provided) { return (__assign(__assign({}, provided), { width: isFullScreen ? '384px' : '100%', left: isFullScreen ? '55px' : 0, borderRadius: '4px', boxShadow: isDarkTheme(theme) ? "0 4px 17px 0 ".concat(colors.boxShadowColor) : "0 2px 4px 0 ".concat(colors.boxShadowColor), margin: '4px 0' })); },
|
|
34
|
+
group: function (provided) { return (__assign(__assign({}, provided), { padding: 0, '& > div:last-child > div:last-child': {
|
|
35
|
+
'.smartapp-option__container': {
|
|
36
|
+
borderBottom: 'none',
|
|
37
|
+
},
|
|
38
|
+
} })); },
|
|
39
|
+
groupHeading: function (provided) { return (__assign(__assign({}, provided), { fontSize: '12px', fontWeight: 600, lineHeight: '16px', color: isDarkTheme(theme) ? colors.darkGrayColor : colors.darkGrayColor, background: isDarkTheme(theme) ? colors.lighterBlackBackgroundColor : colors.grayBackgroundColor, textTransform: 'unset', padding: '8px 16px', margin: 0 })); },
|
|
40
|
+
menuList: function (provided) { return (__assign(__assign({}, provided), { maxHeight: isLoading ? 'fit-content' : '356px', background: isDarkTheme(theme) ? colors.lightBlackColor : colors.whiteBackgroundColor, borderRadius: '4px', padding: 0 })); },
|
|
41
|
+
valueContainer: function (provided, _a) {
|
|
42
|
+
var hasValue = _a.hasValue;
|
|
43
|
+
var padding = lastRowNumber === 1 ? "12px 16px 12px ".concat(paddingLeft) : "8px 16px 8px ".concat(paddingLeft);
|
|
44
|
+
return hasValue ? __assign(__assign({}, provided), { display: 'flex', gap: '8px', padding: padding }) : __assign(__assign({}, provided), { padding: padding });
|
|
45
|
+
},
|
|
46
|
+
placeholder: function (provided) { return (__assign(__assign({}, provided), { fontFamily: "Open Sans, 'sans-serif'", fontSize: '14px', fontWeight: '400', lineHeight: '19px', color: isDarkTheme(theme) ? colors.lighterBlackColor : colors.grayColor, margin: 0 })); },
|
|
47
|
+
input: function (provided) { return (__assign(__assign({}, provided), { display: isMaxMembersAdded || isDisabled ? 'none' : 'grid', fontSize: '14px', fontWeight: '400', lineHeight: '19px', color: isDarkTheme(theme) ? colors.grayBackgroundColor : colors.blackColor, caretColor: colors.blueColor, padding: 0, margin: 0, overflow: 'auto' })); },
|
|
48
|
+
multiValue: function (provided) { return (__assign(__assign({}, provided), { width: isFullScreen ? 'auto' : 'calc(50% - 4px)', background: 'unset', borderRadius: '20px', margin: 0 })); },
|
|
49
|
+
multiValueLabel: function (provided) { return (__assign(__assign({}, provided), { width: '100%', padding: '0 !important', '.smartapp-chip': {
|
|
50
|
+
maxWidth: '100%',
|
|
51
|
+
} })); },
|
|
52
|
+
noOptionsMessage: function (provided) { return (__assign(__assign({}, provided), { fontSize: '12px', fontWeight: 400, color: isDarkTheme(theme) ? colors.grayColor : colors.lightGrayColor, padding: '8px 16px' })); },
|
|
53
|
+
loadingMessage: function (provided) { return (__assign(__assign({}, provided), { padding: 0 })); },
|
|
54
|
+
option: function (provided) { return (__assign(__assign({}, provided), { background: isDarkTheme(theme) ? colors.lightBlackColor : colors.whiteBackgroundColor, padding: '0 0 0 16px', cursor: 'pointer', '&:hover': {
|
|
55
|
+
background: isDarkTheme(theme) ? colors.lightBlackBackgroundColor : colors.darkGrayBackgroundColor,
|
|
56
|
+
'.smartapp-option__container': {
|
|
57
|
+
borderBottomColor: 'transparent',
|
|
58
|
+
},
|
|
59
|
+
} })); },
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=selectStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectStyles.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/selectStyles.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,8DAA8D;AAC9D,gBAAe,UAAC,EAUA;QATd,SAAS,eAAA,EACT,YAAY,kBAAA,EACZ,iBAAiB,uBAAA,EACjB,UAAU,gBAAA,EACV,OAAO,aAAA,EACP,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,UAAU,gBAAA,EACV,KAAK,WAAA;IACc,OAAA,CAAC;QACpB,OAAO,EAAE,UAAC,QAAa,EAAE,EAAmB;gBAAjB,UAAU,gBAAA;YACnC,IAAM,kBAAkB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CA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MAAM,CAAC,uBAAuB;gBAElG,6BAA6B,EAAE;oBAC7B,iBAAiB,EAAE,aAAa;iBACjC;aACF,IACD,EAbyB,CAazB;KACH,CAAC;AA1ImB,CA0InB,EAAA"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ICommonProps } from '../../constants';
|
|
2
|
+
export interface IContactBottomSheet {
|
|
3
|
+
theme: string;
|
|
4
|
+
isTrustUser: boolean;
|
|
5
|
+
avatar: string | null;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
serverName: string | null;
|
|
9
|
+
company: string | null;
|
|
10
|
+
department: string | null;
|
|
11
|
+
companyPosition: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface IContactInfo {
|
|
14
|
+
theme: string;
|
|
15
|
+
serverName: string | null;
|
|
16
|
+
company: string | null;
|
|
17
|
+
department: string | null;
|
|
18
|
+
companyPosition: string | null;
|
|
19
|
+
}
|
|
20
|
+
export type TRenderInfoItem = {
|
|
21
|
+
title: string;
|
|
22
|
+
info: string;
|
|
23
|
+
};
|
|
24
|
+
export interface ILoadingMessage {
|
|
25
|
+
theme: string;
|
|
26
|
+
}
|
|
27
|
+
export type TGenerateCorporateOption = {
|
|
28
|
+
option: TCorporateEntity;
|
|
29
|
+
theme: string;
|
|
30
|
+
};
|
|
31
|
+
export type TGenerateCorporateOptionsToSelect = {
|
|
32
|
+
options: TCorporateEntity[];
|
|
33
|
+
theme: string;
|
|
34
|
+
platform: string;
|
|
35
|
+
isTrustUser?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type TGenerateContactsOption = {
|
|
38
|
+
option: TMyContactsEntries;
|
|
39
|
+
theme: string;
|
|
40
|
+
};
|
|
41
|
+
export type TGenerateContactsOptionsToSelect = {
|
|
42
|
+
options: TMyContactsEntries[];
|
|
43
|
+
theme: string;
|
|
44
|
+
};
|
|
45
|
+
export type TSelectStyles = {
|
|
46
|
+
isLoading: boolean;
|
|
47
|
+
isFullScreen: boolean;
|
|
48
|
+
isMaxMembersAdded: boolean;
|
|
49
|
+
isDisabled: boolean;
|
|
50
|
+
isError: boolean;
|
|
51
|
+
lastRowNumber: number;
|
|
52
|
+
paddingLeft: string;
|
|
53
|
+
borderType: string;
|
|
54
|
+
theme: string;
|
|
55
|
+
};
|
|
56
|
+
export type TGenerateNoOptionsMessage = {
|
|
57
|
+
inputValue: string;
|
|
58
|
+
};
|
|
59
|
+
export type THandleFilterOption = {
|
|
60
|
+
data: MultiOptionType;
|
|
61
|
+
};
|
|
62
|
+
type TOptions = {
|
|
63
|
+
options: MultiOptionType[];
|
|
64
|
+
};
|
|
65
|
+
export type TSelectProps = {
|
|
66
|
+
options: TOptions[];
|
|
67
|
+
inputValue: string;
|
|
68
|
+
onChange: (value: MultiOptionType[]) => void;
|
|
69
|
+
onInputChange: (value: string) => void;
|
|
70
|
+
};
|
|
71
|
+
export interface MultiOptionType {
|
|
72
|
+
value: string;
|
|
73
|
+
label: string;
|
|
74
|
+
avatar?: string | null;
|
|
75
|
+
email: string;
|
|
76
|
+
theme: string;
|
|
77
|
+
platform?: string;
|
|
78
|
+
serverName?: string | null;
|
|
79
|
+
company?: string | null;
|
|
80
|
+
department?: string | null;
|
|
81
|
+
companyPosition?: string | null;
|
|
82
|
+
isTrustUser?: boolean;
|
|
83
|
+
isMyContacts?: boolean;
|
|
84
|
+
isEnteredByUser?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export type TMyContactsEntries = {
|
|
87
|
+
name: string | null;
|
|
88
|
+
email: string;
|
|
89
|
+
avatar: string | null;
|
|
90
|
+
};
|
|
91
|
+
type TContacts = {
|
|
92
|
+
userHuid: string;
|
|
93
|
+
contact: string;
|
|
94
|
+
};
|
|
95
|
+
export type TCorporateEntity = {
|
|
96
|
+
avatar: string | null;
|
|
97
|
+
name: string;
|
|
98
|
+
email: string | null;
|
|
99
|
+
serverName: string | null;
|
|
100
|
+
company: string | null;
|
|
101
|
+
department: string | null;
|
|
102
|
+
companyPosition: string | null;
|
|
103
|
+
contacts: TContacts[];
|
|
104
|
+
};
|
|
105
|
+
type TCorporateEntries = {
|
|
106
|
+
corpPhonebookEntries: TCorporateEntity[];
|
|
107
|
+
trustSearchEntries: TCorporateEntity[];
|
|
108
|
+
};
|
|
109
|
+
export interface IUserDropdownProps extends ICommonProps {
|
|
110
|
+
isFullScreen?: boolean;
|
|
111
|
+
isDisabled?: boolean;
|
|
112
|
+
isLoading?: boolean;
|
|
113
|
+
isMenuCloseOnSelect?: boolean;
|
|
114
|
+
title?: string;
|
|
115
|
+
mask?: string;
|
|
116
|
+
placeholder?: string;
|
|
117
|
+
hint?: string;
|
|
118
|
+
noOptionsMessage?: string;
|
|
119
|
+
maxMembersCount?: number;
|
|
120
|
+
borderType?: 'pale' | 'intense';
|
|
121
|
+
selectedEntries?: (TCorporateEntity | TMyContactsEntries)[];
|
|
122
|
+
corporateEntries: TCorporateEntries | null;
|
|
123
|
+
myContactsEntries: TMyContactsEntries[] | null;
|
|
124
|
+
onInputChange: (inputValue: string) => void;
|
|
125
|
+
onChange: (users: (TCorporateEntity | TMyContactsEntries | {
|
|
126
|
+
email: string;
|
|
127
|
+
})[]) => void;
|
|
128
|
+
onMenuClose?: () => void;
|
|
129
|
+
}
|
|
130
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":""}
|
|
@@ -24,3 +24,4 @@ export { default as Notification } from './Notification';
|
|
|
24
24
|
export { default as RadioButton } from './RadioButton';
|
|
25
25
|
export { default as Textarea } from './Textarea';
|
|
26
26
|
export { default as ContextMenu } from './ContextMenu';
|
|
27
|
+
export { default as UserDropdown } from './UserDropdown';
|
|
@@ -24,4 +24,5 @@ export { default as Notification } from './Notification';
|
|
|
24
24
|
export { default as RadioButton } from './RadioButton';
|
|
25
25
|
export { default as Textarea } from './Textarea';
|
|
26
26
|
export { default as ContextMenu } from './ContextMenu';
|
|
27
|
+
export { default as UserDropdown } from './UserDropdown';
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/сomponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE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