Merge branch 'bugfix/upload-with-convertation' of github.com:ONLYOFFICE/AppServer into bugfix/upload-with-convertation

This commit is contained in:
Viktor Fomin 2020-12-09 16:48:58 +03:00
commit f66e091b42
71 changed files with 1010 additions and 786 deletions

View File

@ -9,6 +9,7 @@
"asc-web-components": "file:../../../packages/asc-web-components",
"connected-react-router": "6.6.1",
"copy-to-clipboard": "^3.2.0",
"fast-deep-equal": "^3.1.3",
"history": "4.10.1",
"i18next": "19.0.3",
"i18next-browser-languagedetector": "4.0.1",

View File

@ -1,6 +1,6 @@
import React, { Suspense } from "react";
import { connect } from "react-redux";
import { Router, Switch, Redirect } from "react-router-dom";
import { Router, Switch, Redirect, Route } from "react-router-dom";
import Home from "./components/pages/Home";
import DocEditor from "./components/pages/DocEditor";
import Settings from "./components/pages/Settings";
@ -98,7 +98,7 @@ class App extends React.Component {
path={`${homepage}/settings/:setting`}
component={Settings}
/>
<PrivateRoute
<Route
exact
path={`${homepage}/doceditor`}
component={DocEditor}

View File

@ -1,7 +1,7 @@
import React from "react";
import { TreeMenu, TreeNode, Icons } from "asc-web-components";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { api, constants, toastr, store as initStore } from "asc-web-common";
import { connect } from "react-redux";
import {
@ -70,7 +70,7 @@ class TreeFolders extends React.Component {
this.setState({ expandedKeys });
}
if (!isEqual(prevProps.data, data)) {
if (!equal(prevProps.data, data)) {
//!utils.array.isArrayEqual(prevProps.data, data)) {
this.setState({ treeData: data });
}

View File

@ -1,7 +1,7 @@
import { Checkbox, ContextMenuButton } from "asc-web-components";
import PropTypes from "prop-types";
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import styled, { css } from "styled-components";
import BadgesFileTile from "./BadgesFileTile";
@ -111,7 +111,7 @@ class Tile extends React.Component {
if (this.props.needForUpdate) {
return this.props.needForUpdate(this.props, nextProps);
}
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -3,7 +3,7 @@ import { withRouter } from "react-router";
import { connect } from "react-redux";
import { ReactSVG } from "react-svg";
import { withTranslation, Trans } from "react-i18next";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import copy from "copy-to-clipboard";
import styled from "styled-components";
import queryString from "query-string";
@ -52,6 +52,7 @@ import {
setTreeFolders,
getFileInfo,
addFileToRecentlyViewed,
setSharingPanelVisible,
} from "../../../../../store/files/actions";
import { TIMEOUT } from "../../../../../helpers/constants";
import {
@ -91,8 +92,9 @@ import {
getIsPrivacyFolder,
getPrivacyInstructionsLink,
getIconOfDraggedFile,
getSharePanelVisible,
} from "../../../../../store/files/selectors";
import { SharingPanel, OperationsPanel } from "../../../../panels";
import { OperationsPanel } from "../../../../panels";
const {
isAdmin,
getSettings,
@ -185,7 +187,6 @@ class SectionBodyContent extends React.Component {
this.state = {
editingId: null,
showSharingPanel: false,
showMoveToPanel: false,
showCopyPanel: false,
isDrag: false,
@ -235,7 +236,7 @@ class SectionBodyContent extends React.Component {
if (this.props && this.props.firstLoad) return true;
const { showMoveToPanel, showCopyPanel, isDrag } = this.state;
if (this.state.showSharingPanel !== nextState.showSharingPanel) {
if (this.props.sharingPanelVisible !== nextProps.sharingPanelVisible) {
return true;
}
@ -243,7 +244,7 @@ class SectionBodyContent extends React.Component {
return false;
}
if (!isEqual(this.props, nextProps)) {
if (!equal(this.props, nextProps)) {
return true;
}
@ -483,7 +484,7 @@ class SectionBodyContent extends React.Component {
};
onClickShare = () =>
this.setState({ showSharingPanel: !this.state.showSharingPanel });
this.props.setSharingPanelVisible(!this.props.sharingPanelVisible);
onClickLinkForPortal = () => {
const { settings, selection } = this.props;
@ -795,7 +796,7 @@ class SectionBodyContent extends React.Component {
if (currentProps.sectionWidth !== nextProps.sectionWidth) {
return true;
}
if (!isEqual(currentProps.data, nextProps.data)) {
if (!equal(currentProps.data, nextProps.data)) {
return true;
}
if (currentProps.viewAs !== nextProps.viewAs) {
@ -1574,12 +1575,7 @@ class SectionBodyContent extends React.Component {
tooltipValue,
} = this.props;
const {
editingId,
showSharingPanel,
showMoveToPanel,
showCopyPanel,
} = this.state;
const { editingId, showMoveToPanel, showCopyPanel } = this.state;
const operationsPanelProps = {
setIsLoading,
@ -1843,12 +1839,6 @@ class SectionBodyContent extends React.Component {
extsImagePreviewed={mediaViewerImageFormats} //TODO
/>
)}
{showSharingPanel && (
<SharingPanel
onClose={this.onClickShare}
visible={showSharingPanel}
/>
)}
</>
);
}
@ -1898,6 +1888,7 @@ const mapStateToProps = (state) => {
viewer: getCurrentUser(state),
tooltipValue: getTooltipLabel(state),
iconOfDraggedFile: getIconOfDraggedFile(state)(state),
sharingPanelVisible: getSharePanelVisible(state),
};
};
@ -1923,4 +1914,5 @@ export default connect(mapStateToProps, {
getFileInfo,
addFileToRecentlyViewed,
loopFilesOperations,
setSharingPanelVisible,
})(withRouter(withTranslation()(SectionBodyContent)));

View File

@ -17,7 +17,7 @@ import result from "lodash/result";
import { withTranslation } from "react-i18next";
import { withRouter } from "react-router";
import { constants, FilterInput, store, Loaders, utils } from "asc-web-common";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { isMobileOnly } from "react-device-detect";
const { withLayoutSize } = utils;
@ -285,7 +285,7 @@ class SectionFilterContent extends React.Component {
shouldComponentUpdate(nextProps, nextState) {
return (
!isEqual(this.props.filter, nextProps.filter) ||
!equal(this.props.filter, nextProps.filter) ||
this.props.selectedFolderId !== nextProps.selectedFolderId ||
this.state.isReady !== nextState.isReady ||
this.props.viewAs !== nextProps.viewAs ||

View File

@ -26,6 +26,7 @@ import {
clearSecondaryProgressData,
setIsLoading,
setSelected,
setSharingPanelVisible,
} from "../../../../../store/files/actions";
import { TIMEOUT } from "../../../../../helpers/constants";
import {
@ -33,7 +34,7 @@ import {
DeleteDialog,
DownloadDialog,
} from "../../../../dialogs";
import { SharingPanel, OperationsPanel } from "../../../../panels";
import { OperationsPanel } from "../../../../panels";
import {
isCanBeDeleted,
getIsRecycleBinFolder,
@ -49,6 +50,8 @@ import {
getHeaderChecked,
getOnlyFoldersSelected,
getAccessedSelected,
getSelectionLength,
getSharePanelVisible,
} from "../../../../../store/files/selectors";
const { isAdmin } = store.auth.selectors;
@ -146,7 +149,6 @@ class SectionHeaderContent extends React.Component {
super(props);
this.state = {
showSharingPanel: false,
showDeleteDialog: false,
showDownloadDialog: false,
showEmptyTrashDialog: false,
@ -302,7 +304,7 @@ class SectionHeaderContent extends React.Component {
renameAction = () => toastr.info("renameAction click");
onOpenSharingPanel = () =>
this.setState({ showSharingPanel: !this.state.showSharingPanel });
this.props.setSharingPanelVisible(!this.props.sharingPanelVisible);
onDeleteAction = () =>
this.setState({ showDeleteDialog: !this.state.showDeleteDialog });
@ -505,7 +507,6 @@ class SectionHeaderContent extends React.Component {
const {
showDeleteDialog,
showSharingPanel,
showEmptyTrashDialog,
showDownloadDialog,
showMoveToPanel,
@ -621,13 +622,6 @@ class SectionHeaderContent extends React.Component {
/>
)}
{showSharingPanel && (
<SharingPanel
onClose={this.onOpenSharingPanel}
visible={showSharingPanel}
/>
)}
{showMoveToPanel && (
<OperationsPanel
isCopy={false}
@ -659,14 +653,12 @@ class SectionHeaderContent extends React.Component {
}
const mapStateToProps = (state) => {
const selection = getSelection(state);
return {
isRootFolder: getIsRootFolder(state),
isAdmin: isAdmin(state),
isRecycleBin: getIsRecycleBinFolder(state),
parentId: getSelectedFolderParentId(state),
selection,
selection: getSelection(state),
title: getSelectedFolderTitle(state),
filter: getFilter(state),
deleteDialogVisible: isCanBeDeleted(state),
@ -677,7 +669,8 @@ const mapStateToProps = (state) => {
isHeaderChecked: getHeaderChecked(state),
isAccessedSelected: getAccessedSelected(state),
isOnlyFoldersSelected: getOnlyFoldersSelected(state),
isItemsSelected: selection.length,
isItemsSelected: getSelectionLength(state),
sharingPanelVisible: getSharePanelVisible(state),
};
};
@ -688,4 +681,5 @@ export default connect(mapStateToProps, {
clearSecondaryProgressData,
fetchFiles,
setSelected,
setSharingPanelVisible,
})(withTranslation()(withRouter(SectionHeaderContent)));

View File

@ -37,9 +37,11 @@ import {
getIsLoading,
getIsRecycleBinFolder,
getDragging,
getSharePanelVisible,
} from "../../../store/files/selectors";
import { ConvertDialog } from "../../dialogs";
import { SharingPanel } from "../../panels";
import { createI18N } from "../../../helpers/i18n";
import { getFilterByLocation } from "../../../helpers/converters";
const i18n = createI18N({
@ -172,6 +174,7 @@ class PureHome extends React.Component {
secondaryProgressData,
viewAs,
convertDialogVisible,
sharingPanelVisible,
fileActionId,
isRecycleBin,
isLoaded,
@ -182,6 +185,8 @@ class PureHome extends React.Component {
{convertDialogVisible && (
<ConvertDialog visible={convertDialogVisible} />
)}
{sharingPanelVisible && <SharingPanel />}
<PageLayout
withBodyScroll
withBodyAutoFocus={!isMobile}
@ -273,6 +278,7 @@ function mapStateToProps(state) {
homepage: getSettingsHomepage(state),
dragging: getDragging(state),
isLoaded: getIsLoaded(state),
sharingPanelVisible: getSharePanelVisible(state),
};
}

View File

@ -140,6 +140,7 @@ class EmbeddingPanelComponent extends React.Component {
size="16"
iconName="ArrowPathIcon"
onClick={this.onArrowClick}
color="#A3A9AE"
/>
<Heading
className="header_aside-panel-header"
@ -150,61 +151,65 @@ class EmbeddingPanelComponent extends React.Component {
</Heading>
</StyledHeaderContent>
<StyledBody size={size}>
<Text className="embedding-panel_text">{t("Size")}:</Text>
<div className="embedding-panel_links-container">
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeMiddle}
>
600 x 800 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeSmall}
>
400 x 600 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeAuto}
>
{t("Auto")}
</Link>
</div>
<div className="embedding-panel_inputs-container">
<div>
<Text className="embedding-panel_text">{t("Width")}:</Text>
<TextInput
className="embedding-panel_input"
value={widthValue}
onChange={this.onChangeWidth}
/>
<div className="embedding-panel_body">
<Text className="embedding-panel_text">{t("Size")}:</Text>
<div className="embedding-panel_links-container">
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeMiddle}
>
600 x 800 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeSmall}
>
400 x 600 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeAuto}
>
{t("Auto")}
</Link>
</div>
<div>
<Text className="embedding-panel_text">{t("Height")}:</Text>
<TextInput
className="embedding-panel_input"
value={heightValue}
onChange={this.onChangeHeight}
/>
<div className="embedding-panel_inputs-container">
<div>
<Text className="embedding-panel_text">{t("Width")}:</Text>
<TextInput
className="embedding-panel_input"
value={widthValue}
onChange={this.onChangeWidth}
/>
</div>
<div>
<Text className="embedding-panel_text">{t("Height")}:</Text>
<TextInput
className="embedding-panel_input"
value={heightValue}
onChange={this.onChangeHeight}
/>
</div>
</div>
<div className="embedding-panel_code-container">
<Text className="embedding-panel_text">
{t("EmbedCode")}:
</Text>
<IconButton
className="embedding-panel_copy-icon"
size="16"
iconName="CopyIcon"
color="#333"
onClick={this.onCopyLink}
/>
<Textarea color="#AEAEAE" isReadOnly value={link} />
</div>
</div>
<div>
<Text className="embedding-panel_text">{t("EmbedCode")}:</Text>
<IconButton
className="embedding-panel_copy-icon"
size="16"
iconName="CopyIcon"
color="#333"
onClick={this.onCopyLink}
/>
<Textarea isReadOnly value={link} />
</div>
</StyledBody>
</StyledContent>

View File

@ -6,10 +6,10 @@ import {
Text,
Icons,
DropDownItem,
LinkWithDropdown,
} from "asc-web-components";
import { toastr } from "asc-web-common";
import copy from "copy-to-clipboard";
import LinkRow from "./linkRow";
const SharingRow = (props) => {
const {
@ -25,12 +25,14 @@ const SharingRow = (props) => {
onCommentClick,
onFormFillingClick,
onDenyAccessClick,
onFilterEditingClick,
onRemoveUserClick,
onShowEmbeddingPanel,
onToggleLink,
externalLinkData,
} = props;
const linkVisible = selection && selection.length === 1 && item.shareLink;
const onCopyInternalLink = () => {
const internalLink = selection.webUrl
? selection.webUrl
@ -39,7 +41,7 @@ const SharingRow = (props) => {
toastr.success(t("LinkCopySuccess"));
};
const advancedOptionsRender = () => (
const advancedOptionsRender = (accessOptions) => (
<>
{accessOptions.includes("FullAccess") && (
<DropDownItem
@ -87,19 +89,31 @@ const SharingRow = (props) => {
onClick={() => onDenyAccessClick(item)}
/>
)}
{accessOptions.includes("FilterEditing") && (
<DropDownItem
label="Custom filter"
icon="CustomFilterIcon"
onClick={() => onFilterEditingClick(item)}
/>
)}
</>
);
const embeddedComponentRender = () => (
const embeddedComponentRender = (
accessOptions = this.props.accessOptions,
item,
isDisabled
) => (
<ComboBox
advancedOptions={advancedOptionsRender()}
advancedOptions={advancedOptionsRender(accessOptions)}
options={[]}
selectedOption={{ key: 0 }}
size="content"
className="panel_combo-box"
scaled={false}
directionX="left"
//isDisabled={isDisabled}
disableIconClick={false}
isDisabled={isDisabled}
>
{React.createElement(Icons[item.rights.icon], {
size: "medium",
@ -127,51 +141,6 @@ const SharingRow = (props) => {
const onShareFacebook = () => window.open(`https://www.facebook.com`);
/*window.open(`https://www.facebook.com/dialog/feed?app_id=645528132139019&display=popup&link=${item.shareLink}`);*/
const options = [
{
key: 1,
label: "Disabled",
disabled: false,
onClick: () => console.log("Disabled"),
},
{
key: 2,
label: "1 hour",
disabled: false,
onClick: () => console.log("1 hour"),
},
{
key: 3,
label: "1 day",
disabled: false,
onClick: () => console.log("1 day"),
},
{
key: 4,
label: "1 week",
disabled: false,
onClick: () => console.log("1 week"),
},
{
key: 5,
label: "1 month",
disabled: false,
onClick: () => console.log("1 month"),
},
{
key: 6,
label: "1 year",
disabled: false,
onClick: () => console.log("1 year"),
},
{
key: 7,
label: "Timeless",
disabled: false,
onClick: () => console.log("Timeless"),
},
];
const internalLinkData = [
{
key: "linkItem",
@ -180,7 +149,7 @@ const SharingRow = (props) => {
},
];
const externalLinkData = [
const externalLinkOptions = [
{
key: "linkItem_0",
label: t("CopyExternalLink"),
@ -221,54 +190,32 @@ const SharingRow = (props) => {
},
];
const linksFunction = (linkText, data) => (
<Row
key={`${linkText}-key_${index}`}
//element={embeddedComponentRender(accessOptions, item)}
element={
<Icons.AccessEditIcon
size="medium"
className="sharing_panel-owner-icon"
/>
}
contextButtonSpacerWidth="0px"
>
<>
<LinkWithDropdown
className="sharing_panel-link"
color="black"
dropdownType="alwaysDashed"
data={data}
fontSize="14px"
fontWeight={600}
>
{t(linkText)}
</LinkWithDropdown>
{/*
<ComboBox
className="sharing_panel-link-combo-box"
options={options}
isDisabled={false}
selectedOption={options[0]}
dropDownMaxHeight={200}
noBorder={false}
scaled={false}
scaledOptions
size="content"
onSelect={(option) => console.log("selected", option)}
/>
*/}
</>
</Row>
);
//console.log("SharingRow render");
return (
<>
{linkVisible && linksFunction("ExternalLink", externalLinkData)}
{linkVisible && linksFunction("InternalLink", internalLinkData)}
{linkVisible && (
<>
<LinkRow
linkText="ExternalLink"
options={externalLinkOptions}
externalLinkData={externalLinkData}
embeddedComponentRender={embeddedComponentRender}
onToggleLink={onToggleLink}
withToggle={true}
{...props}
/>
<LinkRow
linkText="InternalLink"
options={internalLinkData}
embeddedComponentRender={embeddedComponentRender}
{...props}
/>
</>
)}
{!item.shareLink && (
<Row
className="sharing-row"
key={`internal-link-key_${index}`}
element={
item.rights.isOwner || item.id === isMyId ? (
@ -293,10 +240,7 @@ const SharingRow = (props) => {
</Text>
)}
{item.rights.isOwner ? (
<Text
className="sharing_panel-remove-icon"
color="#A3A9AE"
>
<Text className="sharing_panel-remove-icon" color="#A3A9AE">
{t("Owner")}
</Text>
) : item.id === isMyId ? (

View File

@ -1,5 +1,4 @@
import React from "react";
import PropTypes from "prop-types";
import {
Backdrop,
Heading,
@ -17,8 +16,17 @@ import { connect } from "react-redux";
import { withRouter } from "react-router";
import { withTranslation } from "react-i18next";
import { utils as commonUtils, constants, toastr, store } from "asc-web-common";
import { getShareUsers, setShareFiles } from "../../../store/files/actions";
import { getAccessOption, getSelection } from "../../../store/files/selectors";
import {
getShareUsers,
setShareFiles,
setSharingPanelVisible,
} from "../../../store/files/actions";
import {
getAccessOption,
getExternalAccessOption,
getSelection,
getSharePanelVisible,
} from "../../../store/files/selectors";
import {
StyledAsidePanel,
StyledContent,
@ -33,7 +41,6 @@ const i18n = createI18N({
page: "SharingPanel",
localesPath: "panels/SharingPanel",
});
const { changeLanguage } = commonUtils;
const { ShareAccessRights } = constants;
const {
@ -41,6 +48,8 @@ const {
getSettingsCustomNamesGroupsCaption,
} = store.auth.selectors;
const SharingBodyStyle = { height: `calc(100vh - 156px)` };
class SharingPanelComponent extends React.Component {
constructor(props) {
super(props);
@ -79,7 +88,20 @@ class SharingPanelComponent extends React.Component {
this.setState({ showActionPanel: !this.state.showActionPanel });
};
//onKeyClick = () => console.log("onKeyClick");
onToggleLink = (item) => {
const { shareDataItems } = this.state;
const rights =
item.rights.accessNumber !== ShareAccessRights.DenyAccess
? this.getItemAccess(ShareAccessRights.DenyAccess)
: this.getItemAccess(ShareAccessRights.ReadOnly);
const newDataItems = JSON.parse(JSON.stringify(shareDataItems));
newDataItems[0].rights = { ...rights };
this.setState({
shareDataItems: newDataItems,
});
};
onSaveClick = () => {
const {
@ -88,20 +110,31 @@ class SharingPanelComponent extends React.Component {
message,
shareDataItems,
} = this.state;
const { selectedItems, onClose } = this.props;
const { selectedItems } = this.props;
const folderIds = [];
const fileIds = [];
const share = [];
let externalAccess = null;
for (let item of shareDataItems) {
const baseItem = baseShareData.find((x) => x.id === item.id);
if (
(baseItem && baseItem.rights.rights !== item.rights.rights) ||
(baseItem &&
baseItem.rights.rights !== item.rights.rights &&
!item.shareLink) ||
!baseItem
) {
share.push({ shareTo: item.id, access: item.rights.accessNumber });
}
if (
item.shareLink &&
item.rights.accessNumber !== baseItem.rights.accessNumber
) {
externalAccess = item.rights.accessNumber;
}
}
for (let item of baseShareData) {
@ -119,9 +152,16 @@ class SharingPanelComponent extends React.Component {
}
}
setShareFiles(folderIds, fileIds, share, isNotifyUsers, message)
setShareFiles(
folderIds,
fileIds,
share,
isNotifyUsers,
message,
externalAccess
)
.catch((err) => toastr.error(err))
.finally(() => onClose());
.finally(() => this.onClose());
};
onFullAccessClick = () => {
@ -190,6 +230,17 @@ class SharingPanelComponent extends React.Component {
});
};
onFilterEditingClick = () => {
this.setState({
accessRight: {
icon: "CustomFilterIcon",
rights: "CustomFilter",
accessNumber: ShareAccessRights.CustomFilter,
isOwner: false,
},
});
};
onNotifyUsersChange = () =>
this.setState({ isNotifyUsers: !this.state.isNotifyUsers });
@ -259,6 +310,18 @@ class SharingPanelComponent extends React.Component {
this.setState({ shareDataItems: newUsers });
}
};
onFilterEditingItemClick = (item) => {
const newUsers = this.state.shareDataItems;
const elementIndex = newUsers.findIndex((x) => x.id === item.id);
if (newUsers[elementIndex].rights.rights !== "CustomFilter") {
newUsers[elementIndex].rights = {
icon: "CustomFilterIcon",
rights: "CustomFilter",
accessNumber: ShareAccessRights.CustomFilter,
};
this.setState({ shareDataItems: newUsers });
}
};
onDenyAccessItemClick = (item) => {
const newUsers = this.state.shareDataItems;
const elementIndex = newUsers.findIndex((x) => x.id === item.id);
@ -282,17 +345,14 @@ class SharingPanelComponent extends React.Component {
}
};
getItemAccess = (item) => {
getItemAccess = (accessType, isOwner = false) => {
const fullAccessRights = {
icon: "AccessEditIcon",
rights: "FullAccess",
accessNumber: ShareAccessRights.FullAccess,
isOwner: item.isOwner,
isOwner: isOwner,
};
if (item.sharedTo.shareLink) {
return fullAccessRights;
}
switch (item.access) {
switch (accessType) {
case 1:
return fullAccessRights;
case 2:
@ -330,19 +390,31 @@ class SharingPanelComponent extends React.Component {
accessNumber: ShareAccessRights.FormFilling,
isOwner: false,
};
case 8:
return {
icon: "CustomFilterIcon",
rights: "CustomFilter",
accessNumber: ShareAccessRights.CustomFilter,
isOwner: false,
};
default:
return;
}
};
getShareDataItems = (items) => {
const {
getAccessOption,
getExternalAccessOption,
selectedItems,
} = this.props;
let arrayItems = [];
const newItems = [];
let stash = [];
for (let array of items) {
for (let item of array) {
const rights = this.getItemAccess(item);
const rights = this.getItemAccess(item.access, item.isOwner);
if (rights) {
item.sharedTo = { ...item.sharedTo, ...{ rights } };
@ -353,7 +425,6 @@ class SharingPanelComponent extends React.Component {
newItems.push(stash);
stash = [];
}
stash = null;
for (let item of arrayItems) {
let length = newItems.length;
@ -384,15 +455,25 @@ class SharingPanelComponent extends React.Component {
}
length--;
}
} else {
const externalLinkAccess = items[0][0].access;
item.access = externalLinkAccess;
item.rights = this.getItemAccess(externalLinkAccess);
}
}
arrayItems = this.removeDuplicateShareData(arrayItems);
const baseShareData = JSON.parse(JSON.stringify(arrayItems));
const accessOptions = getAccessOption(this.props.selectedItems);
const accessOptions = getAccessOption(selectedItems);
const externalAccessOptions = getExternalAccessOption(selectedItems);
return { baseShareData, shareDataItems: arrayItems, accessOptions };
return {
baseShareData,
shareDataItems: arrayItems,
accessOptions,
externalAccessOptions,
};
};
removeDuplicateShareData = (shareDataItems) => {
@ -461,7 +542,8 @@ class SharingPanelComponent extends React.Component {
setShareDataItems = (shareDataItems) => this.setState({ shareDataItems });
onClose = () => this.setState({ showPanel: false });
onClose = () =>
this.props.setSharingPanelVisible(!this.props.sharingPanelVisible);
componentDidMount() {
this.getShareData();
@ -481,7 +563,7 @@ class SharingPanelComponent extends React.Component {
} = this.state;
if (showAddUsersPanel || showEmbeddingPanel || showAddGroupsPanel) return;
if (event.key === "Esc" || event.key === "Escape") {
this.props.onClose();
this.onClose();
}
};
@ -490,7 +572,7 @@ class SharingPanelComponent extends React.Component {
this.state.showPanel !== prevState.showPanel &&
this.state.showPanel === false
) {
this.props.onClose();
this.onClose();
}
if (this.state.message === prevState.message) {
@ -513,6 +595,7 @@ class SharingPanelComponent extends React.Component {
shareLink,
showPanel,
accessOptions,
externalAccessOptions,
} = this.state;
const visible = showPanel;
@ -566,6 +649,13 @@ class SharingPanelComponent extends React.Component {
onClick={this.onDenyAccessClick}
/>
)}
{accessOptions.includes("FilterEditing") && (
<DropDownItem
label="Custom filter"
icon="CustomFilterIcon"
onClick={this.onFilterEditingClick}
/>
)}
</>
);
@ -578,6 +668,7 @@ class SharingPanelComponent extends React.Component {
className="panel_combo-box add-groups"
scaled={false}
directionX="right"
disableIconClick={false}
//isDisabled={isDisabled}
>
{React.createElement(Icons[accessRight.icon], {
@ -632,7 +723,12 @@ class SharingPanelComponent extends React.Component {
/>*/}
</div>
</StyledHeaderContent>
<StyledSharingBody ref={this.scrollRef} stype="mediumBlack">
<StyledSharingBody
ref={this.scrollRef}
stype="mediumBlack"
style={SharingBodyStyle}
>
{" "}
{shareDataItems.map((item, index) => (
<SharingRow
key={index}
@ -642,14 +738,17 @@ class SharingPanelComponent extends React.Component {
index={index}
isMyId={isMyId}
accessOptions={accessOptions}
externalAccessOptions={externalAccessOptions}
onFullAccessClick={this.onFullAccessItemClick}
onReadOnlyClick={this.onReadOnlyItemClick}
onReviewClick={this.onReviewItemClick}
onCommentClick={this.onCommentItemClick}
onFormFillingClick={this.onFormFillingItemClick}
onFilterEditingClick={this.onFilterEditingItemClick}
onDenyAccessClick={this.onDenyAccessItemClick}
onRemoveUserClick={this.onRemoveUserItemClick}
onShowEmbeddingPanel={this.onShowEmbeddingPanel}
onToggleLink={this.onToggleLink}
/>
))}
{isNotifyUsers && (
@ -718,11 +817,6 @@ class SharingPanelComponent extends React.Component {
}
}
SharingPanelComponent.propTypes = {
onClose: PropTypes.func,
visible: PropTypes.bool,
};
const SharingPanelContainerTranslated = withTranslation()(
SharingPanelComponent
);
@ -733,10 +827,16 @@ const SharingPanel = (props) => (
const mapStateToProps = (state) => {
return {
getAccessOption: (selectedItems) => getAccessOption(state, selectedItems),
getExternalAccessOption: (selectedItems) =>
getExternalAccessOption(state, selectedItems),
isMyId: getCurrentUserId(state),
selectedItems: getSelection(state),
groupsCaption: getSettingsCustomNamesGroupsCaption(state),
sharingPanelVisible: getSharePanelVisible(state),
};
};
export default connect(mapStateToProps)(withRouter(SharingPanel));
export default connect(mapStateToProps, { setSharingPanelVisible })(
withRouter(SharingPanel)
);

View File

@ -0,0 +1,75 @@
import React from "react";
import { Row, LinkWithDropdown, ToggleButton, Icons } from "asc-web-components";
import { StyledLinkRow } from "../StyledPanels";
import { constants } from "asc-web-common";
const { ShareAccessRights } = constants;
class LinkRow extends React.Component {
onToggleButtonChange = () => {
const { onToggleLink, item } = this.props;
onToggleLink(item);
};
render() {
const {
linkText,
options,
index,
t,
embeddedComponentRender,
externalAccessOptions,
item,
withToggle,
} = this.props;
const isChecked = item.rights.accessNumber !== ShareAccessRights.DenyAccess;
const isDisabled = withToggle ? !isChecked : false;
return (
<StyledLinkRow withToggle={withToggle} isDisabled={isDisabled}>
<Row
className="link-row"
key={`${linkText}-key_${index}`}
element={
withToggle ? (
embeddedComponentRender(externalAccessOptions, item, isDisabled)
) : (
<Icons.AccessEditIcon
size="medium"
className="sharing_panel-owner-icon"
/>
)
}
contextButtonSpacerWidth="0px"
>
<>
<LinkWithDropdown
className="sharing_panel-link"
color="#333333"
dropdownType="alwaysDashed"
data={options}
fontSize="14px"
fontWeight={600}
isDisabled={isDisabled}
>
{t(linkText)}
</LinkWithDropdown>
{withToggle && (
<div>
<ToggleButton
isChecked={isChecked}
onChange={this.onToggleButtonChange}
/>
</div>
)}
</>
</Row>
</StyledLinkRow>
);
}
}
export default LinkRow;

View File

@ -25,11 +25,23 @@ const PanelStyles = css`
margin: 0;
}
}
.footer {
padding: 16px 0;
width: calc(100% - 32px);
margin: auto;
left: 0;
right: 0;
}
`;
const StyledAsidePanel = styled.div`
z-index: 310;
.sharing_panel-header {
font-weight: 700;
margin: 14px 0;
padding-right: 10px;
}
.modal-dialog-aside {
padding: 0;
transform: translateX(${(props) => (props.visible ? "0" : "500px")});
@ -105,7 +117,6 @@ const StyledContent = styled.div`
position: relative;
width: 100%;
background-color: #fff;
padding: 0 16px;
.header_aside-panel-header {
max-width: 500px;
@ -122,6 +133,12 @@ const StyledContent = styled.div`
const StyledHeaderContent = styled.div`
display: flex;
align-items: center;
padding: 0 16px;
display: flex;
align-items: center;
padding: 0 16px;
.sharing_panel-icons-container {
display: flex;
@ -151,13 +168,19 @@ const StyledBody = styled.div`
padding: 0 16px;
}
.embedding-panel_body {
padding: 0 16px;
}
.selector-wrapper {
position: fixed;
height: 94%;
height: calc(100% - 57px);
width: 100%;
.column-options {
padding: 0 0 16px 0;
width: 470px;
padding: 0px 16px;
padding-bottom: 16px;
width: 100%;
.header-options {
.combo-button-label {
@ -179,20 +202,10 @@ const StyledBody = styled.div`
}
}
@media (max-width: 550px) {
width: 320px;
padding: 0 28px 16px 0;
}
.body-options {
width: 100%;
}
}
.footer {
@media (max-width: 550px) {
padding: 16px 28px 16px 0;
}
}
}
.embedding-panel_links-container {
@ -215,6 +228,10 @@ const StyledBody = styled.div`
}
}
.embedding-panel_code-container {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.embedding-panel_text {
padding: 8px 0 4px 0;
}
@ -230,12 +247,16 @@ const StyledBody = styled.div`
const StyledSharingBody = styled(Scrollbar)`
position: relative;
padding: 16px 0;
height: calc(100vh - 157px) !important;
.row_content {
overflow: visible;
}
.sharing-row {
margin: 0 16px;
width: calc(100% - 16px);
box-sizing: border-box;
}
.nav-thumb-vertical {
opacity: 0;
transition: opacity 200ms ease;
@ -285,7 +306,7 @@ const StyledSharingBody = styled(Scrollbar)`
}
.sharing_panel-owner-icon {
padding-right: 12px;
padding-right: 19px;
}
.sharing_panel-remove-icon {
@ -320,6 +341,9 @@ const StyledSharingBody = styled(Scrollbar)`
position: fixed;
bottom: 70px;
width: 94%;
left: 0;
right: 0;
margin: auto;
}
`;
@ -329,8 +353,12 @@ const StyledFooter = styled.div`
bottom: 0;
padding: 16px 0;
width: calc(100% - 32px);
margin: auto;
left: 0;
right: 0;
background-color: #fff;
border-top: 1px solid #eceef1;
box-sizing: border-box;
.sharing_panel-checkbox {
span {
@ -344,11 +372,32 @@ const StyledFooter = styled.div`
.sharing_panel-button {
margin-left: auto;
padding: 8px 27px;
}
`;
const StyledLinkRow = styled.div`
width: calc(100% + 16px);
padding: 0 16px;
box-sizing: border-box;
background-color: #f8f9f9;
.sharing-access-combo-box-icon {
path {
fill: ${(props) => (props.isDisabled ? "#D0D5DA" : "#a3a9ae")};
}
}
@media (max-width: 550px) {
width: 90%;
.link-row {
${(props) => !props.withToggle && "border-bottom:none;"}
}
.row_content {
display: grid;
grid-template-columns: 1fr 28px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.combo-button {
background: transparent;
}
`;
@ -362,4 +411,5 @@ export {
StyledBody,
StyledSharingBody,
StyledFooter,
StyledLinkRow,
};

View File

@ -702,24 +702,20 @@ export const startUpload = (uploadFiles, folderId, t) => {
console.log("start upload", state.files.uploadData);
let newFiles = state.files.uploadData.files;
let filesSize = 0;
let uploadStatus = null;
const convertFiles = [];
let convertFilesSize = 0;
for (let index of Object.keys(uploadFiles)) {
const item = uploadFiles[index];
if (item.size !== 0) {
const parts = item.name.split(".");
const ext = parts.length > 1 ? "." + parts.pop() : "";
const needConvert = canConvert(ext)(state);
newFiles.push({
file: item,
toFolderId: folderId,
action: needConvert ? "convert" : "upload",
error: null,
});
filesSize += item.size;
if (needConvert) {
uploadStatus = "pending";
if (canConvert(ext)(state)) {
convertFiles.push({ file: item, toFolderId: folderId });
convertFilesSize += item.size;
} else {
newFiles.push({ file: item, toFolderId: folderId });
filesSize += item.size;
}
} else {
dispatch(
@ -733,13 +729,16 @@ export const startUpload = (uploadFiles, folderId, t) => {
}
}
//const showConvertDialog = uploadStatus === "pending";
const uploadStatus = convertFiles.length ? "pending" : null;
const showConvertDialog = !!convertFiles.length;
const percent = state.files.uploadData.percent;
const uploadedFiles = state.files.uploadData.uploadedFiles;
console.log("newFiles: ", newFiles);
const newUploadData = {
files: newFiles,
filesSize,
convertFiles,
convertFilesSize,
uploadStatus,
uploadedFiles,
percent,
@ -747,80 +746,80 @@ export const startUpload = (uploadFiles, folderId, t) => {
};
dispatch(setUploadData(newUploadData));
// if (showConvertDialog) {
// dispatch(setConvertDialogVisible(showConvertDialog));
// }
if (showConvertDialog) {
dispatch(setConvertDialogVisible(showConvertDialog));
}
if (state.files.uploadData.uploaded)
startUploadFiles(t, dispatch, getState);
startUploadFiles(
t,
newFiles.length,
convertFiles.length,
dispatch,
getState
);
};
};
const startUploadFiles = async (t, dispatch, getState) => {
let state = getState();
const percent = state.files.uploadData.percent;
const filesLength = state.files.uploadData.files.length;
const startUploadFiles = (
t,
filesLength,
convertFilesLength,
dispatch,
getState
) => {
if (filesLength > 0 || convertFilesLength > 0) {
const state = getState();
const percent = state.files.uploadData.percent;
if (filesLength === 0) return;
const progressData = {
visible: true,
percent,
label: "",
icon: "upload",
alert: false,
};
progressData.label = t("UploadingLabel", {
file: 0,
totalFiles: filesLength,
});
dispatch(setPrimaryProgressBarData(progressData));
await startSessionFunc(0, t, dispatch, getState);
//TODO: startConvertFunc
//TODO: All files has been uploaded
state = getState();
const { files } = state.files.uploadData;
const totalErrorsCount = sumBy(files, (f) => (f.error ? 1 : 0));
if (totalErrorsCount > 0) return;
const progressData = {
visible: true,
percent,
label: "",
icon: "upload",
alert: false,
};
progressData.label = t("UploadingLabel", {
file: 0,
totalFiles: filesLength + convertFilesLength,
});
dispatch(setPrimaryProgressBarData(progressData));
startSessionFunc(0, t, dispatch, getState);
}
};
const chunkSize = 1024 * 1023; //~0.999mb
const throttleRefreshFiles = throttle((toFolderId, dispatch, getState) => {
return refreshFiles(toFolderId, dispatch, getState).catch((err) => {
console.log("RefreshFiles failed", err);
return Promise.resolve();
});
refreshFiles(toFolderId, dispatch, getState);
}, 10000);
const startSessionFunc = (indexOfFile, t, dispatch, getState) => {
const state = getState();
const { uploadData } = state.files;
const { uploaded, files } = uploadData;
const { uploaded, files, convertFiles } = uploadData;
const currentFiles = uploaded ? convertFiles : files;
console.log("START UPLOAD SESSION FUNC", uploadData);
if (!uploaded && files.length === 0) {
uploadData.uploaded = true;
dispatch(setUploadData(uploadData));
return;
}
let item = files[indexOfFile] || { file: null, toFolderId: null };
let { file, toFolderId } = item;
const item = files[indexOfFile];
//let isLatestFile = indexOfFile === files.length - 1;
if (!item) {
console.error("Empty files");
return Promise.resolve();
if (uploaded) {
if (convertFiles.length) {
let item = convertFiles[indexOfFile] || { file: null, toFolderId: null };
file = item.file;
toFolderId = item.toFolderId;
//isLatestFile = indexOfFile === convertFiles.length - 1;
} else {
//Test return empty convert files
return;
}
}
const { file, toFolderId /*, action*/ } = item;
const fileName = file.name;
const fileSize = file.size;
const relativePath = file.path
@ -829,15 +828,15 @@ const startSessionFunc = (indexOfFile, t, dispatch, getState) => {
? file.webkitRelativePath.slice(0, -file.name.length)
: "";
return api.files
let location;
const requestsDataArray = [];
const chunks = Math.ceil(file.size / chunkSize, chunkSize);
let chunk = 0;
api.files
.startUploadSession(toFolderId, fileName, fileSize, relativePath)
.then((res) => {
const location = res.data.location;
const requestsDataArray = [];
const chunks = Math.ceil(file.size / chunkSize, chunkSize);
let chunk = 0;
location = res.data.location;
while (chunk < chunks) {
const offset = chunk * chunkSize;
const formData = new FormData();
@ -845,263 +844,19 @@ const startSessionFunc = (indexOfFile, t, dispatch, getState) => {
requestsDataArray.push(formData);
chunk++;
}
return { location, requestsDataArray, fileSize };
})
.then(({ location, requestsDataArray, fileSize }) =>
uploadFileChunks(
.then(() => {
throttleRefreshFiles(toFolderId, dispatch, getState);
//TODO: rewrite to async function
sendChunk(
currentFiles,
location,
requestsDataArray,
fileSize,
indexOfFile,
dispatch,
t,
dispatch,
getState
).then(() => {
if (indexOfFile + 1 !== files.length) {
startSessionFunc(indexOfFile + 1, t, dispatch, getState);
} else {
const uploadData = {
files: [],
filesSize: 0,
uploadStatus: null,
uploadedFiles: 0,
percent: 0,
uploaded: true,
};
setTimeout(() => {
dispatch(clearPrimaryProgressData());
dispatch(setUploadData(uploadData));
}, TIMEOUT);
}
})
)
.catch((err) => {
console.error(err);
const state = getState();
const { uploadData } = state.files;
uploadData.files[indexOfFile].error = err;
dispatch(setUploadData(uploadData));
const newPercent = getNewPercent(fileSize, indexOfFile, getState);
dispatch(
setPrimaryProgressBarData({
icon: "upload",
label: "Error", //TODO: Add translation
percent: newPercent,
visible: true,
alert: true,
})
);
return Promise.resolve();
});
};
// const sendChunk = (
// files,
// location,
// requestsDataArray,
// indexOfFile,
// t,
// dispatch,
// getState
// ) => {
// const state = getState();
// const { uploadData } = state.files;
// const { uploaded, percent, uploadedFiles } = uploadData;
// let newPercent = percent;
// const file =
// uploadData.files[indexOfFile] || uploadData.convertFiles[indexOfFile];
// const toFolderId = file.toFolderId;
// return;
// //sendRequestFunc(0);
// };
const uploadFileChunks = async (
location,
requestsDataArray,
fileSize,
indexOfFile,
dispatch,
t,
getState
) => {
const length = requestsDataArray.length;
for (let index = 0; index < length; index++) {
const res = await api.files.uploadFile(location, requestsDataArray[index]);
//console.log(`Uploaded chunk ${index}/${length}`, res);
const uploadedSize =
res && res.data && res.data.data && res.data.data.uploaded
? fileSize
: index * chunkSize;
const newPercent = getNewPercent(uploadedSize, indexOfFile, getState);
const newState = getState();
const { uploadedFiles, files } = newState.files.uploadData;
dispatch(
setPrimaryProgressBarData({
icon: "upload",
label: t("UploadingLabel", {
file: uploadedFiles,
totalFiles: files.length,
}),
percent: newPercent,
visible: true,
})
);
}
// All chuncks are uploaded
const newState = getState();
const { files } = newState.files.uploadData;
const currentFile = files[indexOfFile];
if (!currentFile) return Promise.resolve();
const { toFolderId } = currentFile;
return throttleRefreshFiles(toFolderId, dispatch, getState);
};
const getNewPercent = (uploadedSize, indexOfFile, getState) => {
const newState = getState();
const { files } = newState.files.uploadData;
const newTotalSize = sumBy(files, (f) => f.file.size);
const totalUploadedFiles = files.filter((_, i) => i < indexOfFile);
const totalUploadedSize = sumBy(totalUploadedFiles, (f) => f.file.size);
const newPercent = ((uploadedSize + totalUploadedSize) / newTotalSize) * 100;
// console.log(
// `newPercent=${newPercent} (newTotalSize=${newTotalSize} totalUploadedSize=${totalUploadedSize} indexOfFile=${indexOfFile})`
// );
return newPercent;
};
/*const sendRequestFunc = (index) => {
api.files
.uploadFile(location, requestsDataArray[index])
.then((res) => {
//percent problem? use getState()
const newState = getState();
const newFilesLength = newState.files.uploadData.files.length;
const newTotalSize = sumBy(
newState.files.uploadData.files,
(f) => f.file.size
);
//console.log("newTotalSize ", newTotalSize);
let isLatestFile = indexOfFile === newFilesLength - 1;
const fileId = res.data.data.id;
const totalUploadedFiles = newState.files.uploadData.files.filter(
(_, i) => i < indexOfFile
);
//console.log("indexOfFile ", indexOfFile);
//console.log("totalUploadedFiles ", totalUploadedFiles);
const totalUploadedSize = sumBy(totalUploadedFiles, (f) => f.file.size);
//console.log("totalUploadedSize ", totalUploadedSize);
if (index < requestsDataArray.length) {
//newPercent = (index / requestsDataArray.length) * 100;
newPercent =
((index * chunkSize + totalUploadedSize) / newTotalSize) * 100;
}
//if (res.data.data && res.data.data.uploaded) {
// newPercent = (currentFile.size / newTotalSize) * 100;
//}
//console.log("newPercent", newPercent);
if (index + 1 !== requestsDataArray.length) {
dispatch(
setPrimaryProgressBarData({
icon: "upload",
label: t("UploadingLabel", {
file: uploadedFiles,
totalFiles: files.length,
}),
percent: newPercent,
visible: true,
alert: false,
})
);
sendRequestFunc(index + 1);
} else if (uploaded) {
api.files.convertFile(fileId).then((convertRes) => {
if (convertRes && convertRes[0] && convertRes[0].progress !== 100) {
uploadData.percent = newPercent;
getConvertProgress(
fileId,
t,
uploadData,
isLatestFile,
indexOfFile,
dispatch,
getState
);
}
});
} else if (isLatestFile) {
if (uploaded) {
updateFiles(toFolderId, dispatch, getState);
} else {
const uploadStatus = getState().files.uploadData.uploadStatus;
if (uploadStatus === "convert") {
const newUploadData = {
...getState().files.uploadData,
...{
uploadedFiles: uploadedFiles + 1,
percent: newPercent,
uploaded: true,
},
};
updateConvertProgress(newUploadData, t, dispatch);
startSessionFunc(0, t, dispatch, getState);
} else if (uploadStatus === "pending") {
const stateUploadData = getState().files.uploadData;
const newUploadData = {
...stateUploadData,
...{
uploadStatus: null,
uploadedFiles: uploadedFiles + 1,
percent: newPercent,
uploaded: true,
},
};
updateConvertProgress(newUploadData, t, dispatch);
} else {
const newUploadData = {
...getState().files.uploadData,
...{ uploadedFiles: uploadedFiles + 1, percent: newPercent },
};
updateConvertProgress(newUploadData, t, dispatch);
updateFiles(toFolderId, dispatch, getState);
}
}
} else {
const newUploadData = {
...getState().files.uploadData,
...{ uploadedFiles: uploadedFiles + 1, percent: newPercent },
};
updateConvertProgress(newUploadData, t, dispatch);
console.log("Start session func ", newUploadData, indexOfFile + 1);
startSessionFunc(indexOfFile + 1, t, dispatch, getState);
}
})
.catch((err) => {
dispatch(
@ -1113,7 +868,153 @@ const getNewPercent = (uploadedSize, indexOfFile, getState) => {
//toastr.error(err);
setTimeout(() => dispatch(clearPrimaryProgressData()), TIMEOUT);
});
};*/
};
const sendChunk = (
files,
location,
requestsDataArray,
indexOfFile,
t,
dispatch,
getState
) => {
const state = getState();
const { uploadData } = state.files;
const {
uploaded,
percent,
uploadedFiles,
filesSize,
convertFilesSize,
} = uploadData;
//const totalSize = convertFilesSize + filesSize;
let newPercent = percent;
const toFolderId = uploadData.files[indexOfFile].toFolderId;
const sendRequestFunc = (index) => {
api.files
.uploadFile(location, requestsDataArray[index])
.then((res) => {
//percent problem? use getState()
const newState = getState();
const newFilesLength = newState.files.uploadData.files.length;
const newTotalSize = sumBy(
newState.files.uploadData.files,
(f) => f.file.size
);
//console.log("newTotalSize ", newTotalSize);
let isLatestFile = indexOfFile === newFilesLength - 1;
const fileId = res.data.data.id;
const totalUploadedFiles = newState.files.uploadData.files.filter(
(_, i) => i < indexOfFile
);
//console.log("indexOfFile ", indexOfFile);
//console.log("totalUploadedFiles ", totalUploadedFiles);
const totalUploadedSize = sumBy(totalUploadedFiles, (f) => f.file.size);
//console.log("totalUploadedSize ", totalUploadedSize);
if (index < requestsDataArray.length) {
//newPercent = (index / requestsDataArray.length) * 100;
newPercent =
((index * chunkSize + totalUploadedSize) / newTotalSize) * 100;
}
/*if (res.data.data && res.data.data.uploaded) {
newPercent = (currentFile.size / newTotalSize) * 100;
}*/
//console.log("newPercent", newPercent);
if (index + 1 !== requestsDataArray.length) {
dispatch(
setPrimaryProgressBarData({
icon: "upload",
label: t("UploadingLabel", {
file: uploadedFiles,
totalFiles: files.length,
}),
percent: newPercent,
visible: true,
alert: false,
})
);
sendRequestFunc(index + 1);
} else if (uploaded) {
api.files.convertFile(fileId).then((convertRes) => {
if (convertRes && convertRes[0] && convertRes[0].progress !== 100) {
uploadData.percent = newPercent;
getConvertProgress(
fileId,
t,
uploadData,
isLatestFile,
indexOfFile,
dispatch,
getState
);
}
});
} else if (isLatestFile) {
if (uploaded) {
updateFiles(toFolderId, dispatch, getState);
} else {
const uploadStatus = getState().files.uploadData.uploadStatus;
if (uploadStatus === "convert") {
const newUploadData = {
...getState().files.uploadData,
...{
uploadedFiles: uploadedFiles + 1,
percent: newPercent,
uploaded: true,
},
};
updateConvertProgress(newUploadData, t, dispatch);
startSessionFunc(0, t, dispatch, getState);
} else if (uploadStatus === "pending") {
const stateUploadData = getState().files.uploadData;
const newUploadData = {
...stateUploadData,
...{
uploadStatus: null,
uploadedFiles: uploadedFiles + 1,
percent: newPercent,
uploaded: true,
},
};
updateConvertProgress(newUploadData, t, dispatch);
} else {
const newUploadData = {
...getState().files.uploadData,
...{ uploadedFiles: uploadedFiles + 1, percent: newPercent },
};
updateConvertProgress(newUploadData, t, dispatch);
updateFiles(toFolderId, dispatch, getState);
}
}
} else {
const newUploadData = {
...getState().files.uploadData,
...{ uploadedFiles: uploadedFiles + 1, percent: newPercent },
};
updateConvertProgress(newUploadData, t, dispatch);
console.log("Start session func ", newUploadData, indexOfFile + 1);
startSessionFunc(indexOfFile + 1, t, dispatch, getState);
}
})
.catch((err) => {
dispatch(
setPrimaryProgressBarData({
visible: true,
alert: true,
})
);
//toastr.error(err);
setTimeout(() => dispatch(clearPrimaryProgressData()), TIMEOUT);
});
};
sendRequestFunc(0);
};
const updateFiles = (folderId, dispatch, getState) => {
//console.log("folderId ", folderId);

View File

@ -19,6 +19,7 @@ import {
SET_PRIMARY_PROGRESS_BAR_DATA,
SET_SECONDARY_PROGRESS_BAR_DATA,
SET_CONVERT_DIALOG_VISIBLE,
SET_SHARING_PANEL_VISIBLE,
SET_UPDATE_TREE,
SET_NEW_ROW_ITEMS,
SET_SELECTED_NODE,
@ -65,6 +66,7 @@ const initialState = {
alert: false,
},
convertDialogVisible: false,
sharingPanelVisible: false,
updateTree: false,
newRowItems: [],
selectedTreeNode: [],
@ -485,6 +487,10 @@ const filesReducer = (state = initialState, action) => {
return Object.assign({}, state, {
convertDialogVisible: action.convertDialogVisible,
});
case SET_SHARING_PANEL_VISIBLE:
return Object.assign({}, state, {
sharingPanelVisible: action.sharingPanelVisible,
});
case SET_UPDATE_TREE:
return Object.assign({}, state, {
updateTree: action.updateTree,

View File

@ -22,6 +22,22 @@ export const getEditedFormats = (state) => {
return state.files.docservice.editedDocs;
};
export const getCommentedFormats = (state) => {
return state.files.docservice.commentedDocs;
};
export const getReviewedFormats = (state) => {
return state.files.docservice.reviewedDocs;
};
export const getWebFilterFormats = (state) => {
return state.files.docservice.customfilterDocs;
};
export const getFormFillingFormats = (state) => {
return state.files.docservice.formfillingDocs;
};
export const getConvertedFormats = (state) => {
return state.files.docservice.convertDocs;
};
@ -68,6 +84,29 @@ export const canWebEdit = (extension) => {
});
};
export const canWebComment = (extension) => {
return createSelector(getCommentedFormats, (formats) => {
return presentInArray(formats, extension);
});
};
export const canWebReview = (extension) => {
return createSelector(getReviewedFormats, (formats) => {
return presentInArray(formats, extension);
});
};
export const canWebFilterEditing = (extension) => {
return createSelector(getWebFilterFormats, (formats) => {
return presentInArray(formats, extension);
});
};
export const canFormFillingDocs = (extension) => {
return createSelector(getFormFillingFormats, (formats) => {
return presentInArray(formats, extension);
});
};
export const canConvert = (extension) => {
return createSelector(getConvertedFormats, (formats) => {
return presentInArray(formats, extension);
@ -373,29 +412,36 @@ export const isCanBeDeleted = createSelector(
);
//TODO: Get the whole list of extensions
export const getAccessOption = (selection) => {
const isFolder = selection.find((x) => x.fileExst === undefined);
const isMedia = selection.find(
(x) => isSound(x.fileExst) || isVideo(x.fileExst)
export const getAccessOption = (state, selection) => {
return getOptions(state, selection);
};
export const getExternalAccessOption = (state, selection) => {
return getOptions(state, selection, true);
};
const getOptions = (state, selection, externalAccess = false) => {
const webEdit = selection.find((x) => canWebEdit(x.fileExst)(state));
const webComment = selection.find((x) => canWebComment(x.fileExst)(state));
const webReview = selection.find((x) => canWebReview(x.fileExst)(state));
const formFillingDocs = selection.find((x) =>
canFormFillingDocs(x.fileExst)(state)
);
const isPresentationOrTable = selection.find(
(x) => isSpreadsheet(x.fileExst) || isPresentation(x.fileExst)
const webFilter = selection.find((x) =>
canWebFilterEditing(x.fileExst)(state)
);
if (isFolder || isMedia) {
return ["FullAccess", "ReadOnly", "DenyAccess"];
} else if (isPresentationOrTable) {
return ["FullAccess", "ReadOnly", "DenyAccess", "Comment"];
} else {
return [
"FullAccess",
"ReadOnly",
"DenyAccess",
"Comment",
"Review",
"FormFilling",
];
}
let AccessOptions = [];
if (webEdit || !externalAccess) AccessOptions.push("FullAccess");
AccessOptions.push("ReadOnly", "DenyAccess");
if (webComment) AccessOptions.push("Comment");
if (webReview) AccessOptions.push("Review");
if (formFillingDocs) AccessOptions.push("FormFilling");
if (webFilter) AccessOptions.push("FilterEditing");
return AccessOptions;
};
export const getFolderIcon = (providerKey, size = 32) => {
@ -988,7 +1034,9 @@ export const getHeaderIndeterminate = createSelector(
getSelectionLength,
getItemsList,
(headerVisible, selectionLength, items) => {
return headerVisible && selectionLength < items.length;
return headerVisible && selectionLength
? selectionLength < items.length
: false;
}
);
@ -1068,9 +1116,16 @@ export const getOnlyFoldersSelected = createSelector(
}
);
export const getAccessedSelected = createSelector(getSelection, (selection) => {
return selection.every((x) => x.access === 1 || x.access === 0);
});
export const getAccessedSelected = createSelector(
getSelection,
getSelectionLength,
(selection, selectionLength) => {
return (
selectionLength &&
selection.every((x) => x.access === 1 || x.access === 0)
);
}
);
export const getOperationsFolders = createSelector(
getTreeFolders,
@ -1123,3 +1178,7 @@ export const getIconOfDraggedFile = (state) => {
return;
});
};
export const getSharePanelVisible = (state) => {
return state.files.sharingPanelVisible;
};

View File

@ -1547,9 +1547,9 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
version "7.0.16"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.16.tgz#0bbbf70c7bc4193210dd27e252c51260a37cd6a7"
integrity sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w==
version "7.11.0"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
dependencies:
"@babel/types" "^7.3.0"
@ -2166,7 +2166,7 @@ asap@~2.0.6:
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
"asc-web-common@file:../../../packages/asc-web-common":
version "1.0.284"
version "1.0.288"
dependencies:
axios "^0.19.1"
history "4.10.1"
@ -2183,7 +2183,7 @@ asap@~2.0.6:
sjcl "^1.0.8"
"asc-web-components@file:../../../packages/asc-web-components":
version "1.0.489"
version "1.0.492"
dependencies:
email-addresses "^3.1.0"
html-to-react "^1.4.2"
@ -4175,9 +4175,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
domutils@^2.4.2:
version "2.4.3"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.3.tgz#b8ca888695db9baf65b58462c0eff46d2d5cd85d"
integrity sha512-MDMfEjgtzHvRX7i21XQfkk/vfZbLOe0VJk8dDETkTTo3BTeH3NXz3Xvs94UQ+GzTw/GjRYKsfVKIIOheYX63fw==
version "2.4.4"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.4.tgz#282739c4b150d022d34699797369aad8d19bbbd3"
integrity sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.0.1"
@ -4242,9 +4242,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.612:
version "1.3.616"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8"
integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ==
version "1.3.619"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.619.tgz#4dc529ae802f5c9c31e7eea830144340539b62b4"
integrity sha512-WFGatwtk7Fw0QcKCZzfGD72hvbcXV8kLY8aFuj0Ip0QRnOtyLYMsc+wXbSjb2w4lk1gcAeNU1/lQ20A+tvuypQ==
elliptic@^6.5.3:
version "6.5.3"
@ -4833,7 +4833,7 @@ extsprintf@^1.2.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
fast-deep-equal@^3.1.1:
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
@ -6808,9 +6808,9 @@ js-tokens@^3.0.2:
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
js-yaml@^3.13.1:
version "3.14.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
version "3.14.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@ -7614,11 +7614,16 @@ ms@2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@2.1.2, ms@^2.1.1:
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
multicast-dns-service-types@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
@ -12365,9 +12370,9 @@ xmlchars@^2.1.1:
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
xregexp@^4.3.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.0.tgz#29660f5d6567cd2ef981dd4a50cb05d22c10719d"
integrity sha512-83y4aa8o8o4NZe+L+46wpa+F1cWR/wCGOWI3tzqUso0w3/KAvXy0+Di7Oe/cbNMixDR4Jmi7NEybWU6ps25Wkg==
version "4.4.1"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.1.tgz#c84a88fa79e9ab18ca543959712094492185fe65"
integrity sha512-2u9HwfadaJaY9zHtRRnH6BY6CQVNQKkYm3oLtC9gJXXzfsbACg5X5e4EZZGVAH+YIfa+QA9lsFQTTe3HURF3ag==
dependencies:
"@babel/runtime-corejs3" "^7.12.1"

View File

@ -1761,6 +1761,12 @@ namespace ASC.Api.Documents
return FilesControllerHelperInt.GenerateSharedLink(fileId, model.Share);
}
[Update("{fileId:int}/setacelink")]
public bool SetAceLink(int fileId, [FromBody] GenerateSharedLinkModel model)
{
return FilesControllerHelperInt.SetAceLink(fileId, model.Share);
}
/// <summary>
/// Get a list of available providers
/// </summary>

View File

@ -545,6 +545,11 @@ namespace ASC.Files.Helpers
return sharedInfo.Link;
}
public bool SetAceLink(T fileId, FileShare share)
{
return FileStorageService.SetAceLink(fileId, share);
}
///// <summary>
/////
///// </summary>

View File

@ -8,6 +8,7 @@
"asc-web-components": "file:../../../packages/asc-web-components",
"connected-react-router": "6.6.1",
"copy-to-clipboard": "^3.2.0",
"fast-deep-equal": "^3.1.3",
"history": "4.10.1",
"i18next": "19.0.3",
"i18next-browser-languagedetector": "4.0.1",

View File

@ -25,7 +25,7 @@ import {
} from "../../../../../store/people/actions";
import { getPeopleList } from "../../../../../store/people/selectors";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { store, api, constants, toastr, Loaders } from "asc-web-common";
import {
ChangeEmailDialog,
@ -359,7 +359,7 @@ class SectionBodyContent extends React.PureComponent {
if (currentProps.sectionWidth !== nextProps.sectionWidth) {
return true;
}
if (!isEqual(currentProps.data, nextProps.data)) {
if (!equal(currentProps.data, nextProps.data)) {
return true;
}
if (!isArrayEqual(currentProps.contextOptions, nextProps.contextOptions)) {

View File

@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { ComboBox, TextInput, IconButton } from "asc-web-components";
const Container = styled.div`
@ -15,7 +15,7 @@ const Container = styled.div`
class ContactField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import ContactField from "./ContactField";
import { ComboBox } from "asc-web-components";
@ -62,7 +62,7 @@ const renderItems = (
class ContactsField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,10 +1,10 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { FieldContainer, DatePicker } from "asc-web-components";
class DateField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,5 +1,5 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import {
FieldContainer,
SelectorAddButton,
@ -9,7 +9,7 @@ import { GroupSelector } from "asc-web-common";
class DepartmentField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,10 +1,10 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { FieldContainer, EmailInput } from "asc-web-components";
class EmailField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,5 +1,5 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import {
FieldContainer,
RadioButtonGroup,
@ -8,7 +8,7 @@ import {
class PasswordField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,14 +1,14 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { FieldContainer, RadioButtonGroup } from "asc-web-components";
class RadioField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {
console.log("RadioField render");
//console.log("RadioField render");
const {
isRequired,

View File

@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { FieldContainer, TextInput, Button } from "asc-web-components";
const InputContainer = styled.div`
@ -12,7 +12,7 @@ const InputContainer = styled.div`
class TextChangeField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,10 +1,10 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { FieldContainer, TextInput } from "asc-web-components";
class TextField extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1547,9 +1547,9 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
version "7.0.16"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.16.tgz#0bbbf70c7bc4193210dd27e252c51260a37cd6a7"
integrity sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w==
version "7.11.0"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
dependencies:
"@babel/types" "^7.3.0"
@ -2159,7 +2159,7 @@ asap@~2.0.6:
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
"asc-web-common@file:../../../packages/asc-web-common":
version "1.0.284"
version "1.0.288"
dependencies:
axios "^0.19.1"
history "4.10.1"
@ -2176,7 +2176,7 @@ asap@~2.0.6:
sjcl "^1.0.8"
"asc-web-components@file:../../../packages/asc-web-components":
version "1.0.489"
version "1.0.492"
dependencies:
email-addresses "^3.1.0"
html-to-react "^1.4.2"
@ -4168,9 +4168,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
domutils@^2.4.2:
version "2.4.3"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.3.tgz#b8ca888695db9baf65b58462c0eff46d2d5cd85d"
integrity sha512-MDMfEjgtzHvRX7i21XQfkk/vfZbLOe0VJk8dDETkTTo3BTeH3NXz3Xvs94UQ+GzTw/GjRYKsfVKIIOheYX63fw==
version "2.4.4"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.4.tgz#282739c4b150d022d34699797369aad8d19bbbd3"
integrity sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.0.1"
@ -4235,9 +4235,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.612:
version "1.3.616"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8"
integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ==
version "1.3.619"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.619.tgz#4dc529ae802f5c9c31e7eea830144340539b62b4"
integrity sha512-WFGatwtk7Fw0QcKCZzfGD72hvbcXV8kLY8aFuj0Ip0QRnOtyLYMsc+wXbSjb2w4lk1gcAeNU1/lQ20A+tvuypQ==
elliptic@^6.5.3:
version "6.5.3"
@ -4826,7 +4826,7 @@ extsprintf@^1.2.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
fast-deep-equal@^3.1.1:
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
@ -6801,9 +6801,9 @@ js-tokens@^3.0.2:
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
js-yaml@^3.13.1:
version "3.14.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
version "3.14.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@ -7607,11 +7607,16 @@ ms@2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@2.1.2, ms@^2.1.1:
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
multicast-dns-service-types@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
@ -12358,9 +12363,9 @@ xmlchars@^2.1.1:
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
xregexp@^4.3.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.0.tgz#29660f5d6567cd2ef981dd4a50cb05d22c10719d"
integrity sha512-83y4aa8o8o4NZe+L+46wpa+F1cWR/wCGOWI3tzqUso0w3/KAvXy0+Di7Oe/cbNMixDR4Jmi7NEybWU6ps25Wkg==
version "4.4.1"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.1.tgz#c84a88fa79e9ab18ca543959712094492185fe65"
integrity sha512-2u9HwfadaJaY9zHtRRnH6BY6CQVNQKkYm3oLtC9gJXXzfsbACg5X5e4EZZGVAH+YIfa+QA9lsFQTTe3HURF3ag==
dependencies:
"@babel/runtime-corejs3" "^7.12.1"

View File

@ -7,6 +7,7 @@
"asc-web-components": "file:../../packages/asc-web-components",
"axios": "^0.19.1",
"connected-react-router": "6.6.1",
"fast-deep-equal": "^3.1.3",
"history": "4.10.1",
"i18next": "19.0.3",
"i18next-browser-languagedetector": "4.0.1",

View File

@ -78,7 +78,7 @@ Tiles.propTypes = {
isPrimary: PropTypes.bool.isRequired,
};
const Body = ({ modules, match, isLoaded, organizationName }) => {
const Body = ({ modules, match, isLoaded }) => {
const { t } = useTranslation("translation", { i18n });
const { error } = match.params;
@ -106,13 +106,18 @@ const Body = ({ modules, match, isLoaded, organizationName }) => {
);
};
const Home = (props) => (
<PageLayout>
<PageLayout.SectionBody>
<Body {...props} />
</PageLayout.SectionBody>
</PageLayout>
);
const Home = (props) => {
const { defaultPage } = props;
return utils.tryRedirectTo(defaultPage) ? (
<></>
) : (
<PageLayout>
<PageLayout.SectionBody>
<Body {...props} />
</PageLayout.SectionBody>
</PageLayout>
);
};
Home.propTypes = {
modules: PropTypes.array.isRequired,
@ -121,11 +126,11 @@ Home.propTypes = {
function mapStateToProps(state) {
const { modules, isLoaded, settings } = state.auth;
const { organizationName } = settings;
const { defaultPage } = settings;
return {
modules,
isLoaded,
organizationName,
defaultPage,
};
}

View File

@ -1,7 +1,6 @@
import differenceWith from "lodash/differenceWith";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/es6/react";
import isEmpty from "lodash/isEmpty";
export const isArrayEqual = (arr1, arr2) => {
return isEmpty(differenceWith(arr1, arr2, isEqual));
return isEmpty(equal(arr1, arr2));
};

View File

@ -1547,9 +1547,9 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
version "7.0.16"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.16.tgz#0bbbf70c7bc4193210dd27e252c51260a37cd6a7"
integrity sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w==
version "7.11.0"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
dependencies:
"@babel/types" "^7.3.0"
@ -2159,7 +2159,7 @@ asap@~2.0.6:
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
"asc-web-common@file:../../packages/asc-web-common":
version "1.0.284"
version "1.0.288"
dependencies:
axios "^0.19.1"
history "4.10.1"
@ -2176,7 +2176,7 @@ asap@~2.0.6:
sjcl "^1.0.8"
"asc-web-components@file:../../packages/asc-web-components":
version "1.0.489"
version "1.0.492"
dependencies:
email-addresses "^3.1.0"
html-to-react "^1.4.2"
@ -4161,9 +4161,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
domutils@^2.4.2:
version "2.4.3"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.3.tgz#b8ca888695db9baf65b58462c0eff46d2d5cd85d"
integrity sha512-MDMfEjgtzHvRX7i21XQfkk/vfZbLOe0VJk8dDETkTTo3BTeH3NXz3Xvs94UQ+GzTw/GjRYKsfVKIIOheYX63fw==
version "2.4.4"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.4.tgz#282739c4b150d022d34699797369aad8d19bbbd3"
integrity sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.0.1"
@ -4228,9 +4228,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.612:
version "1.3.616"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8"
integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ==
version "1.3.619"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.619.tgz#4dc529ae802f5c9c31e7eea830144340539b62b4"
integrity sha512-WFGatwtk7Fw0QcKCZzfGD72hvbcXV8kLY8aFuj0Ip0QRnOtyLYMsc+wXbSjb2w4lk1gcAeNU1/lQ20A+tvuypQ==
elliptic@^6.5.3:
version "6.5.3"
@ -4819,7 +4819,7 @@ extsprintf@^1.2.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
fast-deep-equal@^3.1.1:
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
@ -6794,9 +6794,9 @@ js-tokens@^3.0.2:
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
js-yaml@^3.13.1:
version "3.14.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
version "3.14.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@ -7600,11 +7600,16 @@ ms@2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@2.1.2, ms@^2.1.1:
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
multicast-dns-service-types@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
@ -12351,9 +12356,9 @@ xmlchars@^2.1.1:
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
xregexp@^4.3.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.0.tgz#29660f5d6567cd2ef981dd4a50cb05d22c10719d"
integrity sha512-83y4aa8o8o4NZe+L+46wpa+F1cWR/wCGOWI3tzqUso0w3/KAvXy0+Di7Oe/cbNMixDR4Jmi7NEybWU6ps25Wkg==
version "4.4.1"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.4.1.tgz#c84a88fa79e9ab18ca543959712094492185fe65"
integrity sha512-2u9HwfadaJaY9zHtRRnH6BY6CQVNQKkYm3oLtC9gJXXzfsbACg5X5e4EZZGVAH+YIfa+QA9lsFQTTe3HURF3ag==
dependencies:
"@babel/runtime-corejs3" "^7.12.1"

View File

@ -1,6 +1,6 @@
{
"name": "asc-web-common",
"version": "1.0.286",
"version": "1.0.288",
"description": "Ascensio System SIA common components and solutions library",
"license": "AGPL-3.0",
"files": [
@ -26,6 +26,7 @@
},
"dependencies": {
"axios": "^0.19.1",
"fast-deep-equal": "^3.1.3",
"history": "4.10.1",
"lodash": "4.17.19",
"lodash-es": "4.17.15",

View File

@ -4,10 +4,12 @@ import FilesFilter from "./filter";
import { FolderType } from "../../constants";
import find from "lodash/find";
export function openEdit(fileId) {
export function openEdit(fileId, version, doc) {
const params = doc ? `?doc=${doc}` : "";
const options = {
method: "get",
url: `/files/file/${fileId}/openedit`,
url: `/files/file/${fileId}/openedit${params}`,
};
return request(options);
@ -394,6 +396,15 @@ export function getShareFiles(fileId) {
});
}
export function setExternalAccess(fileId, accessType) {
const data = { share: accessType };
return request({
method: "put",
url: `/files/${fileId}/setacelink`,
data,
});
}
export function setShareFolder(folderId, share, notify, sharingMessage) {
const data = { share, notify, sharingMessage };
return request({

View File

@ -1,12 +1,14 @@
import { request } from "../client";
import * as fakeGroup from "./fake";
export function getGroupList(fake = false) {
export function getGroupList(fake = false, searchValue) {
const params = searchValue ? `?filtervalue=${searchValue}` : "";
return fake
? fakeGroup.getGroupList()
: request({
method: "get",
url: "/group",
url: `/group${params}`,
});
}

View File

@ -13,8 +13,8 @@ import withReadme from "storybook-readme/with-readme";
import Readme from "./README.md";
import AdvancedSelector2 from ".";
import Section from "../../../.storybook/decorators/section";
import { Button, Avatar, Text } from "asc-web-components";
import isEqual from "lodash/isEqual";
import { Button } from "asc-web-components";
import equal from "fast-deep-equal/react";
import UserTooltip from "../PeopleSelector/sub-components/UserTooltip";
function getRandomInt(min, max) {
@ -137,7 +137,7 @@ class ADSelectorExample extends React.Component {
componentDidUpdate(prevProps) {
const { total, options, isOpen } = this.props;
if (!isEqual(prevProps.options, options)) {
if (!equal(prevProps.options, options)) {
this.setState({
options: options,
});

View File

@ -10,7 +10,6 @@ const StyledFooter = styled.div`
props.withEmbeddedComponent &&
css`
display: flex;
padding: 16px 0;
`}
${(props) =>

View File

@ -125,6 +125,7 @@ const StyledSelector = styled(Container)`
/* background-color: red; */
padding: 16px 16px 0 16px;
grid-row-gap: 2px;
overflow: hidden;
grid-template-columns: 1fr;
grid-template-rows: ${(props) =>
@ -137,7 +138,7 @@ const StyledSelector = styled(Container)`
? "100px"
: "30px"
: props.groups && props.groups.length > 0
? "70px"
? "75px"
: "30px"
: "30px"} 1fr;
grid-template-areas: "header-options" "body-options";
@ -207,7 +208,7 @@ const StyledSelector = styled(Container)`
.body-options {
grid-area: body-options;
margin-left: -8px;
margin-top: 5px;
margin-top: 2px;
@media ${tablet} {
width: 290px;

View File

@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import { SearchInput } from "asc-web-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import FilterBlock from "./sub-components/FilterBlock";
import SortComboBox from "./sub-components/SortComboBox";
import ViewSelector from "./sub-components/ViewSelector";
@ -143,7 +143,7 @@ class FilterInput extends React.Component {
}
if (
(!isEqual(selectedFilterData.filterValues, filterValues) ||
(!equal(selectedFilterData.filterValues, filterValues) ||
inputValue !== searchText) &&
sectionWidth !== prevProps.sectionWidth
) {
@ -164,7 +164,7 @@ class FilterInput extends React.Component {
}
if (
!isEqual(
!equal(
prevProps.selectedFilterData.filterValues,
selectedFilterData.filterValues
) &&
@ -189,7 +189,7 @@ class FilterInput extends React.Component {
} = this.props;
if (
!isEqual(selectedFilterData, nextProps.selectedFilterData) ||
!equal(selectedFilterData, nextProps.selectedFilterData) ||
this.props.viewAs !== nextProps.viewAs ||
this.props.widthProp !== nextProps.widthProp ||
sectionWidth !== nextProps.sectionWidth
@ -206,7 +206,7 @@ class FilterInput extends React.Component {
)
return true;
return !isEqual(this.state, nextState);
return !equal(this.state, nextState);
}
onChangeSortDirection = (key) => {

View File

@ -3,7 +3,7 @@ import FilterButton from "./FilterButton";
import HideFilter from "./HideFilter";
import { ComboBox } from "asc-web-components";
import CloseButton from "./CloseButton";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import PropTypes from "prop-types";
import {
StyledFilterItem,
@ -291,8 +291,8 @@ class FilterBlock extends React.Component {
const { needUpdateFilter } = this.props;
if (
(needUpdate || needUpdateFilter) &&
(!isEqual(prevState.openFilterItems, this.state.openFilterItems) ||
!isEqual(prevState.hiddenFilterItems, this.state.hiddenFilterItems))
(!equal(prevState.openFilterItems, this.state.openFilterItems) ||
!equal(prevState.hiddenFilterItems, this.state.hiddenFilterItems))
) {
this.props.onFilterRender();
this.setNeedUpdate(false);
@ -302,10 +302,10 @@ class FilterBlock extends React.Component {
shouldComponentUpdate(nextProps, nextState) {
const { hiddenFilterItems, openFilterItems } = nextProps;
if (!isEqual(this.props, nextProps)) {
if (!equal(this.props, nextProps)) {
if (
!isEqual(this.props.hiddenFilterItems, hiddenFilterItems) ||
!isEqual(this.props.openFilterItems, openFilterItems)
!equal(this.props.hiddenFilterItems, hiddenFilterItems) ||
!equal(this.props.openFilterItems, openFilterItems)
) {
this.setState({
hiddenFilterItems,
@ -316,7 +316,7 @@ class FilterBlock extends React.Component {
return true;
}
return !isEqual(this.state, nextState);
return !equal(this.state, nextState);
}
onDeleteFilterItem = (key) => {

View File

@ -1,5 +1,5 @@
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import {
ComboBox,
IconButton,
@ -65,7 +65,7 @@ class SortComboBox extends React.Component {
});
return true;
}
return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
return !equal(this.props, nextProps) || !equal(this.state, nextState);
}
onToggleAction = () => {

View File

@ -18,7 +18,7 @@ class GroupSelector extends React.Component {
changeLanguage(i18n);
getGroupList(this.props.useFake)
.then((groups) => this.setState({ groups: this.convertGroups(groups) }))
.then((groups) => this.setState({ options: this.convertGroups(groups) }))
.catch((error) => console.log(error));
}
@ -45,7 +45,7 @@ class GroupSelector extends React.Component {
);
this.setState({ isNextPageLoading: true }, () => {
getGroupList(this.props.useFake)
getGroupList(this.props.useFake, searchValue)
.then((groups) => {
const newOptions = this.convertGroups(groups);
@ -59,10 +59,10 @@ class GroupSelector extends React.Component {
});
};
getDefaultState = (isOpen, groups) => {
getDefaultState = (isOpen, options) => {
return {
isOpen: isOpen,
groups,
options,
hasNextPage: true,
isNextPageLoading: false,
};
@ -77,7 +77,7 @@ class GroupSelector extends React.Component {
render() {
const {
isOpen,
groups,
options,
selectedOptions,
hasNextPage,
isNextPageLoading,
@ -104,7 +104,7 @@ class GroupSelector extends React.Component {
id={id}
className={className}
style={style}
options={groups}
options={options}
hasNextPage={hasNextPage}
isNextPageLoading={isNextPageLoading}
loadNextPage={this.loadNextPage}

View File

@ -8,7 +8,7 @@ import VideoViewer from "./sub-components/video-viewer";
import MediaScrollButton from "./sub-components/scroll-button";
import ControlBtn from "./sub-components/control-btn";
import StyledMediaViewer from "./StyledMediaViewer";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import Hammer from "hammerjs";
const StyledVideoViewer = styled(VideoViewer)`
@ -116,7 +116,7 @@ class MediaViewer extends React.Component {
if (
this.props.visible &&
this.props.visible === prevProps.visible &&
!isEqual(this.props.playlist, prevProps.playlist)
!equal(this.props.playlist, prevProps.playlist)
) {
let playlistPos = 0;
if (this.props.playlist.length > 0) {
@ -133,7 +133,7 @@ class MediaViewer extends React.Component {
visible: false,
});
}
} else if (!isEqual(this.props.playlist, prevProps.playlist)) {
} else if (!equal(this.props.playlist, prevProps.playlist)) {
this.setState({
playlist: this.props.playlist,
});

View File

@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { Scrollbar, utils } from "asc-web-components";
const { tablet, smallTablet } = utils.device;
@ -51,7 +51,7 @@ const StyledArticleWrapper = styled.div`
class ArticleBody extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,7 +1,7 @@
import React from "react";
import styled from "styled-components";
import { utils } from "asc-web-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
const { tablet } = utils.device;
const StyledArticleHeader = styled.div`
@ -15,7 +15,7 @@ const StyledArticleHeader = styled.div`
class ArticleHeader extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,7 +1,6 @@
import React from "react";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { utils } from "asc-web-components";
const { tablet } = utils.device;
@ -20,7 +19,7 @@ const StyledArticleMainButton = styled.div`
class ArticleMainButton extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,10 +1,10 @@
import React from "react";
import PropTypes from "prop-types";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
class SectionBodyContent extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import styled, { css } from "styled-components";
import { utils, Scrollbar, DragAndDrop } from "asc-web-components";
import SelectedFrame from "./SelectedFrame";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
const { tablet } = utils.device;
@ -77,7 +77,7 @@ class SectionBody extends React.Component {
}
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
componentDidMount() {

View File

@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
const StyledSectionFilter = styled.div`
margin: 16px 24px 9px 0;
@ -8,7 +8,7 @@ const StyledSectionFilter = styled.div`
class SectionFilter extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,7 +1,7 @@
import React from "react";
import styled from "styled-components";
import { utils } from "asc-web-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
const { tablet } = utils.device;
@ -49,7 +49,7 @@ const StyledSectionHeader = styled.div`
class SectionHeader extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
const StyledSectionPaging = styled.div`
margin: 16px 0 0;
@ -8,7 +8,7 @@ const StyledSectionPaging = styled.div`
class SectionPaging extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -98,6 +98,7 @@ export const ShareAccessRights = Object.freeze({
Review: 5,
Comment: 6,
FormFilling: 7,
CustomFilter: 8,
});
export const i18nBaseSettings = {

View File

@ -108,11 +108,16 @@ export { withLayoutSize } from "./withLayoutSize";
export function tryRedirectTo(page) {
if (
page &&
page !== "" &&
page !== "/" &&
window.location &&
window.location.pathname &&
window.location.pathname === page &&
window.location.pathname.indexOf(page) !== -1
)
) {
return false;
}
//TODO: check if we already on default page
window.location.replace(page);

View File

@ -2341,16 +2341,16 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
version "7.0.16"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.16.tgz#0bbbf70c7bc4193210dd27e252c51260a37cd6a7"
integrity sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w==
version "7.11.0"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
dependencies:
"@babel/types" "^7.3.0"
"@types/cheerio@^0.22.22":
version "0.22.22"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f"
integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA==
version "0.22.23"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.23.tgz#74bcfee9c5ee53f619711dca953a89fe5cfa4eb4"
integrity sha512-QfHLujVMlGqcS/ePSf3Oe5hK3H8wi/yN2JYuxSB1U10VvW1fO3K8C+mURQesFYS1Hn7lspOsTT75SKq/XtydQg==
dependencies:
"@types/node" "*"
@ -3132,7 +3132,7 @@ arrify@^1.0.1:
integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
"asc-web-components@file:../../packages/asc-web-components":
version "1.0.489"
version "1.0.492"
dependencies:
email-addresses "^3.1.0"
html-to-react "^1.4.2"
@ -5317,9 +5317,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
domutils@^2.4.2:
version "2.4.3"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.3.tgz#b8ca888695db9baf65b58462c0eff46d2d5cd85d"
integrity sha512-MDMfEjgtzHvRX7i21XQfkk/vfZbLOe0VJk8dDETkTTo3BTeH3NXz3Xvs94UQ+GzTw/GjRYKsfVKIIOheYX63fw==
version "2.4.4"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.4.tgz#282739c4b150d022d34699797369aad8d19bbbd3"
integrity sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.0.1"
@ -5403,9 +5403,9 @@ ejs@^2.7.4:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.612:
version "1.3.616"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8"
integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ==
version "1.3.619"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.619.tgz#4dc529ae802f5c9c31e7eea830144340539b62b4"
integrity sha512-WFGatwtk7Fw0QcKCZzfGD72hvbcXV8kLY8aFuj0Ip0QRnOtyLYMsc+wXbSjb2w4lk1gcAeNU1/lQ20A+tvuypQ==
element-resize-detector@^1.2.1:
version "1.2.1"
@ -6017,7 +6017,7 @@ fast-deep-equal@^2.0.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
fast-deep-equal@^3.1.1:
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
@ -8941,11 +8941,16 @@ ms@2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@2.1.2, ms@^2.1.1:
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"

View File

@ -1,6 +1,6 @@
{
"name": "asc-web-components",
"version": "1.0.490",
"version": "1.0.492",
"description": "Ascensio System SIA component library",
"license": "AGPL-3.0",
"main": "dist/asc-web-components.js",
@ -100,6 +100,7 @@
},
"dependencies": {
"email-addresses": "^3.1.0",
"fast-deep-equal": "^3.1.3",
"html-to-react": "^1.4.2",
"lodash": "4.17.19",
"lodash-es": "4.17.15",

View File

@ -3,7 +3,7 @@ import DropDown from "../drop-down";
import DropDownItem from "../drop-down-item";
import PropTypes from "prop-types";
import React from "react";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import styled from "styled-components";
const StyledComboBox = styled.div`
@ -38,7 +38,7 @@ class ComboBox extends React.Component {
shouldComponentUpdate(nextProps, nextState) {
const needUpdate =
!isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
!equal(this.props, nextProps) || !equal(this.state, nextState);
return needUpdate;
}
@ -56,11 +56,16 @@ class ComboBox extends React.Component {
};
comboBoxClick = (e) => {
if (this.props.isDisabled || (e && e.target.closest(".optionalBlock")))
const { disableIconClick, isDisabled, toggleAction } = this.props;
if (
isDisabled ||
(disableIconClick && e && e.target.closest(".optionalBlock"))
)
return;
this.setState({ isOpen: !this.state.isOpen }, () => {
this.props.toggleAction && this.props.toggleAction(e, this.state.isOpen);
toggleAction && toggleAction(e, this.state.isOpen);
});
};
@ -196,6 +201,7 @@ ComboBox.propTypes = {
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
toggleAction: PropTypes.func,
textOverflow: PropTypes.bool,
disableIconClick: PropTypes.bool,
};
ComboBox.defaultProps = {
@ -205,6 +211,7 @@ ComboBox.defaultProps = {
scaled: true,
scaledOptions: false,
size: "base",
disableIconClick: true,
};
export default ComboBox;

View File

@ -1,8 +1,8 @@
import React from "react";
import PropTypes from "prop-types";
import isEqual from "lodash/isEqual";
import TextInput from "../text-input";
import { EmailSettings, parseAddress } from "../../utils/email/";
import equal from "fast-deep-equal/react";
/* eslint-disable no-unused-vars */
/* eslint-disable react/prop-types */
@ -32,7 +32,7 @@ class EmailInput extends React.Component {
}
shouldComponentUpdate(nextProps, nextState) {
return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
return !equal(this.props, nextProps) || !equal(this.state, nextState);
}
componentDidUpdate(prevProps) {

View File

@ -1,7 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import IconButton from "../icon-button";
import TextInput from "../text-input";
@ -119,7 +119,7 @@ class FileInput extends Component {
}
shouldComponentUpdate(nextProps, nextState) {
return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
return !equal(this.props, nextProps) || !equal(this.state, nextState);
}
onIconFileClick = (e) => {

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 3H14L9 8V14L7 12V8L2 3Z" fill="#83888D"/>
</svg>

After

Width:  |  Height:  |  Size: 157 B

View File

@ -199,6 +199,7 @@ import OrigCatalogPrivateRoomIcon from "./catalog.private.react.svg";
import OrigMoveToIcon from "./move.react.svg";
import OrigIntegrationIcon from "./integration.react.svg";
import OrigCustomFilterIcon from "./custom.filter.react.svg";
import OrigButtonUploadIcon from "./button.upload.react.svg";
import OrigButtonFileIcon from "./button.file.react.svg";
@ -441,6 +442,10 @@ export const CrossSidebarIcon = createStyledIcon(
OrigCrossSidebarIcon,
"CrossSidebarIcon"
);
export const CustomFilterIcon = createStyledIcon(
OrigCustomFilterIcon,
"CustomFilterIcon"
);
export const DangerIcon = createStyledIcon(OrigDangerIcon, "DangerIcon");
export const DangerToastIcon = createStyledIcon(
OrigDangerToastIcon,

View File

@ -5,7 +5,7 @@ import { Icons } from "../icons";
import DropDown from "../drop-down";
import DropDownItem from "../drop-down-item";
import Text from "../text";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
// eslint-disable-next-line no-unused-vars
const SimpleLinkWithDropdown = ({
@ -19,6 +19,7 @@ const SimpleLinkWithDropdown = ({
title,
dropdownType,
data,
isDisabled,
...props
}) => <a {...props}></a>;
@ -75,7 +76,7 @@ const Caret = styled(ExpanderDownIcon)`
`;
const StyledLinkWithDropdown = styled(SimpleLinkWithDropdown)`
cursor: pointer;
${(props) => !props.isDisabled && "cursor: pointer;"}
text-decoration: none;
user-select: none;
padding-right: 20px;
@ -151,6 +152,7 @@ class LinkWithDropdown extends React.Component {
setIsOpen = (isOpen) => this.setState({ isOpen: isOpen });
onOpen = () => {
if (this.props.isDisabled) return;
this.setIsOpen(!this.state.isOpen);
};
@ -176,7 +178,7 @@ class LinkWithDropdown extends React.Component {
};
shouldComponentUpdate(nextProps, nextState) {
return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
return !equal(this.props, nextProps) || !equal(this.state, nextState);
}
render() {
@ -194,23 +196,27 @@ class LinkWithDropdown extends React.Component {
data,
id,
style,
isDisabled,
...rest
} = this.props;
const disableColor = "#A3A9AE";
return (
<StyledSpan className={className} id={id} style={style} ref={this.ref}>
<span onClick={this.onOpen}>
<StyledLinkWithDropdown
isSemitransparent={isSemitransparent}
dropdownType={dropdownType}
color={color}
color={isDisabled ? disableColor : color}
isDisabled={isDisabled}
>
<StyledText
isTextOverflow={isTextOverflow}
truncate={isTextOverflow}
fontSize={fontSize}
fontWeight={fontWeight}
color={color}
color={isDisabled ? disableColor : color}
isBold={isBold}
title={title}
dropdownType={dropdownType}
@ -218,7 +224,7 @@ class LinkWithDropdown extends React.Component {
{this.props.children}
</StyledText>
<Caret
color={color}
color={isDisabled ? disableColor : color}
dropdownType={dropdownType}
isOpen={this.state.isOpen}
/>
@ -260,6 +266,7 @@ LinkWithDropdown.propTypes = {
className: PropTypes.string,
id: PropTypes.string,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
isDisabled: PropTypes.bool,
};
LinkWithDropdown.defaultProps = {
@ -272,6 +279,7 @@ LinkWithDropdown.defaultProps = {
isTextOverflow: true,
isOpen: false,
className: "",
isDisabled: false,
};
export default LinkWithDropdown;

View File

@ -1,7 +1,7 @@
import React from "react";
import styled from "styled-components";
import PropTypes from "prop-types";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { tablet, mobile } from "../../utils/device";
import InputBlock from "../input-block";
@ -331,7 +331,7 @@ class PasswordInput extends React.Component {
};
shouldComponentUpdate(nextProps, nextState) {
return !isEqual(this.props, nextProps) || !isEqual(this.state, nextState);
return !equal(this.props, nextProps) || !equal(this.state, nextState);
}
renderTextTooltip = (settings, length, digits, capital, special) => {

View File

@ -2,9 +2,9 @@ import Checkbox from "../checkbox";
import ContextMenuButton from "../context-menu-button";
import PropTypes from "prop-types";
import React from "react";
import isEqual from "lodash/isEqual";
import styled from "styled-components";
import { tablet } from "../../utils/device";
import equal from "fast-deep-equal/react";
const StyledRow = styled.div`
cursor: default;
@ -87,7 +87,7 @@ class Row extends React.Component {
if (this.props.needForUpdate) {
return this.props.needForUpdate(this.props, nextProps);
}
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
componentDidMount() {

View File

@ -2,7 +2,7 @@ import React from "react";
import styled, { css } from "styled-components";
import PropTypes from "prop-types";
import Text from "../text";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
import { Icons } from "../icons";
// eslint-disable-next-line no-unused-vars
@ -105,7 +105,7 @@ const StyledSocialButton = styled(ButtonWrapper).attrs((props) => ({
class SocialButton extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -9,7 +9,8 @@ const commonInputStyle = css`
(props.size === "huge" && "500px") ||
(props.size === "large" && "550px")};
background-color: ${(props) => (props.isDisabled ? "#F8F9F9" : "#fff")};
color: ${(props) => (props.isDisabled ? "#A3A9AE" : "#333333")};
color: ${(props) =>
props.isDisabled ? "#A3A9AE" : props.color ? props.color : "#333333"};
border-radius: 3px;
box-shadow: none;

View File

@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import styled from "styled-components";
import commonInputStyle from "../text-input/common-input-styles";
import MaskedInput from "react-text-mask";
import isEqual from "lodash/isEqual";
import equal from "fast-deep-equal/react";
/* eslint-disable no-unused-vars, react/prop-types */
const Input = ({
@ -109,7 +109,7 @@ const StyledInput = styled(Input).attrs((props) => ({
class TextInput extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);
return !equal(this.props, nextProps);
}
render() {

View File

@ -32,6 +32,7 @@ const ClearTextareaAutosize = ({
isDisabled,
heightScale,
hasError,
color,
...props
}) => <TextareaAutosize {...props} />;
const StyledTextarea = styled(ClearTextareaAutosize)`
@ -105,6 +106,7 @@ class Textarea extends React.PureComponent {
value,
fontSize,
heightTextArea,
color,
} = this.props;
return (
<StyledScrollbar
@ -128,6 +130,7 @@ class Textarea extends React.PureComponent {
readOnly={isReadOnly}
value={value}
fontSize={fontSize}
color={color}
/>
</StyledScrollbar>
);
@ -150,6 +153,7 @@ Textarea.propTypes = {
value: PropTypes.string,
fontSize: PropTypes.number,
heightTextArea: PropTypes.number,
color: PropTypes.string,
};
Textarea.defaultProps = {
@ -162,6 +166,7 @@ Textarea.defaultProps = {
tabIndex: -1,
value: "",
fontSize: 13,
color: "#333333",
};
export default Textarea;

View File

@ -2334,16 +2334,16 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
version "7.0.16"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.16.tgz#0bbbf70c7bc4193210dd27e252c51260a37cd6a7"
integrity sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w==
version "7.11.0"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
dependencies:
"@babel/types" "^7.3.0"
"@types/cheerio@^0.22.22":
version "0.22.22"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f"
integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA==
version "0.22.23"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.23.tgz#74bcfee9c5ee53f619711dca953a89fe5cfa4eb4"
integrity sha512-QfHLujVMlGqcS/ePSf3Oe5hK3H8wi/yN2JYuxSB1U10VvW1fO3K8C+mURQesFYS1Hn7lspOsTT75SKq/XtydQg==
dependencies:
"@types/node" "*"
@ -5286,9 +5286,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
domutils@^2.4.2:
version "2.4.3"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.3.tgz#b8ca888695db9baf65b58462c0eff46d2d5cd85d"
integrity sha512-MDMfEjgtzHvRX7i21XQfkk/vfZbLOe0VJk8dDETkTTo3BTeH3NXz3Xvs94UQ+GzTw/GjRYKsfVKIIOheYX63fw==
version "2.4.4"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.4.4.tgz#282739c4b150d022d34699797369aad8d19bbbd3"
integrity sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.0.1"
@ -5372,9 +5372,9 @@ ejs@^2.7.4:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.612:
version "1.3.616"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8"
integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ==
version "1.3.619"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.619.tgz#4dc529ae802f5c9c31e7eea830144340539b62b4"
integrity sha512-WFGatwtk7Fw0QcKCZzfGD72hvbcXV8kLY8aFuj0Ip0QRnOtyLYMsc+wXbSjb2w4lk1gcAeNU1/lQ20A+tvuypQ==
element-resize-detector@^1.2.1:
version "1.2.1"
@ -5981,7 +5981,7 @@ fast-deep-equal@^2.0.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
fast-deep-equal@^3.1.1:
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
@ -8851,11 +8851,16 @@ ms@2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@2.1.2, ms@^2.1.1:
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"