DocSpace-client/packages/shared/constants/index.ts
Alexey Safronov a2302aa248 Merge branch 'hotfix/v2.6.1' into develop
# Conflicts:
#	packages/client/src/components/PrivateRouteWrapper/index.tsx
#	packages/client/src/pages/Confirm/sub-components/activateUser.js
#	packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/CertificateDialog.js
#	packages/client/src/pages/PublicRoom/sub-components/RoomStyles.js
#	packages/login/src/app/(root)/layout.tsx
#	packages/login/src/app/(root)/page.tsx
#	packages/login/src/app/layout.tsx
#	packages/login/src/components/LoginForm/index.tsx
#	packages/login/src/types/index.ts
#	packages/login/src/utils/actions.ts
#	packages/shared/constants/index.ts
#	packages/shared/themes/base.ts
2024-08-09 17:23:25 +04:00

183 lines
5.5 KiB
TypeScript

// (c) Copyright Ascensio System SIA 2009-2024
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// 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 ShareAppleReactSvg from "PUBLIC_DIR/images/share.apple.react.svg";
import ShareGoogleReactSvg from "PUBLIC_DIR/images/share.google.react.svg";
import ShareFacebookReactSvg from "PUBLIC_DIR/images/share.facebook.react.svg";
import ShareTwitterReactSvg from "PUBLIC_DIR/images/share.twitter.react.svg";
import ShareLinkedinReactSvg from "PUBLIC_DIR/images/share.linkedin.react.svg";
import ShareMicrosoftReactSvg from "PUBLIC_DIR/images/share.microsoft.react.svg";
import ShareZoomReactSvg from "PUBLIC_DIR/images/share.zoom.react.svg";
import { globalColors } from "../themes/globalColors";
export const LOADER_STYLE = Object.freeze({
title: "",
width: "100%",
height: "32",
backgroundColor: globalColors.darkBlack,
foregroundColor: globalColors.darkBlack,
backgroundOpacity: 0.1,
foregroundOpacity: 0.15,
borderRadius: "3",
radius: "3",
speed: 2,
animate: true,
});
export const MANAGER = "manager";
export const TOTAL_SIZE = "total_size";
export const FILE_SIZE = "file_size";
export const ROOM = "room";
export const USERS = "users";
export const USERS_IN_ROOM = "usersInRoom";
export const PDF_FORM_DIALOG_KEY = "pdf_form_dialog";
export const CREATED_FORM_KEY = "created_form_key";
export const COUNT_FOR_SHOWING_BAR = 2;
export const PERCENTAGE_FOR_SHOWING_BAR = 90;
export const LANGUAGE = "asc_language";
export const MOBILE_FOOTER_HEIGHT = "64px";
export const COOKIE_EXPIRATION_YEAR = 31536000000;
export const ARTICLE_PINNED_KEY = "asc_article_pinned_key";
export const LIVE_CHAT_LOCAL_STORAGE_KEY = "live_chat_state";
export const MAX_FILE_COMMENT_LENGTH = 255;
export const LINKS_LIMIT_COUNT = 5;
export const LOADER_TIMEOUT = 300;
export const ROOMS_PROVIDER_TYPE_NAME = Object.freeze({
1: "Box",
2: "DropBox",
3: "Google Drive",
4: "kDrive",
5: "OneDrive",
6: "SharePoint",
7: "WebDav",
8: "Yandex",
});
// extends FolderType keys
export const FOLDER_NAMES = Object.freeze({
0: "default",
1: "common",
2: "bunch",
3: "trash",
5: "personal",
6: "share",
8: "projects",
10: "favorites",
11: "recent",
12: "templates",
13: "privacy",
14: "shared",
20: "archive",
});
export const PROVIDERS_DATA = Object.freeze({
appleid: {
label: "apple",
icon: ShareAppleReactSvg,
iconOptions: undefined,
},
google: {
label: "google",
icon: ShareGoogleReactSvg,
iconOptions: undefined,
},
facebook: {
label: "facebook",
icon: ShareFacebookReactSvg,
iconOptions: undefined,
},
twitter: {
label: "twitter",
icon: ShareTwitterReactSvg,
iconOptions: { color: globalColors.twitterColor },
},
linkedin: {
label: "linkedin",
icon: ShareLinkedinReactSvg,
iconOptions: undefined,
},
microsoft: {
label: "microsoft",
icon: ShareMicrosoftReactSvg,
iconOptions: undefined,
},
zoom: {
label: "zoom",
icon: ShareZoomReactSvg,
iconOptions: undefined,
},
});
export const PASSWORD_LIMIT_SPECIAL_CHARACTERS = "!@#$%^&*";
export const EDITOR_ID = "portal_editor";
export const WRONG_PORTAL_NAME_URL =
(typeof window !== "undefined" && window.ClientConfig?.wrongPortalNameUrl) ||
`https://www.onlyoffice.com/wrongportalname.aspx`;
export const MEDIA_VIEW_URL = "/media/view/";
export const PUBLIC_MEDIA_VIEW_URL = "/rooms/share/media/view";
export const RTL_LANGUAGES = Object.freeze([
"ar",
"arc",
"dv",
"fa",
"ha",
"he",
"khw",
"ks",
"ku",
"ps",
"ur",
"yi",
]);
export const DEFAULT_FONT_FAMILY = "Open Sans, sans-serif, Arial";
// Contains system fonts used in mac, ios, windows, android and linux
export const SYSTEM_FONT_FAMILY =
"-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Arial, sans-serif, Roboto, Noto Sans Arabic, Geeza Pro, Traditional Arabic, Noto Sans";
export const HTML_EXST = [".htm", ".mht", ".html"];
export const SYSTEM_THEME_KEY = "system_theme";
const SDK_VERSION = "1.0.0";
export const SDK_SCRIPT_URL =
typeof window !== "undefined"
? `${window.location.origin}/static/scripts/sdk/${SDK_VERSION}/api.js`
: "";
export const ALLOWED_PASSWORD_CHARACTERS =
"a-z, A-Z, 0-9, !\"#%&'()*+,-./:;<=>?@[]^_`{|}";