@nice2dev/ui 1.3.7 → 1.3.8

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 (59) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/NiceCodeEditor-B5YtKZOe.js +1222 -0
  3. package/dist/NiceCodeEditor-D0QZW88r.cjs +268 -0
  4. package/dist/NiceColorPicker-Bzvei7D6.cjs +1 -0
  5. package/dist/NiceColorPicker-DzzJhSXT.js +552 -0
  6. package/dist/NiceDataGrid-BSaBBoNr.js +2267 -0
  7. package/dist/NiceDataGrid-C_E6zIGS.cjs +10 -0
  8. package/dist/NiceForm-D2P6XuaT.cjs +1 -0
  9. package/dist/NiceForm-_kaB4Ikt.js +5017 -0
  10. package/dist/NiceHtmlEditor-CBCJdjmy.cjs +10 -0
  11. package/dist/NiceHtmlEditor-DfkdSxL3.js +901 -0
  12. package/dist/NiceLoginForm-BFvbroGJ.js +820 -0
  13. package/dist/NiceLoginForm-FGf32sro.cjs +1 -0
  14. package/dist/NiceMention-CctjYriS.cjs +430 -0
  15. package/dist/NiceMention-umOghLCf.js +11653 -0
  16. package/dist/NiceModal-BRVzjuUN.cjs +1 -0
  17. package/dist/NiceModal-CU9FqzIH.js +83 -0
  18. package/dist/NiceModuleLifecyclePanel-DQT_forg.js +7404 -0
  19. package/dist/NiceModuleLifecyclePanel-DtOlPChV.cjs +1 -0
  20. package/dist/NicePagination-CK4ZJgu4.cjs +1 -0
  21. package/dist/NicePagination-flHgG-FT.js +200 -0
  22. package/dist/NicePivotGrid-99ZeQ9j6.js +1180 -0
  23. package/dist/NicePivotGrid-CpsBxUhq.cjs +152 -0
  24. package/dist/NiceSavedQueryPanel-Br1LQR7u.js +5311 -0
  25. package/dist/NiceSavedQueryPanel-C4SU6W22.cjs +586 -0
  26. package/dist/NiceScheduler-CeYqH0Ux.cjs +5 -0
  27. package/dist/NiceScheduler-yTpVRxfe.js +1710 -0
  28. package/dist/NiceSelect-C3NqDYwR.js +495 -0
  29. package/dist/NiceSelect-CTwSAb8G.cjs +1 -0
  30. package/dist/charts-B0tHOpJ7.cjs +768 -0
  31. package/dist/charts-C3u-VyJj.js +5019 -0
  32. package/dist/charts.cjs +1 -1
  33. package/dist/charts.mjs +1 -1
  34. package/dist/core-lazy-Bglo0hFt.cjs +1 -0
  35. package/dist/core-lazy-CRBgQkQl.js +351 -0
  36. package/dist/data.cjs +1 -1
  37. package/dist/data.mjs +3 -3
  38. package/dist/devops-Bzp3ZqZ3.cjs +18 -0
  39. package/dist/devops-fLElpPvD.js +9128 -0
  40. package/dist/devops.cjs +1 -1
  41. package/dist/devops.mjs +1 -1
  42. package/dist/editors.cjs +1 -1
  43. package/dist/editors.d.ts +5 -0
  44. package/dist/editors.mjs +7 -7
  45. package/dist/feedback.cjs +1 -1
  46. package/dist/feedback.mjs +3 -3
  47. package/dist/index.cjs +251 -251
  48. package/dist/index.d.ts +76 -9
  49. package/dist/index.mjs +15550 -15248
  50. package/dist/lazy.cjs +1 -1
  51. package/dist/lazy.mjs +18 -18
  52. package/dist/navigation.cjs +1 -1
  53. package/dist/navigation.d.ts +42 -3
  54. package/dist/navigation.mjs +2 -2
  55. package/dist/no-code-Bt7SWzsN.js +8318 -0
  56. package/dist/no-code-DnT061qn.cjs +331 -0
  57. package/dist/no-code.cjs +1 -1
  58. package/dist/no-code.mjs +1 -1
  59. package/package.json +4 -4
