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