@genai-fi/base 4.3.1 → 4.3.3
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/assets/Help.css +1 -1
- package/dist/assets/InfoPop.css +1 -1
- package/dist/components/Feedback/Feedback.js +9 -8
- package/dist/components/Feedback/FeedbackForm.d.ts +2 -1
- package/dist/components/Feedback/FeedbackForm.js +75 -56
- package/dist/components/Help/Help.d.ts +4 -1
- package/dist/components/Help/Help.js +85 -46
- package/dist/components/InfoPop/InfoPop.d.ts +1 -1
- package/dist/components/InfoPop/InfoPop.js +62 -35
- package/package.json +1 -1
package/dist/assets/Help.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._helpButton_cw98j_1{position:absolute;z-index:10;color:#0a4bd6;background:#fff6;transition:opacity .3s ease-out;opacity:0}._helpButton_cw98j_1._left_cw98j_10{left:-3rem;top:.5rem}._helpButton_cw98j_1._right_cw98j_15{right:-3rem;top:.5rem}._helpButton_cw98j_1._top_cw98j_20{top:-3rem;right:.5rem}._helpButton_cw98j_1._bottom_cw98j_25{bottom:-3rem;right:.5rem}._helpButtonInplace_cw98j_30{color:#0a4bd6;margin-left:8px;transition:opacity .3s ease-out;opacity:.2}._helpButton_cw98j_1:hover{background:#fff}._container_cw98j_41{position:relative;border-radius:6px}._container_cw98j_41:hover ._helpButton_cw98j_1{opacity:1}._helpButton_cw98j_1:focus{opacity:1;background:#fff}._inplaceContainer_cw98j_55{display:flex;align-items:center}._inplaceContainer_cw98j_55:hover ._helpButtonInplace_cw98j_30{opacity:1}._helpButtonInplace_cw98j_30:focus{opacity:1;background:#fff}._active_cw98j_69{box-shadow:0 0 10px #0a4bd6}._helpButtonInside_cw98j_73{left:1rem}._closeButton_cw98j_77{margin-top:.5rem;align-self:flex-end;font-size:.75rem;padding:3px 8px}
|
package/dist/assets/InfoPop.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._popper_19um0_1{position:relative;display:flex;flex-direction:column;padding:1rem 1.5rem;border-radius:6px;font-family:Andika,sans-serif;animation:_fadeIn_19um0_1 .3s ease-out;max-width:250px;--infopop-bg: #0a4bd6}._dark_19um0_13{--infopop-bg: #0a4bd6;background:var(--infopop-bg);color:#fff}._light_19um0_19{--infopop-bg: white;background:var(--infopop-bg);color:#444}._arrow_19um0_25{position:absolute;width:0;height:0;background:none;transform:rotate(45deg)}._root_19um0_34[data-popper-placement^=bottom] ._arrow_19um0_25{top:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #0a4bd6}._root_19um0_34[data-popper-placement^=top] ._arrow_19um0_25{bottom:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #0a4bd6}._root_19um0_34[data-popper-placement^=right] ._arrow_19um0_25{left:-10px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #0a4bd6}._root_19um0_34[data-popper-placement^=left] ._arrow_19um0_25{right:-10px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #0a4bd6}._popper_19um0_1._right_19um0_60:before{content:"";position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #0a4bd6;left:0;top:calc(50% - 10px)}._popper_19um0_1._left_19um0_72:before{content:"";position:absolute;width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #0a4bd6;right:0;top:calc(50% - 10px)}._popper_19um0_1._bottom_19um0_84:before{content:"";position:absolute;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #0a4bd6;top:0;left:calc(50% - 8px)}._popper_19um0_1._top_19um0_96:before{content:"";position:absolute;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #0a4bd6;bottom:0;left:calc(50% - 8px)}._popper_19um0_1 h2{margin:0;font-size:1.2rem}._popper_19um0_1 p{margin:0;font-size:.9rem}._root_19um0_34[data-popper-placement^=bottom] ._popper_19um0_1{margin-top:10px}._root_19um0_34[data-popper-placement^=top] ._popper_19um0_1{margin-bottom:10px}._root_19um0_34[data-popper-placement^=right] ._popper_19um0_1{margin-left:5px}._root_19um0_34[data-popper-placement^=left] ._popper_19um0_1{margin-right:5px}@keyframes _fadeIn_19um0_1{0%{opacity:0}to{opacity:1}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as S, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import "../../state/webrtcState.js";
|
|
3
3
|
import { useState as r, useEffect as g } from "react";
|
|
4
4
|
import { useTranslation as w } from "react-i18next";
|
|
@@ -18,16 +18,16 @@ import "../IconMenu/context.js";
|
|
|
18
18
|
import "@emotion/react";
|
|
19
19
|
import I from "./FeedbackForm.js";
|
|
20
20
|
import { c as v } from "../../createSvgIcon-BM4dw4Lw.js";
|
|
21
|
-
const j = v(/* @__PURE__ */
|
|
21
|
+
const j = v(/* @__PURE__ */ o("path", {
|
|
22
22
|
d: "M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5"
|
|
23
23
|
}), "ThumbsUpDown");
|
|
24
|
-
function R({ application: s, apiUrl:
|
|
24
|
+
function R({ application: s, apiUrl: t, delay: n, className: a, style: p, variant: u }) {
|
|
25
25
|
const { t: f } = w(), [l, c] = r(!1), [d, h] = r(""), [b, m] = r(!1), i = localStorage.getItem("feedbackSubmitted") === "true";
|
|
26
26
|
return g(() => {
|
|
27
27
|
if (!i) {
|
|
28
28
|
const k = setTimeout(
|
|
29
29
|
() => {
|
|
30
|
-
|
|
30
|
+
t && fetch(`${t}`).then((e) => e.json()).then((e) => {
|
|
31
31
|
h(e.token), c(!0);
|
|
32
32
|
}).catch(() => {
|
|
33
33
|
console.warn("Feedback denied");
|
|
@@ -37,22 +37,23 @@ function R({ application: s, apiUrl: o, delay: n, className: a, style: p, varian
|
|
|
37
37
|
);
|
|
38
38
|
return () => clearTimeout(k);
|
|
39
39
|
}
|
|
40
|
-
}, [i, n,
|
|
41
|
-
l && /* @__PURE__ */
|
|
40
|
+
}, [i, n, t]), /* @__PURE__ */ S(T, { children: [
|
|
41
|
+
l && /* @__PURE__ */ o(
|
|
42
42
|
F,
|
|
43
43
|
{
|
|
44
44
|
variant: u ?? "contained",
|
|
45
45
|
onClick: () => m(!0),
|
|
46
46
|
className: a,
|
|
47
47
|
style: p,
|
|
48
|
-
startIcon: /* @__PURE__ */
|
|
48
|
+
startIcon: /* @__PURE__ */ o(j, {}),
|
|
49
49
|
children: f("feedback.button")
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ o(
|
|
53
53
|
I,
|
|
54
54
|
{
|
|
55
55
|
open: b,
|
|
56
|
+
apiUrl: t,
|
|
56
57
|
onClose: () => m(!1),
|
|
57
58
|
onDone: () => {
|
|
58
59
|
localStorage.setItem("feedbackSubmitted", "true"), c(!1);
|
|
@@ -2,8 +2,9 @@ interface Props {
|
|
|
2
2
|
token: string;
|
|
3
3
|
application: string;
|
|
4
4
|
open?: boolean;
|
|
5
|
+
apiUrl: string;
|
|
5
6
|
onClose?: () => void;
|
|
6
7
|
onDone?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export default function FeedbackForm({ application, open, onClose, token, onDone }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default function FeedbackForm({ application, open, onClose, token, onDone, apiUrl }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,88 +1,107 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Dialog as
|
|
3
|
-
import { s as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { Button as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
return !(
|
|
1
|
+
import { jsxs as r, Fragment as F, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as S, DialogContent as Y, DialogActions as _ } from "@mui/material";
|
|
3
|
+
import { s as h } from "../../Feedback.module-C2gI6YmB.js";
|
|
4
|
+
import { useState as o, useRef as A, useEffect as B } from "react";
|
|
5
|
+
import { Button as T } from "../Button/Button.js";
|
|
6
|
+
import D from "./Rating.js";
|
|
7
|
+
import O from "./Recommend.js";
|
|
8
|
+
import I from "./Experience.js";
|
|
9
|
+
import { useTranslation as M } from "react-i18next";
|
|
10
|
+
const y = "https://store.gen-ai.fi/common/thank_you_graphic.jpg";
|
|
11
|
+
function P(a, t, s) {
|
|
12
|
+
return !(a <= 0 || a > 5 || t <= 0 || t > 5 || s.length > 1e3);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const { t } =
|
|
16
|
-
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
function Q({ application: a, open: t, onClose: s, token: E, onDone: g, apiUrl: p }) {
|
|
15
|
+
const { t: n } = M(), [l, k] = o(0), [f, b] = o(0), [d, x] = o(""), [i, C] = o(!1), [c, m] = o(!1), v = A(!1);
|
|
16
|
+
B(() => {
|
|
17
|
+
if (!t || v.current) return;
|
|
18
|
+
const u = new Image();
|
|
19
|
+
u.src = y, v.current = !0;
|
|
20
|
+
}, [t]);
|
|
21
|
+
const N = P(l, f, d), j = () => {
|
|
22
|
+
p && fetch(`${p}`, {
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers: {
|
|
25
|
+
"Content-Type": "application/json"
|
|
26
|
+
},
|
|
27
|
+
body: JSON.stringify({
|
|
28
|
+
token: E,
|
|
29
|
+
application: a,
|
|
30
|
+
rating: l,
|
|
31
|
+
recommend: f,
|
|
32
|
+
describe: d,
|
|
33
|
+
valuableFeature: "",
|
|
34
|
+
suggestions: ""
|
|
35
|
+
})
|
|
36
|
+
}).then((u) => {
|
|
37
|
+
u.ok ? (C(!0), g && g()) : m(!0);
|
|
38
|
+
}).catch(() => {
|
|
39
|
+
m(!0);
|
|
40
|
+
});
|
|
41
|
+
}, R = () => {
|
|
42
|
+
s && s(), setTimeout(() => {
|
|
43
|
+
C(!1), m(!1), k(0), b(0), x("");
|
|
25
44
|
}, 500);
|
|
26
45
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
46
|
+
return /* @__PURE__ */ r(
|
|
47
|
+
S,
|
|
29
48
|
{
|
|
30
|
-
open:
|
|
31
|
-
onClose:
|
|
49
|
+
open: t ?? !1,
|
|
50
|
+
onClose: R,
|
|
32
51
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
!i && !
|
|
35
|
-
/* @__PURE__ */ e("h1", { children:
|
|
52
|
+
/* @__PURE__ */ r(Y, { className: h.feedback, children: [
|
|
53
|
+
!i && !c && /* @__PURE__ */ r(F, { children: [
|
|
54
|
+
/* @__PURE__ */ e("h1", { children: n("feedback.title") }),
|
|
36
55
|
/* @__PURE__ */ e(
|
|
37
|
-
|
|
56
|
+
D,
|
|
38
57
|
{
|
|
39
|
-
rating:
|
|
40
|
-
onChange:
|
|
58
|
+
rating: l,
|
|
59
|
+
onChange: k
|
|
41
60
|
}
|
|
42
61
|
),
|
|
43
62
|
/* @__PURE__ */ e(
|
|
44
|
-
|
|
63
|
+
O,
|
|
45
64
|
{
|
|
46
|
-
rating:
|
|
47
|
-
onChange:
|
|
65
|
+
rating: f,
|
|
66
|
+
onChange: b
|
|
48
67
|
}
|
|
49
68
|
),
|
|
50
69
|
/* @__PURE__ */ e(
|
|
51
|
-
|
|
70
|
+
I,
|
|
52
71
|
{
|
|
53
|
-
experience:
|
|
54
|
-
onChange:
|
|
72
|
+
experience: d,
|
|
73
|
+
onChange: x
|
|
55
74
|
}
|
|
56
75
|
)
|
|
57
76
|
] }),
|
|
58
|
-
i && /* @__PURE__ */ e("div", { className:
|
|
77
|
+
i && /* @__PURE__ */ e("div", { className: h.thankYouBox, children: /* @__PURE__ */ e(
|
|
59
78
|
"img",
|
|
60
79
|
{
|
|
61
|
-
src:
|
|
62
|
-
alt:
|
|
80
|
+
src: y,
|
|
81
|
+
alt: n("feedback.thankYou")
|
|
63
82
|
}
|
|
64
83
|
) }),
|
|
65
|
-
|
|
66
|
-
/* @__PURE__ */ e("h1", { children:
|
|
67
|
-
/* @__PURE__ */ e("p", { children:
|
|
84
|
+
c && /* @__PURE__ */ r("div", { className: h.messageBox, children: [
|
|
85
|
+
/* @__PURE__ */ e("h1", { children: n("feedback.error") }),
|
|
86
|
+
/* @__PURE__ */ e("p", { children: n("feedback.errorMessage") })
|
|
68
87
|
] })
|
|
69
88
|
] }),
|
|
70
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ r(_, { children: [
|
|
71
90
|
/* @__PURE__ */ e(
|
|
72
|
-
|
|
91
|
+
T,
|
|
73
92
|
{
|
|
74
|
-
variant: !i && !
|
|
75
|
-
onClick:
|
|
76
|
-
children:
|
|
93
|
+
variant: !i && !c ? "outlined" : "contained",
|
|
94
|
+
onClick: R,
|
|
95
|
+
children: n("feedback.close")
|
|
77
96
|
}
|
|
78
97
|
),
|
|
79
|
-
!i && !
|
|
80
|
-
|
|
98
|
+
!i && !c && /* @__PURE__ */ e(
|
|
99
|
+
T,
|
|
81
100
|
{
|
|
82
101
|
variant: "contained",
|
|
83
|
-
onClick:
|
|
84
|
-
disabled: !
|
|
85
|
-
children:
|
|
102
|
+
onClick: j,
|
|
103
|
+
disabled: !N,
|
|
104
|
+
children: n("feedback.send")
|
|
86
105
|
}
|
|
87
106
|
)
|
|
88
107
|
] })
|
|
@@ -91,5 +110,5 @@ function L({ application: c, open: n, onClose: a, token: S, onDone: w }) {
|
|
|
91
110
|
);
|
|
92
111
|
}
|
|
93
112
|
export {
|
|
94
|
-
|
|
113
|
+
Q as default
|
|
95
114
|
};
|
|
@@ -5,8 +5,11 @@ interface Props extends PropsWithChildren {
|
|
|
5
5
|
active?: boolean;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
buttonPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
8
9
|
inplace?: boolean;
|
|
9
10
|
inside?: boolean;
|
|
11
|
+
keepOpen?: boolean;
|
|
12
|
+
closeLabel?: string;
|
|
10
13
|
}
|
|
11
|
-
export default function Help({ message, children, widget, style: customStyle, active, placement, inplace, inside, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function Help({ message, children, widget, style: customStyle, active, placement, inplace, inside, keepOpen, closeLabel, buttonPlacement, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
15
|
export {};
|
|
@@ -1,69 +1,108 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconButton as
|
|
3
|
-
import
|
|
4
|
-
import { c as
|
|
5
|
-
import { useState as
|
|
6
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton as p } from "@mui/material";
|
|
3
|
+
import w from "../InfoPop/InfoPop.js";
|
|
4
|
+
import { c as g } from "../../createSvgIcon-BM4dw4Lw.js";
|
|
5
|
+
import { useState as S } from "react";
|
|
6
|
+
import { C as $ } from "../../Close-Cv_QwhIN.js";
|
|
7
|
+
import "../../state/webrtcState.js";
|
|
8
|
+
import "react-i18next";
|
|
9
|
+
import "../../hooks/peer.js";
|
|
10
|
+
import { Button as z } from "../Button/Button.js";
|
|
11
|
+
import "../../index-SOhdqzHq.js";
|
|
12
|
+
import "../../style/theme.js";
|
|
13
|
+
import "../../util/canvas.js";
|
|
14
|
+
import "../../FileSaver.min-DhePf63e.js";
|
|
15
|
+
import "../BusyButton/BusyButton.js";
|
|
16
|
+
import "../../browser-HW-wgeM2.js";
|
|
17
|
+
import "../WorkflowLayout/lines.js";
|
|
18
|
+
import "../WorkflowLayout/svgContext.js";
|
|
19
|
+
import "../WorkflowLayout/Widget.js";
|
|
20
|
+
import "../IconMenu/context.js";
|
|
21
|
+
import "@emotion/react";
|
|
22
|
+
import '../../assets/Help.css';const u = g(/* @__PURE__ */ o("path", {
|
|
7
23
|
d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"
|
|
8
|
-
}), "HelpOutline"),
|
|
9
|
-
helpButton:
|
|
10
|
-
|
|
11
|
-
|
|
24
|
+
}), "HelpOutline"), N = "_helpButton_cw98j_1", b = "_left_cw98j_10", x = "_right_cw98j_15", y = "_top_cw98j_20", E = "_bottom_cw98j_25", H = "_helpButtonInplace_cw98j_30", M = "_container_cw98j_41", k = "_inplaceContainer_cw98j_55", L = "_active_cw98j_69", T = "_helpButtonInside_cw98j_73", A = "_closeButton_cw98j_77", t = {
|
|
25
|
+
helpButton: N,
|
|
26
|
+
left: b,
|
|
27
|
+
right: x,
|
|
28
|
+
top: y,
|
|
29
|
+
bottom: E,
|
|
30
|
+
helpButtonInplace: H,
|
|
31
|
+
container: M,
|
|
12
32
|
inplaceContainer: k,
|
|
13
|
-
active:
|
|
14
|
-
helpButtonInside:
|
|
33
|
+
active: L,
|
|
34
|
+
helpButtonInside: T,
|
|
35
|
+
closeButton: A
|
|
15
36
|
};
|
|
16
|
-
function
|
|
17
|
-
message:
|
|
37
|
+
function lt({
|
|
38
|
+
message: _,
|
|
18
39
|
children: h,
|
|
19
|
-
widget:
|
|
20
|
-
style:
|
|
21
|
-
active:
|
|
22
|
-
placement:
|
|
40
|
+
widget: d,
|
|
41
|
+
style: f,
|
|
42
|
+
active: B,
|
|
43
|
+
placement: I,
|
|
23
44
|
inplace: n,
|
|
24
|
-
inside:
|
|
45
|
+
inside: e,
|
|
46
|
+
keepOpen: c,
|
|
47
|
+
closeLabel: j,
|
|
48
|
+
buttonPlacement: C = "left"
|
|
25
49
|
}) {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
50
|
+
const [l, r] = S(null), s = (a) => {
|
|
51
|
+
r(
|
|
52
|
+
(v) => v ? null : n || e ? a.currentTarget : a.currentTarget.parentElement
|
|
53
|
+
);
|
|
54
|
+
}, i = () => {
|
|
55
|
+
r(null);
|
|
30
56
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ m(
|
|
32
58
|
"div",
|
|
33
59
|
{
|
|
34
|
-
className: `${n ? t.inplaceContainer : t.container} ${
|
|
35
|
-
"data-widget":
|
|
36
|
-
"data-active":
|
|
37
|
-
style:
|
|
60
|
+
className: `${n ? t.inplaceContainer : t.container} ${l && !n && !e ? t.active : ""}`,
|
|
61
|
+
"data-widget": d,
|
|
62
|
+
"data-active": B ? "true" : "false",
|
|
63
|
+
style: f,
|
|
38
64
|
children: [
|
|
39
|
-
!n && /* @__PURE__ */
|
|
40
|
-
|
|
65
|
+
!n && /* @__PURE__ */ o(
|
|
66
|
+
p,
|
|
41
67
|
{
|
|
42
|
-
onClick:
|
|
43
|
-
onMouseLeave:
|
|
44
|
-
className: `${t.helpButton} ${
|
|
68
|
+
onClick: s,
|
|
69
|
+
onMouseLeave: c ? void 0 : i,
|
|
70
|
+
className: `${t.helpButton} ${e ? t.helpButtonInside : ""} ${t[C]}`,
|
|
45
71
|
color: "inherit",
|
|
46
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ o(u, { fontSize: "medium" })
|
|
47
73
|
}
|
|
48
74
|
),
|
|
49
75
|
h,
|
|
50
|
-
n && /* @__PURE__ */
|
|
51
|
-
|
|
76
|
+
n && /* @__PURE__ */ o(
|
|
77
|
+
p,
|
|
52
78
|
{
|
|
53
|
-
onClick:
|
|
54
|
-
onMouseLeave:
|
|
79
|
+
onClick: s,
|
|
80
|
+
onMouseLeave: c ? void 0 : i,
|
|
55
81
|
className: t.helpButtonInplace,
|
|
56
82
|
color: "inherit",
|
|
57
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ o(u, { fontSize: "medium" })
|
|
58
84
|
}
|
|
59
85
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
86
|
+
/* @__PURE__ */ m(
|
|
87
|
+
w,
|
|
62
88
|
{
|
|
63
|
-
anchorEl:
|
|
64
|
-
open: !!
|
|
65
|
-
placement:
|
|
66
|
-
children:
|
|
89
|
+
anchorEl: l,
|
|
90
|
+
open: !!l,
|
|
91
|
+
placement: I,
|
|
92
|
+
children: [
|
|
93
|
+
_,
|
|
94
|
+
c && /* @__PURE__ */ o(
|
|
95
|
+
z,
|
|
96
|
+
{
|
|
97
|
+
onClick: i,
|
|
98
|
+
className: t.closeButton,
|
|
99
|
+
color: "inherit",
|
|
100
|
+
startIcon: /* @__PURE__ */ o($, { fontSize: "small" }),
|
|
101
|
+
variant: "outlined",
|
|
102
|
+
children: j || "Close"
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
67
106
|
}
|
|
68
107
|
)
|
|
69
108
|
]
|
|
@@ -71,5 +110,5 @@ function j({
|
|
|
71
110
|
);
|
|
72
111
|
}
|
|
73
112
|
export {
|
|
74
|
-
|
|
113
|
+
lt as default
|
|
75
114
|
};
|
|
@@ -6,5 +6,5 @@ interface Props extends Omit<PopperProps, 'children'>, PropsWithChildren {
|
|
|
6
6
|
offsetX?: number;
|
|
7
7
|
delay?: number;
|
|
8
8
|
}
|
|
9
|
-
export default function InfoPop({ open, delay, children, offsetY, offsetX, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default function InfoPop({ open, delay, children, offsetY, offsetX, modifiers: userModifiers, theme, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,48 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Popper as
|
|
3
|
-
import { useState as d, useRef as
|
|
4
|
-
import '../../assets/InfoPop.css';const
|
|
5
|
-
popper:
|
|
6
|
-
fadeIn:
|
|
7
|
-
dark:
|
|
8
|
-
light:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
right:
|
|
12
|
-
left:
|
|
1
|
+
import { jsx as f, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { Popper as N } from "@mui/material";
|
|
3
|
+
import { useState as d, useRef as O, useEffect as j, useMemo as v } from "react";
|
|
4
|
+
import '../../assets/InfoPop.css';const P = "_popper_19um0_1", R = "_fadeIn_19um0_1", T = "_dark_19um0_13", $ = "_light_19um0_19", z = "_arrow_19um0_25", A = "_root_19um0_34", S = "_right_19um0_60", q = "_left_19um0_72", B = "_bottom_19um0_84", C = "_top_19um0_96", e = {
|
|
5
|
+
popper: P,
|
|
6
|
+
fadeIn: R,
|
|
7
|
+
dark: T,
|
|
8
|
+
light: $,
|
|
9
|
+
arrow: z,
|
|
10
|
+
root: A,
|
|
11
|
+
right: S,
|
|
12
|
+
left: q,
|
|
13
|
+
bottom: B,
|
|
14
|
+
top: C
|
|
13
15
|
};
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
function H({
|
|
17
|
+
open: t,
|
|
18
|
+
delay: r,
|
|
19
|
+
children: h,
|
|
20
|
+
offsetY: s = 0,
|
|
21
|
+
offsetX: n = 0,
|
|
22
|
+
modifiers: c,
|
|
23
|
+
theme: w = "dark",
|
|
24
|
+
...x
|
|
25
|
+
}) {
|
|
26
|
+
const [g, i] = d(t), p = O(t), [a, I] = d(null);
|
|
27
|
+
p.current = t, j(() => {
|
|
17
28
|
if (t) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
},
|
|
29
|
+
const o = r ? setTimeout(() => {
|
|
30
|
+
p.current && i(t);
|
|
31
|
+
}, r) : void 0;
|
|
21
32
|
return () => {
|
|
22
|
-
|
|
33
|
+
o && clearTimeout(o);
|
|
23
34
|
};
|
|
24
35
|
} else
|
|
25
|
-
|
|
26
|
-
}, [t,
|
|
27
|
-
const
|
|
28
|
-
{
|
|
36
|
+
i(!1);
|
|
37
|
+
}, [t, r]);
|
|
38
|
+
const k = v(() => {
|
|
39
|
+
const o = [...c ?? []], m = (b, u) => {
|
|
40
|
+
const l = o.findIndex((_) => (_ == null ? void 0 : _.name) === b);
|
|
41
|
+
l >= 0 ? o[l] = u : o.push(u);
|
|
42
|
+
};
|
|
43
|
+
return (n || s) && m("offset", {
|
|
29
44
|
name: "offset",
|
|
30
|
-
options: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
options: { offset: [n, s] }
|
|
46
|
+
}), a && m("arrow", {
|
|
47
|
+
name: "arrow",
|
|
48
|
+
options: { element: a, padding: 8 }
|
|
49
|
+
}), o;
|
|
50
|
+
}, [c, n, s, a]);
|
|
51
|
+
return /* @__PURE__ */ f(
|
|
52
|
+
N,
|
|
37
53
|
{
|
|
38
|
-
open:
|
|
39
|
-
...
|
|
40
|
-
|
|
54
|
+
open: r ? g : t,
|
|
55
|
+
...x,
|
|
56
|
+
className: e.root,
|
|
57
|
+
modifiers: k,
|
|
41
58
|
sx: { zIndex: 10 },
|
|
42
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ E("div", { className: `${e.popper} ${e[w]}`, children: [
|
|
60
|
+
/* @__PURE__ */ f(
|
|
61
|
+
"span",
|
|
62
|
+
{
|
|
63
|
+
ref: I,
|
|
64
|
+
className: e.arrow,
|
|
65
|
+
"data-popper-arrow": !0
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
h
|
|
69
|
+
] })
|
|
43
70
|
}
|
|
44
71
|
);
|
|
45
72
|
}
|
|
46
73
|
export {
|
|
47
|
-
|
|
74
|
+
H as default
|
|
48
75
|
};
|