@activecollab/components 2.0.492 → 2.0.494
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/EmptySlate/EmptySlate.js +28 -3
- package/dist/cjs/components/EmptySlate/EmptySlate.js.map +1 -1
- package/dist/cjs/components/EmptySlate/EmptySlate.styles.js +4 -1
- package/dist/cjs/components/EmptySlate/EmptySlate.styles.js.map +1 -1
- package/dist/cjs/presentation/selfHostedRedesign/parts.js +315 -55
- package/dist/cjs/presentation/selfHostedRedesign/parts.js.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.d.ts.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.js +16 -2
- package/dist/esm/components/EmptySlate/EmptySlate.js.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.styles.d.ts +3 -1
- package/dist/esm/components/EmptySlate/EmptySlate.styles.d.ts.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.styles.js +4 -1
- package/dist/esm/components/EmptySlate/EmptySlate.styles.js.map +1 -1
- package/dist/esm/presentation/selfHostedRedesign/parts.d.ts +50 -3
- package/dist/esm/presentation/selfHostedRedesign/parts.d.ts.map +1 -1
- package/dist/esm/presentation/selfHostedRedesign/parts.js +297 -52
- package/dist/esm/presentation/selfHostedRedesign/parts.js.map +1 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"EmptySlate.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,cAAc,EAKf,MAAM,OAAO,CAAC;AAWf,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAKD,eAAO,MAAM,UAAU;0DAOpB,eAAe;;;;;;;;;CAmCjB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["title", "description", "src", "alt", "children"];
|
|
4
|
-
import React from "react";
|
|
4
|
+
import React, { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
5
5
|
import { Container, Description, SubContainer, Title, StyledImg } from "./EmptySlate.styles";
|
|
6
6
|
import { EmptySlateFooter } from "./EmptySlateFooter";
|
|
7
|
+
const isAlreadyLoaded = image => !!image && image.complete && image.naturalWidth > 0;
|
|
7
8
|
export const EmptySlate = _ref => {
|
|
8
9
|
let title = _ref.title,
|
|
9
10
|
description = _ref.description,
|
|
@@ -11,11 +12,24 @@ export const EmptySlate = _ref => {
|
|
|
11
12
|
alt = _ref.alt,
|
|
12
13
|
children = _ref.children,
|
|
13
14
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
|
+
const imageRef = useRef(null);
|
|
16
|
+
const _useState = useState(),
|
|
17
|
+
loadedSrc = _useState[0],
|
|
18
|
+
setLoadedSrc = _useState[1];
|
|
19
|
+
const markLoaded = useCallback(() => setLoadedSrc(src), [src]);
|
|
20
|
+
useLayoutEffect(() => {
|
|
21
|
+
if (isAlreadyLoaded(imageRef.current)) {
|
|
22
|
+
markLoaded();
|
|
23
|
+
}
|
|
24
|
+
}, [markLoaded]);
|
|
14
25
|
return /*#__PURE__*/React.createElement(Container, _extends({}, rest, {
|
|
15
26
|
role: "status"
|
|
16
27
|
}), /*#__PURE__*/React.createElement(StyledImg, {
|
|
28
|
+
ref: imageRef,
|
|
17
29
|
src: src,
|
|
18
|
-
alt: alt
|
|
30
|
+
alt: alt,
|
|
31
|
+
onLoad: markLoaded,
|
|
32
|
+
$loaded: loadedSrc === src
|
|
19
33
|
}), /*#__PURE__*/React.createElement(SubContainer, null, /*#__PURE__*/React.createElement(Title, {
|
|
20
34
|
weight: "light",
|
|
21
35
|
variant: "Title 1"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.js","names":["React","Container","Description","SubContainer","Title","StyledImg","EmptySlateFooter","EmptySlate","_ref","title","description","src","alt","children","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","role","weight","variant","color","Footer","displayName"],"sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"EmptySlate.js","names":["React","useCallback","useLayoutEffect","useRef","useState","Container","Description","SubContainer","Title","StyledImg","EmptySlateFooter","isAlreadyLoaded","image","complete","naturalWidth","EmptySlate","_ref","title","description","src","alt","children","rest","_objectWithoutPropertiesLoose","_excluded","imageRef","_useState","loadedSrc","setLoadedSrc","markLoaded","current","createElement","_extends","role","ref","onLoad","$loaded","weight","variant","color","Footer","displayName"],"sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"sourcesContent":["import React, {\n HTMLAttributes,\n useCallback,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport {\n Container,\n Description,\n SubContainer,\n Title,\n StyledImg,\n} from \"./EmptySlate.styles\";\nimport { EmptySlateFooter } from \"./EmptySlateFooter\";\n\nexport interface EmptySlateProps extends HTMLAttributes<HTMLDivElement> {\n src: string;\n alt: string;\n title: string;\n description?: string;\n}\n\nconst isAlreadyLoaded = (image: HTMLImageElement | null) =>\n !!image && image.complete && image.naturalWidth > 0;\n\nexport const EmptySlate = ({\n title,\n description,\n src,\n alt,\n children,\n ...rest\n}: EmptySlateProps) => {\n const imageRef = useRef<HTMLImageElement>(null);\n const [loadedSrc, setLoadedSrc] = useState<string>();\n\n const markLoaded = useCallback(() => setLoadedSrc(src), [src]);\n\n useLayoutEffect(() => {\n if (isAlreadyLoaded(imageRef.current)) {\n markLoaded();\n }\n }, [markLoaded]);\n\n return (\n <Container {...rest} role=\"status\">\n <StyledImg\n ref={imageRef}\n src={src}\n alt={alt}\n onLoad={markLoaded}\n $loaded={loadedSrc === src}\n />\n <SubContainer>\n <Title weight=\"light\" variant=\"Title 1\">\n {title}\n </Title>\n {description && (\n <Description color=\"tertiary\" variant=\"Body 1\">\n {description}\n </Description>\n )}\n\n {children}\n </SubContainer>\n </Container>\n );\n};\n\nEmptySlate.Footer = EmptySlateFooter;\n\nEmptySlate.displayName = \"EmptySlate\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAEVC,WAAW,EACXC,eAAe,EACfC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SACEC,SAAS,EACTC,WAAW,EACXC,YAAY,EACZC,KAAK,EACLC,SAAS,QACJ,qBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,oBAAoB;AASrD,MAAMC,eAAe,GAAIC,KAA8B,IACrD,CAAC,CAACA,KAAK,IAAIA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,YAAY,GAAG,CAAC;AAErD,OAAO,MAAMC,UAAU,GAAGC,IAAA,IAOH;EAAA,IANrBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,GAAG,GAAAH,IAAA,CAAHG,GAAG;IACHC,GAAG,GAAAJ,IAAA,CAAHI,GAAG;IACHC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACLC,IAAI,GAAAC,6BAAA,CAAAP,IAAA,EAAAQ,SAAA;EAEP,MAAMC,QAAQ,GAAGtB,MAAM,CAAmB,IAAI,CAAC;EAC/C,MAAAuB,SAAA,GAAkCtB,QAAQ,CAAS,CAAC;IAA7CuB,SAAS,GAAAD,SAAA;IAAEE,YAAY,GAAAF,SAAA;EAE9B,MAAMG,UAAU,GAAG5B,WAAW,CAAC,MAAM2B,YAAY,CAACT,GAAG,CAAC,EAAE,CAACA,GAAG,CAAC,CAAC;EAE9DjB,eAAe,CAAC,MAAM;IACpB,IAAIS,eAAe,CAACc,QAAQ,CAACK,OAAO,CAAC,EAAE;MACrCD,UAAU,CAAC,CAAC;IACd;EACF,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;EAEhB,oBACE7B,KAAA,CAAA+B,aAAA,CAAC1B,SAAS,EAAA2B,QAAA,KAAKV,IAAI;IAAEW,IAAI,EAAC;EAAQ,iBAChCjC,KAAA,CAAA+B,aAAA,CAACtB,SAAS;IACRyB,GAAG,EAAET,QAAS;IACdN,GAAG,EAAEA,GAAI;IACTC,GAAG,EAAEA,GAAI;IACTe,MAAM,EAAEN,UAAW;IACnBO,OAAO,EAAET,SAAS,KAAKR;EAAI,CAC5B,CAAC,eACFnB,KAAA,CAAA+B,aAAA,CAACxB,YAAY,qBACXP,KAAA,CAAA+B,aAAA,CAACvB,KAAK;IAAC6B,MAAM,EAAC,OAAO;IAACC,OAAO,EAAC;EAAS,GACpCrB,KACI,CAAC,EACPC,WAAW,iBACVlB,KAAA,CAAA+B,aAAA,CAACzB,WAAW;IAACiC,KAAK,EAAC,UAAU;IAACD,OAAO,EAAC;EAAQ,GAC3CpB,WACU,CACd,EAEAG,QACW,CACL,CAAC;AAEhB,CAAC;AAEDN,UAAU,CAACyB,MAAM,GAAG9B,gBAAgB;AAEpCK,UAAU,CAAC0B,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const SubContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const StyledImg: import("styled-components").StyledComponent<"img", any, {
|
|
3
|
+
export declare const StyledImg: import("styled-components").StyledComponent<"img", any, {
|
|
4
|
+
$loaded: boolean;
|
|
5
|
+
}, never>;
|
|
4
6
|
export declare const Title: import("styled-components").StyledComponent<import("../Typography/Typography").TypographyComponent & {
|
|
5
7
|
displayName?: string;
|
|
6
8
|
}, any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,oEAWrB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAYxB,CAAC;AAEF,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"EmptySlate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,oEAWrB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAYxB,CAAC;AAEF,eAAO,MAAM,SAAS;aAAyB,OAAO;SAIrD,CAAC;AAEF,eAAO,MAAM,KAAK;;kBAOjB,CAAC;AAEF,eAAO,MAAM,WAAW;;kBAMvB,CAAC;AAEF,eAAO,MAAM,eAAe,oEAU3B,CAAC"}
|
|
@@ -12,7 +12,10 @@ export const SubContainer = styled.div.withConfig({
|
|
|
12
12
|
export const StyledImg = styled.img.withConfig({
|
|
13
13
|
displayName: "EmptySlatestyles__StyledImg",
|
|
14
14
|
componentId: "sc-jfbqky-2"
|
|
15
|
-
})(["width:280px;height:280px;"]
|
|
15
|
+
})(["width:280px;height:280px;visibility:", ";"], _ref => {
|
|
16
|
+
let $loaded = _ref.$loaded;
|
|
17
|
+
return $loaded ? "visible" : "hidden";
|
|
18
|
+
});
|
|
16
19
|
export const Title = styled(Typography).withConfig({
|
|
17
20
|
displayName: "EmptySlatestyles__Title",
|
|
18
21
|
componentId: "sc-jfbqky-3"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.styles.js","names":["styled","screen","Typography","Container","div","withConfig","displayName","componentId","lg","SubContainer","StyledImg","img","Title","Description","FooterContainer"],"sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { screen } from \"../BreakPoints\";\nimport { Typography } from \"../Typography/Typography\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 24px;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n\nexport const SubContainer = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n max-width: 400px;\n padding-left: 20px;\n padding-right: 20px;\n\n ${screen.lg} {\n align-items: flex-start;\n }\n`;\n\nexport const StyledImg = styled.img
|
|
1
|
+
{"version":3,"file":"EmptySlate.styles.js","names":["styled","screen","Typography","Container","div","withConfig","displayName","componentId","lg","SubContainer","StyledImg","img","_ref","$loaded","Title","Description","FooterContainer"],"sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { screen } from \"../BreakPoints\";\nimport { Typography } from \"../Typography/Typography\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 24px;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n\nexport const SubContainer = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n max-width: 400px;\n padding-left: 20px;\n padding-right: 20px;\n\n ${screen.lg} {\n align-items: flex-start;\n }\n`;\n\nexport const StyledImg = styled.img<{ $loaded: boolean }>`\n width: 280px;\n height: 280px;\n visibility: ${({ $loaded }) => ($loaded ? \"visible\" : \"hidden\")};\n`;\n\nexport const Title = styled(Typography)`\n margin-block-end: 8px;\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const Description = styled(Typography)`\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const FooterContainer = styled.div`\n margin-block-start: 24px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,UAAU,QAAQ,0BAA0B;AAErD,OAAO,MAAMC,SAAS,GAAGH,MAAM,CAACI,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0IAQ/BN,MAAM,CAACO,EAAE,CAGZ;AAED,OAAO,MAAMC,YAAY,GAAGT,MAAM,CAACI,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wKASlCN,MAAM,CAACO,EAAE,CAGZ;AAED,OAAO,MAAME,SAAS,GAAGV,MAAM,CAACW,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kDAGnBK,IAAA;EAAA,IAAGC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAAA,OAAQA,OAAO,GAAG,SAAS,GAAG,QAAQ;AAAA,CAAC,CAChE;AAED,OAAO,MAAMC,KAAK,GAAGd,MAAM,CAACE,UAAU,CAAC,CAAAG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,uEAInCN,MAAM,CAACO,EAAE,CAGZ;AAED,OAAO,MAAMO,WAAW,GAAGf,MAAM,CAACE,UAAU,CAAC,CAAAG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kDAGzCN,MAAM,CAACO,EAAE,CAGZ;AAED,OAAO,MAAMQ,eAAe,GAAGhB,MAAM,CAACI,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yHAOrCN,MAAM,CAACO,EAAE,CAGZ","ignoreList":[]}
|
|
@@ -39,6 +39,9 @@ export interface SystemStatus {
|
|
|
39
39
|
search_errors: string[];
|
|
40
40
|
pusher_is_ok: boolean;
|
|
41
41
|
pusher_errors: string[];
|
|
42
|
+
/** mirrors: no payload yet (task #462024, PNG and PDF export). */
|
|
43
|
+
rasterizer_is_ok: boolean;
|
|
44
|
+
rasterizer_errors: string[];
|
|
42
45
|
imap_is_available: boolean;
|
|
43
46
|
headers: {
|
|
44
47
|
"x-angie-applicationversion": string;
|
|
@@ -51,6 +54,9 @@ export interface SystemStatus {
|
|
|
51
54
|
*/
|
|
52
55
|
export declare const SEARCH_NOT_CONFIGURED_ERROR = "Search server is not configured";
|
|
53
56
|
export declare const PUSHER_NOT_CONFIGURED_ERROR = "Server for exchange of real-time updates is not configured.";
|
|
57
|
+
/** mirrors: no payload yet (task #462024). */
|
|
58
|
+
export declare const RASTERIZER_NOT_CONFIGURED_ERROR = "Path to rsvg-convert is not configured. Timeline and whiteboard export offer SVG only.";
|
|
59
|
+
export declare const rasterizerPathError: (path: string) => string;
|
|
54
60
|
export declare const STATUS_ERRORS: {
|
|
55
61
|
noImapCheck: string;
|
|
56
62
|
noEmailSent: string;
|
|
@@ -134,8 +140,42 @@ export interface CronInstructions {
|
|
|
134
140
|
hourly: string;
|
|
135
141
|
}
|
|
136
142
|
export declare const CRON_INSTRUCTIONS: CronInstructions;
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Where the path to rsvg-convert came from. The environment variable wins over
|
|
145
|
+
* the config.php constant, which wins over the value saved in this section.
|
|
146
|
+
* mirrors: no payload yet (task #462024).
|
|
147
|
+
*/
|
|
148
|
+
export type RasterizerPathSource = "env" | "config" | "db";
|
|
149
|
+
/** mirrors: no payload yet (GET /integrations/rasterizer, task #462024). */
|
|
150
|
+
export interface RasterizerIntegration {
|
|
151
|
+
librsvg_path: string | null;
|
|
152
|
+
librsvg_path_source: RasterizerPathSource | null;
|
|
153
|
+
}
|
|
154
|
+
export declare const RASTERIZER_NOT_CONFIGURED: RasterizerIntegration;
|
|
155
|
+
export declare const RASTERIZER_CONFIGURED: RasterizerIntegration;
|
|
156
|
+
/**
|
|
157
|
+
* mirrors: no payload yet (POST /integrations/rasterizer/test, task #462024).
|
|
158
|
+
* The server runs `<path> --version` and passes when the output starts with
|
|
159
|
+
* "rsvg-convert version".
|
|
160
|
+
*/
|
|
161
|
+
export interface RasterizerTestResult {
|
|
162
|
+
is_ok: boolean;
|
|
163
|
+
version: string | null;
|
|
164
|
+
exit_code: number | null;
|
|
165
|
+
output: string;
|
|
166
|
+
error: string | null;
|
|
167
|
+
}
|
|
168
|
+
export declare const rasterizerTestResponse: (path: string) => RasterizerTestResult;
|
|
169
|
+
export type RasterizerTestState = {
|
|
170
|
+
state: "idle";
|
|
171
|
+
} | {
|
|
172
|
+
state: "testing";
|
|
173
|
+
} | {
|
|
174
|
+
state: "failed";
|
|
175
|
+
result: RasterizerTestResult;
|
|
176
|
+
};
|
|
177
|
+
export type SectionId = "upgrade" | "email" | "search" | "pusher" | "cron" | "image-export" | "clean-up";
|
|
178
|
+
export type OpenDialog = "smtp" | "imap" | "search" | "pusher" | "cron" | "rasterizer" | null;
|
|
139
179
|
/** The starting state of one story. Every field defaults to the base mocks. */
|
|
140
180
|
export interface SelfHostedRedesignScreenProps {
|
|
141
181
|
/** The row that starts expanded (the section the story is about). */
|
|
@@ -150,9 +190,16 @@ export interface SelfHostedRedesignScreenProps {
|
|
|
150
190
|
search?: SearchIntegration;
|
|
151
191
|
pusher?: PusherIntegration;
|
|
152
192
|
cron?: CronInstructions;
|
|
193
|
+
rasterizer?: RasterizerIntegration;
|
|
194
|
+
/** Starting path in the rasterizer dialog field. */
|
|
195
|
+
rasterizerPath?: string;
|
|
196
|
+
/** Starting test state of the rasterizer dialog. */
|
|
197
|
+
rasterizerTest?: RasterizerTestState;
|
|
198
|
+
/** A success toast that starts visible and stays until dismissed. */
|
|
199
|
+
toast?: string;
|
|
153
200
|
oldVersions?: OldVersions;
|
|
154
201
|
/** Start in the "Processing..." state of Remove; it does not finish. */
|
|
155
202
|
removing?: boolean;
|
|
156
203
|
}
|
|
157
|
-
export declare const SelfHostedRedesignScreen: ({ expanded, dialog: initialDialog, confirmDisconnect, status: initialStatus, check, email: initialEmail, search: initialSearch, pusher: initialPusher, cron, oldVersions: initialOldVersions, removing: initialRemoving, }: SelfHostedRedesignScreenProps) => ReactElement;
|
|
204
|
+
export declare const SelfHostedRedesignScreen: ({ expanded, dialog: initialDialog, confirmDisconnect, status: initialStatus, check, email: initialEmail, search: initialSearch, pusher: initialPusher, cron, rasterizer: initialRasterizer, rasterizerPath, rasterizerTest, toast: initialToast, oldVersions: initialOldVersions, removing: initialRemoving, }: SelfHostedRedesignScreenProps) => ReactElement;
|
|
158
205
|
//# sourceMappingURL=parts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../../src/presentation/selfHostedRedesign/parts.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAc,EAAE,YAAY,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../../src/presentation/selfHostedRedesign/parts.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAc,EAAE,YAAY,EAAkC,MAAM,OAAO,CAAC;AAwC5E;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,kEAAkE;IAClE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAA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qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qCAAqC;IACrC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,wBAAwB,GAAI,gTAgBtC,6BAA6B,KAAG,YA+SlC,CAAC"}
|
|
@@ -46,10 +46,11 @@ import { Select } from "../../components/Select";
|
|
|
46
46
|
import { SelectTrigger } from "../../components/SelectTrigger";
|
|
47
47
|
import { Stack } from "../../components/Stack";
|
|
48
48
|
import { TitledText } from "../../components/TitledText";
|
|
49
|
+
import { ToastMessage } from "../../components/ToastMessage";
|
|
49
50
|
import { Toggle } from "../../components/Toggle";
|
|
50
51
|
import { Tooltip } from "../../components/Tooltip";
|
|
51
52
|
import { Body1, Body2, Caption1 } from "../../components/Typography";
|
|
52
|
-
import { CommandBlock, EmailLogLink, ExpandableSettingRow, okStatus, SelfHostedSettingsDialog, SM } from "../shared";
|
|
53
|
+
import { CommandBlock, EmailLogLink, ExpandableSettingRow, okStatus, SelfHostedSettingsDialog, SM, ToastHost } from "../shared";
|
|
53
54
|
|
|
54
55
|
/* ------------------------------------------------------------------ */
|
|
55
56
|
/* Mock payloads — one per endpoint the screen reads. */
|
|
@@ -67,6 +68,9 @@ import { CommandBlock, EmailLogLink, ExpandableSettingRow, okStatus, SelfHostedS
|
|
|
67
68
|
*/
|
|
68
69
|
export const SEARCH_NOT_CONFIGURED_ERROR = "Search server is not configured";
|
|
69
70
|
export const PUSHER_NOT_CONFIGURED_ERROR = "Server for exchange of real-time updates is not configured.";
|
|
71
|
+
/** mirrors: no payload yet (task #462024). */
|
|
72
|
+
export const RASTERIZER_NOT_CONFIGURED_ERROR = "Path to rsvg-convert is not configured. Timeline and whiteboard export offer SVG only.";
|
|
73
|
+
export const rasterizerPathError = path => path + " is not an executable file. Timeline and whiteboard export offer SVG only.";
|
|
70
74
|
export const STATUS_ERRORS = {
|
|
71
75
|
noImapCheck: "No incoming mail checks has been performed in the past hour",
|
|
72
76
|
noEmailSent: "No email sent since last sending attempt",
|
|
@@ -84,6 +88,8 @@ export const SYSTEM_STATUS = {
|
|
|
84
88
|
search_errors: [SEARCH_NOT_CONFIGURED_ERROR],
|
|
85
89
|
pusher_is_ok: true,
|
|
86
90
|
pusher_errors: [],
|
|
91
|
+
rasterizer_is_ok: false,
|
|
92
|
+
rasterizer_errors: [RASTERIZER_NOT_CONFIGURED_ERROR],
|
|
87
93
|
imap_is_available: true,
|
|
88
94
|
headers: {
|
|
89
95
|
"x-angie-applicationversion": "8.2.17"
|
|
@@ -204,6 +210,64 @@ export const CRON_INSTRUCTIONS = {
|
|
|
204
210
|
hourly: "/path/to/your/php " + CRON_PATH + "/run_every_hour.php"
|
|
205
211
|
};
|
|
206
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Where the path to rsvg-convert came from. The environment variable wins over
|
|
215
|
+
* the config.php constant, which wins over the value saved in this section.
|
|
216
|
+
* mirrors: no payload yet (task #462024).
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
/** mirrors: no payload yet (GET /integrations/rasterizer, task #462024). */
|
|
220
|
+
|
|
221
|
+
export const RASTERIZER_NOT_CONFIGURED = {
|
|
222
|
+
librsvg_path: null,
|
|
223
|
+
librsvg_path_source: null
|
|
224
|
+
};
|
|
225
|
+
export const RASTERIZER_CONFIGURED = {
|
|
226
|
+
librsvg_path: "/usr/bin/rsvg-convert",
|
|
227
|
+
librsvg_path_source: "db"
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* mirrors: no payload yet (POST /integrations/rasterizer/test, task #462024).
|
|
232
|
+
* The server runs `<path> --version` and passes when the output starts with
|
|
233
|
+
* "rsvg-convert version".
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
/** Canned server answers for the mock. A path not listed here fails. */
|
|
237
|
+
const RASTERIZER_TEST_RESPONSES = {
|
|
238
|
+
"/usr/bin/rsvg-convert": {
|
|
239
|
+
is_ok: true,
|
|
240
|
+
version: "rsvg-convert version 2.58.0",
|
|
241
|
+
exit_code: 0,
|
|
242
|
+
output: "rsvg-convert version 2.58.0",
|
|
243
|
+
error: null
|
|
244
|
+
},
|
|
245
|
+
"/usr/local/bin/rsvg-convert": {
|
|
246
|
+
is_ok: true,
|
|
247
|
+
version: "rsvg-convert version 2.59.1",
|
|
248
|
+
exit_code: 0,
|
|
249
|
+
output: "rsvg-convert version 2.59.1",
|
|
250
|
+
error: null
|
|
251
|
+
},
|
|
252
|
+
"/usr/bin/convert": {
|
|
253
|
+
is_ok: false,
|
|
254
|
+
version: null,
|
|
255
|
+
exit_code: 0,
|
|
256
|
+
output: "Version: ImageMagick 6.9.12-98 Q16 x86_64 https://imagemagick.org",
|
|
257
|
+
error: 'The command ran, but it is not rsvg-convert. Its output does not start with "rsvg-convert version".'
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
export const rasterizerTestResponse = path => {
|
|
261
|
+
var _RASTERIZER_TEST_RESP;
|
|
262
|
+
return (_RASTERIZER_TEST_RESP = RASTERIZER_TEST_RESPONSES[path]) != null ? _RASTERIZER_TEST_RESP : {
|
|
263
|
+
is_ok: false,
|
|
264
|
+
version: null,
|
|
265
|
+
exit_code: null,
|
|
266
|
+
output: "",
|
|
267
|
+
error: path + " does not exist or is not executable."
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
|
|
207
271
|
/* ------------------------------------------------------------------ */
|
|
208
272
|
/* Render-time formatting (never precomputed into the payload). */
|
|
209
273
|
/* ------------------------------------------------------------------ */
|
|
@@ -902,6 +966,143 @@ const CronDialog = _ref12 => {
|
|
|
902
966
|
}, /*#__PURE__*/React.createElement(Body2, null, "Execute this command on the server and observe the command output:"), /*#__PURE__*/React.createElement(CommandBlock, null, "crontab -l"), /*#__PURE__*/React.createElement(Body2, null, "You should see the jobs listed in the output. If that's not the case, you may need to contact your system administrator to help you out."))))));
|
|
903
967
|
};
|
|
904
968
|
|
|
969
|
+
/* ------------------------------------------------------------------ */
|
|
970
|
+
/* PNG and PDF Export (rsvg-convert path) */
|
|
971
|
+
/* ------------------------------------------------------------------ */
|
|
972
|
+
|
|
973
|
+
/** How long the mock test takes, so the Testing state is visible. */
|
|
974
|
+
const RASTERIZER_TEST_DELAY_MS = 1200;
|
|
975
|
+
const PathInput = styled.div.withConfig({
|
|
976
|
+
displayName: "parts__PathInput",
|
|
977
|
+
componentId: "sc-1h0u3no-3"
|
|
978
|
+
})([".c-input-wrapper{width:100%;}"]);
|
|
979
|
+
const RasterizerDialog = _ref13 => {
|
|
980
|
+
var _ref14;
|
|
981
|
+
let open = _ref13.open,
|
|
982
|
+
data = _ref13.data,
|
|
983
|
+
defaultPath = _ref13.defaultPath,
|
|
984
|
+
_ref13$defaultTest = _ref13.defaultTest,
|
|
985
|
+
defaultTest = _ref13$defaultTest === void 0 ? {
|
|
986
|
+
state: "idle"
|
|
987
|
+
} : _ref13$defaultTest,
|
|
988
|
+
onClose = _ref13.onClose,
|
|
989
|
+
onSave = _ref13.onSave;
|
|
990
|
+
const _useState0 = useState((_ref14 = defaultPath != null ? defaultPath : data.librsvg_path) != null ? _ref14 : ""),
|
|
991
|
+
path = _useState0[0],
|
|
992
|
+
setPath = _useState0[1];
|
|
993
|
+
const _useState1 = useState(defaultTest),
|
|
994
|
+
test = _useState1[0],
|
|
995
|
+
setTest = _useState1[1];
|
|
996
|
+
const _useState10 = useState(defaultTest.state === "testing"),
|
|
997
|
+
pinned = _useState10[0];
|
|
998
|
+
useEffect(() => {
|
|
999
|
+
if (test.state !== "testing" || pinned) {
|
|
1000
|
+
return undefined;
|
|
1001
|
+
}
|
|
1002
|
+
const timer = window.setTimeout(() => {
|
|
1003
|
+
const result = rasterizerTestResponse(path.trim());
|
|
1004
|
+
if (result.is_ok) {
|
|
1005
|
+
setTest({
|
|
1006
|
+
state: "idle"
|
|
1007
|
+
});
|
|
1008
|
+
onSave(path.trim(), result);
|
|
1009
|
+
} else {
|
|
1010
|
+
setTest({
|
|
1011
|
+
state: "failed",
|
|
1012
|
+
result
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
}, RASTERIZER_TEST_DELAY_MS);
|
|
1016
|
+
return () => window.clearTimeout(timer);
|
|
1017
|
+
}, [test, pinned, path, onSave]);
|
|
1018
|
+
const save = () => {
|
|
1019
|
+
if (path.trim() === "") {
|
|
1020
|
+
onSave(null, null);
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
1023
|
+
setTest({
|
|
1024
|
+
state: "testing"
|
|
1025
|
+
});
|
|
1026
|
+
};
|
|
1027
|
+
const testing = test.state === "testing";
|
|
1028
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
1029
|
+
open: open,
|
|
1030
|
+
onClose: onClose,
|
|
1031
|
+
size: "l",
|
|
1032
|
+
enableBackgroundClick: true
|
|
1033
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
1034
|
+
onClose: onClose
|
|
1035
|
+
}, "PNG and PDF Export"), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, /*#__PURE__*/React.createElement(Stack, {
|
|
1036
|
+
space: "md"
|
|
1037
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "ActiveCollab uses rsvg-convert, part of librsvg, to turn timeline and whiteboard exports into PNG and PDF files. Without it, export offers SVG only.", " ", /*#__PURE__*/React.createElement(InlineLink, {
|
|
1038
|
+
href: "#",
|
|
1039
|
+
target: "_blank",
|
|
1040
|
+
rel: "noreferrer"
|
|
1041
|
+
}, "Learn more"), ".")), /*#__PURE__*/React.createElement(PathInput, null, /*#__PURE__*/React.createElement(DialogFormField, {
|
|
1042
|
+
id: "librsvg_path",
|
|
1043
|
+
label: "Path to rsvg-convert",
|
|
1044
|
+
hint: "When you save, ActiveCollab runs this command with --version to test it. Leave the field empty to turn PNG and PDF export off."
|
|
1045
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
1046
|
+
id: "librsvg_path",
|
|
1047
|
+
placeholder: "/usr/bin/rsvg-convert",
|
|
1048
|
+
value: path,
|
|
1049
|
+
disabled: testing,
|
|
1050
|
+
invalid: test.state === "failed",
|
|
1051
|
+
onChange: event => {
|
|
1052
|
+
setPath(event.target.value);
|
|
1053
|
+
if (test.state === "failed") {
|
|
1054
|
+
setTest({
|
|
1055
|
+
state: "idle"
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}))), test.state === "failed" ? /*#__PURE__*/React.createElement(InfoBox, {
|
|
1060
|
+
type: "warning",
|
|
1061
|
+
title: "Test failed. The path is not saved."
|
|
1062
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
1063
|
+
space: "sm"
|
|
1064
|
+
}, /*#__PURE__*/React.createElement(Body2, null, test.result.error), test.result.output ? /*#__PURE__*/React.createElement(CommandBlock, null, test.result.output) : null)) : null)), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(Button, {
|
|
1065
|
+
variant: "primary",
|
|
1066
|
+
onClick: save,
|
|
1067
|
+
disabled: testing,
|
|
1068
|
+
endAdornment: testing ? /*#__PURE__*/React.createElement(SpinnerLoader, {
|
|
1069
|
+
radius: 7
|
|
1070
|
+
}) : undefined
|
|
1071
|
+
}, testing ? "Testing..." : "Save"), /*#__PURE__*/React.createElement(Button, {
|
|
1072
|
+
variant: "secondary",
|
|
1073
|
+
onClick: onClose
|
|
1074
|
+
}, "Cancel")));
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
/** "Set by …" text for a path the section cannot change. */
|
|
1078
|
+
const PATH_SOURCE_NOTE = {
|
|
1079
|
+
env: "Set by the ACTIVECOLLAB_LIBRSVG_PATH environment variable",
|
|
1080
|
+
config: "Set by LIBRSVG_PATH in config/config.php",
|
|
1081
|
+
db: null
|
|
1082
|
+
};
|
|
1083
|
+
const RasterizerSummary = _ref15 => {
|
|
1084
|
+
let data = _ref15.data,
|
|
1085
|
+
errors = _ref15.errors,
|
|
1086
|
+
onEdit = _ref15.onEdit;
|
|
1087
|
+
const source = data.librsvg_path_source;
|
|
1088
|
+
const note = source ? PATH_SOURCE_NOTE[source] : null;
|
|
1089
|
+
const editable = source === null || source === "db";
|
|
1090
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
1091
|
+
space: "sm"
|
|
1092
|
+
}, /*#__PURE__*/React.createElement(SummaryField, {
|
|
1093
|
+
label: "Status",
|
|
1094
|
+
alert: errors.length > 0,
|
|
1095
|
+
value: errors.length > 0 ? errors.join(",\n") : "Configured and working properly. Export offers SVG, PNG and PDF.",
|
|
1096
|
+
action: editable ? /*#__PURE__*/React.createElement(EditButton, {
|
|
1097
|
+
tooltip: "Set path to rsvg-convert",
|
|
1098
|
+
onClick: onEdit
|
|
1099
|
+
}) : null
|
|
1100
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1101
|
+
label: "Path",
|
|
1102
|
+
value: data.librsvg_path ? [data.librsvg_path, note].filter(Boolean).join("\n") : "Not configured"
|
|
1103
|
+
}));
|
|
1104
|
+
};
|
|
1105
|
+
|
|
905
1106
|
/* ------------------------------------------------------------------ */
|
|
906
1107
|
/* Row bodies */
|
|
907
1108
|
/* ------------------------------------------------------------------ */
|
|
@@ -917,8 +1118,8 @@ const formatDay = unixSeconds => new Date(unixSeconds * 1000).toLocaleDateString
|
|
|
917
1118
|
});
|
|
918
1119
|
|
|
919
1120
|
/** SelfHostedVersion.js, expired branch: the Renew Subscription block. */
|
|
920
|
-
const RenewBody =
|
|
921
|
-
let check =
|
|
1121
|
+
const RenewBody = _ref16 => {
|
|
1122
|
+
let check = _ref16.check;
|
|
922
1123
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
923
1124
|
space: "md",
|
|
924
1125
|
align: "start"
|
|
@@ -939,11 +1140,11 @@ const VersionBody = () => /*#__PURE__*/React.createElement(Stack, {
|
|
|
939
1140
|
}, /*#__PURE__*/React.createElement(Body2, null, "1. Login to your server via SSH,"), /*#__PURE__*/React.createElement(Body2, null, "2. Navigate to directory where ActiveCollab is installed,"), /*#__PURE__*/React.createElement(Stack, {
|
|
940
1141
|
space: "xs"
|
|
941
1142
|
}, /*#__PURE__*/React.createElement(Body2, null, "3. Run this command:"), /*#__PURE__*/React.createElement(CommandBlock, null, "php tasks/activecollab-cli.php upgrade")));
|
|
942
|
-
const OldVersionsSummary =
|
|
943
|
-
let data =
|
|
944
|
-
currentVersion =
|
|
945
|
-
removing =
|
|
946
|
-
onRemove =
|
|
1143
|
+
const OldVersionsSummary = _ref17 => {
|
|
1144
|
+
let data = _ref17.data,
|
|
1145
|
+
currentVersion = _ref17.currentVersion,
|
|
1146
|
+
removing = _ref17.removing,
|
|
1147
|
+
onRemove = _ref17.onRemove;
|
|
947
1148
|
const hasErrors = data.versions_errors.length > 0;
|
|
948
1149
|
let action = null;
|
|
949
1150
|
if (removing) {
|
|
@@ -975,49 +1176,60 @@ const OldVersionsSummary = _ref14 => {
|
|
|
975
1176
|
|
|
976
1177
|
/** The starting state of one story. Every field defaults to the base mocks. */
|
|
977
1178
|
|
|
978
|
-
export const SelfHostedRedesignScreen =
|
|
979
|
-
let expanded =
|
|
980
|
-
|
|
981
|
-
initialDialog =
|
|
982
|
-
|
|
983
|
-
confirmDisconnect =
|
|
984
|
-
|
|
985
|
-
initialStatus =
|
|
986
|
-
|
|
987
|
-
check =
|
|
988
|
-
|
|
989
|
-
initialEmail =
|
|
990
|
-
|
|
991
|
-
initialSearch =
|
|
992
|
-
|
|
993
|
-
initialPusher =
|
|
994
|
-
|
|
995
|
-
cron =
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1179
|
+
export const SelfHostedRedesignScreen = _ref18 => {
|
|
1180
|
+
let expanded = _ref18.expanded,
|
|
1181
|
+
_ref18$dialog = _ref18.dialog,
|
|
1182
|
+
initialDialog = _ref18$dialog === void 0 ? null : _ref18$dialog,
|
|
1183
|
+
_ref18$confirmDisconn = _ref18.confirmDisconnect,
|
|
1184
|
+
confirmDisconnect = _ref18$confirmDisconn === void 0 ? false : _ref18$confirmDisconn,
|
|
1185
|
+
_ref18$status = _ref18.status,
|
|
1186
|
+
initialStatus = _ref18$status === void 0 ? SYSTEM_STATUS : _ref18$status,
|
|
1187
|
+
_ref18$check = _ref18.check,
|
|
1188
|
+
check = _ref18$check === void 0 ? CHECK_FOR_UPDATES : _ref18$check,
|
|
1189
|
+
_ref18$email = _ref18.email,
|
|
1190
|
+
initialEmail = _ref18$email === void 0 ? EMAIL_INTEGRATION : _ref18$email,
|
|
1191
|
+
_ref18$search = _ref18.search,
|
|
1192
|
+
initialSearch = _ref18$search === void 0 ? SEARCH_NOT_CONFIGURED : _ref18$search,
|
|
1193
|
+
_ref18$pusher = _ref18.pusher,
|
|
1194
|
+
initialPusher = _ref18$pusher === void 0 ? PUSHER_INTEGRATION : _ref18$pusher,
|
|
1195
|
+
_ref18$cron = _ref18.cron,
|
|
1196
|
+
cron = _ref18$cron === void 0 ? CRON_INSTRUCTIONS : _ref18$cron,
|
|
1197
|
+
_ref18$rasterizer = _ref18.rasterizer,
|
|
1198
|
+
initialRasterizer = _ref18$rasterizer === void 0 ? RASTERIZER_NOT_CONFIGURED : _ref18$rasterizer,
|
|
1199
|
+
rasterizerPath = _ref18.rasterizerPath,
|
|
1200
|
+
rasterizerTest = _ref18.rasterizerTest,
|
|
1201
|
+
initialToast = _ref18.toast,
|
|
1202
|
+
_ref18$oldVersions = _ref18.oldVersions,
|
|
1203
|
+
initialOldVersions = _ref18$oldVersions === void 0 ? OLD_VERSIONS : _ref18$oldVersions,
|
|
1204
|
+
_ref18$removing = _ref18.removing,
|
|
1205
|
+
initialRemoving = _ref18$removing === void 0 ? false : _ref18$removing;
|
|
1206
|
+
const _useState11 = useState(initialStatus),
|
|
1207
|
+
status = _useState11[0],
|
|
1208
|
+
setStatus = _useState11[1];
|
|
1209
|
+
const _useState12 = useState(initialEmail),
|
|
1210
|
+
email = _useState12[0],
|
|
1211
|
+
setEmail = _useState12[1];
|
|
1212
|
+
const _useState13 = useState(initialSearch),
|
|
1213
|
+
search = _useState13[0],
|
|
1214
|
+
setSearch = _useState13[1];
|
|
1215
|
+
const _useState14 = useState(initialPusher),
|
|
1216
|
+
pusher = _useState14[0],
|
|
1217
|
+
setPusher = _useState14[1];
|
|
1218
|
+
const _useState15 = useState(initialRasterizer),
|
|
1219
|
+
rasterizer = _useState15[0],
|
|
1220
|
+
setRasterizer = _useState15[1];
|
|
1221
|
+
const _useState16 = useState(initialToast != null ? initialToast : null),
|
|
1222
|
+
toast = _useState16[0],
|
|
1223
|
+
setToast = _useState16[1];
|
|
1224
|
+
const _useState17 = useState(initialOldVersions),
|
|
1225
|
+
oldVersions = _useState17[0],
|
|
1226
|
+
setOldVersions = _useState17[1];
|
|
1227
|
+
const _useState18 = useState(initialRemoving),
|
|
1228
|
+
removing = _useState18[0],
|
|
1229
|
+
setRemoving = _useState18[1];
|
|
1230
|
+
const _useState19 = useState(initialDialog),
|
|
1231
|
+
dialog = _useState19[0],
|
|
1232
|
+
setDialog = _useState19[1];
|
|
1021
1233
|
const close = () => setDialog(null);
|
|
1022
1234
|
useEffect(() => {
|
|
1023
1235
|
if (!removing || initialRemoving) {
|
|
@@ -1128,6 +1340,14 @@ export const SelfHostedRedesignScreen = _ref15 => {
|
|
|
1128
1340
|
label: "IMAP Job",
|
|
1129
1341
|
value: formatRun(cron.check_imap_last_run)
|
|
1130
1342
|
}))), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1343
|
+
label: "PNG and PDF export",
|
|
1344
|
+
status: okStatus(status.rasterizer_is_ok),
|
|
1345
|
+
defaultExpanded: expanded === "image-export"
|
|
1346
|
+
}, /*#__PURE__*/React.createElement(RasterizerSummary, {
|
|
1347
|
+
data: rasterizer,
|
|
1348
|
+
errors: status.rasterizer_errors,
|
|
1349
|
+
onEdit: () => setDialog("rasterizer")
|
|
1350
|
+
})), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1131
1351
|
label: "Old Versions",
|
|
1132
1352
|
status: okStatus(oldVersions.versions_is_ok),
|
|
1133
1353
|
defaultExpanded: expanded === "clean-up"
|
|
@@ -1203,6 +1423,31 @@ export const SelfHostedRedesignScreen = _ref15 => {
|
|
|
1203
1423
|
open: dialog === "cron",
|
|
1204
1424
|
instructions: cron,
|
|
1205
1425
|
onClose: close
|
|
1206
|
-
})
|
|
1426
|
+
}), /*#__PURE__*/React.createElement(RasterizerDialog, {
|
|
1427
|
+
open: dialog === "rasterizer",
|
|
1428
|
+
data: rasterizer,
|
|
1429
|
+
defaultPath: rasterizerPath,
|
|
1430
|
+
defaultTest: rasterizerTest,
|
|
1431
|
+
onClose: close,
|
|
1432
|
+
onSave: (path, result) => {
|
|
1433
|
+
var _result$version;
|
|
1434
|
+
setRasterizer(path === null ? RASTERIZER_NOT_CONFIGURED : {
|
|
1435
|
+
librsvg_path: path,
|
|
1436
|
+
librsvg_path_source: "db"
|
|
1437
|
+
});
|
|
1438
|
+
setToast(path === null ? "Path removed. Export offers SVG only." : "Path saved. " + ((_result$version = result == null ? void 0 : result.version) != null ? _result$version : "rsvg-convert") + " works.");
|
|
1439
|
+
setStatus(prev => _extends({}, prev, {
|
|
1440
|
+
rasterizer_is_ok: path !== null,
|
|
1441
|
+
rasterizer_errors: path === null ? [RASTERIZER_NOT_CONFIGURED_ERROR] : []
|
|
1442
|
+
}));
|
|
1443
|
+
close();
|
|
1444
|
+
}
|
|
1445
|
+
}), toast ? /*#__PURE__*/React.createElement(ToastHost, null, /*#__PURE__*/React.createElement(ToastMessage, {
|
|
1446
|
+
type: "success",
|
|
1447
|
+
text: toast,
|
|
1448
|
+
dismissible: true,
|
|
1449
|
+
timeout: initialToast ? undefined : 3500,
|
|
1450
|
+
onClose: () => setToast(null)
|
|
1451
|
+
})) : null);
|
|
1207
1452
|
};
|
|
1208
1453
|
//# sourceMappingURL=parts.js.map
|