@astral/ui 4.62.0 → 4.62.1-rc.0
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/components/DataGridMinimalisticPagination/styles.d.ts +3 -0
- package/components/DataGridMinimalisticPagination/styles.js +5 -0
- package/components/NotificationList/SettingsButton/styled.d.ts +5 -0
- package/components/NotificationList/SettingsButton/styled.js +8 -0
- package/components/Profile/Profile.js +4 -16
- package/components/Profile/useLogic/index.d.ts +1 -0
- package/components/Profile/useLogic/index.js +1 -0
- package/components/Profile/useLogic/useLogic.d.ts +11 -0
- package/components/Profile/useLogic/useLogic.js +37 -0
- package/components/TagsList/public.d.ts +2 -0
- package/components/TagsList/public.js +2 -0
- package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -3
- package/components/fileUploading/index.d.ts +8 -0
- package/components/fileUploading/index.js +8 -0
- package/components/placeholders/index.d.ts +4 -0
- package/components/placeholders/index.js +4 -0
- package/components/transitions/index.d.ts +4 -0
- package/components/transitions/index.js +4 -0
- package/components/types/index.d.ts +4 -0
- package/components/types/index.js +4 -0
- package/components/utils/index.d.ts +16 -0
- package/components/utils/index.js +16 -0
- package/hook-form/external.d.ts +1 -0
- package/hook-form/external.js +1 -0
- package/node/components/DataGridMinimalisticPagination/styles.d.ts +3 -0
- package/node/components/DataGridMinimalisticPagination/styles.js +8 -0
- package/node/components/NotificationList/SettingsButton/styled.d.ts +5 -0
- package/node/components/NotificationList/SettingsButton/styled.js +11 -0
- package/node/components/Profile/Profile.js +4 -19
- package/node/components/Profile/useLogic/index.d.ts +1 -0
- package/node/components/Profile/useLogic/index.js +17 -0
- package/node/components/Profile/useLogic/useLogic.d.ts +11 -0
- package/node/components/Profile/useLogic/useLogic.js +41 -0
- package/node/components/TagsList/public.d.ts +2 -0
- package/node/components/TagsList/public.js +18 -0
- package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -3
- package/node/components/fileUploading/index.d.ts +8 -0
- package/node/components/fileUploading/index.js +21 -0
- package/node/components/placeholders/index.d.ts +4 -0
- package/node/components/placeholders/index.js +12 -0
- package/node/components/transitions/index.d.ts +4 -0
- package/node/components/transitions/index.js +11 -0
- package/node/components/types/index.d.ts +4 -0
- package/node/components/types/index.js +20 -0
- package/node/components/utils/index.d.ts +16 -0
- package/node/components/utils/index.js +32 -0
- package/node/hook-form/external.d.ts +1 -0
- package/node/hook-form/external.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("../../styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
3
|
-
import { useEffect } from 'react';
|
|
4
|
-
import { useHidePersonalData } from '../personalDataSecurity';
|
|
5
2
|
import { Typography } from '../Typography';
|
|
6
|
-
import { useMenu } from '../useMenu';
|
|
7
3
|
import { profileClassnames } from './constants';
|
|
8
4
|
import { MenuList } from './MenuList';
|
|
9
5
|
import { ProfileSkeleton } from './ProfileSkeleton';
|
|
10
6
|
import { Credentials, ProfileRoot, StyledAvatar, StyledChevron, User, } from './styles';
|
|
7
|
+
import { useLogic } from './useLogic';
|
|
11
8
|
export const Profile = (props) => {
|
|
12
|
-
const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton,
|
|
13
|
-
const { open, anchorRef, handleOpenMenu, handleCloseMenu } =
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (!Menu && !menuList && !exitButton) {
|
|
16
|
-
// biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
|
|
17
|
-
console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
|
|
18
|
-
}
|
|
19
|
-
}, []);
|
|
20
|
-
const hidePersonalDataClassname = useHidePersonalData({
|
|
21
|
-
isEnabled: isHidePersonalData,
|
|
22
|
-
});
|
|
9
|
+
const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton, isLoading, } = props;
|
|
10
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu, hidePersonalDataClassname, } = useLogic(props);
|
|
23
11
|
if (isLoading) {
|
|
24
12
|
return _jsx(ProfileSkeleton, {});
|
|
25
13
|
}
|
|
26
|
-
return (_jsxs(_Fragment, { children: [
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ProfileRoot, { ref: anchorRef, variant: "text", onClick: handleOpenMenu, className: profileClassnames.button, children: [_jsx(StyledAvatar, { ...avatar, className: profileClassnames.avatar }), _jsxs(User, { className: profileClassnames.user, children: [_jsxs(Credentials, { className: hidePersonalDataClassname, children: [_jsx(Typography, { variant: "body1", className: profileClassnames.credentials, children: displayName }), _jsx(Typography, { variant: "caption", color: "textSecondary", className: profileClassnames.credentials, children: annotation })] }), _jsx(StyledChevron, { isActive: open })] })] }), Menu ? (_jsx(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu, anchorOrigin: {
|
|
27
15
|
vertical: 'bottom',
|
|
28
16
|
horizontal: 'right',
|
|
29
17
|
}, transformOrigin: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ProfileProps } from '../types';
|
|
3
|
+
type UseLogicParams = ProfileProps;
|
|
4
|
+
export declare const useLogic: ({ menuList, menu: Menu, exitButton, isHidePersonalData, }: UseLogicParams) => {
|
|
5
|
+
open: boolean;
|
|
6
|
+
anchorRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
7
|
+
handleOpenMenu: () => void;
|
|
8
|
+
handleCloseMenu: () => void;
|
|
9
|
+
hidePersonalDataClassname: string;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useHidePersonalData } from '../../personalDataSecurity';
|
|
3
|
+
import { useMenu } from '../../useMenu';
|
|
4
|
+
export const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData, }) => {
|
|
5
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu } = useMenu();
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (!open) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const timer = setTimeout(() => {
|
|
11
|
+
const popover = document.querySelector('[role="presentation"]');
|
|
12
|
+
if (popover) {
|
|
13
|
+
const menuItems = popover.querySelectorAll('[role="menuitem"]');
|
|
14
|
+
menuItems.forEach((item) => {
|
|
15
|
+
item.onclick = handleCloseMenu;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}, 0);
|
|
19
|
+
return () => clearTimeout(timer);
|
|
20
|
+
}, [open, handleCloseMenu]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!Menu && !menuList && !exitButton) {
|
|
23
|
+
// biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
|
|
24
|
+
console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
const hidePersonalDataClassname = useHidePersonalData({
|
|
28
|
+
isEnabled: isHidePersonalData,
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
open,
|
|
32
|
+
anchorRef,
|
|
33
|
+
handleOpenMenu,
|
|
34
|
+
handleCloseMenu,
|
|
35
|
+
hidePersonalDataClassname,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type UsePreviewFileUploaderParams } from '../hooks/usePreviewFileUploader';
|
|
3
3
|
export type PreviewFileUploaderProps = UsePreviewFileUploaderParams;
|
|
4
|
-
export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("
|
|
5
|
-
value: import("
|
|
4
|
+
export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("..").FileUploaderProps, "className" | "label" | "name" | "placeholder" | "isDisabled" | "isError" | "inputRef" | "helperText" | "maxFileSize" | "onUploadFile" | "getErrorMessage" | "restrictions" | "notify" | "onDeleteFile" | "onView" | "generateDownloadLink"> & {
|
|
5
|
+
value: import("..").UploadFile | null | undefined;
|
|
6
6
|
accept?: string[] | undefined;
|
|
7
7
|
placeholderImgSrc?: string | undefined;
|
|
8
8
|
isHidePersonalData?: boolean | undefined;
|
|
9
9
|
PdfViewer?: import("react").LazyExoticComponent<(props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>> | ((props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) | undefined;
|
|
10
|
-
onChange: (value: import("
|
|
10
|
+
onChange: (value: import("..").UploadFile | null) => void;
|
|
11
11
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type RestrictionFn, type RestrictionFnResult, type UploadedFileData, type UploadFile, type FileUploaderNotify, type FileUploaderProps, type FileId, FileUploader, } from './FileUploader';
|
|
2
|
+
export { type FileUploaderDropZoneProps, FileUploaderDropzone, } from './FileUploaderDropzone';
|
|
3
|
+
export { FileUploaderFile, type FileUploaderFileProps, } from './FileUploaderFile';
|
|
4
|
+
export { type UseFileUploaderParams, type UsePreviewFileUploaderParams, useFileUploader, usePreviewFileUploader, } from './hooks';
|
|
5
|
+
export { PreviewFileUploader, type PreviewFileUploaderProps, } from './PreviewFileUploader';
|
|
6
|
+
export { PreviewFileUploaderDropZone, type PreviewFileUploaderDropZoneProps, } from './PreviewFileUploaderDropZone';
|
|
7
|
+
export { PreviewFileUploaderFile, type PreviewFileUploaderFileProps, } from './PreviewFileUploaderFile';
|
|
8
|
+
export { fileUploaderClassnames, previewFileUploaderClassnames, } from './constants';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { FileUploader, } from './FileUploader';
|
|
2
|
+
export { FileUploaderDropzone, } from './FileUploaderDropzone';
|
|
3
|
+
export { FileUploaderFile, } from './FileUploaderFile';
|
|
4
|
+
export { useFileUploader, usePreviewFileUploader, } from './hooks';
|
|
5
|
+
export { PreviewFileUploader, } from './PreviewFileUploader';
|
|
6
|
+
export { PreviewFileUploaderDropZone, } from './PreviewFileUploaderDropZone';
|
|
7
|
+
export { PreviewFileUploaderFile, } from './PreviewFileUploaderFile';
|
|
8
|
+
export { fileUploaderClassnames, previewFileUploaderClassnames, } from './constants';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InternalErrorPlaceholder } from './InternalErrorPlaceholder';
|
|
2
|
+
export { LoadingPlaceholder, loadingPlaceholderClassnames, } from './LoadingPlaceholder';
|
|
3
|
+
export { OutdatedReleasePlaceholder } from './OutdatedReleasePlaceholder';
|
|
4
|
+
export { type PlaceholderImageProps, Placeholder, type PlaceholderProps, type PlaceholderSize, } from './Placeholder';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InternalErrorPlaceholder } from './InternalErrorPlaceholder';
|
|
2
|
+
export { LoadingPlaceholder, loadingPlaceholderClassnames, } from './LoadingPlaceholder';
|
|
3
|
+
export { OutdatedReleasePlaceholder } from './OutdatedReleasePlaceholder';
|
|
4
|
+
export { Placeholder, } from './Placeholder';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './classNames';
|
|
2
|
+
export * from './createUIKitClassname';
|
|
3
|
+
export * from './mergeDeep';
|
|
4
|
+
export * from './prop';
|
|
5
|
+
export * from './uniqBy';
|
|
6
|
+
export * from './uniqueBy';
|
|
7
|
+
export * from './generateLocalStorageKey';
|
|
8
|
+
export * from './getNodeText';
|
|
9
|
+
export * from './redirectToLink';
|
|
10
|
+
export * from './checkIsDeepEqual';
|
|
11
|
+
export * from './differenceWith';
|
|
12
|
+
export * from './isEmpty';
|
|
13
|
+
export * from './mergeDeep';
|
|
14
|
+
export * from './prop';
|
|
15
|
+
export * from './uniqBy';
|
|
16
|
+
export * from './uniqueBy';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './classNames';
|
|
2
|
+
export * from './createUIKitClassname';
|
|
3
|
+
export * from './mergeDeep';
|
|
4
|
+
export * from './prop';
|
|
5
|
+
export * from './uniqBy';
|
|
6
|
+
export * from './uniqueBy';
|
|
7
|
+
export * from './generateLocalStorageKey';
|
|
8
|
+
export * from './getNodeText';
|
|
9
|
+
export * from './redirectToLink';
|
|
10
|
+
export * from './checkIsDeepEqual';
|
|
11
|
+
export * from './differenceWith';
|
|
12
|
+
export * from './isEmpty';
|
|
13
|
+
export * from './mergeDeep';
|
|
14
|
+
export * from './prop';
|
|
15
|
+
export * from './uniqBy';
|
|
16
|
+
export * from './uniqueBy';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Controller as FormController, type ControllerProps as FormControllerProps, type Field as FormField, type FieldArray as FormFieldArray, type FieldArrayPath as FormFieldArrayPath, type FieldArrayWithId as FormFieldArrayWithId, type FieldError as FormFieldError, type FieldErrors as FormFieldErrors, type FieldPath as FormFieldPath, type FieldValues as FormFieldValues, type Path as FormPath, type RegisterOptions as FormRegisterOptions, type Resolver as FormResolver, type UseControllerProps as UseFormControllerProps, type UseFormGetValues, type UseWatchProps as UseFormWatchProps, useController as useFormController, useFieldArray as useFormFieldArray, useWatch as useFormWatch, } from 'react-hook-form';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Controller as FormController, useController as useFormController, useFieldArray as useFormFieldArray, useWatch as useFormWatch, } from 'react-hook-form';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledMinimalisticPagination = void 0;
|
|
4
|
+
const MinimalisticPagination_1 = require("../MinimalisticPagination");
|
|
5
|
+
const styled_1 = require("../styled");
|
|
6
|
+
exports.StyledMinimalisticPagination = (0, styled_1.styled)(MinimalisticPagination_1.MinimalisticPagination) `
|
|
7
|
+
justify-content: end;
|
|
8
|
+
`;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Wrapper = void 0;
|
|
4
|
+
const styled_1 = require("../../styled");
|
|
5
|
+
exports.Wrapper = styled_1.styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
8
|
+
|
|
9
|
+
height: 100%;
|
|
10
|
+
margin-right: ${({ theme }) => theme.spacing(1)};
|
|
11
|
+
`;
|
|
@@ -1,35 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Profile = void 0;
|
|
7
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const ClickAwayListener_1 = __importDefault(require("@mui/material/ClickAwayListener"));
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const personalDataSecurity_1 = require("../personalDataSecurity");
|
|
11
5
|
const Typography_1 = require("../Typography");
|
|
12
|
-
const useMenu_1 = require("../useMenu");
|
|
13
6
|
const constants_1 = require("./constants");
|
|
14
7
|
const MenuList_1 = require("./MenuList");
|
|
15
8
|
const ProfileSkeleton_1 = require("./ProfileSkeleton");
|
|
16
9
|
const styles_1 = require("./styles");
|
|
10
|
+
const useLogic_1 = require("./useLogic");
|
|
17
11
|
const Profile = (props) => {
|
|
18
|
-
const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton,
|
|
19
|
-
const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0,
|
|
20
|
-
(0, react_1.useEffect)(() => {
|
|
21
|
-
if (!Menu && !menuList && !exitButton) {
|
|
22
|
-
// biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
|
|
23
|
-
console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
|
|
24
|
-
}
|
|
25
|
-
}, []);
|
|
26
|
-
const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
27
|
-
isEnabled: isHidePersonalData,
|
|
28
|
-
});
|
|
12
|
+
const { displayName, annotation, avatar = {}, menu: Menu, menuList, exitButton, isLoading, } = props;
|
|
13
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu, hidePersonalDataClassname, } = (0, useLogic_1.useLogic)(props);
|
|
29
14
|
if (isLoading) {
|
|
30
15
|
return (0, jsx_runtime_1.jsx)(ProfileSkeleton_1.ProfileSkeleton, {});
|
|
31
16
|
}
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styles_1.ProfileRoot, { ref: anchorRef, variant: "text", onClick: handleOpenMenu, className: constants_1.profileClassnames.button, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledAvatar, { ...avatar, className: constants_1.profileClassnames.avatar }), (0, jsx_runtime_1.jsxs)(styles_1.User, { className: constants_1.profileClassnames.user, children: [(0, jsx_runtime_1.jsxs)(styles_1.Credentials, { className: hidePersonalDataClassname, children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", className: constants_1.profileClassnames.credentials, children: displayName }), (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "textSecondary", className: constants_1.profileClassnames.credentials, children: annotation })] }), (0, jsx_runtime_1.jsx)(styles_1.StyledChevron, { isActive: open })] })] }), Menu ? ((0, jsx_runtime_1.jsx)(Menu, { open: open, anchorEl: anchorRef.current, onClose: handleCloseMenu, anchorOrigin: {
|
|
33
18
|
vertical: 'bottom',
|
|
34
19
|
horizontal: 'right',
|
|
35
20
|
}, transformOrigin: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useLogic"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ProfileProps } from '../types';
|
|
3
|
+
type UseLogicParams = ProfileProps;
|
|
4
|
+
export declare const useLogic: ({ menuList, menu: Menu, exitButton, isHidePersonalData, }: UseLogicParams) => {
|
|
5
|
+
open: boolean;
|
|
6
|
+
anchorRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
7
|
+
handleOpenMenu: () => void;
|
|
8
|
+
handleCloseMenu: () => void;
|
|
9
|
+
hidePersonalDataClassname: string;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
6
|
+
const useMenu_1 = require("../../useMenu");
|
|
7
|
+
const useLogic = ({ menuList, menu: Menu, exitButton, isHidePersonalData, }) => {
|
|
8
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)();
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
10
|
+
if (!open) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const timer = setTimeout(() => {
|
|
14
|
+
const popover = document.querySelector('[role="presentation"]');
|
|
15
|
+
if (popover) {
|
|
16
|
+
const menuItems = popover.querySelectorAll('[role="menuitem"]');
|
|
17
|
+
menuItems.forEach((item) => {
|
|
18
|
+
item.onclick = handleCloseMenu;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}, 0);
|
|
22
|
+
return () => clearTimeout(timer);
|
|
23
|
+
}, [open, handleCloseMenu]);
|
|
24
|
+
(0, react_1.useEffect)(() => {
|
|
25
|
+
if (!Menu && !menuList && !exitButton) {
|
|
26
|
+
// biome-ignore lint/suspicious/noConsole: Ошибка для интеграторов
|
|
27
|
+
console.error('Profile должен иметь один из следующих props: menu, menuList, exitButton');
|
|
28
|
+
}
|
|
29
|
+
}, []);
|
|
30
|
+
const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
31
|
+
isEnabled: isHidePersonalData,
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
open,
|
|
35
|
+
anchorRef,
|
|
36
|
+
handleOpenMenu,
|
|
37
|
+
handleCloseMenu,
|
|
38
|
+
hidePersonalDataClassname,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TagsList"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type UsePreviewFileUploaderParams } from '../hooks/usePreviewFileUploader';
|
|
3
3
|
export type PreviewFileUploaderProps = UsePreviewFileUploaderParams;
|
|
4
|
-
export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("
|
|
5
|
-
value: import("
|
|
4
|
+
export declare const PreviewFileUploader: import("react").ForwardRefExoticComponent<Pick<import("..").FileUploaderProps, "className" | "label" | "name" | "placeholder" | "isDisabled" | "isError" | "inputRef" | "helperText" | "maxFileSize" | "onUploadFile" | "getErrorMessage" | "restrictions" | "notify" | "onDeleteFile" | "onView" | "generateDownloadLink"> & {
|
|
5
|
+
value: import("..").UploadFile | null | undefined;
|
|
6
6
|
accept?: string[] | undefined;
|
|
7
7
|
placeholderImgSrc?: string | undefined;
|
|
8
8
|
isHidePersonalData?: boolean | undefined;
|
|
9
9
|
PdfViewer?: import("react").LazyExoticComponent<(props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>> | ((props: import("../../PdfViewer").PdfViewerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) | undefined;
|
|
10
|
-
onChange: (value: import("
|
|
10
|
+
onChange: (value: import("..").UploadFile | null) => void;
|
|
11
11
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type RestrictionFn, type RestrictionFnResult, type UploadedFileData, type UploadFile, type FileUploaderNotify, type FileUploaderProps, type FileId, FileUploader, } from './FileUploader';
|
|
2
|
+
export { type FileUploaderDropZoneProps, FileUploaderDropzone, } from './FileUploaderDropzone';
|
|
3
|
+
export { FileUploaderFile, type FileUploaderFileProps, } from './FileUploaderFile';
|
|
4
|
+
export { type UseFileUploaderParams, type UsePreviewFileUploaderParams, useFileUploader, usePreviewFileUploader, } from './hooks';
|
|
5
|
+
export { PreviewFileUploader, type PreviewFileUploaderProps, } from './PreviewFileUploader';
|
|
6
|
+
export { PreviewFileUploaderDropZone, type PreviewFileUploaderDropZoneProps, } from './PreviewFileUploaderDropZone';
|
|
7
|
+
export { PreviewFileUploaderFile, type PreviewFileUploaderFileProps, } from './PreviewFileUploaderFile';
|
|
8
|
+
export { fileUploaderClassnames, previewFileUploaderClassnames, } from './constants';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.previewFileUploaderClassnames = exports.fileUploaderClassnames = exports.PreviewFileUploaderFile = exports.PreviewFileUploaderDropZone = exports.PreviewFileUploader = exports.usePreviewFileUploader = exports.useFileUploader = exports.FileUploaderFile = exports.FileUploaderDropzone = exports.FileUploader = void 0;
|
|
4
|
+
var FileUploader_1 = require("./FileUploader");
|
|
5
|
+
Object.defineProperty(exports, "FileUploader", { enumerable: true, get: function () { return FileUploader_1.FileUploader; } });
|
|
6
|
+
var FileUploaderDropzone_1 = require("./FileUploaderDropzone");
|
|
7
|
+
Object.defineProperty(exports, "FileUploaderDropzone", { enumerable: true, get: function () { return FileUploaderDropzone_1.FileUploaderDropzone; } });
|
|
8
|
+
var FileUploaderFile_1 = require("./FileUploaderFile");
|
|
9
|
+
Object.defineProperty(exports, "FileUploaderFile", { enumerable: true, get: function () { return FileUploaderFile_1.FileUploaderFile; } });
|
|
10
|
+
var hooks_1 = require("./hooks");
|
|
11
|
+
Object.defineProperty(exports, "useFileUploader", { enumerable: true, get: function () { return hooks_1.useFileUploader; } });
|
|
12
|
+
Object.defineProperty(exports, "usePreviewFileUploader", { enumerable: true, get: function () { return hooks_1.usePreviewFileUploader; } });
|
|
13
|
+
var PreviewFileUploader_1 = require("./PreviewFileUploader");
|
|
14
|
+
Object.defineProperty(exports, "PreviewFileUploader", { enumerable: true, get: function () { return PreviewFileUploader_1.PreviewFileUploader; } });
|
|
15
|
+
var PreviewFileUploaderDropZone_1 = require("./PreviewFileUploaderDropZone");
|
|
16
|
+
Object.defineProperty(exports, "PreviewFileUploaderDropZone", { enumerable: true, get: function () { return PreviewFileUploaderDropZone_1.PreviewFileUploaderDropZone; } });
|
|
17
|
+
var PreviewFileUploaderFile_1 = require("./PreviewFileUploaderFile");
|
|
18
|
+
Object.defineProperty(exports, "PreviewFileUploaderFile", { enumerable: true, get: function () { return PreviewFileUploaderFile_1.PreviewFileUploaderFile; } });
|
|
19
|
+
var constants_1 = require("./constants");
|
|
20
|
+
Object.defineProperty(exports, "fileUploaderClassnames", { enumerable: true, get: function () { return constants_1.fileUploaderClassnames; } });
|
|
21
|
+
Object.defineProperty(exports, "previewFileUploaderClassnames", { enumerable: true, get: function () { return constants_1.previewFileUploaderClassnames; } });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InternalErrorPlaceholder } from './InternalErrorPlaceholder';
|
|
2
|
+
export { LoadingPlaceholder, loadingPlaceholderClassnames, } from './LoadingPlaceholder';
|
|
3
|
+
export { OutdatedReleasePlaceholder } from './OutdatedReleasePlaceholder';
|
|
4
|
+
export { type PlaceholderImageProps, Placeholder, type PlaceholderProps, type PlaceholderSize, } from './Placeholder';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Placeholder = exports.OutdatedReleasePlaceholder = exports.loadingPlaceholderClassnames = exports.LoadingPlaceholder = exports.InternalErrorPlaceholder = void 0;
|
|
4
|
+
var InternalErrorPlaceholder_1 = require("./InternalErrorPlaceholder");
|
|
5
|
+
Object.defineProperty(exports, "InternalErrorPlaceholder", { enumerable: true, get: function () { return InternalErrorPlaceholder_1.InternalErrorPlaceholder; } });
|
|
6
|
+
var LoadingPlaceholder_1 = require("./LoadingPlaceholder");
|
|
7
|
+
Object.defineProperty(exports, "LoadingPlaceholder", { enumerable: true, get: function () { return LoadingPlaceholder_1.LoadingPlaceholder; } });
|
|
8
|
+
Object.defineProperty(exports, "loadingPlaceholderClassnames", { enumerable: true, get: function () { return LoadingPlaceholder_1.loadingPlaceholderClassnames; } });
|
|
9
|
+
var OutdatedReleasePlaceholder_1 = require("./OutdatedReleasePlaceholder");
|
|
10
|
+
Object.defineProperty(exports, "OutdatedReleasePlaceholder", { enumerable: true, get: function () { return OutdatedReleasePlaceholder_1.OutdatedReleasePlaceholder; } });
|
|
11
|
+
var Placeholder_1 = require("./Placeholder");
|
|
12
|
+
Object.defineProperty(exports, "Placeholder", { enumerable: true, get: function () { return Placeholder_1.Placeholder; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Zoom = exports.Slide = exports.Grow = exports.Fade = void 0;
|
|
4
|
+
var Fade_1 = require("./Fade");
|
|
5
|
+
Object.defineProperty(exports, "Fade", { enumerable: true, get: function () { return Fade_1.Fade; } });
|
|
6
|
+
var Grow_1 = require("./Grow");
|
|
7
|
+
Object.defineProperty(exports, "Grow", { enumerable: true, get: function () { return Grow_1.Grow; } });
|
|
8
|
+
var Slide_1 = require("./Slide");
|
|
9
|
+
Object.defineProperty(exports, "Slide", { enumerable: true, get: function () { return Slide_1.Slide; } });
|
|
10
|
+
var Zoom_1 = require("./Zoom");
|
|
11
|
+
Object.defineProperty(exports, "Zoom", { enumerable: true, get: function () { return Zoom_1.Zoom; } });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CalendarGridBuilder"), exports);
|
|
18
|
+
__exportStar(require("./CloseEventReason"), exports);
|
|
19
|
+
__exportStar(require("./ProductionCalendar"), exports);
|
|
20
|
+
__exportStar(require("./WithoutEmotionSpecific"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './classNames';
|
|
2
|
+
export * from './createUIKitClassname';
|
|
3
|
+
export * from './mergeDeep';
|
|
4
|
+
export * from './prop';
|
|
5
|
+
export * from './uniqBy';
|
|
6
|
+
export * from './uniqueBy';
|
|
7
|
+
export * from './generateLocalStorageKey';
|
|
8
|
+
export * from './getNodeText';
|
|
9
|
+
export * from './redirectToLink';
|
|
10
|
+
export * from './checkIsDeepEqual';
|
|
11
|
+
export * from './differenceWith';
|
|
12
|
+
export * from './isEmpty';
|
|
13
|
+
export * from './mergeDeep';
|
|
14
|
+
export * from './prop';
|
|
15
|
+
export * from './uniqBy';
|
|
16
|
+
export * from './uniqueBy';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./classNames"), exports);
|
|
18
|
+
__exportStar(require("./createUIKitClassname"), exports);
|
|
19
|
+
__exportStar(require("./mergeDeep"), exports);
|
|
20
|
+
__exportStar(require("./prop"), exports);
|
|
21
|
+
__exportStar(require("./uniqBy"), exports);
|
|
22
|
+
__exportStar(require("./uniqueBy"), exports);
|
|
23
|
+
__exportStar(require("./generateLocalStorageKey"), exports);
|
|
24
|
+
__exportStar(require("./getNodeText"), exports);
|
|
25
|
+
__exportStar(require("./redirectToLink"), exports);
|
|
26
|
+
__exportStar(require("./checkIsDeepEqual"), exports);
|
|
27
|
+
__exportStar(require("./differenceWith"), exports);
|
|
28
|
+
__exportStar(require("./isEmpty"), exports);
|
|
29
|
+
__exportStar(require("./mergeDeep"), exports);
|
|
30
|
+
__exportStar(require("./prop"), exports);
|
|
31
|
+
__exportStar(require("./uniqBy"), exports);
|
|
32
|
+
__exportStar(require("./uniqueBy"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Controller as FormController, type ControllerProps as FormControllerProps, type Field as FormField, type FieldArray as FormFieldArray, type FieldArrayPath as FormFieldArrayPath, type FieldArrayWithId as FormFieldArrayWithId, type FieldError as FormFieldError, type FieldErrors as FormFieldErrors, type FieldPath as FormFieldPath, type FieldValues as FormFieldValues, type Path as FormPath, type RegisterOptions as FormRegisterOptions, type Resolver as FormResolver, type UseControllerProps as UseFormControllerProps, type UseFormGetValues, type UseWatchProps as UseFormWatchProps, useController as useFormController, useFieldArray as useFormFieldArray, useWatch as useFormWatch, } from 'react-hook-form';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFormWatch = exports.useFormFieldArray = exports.useFormController = exports.FormController = void 0;
|
|
4
|
+
var react_hook_form_1 = require("react-hook-form");
|
|
5
|
+
Object.defineProperty(exports, "FormController", { enumerable: true, get: function () { return react_hook_form_1.Controller; } });
|
|
6
|
+
Object.defineProperty(exports, "useFormController", { enumerable: true, get: function () { return react_hook_form_1.useController; } });
|
|
7
|
+
Object.defineProperty(exports, "useFormFieldArray", { enumerable: true, get: function () { return react_hook_form_1.useFieldArray; } });
|
|
8
|
+
Object.defineProperty(exports, "useFormWatch", { enumerable: true, get: function () { return react_hook_form_1.useWatch; } });
|