From 886e1baf892d33485181280fb3db5a40d73bad53 Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Tue, 2 Nov 2021 13:30:33 +0500 Subject: [PATCH 001/479] Web: Common: added icons in floating button --- .../components/FloatingButton/FloatingButton.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/asc-web-common/components/FloatingButton/FloatingButton.js b/packages/asc-web-common/components/FloatingButton/FloatingButton.js index 84401b41706..1d20554a657 100644 --- a/packages/asc-web-common/components/FloatingButton/FloatingButton.js +++ b/packages/asc-web-common/components/FloatingButton/FloatingButton.js @@ -17,6 +17,8 @@ import ButtonMoveIcon from "../../../../public/images/button.move.react.svg"; import ButtonDuplicateIcon from "../../../../public/images/button.duplicate.react.svg"; import ButtonAlertIcon from "../../../../public/images/button.alert.react.svg"; import commonIconsStyles from "@appserver/components/utils/common-icons-style"; +import ButtonPlusIcon from "../../../../public/images/actions.button.plus.react.svg"; +import ButtonMinusIcon from "../../../../public/images/actions.button.minus.react.svg"; const StyledButtonAlertIcon = styled(ButtonAlertIcon)` ${commonIconsStyles} @@ -50,6 +52,10 @@ const FloatingButton = ({ id, className, style, ...rest }) => { ) : icon == "move" ? ( + ) : icon == "plus" ? ( + + ) : icon == "minus" ? ( + ) : ( )} @@ -67,7 +73,15 @@ FloatingButton.propTypes = { id: PropTypes.string, className: PropTypes.string, style: PropTypes.object, - icon: PropTypes.oneOf(["upload", "file", "trash", "move", "duplicate"]), + icon: PropTypes.oneOf([ + "upload", + "file", + "trash", + "move", + "duplicate", + "plus", + "minus", + ]), alert: PropTypes.bool, percent: PropTypes.number, onClick: PropTypes.func, From b42a30acda43e606d81b271eb45f5b7acb62c7cd Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Tue, 2 Nov 2021 13:31:18 +0500 Subject: [PATCH 002/479] Web: Components: added main button styles --- packages/asc-web-components/themes/base.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/asc-web-components/themes/base.js b/packages/asc-web-components/themes/base.js index d3ccfbe5deb..041fe6432b1 100644 --- a/packages/asc-web-components/themes/base.js +++ b/packages/asc-web-components/themes/base.js @@ -167,6 +167,18 @@ const Base = { bodyPadding: "16px 0", }, + mainButtonMobile: { + dropDown: { + right: "15%", + bottom: "15%", + width: "400px", + }, + + dropDownItem: { + padding: "10px", + }, + }, + mainButton: { backgroundColor: orangeMain, disableBackgroundColor: orangeDisabled, From d6544c073c5d457af84cea82a48a4af2920340cb Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Tue, 2 Nov 2021 13:31:54 +0500 Subject: [PATCH 003/479] Web: Public: added icons --- public/images/actions.button.minus.react.svg | 3 +++ public/images/actions.button.plus.react.svg | 3 +++ public/images/mobile.actions.document.react.svg | 4 ++++ public/images/mobile.actions.folder.react.svg | 3 +++ public/images/mobile.actions.presentation.react.svg | 5 +++++ public/images/mobile.actions.remove.react.svg | 3 +++ public/images/mobile.actions.spreadsheet.react.svg | 4 ++++ public/images/mobile.star.react.svg | 3 +++ 8 files changed, 28 insertions(+) create mode 100644 public/images/actions.button.minus.react.svg create mode 100644 public/images/actions.button.plus.react.svg create mode 100644 public/images/mobile.actions.document.react.svg create mode 100644 public/images/mobile.actions.folder.react.svg create mode 100644 public/images/mobile.actions.presentation.react.svg create mode 100644 public/images/mobile.actions.remove.react.svg create mode 100644 public/images/mobile.actions.spreadsheet.react.svg create mode 100644 public/images/mobile.star.react.svg diff --git a/public/images/actions.button.minus.react.svg b/public/images/actions.button.minus.react.svg new file mode 100644 index 00000000000..7ca7cef795c --- /dev/null +++ b/public/images/actions.button.minus.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/actions.button.plus.react.svg b/public/images/actions.button.plus.react.svg new file mode 100644 index 00000000000..1f0fa10356c --- /dev/null +++ b/public/images/actions.button.plus.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/mobile.actions.document.react.svg b/public/images/mobile.actions.document.react.svg new file mode 100644 index 00000000000..dc6450ad0b4 --- /dev/null +++ b/public/images/mobile.actions.document.react.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/mobile.actions.folder.react.svg b/public/images/mobile.actions.folder.react.svg new file mode 100644 index 00000000000..665cd8c78e9 --- /dev/null +++ b/public/images/mobile.actions.folder.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/mobile.actions.presentation.react.svg b/public/images/mobile.actions.presentation.react.svg new file mode 100644 index 00000000000..08f6679843f --- /dev/null +++ b/public/images/mobile.actions.presentation.react.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/mobile.actions.remove.react.svg b/public/images/mobile.actions.remove.react.svg new file mode 100644 index 00000000000..767bada9e9e --- /dev/null +++ b/public/images/mobile.actions.remove.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/mobile.actions.spreadsheet.react.svg b/public/images/mobile.actions.spreadsheet.react.svg new file mode 100644 index 00000000000..32539e770aa --- /dev/null +++ b/public/images/mobile.actions.spreadsheet.react.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/mobile.star.react.svg b/public/images/mobile.star.react.svg new file mode 100644 index 00000000000..13076bbe50a --- /dev/null +++ b/public/images/mobile.star.react.svg @@ -0,0 +1,3 @@ + + + From da5c9bbd3f91d0159c9388b04634c230401549ac Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Tue, 2 Nov 2021 13:34:15 +0500 Subject: [PATCH 004/479] Web: Components: created the main button mobile component --- .../main-button-mobile/index.js | 225 ++++++++++++++++++ .../main-button-mobile.stories.js | 165 +++++++++++++ .../main-button-mobile/styled-main-button.js | 163 +++++++++++++ 3 files changed, 553 insertions(+) create mode 100644 packages/asc-web-components/main-button-mobile/index.js create mode 100644 packages/asc-web-components/main-button-mobile/main-button-mobile.stories.js create mode 100644 packages/asc-web-components/main-button-mobile/styled-main-button.js diff --git a/packages/asc-web-components/main-button-mobile/index.js b/packages/asc-web-components/main-button-mobile/index.js new file mode 100644 index 00000000000..946c59ba989 --- /dev/null +++ b/packages/asc-web-components/main-button-mobile/index.js @@ -0,0 +1,225 @@ +import React, { useState, useRef, useEffect } from "react"; +import PropTypes from "prop-types"; +import { + StyledFloatingButton, + StyledDropDown, + StyledDropDownItem, + StyledContainerAction, + StyledProgressBarContainer, + StyledMobileProgressBar, + StyledProgressContainer, + StyledBar, + StyledButtonWrapper, + StyledButtonOptions, +} from "./styled-main-button"; +import IconButton from "../icon-button"; +import Button from "../button"; +import Text from "../text"; +import Scrollbar from "@appserver/components/scrollbar"; + +const ProgressBarMobile = ({ + label, + status, + percent, + open, + onCancel, + icon, + onClick, +}) => { + const uploadPercent = percent > 100 ? 100 : percent; + + return ( + + + {label} + + + {status} + + + + + + + ); +}; + +ProgressBarMobile.propTypes = { + label: PropTypes.string, + status: PropTypes.string, + percent: PropTypes.number, + open: PropTypes.bool, + onCancel: PropTypes.func, + icon: PropTypes.string, + /** The function that will be called after the progress header click */ + onClick: PropTypes.func, +}; + +const MainButtonMobile = (props) => { + const { + className, + style, + opened, + onUploadClick, + actionOptions, + progressOptions, + buttonOptions, + percent, + title, + withButton, + manualWidth, + isOpenButton, + onClose, + } = props; + + const [isOpen, setIsOpen] = useState(opened); + + useEffect(() => { + if (opened !== isOpen) { + setIsOpen(opened); + } + }, [opened]); + + const ref = useRef(); + + const dropDownRef = useRef(); + + const toggle = (isOpen) => { + return setIsOpen(isOpen); + }; + + const onMainButtonClick = (e) => { + if (isOpen && ref.current.contains(e.target)) return; + toggle(!isOpen); + }; + + const outsideClick = (e) => { + if (isOpen && ref.current.contains(e.target)) return; + toggle(false); + }; + + const isUploading = progressOptions + ? progressOptions.filter((option) => option.open) + : []; + + console.log(dropDownRef); + + const renderDropDown = () => { + return ( + + + {actionOptions.map((option) => ( + + ))} + + 0 ? true : false} + isOpenButton={isOpenButton} + > + {progressOptions && + progressOptions.map((option) => ( + + ))} + + + {isOpenButton && buttonOptions + ? buttonOptions.map((option) => + option.isSeparator ? ( +
+
+
+ ) : ( + + ) + ) + : ""} + + {withButton && ( + 0 ? true : false} + isOpenButton={isOpenButton} + > +
+ + + +
- ) : ( - - )} - +
+ ); }; diff --git a/products/ASC.Files/Client/src/components/panels/StyledPanels.js b/products/ASC.Files/Client/src/components/panels/StyledPanels.js index de3e5b8e549..29644ebd824 100644 --- a/products/ASC.Files/Client/src/components/panels/StyledPanels.js +++ b/products/ASC.Files/Client/src/components/panels/StyledPanels.js @@ -659,36 +659,28 @@ const StyledSelectFolderPanel = styled.div` } `; const StyledSelectFilePanel = styled.div` + height: 100%; .select-file-dialog_empty-container { .ec-header { word-break: break-word; } } - ${(props) => - props.displayType === "aside" && - css` - height: 100%; - overflow: hidden; - `} - .select-file-dialog-modal_buttons { ${(props) => props.isHeaderChildren ? "margin-top: 40px" : "margin-top:20px"}; } .select-file-dialog_aside-body_wrapper { height: ${(props) => - props.isHeaderChildren ? "calc(100% - 260px);" : "calc(100% - 212px);"}; + props.isHeaderChildren ? "calc(100% - 147px);" : "calc(100% - 100px);"}; } - .select-file-dialog_aside-body_wrapper, + .select-folder-dialog_aside-body_wrapper { width: 320px; - padding: 0 16px; box-sizing: border-box; - } - .select-folder-dialog_aside-body_wrapper { height: 100%; } + .select-file-dialog_aside-children { ${(props) => props.isHeaderChildren && `padding-bottom: 16px;`} } @@ -697,19 +689,7 @@ const StyledSelectFilePanel = styled.div` height: 100%; width: 290px; } - .select-file-dialog_aside-header_title { - margin: 0px; - line-height: 56px; - max-width: 474px; - width: 400px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - } - .select-file-dialog_aside-header { - margin-bottom: 16px; - } - .select-file-dialog_aside-header, + .file-name { border-bottom: 1px solid #eceef1; } @@ -767,7 +747,6 @@ const StyledSelectFilePanel = styled.div` } .select-file-dialog-buttons-save { margin-right: 8px; - margin-left: 16px; } .select-file-modal-dialog-buttons-save { margin-right: 8px; From af55b39eabe7f1534094e2d07508a0467291b668 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 17 Nov 2021 11:47:00 +0300 Subject: [PATCH 014/479] Web: Files: Added select file dialog to the panels. --- .../src/components/FilesPanels/index.js | 29 ++++++++++++++++++- .../Client/src/components/panels/index.js | 2 ++ .../Client/src/store/DialogsStore.js | 9 ++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/components/FilesPanels/index.js b/products/ASC.Files/Client/src/components/FilesPanels/index.js index 84dde218d1c..646856a5dbb 100644 --- a/products/ASC.Files/Client/src/components/FilesPanels/index.js +++ b/products/ASC.Files/Client/src/components/FilesPanels/index.js @@ -1,4 +1,5 @@ import React from "react"; +import { useTranslation } from "react-i18next"; import { inject, observer } from "mobx-react"; import { SharingPanel, @@ -7,6 +8,7 @@ import { VersionHistoryPanel, ChangeOwnerPanel, NewFilesPanel, + SelectFileDialog, } from "../panels"; import { ThirdPartyMoveDialog, @@ -38,8 +40,14 @@ const Panels = (props) => { newFilesPanelVisible, conflictResolveDialogVisible, convertDialogVisible, + createMasterForm, + selectFileDialogVisible, + setSelectFileDialogVisible, } = props; - + const { t } = useTranslation("Article"); + const onClose = () => { + setSelectFileDialogVisible(false); + }; return [ uploadPanelVisible && , sharingPanelVisible && ( @@ -71,6 +79,18 @@ const Panels = (props) => { ), convertDialogVisible && , + selectFileDialogVisible && ( + + ), ]; }; @@ -93,6 +113,10 @@ export default inject( convertDialogVisible, connectItem, //TODO: + + createMasterForm, + selectFileDialogVisible, + setSelectFileDialogVisible, } = dialogsStore; const { uploadPanelVisible } = uploadDataStore; @@ -115,6 +139,9 @@ export default inject( newFilesPanelVisible, conflictResolveDialogVisible, convertDialogVisible, + selectFileDialogVisible, + createMasterForm, + setSelectFileDialogVisible, }; } )(observer(Panels)); diff --git a/products/ASC.Files/Client/src/components/panels/index.js b/products/ASC.Files/Client/src/components/panels/index.js index 5ef887cda9d..6e188212e26 100644 --- a/products/ASC.Files/Client/src/components/panels/index.js +++ b/products/ASC.Files/Client/src/components/panels/index.js @@ -7,6 +7,7 @@ import NewFilesPanel from "./NewFilesPanel"; import VersionHistoryPanel from "./VersionHistoryPanel"; import ChangeOwnerPanel from "./ChangeOwnerPanel"; import UploadPanel from "./UploadPanel"; +import SelectFileDialog from "./SelectFileDialog"; export { SharingPanel, @@ -18,4 +19,5 @@ export { VersionHistoryPanel, ChangeOwnerPanel, UploadPanel, + SelectFileDialog, }; diff --git a/products/ASC.Files/Client/src/store/DialogsStore.js b/products/ASC.Files/Client/src/store/DialogsStore.js index ba62650adb6..e12689b4d34 100644 --- a/products/ASC.Files/Client/src/store/DialogsStore.js +++ b/products/ASC.Files/Client/src/store/DialogsStore.js @@ -20,6 +20,7 @@ class DialogsStore { newFilesPanelVisible = false; conflictResolveDialogVisible = false; convertDialogVisible = false; + selectFileDialogVisible = false; removeItem = null; connectItem = null; @@ -170,6 +171,14 @@ class DialogsStore { setConvertItem = (item) => { this.convertItem = item; }; + + setSelectFileDialogVisible = (visible) => { + this.selectFileDialogVisible = visible; + }; + + createMasterForm = async (fileInfo) => { + console.log("fileInfo", fileInfo); + }; } export default DialogsStore; From b10201113976d94458329a591d2e74537652af99 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 17 Nov 2021 13:09:54 +0300 Subject: [PATCH 015/479] Web: Files: Added button mane prop. --- products/ASC.Files/Client/public/locales/en/Home.json | 3 ++- products/ASC.Files/Client/public/locales/ru/Home.json | 3 ++- .../ASC.Files/Client/src/components/FilesPanels/index.js | 5 +++-- .../src/components/panels/SelectFileDialog/AsideView.js | 7 ++++--- .../src/components/panels/SelectFileDialog/ModalView.js | 3 ++- .../Client/src/components/panels/SelectFileDialog/index.js | 3 +++ 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/products/ASC.Files/Client/public/locales/en/Home.json b/products/ASC.Files/Client/public/locales/en/Home.json index dc952d67b44..60cd9d74cac 100644 --- a/products/ASC.Files/Client/public/locales/en/Home.json +++ b/products/ASC.Files/Client/public/locales/en/Home.json @@ -81,5 +81,6 @@ "UnblockVersion": "Unblock/Check-in", "UploadToFolder": "Upload to folder", "ViewList": "List", - "ViewTiles": "Tiles" + "ViewTiles": "Tiles", + "Create": "Create" } diff --git a/products/ASC.Files/Client/public/locales/ru/Home.json b/products/ASC.Files/Client/public/locales/ru/Home.json index df5f60a9fd1..d5568d0cf23 100644 --- a/products/ASC.Files/Client/public/locales/ru/Home.json +++ b/products/ASC.Files/Client/public/locales/ru/Home.json @@ -81,5 +81,6 @@ "UnblockVersion": "Заблокировать/Разблокировать", "UploadToFolder": "Загрузить в папку", "ViewList": "Список", - "ViewTiles": "Плитки" + "ViewTiles": "Плитки", + "Create": "Создать" } diff --git a/products/ASC.Files/Client/src/components/FilesPanels/index.js b/products/ASC.Files/Client/src/components/FilesPanels/index.js index 646856a5dbb..75b57756b77 100644 --- a/products/ASC.Files/Client/src/components/FilesPanels/index.js +++ b/products/ASC.Files/Client/src/components/FilesPanels/index.js @@ -44,7 +44,7 @@ const Panels = (props) => { selectFileDialogVisible, setSelectFileDialogVisible, } = props; - const { t } = useTranslation("Article"); + const { t } = useTranslation(["Article", "Home"]); const onClose = () => { setSelectFileDialogVisible(false); }; @@ -88,7 +88,8 @@ const Panels = (props) => { onClose={onClose} foldersType="exceptPrivacyTrashFolders" isDocumentsOnly - headerName={t("CreateMasterFormFromFile")} + headerName={t("Article:CreateMasterFormFromFile")} + buttonName={t("Home:Create")} /> ), ]; diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js index c71b3157207..0f393854656 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js @@ -44,6 +44,7 @@ const SelectFileDialogAsideView = ({ passedId, headerName, isAvailableFolderList, + buttonName, }) => { const [isLoadingData, setIsLoadingData] = useState(false); const onSetLoadingData = (loading) => { @@ -71,9 +72,9 @@ const SelectFileDialogAsideView = ({
{header}
- + {/* {t("Translations:SelectFolder")} - + */}
diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js index 70269ca1fbe..dd9ba0a7e9f 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js @@ -176,6 +176,7 @@ class SelectFileDialogModalView extends React.Component { selectedFile, onClickSave, headerName, + buttonName, } = this.props; const { isLoading, isAvailable } = this.state; @@ -250,7 +251,7 @@ class SelectFileDialogModalView extends React.Component { className="select-file-modal-dialog-buttons-save" primary size="medium" - label={t("Common:SaveButton")} + label={buttonName ? buttonName : t("Common:SaveButton")} onClick={onClickSave} isDisabled={selectedFile.length === 0} /> diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js index 7eb3152ab5f..e477fa37ee1 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js @@ -238,6 +238,7 @@ class SelectFileDialogBody extends React.Component { onSetFileName, tReady, headerName, + buttonName, } = this.props; const { isVisible, @@ -286,6 +287,7 @@ class SelectFileDialogBody extends React.Component { passedId={passedId} header={header} isAvailableFolderList={isAvailableFolderList} + buttonName={buttonName} /> ) : ( ); } From 6a319d9bf81107c61021b43fb87268e6b2ef3ae2 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 17 Nov 2021 15:33:43 +0300 Subject: [PATCH 016/479] Web: Files: Fixed styles according the layouts. --- .../panels/SelectFileDialog/FilesListBody.js | 2 +- .../panels/SelectFileDialog/FilesListRow.js | 7 ++- .../panels/SelectFileDialog/ModalView.js | 2 +- .../StyledSelectFolderInput.js | 4 +- .../src/components/panels/StyledPanels.js | 45 ++++++++++++------- 5 files changed, 35 insertions(+), 25 deletions(-) diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/FilesListBody.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/FilesListBody.js index 67bddb3f8e0..7ef2a6d75b5 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/FilesListBody.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/FilesListBody.js @@ -129,7 +129,7 @@ const FilesListBody = ({ {fileName} + + {fileExst} + - -
- {fileExst} -
{children}
diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js index dd9ba0a7e9f..d47f71019e0 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/ModalView.js @@ -190,7 +190,7 @@ class SelectFileDialogModalView extends React.Component { zIndex={zIndex} onClose={onClose} className="select-file-modal-dialog" - style={{ maxWidth: "890px" }} + style={{ maxWidth: "725px" }} displayType="modal" bodyPadding="0" > diff --git a/products/ASC.Files/Client/src/components/panels/SelectFolderInput/StyledSelectFolderInput.js b/products/ASC.Files/Client/src/components/panels/SelectFolderInput/StyledSelectFolderInput.js index e380dd9868f..1892424874e 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFolderInput/StyledSelectFolderInput.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFolderInput/StyledSelectFolderInput.js @@ -2,8 +2,8 @@ import styled from "styled-components"; const StyledComponent = styled.div` .input-with-folder-path { - margin: 16px 0; - + margin-bottom: 16px; + margin-top: 3px; width: 100%; max-width: 820px; } diff --git a/products/ASC.Files/Client/src/components/panels/StyledPanels.js b/products/ASC.Files/Client/src/components/panels/StyledPanels.js index 29644ebd824..64425bae3ea 100644 --- a/products/ASC.Files/Client/src/components/panels/StyledPanels.js +++ b/products/ASC.Files/Client/src/components/panels/StyledPanels.js @@ -684,11 +684,17 @@ const StyledSelectFilePanel = styled.div` .select-file-dialog_aside-children { ${(props) => props.isHeaderChildren && `padding-bottom: 16px;`} } - .select-file-dialog_aside_body { - margin-top: 16px; + .select-file-dialog_aside_body, + .select-file-dialog_aside_body_files-list { + //margin-top: 16px; height: 100%; width: 290px; } + .select-file-dialog_aside_body_files-list { + margin-left: -17px; + padding-left: 16px; + ${(props) => props.isChecked && `background: #f8f9f9;`} + } .file-name { border-bottom: 1px solid #eceef1; @@ -723,9 +729,9 @@ const StyledSelectFilePanel = styled.div` .modal-dialog_body { display: grid; - grid-template-columns: 240px 1fr; + grid-template-columns: 212px 489px; height: 300px; - grid-column-gap: 8px; + // grid-column-gap: 8px; grid-template-areas: "children children" "tree files-list"; .modal-dialog_tree-body { ${(props) => @@ -764,30 +770,34 @@ const StyledFilesList = styled.div` margin-right: 8px; } .entry-title { - white-space: nowrap; - text-overflow: ellipsis; + font-weight: 600; + max-width: 100%; overflow: hidden; - max-width: ${(props) => - props.displayType === "aside" ? "240px" : "250px"}; + text-overflow: ellipsis; } + .files-list_file-owner { //margin-left: auto; - max-width: 207px; + max-width: 213px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #a3a9ae; } - .entry-title { - font-weight: 600; - } + .file-exst { color: #a3a9ae; } .modal-dialog_file-name:hover { - background-color: #eceef1; + background-color: #f8f9f9; } .files-list_full-name { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + max-width: ${(props) => + props.displayType === "aside" ? "213px" : "274px"}; + grid-area: full-name; display: flex; ${(props) => @@ -801,11 +811,11 @@ const StyledFilesList = styled.div` } .select-file-dialog_checked { grid-area: checked-button; - padding-left: 6px; + //padding-left: 6px; } .files-list_file-children_wrapper { grid-area: owner-name; - margin-right: 16px; + margin-right: 12px; ${(props) => props.displayType === "aside" && css` @@ -814,7 +824,7 @@ const StyledFilesList = styled.div` } .modal-dialog_file-name { border-radius: 3px; - ${(props) => props.isChecked && `background:#eceef1;`} + ${(props) => props.isChecked && `background:#F8F9F9;`} cursor: ${(props) => (props.needRowSelection ? "pointer" : "default")}; border-bottom: 1px solid #eceef1; align-items: center; @@ -826,10 +836,11 @@ const StyledFilesList = styled.div` grid-template-areas: "checked-button icon-name full-name full-name" "checked-button icon-name owner-name owner-name"; ` : css` - height: 36px; + height: 41px; grid-template-areas: "checked-button icon-name full-name owner-name"; `} grid-template-columns: 22px 32px 1fr; + padding-left: 12px; } `; From b28acbe9434dbb55dbada57091a4dae597e8f19d Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Wed, 17 Nov 2021 17:37:01 +0500 Subject: [PATCH 017/479] Web: Common: added color prop for floating button --- .../components/FloatingButton/FloatingButton.js | 5 +++-- .../components/FloatingButton/StyledFloatingButton.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/asc-web-common/components/FloatingButton/FloatingButton.js b/packages/asc-web-common/components/FloatingButton/FloatingButton.js index 1d20554a657..e9bb9f51d8f 100644 --- a/packages/asc-web-common/components/FloatingButton/FloatingButton.js +++ b/packages/asc-web-common/components/FloatingButton/FloatingButton.js @@ -24,7 +24,7 @@ const StyledButtonAlertIcon = styled(ButtonAlertIcon)` ${commonIconsStyles} `; const FloatingButton = ({ id, className, style, ...rest }) => { - const { icon, alert, percent, onClick } = rest; + const { icon, alert, percent, onClick, color } = rest; return ( {
- + {icon == "upload" ? ( @@ -85,6 +85,7 @@ FloatingButton.propTypes = { alert: PropTypes.bool, percent: PropTypes.number, onClick: PropTypes.func, + color: PropTypes.string, }; FloatingButton.defaultProps = { diff --git a/packages/asc-web-common/components/FloatingButton/StyledFloatingButton.js b/packages/asc-web-common/components/FloatingButton/StyledFloatingButton.js index 4d94cd5863c..15852edfea6 100644 --- a/packages/asc-web-common/components/FloatingButton/StyledFloatingButton.js +++ b/packages/asc-web-common/components/FloatingButton/StyledFloatingButton.js @@ -72,7 +72,7 @@ const StyledFloatingButton = styled.div` width: 48px; height: 48px; border-radius: 50%; - background: #fff; + background: ${(props) => (props.color ? props.color : "#fff")}; box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.13); text-align: center; margin: 3px; From 66dd9b18717e7e66aa199a8f533b6278a4cb6061 Mon Sep 17 00:00:00 2001 From: Dmitry Sychugov Date: Wed, 17 Nov 2021 17:39:18 +0500 Subject: [PATCH 018/479] Web: Components: fixed floating button in main button mobile, added scrollbar --- .../main-button-mobile/index.js | 37 ++++++++++++------- .../main-button-mobile/styled-main-button.js | 11 +----- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/asc-web-components/main-button-mobile/index.js b/packages/asc-web-components/main-button-mobile/index.js index 946c59ba989..61c40037f5c 100644 --- a/packages/asc-web-components/main-button-mobile/index.js +++ b/packages/asc-web-components/main-button-mobile/index.js @@ -16,6 +16,7 @@ import IconButton from "../icon-button"; import Button from "../button"; import Text from "../text"; import Scrollbar from "@appserver/components/scrollbar"; +import { isMobile, isTablet } from "react-device-detect"; const ProgressBarMobile = ({ label, @@ -102,18 +103,9 @@ const MainButtonMobile = (props) => { ? progressOptions.filter((option) => option.open) : []; - console.log(dropDownRef); - - const renderDropDown = () => { + const renderItems = () => { return ( - + <> {actionOptions.map((option) => ( { /> )} - + ); }; - const children = renderDropDown(); + const children = renderItems(); return (
@@ -190,8 +182,25 @@ const MainButtonMobile = (props) => { icon={isOpen ? "minus" : "plus"} onClick={onMainButtonClick} percent={percent} + color={"#ed7309"} /> - {children} + + {isMobile || isTablet ? ( + + {children} + + ) : ( + children + )} +
); }; diff --git a/packages/asc-web-components/main-button-mobile/styled-main-button.js b/packages/asc-web-components/main-button-mobile/styled-main-button.js index 8c4c5dda13a..27d0e0de7a0 100644 --- a/packages/asc-web-components/main-button-mobile/styled-main-button.js +++ b/packages/asc-web-components/main-button-mobile/styled-main-button.js @@ -5,12 +5,7 @@ import DropDownItem from "../drop-down-item"; import FloatingButton from "@appserver/common/components/FloatingButton"; const StyledFloatingButton = styled(FloatingButton)` - & + div { - } - .circle__mask + div { - background-color: #ed7309; - svg { margin-top: 4px; } @@ -38,17 +33,13 @@ const StyledFloatingButton = styled(FloatingButton)` .circle__mask .circle__fill { background-color: #fff; } - - /* .circle__mask { - transform: none !important; - clip: none !important; - } */ `; const StyledDropDown = styled(DropDown)` bottom: ${(props) => props.theme.mainButtonMobile.dropDown.bottom}; right: ${(props) => props.theme.mainButtonMobile.dropDown.right}; z-index: ${(props) => props.theme.mainButtonMobile.dropDown.zIndex}; + height: ${(props) => (props.isMobile ? "100vh" : "auto")}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; From e5d045c090c73a5aba4281eea78a5765dbac25fa Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 17 Nov 2021 15:46:35 +0300 Subject: [PATCH 019/479] Web: Files: Added select file dialog to the main menu. --- .../components/Article/MainButton/index.js | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/products/ASC.Files/Client/src/components/Article/MainButton/index.js b/products/ASC.Files/Client/src/components/Article/MainButton/index.js index bec1807875a..50cb0fe2987 100644 --- a/products/ASC.Files/Client/src/components/Article/MainButton/index.js +++ b/products/ASC.Files/Client/src/components/Article/MainButton/index.js @@ -24,8 +24,9 @@ class ArticleMainButtonContent extends React.Component { }); }; - onSelectFile = () => { - console.log("Select from form"); + onShowSelectFileDialog = () => { + const { setSelectFileDialogVisible } = this.props; + setSelectFileDialogVisible(true); }; onUploadFileClick = () => { @@ -116,7 +117,7 @@ class ArticleMainButtonContent extends React.Component { className="main-button_drop-down" icon="images/form.file.react.svg" label={t("NewFormFile")} - onClick={this.onSelectFile} + onClick={this.onShowSelectFileDialog} /> { - const { firstLoad, fileActionStore, filter, canCreate } = filesStore; - const { isPrivacyFolder } = treeFoldersStore; - const { startUpload } = uploadDataStore; - - return { - homepage: config.homepage, - firstLoad, - isPrivacy: isPrivacyFolder, - filter, - canCreate, +export default inject( + ({ filesStore, uploadDataStore, treeFoldersStore, dialogsStore }) => { + const { firstLoad, fileActionStore, filter, canCreate } = filesStore; + const { isPrivacyFolder } = treeFoldersStore; + const { startUpload } = uploadDataStore; + const { setSelectFileDialogVisible } = dialogsStore; + return { + homepage: config.homepage, + firstLoad, + isPrivacy: isPrivacyFolder, + filter, + canCreate, - setAction: fileActionStore.setAction, - startUpload, - }; -})( + setAction: fileActionStore.setAction, + startUpload, + setSelectFileDialogVisible, + }; + } +)( withRouter( withTranslation(["Article", "Common"])( withLoader(observer(ArticleMainButtonContent))() From 79cf36a41c729b6b7760f1672483ec715eda4478 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 17 Nov 2021 16:28:31 +0300 Subject: [PATCH 020/479] Web: Files: Fixed tree opening. --- .../Client/src/components/panels/SelectFileDialog/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js index e477fa37ee1..ee1f609278c 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/index.js @@ -149,7 +149,7 @@ class SelectFileDialogBody extends React.Component { if (id) { setFolderId(id); - setExpandedPanelKeys([`${id}`]); + // setExpandedPanelKeys([`${id}`]); this.setState({ selectedFolder: id, hasNextPage: true, From 1a282c207374c85d0848ec4bdd17d81264a108f1 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 16:35:22 +0300 Subject: [PATCH 021/479] Config: Extra comma removed --- config/appsettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/appsettings.json b/config/appsettings.json index 16b40522055..a75d5622376 100644 --- a/config/appsettings.json +++ b/config/appsettings.json @@ -61,7 +61,7 @@ "convert-docs": [ ".pptm", ".ppt", ".ppsm", ".pps", ".potx", ".potm", ".pot", ".odp", ".fodp", ".otp", ".xlsm", ".xls", ".xltx", ".xltm", ".xlt", ".ods", ".fods", ".ots", ".docm", ".doc", ".dotx", ".dotm", ".dot", ".odt", ".fodt", ".ott", ".rtf" ], "edited-docs": [ ".pptx", ".pptm", ".ppt", ".ppsx", ".ppsm", ".pps", ".potx", ".potm", ".pot", ".odp", ".fodp", ".otp", ".xlsx", ".xlsm", ".xls", ".xltx", ".xltm", ".xlt", ".ods", ".fods", ".ots", ".csv", ".docx", ".docxf", ".oform", ".docm", ".doc", ".dotx", ".dotm", ".dot", ".odt", ".fodt", ".ott", ".txt", ".rtf", ".mht", ".html", ".htm" ], "encrypted-docs": [ ".docx", ".docxf", ".xlsx", ".pptx" ], - "formfilling-docs": [ ".oform", ], + "formfilling-docs": [ ".oform" ], "customfilter-docs": [ ".xlsx" ], "reviewed-docs": [ ".docx", ".docxf" ], "viewed-docs": [ ".pptx", ".pptm", ".ppt", ".ppsx", ".ppsm", ".pps", ".potx", ".potm", ".pot", ".odp", ".fodp", ".otp", ".gslides", ".xlsx", ".xlsm", ".xls", ".xltx", ".xltm", ".xlt", ".ods", ".fods", ".ots", ".gsheet", ".csv", ".docx", ".docxf", ".oform", ".docm", ".doc", ".dotx", ".dotm", ".dot", ".odt", ".fodt", ".ott", ".gdoc", ".txt", ".rtf", ".mht", ".html", ".htm", ".epub", ".pdf", ".djvu", ".xps" ], From 9e4b29a136b0a365df2b82e19344b20f0990a8e7 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 16:36:50 +0300 Subject: [PATCH 022/479] Web: Common: Api: Added new data parameters --- packages/asc-web-common/api/files/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/asc-web-common/api/files/index.js b/packages/asc-web-common/api/files/index.js index 1cbe89cd14c..545152c1e10 100644 --- a/packages/asc-web-common/api/files/index.js +++ b/packages/asc-web-common/api/files/index.js @@ -271,8 +271,8 @@ export function deleteFolder(folderId, deleteAfter, immediately) { return request(options); } -export function createFile(folderId, title) { - const data = { title }; +export function createFile(folderId, title, templateId) { + const data = { title, templateId }; const options = { method: "post", url: `/files/${folderId}/file`, From 2f7b465cea928b419848a8192231cc7d605b1d6f Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 16:37:46 +0300 Subject: [PATCH 023/479] Web: Files: Home: Added translation key for new form file --- products/ASC.Files/Client/public/locales/en/Home.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/public/locales/en/Home.json b/products/ASC.Files/Client/public/locales/en/Home.json index dc952d67b44..2867dff05b0 100644 --- a/products/ASC.Files/Client/public/locales/en/Home.json +++ b/products/ASC.Files/Client/public/locales/en/Home.json @@ -81,5 +81,6 @@ "UnblockVersion": "Unblock/Check-in", "UploadToFolder": "Upload to folder", "ViewList": "List", - "ViewTiles": "Tiles" + "ViewTiles": "Tiles", + "NewMasterForm": "New master form" } From 166cca86c6e81dc3ccf7c0665a1515632a0dc25d Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 16:38:26 +0300 Subject: [PATCH 024/479] Web: Files: Helpers: Added title for new forms --- products/ASC.Files/Client/src/helpers/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/products/ASC.Files/Client/src/helpers/utils.js b/products/ASC.Files/Client/src/helpers/utils.js index 7ecc3c982a1..745f900575a 100644 --- a/products/ASC.Files/Client/src/helpers/utils.js +++ b/products/ASC.Files/Client/src/helpers/utils.js @@ -36,6 +36,8 @@ export const getDefaultFileName = (format) => { return i18n.t("NewSpreadsheet"); case "pptx": return i18n.t("NewPresentation"); + case "docxf": + return i18n.t("NewMasterForm"); default: return i18n.t("NewFolder"); } From 635dc7c7aa3037f6daf66e6502f7c0c91578f8a6 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 16:39:10 +0300 Subject: [PATCH 025/479] Web: Files: Store: Added new formats inside constants --- .../Client/src/store/DocserviceStore.js | 211 ++++++++++-------- 1 file changed, 119 insertions(+), 92 deletions(-) diff --git a/products/ASC.Files/Client/src/store/DocserviceStore.js b/products/ASC.Files/Client/src/store/DocserviceStore.js index 42f97fedb1a..c4d32532c5f 100644 --- a/products/ASC.Files/Client/src/store/DocserviceStore.js +++ b/products/ASC.Files/Client/src/store/DocserviceStore.js @@ -2,122 +2,135 @@ import { makeObservable } from "mobx"; import { presentInArray } from "../helpers/files-helpers"; class DocserviceStore { - coauthorDocs = [".pptx", ".ppsx", ".xlsx", ".csv", ".docx", ".txt"]; - commentedDocs = [".docx", ".xlsx", ".pptx"]; + coauthorDocs = [ + ".csv", + ".docx", + ".docxf", + ".oform", + ".ppsx", + ".pptx", + ".txt", + ".xlsx", + ]; + commentedDocs = [".docx", ".docxf", ".xlsx", ".pptx"]; convertDocs = [ - ".pptm", - ".ppt", - ".ppsm", - ".pps", - ".potx", - ".potm", - ".pot", - ".odp", - ".fodp", - ".otp", - ".xlsm", - ".xls", - ".xltx", - ".xltm", - ".xlt", - ".ods", - ".fods", - ".ots", - ".docm", ".doc", - ".dotx", - ".dotm", + ".docm", ".dot", - ".odt", + ".dotm", + ".dotx", + ".fodp", + ".fods", ".fodt", - ".ott", - ".rtf", - ]; - editedDocs = [ - ".pptx", - ".pptm", - ".ppt", - ".ppsx", - ".ppsm", - ".pps", - ".potx", - ".potm", - ".pot", ".odp", - ".fodp", + ".ods", + ".odt", ".otp", - ".xlsx", - ".xlsm", + ".ots", + ".ott", + ".pot", + ".potm", + ".potx", + ".pps", + ".ppsm", + ".ppt", + ".pptm", + ".rtf", ".xls", - ".xltx", - ".xltm", + ".xlsm", ".xlt", - ".ods", - ".fods", - ".ots", + ".xltm", + ".xltx", + ]; + editedDocs = [ ".csv", - ".docx", - ".docm", ".doc", - ".dotx", - ".dotm", + ".docm", + ".docx", + ".docxf", ".dot", - ".odt", + ".dotm", + ".dotx", + ".fodp", + ".fods", ".fodt", - ".ott", - ".txt", - ".rtf", - ".mht", - ".html", ".htm", - ]; - encryptedDocs = [".docx", ".xlsx", ".pptx"]; - formfillingDocs = [".docx"]; - customfilterDocs = [".xlsx"]; - reviewedDocs = [".docx"]; - viewedDocs = [ - ".pptx", - ".pptm", - ".ppt", - ".ppsx", - ".ppsm", - ".pps", - ".potx", - ".potm", - ".pot", + ".html", + ".mht", ".odp", - ".fodp", + ".ods", + ".odt", + ".oform", ".otp", - ".gslides", - ".xlsx", - ".xlsm", + ".ots", + ".ott", + ".pot", + ".potm", + ".potx", + ".pps", + ".ppsm", + ".ppsx", + ".ppt", + ".pptm", + ".pptx", + ".rtf", + ".txt", ".xls", - ".xltx", - ".xltm", + ".xlsm", + ".xlsx", ".xlt", - ".ods", - ".fods", - ".ots", - ".gsheet", + ".xltm", + ".xltx", + ]; + encryptedDocs = [".docx", ".docxf", ".xlsx", ".pptx"]; + formfillingDocs = [".oform"]; + customfilterDocs = [".xlsx"]; + reviewedDocs = [".docx", ".docxf"]; + viewedDocs = [ ".csv", - ".docx", - ".docm", + ".djvu", ".doc", - ".dotx", - ".dotm", + ".docm", + ".docx", + ".docxf", ".dot", - ".odt", + ".dotm", + ".dotx", + ".epub", + ".fodp", + ".fods", ".fodt", - ".ott", ".gdoc", - ".txt", - ".rtf", - ".mht", - ".html", + ".gsheet", + ".gslides", ".htm", - ".epub", + ".html", + ".mht", + ".odp", + ".ods", + ".odt", + ".oform", + ".otp", + ".ots", + ".ott", ".pdf", - ".djvu", + ".pot", + ".potm", + ".potx", + ".pps", + ".ppsm", + ".ppsx", + ".ppt", + ".pptm", + ".pptx", + ".rtf", + ".txt", + ".xls", + ".xlsm", + ".xlsx", + ".xlt", + ".xltm", + ".xltx", ".xps", ]; @@ -163,6 +176,20 @@ class DocserviceStore { { ".xltm": [".csv", ".ods", ".pdf", ".xlsx"] }, { ".xltx": [".csv", ".ods", ".pdf", ".xlsx"] }, { ".xps": [".pdf"] }, + { + ".docxf": [ + ".docx", + ".dotx", + ".epub", + ".fb2", + ".html", + ".odt", + ".ott", + ".pdf", + ".rtf", + ".txt", + ], + }, ]; constructor() { From e1a248ae7cd3866941292c836dc489c473935306 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 16:39:38 +0300 Subject: [PATCH 026/479] Web: Files: Store: Added new data parameters --- products/ASC.Files/Client/src/store/FilesStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/store/FilesStore.js b/products/ASC.Files/Client/src/store/FilesStore.js index c860e297087..dde8a77d5aa 100644 --- a/products/ASC.Files/Client/src/store/FilesStore.js +++ b/products/ASC.Files/Client/src/store/FilesStore.js @@ -887,8 +887,8 @@ class FilesStore { return api.files.addFileToRecentlyViewed(fileId); }; - createFile = (folderId, title) => { - return api.files.createFile(folderId, title).then((file) => { + createFile = (folderId, title, templateId) => { + return api.files.createFile(folderId, title, templateId).then((file) => { return Promise.resolve(file); }); }; From cc4d8353350948d1bfea1840ab9a59aba75d0dd0 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Wed, 17 Nov 2021 16:43:29 +0300 Subject: [PATCH 027/479] Updated forms --- products/ASC.Files/Server/DocStore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Server/DocStore b/products/ASC.Files/Server/DocStore index b1063eae56d..9fea7818de9 160000 --- a/products/ASC.Files/Server/DocStore +++ b/products/ASC.Files/Server/DocStore @@ -1 +1 @@ -Subproject commit b1063eae56d183b5c0b6eb887115c378f3941ebe +Subproject commit 9fea7818de9abb29295c51b39a54c566bead9895 From 8546bc2662f3bd2abd6c9a3e90a38b693bb632b0 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 17:15:28 +0300 Subject: [PATCH 028/479] Web: Files: Home: Fixed translate file --- products/ASC.Files/Client/public/locales/en/Home.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/public/locales/en/Home.json b/products/ASC.Files/Client/public/locales/en/Home.json index 99aca3bb128..3b12768fc21 100644 --- a/products/ASC.Files/Client/public/locales/en/Home.json +++ b/products/ASC.Files/Client/public/locales/en/Home.json @@ -81,8 +81,8 @@ "UnblockVersion": "Unblock/Check-in", "UploadToFolder": "Upload to folder", "ViewList": "List", - "ViewTiles": "Tiles" - "NewMasterForm": "New master form" + "ViewTiles": "Tiles", + "NewMasterForm": "New master form", "ViewTiles": "Tiles", "Create": "Create" } From 7560d4aae58248627ae94e44e2286a143edae1a6 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 17 Nov 2021 17:39:56 +0300 Subject: [PATCH 029/479] Web: Files: Added new form from file. --- products/ASC.Files/Client/src/store/DialogsStore.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/store/DialogsStore.js b/products/ASC.Files/Client/src/store/DialogsStore.js index e12689b4d34..6018268b7d3 100644 --- a/products/ASC.Files/Client/src/store/DialogsStore.js +++ b/products/ASC.Files/Client/src/store/DialogsStore.js @@ -177,7 +177,12 @@ class DialogsStore { }; createMasterForm = async (fileInfo) => { - console.log("fileInfo", fileInfo); + const { createFile, fetchFiles, filter } = this.filesStore; + const { id } = this.selectedFolderStore; + + createFile(id, `${fileInfo.title}.docxf`, fileInfo.id) + .then(() => fetchFiles(id, filter, true, true)) + .catch((err) => console.error(err)); }; } From 017b9e912cca06f7bc48c5af621323a59c8ed75d Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 17 Nov 2021 17:41:46 +0300 Subject: [PATCH 030/479] Web: Files: add menu in trash --- .../src/pages/Home/Section/Header/index.js | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js b/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js index b7e3ff21c19..a2bdc075603 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js @@ -242,6 +242,7 @@ class SectionHeaderContent extends React.Component { }; onEmptyTrashAction = () => this.props.setEmptyTrashDialogVisible(true); + onRestoreAllAction = () => console.log("Restore all"); getContextOptionsFolder = () => { const { t } = this.props; @@ -292,6 +293,26 @@ class SectionHeaderContent extends React.Component { ]; }; + getContextOptionsTrash = () => { + const { t } = this.props; + return [ + { + key: "clear-trash", + label: t("EmptyRecycleBin"), + icon: "images/clear.active.react.svg", + onClick: this.onEmptyTrashAction, + disabled: false, + }, + { + key: "restore-all", + label: t("Translations:Restore"), + icon: "images/move.react.svg", + onClick: this.onRestoreAllAction, + disabled: false, + }, + ]; + }; + onBackToParentFolder = () => { const { setIsLoading, parentId, filter, fetchFiles } = this.props; setIsLoading(true); @@ -352,6 +373,7 @@ class SectionHeaderContent extends React.Component { isTabletView, personal, viewAs, + isRecycleBinFolder, } = this.props; const menuItems = this.getMenuItems(); @@ -449,6 +471,19 @@ class SectionHeaderContent extends React.Component { /> ) )} + {isRecycleBinFolder && ( + + )} )} @@ -468,6 +503,7 @@ export default inject( selectedFolderStore, filesActionsStore, settingsStore, + treeFoldersStore, }) => { const { setSelected, @@ -490,8 +526,10 @@ export default inject( setMoveToPanelVisible, setCopyPanelVisible, setDeleteDialogVisible, + setEmptyTrashDialogVisible, } = dialogsStore; + const { isRecycleBinFolder } = treeFoldersStore; const { deleteAction, downloadAction, getHeaderMenu } = filesActionsStore; return { @@ -524,6 +562,9 @@ export default inject( downloadAction, getHeaderMenu, getCheckboxItemLabel, + + isRecycleBinFolder, + setEmptyTrashDialogVisible, }; } )( From 4894779a1786018ce997145a8875b46084dcb390 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 17 Nov 2021 17:42:59 +0300 Subject: [PATCH 031/479] Web: Files: add restore all --- .../Client/src/pages/Home/Section/Header/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js b/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js index a2bdc075603..38945c2e283 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Header/index.js @@ -242,7 +242,10 @@ class SectionHeaderContent extends React.Component { }; onEmptyTrashAction = () => this.props.setEmptyTrashDialogVisible(true); - onRestoreAllAction = () => console.log("Restore all"); + onRestoreAllAction = () => { + this.props.setSelected("all"); + this.props.setMoveToPanelVisible(true); + }; getContextOptionsFolder = () => { const { t } = this.props; @@ -374,6 +377,7 @@ class SectionHeaderContent extends React.Component { personal, viewAs, isRecycleBinFolder, + isEmptyFilesList, } = this.props; const menuItems = this.getMenuItems(); @@ -471,7 +475,7 @@ class SectionHeaderContent extends React.Component { /> ) )} - {isRecycleBinFolder && ( + {isRecycleBinFolder && !isEmptyFilesList && ( Date: Wed, 17 Nov 2021 17:43:27 +0300 Subject: [PATCH 032/479] Web: Files: delete action --- products/ASC.Files/Client/src/store/FilesActionsStore.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/products/ASC.Files/Client/src/store/FilesActionsStore.js b/products/ASC.Files/Client/src/store/FilesActionsStore.js index da21f310cba..78a99d491eb 100644 --- a/products/ASC.Files/Client/src/store/FilesActionsStore.js +++ b/products/ASC.Files/Client/src/store/FilesActionsStore.js @@ -843,11 +843,7 @@ class FilesActionStore { label: t("Translations:Restore"), onClick: () => setMoveToPanelVisible(true), }) - .set("delete", deleteOption) - .set("emptyRecycleBin", { - label: t("EmptyRecycleBin"), - onClick: () => setEmptyTrashDialogVisible(true), - }); + .set("delete", deleteOption); return this.convertToArray(itemsCollection); }; getHeaderMenu = (t) => { From fb903bd9bfb1abe14fedfe3fff4d330463252a52 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 18:11:18 +0300 Subject: [PATCH 033/479] Web: Files: Store: Added new formats inside document constant --- products/ASC.Files/Client/src/store/IconFormatsStore.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/products/ASC.Files/Client/src/store/IconFormatsStore.js b/products/ASC.Files/Client/src/store/IconFormatsStore.js index 6cfbdde1ae4..b6e516a192f 100644 --- a/products/ASC.Files/Client/src/store/IconFormatsStore.js +++ b/products/ASC.Files/Client/src/store/IconFormatsStore.js @@ -118,6 +118,8 @@ class IconFormatsStore { ".doct", ".docy", ".gdoc", + ".docxf", + ".oform", ]; presentation = [ ".pps", From e6f008cc6f5cb109f3e988a75867cfd6fae3feec Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 17 Nov 2021 18:16:23 +0300 Subject: [PATCH 034/479] Web: Files: Store: Added convert map docx to docxf --- products/ASC.Files/Client/src/store/DocserviceStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/store/DocserviceStore.js b/products/ASC.Files/Client/src/store/DocserviceStore.js index c4d32532c5f..4f6f75e293c 100644 --- a/products/ASC.Files/Client/src/store/DocserviceStore.js +++ b/products/ASC.Files/Client/src/store/DocserviceStore.js @@ -139,7 +139,7 @@ class DocserviceStore { { ".doc": [".docx", ".odt", ".pdf", ".rtf", ".txt"] }, { ".docm": [".docx", ".odt", ".pdf", ".rtf", ".txt"] }, { ".doct": [".docx"] }, - { ".docx": [".odt", ".pdf", ".rtf", ".txt"] }, + { ".docx": [".docxf", ".odt", ".pdf", ".rtf", ".txt"] }, { ".dot": [".docx", ".odt", ".pdf", ".rtf", ".txt"] }, { ".dotm": [".docx", ".odt", ".pdf", ".rtf", ".txt"] }, { ".dotx": [".docx", ".odt", ".pdf", ".rtf", ".txt"] }, From 68d889fb2b176fa8b6daefb327ba486720bc965e Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Thu, 18 Nov 2021 09:06:03 +0300 Subject: [PATCH 035/479] Web: Fixed can create in editor dialog, changed translation, added buttons of selection folder for files dialog. --- .../public/locales/en/SelectFolder.json | 3 +- .../panels/SelectFileDialog/AsideView.js | 2 + .../panels/SelectFolderDialog/AsideView.js | 5 +- .../panels/SelectFolderDialog/ModalView.js | 5 +- .../panels/SelectFolderDialog/index.js | 63 ++++++++++++++----- .../panels/SelectFolderInput/index.js | 2 + 6 files changed, 59 insertions(+), 21 deletions(-) diff --git a/products/ASC.Files/Client/public/locales/en/SelectFolder.json b/products/ASC.Files/Client/public/locales/en/SelectFolder.json index fd719cf5464..000bafc0077 100644 --- a/products/ASC.Files/Client/public/locales/en/SelectFolder.json +++ b/products/ASC.Files/Client/public/locales/en/SelectFolder.json @@ -1,3 +1,4 @@ { - "NotAvailableFolder": "No folders available" + "NotAvailableFolder": "No folders available", + "Select": "Select" } diff --git a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js index 0f393854656..1053630c1ad 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFileDialog/AsideView.js @@ -92,6 +92,8 @@ const SelectFileDialogAsideView = ({ fileName={fileName} displayType={displayType} dialogWithFiles + showButtons + selectionButtonPrimary /> {selectedFolder && !isLoadingData ? ( diff --git a/products/ASC.Files/Client/src/components/panels/SelectFolderDialog/AsideView.js b/products/ASC.Files/Client/src/components/panels/SelectFolderDialog/AsideView.js index a0625fd9d55..2b3695c30a2 100644 --- a/products/ASC.Files/Client/src/components/panels/SelectFolderDialog/AsideView.js +++ b/products/ASC.Files/Client/src/components/panels/SelectFolderDialog/AsideView.js @@ -28,6 +28,7 @@ const SelectFolderDialogAsideView = ({ header, canCreate, isLoading, + primaryButtonName, }) => { return ( @@ -87,13 +88,13 @@ const SelectFolderDialogAsideView = ({ className="select-folder-dialog-buttons-save" primary size="big" - label={t("Common:SaveButton")} + label={primaryButtonName} onClick={onSave} isDisabled={isLoadingData || !isAvailable || !canCreate} />