Merge branch 'release/v2.5.0' into feature/logo-handler
This commit is contained in:
commit
55cd2f5053
@ -84,6 +84,9 @@
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
window.DocSpaceConfig = {
|
||||
errorOnLoad: e,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -325,7 +325,7 @@ const Shell = ({ items = [], page = "home", ...rest }) => {
|
||||
}, [userId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!userId || !window.DocSpaceConfig.imageThumbnails) return;
|
||||
if (!userId || !window.DocSpaceConfig?.imageThumbnails) return;
|
||||
initIndexedDb();
|
||||
|
||||
return () => {
|
||||
|
@ -106,8 +106,8 @@ export const RegisterContainer = styled.div`
|
||||
line-height: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.auth-form-container {
|
||||
|
||||
.auth-form-fields {
|
||||
width: 100%;
|
||||
|
||||
.password-field{
|
||||
|
@ -514,183 +514,181 @@ const CreateUserForm = (props) => {
|
||||
|
||||
<FormWrapper>
|
||||
<RegisterContainer registrationForm={registrationForm}>
|
||||
<form className="auth-form-container">
|
||||
<div className="auth-form-fields">
|
||||
<div className="email-container">
|
||||
<div className="auth-form-fields">
|
||||
<div className="email-container">
|
||||
<FieldContainer
|
||||
className="form-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={isEmailErrorShow && !emailValid}
|
||||
errorMessage={
|
||||
emailErrorText
|
||||
? t(`Common:${emailErrorText}`)
|
||||
: t("Common:RequiredField")
|
||||
}
|
||||
>
|
||||
<EmailInput
|
||||
id="login"
|
||||
name="login"
|
||||
type="email"
|
||||
hasError={isEmailErrorShow && !emailValid}
|
||||
value={email}
|
||||
placeholder={t("Common:Email")}
|
||||
size="large"
|
||||
scale={true}
|
||||
isAutoFocussed={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading || !!emailFromLink}
|
||||
autoComplete="username"
|
||||
onChange={onChangeEmail}
|
||||
onBlur={onBlurEmail}
|
||||
onValidateInput={onValidateEmail}
|
||||
forwardedRef={inputRef}
|
||||
onKeyDown={onKeyPress}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<Button
|
||||
className="login-button"
|
||||
primary
|
||||
size="medium"
|
||||
scale={true}
|
||||
label={t("Common:ContinueButton")}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
isLoading={isLoading}
|
||||
onClick={onContinue}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{registrationForm && (
|
||||
<div>
|
||||
<RegistrationFormGreeting
|
||||
email={email}
|
||||
setRegistrationForm={setRegistrationForm}
|
||||
type={linkData.type}
|
||||
emailFromLink={emailFromLink}
|
||||
/>
|
||||
<FieldContainer
|
||||
className="form-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={isEmailErrorShow && !emailValid}
|
||||
hasError={!fnameValid}
|
||||
errorMessage={
|
||||
emailErrorText
|
||||
? t(`Common:${emailErrorText}`)
|
||||
: t("Common:RequiredField")
|
||||
errorText
|
||||
? errorText
|
||||
: fname.trim().length === 0
|
||||
? t("Common:RequiredField")
|
||||
: t("Common:IncorrectFirstName")
|
||||
}
|
||||
>
|
||||
<EmailInput
|
||||
id="login"
|
||||
name="login"
|
||||
type="email"
|
||||
hasError={isEmailErrorShow && !emailValid}
|
||||
value={email}
|
||||
placeholder={t("Common:Email")}
|
||||
<TextInput
|
||||
id="first-name"
|
||||
name="first-name"
|
||||
type="text"
|
||||
hasError={!fnameValid}
|
||||
value={fname}
|
||||
placeholder={t("Common:FirstName")}
|
||||
size="large"
|
||||
scale={true}
|
||||
isAutoFocussed={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading || !!emailFromLink}
|
||||
autoComplete="username"
|
||||
onChange={onChangeEmail}
|
||||
onBlur={onBlurEmail}
|
||||
onValidateInput={onValidateEmail}
|
||||
forwardedRef={inputRef}
|
||||
isDisabled={isLoading}
|
||||
onChange={onChangeFname}
|
||||
onKeyDown={onKeyPress}
|
||||
isAutoFocussed
|
||||
/>
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
className="form-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={!snameValid}
|
||||
errorMessage={
|
||||
errorText
|
||||
? errorText
|
||||
: sname.trim().length === 0
|
||||
? t("Common:RequiredField")
|
||||
: t("Common:IncorrectLastName")
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
id="last-name"
|
||||
name="last-name"
|
||||
type="text"
|
||||
hasError={!snameValid}
|
||||
value={sname}
|
||||
placeholder={t("Common:LastName")}
|
||||
size="large"
|
||||
scale={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
onChange={onChangeSname}
|
||||
onKeyDown={onKeyPress}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
className="form-field password-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={isPasswordErrorShow && !passwordValid}
|
||||
errorMessage={`${t(
|
||||
"Common:PasswordLimitMessage",
|
||||
)}: ${getPasswordErrorMessage(t, settings)}`}
|
||||
>
|
||||
<PasswordInput
|
||||
simpleView={false}
|
||||
hideNewPasswordButton
|
||||
showCopyLink={false}
|
||||
passwordSettings={settings}
|
||||
id="password"
|
||||
inputName="password"
|
||||
placeholder={t("Common:Password")}
|
||||
type="password"
|
||||
hasError={isPasswordErrorShow && !passwordValid}
|
||||
inputValue={password}
|
||||
size="large"
|
||||
scale={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
autoComplete="current-password"
|
||||
onChange={onChangePassword}
|
||||
onBlur={onBlurPassword}
|
||||
onKeyDown={onKeyPress}
|
||||
onValidateInput={onValidatePassword}
|
||||
tooltipPasswordTitle={`${t(
|
||||
"Common:PasswordLimitMessage",
|
||||
)}:`}
|
||||
tooltipPasswordLength={`${t(
|
||||
"Common:PasswordMinimumLength",
|
||||
)}: ${settings ? settings.minLength : 8}`}
|
||||
tooltipPasswordDigits={`${t(
|
||||
"Common:PasswordLimitDigits",
|
||||
)}`}
|
||||
tooltipPasswordCapital={`${t(
|
||||
"Common:PasswordLimitUpperCase",
|
||||
)}`}
|
||||
tooltipPasswordSpecial={`${t(
|
||||
"Common:PasswordLimitSpecialSymbols",
|
||||
)}`}
|
||||
generatePasswordTitle={t("Wizard:GeneratePassword")}
|
||||
/>
|
||||
</FieldContainer>
|
||||
|
||||
<Button
|
||||
className="login-button"
|
||||
primary
|
||||
size="medium"
|
||||
scale={true}
|
||||
label={t("Common:ContinueButton")}
|
||||
label={
|
||||
isLoading ? t("Common:LoadingProcessing") : t("SignUp")
|
||||
}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
isLoading={isLoading}
|
||||
onClick={onContinue}
|
||||
onClick={onSubmit}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{registrationForm && (
|
||||
<div>
|
||||
<RegistrationFormGreeting
|
||||
email={email}
|
||||
setRegistrationForm={setRegistrationForm}
|
||||
type={linkData.type}
|
||||
emailFromLink={emailFromLink}
|
||||
/>
|
||||
<FieldContainer
|
||||
className="form-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={!fnameValid}
|
||||
errorMessage={
|
||||
errorText
|
||||
? errorText
|
||||
: fname.trim().length === 0
|
||||
? t("Common:RequiredField")
|
||||
: t("Common:IncorrectFirstName")
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
id="first-name"
|
||||
name="first-name"
|
||||
type="text"
|
||||
hasError={!fnameValid}
|
||||
value={fname}
|
||||
placeholder={t("Common:FirstName")}
|
||||
size="large"
|
||||
scale={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
onChange={onChangeFname}
|
||||
onKeyDown={onKeyPress}
|
||||
isAutoFocussed
|
||||
/>
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
className="form-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={!snameValid}
|
||||
errorMessage={
|
||||
errorText
|
||||
? errorText
|
||||
: sname.trim().length === 0
|
||||
? t("Common:RequiredField")
|
||||
: t("Common:IncorrectLastName")
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
id="last-name"
|
||||
name="last-name"
|
||||
type="text"
|
||||
hasError={!snameValid}
|
||||
value={sname}
|
||||
placeholder={t("Common:LastName")}
|
||||
size="large"
|
||||
scale={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
onChange={onChangeSname}
|
||||
onKeyDown={onKeyPress}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
className="form-field password-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={isPasswordErrorShow && !passwordValid}
|
||||
errorMessage={`${t(
|
||||
"Common:PasswordLimitMessage",
|
||||
)}: ${getPasswordErrorMessage(t, settings)}`}
|
||||
>
|
||||
<PasswordInput
|
||||
simpleView={false}
|
||||
hideNewPasswordButton
|
||||
showCopyLink={false}
|
||||
passwordSettings={settings}
|
||||
id="password"
|
||||
inputName="password"
|
||||
placeholder={t("Common:Password")}
|
||||
type="password"
|
||||
hasError={isPasswordErrorShow && !passwordValid}
|
||||
inputValue={password}
|
||||
size="large"
|
||||
scale={true}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
autoComplete="current-password"
|
||||
onChange={onChangePassword}
|
||||
onBlur={onBlurPassword}
|
||||
onKeyDown={onKeyPress}
|
||||
onValidateInput={onValidatePassword}
|
||||
tooltipPasswordTitle={`${t(
|
||||
"Common:PasswordLimitMessage",
|
||||
)}:`}
|
||||
tooltipPasswordLength={`${t(
|
||||
"Common:PasswordMinimumLength",
|
||||
)}: ${settings ? settings.minLength : 8}`}
|
||||
tooltipPasswordDigits={`${t(
|
||||
"Common:PasswordLimitDigits",
|
||||
)}`}
|
||||
tooltipPasswordCapital={`${t(
|
||||
"Common:PasswordLimitUpperCase",
|
||||
)}`}
|
||||
tooltipPasswordSpecial={`${t(
|
||||
"Common:PasswordLimitSpecialSymbols",
|
||||
)}`}
|
||||
generatePasswordTitle={t("Wizard:GeneratePassword")}
|
||||
/>
|
||||
</FieldContainer>
|
||||
|
||||
<Button
|
||||
className="login-button"
|
||||
primary
|
||||
size="medium"
|
||||
scale={true}
|
||||
label={
|
||||
isLoading ? t("Common:LoadingProcessing") : t("SignUp")
|
||||
}
|
||||
tabIndex={1}
|
||||
isDisabled={isLoading}
|
||||
isLoading={isLoading}
|
||||
onClick={onSubmit}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{!emailFromLink && (oauthDataExists() || ssoExists()) && (
|
||||
<>
|
||||
|
@ -1996,7 +1996,7 @@ class FilesStore {
|
||||
fileOptions = this.removeOptions(fileOptions, ["download"]);
|
||||
}
|
||||
|
||||
if (!isPdf || !window.DocSpaceConfig.pdfViewer || isRecycleBinFolder) {
|
||||
if (!isPdf || !window.DocSpaceConfig?.pdfViewer || isRecycleBinFolder) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["pdf-view"]);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ class MediaViewerDataStore {
|
||||
if (
|
||||
!file.canOpenPlayer &&
|
||||
!file.fileExst === ".pdf" &&
|
||||
window.DocSpaceConfig.pdfViewer
|
||||
window.DocSpaceConfig?.pdfViewer
|
||||
)
|
||||
return;
|
||||
|
||||
@ -247,7 +247,7 @@ class MediaViewerDataStore {
|
||||
const canOpenPlayer =
|
||||
file.viewAccessibility?.ImageView ||
|
||||
file.viewAccessibility?.MediaView ||
|
||||
(file.fileExst === ".pdf" && window.DocSpaceConfig.pdfViewer);
|
||||
(file.fileExst === ".pdf" && window.DocSpaceConfig?.pdfViewer);
|
||||
|
||||
if (canOpenPlayer) {
|
||||
playlist.push({
|
||||
|
@ -44,7 +44,7 @@ const FILTER_COUNT = 6;
|
||||
|
||||
class StorageManagement {
|
||||
isInit = false;
|
||||
portalInfo = null;
|
||||
portalInfo = {};
|
||||
activeUsersCount = null;
|
||||
filesUsedSpace = {};
|
||||
quotaSettings = {};
|
||||
|
Binary file not shown.
@ -11,7 +11,7 @@
|
||||
"deploy": "shx --silent mkdir -p ../../../publish/web/editor && shx --silent mkdir -p ../../../publish/web/editor/.next && shx --silent mkdir -p ../../../publish/web/editor/config && shx cp -r config/* ../../../publish/web/editor/config && shx --silent mkdir -p ../../../publish/web/editor/node_modules && shx --silent mkdir -p ../../../publish/web/editor/.next/static && shx cp -r .next/standalone/node_modules/* ../../../publish/web/editor/node_modules && shx cp -r .next/static/* ../../../publish/web/editor/.next/static && shx cp -r .next/standalone/packages/doceditor/.next/* ../../../publish/web/editor/.next && shx cp -f server.prod.js ../../../publish/web/editor/server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@onlyoffice/document-editor-react": "file:./onlyoffice-document-editor-react-v1.4.1.tgz",
|
||||
"@onlyoffice/document-editor-react": "^1.5.0",
|
||||
"i18next": "^20.6.1",
|
||||
"next": "14.0.4",
|
||||
"react": "^18.2.0",
|
||||
|
@ -55,7 +55,7 @@ export default function GlobalError({ error }: { error: Error }) {
|
||||
const { i18n } = useI18N({ settings, user });
|
||||
const { currentDeviceType } = useDeviceType();
|
||||
const { logoUrls } = useWhiteLabel();
|
||||
const { theme } = useTheme({ user });
|
||||
const { theme } = useTheme({ user, i18n });
|
||||
const firebaseHelper = useMemo(() => {
|
||||
return new FirebaseHelper(settings?.firebase ?? ({} as TFirebaseSettings));
|
||||
}, [settings?.firebase]);
|
||||
|
@ -25,6 +25,7 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
import "../styles/globals.scss";
|
||||
import Script from "next/script";
|
||||
|
||||
// import StyledComponentsRegistry from "@/utils/registry";
|
||||
|
||||
@ -38,7 +39,49 @@ export default async function RootLayout({
|
||||
<head>
|
||||
<link id="favicon" rel="shortcut icon" type="image/x-icon" />
|
||||
</head>
|
||||
<body>{children}</body>
|
||||
<body>
|
||||
{children}
|
||||
<Script
|
||||
id="browser-detector"
|
||||
src="/static/scripts/browserDetector.js"
|
||||
/>
|
||||
<Script id="docspace-config">
|
||||
{`
|
||||
console.log("It's DocEditor INIT");
|
||||
fetch("/static/scripts/config.json")
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error("HTTP error " + response.status);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((config) => {
|
||||
window.DocSpaceConfig = {
|
||||
...config,
|
||||
};
|
||||
|
||||
if (
|
||||
window.navigator.userAgent.includes("ZoomWebKit") ||
|
||||
window.navigator.userAgent.includes("ZoomApps")
|
||||
) {
|
||||
window.DocSpaceConfig.editor = {
|
||||
openOnNewPage: false,
|
||||
requestClose: true,
|
||||
};
|
||||
}
|
||||
|
||||
//console.log({ DocSpaceConfig: window.DocSpaceConfig });
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
window.DocSpaceConfig = {
|
||||
errorOnLoad: e,
|
||||
};
|
||||
});
|
||||
`}
|
||||
</Script>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ const CreateFileError = ({
|
||||
const { i18n } = useI18N({ settings, user });
|
||||
const { currentDeviceType } = useDeviceType();
|
||||
const { logoUrls } = useWhiteLabel();
|
||||
const { theme } = useTheme({ user });
|
||||
const { theme } = useTheme({ user, i18n });
|
||||
|
||||
const t = i18n.t ? i18n.t.bind(i18n) : null;
|
||||
const message = error.message ?? error ?? "";
|
||||
|
@ -96,7 +96,7 @@ const Root = ({
|
||||
editorUrl: documentserverUrl,
|
||||
t,
|
||||
});
|
||||
const { theme, currentColorTheme } = useTheme({ user });
|
||||
const { theme, currentColorTheme } = useTheme({ user, i18n });
|
||||
const { currentDeviceType } = useDeviceType();
|
||||
const { logoUrls } = useWhiteLabel();
|
||||
const { isShowDeepLink, setIsShowDeepLink } = useDeepLink({
|
||||
|
@ -25,6 +25,7 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
import React from "react";
|
||||
import { i18n } from "i18next";
|
||||
|
||||
import { Base, Dark, TColorScheme, TTheme } from "@docspace/shared/themes";
|
||||
import { getSystemTheme } from "@docspace/shared/utils";
|
||||
@ -36,9 +37,10 @@ const SYSTEM_THEME = getSystemTheme();
|
||||
|
||||
export interface UseThemeProps {
|
||||
user?: TUser;
|
||||
i18n?: i18n;
|
||||
}
|
||||
|
||||
const useTheme = ({ user }: UseThemeProps) => {
|
||||
const useTheme = ({ user, i18n = {} }: UseThemeProps) => {
|
||||
const [currentColorTheme, setCurrentColorTheme] =
|
||||
React.useState<TColorScheme>({} as TColorScheme);
|
||||
|
||||
@ -65,6 +67,7 @@ const useTheme = ({ user }: UseThemeProps) => {
|
||||
const getUserTheme = React.useCallback(() => {
|
||||
if (!user?.theme) return;
|
||||
let theme = user.theme;
|
||||
const interfaceDirection = i18n.dir ? i18n.dir() : "ltr";
|
||||
|
||||
if (user.theme === ThemeKeys.SystemStr) theme = SYSTEM_THEME;
|
||||
|
||||
@ -72,7 +75,7 @@ const useTheme = ({ user }: UseThemeProps) => {
|
||||
setTheme({
|
||||
...Base,
|
||||
currentColorScheme: currentColorTheme,
|
||||
interfaceDirection: "ltr",
|
||||
interfaceDirection,
|
||||
});
|
||||
|
||||
return;
|
||||
@ -81,9 +84,9 @@ const useTheme = ({ user }: UseThemeProps) => {
|
||||
setTheme({
|
||||
...Dark,
|
||||
currentColorScheme: currentColorTheme,
|
||||
interfaceDirection: "ltr",
|
||||
interfaceDirection,
|
||||
});
|
||||
}, [currentColorTheme, user?.theme]);
|
||||
}, [currentColorTheme, user?.theme, i18n.dir]);
|
||||
|
||||
React.useEffect(() => {
|
||||
getCurrentColorTheme();
|
||||
@ -97,4 +100,3 @@ const useTheme = ({ user }: UseThemeProps) => {
|
||||
};
|
||||
|
||||
export default useTheme;
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
import { headers } from "next/headers";
|
||||
|
||||
import { getLtrLanguageForEditor } from "@docspace/shared/utils/common";
|
||||
import { TenantStatus, EditorConfigErrorType } from "@docspace/shared/enums";
|
||||
import type { TDocServiceLocation } from "@docspace/shared/api/files/types";
|
||||
|
||||
@ -382,13 +381,6 @@ export async function getData(
|
||||
}
|
||||
}
|
||||
|
||||
// needed to reset rtl language in Editor
|
||||
response.config.editorConfig.lang = getLtrLanguageForEditor(
|
||||
response.user?.cultureName,
|
||||
response.settings.culture,
|
||||
true,
|
||||
);
|
||||
|
||||
if (response.settings.tenantStatus === TenantStatus.PortalRestore) {
|
||||
response.error = { message: "restore-backup" };
|
||||
}
|
||||
@ -451,4 +443,3 @@ export async function getData(
|
||||
return { error };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,19 +30,15 @@ import { initReactI18next } from "react-i18next";
|
||||
|
||||
import config from "../../../../../buildtools/config/appsettings.json";
|
||||
|
||||
import { getLtrLanguageForEditor } from "@docspace/shared/utils/common";
|
||||
|
||||
import { translations } from "./autoGeneratedTranslations";
|
||||
|
||||
export const getI18NInstance = (lng: string, portalLng: string) => {
|
||||
if (typeof window === "undefined") return;
|
||||
|
||||
const currentLng = getLtrLanguageForEditor(lng, portalLng, true);
|
||||
|
||||
// const cultures = config.web.cultures.split(",");
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
lng: currentLng,
|
||||
lng,
|
||||
fallbackLng: "en",
|
||||
load: "currentOnly",
|
||||
|
||||
@ -72,4 +68,3 @@ export const getI18NInstance = (lng: string, portalLng: string) => {
|
||||
|
||||
return i18n;
|
||||
};
|
||||
|
||||
|
@ -116,6 +116,9 @@ const template: Template = (
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
window.DocSpaceConfig = {
|
||||
errorOnLoad: e,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
`;
|
||||
|
@ -63,6 +63,9 @@
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
window.DocSpaceConfig = {
|
||||
errorOnLoad: e,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -90,6 +90,7 @@ const Toast = (props: ToastProps) => {
|
||||
|
||||
const element = (
|
||||
<StyledToastContainer
|
||||
containerId="toast-container"
|
||||
className={className}
|
||||
draggable
|
||||
position="top-right"
|
||||
|
@ -132,6 +132,7 @@ const notify = (
|
||||
closeButton: withCross && <CloseButton />,
|
||||
autoClose: timeout === 0 ? false : timeout < 750 ? 5000 : timeout || 5000,
|
||||
position: centerPosition ? "top-center" : undefined,
|
||||
containerId: "toast-container",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
@ -1016,7 +1016,8 @@ class SettingsStore {
|
||||
|
||||
get isFrame() {
|
||||
const isFrame = this.frameConfig?.name === window.name;
|
||||
window.DocSpaceConfig.isFrame = isFrame;
|
||||
|
||||
if (window.DocSpaceConfig) window.DocSpaceConfig.isFrame = isFrame;
|
||||
|
||||
console.log("Table log isFrame", isFrame);
|
||||
return isFrame;
|
||||
|
@ -99,7 +99,7 @@ declare global {
|
||||
DocSpace: {
|
||||
navigate: (path: string, state?: { [key: string]: unknown }) => void;
|
||||
};
|
||||
DocSpaceConfig: {
|
||||
DocSpaceConfig?: {
|
||||
pdfViewerUrl: string;
|
||||
wrongPortalNameUrl?: string;
|
||||
api: {
|
||||
@ -146,6 +146,7 @@ declare global {
|
||||
toDataURL: () => string;
|
||||
};
|
||||
dataLayer?: Record<string, unknown>[];
|
||||
errorOnLoad?: Error;
|
||||
}
|
||||
|
||||
export type ContextMenuModel =
|
||||
|
12
yarn.lock
12
yarn.lock
@ -3163,7 +3163,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@docspace/doceditor@workspace:packages/doceditor"
|
||||
dependencies:
|
||||
"@onlyoffice/document-editor-react": "file:./onlyoffice-document-editor-react-v1.4.1.tgz"
|
||||
"@onlyoffice/document-editor-react": "npm:^1.5.0"
|
||||
"@svgr/webpack": "npm:^8.1.0"
|
||||
"@types/node": "npm:^20"
|
||||
"@types/react": "npm:^18"
|
||||
@ -5224,15 +5224,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@onlyoffice/document-editor-react@file:./onlyoffice-document-editor-react-v1.4.1.tgz::locator=%40docspace%2Fdoceditor%40workspace%3Apackages%2Fdoceditor":
|
||||
version: 1.4.1
|
||||
resolution: "@onlyoffice/document-editor-react@file:./onlyoffice-document-editor-react-v1.4.1.tgz#./onlyoffice-document-editor-react-v1.4.1.tgz::hash=e29463&locator=%40docspace%2Fdoceditor%40workspace%3Apackages%2Fdoceditor"
|
||||
"@onlyoffice/document-editor-react@npm:^1.5.0":
|
||||
version: 1.5.0
|
||||
resolution: "@onlyoffice/document-editor-react@npm:1.5.0"
|
||||
dependencies:
|
||||
lodash: "npm:^4.17.21"
|
||||
lodash: "npm:4.17.21"
|
||||
peerDependencies:
|
||||
react: ^16.9.0 || ^17 || ^18
|
||||
react-dom: ^16.9.0 || ^17 || ^18
|
||||
checksum: ec4713519891b41353b01190c96d023677301c3b086b015a6ee67ac41acb104aa28e02a1d471b679f847f1ba58b94f0a9bdad4b3203e3368b3ec16f4add8edc6
|
||||
checksum: 2214ba9982f70c7facbcd2b778bfaf92d90ff4fd71dd36697d2ac7f15b9a5d271872954a6fac84db04c16e9976ae20c7196586bef34addde7b65ce19e8a379b4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user