Merge branch 'master' of github.com:ONLYOFFICE/CommunityServer-AspNetCore
Conflicts: .gitignore
This commit is contained in:
commit
9053c40fa1
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,4 +11,5 @@
|
||||
**/storybook-static/
|
||||
/web/ASC.Web.Components/dist
|
||||
/build/deploy
|
||||
*.log
|
||||
/web/npm-local
|
||||
|
@ -1,23 +1,18 @@
|
||||
PUSHD %~dp0
|
||||
PUSHD %~dp0..
|
||||
echo "ASC.Web.Components"
|
||||
cd ../web/ASC.Web.Components
|
||||
call npm ci
|
||||
call npm ci --prefix web/ASC.Web.Components
|
||||
|
||||
echo "ASC.Web.Storybook"
|
||||
cd ../ASC.Web.Storybook
|
||||
call npm ci
|
||||
call npm ci --prefix web/ASC.Web.Storybook
|
||||
|
||||
echo "ASC.Web.Client"
|
||||
cd ../ASC.Web.Client
|
||||
call npm ci
|
||||
call npm ci --prefix web/ASC.Web.Client
|
||||
|
||||
echo "ASC.Web.People.Client"
|
||||
cd ../../products/ASC.People/Client
|
||||
call npm ci
|
||||
call npm run build
|
||||
call npm ci --prefix products/ASC.People/Client
|
||||
call npm run build --prefix products/ASC.People/Client
|
||||
|
||||
echo "ASC.Web.sln"
|
||||
cd ../../../
|
||||
call dotnet build ASC.Web.sln /fl1 /flp1:LogFile=build/ASC.Web.log;Verbosity=Normal
|
||||
|
||||
pause
|
@ -1,3 +1,2 @@
|
||||
echo "RUN ASC.Web.Studio"
|
||||
cd ../web/ASC.Web.Client/
|
||||
call set BROWSER=none&&npm start
|
||||
call set BROWSER=none&&npm start --prefix ../web/ASC.Web.Client/
|
@ -1,3 +1,2 @@
|
||||
echo "RUN ASC.Web.Studio"
|
||||
cd ../products/ASC.People/Client
|
||||
call set BROWSER=none&&npm start
|
||||
call set BROWSER=none&&npm start --prefix ../products/ASC.People/Client
|
@ -25,7 +25,19 @@ namespace ASC.Common.DependencyInjection
|
||||
{
|
||||
public static IContainer AddAutofac(this IServiceCollection services, IConfiguration configuration, string currentDir)
|
||||
{
|
||||
var productsDir = Path.GetFullPath(Path.Combine(currentDir, configuration["core:products:folder"]));
|
||||
var folder = configuration["core:products:folder"];
|
||||
var subfolder = configuration["core:products:subfolder"];
|
||||
string productsDir;
|
||||
|
||||
if (currentDir.EndsWith(Path.Combine(Path.GetFileName(folder), Assembly.GetCallingAssembly().GetName().Name, subfolder)))
|
||||
{
|
||||
productsDir = Path.GetFullPath(Path.Combine("..", ".."));
|
||||
}
|
||||
else
|
||||
{
|
||||
productsDir = Path.GetFullPath(Path.Combine(currentDir, folder));
|
||||
}
|
||||
|
||||
var module = new ConfigurationModule(configuration);
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterModule(module);
|
||||
@ -68,7 +80,7 @@ namespace ASC.Common.DependencyInjection
|
||||
void LoadAssembly(string type)
|
||||
{
|
||||
var dll = type.Substring(type.IndexOf(",") + 1).Trim();
|
||||
var productPath = Path.Combine(productsDir, dll, configuration["core:products:subfolder"]);
|
||||
var productPath = Path.Combine(productsDir, dll, subfolder);
|
||||
var path = GetPath(Path.Combine(productPath, "bin"), dll, SearchOption.AllDirectories) ?? GetPath(productPath, dll, SearchOption.TopDirectoryOnly);
|
||||
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
|
@ -1,36 +1,104 @@
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import React from 'react'
|
||||
import ReactDOMServer from 'react-dom/server'
|
||||
import PropTypes from 'prop-types'
|
||||
import styled from 'styled-components';
|
||||
import styled from 'styled-components'
|
||||
import { Icons } from '../icons'
|
||||
import { getCssFromSvg } from '../icons/get-css-from-svg'
|
||||
|
||||
const borderColor = '#D0D5DA',
|
||||
activeColor = '#333333',
|
||||
disableColor = '#A3A9AE';
|
||||
const activeColor = '#333333',
|
||||
disableColor = '#A3A9AE';
|
||||
|
||||
var checkboxIcon,
|
||||
checkboxСheckedIcon,
|
||||
сheckboxDisabledIcon,
|
||||
сheckboxHoverIcon,
|
||||
сheckboxIndeterminateIcon,
|
||||
checkboxCheckedDisabledIcon,
|
||||
checkboxCheckedHoverIcon,
|
||||
checkboxIndeterminateDisabledIcon,
|
||||
checkboxIndeterminateHoverIcon;
|
||||
|
||||
(function(){
|
||||
checkboxIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxIcon />));
|
||||
checkboxСheckedIcon= getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxCheckedIcon />));
|
||||
сheckboxDisabledIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxDisabledIcon />));
|
||||
сheckboxHoverIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxHoverIcon />));
|
||||
сheckboxIndeterminateIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxIndeterminateIcon />));
|
||||
|
||||
checkboxCheckedDisabledIcon= getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxCheckedDisabledIcon />));
|
||||
checkboxCheckedHoverIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxCheckedHoverIcon />));
|
||||
checkboxIndeterminateDisabledIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxIndeterminateDisabledIcon />));
|
||||
checkboxIndeterminateHoverIcon = getCssFromSvg(ReactDOMServer.renderToString(<Icons.CheckboxIndeterminateHoverIcon />));
|
||||
}());
|
||||
|
||||
const Label = styled.label`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
cursor: ${props => props.isDisabled ? 'default' : 'pointer'};
|
||||
margin: 0;
|
||||
|
||||
.checkbox {
|
||||
line-height: 16px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 2px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
border: 0 none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0 3px;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url("data:image/svg+xml,${checkboxIcon}");
|
||||
|
||||
&.checked {
|
||||
background-image: url("data:image/svg+xml,${checkboxСheckedIcon}");
|
||||
}
|
||||
&.indeterminate {
|
||||
background-image: url("data:image/svg+xml,${сheckboxIndeterminateIcon}");
|
||||
}
|
||||
}
|
||||
|
||||
${props => props.isDisabled
|
||||
? `
|
||||
cursor: not-allowed;
|
||||
|
||||
.checkbox {
|
||||
background-image: url("data:image/svg+xml,${сheckboxDisabledIcon}");
|
||||
}
|
||||
.checkbox.checked {
|
||||
background-image: url("data:image/svg+xml,${checkboxCheckedDisabledIcon}");
|
||||
}
|
||||
.checkbox.indeterminate {
|
||||
background-image: url("data:image/svg+xml,${checkboxIndeterminateDisabledIcon}");
|
||||
}
|
||||
`
|
||||
: `
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
.checkbox {
|
||||
background-image: url("data:image/svg+xml,${сheckboxHoverIcon}");
|
||||
}
|
||||
.checkbox.checked {
|
||||
background-image: url("data:image/svg+xml,${checkboxCheckedHoverIcon}");
|
||||
}
|
||||
.checkbox.indeterminate {
|
||||
background-image: url("data:image/svg+xml,${checkboxIndeterminateHoverIcon}");
|
||||
}
|
||||
}
|
||||
`
|
||||
}
|
||||
`;
|
||||
|
||||
const HiddenInput = styled.input`
|
||||
const Input = styled.input`
|
||||
opacity: 0.0001;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
`;
|
||||
|
||||
const IconWrapper = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid ${borderColor};
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: ${props => (props.isChecked && !props.isIndeterminate ? '0 2px' : '3px')};
|
||||
`;
|
||||
|
||||
const TextWrapper = styled.span`
|
||||
const Text = styled.span`
|
||||
margin-left: 8px;
|
||||
color: ${props => props.isDisabled ? disableColor : activeColor};
|
||||
`;
|
||||
@ -38,34 +106,26 @@ const TextWrapper = styled.span`
|
||||
class Checkbox extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.isIndeterminate) {
|
||||
this.ref.current.indeterminate = true;
|
||||
}
|
||||
this.ref.current.indeterminate = this.props.isIndeterminate;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (prevProps.isIndeterminate !== this.props.isIndeterminate) {
|
||||
this.ref.current.indeterminate = this.props.isIndeterminate;
|
||||
}
|
||||
componentDidUpdate() {
|
||||
this.ref.current.indeterminate = this.props.isIndeterminate;
|
||||
}
|
||||
|
||||
ref = React.createRef();
|
||||
|
||||
render() {
|
||||
const cbxClassName = 'checkbox' +
|
||||
(this.props.isIndeterminate ? ' indeterminate' : this.props.isChecked ? ' checked' : '') +
|
||||
(this.props.isDisabled ? ' disabled' : '');
|
||||
|
||||
return (
|
||||
<Label htmlFor={this.props.id} isDisabled={this.props.isDisabled} >
|
||||
<HiddenInput type='checkbox' checked={this.props.isChecked && !this.props.isIndeterminate} disabled={this.props.isDisabled} ref={this.ref} {...this.props}/>
|
||||
<IconWrapper isChecked={this.props.isChecked} isIndeterminate={this.props.isIndeterminate}>
|
||||
<Input type='checkbox' checked={this.props.isChecked && !this.props.isIndeterminate} disabled={this.props.isDisabled} ref={this.ref} {...this.props}/>
|
||||
<span className={cbxClassName} />
|
||||
{
|
||||
this.props.isIndeterminate
|
||||
? <Icons.IndeterminateIcon isfill={true} size="scale" color={this.props.isDisabled ? disableColor : activeColor}/>
|
||||
: this.props.isChecked
|
||||
? <Icons.CheckedIcon isfill={true} size="scale" color={this.props.isDisabled ? disableColor : activeColor}/>
|
||||
: ""
|
||||
}
|
||||
</IconWrapper>
|
||||
{
|
||||
this.props.label && <TextWrapper isDisabled={this.props.isDisabled}>{this.props.label}</TextWrapper>
|
||||
this.props.label && <Text isDisabled={this.props.isDisabled}>{this.props.label}</Text>
|
||||
}
|
||||
</Label>
|
||||
);
|
||||
|
@ -1,3 +0,0 @@
|
||||
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.98285 14.1443C8.54298 14.6534 7.85799 14.9663 7.11735 14.9974C6.37671 15.0288 5.65939 14.7743 5.16312 14.3043L0.622949 9.09033C-0.0838516 8.42192 -0.337907 7.37768 0.662374 6.48964C1.66265 5.6016 2.4876 5.91195 3.1944 6.58068L6.93351 10.7103C6.98013 10.7545 7.0478 10.7783 7.11735 10.7754C7.18728 10.7725 7.25119 10.7427 7.29292 10.6952L13.8438 2.49345C14.4698 1.76893 15.3391 1.90564 16.1524 2.49345C16.9716 3.08547 17.2992 3.99566 16.6729 4.71985L8.98285 14.1443Z" fill="#A3A9AE"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 639 B |
@ -1,3 +0,0 @@
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="10" height="10" rx="2" fill="#333333"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 156 B |
@ -9,8 +9,6 @@ import OrigGuestIcon from './guest.react.svg';
|
||||
import OrigAdministratorIcon from './administrator.react.svg';
|
||||
import OrigOwnerIcon from './owner.react.svg';
|
||||
import OrigVerticalDotsIcon from './vertical-dots.react.svg';
|
||||
import OrigCheckedIcon from './checked.react.svg';
|
||||
import OrigIndeterminateIcon from './indeterminate.react.svg';
|
||||
import OrigCloudServicesGoogleDriveIcon from './cloud.services.google.drive.react.svg';
|
||||
import OrigCloudServicesDropboxIcon from './cloud.services.dropbox.react.svg';
|
||||
import OrigHorizontalDotsIcon from './horizontal-dots.react.svg';
|
||||
@ -338,10 +336,6 @@ export const CheckboxIndeterminateHoverIcon = createStyledIcon(
|
||||
OrigCheckboxIndeterminateHoverIcon,
|
||||
'CheckboxIndeterminateHoverIcon'
|
||||
);
|
||||
export const CheckedIcon = createStyledIcon(
|
||||
OrigCheckedIcon,
|
||||
'CheckedIcon'
|
||||
);
|
||||
export const ClipIcon = createStyledIcon(
|
||||
OrigClipIcon,
|
||||
'ClipIcon'
|
||||
@ -458,10 +452,6 @@ export const ImportIcon = createStyledIcon(
|
||||
OrigImportIcon,
|
||||
'ImportIcon'
|
||||
);
|
||||
export const IndeterminateIcon = createStyledIcon(
|
||||
OrigIndeterminateIcon,
|
||||
'IndeterminateIcon'
|
||||
);
|
||||
export const InvitationLinkIcon = createStyledIcon(
|
||||
OrigInvitationLinkIcon,
|
||||
'InvitationLinkIcon'
|
||||
|
@ -17,7 +17,8 @@ addParameters({
|
||||
{
|
||||
name: 'ASC Storybook',
|
||||
sortStoriesByKind: true,
|
||||
showAddonPanel: true
|
||||
showAddonPanel: true,
|
||||
addonPanelInRight: true
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user