@@ -0,0 +1,200 @@
1
+ import { jsxs as g, jsx as e } from "react/jsx-runtime";
2
+ import { useControllableState as $, useNiceTranslation as w, useIntent as F, useInputHints as H, NiceIcon as f, NiceControlHint as y } from "@nice2dev/ui-core";
3
+ import { useId as T, useRef as V } from "react";
4
+ import { a as G } from "./no-code-Bt7SWzsN.js";
5
+ function S(u, o, t) {
6
+ const r = [];
7
+ if (o <= 1)
8
+ return o === 1 && r.push(1), r;
9
+ const m = Math.max(2, u - t), b = Math.min(o - 1, u + t);
10
+ r.push(1), m > 2 && r.push("dots");
11
+ for (let p = m; p <= b; p++)
12
+ r.push(p);
13
+ return b < o - 1 && r.push("dots"), r.push(o), r;
14
+ }
15
+ const E = ({
16
+ page: u,
17
+ defaultPage: o,
18
+ totalPages: t,
19
+ onChange: r,
20
+ showInfo: m = !0,
21
+ siblingCount: b = 2,
22
+ size: p = "md",
23
+ showFirstLast: N,
24
+ showJumpInput: k,
25
+ jumpInputLabel: C,
26
+ showPageSize: P,
27
+ pageSizeOptions: d,
28
+ pageSize: I,
29
+ onPageSizeChange: M,
30
+ disabled: c,
31
+ className: R,
32
+ style: j
33
+ }) => {
34
+ const [a, l] = $({
35
+ value: u,
36
+ defaultValue: o,
37
+ fallbackValue: 1,
38
+ onChange: r,
39
+ componentName: "NicePagination"
40
+ }), { t: i } = w(), z = S(a, t, b), v = T(), h = V(null), x = !c && a > 1, _ = !c && a < t;
41
+ return F(
42
+ ["pagePrev", "pageNext"],
43
+ (n) => {
44
+ const s = n.intent === "pageNext";
45
+ if (s ? !_ : !x)
46
+ return !1;
47
+ l(a + (s ? 1 : -1));
48
+ },
49
+ { ref: h }
50
+ ), H(h, [
51
+ { intent: "pagePrev", label: i("pagination.previous", "Previous") },
52
+ { intent: "pageNext", label: i("pagination.next", "Next") }
53
+ ]), /* @__PURE__ */ g(
54
+ "nav",
55
+ {
56
+ ref: h,
57
+ className: `nice-pagination nice-pagination--${p} ${R || ""}`,
58
+ style: j,
59
+ "aria-label": i("pagination.ariaLabel", "Pagination"),
60
+ children: [
61
+ N && /* @__PURE__ */ e(
62
+ "button",
63
+ {
64
+ type: "button",
65
+ className: "nice-pagination__btn",
66
+ disabled: c || a <= 1,
67
+ onClick: () => l(1),
68
+ "aria-label": i("pagination.first", "First"),
69
+ title: i("pagination.first", "First"),
70
+ children: /* @__PURE__ */ e(f, { name: "skip-back", size: 14 })
71
+ }
72
+ ),
73
+ /* @__PURE__ */ g(
74
+ "button",
75
+ {
76
+ type: "button",
77
+ className: "nice-pagination__btn",
78
+ disabled: !x,
79
+ onClick: () => l(a - 1),
80
+ "aria-label": i("pagination.previous", "Previous"),
81
+ children: [
82
+ /* @__PURE__ */ e(f, { name: "chevron-left", size: 14 }),
83
+ /* @__PURE__ */ e(y, { intent: "pagePrev" })
84
+ ]
85
+ }
86
+ ),
87
+ z.map(
88
+ (n, s) => n === "dots" ? /* @__PURE__ */ e("span", { className: "nice-pagination__ellipsis", "aria-hidden": "true", children: "…" }, `dots-${s}`) : /* @__PURE__ */ e(
89
+ "button",
90
+ {
91
+ type: "button",
92
+ className: `nice-pagination__btn ${n === a ? "nice-pagination__btn--active" : ""}`,
93
+ disabled: c,
94
+ onClick: () => l(n),
95
+ "aria-current": n === a ? "page" : void 0,
96
+ "aria-label": i("pagination.page", "Page {page}").replace("{page}", String(n)),
97
+ children: n
98
+ },
99
+ n
100
+ )
101
+ ),
102
+ /* @__PURE__ */ g(
103
+ "button",
104
+ {
105
+ type: "button",
106
+ className: "nice-pagination__btn",
107
+ disabled: !_,
108
+ onClick: () => l(a + 1),
109
+ "aria-label": i("pagination.next", "Next"),
110
+ children: [
111
+ /* @__PURE__ */ e(f, { name: "chevron-right", size: 14 }),
112
+ /* @__PURE__ */ e(y, { intent: "pageNext" })
113
+ ]
114
+ }
115
+ ),
116
+ N && /* @__PURE__ */ e(
117
+ "button",
118
+ {
119
+ type: "button",
120
+ className: "nice-pagination__btn",
121
+ disabled: c || a >= t,
122
+ onClick: () => l(t),
123
+ "aria-label": i("pagination.last", "Last"),
124
+ title: i("pagination.last", "Last"),
125
+ children: /* @__PURE__ */ e(f, { name: "skip-forward", size: 14 })
126
+ }
127
+ ),
128
+ m && // announced when the page changes
129
+ /* @__PURE__ */ g("span", { className: "nice-pagination__info", "aria-live": "polite", children: [
130
+ a,
131
+ " / ",
132
+ t
133
+ ] }),
134
+ k && /* @__PURE__ */ g(
135
+ "span",
136
+ {
137
+ className: "nice-pagination__jump",
138
+ style: { display: "inline-flex", alignItems: "center", gap: 6, marginLeft: 8 },
139
+ children: [
140
+ /* @__PURE__ */ e(
141
+ "label",
142
+ {
143
+ htmlFor: v,
144
+ style: { fontSize: "0.85rem", color: "var(--nice-text-secondary)" },
145
+ children: C ?? i("pagination.goTo", "Go to")
146
+ }
147
+ ),
148
+ /* @__PURE__ */ e(
149
+ G,
150
+ {
151
+ id: v,
152
+ size: p === "lg" ? "md" : "sm",
153
+ min: 1,
154
+ max: t,
155
+ step: 1,
156
+ value: a,
157
+ disabled: c,
158
+ onChange: (n) => {
159
+ const s = typeof n == "number" ? n : Number(n);
160
+ if (!Number.isNaN(s)) {
161
+ const L = Math.max(1, Math.min(t, Math.floor(s)));
162
+ l(L);
163
+ }
164
+ }
165
+ }
166
+ )
167
+ ]
168
+ }
169
+ ),
170
+ P && d && d.length > 0 && /* @__PURE__ */ e(
171
+ "select",
172
+ {
173
+ className: "nice-pagination__size",
174
+ value: I ?? d[0],
175
+ disabled: c,
176
+ onChange: (n) => M?.(Number(n.target.value)),
177
+ style: {
178
+ marginLeft: 8,
179
+ padding: "4px 8px",
180
+ border: "1px solid var(--nice-border-color)",
181
+ borderRadius: 6,
182
+ background: "var(--nice-bg-primary)",
183
+ color: "var(--nice-text-primary)",
184
+ font: "inherit",
185
+ fontSize: "0.85rem"
186
+ },
187
+ "aria-label": i("pagination.rowsPerPage", "Rows per page"),
188
+ children: d.map((n) => /* @__PURE__ */ g("option", { value: n, children: [
189
+ n,
190
+ " / page"
191
+ ] }, n))
192
+ }
193
+ )
194
+ ]
195
+ }
196
+ );
197
+ };
198
+ export {
199
+ E as N
200
+ };