@nice2dev/ui 1.0.29 → 1.0.30

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 (63) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/NiceBackupStatusBadge.doc-Bx2bFmBQ.cjs +1 -0
  3. package/dist/NiceBackupStatusBadge.doc-CdDxIQ-M.js +25 -0
  4. package/dist/NiceConfirmDialog-BiTJVR4-.js +81 -0
  5. package/dist/NiceConfirmDialog-Bjw_rN4o.cjs +1 -0
  6. package/dist/NiceErrorBoundary-1H751jK7.cjs +1 -0
  7. package/dist/NiceErrorBoundary-B-txoU3Y.js +709 -0
  8. package/dist/NiceForm-DGUTmaZT.js +5014 -0
  9. package/dist/NiceForm-DmU-gmyv.cjs +382 -0
  10. package/dist/NiceModal-BClAtR5T.js +95 -0
  11. package/dist/NiceModal-iKwtagFB.cjs +1 -0
  12. package/dist/NiceModuleLifecyclePanel-BO8Hw_W9.js +7619 -0
  13. package/dist/NiceModuleLifecyclePanel-Ch7HRRoy.cjs +1 -0
  14. package/dist/NicePagination-BVo-4KAD.js +172 -0
  15. package/dist/NicePagination-CaohvQsY.cjs +1 -0
  16. package/dist/NicePinCodeInput-DsyLuc0b.cjs +696 -0
  17. package/dist/NicePinCodeInput-nuRCN-9R.js +13223 -0
  18. package/dist/NiceSavedQueryPanel-BBFV4qiF.js +6969 -0
  19. package/dist/NiceSavedQueryPanel-CsiVNkCT.cjs +596 -0
  20. package/dist/NiceWindow-Cm9E6EAi.cjs +1 -0
  21. package/dist/NiceWindow-FMrVS7zo.js +1603 -0
  22. package/dist/charts-B90sSFeJ.cjs +761 -0
  23. package/dist/charts-DaLf19vS.js +4671 -0
  24. package/dist/charts.cjs +1 -1
  25. package/dist/charts.mjs +1 -1
  26. package/dist/core-BUTtIHg0.js +27766 -0
  27. package/dist/core-CESNSRyS.cjs +122 -0
  28. package/dist/data-branching-ByQdcjKO.cjs +1 -0
  29. package/dist/data-branching-psTzlcrT.js +6255 -0
  30. package/dist/data-branching.cjs +1 -1
  31. package/dist/data-branching.mjs +1 -1
  32. package/dist/data.cjs +1 -1
  33. package/dist/data.mjs +1 -1
  34. package/dist/devops-D7bQ3rE4.cjs +17 -0
  35. package/dist/devops-jCmpD6O-.js +8165 -0
  36. package/dist/devops.cjs +1 -1
  37. package/dist/devops.mjs +3 -3
  38. package/dist/editors.cjs +1 -1
  39. package/dist/editors.d.ts +4 -0
  40. package/dist/editors.mjs +3 -3
  41. package/dist/feedback.cjs +1 -1
  42. package/dist/feedback.mjs +3 -3
  43. package/dist/index-BpixglWg.js +69337 -0
  44. package/dist/index-DLR-aWZR.cjs +5506 -0
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.css +1 -1
  47. package/dist/index.d.ts +359 -145
  48. package/dist/index.mjs +986 -976
  49. package/dist/lazy.cjs +1 -1
  50. package/dist/lazy.mjs +24 -24
  51. package/dist/navigation.cjs +1 -1
  52. package/dist/navigation.mjs +146 -146
  53. package/dist/no-code-BHo5WrXr.js +7425 -0
  54. package/dist/no-code-DyA_1_Th.cjs +332 -0
  55. package/dist/no-code.cjs +1 -1
  56. package/dist/no-code.mjs +1 -1
  57. package/dist/overlays.cjs +1 -1
  58. package/dist/overlays.d.ts +4 -0
  59. package/dist/overlays.mjs +66 -66
  60. package/dist/pickerCommons-BEc3pZ_s.js +2044 -0
  61. package/dist/pickerCommons-CrITwM88.cjs +1 -0
  62. package/dist/style.css +1 -1
  63. package/package.json +2 -2
