@nice2dev/ui 1.4.1 → 1.4.2
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/CHANGELOG.md +44 -0
- package/dist/NiceCodeEditor-DhdjnDLV.cjs +289 -0
- package/dist/{NiceDataGrid-BT6iCUgP.cjs → NiceDataGrid-CrKDzMM1.cjs} +1 -1
- package/dist/{NiceForm-Bysp66Ef.cjs → NiceForm-CT9hEXpc.cjs} +1 -1
- package/dist/NiceLoginForm-C2-WgRn0.cjs +1 -0
- package/dist/NiceMention-BZEHqPrf.cjs +432 -0
- package/dist/NiceModuleLifecyclePanel-DKlqKPy2.cjs +1 -0
- package/dist/{NiceSavedQueryPanel-BbznsXFd.cjs → NiceSavedQueryPanel-C5Ab_NWx.cjs} +1 -1
- package/dist/NiceScheduler-BZQAKEVF.cjs +5 -0
- package/dist/{NiceWindow-pgR4c-kQ.cjs → NiceWindow-BklnkBpu.cjs} +1 -1
- package/dist/charts/NiceLinearGauge.mjs +96 -83
- package/dist/charts/NicePolarChart.mjs +47 -47
- package/dist/charts-BzlvCCg9.cjs +768 -0
- package/dist/charts.cjs +1 -1
- package/dist/{core-lazy-CL4ZIxF-.cjs → core-lazy-VTd5zfoZ.cjs} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/display/NiceAvatar.mjs +40 -24
- package/dist/editors/pickers/NiceDateRangeBox.mjs +92 -92
- package/dist/editors/pickers/NiceDateTimePicker.mjs +173 -173
- package/dist/editors/rich/NiceCodeEditor.mjs +645 -584
- package/dist/editors/rich/NiceDocumentEditor.mjs +277 -254
- package/dist/editors.cjs +1 -1
- package/dist/feedback/NiceDrawer.mjs +15 -15
- package/dist/feedback.cjs +1 -1
- package/dist/index.cjs +202 -202
- package/dist/index.d.ts +18 -0
- package/dist/lazy.cjs +1 -1
- package/dist/navigation/NiceNavShell.mjs +646 -593
- package/dist/navigation/NiceSidebarNav.mjs +844 -823
- package/dist/navigation.cjs +1 -1
- package/dist/overlays/NiceWindow.mjs +91 -91
- package/dist/overlays.cjs +1 -1
- package/dist/planning/NiceScheduler.mjs +170 -169
- package/dist/planning/NiceSchedulerViews.mjs +242 -233
- package/dist/style.css +2 -2
- package/dist/utility/intlNames.mjs +26 -16
- package/package.json +4 -4
- package/dist/NiceCodeEditor-D0QZW88r.cjs +0 -268
- package/dist/NiceLoginForm-FGf32sro.cjs +0 -1
- package/dist/NiceMention-sc8W-DwH.cjs +0 -430
- package/dist/NiceModuleLifecyclePanel-DBQPCa_V.cjs +0 -1
- package/dist/NiceScheduler-3Ez0zSQJ.cjs +0 -5
- package/dist/charts-B0tHOpJ7.cjs +0 -768
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { CHART_COLORS as
|
|
3
|
-
const
|
|
4
|
-
series:
|
|
5
|
-
categories:
|
|
1
|
+
import { jsx as c, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { CHART_COLORS as h } from "./colors.mjs";
|
|
3
|
+
const R = [], T = [], B = ({
|
|
4
|
+
series: m = R,
|
|
5
|
+
categories: x = T,
|
|
6
6
|
width: f = 400,
|
|
7
|
-
height:
|
|
8
|
-
maxValue:
|
|
7
|
+
height: p = 400,
|
|
8
|
+
maxValue: N,
|
|
9
9
|
title: g,
|
|
10
10
|
showLegend: M = !0,
|
|
11
|
-
className:
|
|
12
|
-
style:
|
|
13
|
-
testId:
|
|
14
|
-
"data-testid":
|
|
11
|
+
className: v,
|
|
12
|
+
style: A,
|
|
13
|
+
testId: I,
|
|
14
|
+
"data-testid": S
|
|
15
15
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
const a = t *
|
|
18
|
-
return { x: s +
|
|
16
|
+
const u = g ? 44 : 0, $ = p - (M ? 30 : 0) - u, s = f / 2, y = u + $ / 2, P = Math.min(s, $ / 2) - 60, b = x.length, _ = N ?? Math.max(...m.flatMap((t) => t.data), 1), k = Math.PI * 2 / b, E = 5, i = (t, n) => {
|
|
17
|
+
const a = t * k - Math.PI / 2, o = n / _ * P;
|
|
18
|
+
return { x: s + o * Math.cos(a), y: y + o * Math.sin(a) };
|
|
19
19
|
};
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ c(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
className: `nice-polarchart ${
|
|
24
|
-
style:
|
|
25
|
-
"data-testid":
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
-
g && /* @__PURE__ */
|
|
28
|
-
Array.from({ length:
|
|
29
|
-
const a =
|
|
30
|
-
return /* @__PURE__ */
|
|
23
|
+
className: `nice-polarchart ${v || ""}`,
|
|
24
|
+
style: A,
|
|
25
|
+
"data-testid": S ?? I,
|
|
26
|
+
children: /* @__PURE__ */ d("svg", { width: f, height: p, className: "nice-polarchart__svg", children: [
|
|
27
|
+
g && /* @__PURE__ */ c("text", { x: s, y: 20, textAnchor: "middle", className: "nice-chart__title", children: g }),
|
|
28
|
+
Array.from({ length: E }, (t, n) => {
|
|
29
|
+
const a = P * ((n + 1) / E);
|
|
30
|
+
return /* @__PURE__ */ c(
|
|
31
31
|
"circle",
|
|
32
32
|
{
|
|
33
33
|
cx: s,
|
|
34
|
-
cy:
|
|
34
|
+
cy: y,
|
|
35
35
|
r: a,
|
|
36
36
|
fill: "none",
|
|
37
37
|
stroke: "var(--nice-border-color, #ddd)",
|
|
@@ -40,63 +40,63 @@ const C = [], O = [], j = ({
|
|
|
40
40
|
n
|
|
41
41
|
);
|
|
42
42
|
}),
|
|
43
|
-
|
|
44
|
-
const a =
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
43
|
+
x.map((t, n) => {
|
|
44
|
+
const a = i(n, _), o = i(n, _ * 1.22), l = n * k - Math.PI / 2, r = Math.cos(l), e = Math.sin(l), C = r > 0.2 ? "start" : r < -0.2 ? "end" : "middle", O = e > 0.2 ? "hanging" : e < -0.2 ? "auto" : "middle";
|
|
45
|
+
return /* @__PURE__ */ d("g", { children: [
|
|
46
|
+
/* @__PURE__ */ c(
|
|
47
47
|
"line",
|
|
48
48
|
{
|
|
49
49
|
x1: s,
|
|
50
|
-
y1:
|
|
50
|
+
y1: y,
|
|
51
51
|
x2: a.x,
|
|
52
52
|
y2: a.y,
|
|
53
53
|
stroke: "var(--nice-border-color, #ddd)",
|
|
54
54
|
strokeWidth: 0.5
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ c(
|
|
58
58
|
"text",
|
|
59
59
|
{
|
|
60
|
-
x:
|
|
61
|
-
y:
|
|
62
|
-
textAnchor:
|
|
63
|
-
dominantBaseline:
|
|
60
|
+
x: o.x,
|
|
61
|
+
y: o.y,
|
|
62
|
+
textAnchor: C,
|
|
63
|
+
dominantBaseline: O,
|
|
64
64
|
className: "nice-chart__axis-label nice-chart__axis-label--polar",
|
|
65
65
|
children: t
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
] }, n);
|
|
69
69
|
}),
|
|
70
|
-
|
|
71
|
-
const a = t.color ||
|
|
72
|
-
const e =
|
|
70
|
+
m.map((t, n) => {
|
|
71
|
+
const a = t.color || h[n % h.length], o = t.data.map((l, r) => {
|
|
72
|
+
const e = i(r, l);
|
|
73
73
|
return `${e.x},${e.y}`;
|
|
74
74
|
}).join(" ");
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ d("g", { children: [
|
|
76
|
+
/* @__PURE__ */ c(
|
|
77
77
|
"polygon",
|
|
78
78
|
{
|
|
79
|
-
points:
|
|
79
|
+
points: o,
|
|
80
80
|
fill: t.fill !== !1 ? a : "none",
|
|
81
81
|
fillOpacity: 0.15,
|
|
82
82
|
stroke: a,
|
|
83
83
|
strokeWidth: 2
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
|
-
t.data.map((
|
|
87
|
-
const e =
|
|
88
|
-
return /* @__PURE__ */
|
|
86
|
+
t.data.map((l, r) => {
|
|
87
|
+
const e = i(r, l);
|
|
88
|
+
return /* @__PURE__ */ c("circle", { cx: e.x, cy: e.y, r: 3, fill: a, children: /* @__PURE__ */ c("title", { children: `${t.name} - ${x[r]}: ${l}` }) }, r);
|
|
89
89
|
})
|
|
90
90
|
] }, t.name);
|
|
91
91
|
}),
|
|
92
|
-
M && /* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
92
|
+
M && /* @__PURE__ */ c("g", { transform: `translate(10, ${p - 25})`, children: m.map((t, n) => /* @__PURE__ */ d("g", { transform: `translate(${n * 100}, 0)`, children: [
|
|
93
|
+
/* @__PURE__ */ c("rect", { width: 10, height: 10, rx: 2, fill: t.color || h[n % h.length] }),
|
|
94
|
+
/* @__PURE__ */ c("text", { x: 14, y: 9, className: "nice-chart__legend-text", children: t.name })
|
|
95
95
|
] }, n)) })
|
|
96
96
|
] })
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
99
|
};
|
|
100
100
|
export {
|
|
101
|
-
|
|
101
|
+
B as NicePolarChart
|
|
102
102
|
};
|