Merge branch 'develop' into feature/new-context-menu

This commit is contained in:
Alexey Safronov 2024-08-14 12:48:04 +04:00
commit 8a29f436be
26 changed files with 50 additions and 21 deletions

View File

@ -146,7 +146,7 @@ const AccessSelector: React.FC<AccessSelectorProps> = ({
directionX="right"
directionY="top"
fixedDirection
manualWidth="fit-content"
manualWidth="auto"
isDefaultMode
isAside={isMobileView}
setIsOpenItemAccess={setIsOpenItemAccess}

View File

@ -38,6 +38,7 @@ import { IconButton } from "@docspace/shared/components/icon-button";
import RoomsFilter from "@docspace/shared/api/rooms/filter";
import { RoomSearchArea } from "@docspace/shared/enums";
import { frameCallEvent } from "@docspace/shared/utils/common";
import { getCategoryUrl } from "SRC_DIR/helpers/utils";
import { CategoryType } from "SRC_DIR/helpers/constants";
@ -60,6 +61,8 @@ const RoomNoAccessContainer = (props) => {
const navigate = useNavigate();
React.useEffect(() => {
frameCallEvent({ event: "onNoAccess" });
const timer = setTimeout(onGoToShared, 5000);
return () => clearTimeout(timer);
}, []);

View File

@ -218,7 +218,7 @@ const QuotaForm = ({
size="content"
onSelect={onSelectComboBox}
showDisabledItems
manualWidth={"fit-content"}
manualWidth="auto"
directionY="both"
/>
</div>

View File

@ -196,7 +196,7 @@ const SpaceQuota = (props) => {
size="content"
modernView
isLoading={isLoading}
manualWidth="fit-content"
manualWidth="auto"
directionY="both"
/>
</StyledBody>

View File

@ -239,7 +239,7 @@ const ThirdPartyComboBox = ({
scaled
withBackdrop={isMobile}
size="content"
manualWidth={"fit-content"}
manualWidth={"auto"}
isMobileView={isMobileOnly}
directionY="both"
displaySelectedOption

View File

@ -174,7 +174,7 @@ const GroupMember = ({ member, infoPanelSelection }: GroupMemberProps) => {
size="content"
modernView
title={t("Common:Role")}
manualWidth={"fit-content"}
manualWidth="auto"
isMobileView={isMobileOnly}
directionY="both"
displaySelectedOption

View File

@ -155,7 +155,7 @@ const EmbeddingPanelComponent = (props: EmbeddingPanelProps) => {
);
const fileConfig = {
mode: "viewer",
mode: "editor",
width: `${widthValue}${dataDimensions[0].label}`,
height: `${heightValue}${dataDimensions[1].label}`,
frameId: "ds-frame",

View File

@ -176,7 +176,7 @@ const Accounts = (props) => {
size="content"
displaySelectedOption
modernView
manualWidth={"fit-content"}
manualWidth="auto"
isLoading={isLoading}
/>
);

View File

@ -382,7 +382,7 @@ const User = ({
size="content"
modernView
title={t("Common:Role")}
manualWidth={"fit-content"}
manualWidth="auto"
isLoading={isLoading}
isMobileView={isMobileOnly}
directionY="both"

View File

@ -399,7 +399,7 @@ const InsideGroupTableRow = (props) => {
directionY="both"
size="content"
modernView
manualWidth={"fit-content"}
manualWidth="auto"
isLoading={isLoading}
optionStyle={{ maxWidth: "400px" }}
textOverflow
@ -442,7 +442,7 @@ const InsideGroupTableRow = (props) => {
size="content"
displaySelectedOption
modernView
manualWidth={"fit-content"}
manualWidth="auto"
isLoading={isLoading}
/>
);

View File

@ -438,7 +438,7 @@ const PeopleTableRow = (props) => {
size="content"
displaySelectedOption
modernView
manualWidth={"fit-content"}
manualWidth={"auto"}
isLoading={isLoading}
/>
);

View File

@ -24,6 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import React from "react";
import styled from "styled-components";
import { Text } from "@docspace/shared/components/text";
import { Box } from "@docspace/shared/components/box";

View File

@ -24,6 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import React from "react";
import { TableRow, TableCell } from "@docspace/shared/components/table";
import { Text } from "@docspace/shared/components/text";

View File

@ -136,7 +136,7 @@ const UsersRowContent = (props: TypeSelectRowContentProps) => {
size={ComboBoxSize.content}
displaySelectedOption
modernView
manualWidth="fit-content"
manualWidth="auto"
/>
</div>
</Box>,

View File

@ -149,7 +149,7 @@ const UsersTableRow = (props: TypeSelectTableRowProps) => {
size={ComboBoxSize.content}
displaySelectedOption
modernView
manualWidth="fit-content"
manualWidth="auto"
/>
</div>
</TableCell>

View File

@ -130,6 +130,7 @@ const Manager = (props) => {
);
const [selectedColumns, setSelectedColumns] = useState([
{ key: "Name", label: t("Common:Name") },
{ key: "Size", label: t("Common:Size") },
{ key: "Type", label: t("Common:Type") },
{ key: "Tags", label: t("Common:Tags") },
]);

View File

@ -125,6 +125,17 @@ class EditGroupStore {
const addedIds = Array.from(this.addedMembersMap.keys());
const removedIds = Array.from(this.removedMembersMap.keys());
const oldManager = this.group.manager;
const oldManagerRemovedButRemainsAsMember =
oldManager &&
oldManager.id !== this.manager?.id &&
!this.removedMembersMap.has(oldManager.id);
// Requires when new group is without manager and old manager moved to members. updateGroup api method doesn't provide possibility to do it without setting new manager
if (this.manager === null && oldManagerRemovedButRemainsAsMember) {
await api.groups.removeGroupMembers(this.group.id, [oldManager.id]);
addedIds.push(oldManager.id);
}
await updateGroup(
this.group?.id,

View File

@ -518,7 +518,6 @@ class LdapFormStore {
toastr.success(t("Common:SuccessfullyCompletedOperation"));
}
} catch (error) {
console.error(error);
toastr.error(error);
this.endProcess();
}

View File

@ -305,7 +305,7 @@ const Editor = ({
newConfig.events.onRequestClose = onSDKRequestClose;
}
if (config?.startFilling) {
if (config?.startFilling && !IS_ZOOM) {
newConfig.events.onRequestStartFilling = () =>
onSDKRequestStartFilling?.(t("Common:ShareAndCollect"));
}

View File

@ -146,6 +146,14 @@ export const addGroupMembers = (groupId: string, members: string) => {
});
};
export const removeGroupMembers = (groupId: string, membersIds: string[]) => {
return request({
method: "delete",
url: `/group/${groupId}/members`,
data: { id: groupId, members: membersIds },
}) as Promise<TGroup>;
};
// * Delete
export const deleteGroup = (groupId: string) => {

View File

@ -29,7 +29,7 @@ import moment from "moment";
export const getCalendarYears = (observedDate: moment.Moment) => {
const years = [];
const selectedYear = observedDate.year();
const firstYear = selectedYear - (selectedYear % 10) - 1;
const firstYear = selectedYear - 1;
for (let i = firstYear; i <= firstYear + 15; i += 1) {
years.push(moment(i, "YYYY").format("YYYY"));

View File

@ -94,7 +94,7 @@ const StyledDropdown = styled.div<{
border: ${(props) => props.theme.dropDown.border};
border-radius: ${(props) => props.theme.dropDown.borderRadius};
-moz-border-radius: ${(props) => props.theme.dropDown.borderRadius};
-webkit-border-radius: ${(props) => props.theme.dropDown.borderRadius};dropDownMaxHeight
-webkit-border-radius: ${(props) => props.theme.dropDown.borderRadius};
box-shadow: ${(props) => props.theme.dropDown.boxShadow};
-moz-box-shadow: ${(props) => props.theme.dropDown.boxShadow};
-webkit-box-shadow: ${(props) => props.theme.dropDown.boxShadow};

View File

@ -63,7 +63,7 @@ const AccessSelector = (props: AccessSelectorProps) => {
options={accessRights as TOption[]}
size={ComboBoxSize.content}
scaled={false}
manualWidth="fit-content"
manualWidth="auto"
selectedOption={selectedAccessRight as TOption}
showDisabledItems
directionX="right"
@ -81,7 +81,7 @@ const AccessSelector = (props: AccessSelectorProps) => {
directionX="right"
directionY="top"
fixedDirection={isMobileView}
manualWidth={isMobileView ? "fit-content" : `${width}px`}
manualWidth={isMobileView ? "auto" : `${width}px`}
isAside={isMobileView}
manualY={isMobileView ? "0px" : undefined}
withoutBackground={isMobileView}

View File

@ -124,7 +124,9 @@ const Body = ({
const onBodyResize = React.useCallback(() => {
if (bodyRef && bodyRef.current) {
setBodyHeight(bodyRef.current.offsetHeight);
setTimeout(() => {
setBodyHeight(bodyRef.current!.offsetHeight);
}, 20);
}
}, []);

View File

@ -75,6 +75,7 @@ export type TFrameEvents = {
onAuthSuccess: null | ((e: Event) => void);
onSignOut: null | ((e: Event) => void);
onDownload: null | ((e: Event) => void);
onNoAccess: null | ((e: Event) => void);
};
export type TFrameConfig = {
@ -96,6 +97,7 @@ export type TFrameConfig = {
showSelectorCancel: boolean;
showSelectorHeader: boolean;
showHeader: boolean;
showHeaderBanner: string;
showTitle: boolean;
showMenu: boolean;
showFilter: boolean;

View File

@ -53,7 +53,7 @@
showSignOut: true,
destroyText: "",
viewAs: "row", //TODO: ["row", "table", "tile"]
viewTableColumns: "Name,Type,Tags",
viewTableColumns: "Name,Size,Type,Tags",
checkCSP: true,
disableActionButton: false,
showSettings: false,
@ -97,6 +97,7 @@
onAuthSuccess: null,
onSignOut: null,
onDownload: null,
onNoAccess: null,
},
};