Merge branch 'master' into feature/new-login-page
# Conflicts: # web/ASC.Web.Components/src/components/input-block/index.js # web/ASC.Web.Components/src/components/password-input/index.js
This commit is contained in:
commit
d192f50953
@ -322,7 +322,7 @@ namespace ASC.Core.Data
|
||||
return JsonSerializer.Deserialize<T>(data);
|
||||
}
|
||||
|
||||
private string Serialize(ISettings settings)
|
||||
private string Serialize<T>(T settings)
|
||||
{
|
||||
return JsonSerializer.Serialize(settings);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-components",
|
||||
"version": "1.0.367",
|
||||
"version": "1.0.368",
|
||||
"description": "Ascensio System SIA component library",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "dist/asc-web-components.js",
|
||||
|
@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled from 'styled-components';
|
||||
import TextInput from '../text-input';
|
||||
import { Icons } from '../icons';
|
||||
import IconButton from '../icon-button';
|
||||
import commonInputStyle from '../text-input/common-input-styles';
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import styled from "styled-components";
|
||||
import TextInput from "../text-input";
|
||||
import { Icons } from "../icons";
|
||||
import IconButton from "../icon-button";
|
||||
import commonInputStyle from "../text-input/common-input-styles";
|
||||
|
||||
const iconNames = Object.keys(Icons);
|
||||
|
||||
@ -27,9 +27,14 @@ const StyledChildrenBlock = styled.div`
|
||||
`;
|
||||
|
||||
// eslint-disable-next-line react/prop-types, no-unused-vars
|
||||
const CustomInputGroup = ({ isIconFill, hasError, hasWarning, isDisabled, scale, ...props }) => (
|
||||
<div {...props}></div>
|
||||
);
|
||||
const CustomInputGroup = ({
|
||||
isIconFill,
|
||||
hasError,
|
||||
hasWarning,
|
||||
isDisabled,
|
||||
scale,
|
||||
...props
|
||||
}) => <div {...props}></div>;
|
||||
const StyledInputGroup = styled(CustomInputGroup)`
|
||||
display: flex;
|
||||
|
||||
@ -50,12 +55,13 @@ class InputBlock extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
onIconClick = (e) => {
|
||||
if (typeof this.props.onIconClick === "function" && !this.props.isDisabled) this.props.onIconClick(e);
|
||||
}
|
||||
onChange = (e) => {
|
||||
onIconClick = e => {
|
||||
if (typeof this.props.onIconClick === "function" && !this.props.isDisabled)
|
||||
this.props.onIconClick(e);
|
||||
};
|
||||
onChange = e => {
|
||||
if (typeof this.props.onChange === "function") this.props.onChange(e);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
let iconButtonSize = 0;
|
||||
@ -94,16 +100,16 @@ class InputBlock extends React.Component {
|
||||
iconButtonSize = iconSize;
|
||||
} else {
|
||||
switch (size) {
|
||||
case 'base':
|
||||
case "base":
|
||||
iconButtonSize = 15;
|
||||
break;
|
||||
case 'middle':
|
||||
case "middle":
|
||||
iconButtonSize = 18;
|
||||
break;
|
||||
case 'big':
|
||||
case "big":
|
||||
iconButtonSize = 21;
|
||||
break;
|
||||
case 'huge':
|
||||
case "huge":
|
||||
iconButtonSize = 24;
|
||||
break;
|
||||
}
|
||||
@ -120,9 +126,7 @@ class InputBlock extends React.Component {
|
||||
style={style}
|
||||
>
|
||||
<div className="prepend">
|
||||
<StyledChildrenBlock>
|
||||
{children}
|
||||
</StyledChildrenBlock>
|
||||
<StyledChildrenBlock>{children}</StyledChildrenBlock>
|
||||
</div>
|
||||
<TextInput
|
||||
id={id}
|
||||
@ -147,13 +151,13 @@ class InputBlock extends React.Component {
|
||||
mask={mask}
|
||||
keepCharPositions={keepCharPositions}
|
||||
/>
|
||||
{
|
||||
iconNames.includes(iconName) && (
|
||||
{iconNames.includes(iconName) && (
|
||||
<div className="append">
|
||||
<StyledIconBlock
|
||||
isDisabled={isDisabled}
|
||||
onClick={this.onIconClick}
|
||||
isClickable={typeof onIconClick === 'function'}>
|
||||
isClickable={typeof onIconClick === "function"}
|
||||
>
|
||||
<IconButton
|
||||
size={iconButtonSize}
|
||||
color={iconColor}
|
||||
@ -161,7 +165,7 @@ class InputBlock extends React.Component {
|
||||
iconName={iconName}
|
||||
isFill={isIconFill}
|
||||
isDisabled={isDisabled}
|
||||
isClickable={typeof onIconClick === 'function'}
|
||||
isClickable={typeof onIconClick === "function"}
|
||||
/>
|
||||
</StyledIconBlock>
|
||||
</div>
|
||||
@ -172,17 +176,16 @@ class InputBlock extends React.Component {
|
||||
}
|
||||
|
||||
InputBlock.propTypes = {
|
||||
|
||||
id: PropTypes.string,
|
||||
name: PropTypes.string,
|
||||
type: PropTypes.oneOf(['text', 'password']),
|
||||
type: PropTypes.oneOf(["text", "password"]),
|
||||
maxLength: PropTypes.number,
|
||||
placeholder: PropTypes.string,
|
||||
tabIndex: PropTypes.number,
|
||||
mask: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
|
||||
keepCharPositions: PropTypes.bool,
|
||||
|
||||
size: PropTypes.oneOf(['base', 'middle', 'big', 'huge', 'large']),
|
||||
size: PropTypes.oneOf(["base", "middle", "big", "huge", "large"]),
|
||||
scale: PropTypes.bool,
|
||||
|
||||
onChange: PropTypes.func,
|
||||
@ -210,26 +213,25 @@ InputBlock.propTypes = {
|
||||
|
||||
className: PropTypes.string,
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
|
||||
}
|
||||
};
|
||||
|
||||
InputBlock.defaultProps = {
|
||||
|
||||
type: 'text',
|
||||
type: "text",
|
||||
maxLength: 255,
|
||||
size: 'base',
|
||||
size: "base",
|
||||
scale: false,
|
||||
tabIndex: -1,
|
||||
hasError: false,
|
||||
hasWarning: false,
|
||||
autoComplete: 'off',
|
||||
autoComplete: "off",
|
||||
|
||||
value: '',
|
||||
value: "",
|
||||
iconName: "",
|
||||
iconColor: "#ffffff",
|
||||
hoverColor: "#ffffff",
|
||||
isIconFill: false,
|
||||
isDisabled: false,
|
||||
keepCharPositions: false
|
||||
}
|
||||
};
|
||||
|
||||
export default InputBlock
|
||||
export default InputBlock;
|
||||
|
@ -1,22 +1,24 @@
|
||||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import PropTypes from "prop-types";
|
||||
import isEqual from "lodash/isEqual";
|
||||
|
||||
import { tablet } from '../../utils/device';
|
||||
import InputBlock from '../input-block'
|
||||
import { Icons } from '../icons'
|
||||
import Link from '../link'
|
||||
import Text from '../text'
|
||||
import { tablet } from "../../utils/device";
|
||||
import InputBlock from "../input-block";
|
||||
import { Icons } from "../icons";
|
||||
import Link from "../link";
|
||||
import Text from "../text";
|
||||
import Tooltip from "../tooltip";
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const SimpleInput = ({ onValidateInput, onCopyToClipboard, ...props }) => <div {...props}></div>;
|
||||
const SimpleInput = ({ onValidateInput, onCopyToClipboard, ...props }) => (
|
||||
<div {...props}></div>
|
||||
);
|
||||
|
||||
SimpleInput.propTypes = {
|
||||
onValidateInput: PropTypes.func,
|
||||
onCopyToClipboard: PropTypes.func
|
||||
}
|
||||
};
|
||||
|
||||
const StyledInput = styled(SimpleInput)`
|
||||
display: flex;
|
||||
@ -35,7 +37,7 @@ const StyledInput = styled(SimpleInput)`
|
||||
`;
|
||||
|
||||
const PasswordProgress = styled.div`
|
||||
${props => props.inputWidth ? `width: ${props.inputWidth};` : `flex: auto;`}
|
||||
${props => (props.inputWidth ? `width: ${props.inputWidth};` : `flex: auto;`)}
|
||||
|
||||
.input-relative {
|
||||
position: relative;
|
||||
@ -80,14 +82,17 @@ const CopyLink = styled.div`
|
||||
|
||||
const TooltipStyle = styled.div`
|
||||
.__react_component_tooltip {
|
||||
|
||||
}
|
||||
`;
|
||||
const Progress = styled.div`
|
||||
border: 1.5px solid ${props => (!props.isDisabled && props.progressColor) ? props.progressColor : 'transparent'};
|
||||
border: 1.5px solid
|
||||
${props =>
|
||||
!props.isDisabled && props.progressColor
|
||||
? props.progressColor
|
||||
: "transparent"};
|
||||
border-radius: 2px;
|
||||
margin-top: -1px;
|
||||
width: ${props => props.progressWidth ? props.progressWidth + '%' : '0%'};
|
||||
width: ${props => (props.progressWidth ? props.progressWidth + "%" : "0%")};
|
||||
`;
|
||||
|
||||
const StyledTooltipContainer = styled(Text)`
|
||||
@ -97,11 +102,10 @@ const StyledTooltipContainer = styled(Text)`
|
||||
const StyledTooltipItem = styled(Text)`
|
||||
margin-left: 8px;
|
||||
height: 24px;
|
||||
color: ${props => props.valid ? '#44bb00' : '#B40404'};
|
||||
color: ${props => (props.valid ? "#44bb00" : "#B40404")};
|
||||
`;
|
||||
|
||||
class PasswordInput extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
@ -112,7 +116,7 @@ class PasswordInput extends React.Component {
|
||||
|
||||
this.state = {
|
||||
type: inputType,
|
||||
progressColor: 'transparent',
|
||||
progressColor: "transparent",
|
||||
progressWidth: 0,
|
||||
inputValue: inputValue,
|
||||
copyLabel: clipActionResource,
|
||||
@ -122,41 +126,39 @@ class PasswordInput extends React.Component {
|
||||
validDigits: false,
|
||||
validCapital: false,
|
||||
validSpecial: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
onBlur = () => {
|
||||
this.refTooltip.current.hideTooltip();
|
||||
}
|
||||
};
|
||||
|
||||
changeInputType = () => {
|
||||
this.refTooltip.current.hideTooltip();
|
||||
const newType = this.state.type === 'text' ? 'password' : 'text';
|
||||
const newType = this.state.type === "text" ? "password" : "text";
|
||||
|
||||
this.setState({
|
||||
type: newType
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
testStrength = value => {
|
||||
const { generatorSpecial, passwordSettings } = this.props;
|
||||
const specSymbols = new RegExp('[' + generatorSpecial + ']');
|
||||
const specSymbols = new RegExp("[" + generatorSpecial + "]");
|
||||
|
||||
let capital;
|
||||
let digits;
|
||||
let special;
|
||||
|
||||
passwordSettings.upperCase
|
||||
? capital = /[A-Z]/.test(value)
|
||||
: capital = true;
|
||||
? (capital = /[A-Z]/.test(value))
|
||||
: (capital = true);
|
||||
|
||||
passwordSettings.digits
|
||||
? digits = /\d/.test(value)
|
||||
: digits = true;
|
||||
passwordSettings.digits ? (digits = /\d/.test(value)) : (digits = true);
|
||||
|
||||
passwordSettings.specSymbols
|
||||
? special = specSymbols.test(value)
|
||||
: special = true;
|
||||
? (special = specSymbols.test(value))
|
||||
: (special = true);
|
||||
|
||||
return {
|
||||
digits: digits,
|
||||
@ -164,21 +166,23 @@ class PasswordInput extends React.Component {
|
||||
special: special,
|
||||
length: value.trim().length >= passwordSettings.minLength
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
checkPassword = (value) => {
|
||||
const greenColor = '#44bb00';
|
||||
const redColor = '#B40404';
|
||||
checkPassword = value => {
|
||||
const greenColor = "#44bb00";
|
||||
const redColor = "#B40404";
|
||||
const passwordValidation = this.testStrength(value);
|
||||
const progressScore = passwordValidation.digits
|
||||
&& passwordValidation.capital
|
||||
&& passwordValidation.special
|
||||
&& passwordValidation.length;
|
||||
const progressWidth = value.trim().length * 100 / this.props.passwordSettings.minLength;
|
||||
const progressScore =
|
||||
passwordValidation.digits &&
|
||||
passwordValidation.capital &&
|
||||
passwordValidation.special &&
|
||||
passwordValidation.length;
|
||||
const progressWidth =
|
||||
(value.trim().length * 100) / this.props.passwordSettings.minLength;
|
||||
const progressColor = progressScore
|
||||
? greenColor
|
||||
: (value.length === 0)
|
||||
? 'transparent'
|
||||
: value.length === 0
|
||||
? "transparent"
|
||||
: redColor;
|
||||
|
||||
this.props.onValidateInput && this.props.onValidateInput(progressScore);
|
||||
@ -192,49 +196,47 @@ class PasswordInput extends React.Component {
|
||||
validCapital: passwordValidation.capital,
|
||||
validSpecial: passwordValidation.special
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onChangeAction = (e) => {
|
||||
onChangeAction = e => {
|
||||
this.props.onChange && this.props.onChange(e);
|
||||
|
||||
if (this.props.simpleView) {
|
||||
this.setState(
|
||||
{
|
||||
this.setState({
|
||||
inputValue: e.target.value
|
||||
}
|
||||
);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.checkPassword(e.target.value);
|
||||
}
|
||||
};
|
||||
|
||||
onGeneratePassword = (e) => {
|
||||
if (this.props.isDisabled)
|
||||
return e.preventDefault();
|
||||
onGeneratePassword = e => {
|
||||
if (this.props.isDisabled) return e.preventDefault();
|
||||
|
||||
const newPassword = this.getNewPassword();
|
||||
|
||||
if (this.state.type !== 'text') {
|
||||
if (this.state.type !== "text") {
|
||||
this.setState({
|
||||
type: 'text'
|
||||
type: "text"
|
||||
});
|
||||
}
|
||||
|
||||
this.checkPassword(newPassword);
|
||||
this.props.onChange && this.props.onChange({ target: { value: newPassword } });
|
||||
}
|
||||
this.props.onChange &&
|
||||
this.props.onChange({ target: { value: newPassword } });
|
||||
};
|
||||
|
||||
getNewPassword = () => {
|
||||
const { passwordSettings, generatorSpecial } = this.props;
|
||||
|
||||
const length = passwordSettings.minLength;
|
||||
const string = 'abcdefghijklmnopqrstuvwxyz';
|
||||
const numeric = '0123456789';
|
||||
const string = "abcdefghijklmnopqrstuvwxyz";
|
||||
const numeric = "0123456789";
|
||||
const special = generatorSpecial;
|
||||
|
||||
let password = '';
|
||||
let character = '';
|
||||
let password = "";
|
||||
let character = "";
|
||||
|
||||
while (password.length < length) {
|
||||
const a = Math.ceil(string.length * Math.random() * Math.random());
|
||||
@ -244,9 +246,7 @@ class PasswordInput extends React.Component {
|
||||
let hold = string.charAt(a);
|
||||
|
||||
if (passwordSettings.upperCase) {
|
||||
hold = (password.length % 2 == 0)
|
||||
? (hold.toUpperCase())
|
||||
: (hold);
|
||||
hold = password.length % 2 == 0 ? hold.toUpperCase() : hold;
|
||||
}
|
||||
|
||||
character += hold;
|
||||
@ -263,33 +263,44 @@ class PasswordInput extends React.Component {
|
||||
}
|
||||
|
||||
password = password
|
||||
.split('')
|
||||
.split("")
|
||||
.sort(() => 0.5 - Math.random())
|
||||
.join('');
|
||||
.join("");
|
||||
|
||||
return password.substr(0, length);
|
||||
}
|
||||
};
|
||||
|
||||
copyToClipboard = emailInputName => {
|
||||
const { clipEmailResource, clipPasswordResource, clipActionResource, clipCopiedResource, isDisabled, onCopyToClipboard } = this.props;
|
||||
const {
|
||||
clipEmailResource,
|
||||
clipPasswordResource,
|
||||
clipActionResource,
|
||||
clipCopiedResource,
|
||||
isDisabled,
|
||||
onCopyToClipboard
|
||||
} = this.props;
|
||||
const { disableCopyAction, inputValue } = this.state;
|
||||
|
||||
if (isDisabled || disableCopyAction)
|
||||
return event.preventDefault();
|
||||
if (isDisabled || disableCopyAction) return event.preventDefault();
|
||||
|
||||
this.setState({
|
||||
disableCopyAction: true,
|
||||
copyLabel: clipCopiedResource
|
||||
})
|
||||
});
|
||||
|
||||
const textField = document.createElement('textarea');
|
||||
const textField = document.createElement("textarea");
|
||||
const emailValue = document.getElementsByName(emailInputName)[0].value;
|
||||
const formattedText = clipEmailResource + emailValue + ' | ' + clipPasswordResource + inputValue;
|
||||
const formattedText =
|
||||
clipEmailResource +
|
||||
emailValue +
|
||||
" | " +
|
||||
clipPasswordResource +
|
||||
inputValue;
|
||||
|
||||
textField.innerText = formattedText;
|
||||
document.body.appendChild(textField);
|
||||
textField.select();
|
||||
document.execCommand('copy');
|
||||
document.execCommand("copy");
|
||||
textField.remove();
|
||||
|
||||
onCopyToClipboard && onCopyToClipboard(formattedText);
|
||||
@ -298,9 +309,9 @@ class PasswordInput extends React.Component {
|
||||
this.setState({
|
||||
disableCopyAction: false,
|
||||
copyLabel: clipActionResource
|
||||
})
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
};
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
|
||||
@ -347,34 +358,51 @@ class PasswordInput extends React.Component {
|
||||
disableCopyAction
|
||||
} = this.state;
|
||||
|
||||
const iconsColor = isDisabled ? '#D0D5DA' : '#A3A9AE';
|
||||
const iconName = type === 'password' ? 'EyeOffIcon' : 'EyeIcon';
|
||||
const iconsColor = isDisabled ? "#D0D5DA" : "#A3A9AE";
|
||||
const iconName = type === "password" ? "EyeOffIcon" : "EyeIcon";
|
||||
|
||||
const tooltipContent = (
|
||||
<StyledTooltipContainer forwardedAs='div' title={tooltipPasswordTitle}>
|
||||
<StyledTooltipContainer forwardedAs="div" title={tooltipPasswordTitle}>
|
||||
{tooltipPasswordTitle}
|
||||
<StyledTooltipItem forwardedAs='div' title={tooltipPasswordLength} valid={validLength} >
|
||||
<StyledTooltipItem
|
||||
forwardedAs="div"
|
||||
title={tooltipPasswordLength}
|
||||
valid={validLength}
|
||||
>
|
||||
{tooltipPasswordLength}
|
||||
</StyledTooltipItem>
|
||||
{passwordSettings.digits &&
|
||||
<StyledTooltipItem forwardedAs='div' title={tooltipPasswordDigits} valid={validDigits} >
|
||||
{passwordSettings.digits && (
|
||||
<StyledTooltipItem
|
||||
forwardedAs="div"
|
||||
title={tooltipPasswordDigits}
|
||||
valid={validDigits}
|
||||
>
|
||||
{tooltipPasswordDigits}
|
||||
</StyledTooltipItem>
|
||||
}
|
||||
{passwordSettings.upperCase &&
|
||||
<StyledTooltipItem forwardedAs='div' title={tooltipPasswordCapital} valid={validCapital} >
|
||||
)}
|
||||
{passwordSettings.upperCase && (
|
||||
<StyledTooltipItem
|
||||
forwardedAs="div"
|
||||
title={tooltipPasswordCapital}
|
||||
valid={validCapital}
|
||||
>
|
||||
{tooltipPasswordCapital}
|
||||
</StyledTooltipItem>
|
||||
}
|
||||
{passwordSettings.specSymbols &&
|
||||
<StyledTooltipItem forwardedAs='div' title={tooltipPasswordSpecial} valid={validSpecial} >
|
||||
)}
|
||||
{passwordSettings.specSymbols && (
|
||||
<StyledTooltipItem
|
||||
forwardedAs="div"
|
||||
title={tooltipPasswordSpecial}
|
||||
valid={validSpecial}
|
||||
>
|
||||
{tooltipPasswordSpecial}
|
||||
</StyledTooltipItem>
|
||||
}
|
||||
)}
|
||||
</StyledTooltipContainer>
|
||||
);
|
||||
|
||||
const inputGroup = <>
|
||||
const inputGroup = (
|
||||
<>
|
||||
<InputBlock
|
||||
className="input-relative"
|
||||
id={id}
|
||||
@ -398,8 +426,7 @@ class PasswordInput extends React.Component {
|
||||
tabIndex={tabIndex}
|
||||
maxLength={maxLength}
|
||||
autoComplete={autoComplete}
|
||||
>
|
||||
</InputBlock>
|
||||
></InputBlock>
|
||||
<TooltipStyle>
|
||||
<Tooltip
|
||||
id="tooltipContent"
|
||||
@ -411,14 +438,25 @@ class PasswordInput extends React.Component {
|
||||
{tooltipContent}
|
||||
</Tooltip>
|
||||
</TooltipStyle>
|
||||
<Progress progressColor={progressColor} progressWidth={progressWidth} isDisabled={isDisabled} />
|
||||
<Progress
|
||||
progressColor={progressColor}
|
||||
progressWidth={progressWidth}
|
||||
isDisabled={isDisabled}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledInput onValidateInput={onValidateInput} className={className} style={style}>
|
||||
{simpleView
|
||||
? inputGroup
|
||||
: <><PasswordProgress
|
||||
<StyledInput
|
||||
onValidateInput={onValidateInput}
|
||||
className={className}
|
||||
style={style}
|
||||
>
|
||||
{simpleView ? (
|
||||
inputGroup
|
||||
) : (
|
||||
<>
|
||||
<PasswordProgress
|
||||
inputWidth={inputWidth}
|
||||
data-for="tooltipContent"
|
||||
data-tip=""
|
||||
@ -439,7 +477,7 @@ class PasswordInput extends React.Component {
|
||||
<Link
|
||||
type="action"
|
||||
isHovered={true}
|
||||
fontSize='13px'
|
||||
fontSize="13px"
|
||||
color={iconsColor}
|
||||
isSemitransparent={disableCopyAction}
|
||||
onClick={this.copyToClipboard.bind(this, emailInputName)}
|
||||
@ -448,7 +486,7 @@ class PasswordInput extends React.Component {
|
||||
</Link>
|
||||
</CopyLink>
|
||||
</>
|
||||
}
|
||||
)}
|
||||
</StyledInput>
|
||||
);
|
||||
}
|
||||
@ -457,7 +495,7 @@ class PasswordInput extends React.Component {
|
||||
PasswordInput.propTypes = {
|
||||
id: PropTypes.string,
|
||||
autoComplete: PropTypes.string,
|
||||
inputType: PropTypes.oneOf(['text', 'password']),
|
||||
inputType: PropTypes.oneOf(["text", "password"]),
|
||||
inputName: PropTypes.string,
|
||||
emailInputName: PropTypes.string,
|
||||
inputValue: PropTypes.string,
|
||||
@ -472,7 +510,7 @@ PasswordInput.propTypes = {
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
||||
|
||||
isDisabled: PropTypes.bool,
|
||||
size: PropTypes.oneOf(['base', 'middle', 'big', 'huge', 'large']),
|
||||
size: PropTypes.oneOf(["base", "middle", "big", "huge", "large"]),
|
||||
scale: PropTypes.bool,
|
||||
|
||||
clipActionResource: PropTypes.string,
|
||||
@ -495,26 +533,26 @@ PasswordInput.propTypes = {
|
||||
tooltipOffsetLeft: PropTypes.number,
|
||||
|
||||
simpleView: PropTypes.bool
|
||||
}
|
||||
};
|
||||
|
||||
PasswordInput.defaultProps = {
|
||||
inputType: 'password',
|
||||
inputName: 'passwordInput',
|
||||
autoComplete: 'new-password',
|
||||
inputType: "password",
|
||||
inputName: "passwordInput",
|
||||
autoComplete: "new-password",
|
||||
|
||||
isDisabled: false,
|
||||
size: 'base',
|
||||
size: "base",
|
||||
scale: true,
|
||||
|
||||
clipEmailResource: 'E-mail ',
|
||||
clipPasswordResource: 'Password ',
|
||||
clipCopiedResource: 'Copied',
|
||||
clipEmailResource: "E-mail ",
|
||||
clipPasswordResource: "Password ",
|
||||
clipCopiedResource: "Copied",
|
||||
|
||||
generatorSpecial: '!@#$%^&*',
|
||||
className: '',
|
||||
generatorSpecial: "!@#$%^&*",
|
||||
className: "",
|
||||
tooltipOffsetLeft: 110,
|
||||
|
||||
simpleView: false
|
||||
}
|
||||
};
|
||||
|
||||
export default PasswordInput;
|
||||
|
Loading…
Reference in New Issue
Block a user