@pie-lib/charting 8.0.8-next.20261109082044 → 8.0.8-next.20261109091947
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/__tests__/i18n.test.d.ts +1 -0
- package/dist/actions-button.d.ts +2 -0
- package/dist/actions-button.js +46 -45
- package/dist/axes.d.ts +2 -0
- package/dist/axes.js +149 -153
- package/dist/chart.d.ts +4 -1
- package/dist/chart.js +100 -106
- package/dist/common/mark-slider.js +36 -38
- package/dist/i18n/ar.d.ts +44 -0
- package/dist/i18n/ar.js +46 -0
- package/dist/i18n/cy.d.ts +44 -0
- package/dist/i18n/cy.js +46 -0
- package/dist/i18n/en-AU.d.ts +35 -0
- package/dist/i18n/en-AU.js +35 -0
- package/dist/i18n/en-GB.d.ts +35 -0
- package/dist/i18n/en-GB.js +35 -0
- package/dist/i18n/en-US.d.ts +44 -0
- package/dist/i18n/en-US.js +35 -0
- package/dist/i18n/es.d.ts +35 -0
- package/dist/i18n/es.js +35 -0
- package/dist/i18n/fr.d.ts +38 -0
- package/dist/i18n/fr.js +40 -0
- package/dist/i18n/index.d.ts +34 -0
- package/dist/i18n/index.js +67 -0
- package/dist/i18n/ja.d.ts +34 -0
- package/dist/i18n/ja.js +32 -0
- package/dist/i18n/ko.d.ts +34 -0
- package/dist/i18n/ko.js +32 -0
- package/dist/i18n/nl-NL.d.ts +36 -0
- package/dist/i18n/nl-NL.js +38 -0
- package/dist/i18n/pt.d.ts +38 -0
- package/dist/i18n/pt.js +40 -0
- package/dist/i18n/ro.d.ts +38 -0
- package/dist/i18n/ro.js +40 -0
- package/dist/i18n/sv.d.ts +36 -0
- package/dist/i18n/sv.js +38 -0
- package/dist/i18n/th-TH.d.ts +34 -0
- package/dist/i18n/th-TH.js +32 -0
- package/dist/i18n/zh.d.ts +34 -0
- package/dist/i18n/zh.js +32 -0
- package/dist/key-legend.js +30 -27
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/actions-button.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export declare class ActionsButton extends React.Component {
|
|
4
|
+
/** Re-renders once the language's catalog lands, for an element that did not preload it. */
|
|
5
|
+
relabel: () => void;
|
|
4
6
|
constructor(props: any);
|
|
5
7
|
componentWillUnmount(): void;
|
|
6
8
|
static propTypes: {
|
package/dist/actions-button.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getLabelMathFormat as e } from "./mark-label.js";
|
|
2
|
-
import
|
|
3
|
-
import i from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import f from "@pie-
|
|
2
|
+
import { catalogs as t } from "./i18n/index.js";
|
|
3
|
+
import n, { useEffect as r, useRef as i } from "react";
|
|
4
|
+
import a from "prop-types";
|
|
5
|
+
import { styled as o } from "@mui/material/styles";
|
|
6
|
+
import { color as s, createUniqueId as c } from "@pie-lib/render-ui";
|
|
7
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { renderMath as f } from "@pie-element/shared-math-rendering-mathjax";
|
|
9
9
|
import p from "@mui/material/Menu";
|
|
10
10
|
import m from "@mui/material/MenuItem";
|
|
11
11
|
//#region src/actions-button.tsx
|
|
12
|
-
var
|
|
12
|
+
var h = o("div")(() => ({ alignSelf: "flex-end" })), g = o("button")(({ theme: e }) => ({
|
|
13
13
|
display: "block",
|
|
14
14
|
margin: 0,
|
|
15
15
|
border: 0,
|
|
@@ -17,25 +17,26 @@ var { translator: h } = f, g = a("div")(() => ({ alignSelf: "flex-end" })), _ =
|
|
|
17
17
|
font: "inherit",
|
|
18
18
|
cursor: "pointer",
|
|
19
19
|
fontSize: e.typography.fontSize,
|
|
20
|
-
color:
|
|
20
|
+
color: s.defaults.TERTIARY,
|
|
21
21
|
padding: e.spacing(1),
|
|
22
22
|
"&:focus-visible": {
|
|
23
|
-
outline: `2px solid ${
|
|
23
|
+
outline: `2px solid ${s.focusOutline()}`,
|
|
24
24
|
outlineOffset: "-2px"
|
|
25
25
|
}
|
|
26
|
-
})),
|
|
26
|
+
})), _ = o(m)(({ theme: e }) => ({
|
|
27
27
|
fontSize: e.typography.fontSize,
|
|
28
|
-
color:
|
|
29
|
-
})),
|
|
30
|
-
let t =
|
|
31
|
-
return
|
|
28
|
+
color: s.defaults.TEXT
|
|
29
|
+
})), v = ({ math: e }) => {
|
|
30
|
+
let t = i(null);
|
|
31
|
+
return r(() => {
|
|
32
32
|
let n = t.current;
|
|
33
|
-
n && (n.textContent = e,
|
|
34
|
-
}, [e]), /* @__PURE__ */
|
|
33
|
+
n && (n.textContent = e, f(n));
|
|
34
|
+
}, [e]), /* @__PURE__ */ u("span", {
|
|
35
35
|
ref: t,
|
|
36
36
|
style: { pointerEvents: "none" }
|
|
37
37
|
});
|
|
38
|
-
},
|
|
38
|
+
}, y = class extends n.Component {
|
|
39
|
+
relabel = () => this.forceUpdate();
|
|
39
40
|
constructor(e) {
|
|
40
41
|
super(e), this.state = { actionsAnchorEl: null };
|
|
41
42
|
}
|
|
@@ -43,13 +44,13 @@ var { translator: h } = f, g = a("div")(() => ({ alignSelf: "flex-end" })), _ =
|
|
|
43
44
|
this.setState({ actionsAnchorEl: null });
|
|
44
45
|
}
|
|
45
46
|
static propTypes = {
|
|
46
|
-
addCategory:
|
|
47
|
-
deleteCategory:
|
|
48
|
-
language:
|
|
49
|
-
categories:
|
|
47
|
+
addCategory: a.func.isRequired,
|
|
48
|
+
deleteCategory: a.func.isRequired,
|
|
49
|
+
language: a.string,
|
|
50
|
+
categories: a.array
|
|
50
51
|
};
|
|
51
|
-
triggerId =
|
|
52
|
-
menuId =
|
|
52
|
+
triggerId = c("chart-actions");
|
|
53
|
+
menuId = c("chart-actions-menu");
|
|
53
54
|
handleActionsClick = (e) => {
|
|
54
55
|
this.setState({ actionsAnchorEl: e.currentTarget });
|
|
55
56
|
};
|
|
@@ -65,22 +66,22 @@ var { translator: h } = f, g = a("div")(() => ({ alignSelf: "flex-end" })), _ =
|
|
|
65
66
|
t(e), this.handleActionsClose();
|
|
66
67
|
};
|
|
67
68
|
render() {
|
|
68
|
-
let { categories:
|
|
69
|
+
let { categories: n, language: r } = this.props, { actionsAnchorEl: i } = this.state, a = !!i, o = t.forLocale(r, this.relabel), s = (n || []).map((e, t) => ({
|
|
69
70
|
category: e,
|
|
70
71
|
index: t
|
|
71
72
|
})).filter(({ category: e }) => e.deletable && !e.correctness);
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ d(h, { children: [/* @__PURE__ */ u(g, {
|
|
73
74
|
type: "button",
|
|
74
75
|
id: this.triggerId,
|
|
75
76
|
"aria-haspopup": "menu",
|
|
76
|
-
"aria-expanded":
|
|
77
|
-
"aria-controls":
|
|
77
|
+
"aria-expanded": a,
|
|
78
|
+
"aria-controls": a ? this.menuId : void 0,
|
|
78
79
|
onClick: this.handleActionsClick,
|
|
79
|
-
children:
|
|
80
|
-
}), /* @__PURE__ */
|
|
80
|
+
children: o.t("actions")
|
|
81
|
+
}), /* @__PURE__ */ d(p, {
|
|
81
82
|
id: this.menuId,
|
|
82
|
-
open:
|
|
83
|
-
anchorEl:
|
|
83
|
+
open: a,
|
|
84
|
+
anchorEl: i,
|
|
84
85
|
onClose: this.handleActionsClose,
|
|
85
86
|
variant: "menu",
|
|
86
87
|
anchorOrigin: {
|
|
@@ -92,23 +93,23 @@ var { translator: h } = f, g = a("div")(() => ({ alignSelf: "flex-end" })), _ =
|
|
|
92
93
|
horizontal: "left"
|
|
93
94
|
},
|
|
94
95
|
slotProps: { list: { "aria-labelledby": this.triggerId } },
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ d(_, {
|
|
96
97
|
onClick: () => this.handleAddCategory(),
|
|
97
|
-
children: ["+ ",
|
|
98
|
-
}),
|
|
99
|
-
let
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
"aria-label":
|
|
102
|
-
onClick: () => this.handleDeleteCategory(
|
|
103
|
-
children:
|
|
104
|
-
`${
|
|
105
|
-
/* @__PURE__ */
|
|
98
|
+
children: ["+ ", o.t("add")]
|
|
99
|
+
}), s.map(({ category: t, index: n }) => {
|
|
100
|
+
let r = o.t("delete"), i = e(t.label), a = t.label || o.t("newLabel");
|
|
101
|
+
return /* @__PURE__ */ u(_, {
|
|
102
|
+
"aria-label": i ? `${r} <${t.label.trim()}>` : void 0,
|
|
103
|
+
onClick: () => this.handleDeleteCategory(n),
|
|
104
|
+
children: i ? /* @__PURE__ */ d(l, { children: [
|
|
105
|
+
`${r} <`,
|
|
106
|
+
/* @__PURE__ */ u(v, { math: i }),
|
|
106
107
|
">"
|
|
107
|
-
] }) : `${
|
|
108
|
-
},
|
|
108
|
+
] }) : `${r} <${a}>`
|
|
109
|
+
}, n);
|
|
109
110
|
})]
|
|
110
111
|
})] });
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
114
|
//#endregion
|
|
114
|
-
export {
|
|
115
|
+
export { y as ActionsButton, y as default };
|
package/dist/axes.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export declare class TickComponent extends React.Component {
|
|
|
5
5
|
defineChart: PropTypes.Requireable<boolean>;
|
|
6
6
|
error: PropTypes.Requireable<any>;
|
|
7
7
|
};
|
|
8
|
+
/** Re-renders once the language's catalog lands, for an element that did not preload it. */
|
|
9
|
+
relabel: () => void;
|
|
8
10
|
constructor(props: any);
|
|
9
11
|
componentDidUpdate(prevProps: any): void;
|
|
10
12
|
handleAlertDialog: (open: any, callback: any) => void;
|