Merge branch 'master' of github.com:ONLYOFFICE/AppServer

This commit is contained in:
Alexey Safronov 2019-12-27 14:40:58 +03:00
commit 40f9516af3
8 changed files with 33 additions and 15 deletions

View File

@ -124,7 +124,8 @@ class SectionBodyContent extends React.Component {
}
: {
key: GUID_EMPTY,
label: t("CustomAddEmployee", { typeUser })
label: t("CustomAddEmployee", { typeUser }),
default: true
}
};
@ -322,7 +323,8 @@ class SectionBodyContent extends React.Component {
isDisabled={inLoading}
selectedOption={{
key: 0,
label: t("AddMembers")
label: t("AddMembers"),
default: true
}}
scaled={true}
size="content"

View File

@ -31,6 +31,7 @@ const getFormatedGroups = (user, status) => {
type='action'
title={temp[0].label}
fontSize='12px'
fontWeight={600}
color={linkColor}
onClick={temp[0].onClick}
>
@ -43,6 +44,7 @@ const getFormatedGroups = (user, status) => {
containerWidth='160px'
title={temp[0].label}
fontSize='12px'
fontWeight={600}
color={linkColor}
data={temp}
>
@ -95,6 +97,7 @@ const UserContent = ({ user, history, settings }) => {
as="div"
color={sideInfoColor}
fontSize='12px'
fontWeight={600}
title={title}
truncate={true}
>
@ -103,8 +106,8 @@ const UserContent = ({ user, history, settings }) => {
: <div style={headDepartmentStyle}></div>
}
{groups}
<Link type='page' title={mobilePhone} fontSize='12px' color={sideInfoColor} onClick={onPhoneClick} isTextOverflow={true}>{mobilePhone}</Link>
<Link containerWidth='220px' type='page' title={email} fontSize='12px' color={sideInfoColor} onClick={onEmailClick} isTextOverflow={true}>{email}</Link>
<Link type='page' title={mobilePhone} fontSize='12px' fontWeight={600} color={sideInfoColor} onClick={onPhoneClick} isTextOverflow={true}>{mobilePhone}</Link>
<Link containerWidth='220px' type='page' title={email} fontSize='12px' fontWeight={600} color={sideInfoColor} onClick={onEmailClick} isTextOverflow={true}>{email}</Link>
</RowContent>
);
};

View File

@ -12,10 +12,6 @@ const Container = styled.div`
width: 120px;
margin: 0 8px 0 0;
}
.field-select > div > div:first-child.combo-button-label {
color: #A3A9AE;
}
`;
const getOptions = (patterns, keyPrefix) => {
@ -104,7 +100,8 @@ class ContactsField extends React.Component {
selectedOption={{
key: prefix,
label: addItemText,
value: ""
value: "",
default: true
}}
isDisabled={isDisabled}
scaled={true}

View File

@ -1,6 +1,6 @@
{
"name": "asc-web-components",
"version": "1.0.285",
"version": "1.0.287",
"description": "Ascensio System SIA component library",
"license": "AGPL-3.0",
"main": "dist/asc-web-components.js",

View File

@ -36,8 +36,12 @@ const StyledFilterItem = styled.div`
const StyledFilterItemContent = styled.div`
display: flex;
padding: 5px 0 2px 7px;
padding: 5px 4px 2px 7px;
${props =>
props.isOpen && !props.isDisabled &&
css`
background: #ECEEF1;
`}
${props =>
!props.isDisabled &&
css`
@ -95,7 +99,8 @@ class FilterItem extends React.Component {
super(props);
this.state = {
id: this.props.id
id: this.props.id,
isOpen: false
};
}
@ -114,7 +119,7 @@ class FilterItem extends React.Component {
render() {
return (
<StyledFilterItem key={this.state.id} id={this.state.id} block={this.props.block} opened={this.props.opened} >
<StyledFilterItemContent isDisabled={this.props.isDisabled}>
<StyledFilterItemContent isDisabled={this.props.isDisabled} isOpen={this.state.isOpen}>
{this.props.groupLabel}:
{this.props.groupItems.length > 1 ?
<StyledComboBox
@ -130,6 +135,11 @@ class FilterItem extends React.Component {
noBorder={true}
opened={this.props.opened}
directionX='left'
toggleAction={(e,isOpen)=>{
this.setState({
isOpen: !isOpen
})
}}
></StyledComboBox>
: <StyledFilterName>{this.props.label}</StyledFilterName>
}

View File

@ -26,6 +26,7 @@ import { LinkWithDropdown } from "asc-web-components";
| `data` | `array` | - | - | - | Array of objects, each can contain `<DropDownItem />` props |
| `dropdownType` | `oneOf` | ✅ | `alwaysDotted, appearDottedAfterHover` | - | Type of dropdown: alwaysDotted is always show dotted style and icon of arrow, appearDottedAfterHover is show dotted style and icon arrow only after hover |
| `fontSize` | `string` | - | - | `13px` | Font size of link |
| `fontWeight` |`number, string`| - | - | - | Font weight of link |
| `id` | `string` | - | - | - | Accepts id |
| `isBold` | `bool` | - | - | `false` | Set font weight |
| `isSemitransparent` | `bool` | - | - | `false` | Set css-property 'opacity' to 0.5. Usually apply for users with "pending" status | |

View File

@ -9,13 +9,14 @@ import { handleAnyClick } from "../../utils/event";
import isEqual from "lodash/isEqual";
// eslint-disable-next-line no-unused-vars
const SimpleLinkWithDropdown = ({ isBold, fontSize, isTextOverflow, isHovered, isSemitransparent, color, title, dropdownType, data,
const SimpleLinkWithDropdown = ({ isBold, fontSize, fontWeight, isTextOverflow, isHovered, isSemitransparent, color, title, dropdownType, data,
...props
}) => <a {...props}></a>;
SimpleLinkWithDropdown.propTypes = {
isBold: PropTypes.bool,
fontSize: PropTypes.number,
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
isTextOverflow: PropTypes.bool,
isHovered: PropTypes.bool,
isSemitransparent: PropTypes.bool,
@ -169,6 +170,7 @@ class LinkWithDropdown extends React.Component {
dropdownType,
isTextOverflow,
fontSize,
fontWeight,
color,
isBold,
title,
@ -199,6 +201,7 @@ class LinkWithDropdown extends React.Component {
isTextOverflow={isTextOverflow}
truncate={isTextOverflow}
fontSize={fontSize}
fontWeight={fontWeight}
color={color}
isBold={isBold}
title={title}
@ -238,6 +241,7 @@ LinkWithDropdown.propTypes = {
data: PropTypes.array,
dropdownType: PropTypes.oneOf(["alwaysDashed", "appearDashedAfterHover"]).isRequired,
fontSize: PropTypes.string,
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
isBold: PropTypes.bool,
isSemitransparent: PropTypes.bool,
isTextOverflow: PropTypes.bool,

View File

@ -40,6 +40,7 @@ storiesOf('Components|LinkWithDropdown', module)
dropdownType={select('dropdownType', dropdownType, 'alwaysDashed')}
color={color('color', '#333333')}
fontSize={text('fontSize', '13px')}
fontWeight={text('fontWeight', '400')}
isBold={boolean('isBold', false)}
title={text('title', undefined)}
isTextOverflow={boolean('isTextOverflow', false)}