@pie-lib/charting 8.0.5-next.20261013201335 → 8.0.5-next.20261015083721
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/mark-label.js
CHANGED
|
@@ -55,58 +55,58 @@ function x(e) {
|
|
|
55
55
|
if (b(e)) return i[0] && i[1] && (r = i[0]), a = `\\(${r}\\frac{${n[0]}}{${n[1]}}\\)`, a;
|
|
56
56
|
}
|
|
57
57
|
var S = (n) => {
|
|
58
|
-
let [r, i] = c(null), l = a((e) => i(e), null), { mark: u = {}, disabled: d, inputRef:
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
return
|
|
58
|
+
let [r, i] = c(null), l = a((e) => i(e), null), { mark: u = {}, disabled: d, inputRef: b, barWidth: S, rotate: C, correctness: w, autoFocus: T, error: E, isHiddenLabel: D, limitCharacters: O, correctnessIndicator: k, ariaLabel: A, mathAriaLabel: j } = n, [M, N] = c(u.label), [P, F] = c(u.label), [I, L] = c(!1), R = x(P), z = s(null), B = (e) => {
|
|
59
|
+
O && e.target.value && e.target.value.length > 20 || N(e.target.value);
|
|
60
|
+
}, V = () => I === !1 && R !== void 0, H = () => L(!0), U = (e) => {
|
|
61
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), H());
|
|
62
|
+
}, W = (e) => {
|
|
63
|
+
F(e.target.value), L(!1), n.onChange(e.target.value);
|
|
64
|
+
}, G = {};
|
|
65
|
+
return C && (G = {
|
|
66
66
|
width: "unset",
|
|
67
67
|
textAlign: "left"
|
|
68
68
|
}), o(() => {
|
|
69
|
-
|
|
69
|
+
N(u.label), F(u.label);
|
|
70
70
|
}, [u.label]), o(() => {
|
|
71
|
-
let e =
|
|
72
|
-
e &&
|
|
73
|
-
}, [
|
|
71
|
+
let e = z.current;
|
|
72
|
+
e && R && !I && (e.innerHTML = g(R), h(e));
|
|
73
|
+
}, [R, I]), /* @__PURE__ */ m(_, { children: [k, V() ? /* @__PURE__ */ p(y, {
|
|
74
74
|
ref: (e) => {
|
|
75
|
-
|
|
75
|
+
z.current = e, typeof b == "function" && b(e);
|
|
76
76
|
},
|
|
77
77
|
"data-math-label": !0,
|
|
78
78
|
className: e({
|
|
79
79
|
disabledMarkLabel: d,
|
|
80
|
-
error:
|
|
81
|
-
correct: u.editable &&
|
|
82
|
-
incorrect: u.editable &&
|
|
80
|
+
error: E,
|
|
81
|
+
correct: u.editable && w?.label === "correct",
|
|
82
|
+
incorrect: u.editable && w?.label === "incorrect"
|
|
83
83
|
}),
|
|
84
84
|
...!d && {
|
|
85
85
|
role: "button",
|
|
86
86
|
tabIndex: 0,
|
|
87
|
-
"aria-label":
|
|
88
|
-
onClick:
|
|
89
|
-
onKeyDown:
|
|
87
|
+
"aria-label": j || A,
|
|
88
|
+
onClick: H,
|
|
89
|
+
onKeyDown: U
|
|
90
90
|
},
|
|
91
91
|
style: {
|
|
92
|
-
minWidth:
|
|
92
|
+
minWidth: S,
|
|
93
93
|
position: "fixed",
|
|
94
94
|
transformOrigin: "left",
|
|
95
|
-
transform: `rotate(${
|
|
96
|
-
visibility:
|
|
97
|
-
marginTop:
|
|
95
|
+
transform: `rotate(${C}deg)`,
|
|
96
|
+
visibility: D ? "hidden" : "unset",
|
|
97
|
+
marginTop: k ? "24px" : "0"
|
|
98
98
|
}
|
|
99
99
|
}) : /* @__PURE__ */ p(t, {
|
|
100
100
|
inputRef: (e) => {
|
|
101
|
-
l(e), typeof
|
|
101
|
+
l(e), typeof b == "function" && b(e);
|
|
102
102
|
},
|
|
103
103
|
name: "mark-label-input",
|
|
104
|
-
"aria-label":
|
|
105
|
-
autoFocus:
|
|
104
|
+
"aria-label": A,
|
|
105
|
+
autoFocus: I || T,
|
|
106
106
|
disabled: d,
|
|
107
|
-
inputClassName: e(
|
|
107
|
+
inputClassName: e(w && u.editable ? w.label : null, d && "disabledMarkLabel", E && "error"),
|
|
108
108
|
inputStyle: {
|
|
109
|
-
minWidth:
|
|
109
|
+
minWidth: S,
|
|
110
110
|
textAlign: "center",
|
|
111
111
|
background: "transparent",
|
|
112
112
|
boxSizing: "border-box",
|
|
@@ -116,23 +116,26 @@ var S = (n) => {
|
|
|
116
116
|
...d ? {
|
|
117
117
|
color: v,
|
|
118
118
|
WebkitTextFillColor: v
|
|
119
|
-
} : {
|
|
120
|
-
|
|
119
|
+
} : {
|
|
120
|
+
color: f.defaults.TEXT,
|
|
121
|
+
WebkitTextFillColor: f.defaults.TEXT
|
|
122
|
+
},
|
|
123
|
+
...G
|
|
121
124
|
},
|
|
122
|
-
value:
|
|
125
|
+
value: M,
|
|
123
126
|
style: {
|
|
124
127
|
position: "fixed",
|
|
125
128
|
pointerEvents: "auto",
|
|
126
129
|
top: 0,
|
|
127
130
|
left: 0,
|
|
128
|
-
minWidth:
|
|
131
|
+
minWidth: S,
|
|
129
132
|
transformOrigin: "left",
|
|
130
|
-
transform: `rotate(${
|
|
131
|
-
visibility:
|
|
132
|
-
marginTop:
|
|
133
|
+
transform: `rotate(${C}deg)`,
|
|
134
|
+
visibility: D ? "hidden" : "unset",
|
|
135
|
+
marginTop: k ? "24px" : "0"
|
|
133
136
|
},
|
|
134
|
-
onChange:
|
|
135
|
-
onBlur:
|
|
137
|
+
onChange: B,
|
|
138
|
+
onBlur: W
|
|
136
139
|
})] });
|
|
137
140
|
};
|
|
138
141
|
S.propTypes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/charting",
|
|
3
|
-
"version": "8.0.5-next.
|
|
3
|
+
"version": "8.0.5-next.20261015083721",
|
|
4
4
|
"description": "charting",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"@mui/icons-material": "^7.3.4",
|
|
15
15
|
"@mui/material": "^7.3.4",
|
|
16
16
|
"@pie-element/shared-utils": "0.1.5-next.20261012213240",
|
|
17
|
-
"@pie-lib/plot": "5.0.5-next.
|
|
18
|
-
"@pie-lib/render-ui": "8.0.5-next.
|
|
17
|
+
"@pie-lib/plot": "5.0.5-next.20261015083721",
|
|
18
|
+
"@pie-lib/render-ui": "8.0.5-next.20261015083721",
|
|
19
19
|
"@pie-lib/translator": "5.0.2-next.20261006160832",
|
|
20
20
|
"@visx/axis": "^4.0.0",
|
|
21
21
|
"@visx/event": "^4.0.0",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"invariant": "^2.2.4",
|
|
31
31
|
"react-draggable": "^4.7.1",
|
|
32
32
|
"prop-types": "^15.8.1",
|
|
33
|
-
"@pie-lib/config-ui": "14.0.5-next.
|
|
34
|
-
"@pie-element/shared-math-rendering-mathjax": "0.1.6-next.
|
|
33
|
+
"@pie-lib/config-ui": "14.0.5-next.20261015083721",
|
|
34
|
+
"@pie-element/shared-math-rendering-mathjax": "0.1.6-next.20261015083721",
|
|
35
35
|
"@pie-element/shared-lodash": "0.1.3-next.20261012213240",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"d3-time": "^3.1.0",
|