Merge branch 'hotfix/v2.5.1' of github.com:ONLYOFFICE/DocSpace-client into hotfix/v2.5.1
This commit is contained in:
commit
63dfb64457
@ -78,7 +78,6 @@ const ChangeRoomOwner = (props) => {
|
||||
} = props;
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isChecked, setIsChecked] = useState(!showBackButton);
|
||||
|
||||
useEffect(() => {
|
||||
document.addEventListener("keyup", onKeyUp, false);
|
||||
@ -93,7 +92,12 @@ const ChangeRoomOwner = (props) => {
|
||||
if (e.keyCode === 13 || e.which === 13) onChangeRoomOwner();
|
||||
};
|
||||
|
||||
const onChangeRoomOwner = async (user) => {
|
||||
const onChangeRoomOwner = async (
|
||||
user,
|
||||
selectedAccess,
|
||||
newFooterInputValue,
|
||||
isChecked,
|
||||
) => {
|
||||
if (showBackButton) {
|
||||
setRoomParams && setRoomParams(user[0]);
|
||||
} else {
|
||||
@ -146,8 +150,7 @@ const ChangeRoomOwner = (props) => {
|
||||
isLoading={isLoading}
|
||||
withFooterCheckbox={!showBackButton}
|
||||
footerCheckboxLabel={t("Files:LeaveTheRoom")}
|
||||
isChecked={isChecked}
|
||||
setIsChecked={setIsChecked}
|
||||
isChecked={!showBackButton}
|
||||
withOutCurrentAuthorizedUser
|
||||
filterUserId={roomOwnerId}
|
||||
currentUserId={userId}
|
||||
|
@ -42,6 +42,7 @@ import { Button } from "@docspace/shared/components/button";
|
||||
import { FieldContainer } from "@docspace/shared/components/field-container";
|
||||
import ErrorContainer from "@docspace/shared/components/error-container/ErrorContainer";
|
||||
import { FileInput } from "@docspace/shared/components/file-input";
|
||||
import { Scrollbar } from "@docspace/shared/components/scrollbar";
|
||||
|
||||
import { Loader } from "@docspace/shared/components/loader";
|
||||
|
||||
@ -314,207 +315,209 @@ const Wizard = (props) => {
|
||||
return (
|
||||
<Wrapper>
|
||||
<div className="bg-cover"></div>
|
||||
<StyledContent>
|
||||
<WizardContainer>
|
||||
<DocspaceLogo className="docspace-logo" />
|
||||
<Text
|
||||
as="div"
|
||||
fontWeight={700}
|
||||
fontSize="23px"
|
||||
className="welcome-text"
|
||||
>
|
||||
{t("WelcomeTitle")}
|
||||
</Text>
|
||||
<FormWrapper>
|
||||
<Text fontWeight={600} fontSize="16px" className="form-header">
|
||||
{t("Desc")}
|
||||
<Scrollbar id="customScrollBar">
|
||||
<StyledContent>
|
||||
<WizardContainer>
|
||||
<DocspaceLogo className="docspace-logo" />
|
||||
<Text
|
||||
as="div"
|
||||
fontWeight={700}
|
||||
fontSize="23px"
|
||||
className="welcome-text"
|
||||
>
|
||||
{t("WelcomeTitle")}
|
||||
</Text>
|
||||
<FieldContainer
|
||||
className="wizard-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorEmail}
|
||||
errorMessage={t("ErrorEmail")}
|
||||
>
|
||||
<EmailInput
|
||||
name="wizard-email"
|
||||
tabIndex={1}
|
||||
size="large"
|
||||
scale={true}
|
||||
placeholder={t("Common:Email")}
|
||||
emailSettings={emailSettings}
|
||||
hasError={hasErrorEmail}
|
||||
onValidateInput={onEmailChangeHandler}
|
||||
isDisabled={isCreated}
|
||||
/>
|
||||
</FieldContainer>
|
||||
|
||||
<FieldContainer
|
||||
className="wizard-field password-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
errorMessage={t("ErrorPassword")}
|
||||
>
|
||||
<PasswordInput
|
||||
ref={refPassInput}
|
||||
tabIndex={2}
|
||||
size="large"
|
||||
scale={true}
|
||||
inputValue={password}
|
||||
passwordSettings={passwordSettings}
|
||||
isDisabled={isCreated}
|
||||
placeholder={t("Common:Password")}
|
||||
hideNewPasswordButton={true}
|
||||
isDisableTooltip={true}
|
||||
isTextTooltipVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
onChange={onChangePassword}
|
||||
autoComplete="current-password"
|
||||
onValidateInput={isValidPassHandler}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<StyledLink>
|
||||
<IconButton
|
||||
size="12"
|
||||
iconName={RefreshReactSvgUrl}
|
||||
onClick={generatePassword}
|
||||
/>
|
||||
<Link
|
||||
className="generate-password-link"
|
||||
type="action"
|
||||
fontWeight={600}
|
||||
isHovered={true}
|
||||
onClick={generatePassword}
|
||||
>
|
||||
{t("GeneratePassword")}
|
||||
</Link>
|
||||
</StyledLink>
|
||||
|
||||
{isLicenseRequired && (
|
||||
<FormWrapper>
|
||||
<Text fontWeight={600} fontSize="16px" className="form-header">
|
||||
{t("Desc")}
|
||||
</Text>
|
||||
<FieldContainer
|
||||
className="license-filed"
|
||||
className="wizard-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorLicense}
|
||||
errorMessage={
|
||||
invalidLicense
|
||||
? t("ErrorLicenseBody")
|
||||
: t("ErrorUploadLicenseFile")
|
||||
}
|
||||
hasError={hasErrorEmail}
|
||||
errorMessage={t("ErrorEmail")}
|
||||
>
|
||||
<FileInput
|
||||
scale
|
||||
<EmailInput
|
||||
name="wizard-email"
|
||||
tabIndex={1}
|
||||
size="large"
|
||||
accept={[".lic"]}
|
||||
placeholder={t("PlaceholderLicense")}
|
||||
onInput={onLicenseFileHandler}
|
||||
hasError={hasErrorLicense}
|
||||
scale={true}
|
||||
placeholder={t("Common:Email")}
|
||||
emailSettings={emailSettings}
|
||||
hasError={hasErrorEmail}
|
||||
onValidateInput={onEmailChangeHandler}
|
||||
isDisabled={isCreated}
|
||||
/>
|
||||
</FieldContainer>
|
||||
)}
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Domain")}
|
||||
</Text>
|
||||
<Text fontWeight={600} className="machine-name">
|
||||
{machineName}
|
||||
</Text>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Language")}
|
||||
</Text>
|
||||
<div className="wrapper__language-selector">
|
||||
|
||||
<FieldContainer
|
||||
className="wizard-field password-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
errorMessage={t("ErrorPassword")}
|
||||
>
|
||||
<PasswordInput
|
||||
ref={refPassInput}
|
||||
tabIndex={2}
|
||||
size="large"
|
||||
scale={true}
|
||||
inputValue={password}
|
||||
passwordSettings={passwordSettings}
|
||||
isDisabled={isCreated}
|
||||
placeholder={t("Common:Password")}
|
||||
hideNewPasswordButton={true}
|
||||
isDisableTooltip={true}
|
||||
isTextTooltipVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
onChange={onChangePassword}
|
||||
autoComplete="current-password"
|
||||
onValidateInput={isValidPassHandler}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<StyledLink>
|
||||
<IconButton
|
||||
size="12"
|
||||
iconName={RefreshReactSvgUrl}
|
||||
onClick={generatePassword}
|
||||
/>
|
||||
<Link
|
||||
className="generate-password-link"
|
||||
type="action"
|
||||
fontWeight={600}
|
||||
isHovered={true}
|
||||
onClick={generatePassword}
|
||||
>
|
||||
{t("GeneratePassword")}
|
||||
</Link>
|
||||
</StyledLink>
|
||||
|
||||
{isLicenseRequired && (
|
||||
<FieldContainer
|
||||
className="license-filed"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorLicense}
|
||||
errorMessage={
|
||||
invalidLicense
|
||||
? t("ErrorLicenseBody")
|
||||
: t("ErrorUploadLicenseFile")
|
||||
}
|
||||
>
|
||||
<FileInput
|
||||
scale
|
||||
size="large"
|
||||
accept={[".lic"]}
|
||||
placeholder={t("PlaceholderLicense")}
|
||||
onInput={onLicenseFileHandler}
|
||||
hasError={hasErrorLicense}
|
||||
/>
|
||||
</FieldContainer>
|
||||
)}
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Domain")}
|
||||
</Text>
|
||||
<Text fontWeight={600} className="machine-name">
|
||||
{machineName}
|
||||
</Text>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Language")}
|
||||
</Text>
|
||||
<div className="wrapper__language-selector">
|
||||
<ComboBox
|
||||
withoutPadding
|
||||
directionY="both"
|
||||
options={cultureNames || []}
|
||||
selectedOption={selectedLanguage || {}}
|
||||
onSelect={onLanguageSelect}
|
||||
isDisabled={isCreated}
|
||||
scaled={isMobile()}
|
||||
scaledOptions={false}
|
||||
size="content"
|
||||
showDisabledItems={true}
|
||||
dropDownMaxHeight={364}
|
||||
manualWidth="250px"
|
||||
isDefaultMode={!isMobile()}
|
||||
withBlur={isMobile()}
|
||||
fillIcon={false}
|
||||
modernView={true}
|
||||
/>
|
||||
{selectedLanguage?.isBeta && (
|
||||
<BetaBadge withOutFeedbackLink place="bottom" />
|
||||
)}
|
||||
</div>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Timezone")}
|
||||
</Text>
|
||||
<ComboBox
|
||||
textOverflow
|
||||
withoutPadding
|
||||
directionY="both"
|
||||
options={cultureNames || []}
|
||||
selectedOption={selectedLanguage || {}}
|
||||
onSelect={onLanguageSelect}
|
||||
options={timezones || []}
|
||||
selectedOption={selectedTimezone || {}}
|
||||
onSelect={onTimezoneSelect}
|
||||
isDisabled={isCreated}
|
||||
scaled={isMobile()}
|
||||
scaledOptions={false}
|
||||
size="content"
|
||||
showDisabledItems={true}
|
||||
dropDownMaxHeight={364}
|
||||
manualWidth="250px"
|
||||
manualWidth="350px"
|
||||
isDefaultMode={!isMobile()}
|
||||
withBlur={isMobile()}
|
||||
fillIcon={false}
|
||||
modernView={true}
|
||||
/>
|
||||
{selectedLanguage?.isBeta && (
|
||||
<BetaBadge withOutFeedbackLink place="bottom" />
|
||||
)}
|
||||
</div>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Timezone")}
|
||||
</Text>
|
||||
<ComboBox
|
||||
textOverflow
|
||||
withoutPadding
|
||||
directionY="both"
|
||||
options={timezones || []}
|
||||
selectedOption={selectedTimezone || {}}
|
||||
onSelect={onTimezoneSelect}
|
||||
isDisabled={isCreated}
|
||||
scaled={isMobile()}
|
||||
scaledOptions={false}
|
||||
size="content"
|
||||
showDisabledItems={true}
|
||||
dropDownMaxHeight={364}
|
||||
manualWidth="350px"
|
||||
isDefaultMode={!isMobile()}
|
||||
withBlur={isMobile()}
|
||||
fillIcon={false}
|
||||
modernView={true}
|
||||
/>
|
||||
</StyledInfo>
|
||||
</StyledInfo>
|
||||
|
||||
<StyledAcceptTerms>
|
||||
<Checkbox
|
||||
className="wizard-checkbox"
|
||||
id="license"
|
||||
name="confirm"
|
||||
label={t("License")}
|
||||
isChecked={agreeTerms}
|
||||
onChange={onAgreeTermsChange}
|
||||
isDisabled={isCreated}
|
||||
hasError={hasErrorAgree}
|
||||
/>
|
||||
<Link
|
||||
type="page"
|
||||
color={
|
||||
hasErrorAgree
|
||||
? theme.checkbox.errorColor
|
||||
: theme.client.wizard.linkColor
|
||||
}
|
||||
fontSize="13px"
|
||||
target="_blank"
|
||||
href={
|
||||
urlLicense
|
||||
? urlLicense
|
||||
: "https://gnu.org/licenses/gpl-3.0.html"
|
||||
}
|
||||
>
|
||||
{t("LicenseLink")}
|
||||
</Link>
|
||||
</StyledAcceptTerms>
|
||||
<StyledAcceptTerms>
|
||||
<Checkbox
|
||||
className="wizard-checkbox"
|
||||
id="license"
|
||||
name="confirm"
|
||||
label={t("License")}
|
||||
isChecked={agreeTerms}
|
||||
onChange={onAgreeTermsChange}
|
||||
isDisabled={isCreated}
|
||||
hasError={hasErrorAgree}
|
||||
/>
|
||||
<Link
|
||||
type="page"
|
||||
color={
|
||||
hasErrorAgree
|
||||
? theme.checkbox.errorColor
|
||||
: theme.client.wizard.linkColor
|
||||
}
|
||||
fontSize="13px"
|
||||
target="_blank"
|
||||
href={
|
||||
urlLicense
|
||||
? urlLicense
|
||||
: "https://gnu.org/licenses/gpl-3.0.html"
|
||||
}
|
||||
>
|
||||
{t("LicenseLink")}
|
||||
</Link>
|
||||
</StyledAcceptTerms>
|
||||
|
||||
<Button
|
||||
size="medium"
|
||||
scale={true}
|
||||
primary
|
||||
label={t("Common:ContinueButton")}
|
||||
isLoading={isCreated}
|
||||
onClick={onContinueClick}
|
||||
/>
|
||||
</FormWrapper>
|
||||
</WizardContainer>
|
||||
</StyledContent>
|
||||
<Button
|
||||
size="medium"
|
||||
scale={true}
|
||||
primary
|
||||
label={t("Common:ContinueButton")}
|
||||
isLoading={isCreated}
|
||||
onClick={onContinueClick}
|
||||
/>
|
||||
</FormWrapper>
|
||||
</WizardContainer>
|
||||
</StyledContent>
|
||||
</Scrollbar>
|
||||
</Wrapper>
|
||||
);
|
||||
};
|
||||
|
@ -35,7 +35,6 @@ import AppLoader from "@docspace/shared/components/app-loader";
|
||||
import { TResponse } from "@/types";
|
||||
import useError from "@/hooks/useError";
|
||||
|
||||
import useDeviceType from "@/hooks/useDeviceType";
|
||||
import useRootInit from "@/hooks/useRootInit";
|
||||
import useDeepLink from "@/hooks/useDeepLink";
|
||||
import useSelectFileDialog from "@/hooks/useSelectFileDialog";
|
||||
@ -85,7 +84,6 @@ const Root = ({
|
||||
editorUrl: documentserverUrl,
|
||||
});
|
||||
|
||||
const { currentDeviceType } = useDeviceType();
|
||||
const { isShowDeepLink, setIsShowDeepLink } = useDeepLink({
|
||||
settings,
|
||||
fileInfo,
|
||||
@ -159,7 +157,6 @@ const Root = ({
|
||||
<DeepLink
|
||||
fileInfo={fileInfo}
|
||||
userEmail={user?.email}
|
||||
currentDeviceType={currentDeviceType}
|
||||
deepLinkConfig={settings?.deepLink}
|
||||
setIsShowDeepLink={setIsShowDeepLink}
|
||||
/>
|
||||
|
@ -109,26 +109,34 @@ export const BgBlock = styled.div<{ bgPattern: string }>`
|
||||
`;
|
||||
|
||||
export const StyledWrapper = styled.div`
|
||||
height: 100%;
|
||||
width: 100vw;
|
||||
max-width: 960px;
|
||||
|
||||
@media ${mobile} {
|
||||
margin: 0 auto;
|
||||
align-items: flex-start;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledBody = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 56px auto;
|
||||
|
||||
max-width: 960px;
|
||||
width: 100vw;
|
||||
|
||||
@media ${mobile} {
|
||||
margin: 0 auto;
|
||||
align-items: flex-start;
|
||||
}
|
||||
`;
|
||||
|
||||
export const LogoWrapper = styled.div`
|
||||
width: 386px;
|
||||
height: 44px;
|
||||
margin-top: auto;
|
||||
margin-bottom: 64px;
|
||||
margin-top: 56px;
|
||||
|
||||
@media ${mobile} {
|
||||
display: none;
|
||||
margin-top: 32px;
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -35,7 +35,7 @@ export interface DeepLinkProps {
|
||||
fileInfo?: TFile;
|
||||
userEmail?: string;
|
||||
|
||||
currentDeviceType: DeviceType;
|
||||
currentDeviceType?: DeviceType;
|
||||
deepLinkConfig?: TDeepLinkConfig;
|
||||
|
||||
setIsShowDeepLink: (value: boolean) => void;
|
||||
|
@ -35,12 +35,11 @@ import { Button, ButtonSize } from "@docspace/shared/components/button";
|
||||
import { Link, LinkType } from "@docspace/shared/components/link";
|
||||
import { FormWrapper } from "@docspace/shared/components/form-wrapper";
|
||||
import { getBgPattern } from "@docspace/shared/utils/common";
|
||||
import { getLogoUrl } from "@docspace/shared/utils";
|
||||
import { DeviceType, WhiteLabelLogoType } from "@docspace/shared/enums";
|
||||
import DocspaceLogo from "@docspace/shared/components/docspace-logo/DocspaceLogo";
|
||||
import { Scrollbar } from "@docspace/shared/components/scrollbar";
|
||||
|
||||
import { getDeepLink } from "./DeepLink.helper";
|
||||
import {
|
||||
StyledSimpleNav,
|
||||
StyledDeepLink,
|
||||
StyledBodyWrapper,
|
||||
StyledFileTile,
|
||||
@ -48,14 +47,15 @@ import {
|
||||
BgBlock,
|
||||
StyledWrapper,
|
||||
LogoWrapper,
|
||||
StyledBody,
|
||||
} from "./DeepLink.styled";
|
||||
import { DeepLinkProps } from "./DeepLink.types";
|
||||
|
||||
|
||||
const DeepLink = ({
|
||||
fileInfo,
|
||||
userEmail,
|
||||
setIsShowDeepLink,
|
||||
currentDeviceType,
|
||||
deepLinkConfig,
|
||||
}: DeepLinkProps) => {
|
||||
const { t } = useTranslation(["DeepLink", "Common"]);
|
||||
@ -95,73 +95,58 @@ const DeepLink = ({
|
||||
: fileInfo?.title || "";
|
||||
};
|
||||
|
||||
const renderLogo = () => {
|
||||
const logo = getLogoUrl(WhiteLabelLogoType.LightSmall, !theme.isBase);
|
||||
|
||||
if (currentDeviceType === DeviceType.mobile) {
|
||||
return (
|
||||
<StyledSimpleNav>
|
||||
<img src={logo} alt="" />
|
||||
</StyledSimpleNav>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<LogoWrapper>
|
||||
<img src={logo} alt="docspace-logo" />
|
||||
</LogoWrapper>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const bgPattern = getBgPattern(theme.currentColorScheme?.id);
|
||||
|
||||
const logoElement = renderLogo();
|
||||
|
||||
return (
|
||||
<StyledWrapper>
|
||||
{logoElement}
|
||||
<FormWrapper>
|
||||
<StyledDeepLink>
|
||||
<StyledBodyWrapper>
|
||||
<Text className="title">{t("DeepLink:OpeningDocument")}</Text>
|
||||
<StyledFileTile>
|
||||
<img src={getFileIcon()} alt="docspace-logo" />
|
||||
<Text fontSize="14px" fontWeight="600" truncate>
|
||||
{getFileTitle()}
|
||||
</Text>
|
||||
</StyledFileTile>
|
||||
<Text>{t("DeepLink:DeepLinkText")}</Text>
|
||||
</StyledBodyWrapper>
|
||||
<StyledActionsWrapper>
|
||||
<Checkbox
|
||||
label={t("Common:Remember")}
|
||||
isChecked={isRemember}
|
||||
onChange={onChangeCheckbox}
|
||||
/>
|
||||
<Button
|
||||
size={ButtonSize.medium}
|
||||
primary
|
||||
label={t("DeepLink:OpenInApp")}
|
||||
onClick={onOpenAppClick}
|
||||
/>
|
||||
<Link
|
||||
className="stay-link"
|
||||
type={LinkType.action}
|
||||
fontSize="13px"
|
||||
fontWeight="600"
|
||||
isHovered
|
||||
color={theme.currentColorScheme?.main?.accent}
|
||||
onClick={onStayBrowserClick}
|
||||
>
|
||||
{t("DeepLink:StayInBrowser")}
|
||||
</Link>
|
||||
</StyledActionsWrapper>
|
||||
</StyledDeepLink>
|
||||
</FormWrapper>
|
||||
<BgBlock bgPattern={bgPattern} />
|
||||
<Scrollbar>
|
||||
<StyledBody>
|
||||
<LogoWrapper>
|
||||
<DocspaceLogo className="docspace-logo" isResizable />
|
||||
</LogoWrapper>
|
||||
<FormWrapper>
|
||||
<StyledDeepLink>
|
||||
<StyledBodyWrapper>
|
||||
<Text className="title">{t("DeepLink:OpeningDocument")}</Text>
|
||||
<StyledFileTile>
|
||||
<img src={getFileIcon()} alt="docspace-logo" />
|
||||
<Text fontSize="14px" fontWeight="600" truncate>
|
||||
{getFileTitle()}
|
||||
</Text>
|
||||
</StyledFileTile>
|
||||
<Text>{t("DeepLink:DeepLinkText")}</Text>
|
||||
</StyledBodyWrapper>
|
||||
<StyledActionsWrapper>
|
||||
<Checkbox
|
||||
label={t("Common:Remember")}
|
||||
isChecked={isRemember}
|
||||
onChange={onChangeCheckbox}
|
||||
/>
|
||||
<Button
|
||||
size={ButtonSize.medium}
|
||||
primary
|
||||
label={t("DeepLink:OpenInApp")}
|
||||
onClick={onOpenAppClick}
|
||||
/>
|
||||
<Link
|
||||
className="stay-link"
|
||||
type={LinkType.action}
|
||||
fontSize="13px"
|
||||
fontWeight="600"
|
||||
isHovered
|
||||
color={theme.currentColorScheme?.main?.accent}
|
||||
onClick={onStayBrowserClick}
|
||||
>
|
||||
{t("DeepLink:StayInBrowser")}
|
||||
</Link>
|
||||
</StyledActionsWrapper>
|
||||
</StyledDeepLink>
|
||||
</FormWrapper>
|
||||
</StyledBody>
|
||||
</Scrollbar>
|
||||
</StyledWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeepLink;
|
||||
|
||||
|
@ -107,7 +107,6 @@ const Selector = ({
|
||||
withFooterCheckbox,
|
||||
footerCheckboxLabel,
|
||||
isChecked,
|
||||
setIsChecked,
|
||||
|
||||
items,
|
||||
renderCustomItem,
|
||||
@ -517,12 +516,10 @@ const Selector = ({
|
||||
footerCheckboxLabel,
|
||||
isChecked: isFooterCheckboxChecked,
|
||||
setIsFooterCheckboxChecked,
|
||||
setIsChecked,
|
||||
}
|
||||
: ({
|
||||
isChecked: isFooterCheckboxChecked,
|
||||
setIsFooterCheckboxChecked,
|
||||
setIsChecked,
|
||||
} as TSelectorFooterCheckbox);
|
||||
|
||||
const tabsProps: TWithTabs = withTabs
|
||||
|
@ -283,13 +283,11 @@ export type TSelectorCheckbox =
|
||||
withFooterCheckbox: true;
|
||||
footerCheckboxLabel: string;
|
||||
isChecked: boolean;
|
||||
setIsChecked: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
| {
|
||||
withFooterCheckbox?: undefined;
|
||||
footerCheckboxLabel?: undefined;
|
||||
isChecked?: boolean;
|
||||
setIsChecked?: undefined;
|
||||
};
|
||||
|
||||
export type TSelectorFooterCheckbox = TSelectorCheckbox & {
|
||||
|
@ -63,7 +63,6 @@ const Footer = React.memo(
|
||||
setNewFooterInputValue,
|
||||
isChecked,
|
||||
setIsFooterCheckboxChecked,
|
||||
setIsChecked,
|
||||
submitButtonId,
|
||||
cancelButtonId,
|
||||
|
||||
@ -82,8 +81,6 @@ const Footer = React.memo(
|
||||
};
|
||||
|
||||
const onChangeCheckbox = () => {
|
||||
setIsChecked?.((value: boolean) => !value);
|
||||
|
||||
setIsFooterCheckboxChecked?.((value: boolean) => !value);
|
||||
};
|
||||
|
||||
|
@ -510,7 +510,6 @@ const FilesSelector = ({
|
||||
withFooterCheckbox,
|
||||
footerCheckboxLabel,
|
||||
isChecked: false,
|
||||
setIsChecked: () => {},
|
||||
}
|
||||
: {};
|
||||
|
||||
|
@ -129,7 +129,6 @@ const PeopleSelector = ({
|
||||
withFooterCheckbox,
|
||||
footerCheckboxLabel,
|
||||
isChecked,
|
||||
setIsChecked,
|
||||
|
||||
withHeader,
|
||||
headerProps,
|
||||
@ -338,7 +337,6 @@ const PeopleSelector = ({
|
||||
withFooterCheckbox,
|
||||
footerCheckboxLabel,
|
||||
isChecked,
|
||||
setIsChecked,
|
||||
}
|
||||
: {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user