@@ -0,0 +1,172 @@
1
+ import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
+ import { o as u } from "./core-BUTtIHg0.js";
3
+ import { b as k } from "./pickerCommons-BEc3pZ_s.js";
4
+ function M(a, e, l) {
5
+ const r = [];
6
+ if (e <= 1)
7
+ return e === 1 && r.push(1), r;
8
+ const s = Math.max(2, a - l), c = Math.min(e - 1, a + l);
9
+ r.push(1), s > 2 && r.push("dots");
10
+ for (let o = s; o <= c; o++)
11
+ r.push(o);
12
+ return c < e - 1 && r.push("dots"), r.push(e), r;
13
+ }
14
+ const z = ({
15
+ page: a,
16
+ totalPages: e,
17
+ onChange: l,
18
+ showInfo: r,
19
+ siblingCount: s = 1,
20
+ size: c = "md",
21
+ showFirstLast: o,
22
+ showJumpInput: h,
23
+ jumpInputLabel: f,
24
+ showPageSize: b,
25
+ pageSizeOptions: d,
26
+ pageSize: N,
27
+ onPageSizeChange: _,
28
+ disabled: t,
29
+ className: v,
30
+ style: g
31
+ }) => {
32
+ const x = M(a, e, s);
33
+ return /* @__PURE__ */ m(
34
+ "nav",
35
+ {
36
+ className: `nice-pagination nice-pagination--${c} ${v || ""}`,
37
+ style: g,
38
+ "aria-label": "Pagination",
39
+ children: [
40
+ o && /* @__PURE__ */ i(
41
+ "button",
42
+ {
43
+ className: "nice-pagination__btn",
44
+ disabled: t || a <= 1,
45
+ onClick: () => l(1),
46
+ "aria-label": "First page",
47
+ title: "First page",
48
+ children: /* @__PURE__ */ i(u, { name: "chevron-left", size: 14 })
49
+ }
50
+ ),
51
+ /* @__PURE__ */ i(
52
+ "button",
53
+ {
54
+ className: "nice-pagination__btn",
55
+ disabled: t || a <= 1,
56
+ onClick: () => l(a - 1),
57
+ "aria-label": "Previous",
58
+ children: /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ i(
59
+ "path",
60
+ {
61
+ fillRule: "evenodd",
62
+ d: "M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",
63
+ clipRule: "evenodd"
64
+ }
65
+ ) })
66
+ }
67
+ ),
68
+ x.map(
69
+ (n, p) => n === "dots" ? /* @__PURE__ */ i("span", { className: "nice-pagination__ellipsis", children: "…" }, `dots-${p}`) : /* @__PURE__ */ i(
70
+ "button",
71
+ {
72
+ className: `nice-pagination__btn ${n === a ? "nice-pagination__btn--active" : ""}`,
73
+ disabled: t,
74
+ onClick: () => l(n),
75
+ "aria-current": n === a ? "page" : void 0,
76
+ children: n
77
+ },
78
+ n
79
+ )
80
+ ),
81
+ /* @__PURE__ */ i(
82
+ "button",
83
+ {
84
+ className: "nice-pagination__btn",
85
+ disabled: t || a >= e,
86
+ onClick: () => l(a + 1),
87
+ "aria-label": "Next",
88
+ children: /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ i(
89
+ "path",
90
+ {
91
+ fillRule: "evenodd",
92
+ d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
93
+ clipRule: "evenodd"
94
+ }
95
+ ) })
96
+ }
97
+ ),
98
+ o && /* @__PURE__ */ i(
99
+ "button",
100
+ {
101
+ className: "nice-pagination__btn",
102
+ disabled: t || a >= e,
103
+ onClick: () => l(e),
104
+ "aria-label": "Last page",
105
+ title: "Last page",
106
+ children: /* @__PURE__ */ i(u, { name: "skip-forward", size: 14 })
107
+ }
108
+ ),
109
+ r && /* @__PURE__ */ m("span", { className: "nice-pagination__info", children: [
110
+ a,
111
+ " / ",
112
+ e
113
+ ] }),
114
+ h && /* @__PURE__ */ m(
115
+ "span",
116
+ {
117
+ className: "nice-pagination__jump",
118
+ style: { display: "inline-flex", alignItems: "center", gap: 6, marginLeft: 8 },
119
+ children: [
120
+ /* @__PURE__ */ i("span", { style: { fontSize: "0.85rem", color: "var(--text-secondary)" }, children: f ?? "Go to" }),
121
+ /* @__PURE__ */ i(
122
+ k,
123
+ {
124
+ size: c === "lg" ? "md" : "sm",
125
+ min: 1,
126
+ max: e,
127
+ step: 1,
128
+ value: a,
129
+ disabled: t,
130
+ onChange: (n) => {
131
+ const p = typeof n == "number" ? n : Number(n);
132
+ if (!Number.isNaN(p)) {
133
+ const y = Math.max(1, Math.min(e, Math.floor(p)));
134
+ l(y);
135
+ }
136
+ }
137
+ }
138
+ )
139
+ ]
140
+ }
141
+ ),
142
+ b && d && d.length > 0 && /* @__PURE__ */ i(
143
+ "select",
144
+ {
145
+ className: "nice-pagination__size",
146
+ value: N ?? d[0],
147
+ disabled: t,
148
+ onChange: (n) => _?.(Number(n.target.value)),
149
+ style: {
150
+ marginLeft: 8,
151
+ padding: "4px 8px",
152
+ border: "1px solid var(--border-color)",
153
+ borderRadius: 6,
154
+ background: "var(--bg-primary)",
155
+ color: "var(--text-primary)",
156
+ font: "inherit",
157
+ fontSize: "0.85rem"
158
+ },
159
+ "aria-label": "Rows per page",
160
+ children: d.map((n) => /* @__PURE__ */ m("option", { value: n, children: [
161
+ n,
162
+ " / page"
163
+ ] }, n))
164
+ }
165
+ )
166
+ ]
167
+ }
168
+ );
169
+ };
170
+ export {
171
+ z as N
172
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("react/jsx-runtime"),p=require("./core-CESNSRyS.cjs"),g=require("./pickerCommons-CrITwM88.cjs");function y(e,a,s){const r=[];if(a<=1)return a===1&&r.push(1),r;const o=Math.max(2,e-s),c=Math.min(a-1,e+s);r.push(1),o>2&&r.push("dots");for(let l=o;l<=c;l++)r.push(l);return c<a-1&&r.push("dots"),r.push(a),r}const R=({page:e,totalPages:a,onChange:s,showInfo:r,siblingCount:o=1,size:c="md",showFirstLast:l,showJumpInput:h,jumpInputLabel:m,showPageSize:x,pageSizeOptions:u,pageSize:b,onPageSizeChange:f,disabled:t,className:j,style:N})=>{const _=y(e,a,o);return n.jsxs("nav",{className:`nice-pagination nice-pagination--${c} ${j||""}`,style:N,"aria-label":"Pagination",children:[l&&n.jsx("button",{className:"nice-pagination__btn",disabled:t||e<=1,onClick:()=>s(1),"aria-label":"First page",title:"First page",children:n.jsx(p.oa,{name:"chevron-left",size:14})}),n.jsx("button",{className:"nice-pagination__btn",disabled:t||e<=1,onClick:()=>s(e-1),"aria-label":"Previous",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",clipRule:"evenodd"})})}),_.map((i,d)=>i==="dots"?n.jsx("span",{className:"nice-pagination__ellipsis",children:"…"},`dots-${d}`):n.jsx("button",{className:`nice-pagination__btn ${i===e?"nice-pagination__btn--active":""}`,disabled:t,onClick:()=>s(i),"aria-current":i===e?"page":void 0,children:i},i)),n.jsx("button",{className:"nice-pagination__btn",disabled:t||e>=a,onClick:()=>s(e+1),"aria-label":"Next",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"currentColor",children:n.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})})}),l&&n.jsx("button",{className:"nice-pagination__btn",disabled:t||e>=a,onClick:()=>s(a),"aria-label":"Last page",title:"Last page",children:n.jsx(p.oa,{name:"skip-forward",size:14})}),r&&n.jsxs("span",{className:"nice-pagination__info",children:[e," / ",a]}),h&&n.jsxs("span",{className:"nice-pagination__jump",style:{display:"inline-flex",alignItems:"center",gap:6,marginLeft:8},children:[n.jsx("span",{style:{fontSize:"0.85rem",color:"var(--text-secondary)"},children:m??"Go to"}),n.jsx(g.NiceNumberInput,{size:c==="lg"?"md":"sm",min:1,max:a,step:1,value:e,disabled:t,onChange:i=>{const d=typeof i=="number"?i:Number(i);if(!Number.isNaN(d)){const v=Math.max(1,Math.min(a,Math.floor(d)));s(v)}}})]}),x&&u&&u.length>0&&n.jsx("select",{className:"nice-pagination__size",value:b??u[0],disabled:t,onChange:i=>f?.(Number(i.target.value)),style:{marginLeft:8,padding:"4px 8px",border:"1px solid var(--border-color)",borderRadius:6,background:"var(--bg-primary)",color:"var(--text-primary)",font:"inherit",fontSize:"0.85rem"},"aria-label":"Rows per page",children:u.map(i=>n.jsxs("option",{value:i,children:[i," / page"]},i))})]})};exports.NicePagination=R;