diff --git a/packages/asc-web-common/components/AdvancedSelector/AdvancedSelector.stories.js b/packages/asc-web-common/components/AdvancedSelector/AdvancedSelector.stories.js index d9eaa73b32..9961500182 100644 --- a/packages/asc-web-common/components/AdvancedSelector/AdvancedSelector.stories.js +++ b/packages/asc-web-common/components/AdvancedSelector/AdvancedSelector.stories.js @@ -15,7 +15,7 @@ import AdvancedSelector2 from "."; import Section from "../../../.storybook/decorators/section"; import Button from "@appserver/components/button"; import equal from "fast-deep-equal/react"; -import UserTooltip from "studio/PeopleSelector/UserTooltip"; +import UserTooltip from "people/PeopleSelector/UserTooltip"; function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; diff --git a/packages/asc-web-common/components/FilterInput/sub-components/FilterBlock.js b/packages/asc-web-common/components/FilterInput/sub-components/FilterBlock.js index b09e23255d..199892ad67 100644 --- a/packages/asc-web-common/components/FilterInput/sub-components/FilterBlock.js +++ b/packages/asc-web-common/components/FilterInput/sub-components/FilterBlock.js @@ -11,7 +11,7 @@ import { StyledCloseButtonBlock, } from "../StyledFilterInput"; //import GroupSelector from "people/GroupSelector"; //TODO: Move out GroupSelector of FilterItem -//import PeopleSelector from "studio/PeopleSelector"; //TODO: Move out PeopleSelector of FilterItem +//import PeopleSelector from "people/PeopleSelector"; //TODO: Move out PeopleSelector of FilterItem class FilterItem extends React.Component { constructor(props) { diff --git a/packages/asc-web-common/pages/index.js b/packages/asc-web-common/pages/index.js deleted file mode 100644 index 49bbc161a4..0000000000 --- a/packages/asc-web-common/pages/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from "./errors"; diff --git a/packages/asc-web-components/group-buttons-menu/index.js b/packages/asc-web-components/group-buttons-menu/index.js index 0d5f9a874d..a15e3fa55a 100644 --- a/packages/asc-web-components/group-buttons-menu/index.js +++ b/packages/asc-web-components/group-buttons-menu/index.js @@ -70,7 +70,8 @@ class GroupButtonsMenu extends React.Component { if ( this.props.sectionWidth !== prevProps.sectionWidth || this.state.priorityItems.length !== prevState.priorityItems.length || - this.state.moreItems.length !== prevState.moreItems.length + this.state.moreItems.length !== prevState.moreItems.length || + this.props.menuItems !== prevProps.menuItems ) { this.updateMenu(); } diff --git a/products/ASC.Files/Client/src/bootstrap.js b/products/ASC.Files/Client/src/bootstrap.js index 9055229067..1b96bb0e70 100644 --- a/products/ASC.Files/Client/src/bootstrap.js +++ b/products/ASC.Files/Client/src/bootstrap.js @@ -6,7 +6,7 @@ import { Workbox, messageSW } from "workbox-window"; ReactDOM.render(, document.getElementById("root")); -if ("serviceWorker" in navigator) { +if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { const wb = new Workbox(`${config.homepage}/sw.js`); //TODO: watch https://developers.google.com/web/tools/workbox/guides/advanced-recipes and https://github.com/webmaxru/prog-web-news/blob/5ff94b45c9d317409c21c0fbb7d76e92f064471b/src/app/app-shell/app-shell.component.ts @@ -44,6 +44,4 @@ if ("serviceWorker" in navigator) { console.log("Successful service worker registration", reg); }) .catch((err) => console.error("Service worker registration failed", err)); -} else { - console.error("Service Worker API is not supported in current browser"); } diff --git a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRow/FilesRowContent.js b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRow/FilesRowContent.js index 829c976d6d..484fbd6b90 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRow/FilesRowContent.js +++ b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRow/FilesRowContent.js @@ -331,11 +331,8 @@ class FilesRowContent extends React.PureComponent { } }; - onMobileRowClick = (e) => { - const { isTrashFolder } = this.props; - - if (isTrashFolder || !isMobile) return; - + onMobileRowClick = () => { + if (this.props.isTrashFolder || window.innerWidth > 1024) return; this.onFilesClick(); }; diff --git a/products/ASC.Files/Client/src/components/panels/AddUsersPanel/index.js b/products/ASC.Files/Client/src/components/panels/AddUsersPanel/index.js index aa4bd1817f..119a5e78a6 100644 --- a/products/ASC.Files/Client/src/components/panels/AddUsersPanel/index.js +++ b/products/ASC.Files/Client/src/components/panels/AddUsersPanel/index.js @@ -5,7 +5,7 @@ import Heading from "@appserver/components/heading"; import Aside from "@appserver/components/aside"; import IconButton from "@appserver/components/icon-button"; import { ShareAccessRights } from "@appserver/common/constants"; -import PeopleSelector from "studio/PeopleSelector"; +import PeopleSelector from "people/PeopleSelector"; import { withTranslation } from "react-i18next"; import { StyledAddUsersPanelPanel, diff --git a/products/ASC.Files/Client/src/components/panels/ChangeOwnerPanel/OwnerSelector.js b/products/ASC.Files/Client/src/components/panels/ChangeOwnerPanel/OwnerSelector.js index 6affeeff06..efa7619772 100644 --- a/products/ASC.Files/Client/src/components/panels/ChangeOwnerPanel/OwnerSelector.js +++ b/products/ASC.Files/Client/src/components/panels/ChangeOwnerPanel/OwnerSelector.js @@ -1,5 +1,5 @@ import React from "react"; -import PeopleSelector from "studio/PeopleSelector"; +import PeopleSelector from "people/PeopleSelector"; import Aside from "@appserver/components/aside"; import Backdrop from "@appserver/components/backdrop"; import Heading from "@appserver/components/heading"; diff --git a/web/ASC.Web.Client/public/locales/en/PeopleSelector.json b/products/ASC.People/Client/public/locales/en/PeopleSelector.json similarity index 100% rename from web/ASC.Web.Client/public/locales/en/PeopleSelector.json rename to products/ASC.People/Client/public/locales/en/PeopleSelector.json diff --git a/web/ASC.Web.Client/public/locales/ru/PeopleSelector.json b/products/ASC.People/Client/public/locales/ru/PeopleSelector.json similarity index 100% rename from web/ASC.Web.Client/public/locales/ru/PeopleSelector.json rename to products/ASC.People/Client/public/locales/ru/PeopleSelector.json diff --git a/products/ASC.People/Client/src/Routes.jsx b/products/ASC.People/Client/src/Routes.jsx deleted file mode 100644 index 841330f7f2..0000000000 --- a/products/ASC.People/Client/src/Routes.jsx +++ /dev/null @@ -1,72 +0,0 @@ -// import React from "react"; -// import { Router, Switch, Redirect } from "react-router-dom"; -// import history from "@appserver/common/history"; -// import PrivateRoute from "@appserver/common/components/PrivateRoute"; -// import Error404 from "studio/Error404"; - -// import Home from "./components/pages/Home"; -//import Profile from "./components/pages/Profile"; -//import ProfileAction from "./components/pages/ProfileAction"; -//import GroupAction from "./components/pages/GroupAction"; -//import Reassign from "./components/pages/Reassign"; - -// import { getFilterByLocation } from "./helpers/converters"; -// import { fetchGroups, fetchPeople } from "./store/people/actions"; - -// import config from "../package.json"; -// const { homepage } = config; - -// const Routes = () => { -// return ( -// -// -// -{ - /* - - - - */ -} -{ - /* - - - - - ); -}; - -export default Routes; */ -} - -// const mapStateToProps = (state) => { -// const { settings } = state.auth; -// const { homepage } = settings; -// return { -// homepage: homepage || config.homepage, -// }; -// }; - -// export default connect(mapStateToProps)(Routes); diff --git a/products/ASC.People/Client/src/bootstrap.js b/products/ASC.People/Client/src/bootstrap.js index 9055229067..1b96bb0e70 100644 --- a/products/ASC.People/Client/src/bootstrap.js +++ b/products/ASC.People/Client/src/bootstrap.js @@ -6,7 +6,7 @@ import { Workbox, messageSW } from "workbox-window"; ReactDOM.render(, document.getElementById("root")); -if ("serviceWorker" in navigator) { +if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { const wb = new Workbox(`${config.homepage}/sw.js`); //TODO: watch https://developers.google.com/web/tools/workbox/guides/advanced-recipes and https://github.com/webmaxru/prog-web-news/blob/5ff94b45c9d317409c21c0fbb7d76e92f064471b/src/app/app-shell/app-shell.component.ts @@ -44,6 +44,4 @@ if ("serviceWorker" in navigator) { console.log("Successful service worker registration", reg); }) .catch((err) => console.error("Service worker registration failed", err)); -} else { - console.error("Service Worker API is not supported in current browser"); } diff --git a/web/ASC.Web.Client/src/components/PeopleSelector/i18n.js b/products/ASC.People/Client/src/components/PeopleSelector/i18n.js similarity index 100% rename from web/ASC.Web.Client/src/components/PeopleSelector/i18n.js rename to products/ASC.People/Client/src/components/PeopleSelector/i18n.js diff --git a/web/ASC.Web.Client/src/components/PeopleSelector/index.js b/products/ASC.People/Client/src/components/PeopleSelector/index.js similarity index 100% rename from web/ASC.Web.Client/src/components/PeopleSelector/index.js rename to products/ASC.People/Client/src/components/PeopleSelector/index.js diff --git a/web/ASC.Web.Client/src/components/PeopleSelector/sub-components/StyledUserTooltip.js b/products/ASC.People/Client/src/components/PeopleSelector/sub-components/StyledUserTooltip.js similarity index 100% rename from web/ASC.Web.Client/src/components/PeopleSelector/sub-components/StyledUserTooltip.js rename to products/ASC.People/Client/src/components/PeopleSelector/sub-components/StyledUserTooltip.js diff --git a/web/ASC.Web.Client/src/components/PeopleSelector/sub-components/UserTooltip.js b/products/ASC.People/Client/src/components/PeopleSelector/sub-components/UserTooltip.js similarity index 100% rename from web/ASC.Web.Client/src/components/PeopleSelector/sub-components/UserTooltip.js rename to products/ASC.People/Client/src/components/PeopleSelector/sub-components/UserTooltip.js diff --git a/products/ASC.People/Client/src/pages/GroupAction/Section/Body/index.js b/products/ASC.People/Client/src/pages/GroupAction/Section/Body/index.js index 13e2885aac..334481e6a6 100644 --- a/products/ASC.People/Client/src/pages/GroupAction/Section/Body/index.js +++ b/products/ASC.People/Client/src/pages/GroupAction/Section/Body/index.js @@ -8,7 +8,8 @@ import { tablet } from "@appserver/components/utils/device"; import toastr from "studio/toastr"; import Loaders from "@appserver/common/components/Loaders"; -import PeopleSelector from "studio/PeopleSelector"; +//import PeopleSelector from "people/PeopleSelector"; +import PeopleSelector from "../../../../components/PeopleSelector"; import { GUID_EMPTY } from "../../../../helpers/constants"; import PropTypes from "prop-types"; import React from "react"; diff --git a/products/ASC.People/Client/webpack.config.js b/products/ASC.People/Client/webpack.config.js index a31598563f..1e4362140f 100644 --- a/products/ASC.People/Client/webpack.config.js +++ b/products/ASC.People/Client/webpack.config.js @@ -138,6 +138,9 @@ var config = { exposes: { "./app": "./src/People.jsx", "./GroupSelector": "./src/components/GroupSelector", + "./PeopleSelector": "./src/components/PeopleSelector", + "./PeopleSelector/UserTooltip": + "./src/components/PeopleSelector/sub-components/UserTooltip.js", }, shared: { ...deps, diff --git a/web/ASC.Web.Client/src/bootstrap.js b/web/ASC.Web.Client/src/bootstrap.js index af9e6776a2..082e5e1432 100644 --- a/web/ASC.Web.Client/src/bootstrap.js +++ b/web/ASC.Web.Client/src/bootstrap.js @@ -6,7 +6,7 @@ import { Workbox, messageSW } from "workbox-window"; ReactDOM.render(, document.getElementById("root")); -if ("serviceWorker" in navigator) { +if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { const wb = new Workbox(`${config.homepage}/sw.js`); //TODO: watch https://developers.google.com/web/tools/workbox/guides/advanced-recipes and https://github.com/webmaxru/prog-web-news/blob/5ff94b45c9d317409c21c0fbb7d76e92f064471b/src/app/app-shell/app-shell.component.ts @@ -44,6 +44,4 @@ if ("serviceWorker" in navigator) { console.log("Successful service worker registration", reg); }) .catch((err) => console.error("Service worker registration failed", err)); -} else { - console.error("Service Worker API is not supported in current browser"); } diff --git a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/admins.js b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/admins.js index 04b085c64c..5d00521aca 100644 --- a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/admins.js +++ b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/admins.js @@ -19,7 +19,7 @@ import Loader from "@appserver/components/loader"; import EmptyScreenContainer from "@appserver/components/empty-screen-container"; import { showLoader, hideLoader } from "@appserver/common/utils"; import FilterInput from "@appserver/common/components/FilterInput"; -import PeopleSelector from "studio/PeopleSelector"; +import PeopleSelector from "people/PeopleSelector"; import isEmpty from "lodash/isEmpty"; import { inject, observer } from "mobx-react"; diff --git a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/owner.js b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/owner.js index 00a3bddff4..eb66c42556 100644 --- a/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/owner.js +++ b/web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/owner.js @@ -10,7 +10,7 @@ import toastr from "@appserver/components/toast/toastr"; import Button from "@appserver/components/button"; import RequestLoader from "@appserver/components/request-loader"; import Loader from "@appserver/components/loader"; -import PeopleSelector from "studio/PeopleSelector"; +import PeopleSelector from "people/PeopleSelector"; import isEmpty from "lodash/isEmpty"; import { inject } from "mobx-react"; import { showLoader, hideLoader } from "@appserver/common/utils"; diff --git a/web/ASC.Web.Client/webpack.config.js b/web/ASC.Web.Client/webpack.config.js index 0321522b5d..478c9cc081 100644 --- a/web/ASC.Web.Client/webpack.config.js +++ b/web/ASC.Web.Client/webpack.config.js @@ -132,6 +132,7 @@ const config = { remotes: { studio: `studio@${homepage}/remoteEntry.js`, login: `login@${homepage}/login/remoteEntry.js`, + people: "people@/products/people/remoteEntry.js", }, exposes: { "./shell": "./src/Shell", @@ -143,9 +144,6 @@ const config = { "./Layout": "./src/components/Layout", "./Layout/context": "./src/components/Layout/context.js", "./Main": "./src/components/Main", - "./PeopleSelector": "./src/components/PeopleSelector", - "./PeopleSelector/UserTooltip": - "./src/components/PeopleSelector/sub-components/UserTooltip.js", "./toastr": "./src/helpers/toastr", }, shared: { diff --git a/web/ASC.Web.Editor/src/bootstrap.js b/web/ASC.Web.Editor/src/bootstrap.js index af9e6776a2..082e5e1432 100644 --- a/web/ASC.Web.Editor/src/bootstrap.js +++ b/web/ASC.Web.Editor/src/bootstrap.js @@ -6,7 +6,7 @@ import { Workbox, messageSW } from "workbox-window"; ReactDOM.render(, document.getElementById("root")); -if ("serviceWorker" in navigator) { +if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { const wb = new Workbox(`${config.homepage}/sw.js`); //TODO: watch https://developers.google.com/web/tools/workbox/guides/advanced-recipes and https://github.com/webmaxru/prog-web-news/blob/5ff94b45c9d317409c21c0fbb7d76e92f064471b/src/app/app-shell/app-shell.component.ts @@ -44,6 +44,4 @@ if ("serviceWorker" in navigator) { console.log("Successful service worker registration", reg); }) .catch((err) => console.error("Service worker registration failed", err)); -} else { - console.error("Service Worker API is not supported in current browser"); } diff --git a/web/ASC.Web.Login/public/index.html b/web/ASC.Web.Login/public/index.html index 9fb410b356..f089892361 100644 --- a/web/ASC.Web.Login/public/index.html +++ b/web/ASC.Web.Login/public/index.html @@ -11,14 +11,14 @@ manifest.json provides metadata used when your web app is added to the homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ --> - + - + - + { const { error, confirmedEmail } = match.params; const onKeyDown = (e) => { - console.log("onKeyDown", e.key); + //console.log("onKeyDown", e.key); if (e.key === "Enter") { onClearErrors(e); !isDisabled && onSubmit(e); @@ -167,7 +167,7 @@ const Form = (props) => { }; const onClearErrors = (e) => { - console.log("onClearErrors", e); + //console.log("onClearErrors", e); !identifierValid && setIdentifierValid(true); !passwordValid && setPasswordValid(true); errorText && setErrorText(""); @@ -197,13 +197,13 @@ const Form = (props) => { }; const onChangeLogin = (e) => { - console.log("onChangeLogin", e.target.value); + //console.log("onChangeLogin", e.target.value); setIdentifier(e.target.value); onClearErrors(e); }; const onChangePassword = (e) => { - console.log("onChangePassword", e.target.value); + //console.log("onChangePassword", e.target.value); setPassword(e.target.value); onClearErrors(e); }; diff --git a/web/ASC.Web.Login/src/bootstrap.js b/web/ASC.Web.Login/src/bootstrap.js index af9e6776a2..082e5e1432 100644 --- a/web/ASC.Web.Login/src/bootstrap.js +++ b/web/ASC.Web.Login/src/bootstrap.js @@ -6,7 +6,7 @@ import { Workbox, messageSW } from "workbox-window"; ReactDOM.render(, document.getElementById("root")); -if ("serviceWorker" in navigator) { +if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { const wb = new Workbox(`${config.homepage}/sw.js`); //TODO: watch https://developers.google.com/web/tools/workbox/guides/advanced-recipes and https://github.com/webmaxru/prog-web-news/blob/5ff94b45c9d317409c21c0fbb7d76e92f064471b/src/app/app-shell/app-shell.component.ts @@ -44,6 +44,4 @@ if ("serviceWorker" in navigator) { console.log("Successful service worker registration", reg); }) .catch((err) => console.error("Service worker registration failed", err)); -} else { - console.error("Service Worker API is not supported in current browser"); }