@expressms/smartapp-ui 3.0.0-alpha.51 → 3.0.0-alpha.53
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/constants/constants.d.ts +4 -0
- package/build/main/constants/constants.js +16 -1
- package/build/main/constants/constants.js.map +1 -1
- package/build/main/constants/types.d.ts +7 -0
- package/build/main/helpers/index.d.ts +1 -0
- package/build/main/helpers/index.js +3 -0
- package/build/main/helpers/index.js.map +1 -1
- package/build/main/hooks/useMobileLongTap.d.ts +16 -0
- package/build/main/hooks/useMobileLongTap.js +55 -0
- package/build/main/hooks/useMobileLongTap.js.map +1 -0
- package/build/main/hooks/useModal.js +14 -9
- package/build/main/hooks/useModal.js.map +1 -1
- package/build/main/index.d.ts +1 -0
- package/build/main/index.js +1 -0
- package/build/main/index.js.map +1 -1
- package/build/main/styles/styles.scss +2 -2
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +3 -2
- package/build/main//321/201omponents/Avatar/Avatar.js +2 -2
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
- package/build/main//321/201omponents/Avatar/types.d.ts +3 -3
- package/build/main//321/201omponents/Chip/Chip.d.ts +3 -2
- package/build/main//321/201omponents/Chip/Chip.js +155 -17
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
- package/build/main//321/201omponents/Chip/types.d.ts +9 -4
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +13 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js +76 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js.map +1 -0
- package/build/main//321/201omponents/ChipDndContext/index.d.ts +1 -0
- package/build/main//321/201omponents/ChipDndContext/index.js +2 -0
- package/build/main//321/201omponents/ChipDndContext/index.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +1 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +54 -11
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
- package/build/main//321/201omponents/ContextMenu/types.d.ts +6 -6
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +1 -1
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +6 -3
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -1
- package/build/main//321/201omponents/ContextMenuItem/types.d.ts +4 -2
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +3 -3
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/types.d.ts +2 -1
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -1
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +4 -8
- package/build/main//321/201omponents/ListItem/ListItem.js +13 -4
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
- package/build/main//321/201omponents/ListItem/types.d.ts +2 -1
- package/build/main//321/201omponents/Modal/Modal.js +1 -2
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
- package/build/main//321/201omponents/Stories/Stories.js +72 -4
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +1 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +1 -1
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -2
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +32 -23
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +4 -3
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +134 -64
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +11 -9
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/types.d.ts +17 -1
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
- package/package.json +3 -1
- package/build/main/hooks/useLongTap.d.ts +0 -12
- package/build/main/hooks/useLongTap.js +0 -29
- package/build/main/hooks/useLongTap.js.map +0 -1
|
@@ -11,19 +11,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { isFullScreen, isMobilePlatform, isWebPlatform } from '../../helpers';
|
|
13
13
|
import { COLORS } from '../../constants';
|
|
14
|
-
var borderFocused = COLORS.borderFocused,
|
|
14
|
+
var borderFocused = COLORS.borderFocused, borderPrimary = COLORS.borderPrimary, borderPrimaryHover = COLORS.borderPrimaryHover, bgLightTransparent = COLORS.bgLightTransparent, transparent = COLORS.transparent, mShadowClick = COLORS.mShadowClick, bgElementOnTop = COLORS.bgElementOnTop, bgElementOnTopHover = COLORS.bgElementOnTopHover, bgElementOnTopPressed = COLORS.bgElementOnTopPressed, scrollbarThumb = COLORS.scrollbarThumb, textPrimary = COLORS.textPrimary, textSecondary = COLORS.textSecondary, textTertiary = COLORS.textTertiary, iconAccent = COLORS.iconAccent;
|
|
15
|
+
var VALUE_CONTAINER_COLLAPSED_HEIGHT = '84px';
|
|
15
16
|
var DEFAULT_PADDING = '4px';
|
|
16
17
|
var generatePadding = function (isElementRepresented, padding) { return (isElementRepresented ? padding : DEFAULT_PADDING); };
|
|
17
18
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
18
19
|
export default (function (_a) {
|
|
19
|
-
var isChipsVisible = _a.isChipsVisible, isMaxMembersAdded = _a.isMaxMembersAdded, isDisabled = _a.isDisabled,
|
|
20
|
+
var isChipsVisible = _a.isChipsVisible, isMaxMembersAdded = _a.isMaxMembersAdded, isDisabled = _a.isDisabled, lastRowNumber = _a.lastRowNumber, paddingLeft = _a.paddingLeft, paddingRight = _a.paddingRight, platform = _a.platform, layoutType = _a.layoutType, isInputHidden = _a.isInputHidden, isDisabledMenuOffsetAtFullscreen = _a.isDisabledMenuOffsetAtFullscreen, isInputFocused = _a.isInputFocused, isMaskRepresented = _a.isMaskRepresented, isSuffixRepresented = _a.isSuffixRepresented, isMenuShadowless = _a.isMenuShadowless, fontFamily = _a.fontFamilyStyle.fontFamily, containerPadding = _a.containerPadding, isDraggable = _a.isDraggable, isChipsCollapsed = _a.isChipsCollapsed, menuListMaxHeight = _a.menuListMaxHeight;
|
|
20
21
|
return ({
|
|
21
22
|
control: function (provided, _a) {
|
|
22
23
|
var isFocused = _a.isFocused;
|
|
23
|
-
var borderColor = isFocused ? borderFocused : borderPrimary;
|
|
24
|
-
var hoverBorderColor = isFocused ? borderFocused : borderPrimaryHover;
|
|
25
|
-
return __assign(__assign({}, provided), { background: isDisabled ? bgLightTransparent : transparent, display: isInputHidden ? 'none' : 'block', borderRadius: '10px', borderColor:
|
|
26
|
-
borderColor: isWebPlatform(platform) &&
|
|
24
|
+
var borderColor = isFocused || isDraggable ? borderFocused : borderPrimary;
|
|
25
|
+
var hoverBorderColor = isFocused || isDraggable ? borderFocused : borderPrimaryHover;
|
|
26
|
+
return __assign(__assign({}, provided), { background: isDisabled ? bgLightTransparent : transparent, display: isInputHidden ? 'none' : 'block', borderRadius: '10px', borderColor: borderColor, boxShadow: 'none', cursor: 'text', transition: 'border-color 250ms ease-in-out, background 250ms ease-in-out', '&:hover': {
|
|
27
|
+
borderColor: isWebPlatform(platform) && hoverBorderColor,
|
|
27
28
|
} });
|
|
28
29
|
},
|
|
29
30
|
menu: function (provided) { return (__assign(__assign({}, provided), { width: isFullScreen(layoutType) ? '384px' : '100%', left: isFullScreen(layoutType) && !isDisabledMenuOffsetAtFullscreen ? '55px' : 0, background: transparent, borderRadius: '10px', boxShadow: !isMenuShadowless && mShadowClick, margin: "".concat(isMenuShadowless ? '6px' : '4px', " 0"), zIndex: 2, '&:has(.smartapp-menu-list__char-hint)': {
|
|
@@ -32,7 +33,7 @@ export default (function (_a) {
|
|
|
32
33
|
marginLeft: isFullScreen(layoutType) ? 0 : 'auto',
|
|
33
34
|
marginRight: isFullScreen(layoutType) ? 0 : 'auto',
|
|
34
35
|
} })); },
|
|
35
|
-
menuList: function (provided) { return (__assign(__assign({}, provided), { maxHeight:
|
|
36
|
+
menuList: function (provided) { return (__assign(__assign({}, provided), { maxHeight: "".concat(menuListMaxHeight, "px"), background: bgElementOnTop, borderRadius: '10px', padding: 0, '::-webkit-scrollbar-thumb': {
|
|
36
37
|
background: scrollbarThumb,
|
|
37
38
|
}, '::-webkit-scrollbar-track': {
|
|
38
39
|
background: transparent,
|
|
@@ -43,7 +44,8 @@ export default (function (_a) {
|
|
|
43
44
|
? "10.5px ".concat(paddingRight, " 10.5px ").concat(paddingLeft)
|
|
44
45
|
: "3px ".concat(generatePadding(isSuffixRepresented, paddingRight), " 3px ").concat(generatePadding(isMaskRepresented, paddingLeft));
|
|
45
46
|
var padding = containerPadding || valueContainerPadding;
|
|
46
|
-
|
|
47
|
+
var maxHeight = isChipsCollapsed ? VALUE_CONTAINER_COLLAPSED_HEIGHT : undefined;
|
|
48
|
+
return hasValue && isChipsVisible ? __assign(__assign({}, provided), { display: 'flex', gap: '8px', padding: padding, maxHeight: maxHeight }) : __assign(__assign({}, provided), { padding: padding });
|
|
47
49
|
},
|
|
48
50
|
placeholder: function (provided) { return (__assign(__assign({}, provided), { fontFamily: fontFamily, fontSize: '14px', fontWeight: '400', lineHeight: '17px', color: textTertiary, margin: 0 })); },
|
|
49
51
|
input: function (provided) { return (__assign(__assign({}, provided), { display: isMaxMembersAdded || isDisabled ? 'none' : 'grid', fontSize: '14px', fontWeight: '400', lineHeight: '17px', color: textPrimary, caretColor: iconAccent, padding: 0, margin: 0, overflow: 'auto', gridTemplateColumns: isMobilePlatform(platform) && isInputFocused ? 'max-content' : provided.gridTemplateColumns })); },
|
|
@@ -59,7 +61,7 @@ export default (function (_a) {
|
|
|
59
61
|
maxWidth: '100%',
|
|
60
62
|
} })); },
|
|
61
63
|
noOptionsMessage: function (provided) { return (__assign(__assign({}, provided), { fontSize: '14px', fontWeight: 400, color: textSecondary, background: bgElementOnTop, borderRadius: '10px', padding: '16px 12px' })); },
|
|
62
|
-
loadingMessage: function (provided) { return (__assign(__assign({}, provided), { maxHeight:
|
|
64
|
+
loadingMessage: function (provided) { return (__assign(__assign({}, provided), { maxHeight: "".concat(menuListMaxHeight, "px"), borderRadius: '10px', padding: 0, overflow: 'hidden' })); },
|
|
63
65
|
option: function (provided) { return (__assign(__assign({}, provided), { height: '45px', background: bgElementOnTop, borderRadius: '10px', padding: '0', cursor: isWebPlatform(platform) && 'pointer', marginBottom: '2px', transition: 'background 250ms ease-in-out', '&:hover': {
|
|
64
66
|
background: isWebPlatform(platform) && bgElementOnTopHover,
|
|
65
67
|
}, '&:active': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectStyles.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/selectStyles.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAItC,IAAA,aAAa,
|
|
1
|
+
{"version":3,"file":"selectStyles.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/selectStyles.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAItC,IAAA,aAAa,GAcX,MAAM,cAdK,EACb,aAAa,GAaX,MAAM,cAbK,EACb,kBAAkB,GAYhB,MAAM,mBAZU,EAClB,kBAAkB,GAWhB,MAAM,mBAXU,EAClB,WAAW,GAUT,MAA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uBACtB,QAAQ,KACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,IAAI,SAAS,EAC5C,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE,8BAA8B,EAE1C,SAAS,EAAE;gBACT,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC,IAAI,mBAAmB;aAC3D,EAED,UAAU,EAAE;gBACV,UAAU,EAAE,qBAAqB;aAClC,EAED,iBAAiB,EAAE;gBACjB,OAAO,EAAE,MAAM;aAChB,IACD,EArByB,CAqBzB;KACH,CAAC;AAjKmB,CAiKnB,EAAA"}
|
|
@@ -106,7 +106,6 @@ export type TSelectStyles = {
|
|
|
106
106
|
isChipsVisible: boolean;
|
|
107
107
|
isMaxMembersAdded: boolean;
|
|
108
108
|
isDisabled: boolean;
|
|
109
|
-
isError: boolean;
|
|
110
109
|
lastRowNumber: number;
|
|
111
110
|
paddingLeft: string;
|
|
112
111
|
paddingRight: string;
|
|
@@ -120,6 +119,9 @@ export type TSelectStyles = {
|
|
|
120
119
|
isMenuShadowless: boolean;
|
|
121
120
|
fontFamilyStyle: TFontFamilyStyle;
|
|
122
121
|
containerPadding?: string;
|
|
122
|
+
isDraggable?: boolean;
|
|
123
|
+
isChipsCollapsed?: boolean;
|
|
124
|
+
menuListMaxHeight: number;
|
|
123
125
|
};
|
|
124
126
|
export type TGenerateNoOptionsMessage = {
|
|
125
127
|
inputValue: string;
|
|
@@ -214,6 +216,10 @@ export type TUser = TCorporateEntity | TMyContactsEntries | {
|
|
|
214
216
|
organizerName?: string | null;
|
|
215
217
|
contextMenuItems?: MenuItem[];
|
|
216
218
|
};
|
|
219
|
+
export type TFocusHandle = {
|
|
220
|
+
focus: () => void;
|
|
221
|
+
blur: () => void;
|
|
222
|
+
};
|
|
217
223
|
export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IFontFamilyProps, ILanguageProps {
|
|
218
224
|
isDisabled?: boolean;
|
|
219
225
|
isLoading?: boolean;
|
|
@@ -238,6 +244,8 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
238
244
|
hint?: ReactElement | string;
|
|
239
245
|
noOptionsMessage?: string;
|
|
240
246
|
maxMembersCount?: number;
|
|
247
|
+
skeletonRowsCount?: number;
|
|
248
|
+
menuListMaxHeight?: number;
|
|
241
249
|
menuPosition?: 'bottom' | 'auto' | 'top';
|
|
242
250
|
menuLocation?: 'absolute' | 'fixed';
|
|
243
251
|
menuPortalTarget?: RefObject<HTMLDivElement | null>;
|
|
@@ -250,7 +258,10 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
250
258
|
corporateEntries: TCorporateEntries | null;
|
|
251
259
|
myContactsEntries: TMyContactsEntries[] | null;
|
|
252
260
|
emailsToExclude?: string[];
|
|
261
|
+
userDropdownId?: string;
|
|
262
|
+
focusRef?: RefObject<TFocusHandle | null>;
|
|
253
263
|
onInputChange: (inputValue: string) => void;
|
|
264
|
+
onImmediateInputChange?: (inputValue: string) => void;
|
|
254
265
|
onChange: (users: TUser[]) => void;
|
|
255
266
|
onMenuOpen?: () => void;
|
|
256
267
|
onMenuClose?: () => void;
|
|
@@ -281,4 +292,9 @@ export type TMatchers = {
|
|
|
281
292
|
includes: (text: string) => boolean;
|
|
282
293
|
anyWordStartsWith: (text: string) => boolean;
|
|
283
294
|
};
|
|
295
|
+
export type TDragUser = {
|
|
296
|
+
avatar: string;
|
|
297
|
+
label: string;
|
|
298
|
+
dropdownId?: string;
|
|
299
|
+
} & TUser;
|
|
284
300
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":"AA0SA,MAAM,CAAC,IAAM,YAAY,GAAG;IAC1B,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,CAAC;IACjB,2BAA2B,EAAE,CAAC;IAC9B,yBAAyB,EAAE,CAAC;IAC5B,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC;CACH,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressms/smartapp-ui",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.53",
|
|
4
4
|
"description": "SmartApp UI library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/main/index.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"registry": "https://registry.npmjs.org/"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@dnd-kit/core": "^6.3.1",
|
|
15
16
|
"camelcase": "^6.2.1",
|
|
16
17
|
"classnames": "^2.3.2",
|
|
17
18
|
"color": "^4.2.3",
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
"react-beautiful-dnd": "^13.1.1",
|
|
26
27
|
"react-datepicker": "^4.8.0",
|
|
27
28
|
"react-draggable": "^4.4.6",
|
|
29
|
+
"react-hook-form": "^7.60.0",
|
|
28
30
|
"react-insta-stories": "^2.6.2",
|
|
29
31
|
"react-modal-sheet": "^5.2.1",
|
|
30
32
|
"react-router-dom": "^6.7.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type TLongTapEvent = React.TouchEvent<HTMLElement> | React.MouseEvent<HTMLElement, MouseEvent>;
|
|
3
|
-
type TUseLongTap = {
|
|
4
|
-
onLongTap?: (e: TLongTapEvent) => void;
|
|
5
|
-
onCancelLongTap?: () => void;
|
|
6
|
-
longTapDelay?: number;
|
|
7
|
-
};
|
|
8
|
-
export declare const useLongTap: ({ onLongTap, onCancelLongTap, longTapDelay }: TUseLongTap) => {
|
|
9
|
-
cancelPressTimer: () => void;
|
|
10
|
-
startPressTimer: (e: TLongTapEvent) => void;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
var DEFAULT_LONG_TAP_DELAY = 500;
|
|
3
|
-
export var useLongTap = function (_a) {
|
|
4
|
-
var onLongTap = _a.onLongTap, onCancelLongTap = _a.onCancelLongTap, _b = _a.longTapDelay, longTapDelay = _b === void 0 ? DEFAULT_LONG_TAP_DELAY : _b;
|
|
5
|
-
var timerRef = useRef(null);
|
|
6
|
-
var isLongTapFulfilledRef = useRef(false);
|
|
7
|
-
var startPressTimer = function (e) {
|
|
8
|
-
e.stopPropagation();
|
|
9
|
-
isLongTapFulfilledRef.current = false;
|
|
10
|
-
timerRef.current = setTimeout(function () {
|
|
11
|
-
onLongTap === null || onLongTap === void 0 ? void 0 : onLongTap(e);
|
|
12
|
-
isLongTapFulfilledRef.current = true;
|
|
13
|
-
}, longTapDelay);
|
|
14
|
-
};
|
|
15
|
-
var cancelPressTimer = function () {
|
|
16
|
-
if (timerRef.current) {
|
|
17
|
-
clearTimeout(timerRef.current);
|
|
18
|
-
timerRef.current = null;
|
|
19
|
-
if (!isLongTapFulfilledRef.current)
|
|
20
|
-
onCancelLongTap === null || onCancelLongTap === void 0 ? void 0 : onCancelLongTap();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
useEffect(function () { return function () {
|
|
24
|
-
if (timerRef.current)
|
|
25
|
-
clearTimeout(timerRef.current);
|
|
26
|
-
}; }, []);
|
|
27
|
-
return { cancelPressTimer: cancelPressTimer, startPressTimer: startPressTimer };
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=useLongTap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLongTap.js","sourceRoot":"","sources":["../../../src/hooks/useLongTap.tsx"],"names":[],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