dhx-react-suite 1.1.9 → 1.2.1
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/dhx-react-suite.js +1699 -1554
- package/dist/dhx-react-suite.umd.cjs +2 -3
- package/dist/index.d.ts +61 -2
- package/package.json +7 -2
- package/dist/dhx-react-suite.js.map +0 -1
- package/dist/dhx-react-suite.umd.cjs.map +0 -1
package/dist/dhx-react-suite.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useEffect as J, useRef as
|
|
3
|
-
import { Tooltip as
|
|
1
|
+
import { jsxs as x, jsx as t, Fragment as Ye } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as J, useRef as ie, useCallback as ae, useState as B, useMemo as ue, createContext as Ze, useContext as et } from "react";
|
|
3
|
+
import { Tooltip as tt, Legend as rt, CartesianGrid as nt, XAxis as We, YAxis as Be, BarChart as ot, Bar as it, LineChart as lt, Line as st, AreaChart as at, Area as dt, PieChart as ct, Pie as ut, Cell as pt, RadarChart as ht, PolarGrid as ft, PolarAngleAxis as gt, PolarRadiusAxis as xt, Radar as yt, ScatterChart as bt, Scatter as mt, ResponsiveContainer as vt, Treemap as St } from "recharts";
|
|
4
|
+
import { Richtext as kt } from "@dhx/trial-richtext";
|
|
4
5
|
const e = {
|
|
5
6
|
primary: "#0288d1",
|
|
6
7
|
primaryDk: "#01579b",
|
|
@@ -20,11 +21,11 @@ const e = {
|
|
|
20
21
|
r: "4px",
|
|
21
22
|
rMd: "8px",
|
|
22
23
|
font: "'Segoe UI', system-ui, -apple-system, sans-serif"
|
|
23
|
-
},
|
|
24
|
-
function
|
|
25
|
-
if (typeof document > "u" || document.getElementById(
|
|
26
|
-
const
|
|
27
|
-
|
|
24
|
+
}, He = "dhx-react-styles";
|
|
25
|
+
function Z() {
|
|
26
|
+
if (typeof document > "u" || document.getElementById(He)) return;
|
|
27
|
+
const r = document.createElement("style");
|
|
28
|
+
r.id = He, r.textContent = `
|
|
28
29
|
*,*::before,*::after{box-sizing:border-box}
|
|
29
30
|
.dhx{font-family:${e.font};font-size:14px;color:${e.text}}
|
|
30
31
|
.dhx *{box-sizing:border-box}
|
|
@@ -64,114 +65,114 @@ function Q() {
|
|
|
64
65
|
.dhx-tag-success{background:#e8f5e9;color:#1b5e20}
|
|
65
66
|
.dhx-tag-danger{background:#ffebee;color:#b71c1c}
|
|
66
67
|
.dhx-tag-warning{background:#fff3e0;color:#e65100}
|
|
67
|
-
`, document.head.appendChild(
|
|
68
|
+
`, document.head.appendChild(r);
|
|
68
69
|
}
|
|
69
|
-
const
|
|
70
|
+
const wt = {
|
|
70
71
|
sm: { height: 24, padding: "0 8px", fontSize: 12 },
|
|
71
72
|
md: {},
|
|
72
73
|
lg: { height: 38, padding: "0 18px", fontSize: 14 }
|
|
73
74
|
};
|
|
74
|
-
function
|
|
75
|
-
children:
|
|
75
|
+
function Ut({
|
|
76
|
+
children: r,
|
|
76
77
|
variant: i = "primary",
|
|
77
78
|
size: d = "md",
|
|
78
|
-
icon:
|
|
79
|
-
disabled:
|
|
80
|
-
onClick:
|
|
81
|
-
style:
|
|
79
|
+
icon: s,
|
|
80
|
+
disabled: f,
|
|
81
|
+
onClick: a,
|
|
82
|
+
style: u,
|
|
82
83
|
className: p = ""
|
|
83
84
|
}) {
|
|
84
|
-
return J(
|
|
85
|
+
return J(Z, []), /* @__PURE__ */ x(
|
|
85
86
|
"button",
|
|
86
87
|
{
|
|
87
88
|
className: `dhx dhx-btn dhx-btn-${i} ${p}`,
|
|
88
|
-
style: { ...
|
|
89
|
-
disabled:
|
|
90
|
-
onClick:
|
|
89
|
+
style: { ...wt[d], ...u },
|
|
90
|
+
disabled: f,
|
|
91
|
+
onClick: a,
|
|
91
92
|
children: [
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
s && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: s }),
|
|
94
|
+
r
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
);
|
|
97
98
|
}
|
|
98
|
-
function xe(
|
|
99
|
+
function xe(r, i) {
|
|
99
100
|
J(() => {
|
|
100
|
-
const d = (
|
|
101
|
-
|
|
101
|
+
const d = (s) => {
|
|
102
|
+
r.current && !r.current.contains(s.target) && i(s);
|
|
102
103
|
};
|
|
103
104
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
104
|
-
}, [
|
|
105
|
+
}, [r, i]);
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
-
const i =
|
|
107
|
+
function zt(r) {
|
|
108
|
+
const i = ie(!1), d = ie({ x: 0, y: 0, ox: 0, oy: 0 });
|
|
108
109
|
return ae(
|
|
109
|
-
(
|
|
110
|
-
i.current = !0, d.current = { x:
|
|
111
|
-
const
|
|
110
|
+
(s, f = 0, a = 0) => {
|
|
111
|
+
i.current = !0, d.current = { x: s.clientX, y: s.clientY, ox: f, oy: a };
|
|
112
|
+
const u = (y) => {
|
|
112
113
|
if (!i.current) return;
|
|
113
|
-
const { x:
|
|
114
|
-
|
|
114
|
+
const { x: M, y: o, ox: b, oy: $ } = d.current;
|
|
115
|
+
r(b + y.clientX - M, $ + y.clientY - o);
|
|
115
116
|
}, p = () => {
|
|
116
|
-
i.current = !1, document.removeEventListener("mousemove",
|
|
117
|
+
i.current = !1, document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", p);
|
|
117
118
|
};
|
|
118
|
-
document.addEventListener("mousemove",
|
|
119
|
+
document.addEventListener("mousemove", u), document.addEventListener("mouseup", p), s.preventDefault();
|
|
119
120
|
},
|
|
120
|
-
[
|
|
121
|
+
[r]
|
|
121
122
|
);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
const [
|
|
125
|
-
return /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", top: "calc(100% + 4px)", left: 0, minWidth: 180, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, boxShadow: e.shadowLg, zIndex: 200, padding: "4px 0", ...d }, children:
|
|
126
|
-
var
|
|
127
|
-
if (
|
|
128
|
-
const p =
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
124
|
+
function fe({ items: r, onSelect: i, style: d }) {
|
|
125
|
+
const [s, f] = B(null);
|
|
126
|
+
return /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", top: "calc(100% + 4px)", left: 0, minWidth: 180, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, boxShadow: e.shadowLg, zIndex: 200, padding: "4px 0", ...d }, children: r.map((a, u) => {
|
|
127
|
+
var y, M;
|
|
128
|
+
if (a.type === "separator") return /* @__PURE__ */ t("div", { style: { height: 1, background: e.border, margin: "4px 0" } }, u);
|
|
129
|
+
const p = s === u;
|
|
130
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative" }, onMouseEnter: () => f(u), onMouseLeave: () => f(null), children: [
|
|
131
|
+
/* @__PURE__ */ x(
|
|
131
132
|
"div",
|
|
132
133
|
{
|
|
133
134
|
onClick: () => {
|
|
134
|
-
var
|
|
135
|
-
return !
|
|
135
|
+
var o;
|
|
136
|
+
return !a.disabled && !((o = a.items) != null && o.length) && i(a);
|
|
136
137
|
},
|
|
137
|
-
style: { display: "flex", alignItems: "center", gap: 8, padding: "8px 14px", cursor:
|
|
138
|
+
style: { display: "flex", alignItems: "center", gap: 8, padding: "8px 14px", cursor: a.disabled ? "not-allowed" : "pointer", fontSize: 13, color: a.disabled ? e.textMut : e.text, background: p && !a.disabled ? e.bg : "transparent", opacity: a.disabled ? 0.5 : 1 },
|
|
138
139
|
children: [
|
|
139
|
-
|
|
140
|
-
/* @__PURE__ */ t("span", { style: { flex: 1 }, children:
|
|
141
|
-
|
|
142
|
-
(
|
|
140
|
+
a.icon && /* @__PURE__ */ t("span", { style: { fontSize: 15, width: 18, textAlign: "center" }, children: a.icon }),
|
|
141
|
+
/* @__PURE__ */ t("span", { style: { flex: 1 }, children: a.value || a.id }),
|
|
142
|
+
a.hotkey && /* @__PURE__ */ t("span", { style: { fontSize: 11, color: e.textMut }, children: a.hotkey }),
|
|
143
|
+
(y = a.items) != null && y.length ? /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: "▶" }) : null
|
|
143
144
|
]
|
|
144
145
|
}
|
|
145
146
|
),
|
|
146
|
-
p && ((
|
|
147
|
-
] },
|
|
147
|
+
p && ((M = a.items) != null && M.length) ? /* @__PURE__ */ t(fe, { items: a.items, onSelect: i, style: { position: "absolute", left: "100%", top: -4 } }) : null
|
|
148
|
+
] }, a.id || u);
|
|
148
149
|
}) });
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
-
const [
|
|
152
|
-
return J(
|
|
153
|
-
/* @__PURE__ */
|
|
151
|
+
function Qt({ items: r = [], label: i = "Menu", onSelect: d, style: s }) {
|
|
152
|
+
const [f, a] = B(!1), u = ie(null);
|
|
153
|
+
return J(Z, []), xe(u, ae(() => a(!1), [])), /* @__PURE__ */ x("div", { ref: u, className: "dhx", style: { position: "relative", display: "inline-block", ...s }, children: [
|
|
154
|
+
/* @__PURE__ */ x("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: () => a((p) => !p), children: [
|
|
154
155
|
i,
|
|
155
156
|
" ",
|
|
156
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 10 }, children:
|
|
157
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 10 }, children: f ? "▲" : "▼" })
|
|
157
158
|
] }),
|
|
158
|
-
|
|
159
|
-
d == null || d(p),
|
|
159
|
+
f && /* @__PURE__ */ t(fe, { items: r, onSelect: (p) => {
|
|
160
|
+
d == null || d(p), a(!1);
|
|
160
161
|
} })
|
|
161
162
|
] });
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
-
const [
|
|
165
|
-
return J(
|
|
166
|
-
p.preventDefault(),
|
|
164
|
+
function Zt({ items: r = [], onSelect: i, children: d }) {
|
|
165
|
+
const [s, f] = B(null), a = ie(null);
|
|
166
|
+
return J(Z, []), xe(a, ae(() => f(null), [])), /* @__PURE__ */ x("div", { ref: a, onContextMenu: (p) => {
|
|
167
|
+
p.preventDefault(), f({ x: p.clientX, y: p.clientY });
|
|
167
168
|
}, style: { position: "relative", display: "contents" }, children: [
|
|
168
169
|
d,
|
|
169
|
-
|
|
170
|
-
i == null || i(p),
|
|
170
|
+
s && /* @__PURE__ */ t("div", { style: { position: "fixed", left: s.x, top: s.y, zIndex: 9999 }, children: /* @__PURE__ */ t(fe, { items: r, onSelect: (p) => {
|
|
171
|
+
i == null || i(p), f(null);
|
|
171
172
|
} }) })
|
|
172
173
|
] });
|
|
173
174
|
}
|
|
174
|
-
function
|
|
175
|
+
function Ae({ count: r }) {
|
|
175
176
|
return /* @__PURE__ */ t("span", { style: {
|
|
176
177
|
position: "absolute",
|
|
177
178
|
top: 2,
|
|
@@ -189,75 +190,75 @@ function Be({ count: n }) {
|
|
|
189
190
|
padding: "0 3px",
|
|
190
191
|
lineHeight: 1,
|
|
191
192
|
pointerEvents: "none"
|
|
192
|
-
}, children:
|
|
193
|
+
}, children: r });
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
-
const [
|
|
196
|
-
const
|
|
197
|
-
return
|
|
198
|
-
b.id && (b.twoState || b.group) && b.active && (
|
|
199
|
-
}),
|
|
200
|
-
}), p =
|
|
201
|
-
J(
|
|
202
|
-
const
|
|
203
|
-
var
|
|
204
|
-
if (!
|
|
205
|
-
if (
|
|
206
|
-
const
|
|
207
|
-
return
|
|
208
|
-
|
|
209
|
-
}),
|
|
210
|
-
}), (
|
|
211
|
-
|
|
195
|
+
function er({ items: r = [], onAction: i, style: d }) {
|
|
196
|
+
const [s, f] = B(null), [a, u] = B(() => {
|
|
197
|
+
const o = {};
|
|
198
|
+
return r.forEach((b) => {
|
|
199
|
+
b.id && (b.twoState || b.group) && b.active && (o[b.id] = !0);
|
|
200
|
+
}), o;
|
|
201
|
+
}), p = ie(null);
|
|
202
|
+
J(Z, []), xe(p, ae(() => f(null), []));
|
|
203
|
+
const y = (o, b) => {
|
|
204
|
+
var $, N;
|
|
205
|
+
if (!o.disabled) {
|
|
206
|
+
if (o.twoState && o.id && u((D) => ({ ...D, [o.id]: !D[o.id] })), o.group && o.id && u((D) => {
|
|
207
|
+
const c = { ...D };
|
|
208
|
+
return r.forEach((w) => {
|
|
209
|
+
w.group === o.group && w.id && (c[w.id] = !1);
|
|
210
|
+
}), c[o.id] = !0, c;
|
|
211
|
+
}), ($ = o.items) != null && $.length) {
|
|
212
|
+
f((D) => D === b ? null : b);
|
|
212
213
|
return;
|
|
213
214
|
}
|
|
214
|
-
(
|
|
215
|
+
(N = o.onClick) == null || N.call(o, o.id || ""), i == null || i(o.id || "");
|
|
215
216
|
}
|
|
216
|
-
},
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
if (
|
|
220
|
-
if (
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
|
|
217
|
+
}, M = (o, b) => {
|
|
218
|
+
var c, w;
|
|
219
|
+
if (o.hidden) return null;
|
|
220
|
+
if (o.type === "separator") return /* @__PURE__ */ t("div", { style: { width: 1, background: e.border, margin: "6px 4px", alignSelf: "stretch" } }, b);
|
|
221
|
+
if (o.type === "spacer") return /* @__PURE__ */ t("div", { style: { flex: 1 } }, b);
|
|
222
|
+
if (o.type === "input") return /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
223
|
+
o.label && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontWeight: 500 }, children: o.label }),
|
|
224
|
+
/* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
|
|
225
|
+
o.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 8, color: e.textMut, fontSize: 15, pointerEvents: "none", zIndex: 1 }, children: o.icon }),
|
|
225
226
|
/* @__PURE__ */ t(
|
|
226
227
|
"input",
|
|
227
228
|
{
|
|
228
229
|
className: "dhx dhx-input",
|
|
229
|
-
style: { width:
|
|
230
|
-
placeholder:
|
|
231
|
-
defaultValue:
|
|
232
|
-
onChange: (
|
|
233
|
-
var
|
|
234
|
-
return (
|
|
230
|
+
style: { width: o.width || 140, height: 28, paddingLeft: o.icon ? 30 : void 0 },
|
|
231
|
+
placeholder: o.placeholder,
|
|
232
|
+
defaultValue: o.value,
|
|
233
|
+
onChange: (L) => {
|
|
234
|
+
var E;
|
|
235
|
+
return (E = o.onChange) == null ? void 0 : E.call(o, L.target.value);
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
)
|
|
238
239
|
] })
|
|
239
240
|
] }, b);
|
|
240
|
-
if (
|
|
241
|
-
|
|
241
|
+
if (o.type === "select") return /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
242
|
+
o.label && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontWeight: 500 }, children: o.label }),
|
|
242
243
|
/* @__PURE__ */ t(
|
|
243
244
|
"select",
|
|
244
245
|
{
|
|
245
246
|
className: "dhx dhx-input",
|
|
246
|
-
style: { width:
|
|
247
|
-
defaultValue:
|
|
248
|
-
onChange: (
|
|
249
|
-
var
|
|
250
|
-
return (
|
|
247
|
+
style: { width: o.width || 100, height: 28, cursor: "pointer" },
|
|
248
|
+
defaultValue: o.value,
|
|
249
|
+
onChange: (L) => {
|
|
250
|
+
var E;
|
|
251
|
+
return (E = o.onChange) == null ? void 0 : E.call(o, L.target.value);
|
|
251
252
|
},
|
|
252
|
-
children: (
|
|
253
|
+
children: (c = o.options) == null ? void 0 : c.map((L) => /* @__PURE__ */ t("option", { value: L.value, children: L.label }, L.value))
|
|
253
254
|
}
|
|
254
255
|
)
|
|
255
256
|
] }, b);
|
|
256
|
-
if (
|
|
257
|
+
if (o.type === "imageButton") return /* @__PURE__ */ x(
|
|
257
258
|
"button",
|
|
258
259
|
{
|
|
259
|
-
title:
|
|
260
|
-
disabled:
|
|
260
|
+
title: o.tooltip,
|
|
261
|
+
disabled: o.disabled,
|
|
261
262
|
style: {
|
|
262
263
|
position: "relative",
|
|
263
264
|
width: 32,
|
|
@@ -266,49 +267,49 @@ function Jt({ items: n = [], onAction: i, style: d }) {
|
|
|
266
267
|
border: "none",
|
|
267
268
|
borderRadius: "50%",
|
|
268
269
|
overflow: "hidden",
|
|
269
|
-
cursor:
|
|
270
|
+
cursor: o.disabled ? "not-allowed" : "pointer",
|
|
270
271
|
background: "transparent",
|
|
271
272
|
flexShrink: 0
|
|
272
273
|
},
|
|
273
|
-
onClick: () =>
|
|
274
|
+
onClick: () => y(o, b),
|
|
274
275
|
children: [
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
o.src && /* @__PURE__ */ t("img", { src: o.src, alt: o.value || "", style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" } }),
|
|
277
|
+
o.count !== void 0 && /* @__PURE__ */ t(Ae, { count: o.count })
|
|
277
278
|
]
|
|
278
279
|
},
|
|
279
280
|
b
|
|
280
281
|
);
|
|
281
|
-
const
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */
|
|
282
|
+
const $ = !!(o.id && a[o.id]), N = o.value ?? o.text, D = !!((w = o.items) != null && w.length);
|
|
283
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
|
|
284
|
+
/* @__PURE__ */ x(
|
|
284
285
|
"button",
|
|
285
286
|
{
|
|
286
287
|
className: "dhx dhx-btn dhx-btn-ghost",
|
|
287
|
-
title:
|
|
288
|
-
disabled:
|
|
288
|
+
title: o.tooltip,
|
|
289
|
+
disabled: o.disabled,
|
|
289
290
|
style: {
|
|
290
291
|
height: 32,
|
|
291
292
|
gap: 4,
|
|
292
293
|
position: "relative",
|
|
293
|
-
background:
|
|
294
|
-
color:
|
|
295
|
-
opacity:
|
|
296
|
-
cursor:
|
|
294
|
+
background: $ ? e.primaryLt : "transparent",
|
|
295
|
+
color: $ ? e.primary : o.disabled ? e.textMut : e.text,
|
|
296
|
+
opacity: o.disabled ? 0.55 : 1,
|
|
297
|
+
cursor: o.disabled ? "not-allowed" : "pointer"
|
|
297
298
|
},
|
|
298
|
-
onClick: () =>
|
|
299
|
+
onClick: () => y(o, b),
|
|
299
300
|
children: [
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
o.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: o.icon }),
|
|
302
|
+
N && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: N }),
|
|
303
|
+
D && /* @__PURE__ */ t("span", { style: { fontSize: 9, opacity: 0.55, marginLeft: 2 }, children: "▼" }),
|
|
304
|
+
o.count !== void 0 && /* @__PURE__ */ t(Ae, { count: o.count })
|
|
304
305
|
]
|
|
305
306
|
}
|
|
306
307
|
),
|
|
307
|
-
|
|
308
|
-
|
|
308
|
+
D && s === b && /* @__PURE__ */ t(
|
|
309
|
+
fe,
|
|
309
310
|
{
|
|
310
|
-
items:
|
|
311
|
-
onSelect: () =>
|
|
311
|
+
items: o.items,
|
|
312
|
+
onSelect: () => f(null),
|
|
312
313
|
style: { top: "100%", left: 0 }
|
|
313
314
|
}
|
|
314
315
|
)
|
|
@@ -330,72 +331,72 @@ function Jt({ items: n = [], onAction: i, style: d }) {
|
|
|
330
331
|
flexWrap: "wrap",
|
|
331
332
|
...d
|
|
332
333
|
},
|
|
333
|
-
children:
|
|
334
|
+
children: r.map(M)
|
|
334
335
|
}
|
|
335
336
|
);
|
|
336
337
|
}
|
|
337
|
-
function
|
|
338
|
-
return
|
|
338
|
+
function Mt(r) {
|
|
339
|
+
return r === "primary" ? e.primary : r === "success" ? "#43a047" : r === "secondary" ? "#9e9e9e" : "#e53935";
|
|
339
340
|
}
|
|
340
|
-
function
|
|
341
|
-
const d = [],
|
|
342
|
-
var
|
|
343
|
-
|
|
341
|
+
function $t(r, i) {
|
|
342
|
+
const d = [], s = (f) => {
|
|
343
|
+
var a;
|
|
344
|
+
f.id && f.group === i && d.push(f.id), (a = f.items) == null || a.forEach(s);
|
|
344
345
|
};
|
|
345
|
-
return
|
|
346
|
+
return r.forEach(s), d;
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
-
const i = {}, d = (
|
|
349
|
-
var
|
|
350
|
-
|
|
348
|
+
function Lt(r) {
|
|
349
|
+
const i = {}, d = (s) => {
|
|
350
|
+
var f;
|
|
351
|
+
s.id && s.twoState && s.active && (i[s.id] = !0), (f = s.items) == null || f.forEach(d);
|
|
351
352
|
};
|
|
352
|
-
return
|
|
353
|
+
return r.forEach(d), i;
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
-
items:
|
|
355
|
+
function tr({
|
|
356
|
+
items: r = [],
|
|
356
357
|
width: i = 240,
|
|
357
358
|
minWidth: d = 64,
|
|
358
|
-
header:
|
|
359
|
-
footer:
|
|
360
|
-
collapsed:
|
|
361
|
-
defaultCollapsed:
|
|
359
|
+
header: s,
|
|
360
|
+
footer: f,
|
|
361
|
+
collapsed: a,
|
|
362
|
+
defaultCollapsed: u,
|
|
362
363
|
selected: p,
|
|
363
|
-
defaultSelected:
|
|
364
|
-
onSelect:
|
|
365
|
-
onCollapse:
|
|
364
|
+
defaultSelected: y,
|
|
365
|
+
onSelect: M,
|
|
366
|
+
onCollapse: o,
|
|
366
367
|
onExpand: b,
|
|
367
|
-
onBeforeCollapse:
|
|
368
|
-
onBeforeExpand:
|
|
369
|
-
onToggleItem:
|
|
370
|
-
style:
|
|
368
|
+
onBeforeCollapse: $,
|
|
369
|
+
onBeforeExpand: N,
|
|
370
|
+
onToggleItem: D,
|
|
371
|
+
style: c
|
|
371
372
|
}) {
|
|
372
|
-
const
|
|
373
|
-
J(
|
|
374
|
-
const
|
|
375
|
-
if (
|
|
376
|
-
if ((
|
|
377
|
-
|
|
373
|
+
const w = a !== void 0, L = p !== void 0, [E, A] = B(u ?? !1), [z, C] = B(y ?? null), [V, h] = B({}), [I, l] = B(() => Lt(r));
|
|
374
|
+
J(Z, []);
|
|
375
|
+
const g = w ? a : E, K = L ? p ?? null : z, O = g ? d : i, n = () => {
|
|
376
|
+
if (g) {
|
|
377
|
+
if ((N == null ? void 0 : N()) === !1) return;
|
|
378
|
+
w || A(!1), b == null || b();
|
|
378
379
|
} else {
|
|
379
|
-
if ((
|
|
380
|
-
|
|
380
|
+
if (($ == null ? void 0 : $()) === !1) return;
|
|
381
|
+
w || A(!0), o == null || o();
|
|
381
382
|
}
|
|
382
|
-
},
|
|
383
|
-
|
|
384
|
-
},
|
|
385
|
-
if (!
|
|
386
|
-
const j = !
|
|
387
|
-
let
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}),
|
|
391
|
-
},
|
|
392
|
-
if (
|
|
393
|
-
const
|
|
383
|
+
}, R = (v) => {
|
|
384
|
+
L || C(v.id ?? null), M == null || M(v), v.id && v.onClick && v.onClick(v.id);
|
|
385
|
+
}, F = (v) => {
|
|
386
|
+
if (!v.id) return;
|
|
387
|
+
const j = !I[v.id];
|
|
388
|
+
let X = { ...I, [v.id]: j };
|
|
389
|
+
v.group && j && $t(r, v.group).forEach((Q) => {
|
|
390
|
+
Q !== v.id && (X[Q] = !1);
|
|
391
|
+
}), l(X), D == null || D(v.id, j);
|
|
392
|
+
}, k = (v, j) => {
|
|
393
|
+
if (v.count === void 0) return null;
|
|
394
|
+
const X = Mt(v.countColor), Q = v.count > 99 ? "99+" : String(v.count);
|
|
394
395
|
return j ? /* @__PURE__ */ t("span", { style: {
|
|
395
396
|
position: "absolute",
|
|
396
397
|
top: 1,
|
|
397
398
|
right: 1,
|
|
398
|
-
background:
|
|
399
|
+
background: X,
|
|
399
400
|
color: "#fff",
|
|
400
401
|
borderRadius: 8,
|
|
401
402
|
fontSize: 9,
|
|
@@ -405,23 +406,23 @@ function Ut({
|
|
|
405
406
|
textAlign: "center",
|
|
406
407
|
lineHeight: "14px",
|
|
407
408
|
pointerEvents: "none"
|
|
408
|
-
}, children:
|
|
409
|
-
background:
|
|
409
|
+
}, children: Q }) : /* @__PURE__ */ t("span", { style: {
|
|
410
|
+
background: X,
|
|
410
411
|
color: "#fff",
|
|
411
412
|
borderRadius: 10,
|
|
412
413
|
padding: "1px 6px",
|
|
413
414
|
fontSize: 11,
|
|
414
415
|
fontWeight: 700,
|
|
415
416
|
flexShrink: 0
|
|
416
|
-
}, children:
|
|
417
|
-
},
|
|
417
|
+
}, children: Q });
|
|
418
|
+
}, S = (v, j, X) => {
|
|
418
419
|
var ce;
|
|
419
|
-
if (
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
if (
|
|
423
|
-
if (
|
|
424
|
-
return
|
|
420
|
+
if (v.hidden) return null;
|
|
421
|
+
const Q = v.id ?? `${v.type ?? "navItem"}-${j}-${X}`, q = v.type ?? "navItem";
|
|
422
|
+
if (q === "separator") return /* @__PURE__ */ t("div", { style: { height: 1, background: e.border, margin: "6px 8px", flexShrink: 0 } }, Q);
|
|
423
|
+
if (q === "spacer") return /* @__PURE__ */ t("div", { style: { flex: 1 } }, Q);
|
|
424
|
+
if (q === "title")
|
|
425
|
+
return g ? null : /* @__PURE__ */ t("div", { style: {
|
|
425
426
|
padding: "10px 14px 4px",
|
|
426
427
|
fontSize: 10,
|
|
427
428
|
fontWeight: 700,
|
|
@@ -429,50 +430,50 @@ function Ut({
|
|
|
429
430
|
letterSpacing: 1,
|
|
430
431
|
color: e.textMut,
|
|
431
432
|
flexShrink: 0
|
|
432
|
-
}, children:
|
|
433
|
-
if (
|
|
433
|
+
}, children: v.value }, Q);
|
|
434
|
+
if (q === "customHTML") return /* @__PURE__ */ t(
|
|
434
435
|
"div",
|
|
435
436
|
{
|
|
436
|
-
dangerouslySetInnerHTML: { __html:
|
|
437
|
+
dangerouslySetInnerHTML: { __html: v.html ?? "" },
|
|
437
438
|
style: { padding: "8px 12px", flexShrink: 0 }
|
|
438
439
|
},
|
|
439
|
-
|
|
440
|
+
Q
|
|
440
441
|
);
|
|
441
|
-
const
|
|
442
|
-
P || (
|
|
442
|
+
const U = (((ce = v.items) == null ? void 0 : ce.length) ?? 0) > 0, ee = !!V[v.id ?? ""], te = v.twoState ? !!I[v.id ?? ""] : !1, re = !v.twoState && K === v.id || te, P = !!v.disabled, de = g ? 0 : 12 + j * 16, ve = () => {
|
|
443
|
+
P || (v.twoState ? (F(v), R(v)) : (U && h((se) => ({ ...se, [v.id ?? ""]: !se[v.id ?? ""] })), R(v)));
|
|
443
444
|
};
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ x("div", { style: { flexShrink: 0 }, children: [
|
|
446
|
+
/* @__PURE__ */ x(
|
|
446
447
|
"div",
|
|
447
448
|
{
|
|
448
|
-
title:
|
|
449
|
+
title: v.tooltip,
|
|
449
450
|
onClick: ve,
|
|
450
451
|
style: {
|
|
451
452
|
display: "flex",
|
|
452
453
|
alignItems: "center",
|
|
453
|
-
gap:
|
|
454
|
-
justifyContent:
|
|
454
|
+
gap: g ? 0 : 8,
|
|
455
|
+
justifyContent: g ? "center" : "flex-start",
|
|
455
456
|
paddingTop: 8,
|
|
456
457
|
paddingBottom: 8,
|
|
457
|
-
paddingLeft:
|
|
458
|
-
paddingRight:
|
|
458
|
+
paddingLeft: g ? 0 : de,
|
|
459
|
+
paddingRight: g ? 0 : 10,
|
|
459
460
|
borderRadius: e.r,
|
|
460
461
|
margin: "1px 6px",
|
|
461
462
|
cursor: P ? "not-allowed" : "pointer",
|
|
462
463
|
userSelect: "none",
|
|
463
464
|
transition: "background .15s",
|
|
464
|
-
background:
|
|
465
|
-
color: P ? e.textMut :
|
|
465
|
+
background: re ? e.primaryLt : "transparent",
|
|
466
|
+
color: P ? e.textMut : re ? e.primary : e.text,
|
|
466
467
|
opacity: P ? 0.55 : 1
|
|
467
468
|
},
|
|
468
469
|
onMouseEnter: (se) => {
|
|
469
|
-
!
|
|
470
|
+
!re && !P && (se.currentTarget.style.background = e.bg);
|
|
470
471
|
},
|
|
471
472
|
onMouseLeave: (se) => {
|
|
472
|
-
!
|
|
473
|
+
!re && !P && (se.currentTarget.style.background = "transparent");
|
|
473
474
|
},
|
|
474
475
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ x("span", { style: {
|
|
476
477
|
position: "relative",
|
|
477
478
|
minWidth: 22,
|
|
478
479
|
textAlign: "center",
|
|
@@ -480,30 +481,30 @@ function Ut({
|
|
|
480
481
|
flexShrink: 0,
|
|
481
482
|
lineHeight: 1
|
|
482
483
|
}, children: [
|
|
483
|
-
|
|
484
|
-
|
|
484
|
+
v.icon ?? (v.value && !v.icon, null),
|
|
485
|
+
g && k(v, !0)
|
|
485
486
|
] }),
|
|
486
|
-
!
|
|
487
|
+
!g && /* @__PURE__ */ t("span", { style: {
|
|
487
488
|
flex: 1,
|
|
488
489
|
fontSize: 13,
|
|
489
|
-
fontWeight:
|
|
490
|
+
fontWeight: re ? 600 : 400,
|
|
490
491
|
overflow: "hidden",
|
|
491
492
|
textOverflow: "ellipsis",
|
|
492
493
|
whiteSpace: "nowrap"
|
|
493
|
-
}, children:
|
|
494
|
-
!
|
|
495
|
-
!
|
|
494
|
+
}, children: v.value }),
|
|
495
|
+
!g && k(v, !1),
|
|
496
|
+
!g && v.twoState && /* @__PURE__ */ t("span", { style: {
|
|
496
497
|
width: 14,
|
|
497
498
|
height: 14,
|
|
498
499
|
borderRadius: 2,
|
|
499
|
-
border: `2px solid ${
|
|
500
|
-
background:
|
|
500
|
+
border: `2px solid ${re ? e.primary : e.borderDk}`,
|
|
501
|
+
background: re ? e.primary : "transparent",
|
|
501
502
|
flexShrink: 0,
|
|
502
503
|
display: "flex",
|
|
503
504
|
alignItems: "center",
|
|
504
505
|
justifyContent: "center"
|
|
505
|
-
}, children:
|
|
506
|
-
!
|
|
506
|
+
}, children: re && /* @__PURE__ */ t("span", { style: { color: "#fff", fontSize: 8, fontWeight: 700, lineHeight: 1 }, children: "✓" }) }),
|
|
507
|
+
!g && U && !v.twoState && /* @__PURE__ */ t("span", { style: {
|
|
507
508
|
fontSize: 11,
|
|
508
509
|
color: e.textMut,
|
|
509
510
|
flexShrink: 0,
|
|
@@ -514,18 +515,18 @@ function Ut({
|
|
|
514
515
|
]
|
|
515
516
|
}
|
|
516
517
|
),
|
|
517
|
-
|
|
518
|
-
] },
|
|
519
|
-
}, T = /* @__PURE__ */
|
|
518
|
+
U && ee && !g && /* @__PURE__ */ t("div", { children: v.items.map((se, be) => S(se, j + 1, be)) })
|
|
519
|
+
] }, Q);
|
|
520
|
+
}, T = /* @__PURE__ */ x(
|
|
520
521
|
"div",
|
|
521
522
|
{
|
|
522
|
-
onClick:
|
|
523
|
+
onClick: n,
|
|
523
524
|
style: {
|
|
524
525
|
display: "flex",
|
|
525
526
|
alignItems: "center",
|
|
526
|
-
justifyContent:
|
|
527
|
+
justifyContent: g ? "center" : "flex-start",
|
|
527
528
|
gap: 8,
|
|
528
|
-
padding:
|
|
529
|
+
padding: g ? "8px 0" : "8px 14px",
|
|
529
530
|
margin: "4px 6px",
|
|
530
531
|
borderRadius: e.r,
|
|
531
532
|
cursor: "pointer",
|
|
@@ -535,179 +536,179 @@ function Ut({
|
|
|
535
536
|
transition: "background .15s",
|
|
536
537
|
flexShrink: 0
|
|
537
538
|
},
|
|
538
|
-
onMouseEnter: (
|
|
539
|
-
onMouseLeave: (
|
|
539
|
+
onMouseEnter: (v) => v.currentTarget.style.background = e.bg,
|
|
540
|
+
onMouseLeave: (v) => v.currentTarget.style.background = "transparent",
|
|
540
541
|
children: [
|
|
541
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 16, fontWeight: 700, lineHeight: 1 }, children:
|
|
542
|
-
!
|
|
542
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 16, fontWeight: 700, lineHeight: 1 }, children: g ? "›" : "‹" }),
|
|
543
|
+
!g && /* @__PURE__ */ t("span", { children: "Collapse" })
|
|
543
544
|
]
|
|
544
545
|
}
|
|
545
546
|
);
|
|
546
|
-
return /* @__PURE__ */
|
|
547
|
+
return /* @__PURE__ */ x(
|
|
547
548
|
"div",
|
|
548
549
|
{
|
|
549
550
|
className: "dhx",
|
|
550
551
|
style: {
|
|
551
|
-
width:
|
|
552
|
-
minWidth:
|
|
552
|
+
width: O,
|
|
553
|
+
minWidth: O,
|
|
553
554
|
background: e.surface,
|
|
554
555
|
borderRight: `1px solid ${e.border}`,
|
|
555
556
|
display: "flex",
|
|
556
557
|
flexDirection: "column",
|
|
557
558
|
transition: "width .2s ease, min-width .2s ease",
|
|
558
559
|
overflow: "hidden",
|
|
559
|
-
...
|
|
560
|
+
...c
|
|
560
561
|
},
|
|
561
562
|
children: [
|
|
562
|
-
|
|
563
|
-
padding:
|
|
563
|
+
s && /* @__PURE__ */ t("div", { style: {
|
|
564
|
+
padding: g ? "12px 0" : "12px 14px",
|
|
564
565
|
borderBottom: `1px solid ${e.border}`,
|
|
565
566
|
fontWeight: 700,
|
|
566
567
|
fontSize: 15,
|
|
567
568
|
display: "flex",
|
|
568
569
|
alignItems: "center",
|
|
569
|
-
justifyContent:
|
|
570
|
+
justifyContent: g ? "center" : "flex-start",
|
|
570
571
|
overflow: "hidden",
|
|
571
572
|
flexShrink: 0
|
|
572
|
-
}, children:
|
|
573
|
+
}, children: s }),
|
|
573
574
|
/* @__PURE__ */ t(
|
|
574
575
|
"div",
|
|
575
576
|
{
|
|
576
577
|
className: "dhx-scroll",
|
|
577
578
|
style: { flex: 1, overflowY: "auto", overflowX: "hidden", display: "flex", flexDirection: "column" },
|
|
578
|
-
children:
|
|
579
|
+
children: r.map((v, j) => S(v, 0, j))
|
|
579
580
|
}
|
|
580
581
|
),
|
|
581
582
|
T,
|
|
582
|
-
|
|
583
|
+
f && !g && /* @__PURE__ */ t("div", { style: { padding: "10px 14px", borderTop: `1px solid ${e.border}`, flexShrink: 0 }, children: f })
|
|
583
584
|
]
|
|
584
585
|
}
|
|
585
586
|
);
|
|
586
587
|
}
|
|
587
|
-
function
|
|
588
|
-
const [i, d] = B(!1),
|
|
588
|
+
function Dt({ config: r }) {
|
|
589
|
+
const [i, d] = B(!1), s = {
|
|
589
590
|
position: "relative",
|
|
590
591
|
background: e.surface,
|
|
591
592
|
border: `1px solid ${e.border}`,
|
|
592
593
|
borderRadius: e.r,
|
|
593
594
|
overflow: "hidden",
|
|
594
|
-
...
|
|
595
|
-
...
|
|
595
|
+
...r.width ? { width: r.width, minWidth: r.width } : { flex: 1 },
|
|
596
|
+
...r.height ? { height: r.height, minHeight: r.height } : { minHeight: 40 },
|
|
596
597
|
...i ? { flex: "0 0 auto" } : {}
|
|
597
598
|
};
|
|
598
|
-
return /* @__PURE__ */
|
|
599
|
-
|
|
600
|
-
/* @__PURE__ */ t("span", { children:
|
|
601
|
-
|
|
599
|
+
return /* @__PURE__ */ x("div", { style: s, children: [
|
|
600
|
+
r.header && /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "6px 12px", background: e.bg, borderBottom: `1px solid ${e.border}`, fontSize: 12, fontWeight: 600, color: e.textSec, userSelect: "none" }, children: [
|
|
601
|
+
/* @__PURE__ */ t("span", { children: r.header }),
|
|
602
|
+
r.collapsable && /* @__PURE__ */ t("button", { onClick: () => d((f) => !f), style: { background: "none", border: "none", cursor: "pointer", color: e.textMut, fontSize: 16, lineHeight: 1 }, children: i ? "▼" : "▲" })
|
|
602
603
|
] }),
|
|
603
|
-
!i && /* @__PURE__ */
|
|
604
|
-
|
|
605
|
-
(
|
|
604
|
+
!i && /* @__PURE__ */ x("div", { style: { padding: r.padding || 0, height: r.header ? "calc(100% - 33px)" : "100%", overflow: "auto" }, children: [
|
|
605
|
+
r.html ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: r.html } }) : r.content,
|
|
606
|
+
(r.rows || r.cols) && /* @__PURE__ */ t(Ct, { rows: r.rows, cols: r.cols, style: { height: "100%" } })
|
|
606
607
|
] })
|
|
607
608
|
] });
|
|
608
609
|
}
|
|
609
|
-
function Ct({ rows:
|
|
610
|
-
J(
|
|
611
|
-
const
|
|
612
|
-
return
|
|
610
|
+
function Ct({ rows: r, cols: i, type: d = "line", style: s, children: f }) {
|
|
611
|
+
J(Z, []);
|
|
612
|
+
const a = d === "space" ? 12 : d === "wide" ? 8 : 1, u = r || i, p = !!r;
|
|
613
|
+
return u ? /* @__PURE__ */ t("div", { className: "dhx", style: { display: "flex", flexDirection: p ? "column" : "row", gap: a, width: "100%", height: "100%", ...s }, children: u.map((y, M) => /* @__PURE__ */ t(Dt, { config: y }, y.id || M)) }) : /* @__PURE__ */ t("div", { className: "dhx", style: { width: "100%", height: "100%", ...s }, children: f });
|
|
613
614
|
}
|
|
614
|
-
function
|
|
615
|
-
var
|
|
616
|
-
const [
|
|
617
|
-
J(
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
},
|
|
623
|
-
const
|
|
624
|
-
return /* @__PURE__ */
|
|
615
|
+
function rr({ views: r = [], mode: i = "top", tabAlign: d = "left", closable: s = [], disabled: f = [], defaultActive: a, onBeforeChange: u, onChange: p, style: y }) {
|
|
616
|
+
var z;
|
|
617
|
+
const [M, o] = B(a || ((z = r[0]) == null ? void 0 : z.id)), [b, $] = B(r.map((C) => C.id));
|
|
618
|
+
J(Z, []);
|
|
619
|
+
const N = (C, V) => {
|
|
620
|
+
C.stopPropagation(), $((h) => h.filter((I) => I !== V)), M === V && o(b.find((h) => h !== V) ?? "");
|
|
621
|
+
}, D = (C) => {
|
|
622
|
+
f.includes(C) || u && u(C) === !1 || (o(C), p == null || p(C));
|
|
623
|
+
}, c = i === "left" || i === "right", w = r.filter((C) => b.includes(C.id)), L = /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: c ? "column" : "row", justifyContent: d === "center" ? "center" : d === "right" ? "flex-end" : "flex-start", background: e.surface, borderBottom: !c && i !== "bottom" ? `2px solid ${e.border}` : "none", borderTop: i === "bottom" ? `2px solid ${e.border}` : "none", borderRight: i === "left" ? `2px solid ${e.border}` : "none", borderLeft: i === "right" ? `2px solid ${e.border}` : "none", overflowX: "auto", flexShrink: 0 }, children: w.map((C) => {
|
|
624
|
+
const V = M === C.id, h = f.includes(C.id), I = i === "bottom" ? { borderTop: `2px solid ${e.primary}`, color: e.primary, fontWeight: 600 } : c ? { color: e.primary, fontWeight: 600, background: e.primaryLt, [i === "left" ? "borderRight" : "borderLeft"]: `2px solid ${e.primary}` } : { borderBottom: `2px solid ${e.primary}`, color: e.primary, fontWeight: 600 };
|
|
625
|
+
return /* @__PURE__ */ x(
|
|
625
626
|
"div",
|
|
626
627
|
{
|
|
627
|
-
onClick: () =>
|
|
628
|
-
style: { display: "flex", alignItems: "center", gap: 6, padding: "10px 16px", cursor:
|
|
628
|
+
onClick: () => D(C.id),
|
|
629
|
+
style: { display: "flex", alignItems: "center", gap: 6, padding: "10px 16px", cursor: h ? "not-allowed" : "pointer", whiteSpace: "nowrap", fontSize: 13, transition: "color .15s", userSelect: "none", minWidth: c ? 120 : "auto", ...V ? I : { color: h ? e.textMut : e.textSec } },
|
|
629
630
|
children: [
|
|
630
|
-
|
|
631
|
-
/* @__PURE__ */ t("span", { children:
|
|
632
|
-
|
|
631
|
+
C.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: C.icon }),
|
|
632
|
+
/* @__PURE__ */ t("span", { children: C.tab }),
|
|
633
|
+
s.includes(C.id) && /* @__PURE__ */ t("span", { onClick: (l) => N(l, C.id), style: { marginLeft: 4, opacity: 0.6, fontSize: 12, cursor: "pointer" }, children: "✕" })
|
|
633
634
|
]
|
|
634
635
|
},
|
|
635
|
-
|
|
636
|
+
C.id
|
|
636
637
|
);
|
|
637
|
-
}) }),
|
|
638
|
-
|
|
639
|
-
(
|
|
638
|
+
}) }), E = w.find((C) => C.id === M), A = /* @__PURE__ */ x("div", { className: "dhx-scroll", style: { flex: 1, overflow: "auto" }, children: [
|
|
639
|
+
E == null ? void 0 : E.content,
|
|
640
|
+
(E == null ? void 0 : E.html) && /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: E.html }, style: { padding: 16 } })
|
|
640
641
|
] });
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { display: "flex", flexDirection: i === "top" ? "column" : i === "bottom" ? "column-reverse" : i === "left" ? "row" : "row-reverse", width: "100%", height: "100%", background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden", ...y }, children: [
|
|
643
|
+
L,
|
|
644
|
+
A
|
|
644
645
|
] });
|
|
645
646
|
}
|
|
646
|
-
const
|
|
647
|
-
function
|
|
648
|
-
return /* @__PURE__ */
|
|
649
|
-
/* @__PURE__ */ t("svg", { width: "7", height: "4", viewBox: "0 0 7 4", children: /* @__PURE__ */ t("path", { d: "M3.5 0L7 4H0z", fill:
|
|
650
|
-
/* @__PURE__ */ t("svg", { width: "7", height: "4", viewBox: "0 0 7 4", children: /* @__PURE__ */ t("path", { d: "M3.5 4L0 0H7z", fill:
|
|
647
|
+
const ge = `1px solid ${e.border}`;
|
|
648
|
+
function Tt({ active: r, dir: i }) {
|
|
649
|
+
return /* @__PURE__ */ x("span", { style: { display: "inline-flex", flexDirection: "column", gap: 1, flexShrink: 0, marginLeft: 4 }, children: [
|
|
650
|
+
/* @__PURE__ */ t("svg", { width: "7", height: "4", viewBox: "0 0 7 4", children: /* @__PURE__ */ t("path", { d: "M3.5 0L7 4H0z", fill: r && i === "asc" ? e.primary : e.borderDk }) }),
|
|
651
|
+
/* @__PURE__ */ t("svg", { width: "7", height: "4", viewBox: "0 0 7 4", children: /* @__PURE__ */ t("path", { d: "M3.5 4L0 0H7z", fill: r && i === "desc" ? e.primary : e.borderDk }) })
|
|
651
652
|
] });
|
|
652
653
|
}
|
|
653
|
-
function
|
|
654
|
-
const [
|
|
654
|
+
function Rt({ options: r, value: i, onChange: d, onCommit: s, onCancel: f }) {
|
|
655
|
+
const [a, u] = B(i), [p, y] = B(!0), M = ie(null);
|
|
655
656
|
J(() => {
|
|
656
|
-
const b = (
|
|
657
|
-
|
|
657
|
+
const b = ($) => {
|
|
658
|
+
M.current && !M.current.contains($.target) && s();
|
|
658
659
|
};
|
|
659
660
|
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
660
|
-
}, [
|
|
661
|
-
const
|
|
662
|
-
return /* @__PURE__ */
|
|
661
|
+
}, [s]);
|
|
662
|
+
const o = r.filter((b) => !a || b.toLowerCase().includes(a.toLowerCase()));
|
|
663
|
+
return /* @__PURE__ */ x("div", { ref: M, style: { width: "100%", position: "relative" }, children: [
|
|
663
664
|
/* @__PURE__ */ t(
|
|
664
665
|
"input",
|
|
665
666
|
{
|
|
666
667
|
autoFocus: !0,
|
|
667
|
-
value:
|
|
668
|
+
value: a,
|
|
668
669
|
onChange: (b) => {
|
|
669
|
-
|
|
670
|
+
u(b.target.value), d(b.target.value), y(!0);
|
|
670
671
|
},
|
|
671
672
|
onKeyDown: (b) => {
|
|
672
|
-
b.key === "Enter" &&
|
|
673
|
+
b.key === "Enter" && s(), b.key === "Escape" && f();
|
|
673
674
|
},
|
|
674
675
|
onClick: (b) => b.stopPropagation(),
|
|
675
676
|
style: { width: "100%", border: "none", outline: `2px solid ${e.primary}`, borderRadius: 2, fontSize: 13, padding: "2px 4px", background: e.surface, color: e.text }
|
|
676
677
|
}
|
|
677
678
|
),
|
|
678
|
-
p &&
|
|
679
|
+
p && o.length > 0 && /* @__PURE__ */ t("div", { style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 50, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, boxShadow: e.shadowLg, maxHeight: 160, overflowY: "auto" }, children: o.map((b) => /* @__PURE__ */ t(
|
|
679
680
|
"div",
|
|
680
681
|
{
|
|
681
|
-
onMouseDown: (
|
|
682
|
-
|
|
682
|
+
onMouseDown: ($) => {
|
|
683
|
+
$.preventDefault(), d(b), u(b), y(!1), s();
|
|
683
684
|
},
|
|
684
685
|
style: { padding: "6px 10px", cursor: "pointer", fontSize: 13, color: e.text },
|
|
685
|
-
onMouseEnter: (
|
|
686
|
-
onMouseLeave: (
|
|
686
|
+
onMouseEnter: ($) => $.currentTarget.style.background = e.bg,
|
|
687
|
+
onMouseLeave: ($) => $.currentTarget.style.background = e.surface,
|
|
687
688
|
children: b
|
|
688
689
|
},
|
|
689
690
|
b
|
|
690
691
|
)) })
|
|
691
692
|
] });
|
|
692
693
|
}
|
|
693
|
-
function
|
|
694
|
-
if (
|
|
695
|
-
if (i === "number") return typeof
|
|
694
|
+
function Nt(r, i) {
|
|
695
|
+
if (r == null) return "";
|
|
696
|
+
if (i === "number") return typeof r == "number" ? r.toLocaleString() : String(r);
|
|
696
697
|
if (i === "date") {
|
|
697
|
-
const d =
|
|
698
|
-
return isNaN(d.getTime()) ? String(
|
|
698
|
+
const d = r instanceof Date ? r : new Date(String(r));
|
|
699
|
+
return isNaN(d.getTime()) ? String(r) : d.toLocaleDateString();
|
|
699
700
|
}
|
|
700
|
-
return String(
|
|
701
|
+
return String(r);
|
|
701
702
|
}
|
|
702
|
-
function
|
|
703
|
-
return
|
|
703
|
+
function Et(r, i, d) {
|
|
704
|
+
return r == null ? 1 : i == null ? -1 : d === "date" ? new Date(String(r)).getTime() - new Date(String(i)).getTime() : d === "number" ? Number(r) - Number(i) : String(r) < String(i) ? -1 : String(r) > String(i) ? 1 : 0;
|
|
704
705
|
}
|
|
705
|
-
function we(
|
|
706
|
+
function we(r) {
|
|
706
707
|
var i;
|
|
707
|
-
return Array.isArray(
|
|
708
|
+
return Array.isArray(r.header) && ((i = r.header[1]) == null ? void 0 : i.content) != null ? r.header[1].content : r.filterable ? r.filterType === "select" ? "selectFilter" : "inputFilter" : null;
|
|
708
709
|
}
|
|
709
|
-
function
|
|
710
|
-
const
|
|
710
|
+
function It(r, i, d, s, f) {
|
|
711
|
+
const a = {
|
|
711
712
|
width: "100%",
|
|
712
713
|
border: "none",
|
|
713
714
|
outline: `2px solid ${e.primary}`,
|
|
@@ -716,202 +717,202 @@ function Rt(n, i, d, l, u) {
|
|
|
716
717
|
padding: "2px 4px",
|
|
717
718
|
background: e.surface,
|
|
718
719
|
color: e.text
|
|
719
|
-
},
|
|
720
|
-
if (
|
|
720
|
+
}, u = r.editorType ?? "input";
|
|
721
|
+
if (u === "select") return /* @__PURE__ */ t(
|
|
721
722
|
"select",
|
|
722
723
|
{
|
|
723
724
|
autoFocus: !0,
|
|
724
725
|
value: i,
|
|
725
|
-
onChange: (
|
|
726
|
-
onBlur:
|
|
727
|
-
onKeyDown: (
|
|
728
|
-
|
|
726
|
+
onChange: (y) => d(y.target.value),
|
|
727
|
+
onBlur: s,
|
|
728
|
+
onKeyDown: (y) => {
|
|
729
|
+
y.key === "Enter" && s(), y.key === "Escape" && f();
|
|
729
730
|
},
|
|
730
|
-
onClick: (
|
|
731
|
-
style: { ...
|
|
732
|
-
children: (
|
|
731
|
+
onClick: (y) => y.stopPropagation(),
|
|
732
|
+
style: { ...a, cursor: "pointer" },
|
|
733
|
+
children: (r.options ?? []).map((y) => /* @__PURE__ */ t("option", { value: y, children: y }, y))
|
|
733
734
|
}
|
|
734
735
|
);
|
|
735
|
-
if (
|
|
736
|
-
|
|
736
|
+
if (u === "combobox") return /* @__PURE__ */ t(
|
|
737
|
+
Rt,
|
|
737
738
|
{
|
|
738
|
-
options:
|
|
739
|
+
options: r.options ?? [],
|
|
739
740
|
value: i,
|
|
740
741
|
onChange: d,
|
|
741
|
-
onCommit:
|
|
742
|
-
onCancel:
|
|
742
|
+
onCommit: s,
|
|
743
|
+
onCancel: f
|
|
743
744
|
}
|
|
744
745
|
);
|
|
745
|
-
const p =
|
|
746
|
+
const p = r.type === "number" ? "number" : r.type === "date" ? "date" : "text";
|
|
746
747
|
return /* @__PURE__ */ t(
|
|
747
748
|
"input",
|
|
748
749
|
{
|
|
749
750
|
autoFocus: !0,
|
|
750
751
|
type: p,
|
|
751
752
|
value: i,
|
|
752
|
-
onChange: (
|
|
753
|
-
onBlur:
|
|
754
|
-
onKeyDown: (
|
|
755
|
-
|
|
753
|
+
onChange: (y) => d(y.target.value),
|
|
754
|
+
onBlur: s,
|
|
755
|
+
onKeyDown: (y) => {
|
|
756
|
+
y.key === "Enter" && s(), y.key === "Escape" && f();
|
|
756
757
|
},
|
|
757
|
-
onClick: (
|
|
758
|
-
style:
|
|
758
|
+
onClick: (y) => y.stopPropagation(),
|
|
759
|
+
style: a
|
|
759
760
|
}
|
|
760
761
|
);
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
-
columns:
|
|
763
|
+
function nr({
|
|
764
|
+
columns: r,
|
|
764
765
|
data: i = [],
|
|
765
766
|
height: d = 400,
|
|
766
|
-
rowHeight:
|
|
767
|
-
headerRowHeight:
|
|
768
|
-
footerRowHeight:
|
|
769
|
-
sortable:
|
|
767
|
+
rowHeight: s = 40,
|
|
768
|
+
headerRowHeight: f = 40,
|
|
769
|
+
footerRowHeight: a = 40,
|
|
770
|
+
sortable: u = !0,
|
|
770
771
|
resizable: p = !0,
|
|
771
|
-
editable:
|
|
772
|
-
stripe:
|
|
773
|
-
autoWidth:
|
|
772
|
+
editable: y = !1,
|
|
773
|
+
stripe: M = !1,
|
|
774
|
+
autoWidth: o = !1,
|
|
774
775
|
keyNavigation: b = !1,
|
|
775
|
-
selection:
|
|
776
|
-
multiselect:
|
|
777
|
-
leftSplit:
|
|
778
|
-
onSelect:
|
|
779
|
-
onChange:
|
|
780
|
-
style:
|
|
776
|
+
selection: $,
|
|
777
|
+
multiselect: N,
|
|
778
|
+
leftSplit: D = 0,
|
|
779
|
+
onSelect: c,
|
|
780
|
+
onChange: w,
|
|
781
|
+
style: L
|
|
781
782
|
}) {
|
|
782
|
-
var
|
|
783
|
-
const [
|
|
784
|
-
() => Object.fromEntries(
|
|
785
|
-
), [
|
|
786
|
-
J(
|
|
787
|
-
if (!
|
|
788
|
-
const
|
|
789
|
-
var
|
|
790
|
-
return
|
|
783
|
+
var Te;
|
|
784
|
+
const [E, A] = B(null), [z, C] = B("asc"), [V, h] = B({}), [I, l] = B(/* @__PURE__ */ new Set()), [g, K] = B(-1), [O, n] = B(
|
|
785
|
+
() => Object.fromEntries(r.map((m) => [m.id, m.width ?? m.minWidth ?? 150]))
|
|
786
|
+
), [R, F] = B(null), [k, S] = B(""), [T, v] = B({}), j = ie(null), [X, Q] = B(0);
|
|
787
|
+
J(Z, []), J(() => {
|
|
788
|
+
if (!o || !j.current) return;
|
|
789
|
+
const m = new ResizeObserver(() => {
|
|
790
|
+
var W;
|
|
791
|
+
return Q(((W = j.current) == null ? void 0 : W.offsetWidth) ?? 0);
|
|
791
792
|
});
|
|
792
|
-
return
|
|
793
|
-
}, [
|
|
794
|
-
const
|
|
795
|
-
() =>
|
|
796
|
-
(
|
|
793
|
+
return m.observe(j.current), () => m.disconnect();
|
|
794
|
+
}, [o]);
|
|
795
|
+
const q = ue(
|
|
796
|
+
() => r.map(
|
|
797
|
+
(m) => m.summary && (!m.footer || m.footer.length === 0) ? { ...m, footer: [{ summary: m.summary }] } : m
|
|
797
798
|
),
|
|
798
|
-
[
|
|
799
|
-
),
|
|
800
|
-
() =>
|
|
801
|
-
[
|
|
799
|
+
[r]
|
|
800
|
+
), U = ue(
|
|
801
|
+
() => q.filter((m) => !m.hidden),
|
|
802
|
+
[q]
|
|
802
803
|
), ee = ue(() => {
|
|
803
|
-
if (!
|
|
804
|
-
const
|
|
805
|
-
if (
|
|
806
|
-
const
|
|
807
|
-
return Object.fromEntries(
|
|
808
|
-
}, [
|
|
809
|
-
let
|
|
810
|
-
const
|
|
811
|
-
return T[
|
|
804
|
+
if (!o || X === 0) return O;
|
|
805
|
+
const m = U.reduce((H, _) => H + (O[_.id] ?? 150), 0);
|
|
806
|
+
if (X <= m) return O;
|
|
807
|
+
const W = (X - m) / U.length;
|
|
808
|
+
return Object.fromEntries(U.map((H) => [H.id, (O[H.id] ?? 150) + W]));
|
|
809
|
+
}, [o, X, O, U]), te = ue(() => {
|
|
810
|
+
let m = i.map((W, H) => {
|
|
811
|
+
const _ = String(W.id ?? H);
|
|
812
|
+
return T[_] ? { ...W, ...T[_] } : W;
|
|
812
813
|
}).filter(
|
|
813
|
-
(
|
|
814
|
-
([
|
|
814
|
+
(W) => Object.entries(V).every(
|
|
815
|
+
([H, _]) => !_ || String(W[H] ?? "").toLowerCase().includes(_.toLowerCase())
|
|
815
816
|
)
|
|
816
817
|
);
|
|
817
|
-
if (
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
const
|
|
821
|
-
return
|
|
818
|
+
if (E) {
|
|
819
|
+
const W = q.find((H) => H.id === E);
|
|
820
|
+
m = [...m].sort((H, _) => {
|
|
821
|
+
const G = Et(H[E], _[E], W == null ? void 0 : W.type);
|
|
822
|
+
return z === "asc" ? G : -G;
|
|
822
823
|
});
|
|
823
824
|
}
|
|
824
|
-
return
|
|
825
|
-
}, [i,
|
|
826
|
-
const
|
|
827
|
-
return
|
|
828
|
-
var
|
|
829
|
-
if ((
|
|
830
|
-
const
|
|
831
|
-
|
|
825
|
+
return m;
|
|
826
|
+
}, [i, E, z, V, T, q]), pe = ue(() => {
|
|
827
|
+
const m = {};
|
|
828
|
+
return q.forEach((W) => {
|
|
829
|
+
var H;
|
|
830
|
+
if ((H = W.footer) != null && H.some((_) => _.summary)) {
|
|
831
|
+
const _ = te.map((Y) => Number(Y[W.id])).filter((Y) => !isNaN(Y)), G = _.reduce((Y, ne) => Y + ne, 0);
|
|
832
|
+
m[W.id] = { sum: G, avg: _.length ? G / _.length : 0, count: te.length, min: _.length ? Math.min(..._) : 0, max: _.length ? Math.max(..._) : 0 };
|
|
832
833
|
}
|
|
833
|
-
}),
|
|
834
|
-
}, [te,
|
|
835
|
-
const
|
|
836
|
-
return
|
|
837
|
-
const
|
|
838
|
-
return
|
|
839
|
-
}).forEach((
|
|
840
|
-
|
|
841
|
-
}),
|
|
842
|
-
}, [i,
|
|
843
|
-
var
|
|
844
|
-
return (
|
|
845
|
-
}), ve =
|
|
846
|
-
if (!
|
|
847
|
-
let
|
|
848
|
-
const
|
|
849
|
-
return
|
|
850
|
-
|
|
851
|
-
}),
|
|
852
|
-
}, [
|
|
853
|
-
!
|
|
854
|
-
}, Se = (
|
|
855
|
-
if (
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
const
|
|
859
|
-
return
|
|
860
|
-
}),
|
|
861
|
-
},
|
|
862
|
-
if (!
|
|
863
|
-
const { key:
|
|
864
|
-
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
},
|
|
868
|
-
if (
|
|
869
|
-
|
|
834
|
+
}), m;
|
|
835
|
+
}, [te, q]), re = ue(() => {
|
|
836
|
+
const m = {};
|
|
837
|
+
return U.filter((W) => {
|
|
838
|
+
const H = we(W);
|
|
839
|
+
return H === "selectFilter" || H === "comboFilter";
|
|
840
|
+
}).forEach((W) => {
|
|
841
|
+
m[W.id] = [...new Set(i.map((H) => String(H[W.id] ?? "")))].sort();
|
|
842
|
+
}), m;
|
|
843
|
+
}, [i, U]), P = U.some((m) => we(m) !== null), de = q.some((m) => {
|
|
844
|
+
var W;
|
|
845
|
+
return (W = m.footer) == null ? void 0 : W.length;
|
|
846
|
+
}), ve = U.reduce((m, W) => m + (ee[W.id] ?? 150), 0), ce = ue(() => {
|
|
847
|
+
if (!D) return {};
|
|
848
|
+
let m = 0;
|
|
849
|
+
const W = {};
|
|
850
|
+
return U.forEach((H, _) => {
|
|
851
|
+
_ < D && (W[H.id] = m, m += ee[H.id] ?? 150);
|
|
852
|
+
}), W;
|
|
853
|
+
}, [D, U, ee]), se = D > 0 ? (Te = U[D - 1]) == null ? void 0 : Te.id : null, be = (m, W) => m.id ?? W, qe = (m) => {
|
|
854
|
+
!u || m.sortable === !1 || (C((W) => E === m.id && W === "asc" ? "desc" : "asc"), A(m.id));
|
|
855
|
+
}, Se = (m, W) => {
|
|
856
|
+
if (!$) return;
|
|
857
|
+
const H = be(m, W);
|
|
858
|
+
K(W), l((_) => {
|
|
859
|
+
const G = N ? new Set(_) : /* @__PURE__ */ new Set();
|
|
860
|
+
return G.has(H) ? G.delete(H) : G.add(H), G;
|
|
861
|
+
}), c == null || c(m);
|
|
862
|
+
}, Ge = () => {
|
|
863
|
+
if (!R) return;
|
|
864
|
+
const { key: m, colId: W } = R;
|
|
865
|
+
v((_) => ({ ..._, [String(m)]: { ..._[String(m)] || {}, [W]: k } }));
|
|
866
|
+
const H = te.find((_, G) => be(_, G) === m);
|
|
867
|
+
H && (w == null || w(H, W, k)), F(null);
|
|
868
|
+
}, Je = (m) => {
|
|
869
|
+
if (R && m.key === "Escape") {
|
|
870
|
+
F(null);
|
|
870
871
|
return;
|
|
871
872
|
}
|
|
872
|
-
if (!(!b ||
|
|
873
|
-
if (
|
|
874
|
-
|
|
875
|
-
const
|
|
876
|
-
|
|
877
|
-
} else if (
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
|
|
873
|
+
if (!(!b || !$)) {
|
|
874
|
+
if (m.key === "ArrowDown") {
|
|
875
|
+
m.preventDefault();
|
|
876
|
+
const W = Math.min(g + 1, te.length - 1);
|
|
877
|
+
W >= 0 && Se(te[W], W);
|
|
878
|
+
} else if (m.key === "ArrowUp") {
|
|
879
|
+
m.preventDefault();
|
|
880
|
+
const W = Math.max(g - 1, 0);
|
|
881
|
+
W >= 0 && Se(te[W], W);
|
|
881
882
|
}
|
|
882
883
|
}
|
|
883
|
-
},
|
|
884
|
-
|
|
885
|
-
const
|
|
884
|
+
}, Ue = (m, W) => {
|
|
885
|
+
m.preventDefault(), m.stopPropagation();
|
|
886
|
+
const H = m.clientX, _ = O[W] ?? 150, G = r.find((oe) => oe.id === W), Y = (oe) => n((he) => ({
|
|
886
887
|
...he,
|
|
887
|
-
[
|
|
888
|
-
})),
|
|
889
|
-
document.removeEventListener("mousemove",
|
|
888
|
+
[W]: Math.max((G == null ? void 0 : G.minWidth) || 50, _ + oe.clientX - H)
|
|
889
|
+
})), ne = () => {
|
|
890
|
+
document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", ne);
|
|
890
891
|
};
|
|
891
|
-
document.addEventListener("mousemove",
|
|
892
|
-
}, ke = (
|
|
893
|
-
const
|
|
892
|
+
document.addEventListener("mousemove", Y), document.addEventListener("mouseup", ne);
|
|
893
|
+
}, ke = (m, W, H, _, G, Y = "hidden") => {
|
|
894
|
+
const ne = m in ce;
|
|
894
895
|
return {
|
|
895
|
-
width:
|
|
896
|
-
minWidth:
|
|
896
|
+
width: W,
|
|
897
|
+
minWidth: W,
|
|
897
898
|
flexShrink: 0,
|
|
898
899
|
boxSizing: "border-box",
|
|
899
900
|
padding: "0 12px",
|
|
900
|
-
height:
|
|
901
|
+
height: G,
|
|
901
902
|
display: "flex",
|
|
902
903
|
alignItems: "center",
|
|
903
|
-
overflow:
|
|
904
|
+
overflow: Y,
|
|
904
905
|
textOverflow: "ellipsis",
|
|
905
906
|
whiteSpace: "nowrap",
|
|
906
907
|
fontSize: 13,
|
|
907
|
-
textAlign:
|
|
908
|
-
justifyContent:
|
|
909
|
-
borderLeft:
|
|
910
|
-
position:
|
|
911
|
-
...
|
|
912
|
-
left: ce[
|
|
908
|
+
textAlign: H,
|
|
909
|
+
justifyContent: H === "center" ? "center" : H === "right" ? "flex-end" : "flex-start",
|
|
910
|
+
borderLeft: _ ? "none" : ge,
|
|
911
|
+
position: ne ? "sticky" : "relative",
|
|
912
|
+
...ne ? {
|
|
913
|
+
left: ce[m],
|
|
913
914
|
zIndex: 1,
|
|
914
|
-
boxShadow:
|
|
915
|
+
boxShadow: m === se ? "2px 0 6px rgba(0,0,0,0.1)" : void 0
|
|
915
916
|
} : {}
|
|
916
917
|
};
|
|
917
918
|
};
|
|
@@ -921,31 +922,31 @@ function Zt({
|
|
|
921
922
|
ref: j,
|
|
922
923
|
className: "dhx",
|
|
923
924
|
tabIndex: b ? 0 : void 0,
|
|
924
|
-
onKeyDown:
|
|
925
|
-
style: { width: "100%", height: d, display: "flex", flexDirection: "column", border:
|
|
926
|
-
children: /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { overflow: "auto", flex: 1 }, children: /* @__PURE__ */
|
|
927
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", background: e.bg, borderBottom:
|
|
928
|
-
const
|
|
929
|
-
return /* @__PURE__ */
|
|
925
|
+
onKeyDown: Je,
|
|
926
|
+
style: { width: "100%", height: d, display: "flex", flexDirection: "column", border: ge, borderRadius: e.r, overflow: "hidden", outline: "none", ...L },
|
|
927
|
+
children: /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { overflow: "auto", flex: 1 }, children: /* @__PURE__ */ x("div", { style: { minWidth: ve, display: "flex", flexDirection: "column", minHeight: "100%" }, children: [
|
|
928
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", background: e.bg, borderBottom: ge, flexShrink: 0, position: "sticky", top: 0, zIndex: 3 }, children: U.map((m, W) => {
|
|
929
|
+
const H = Array.isArray(m.header) ? m.header[0] : null, _ = (H == null ? void 0 : H.text) ?? (typeof m.header == "string" ? m.header : m.id), G = (H == null ? void 0 : H.align) ?? m.align, Y = ee[m.id] ?? 150, ne = m.id in ce;
|
|
930
|
+
return /* @__PURE__ */ x(
|
|
930
931
|
"div",
|
|
931
932
|
{
|
|
932
|
-
onClick: () =>
|
|
933
|
+
onClick: () => qe(m),
|
|
933
934
|
style: {
|
|
934
|
-
...ke(
|
|
935
|
+
...ke(m.id, Y, G, W === 0, f),
|
|
935
936
|
fontWeight: 500,
|
|
936
937
|
color: e.text,
|
|
937
938
|
background: e.bg,
|
|
938
|
-
cursor:
|
|
939
|
+
cursor: u && m.sortable !== !1 ? "pointer" : "default",
|
|
939
940
|
userSelect: "none",
|
|
940
|
-
...
|
|
941
|
+
...ne ? { zIndex: 4 } : {}
|
|
941
942
|
},
|
|
942
943
|
children: [
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
p &&
|
|
944
|
+
H != null && H.htmlEnable ? /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden" }, dangerouslySetInnerHTML: { __html: _ } }) : /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: _ }),
|
|
945
|
+
u && m.sortable !== !1 && /* @__PURE__ */ t(Tt, { active: E === m.id, dir: z }),
|
|
946
|
+
p && m.resizable !== !1 && W < U.length - 1 && /* @__PURE__ */ t(
|
|
946
947
|
"div",
|
|
947
948
|
{
|
|
948
|
-
onMouseDown: (oe) =>
|
|
949
|
+
onMouseDown: (oe) => Ue(oe, m.id),
|
|
949
950
|
onClick: (oe) => oe.stopPropagation(),
|
|
950
951
|
style: { position: "absolute", right: 0, top: 0, bottom: 0, width: 4, cursor: "col-resize", zIndex: 1 },
|
|
951
952
|
onMouseEnter: (oe) => oe.currentTarget.style.background = e.primary + "55",
|
|
@@ -954,367 +955,367 @@ function Zt({
|
|
|
954
955
|
)
|
|
955
956
|
]
|
|
956
957
|
},
|
|
957
|
-
|
|
958
|
+
m.id
|
|
958
959
|
);
|
|
959
960
|
}) }),
|
|
960
961
|
P && /* @__PURE__ */ t("div", { style: {
|
|
961
962
|
display: "flex",
|
|
962
|
-
borderBottom:
|
|
963
|
+
borderBottom: ge,
|
|
963
964
|
background: e.surface,
|
|
964
965
|
flexShrink: 0,
|
|
965
|
-
...
|
|
966
|
-
}, children:
|
|
967
|
-
const
|
|
966
|
+
...D ? { position: "sticky", top: f, zIndex: 3 } : {}
|
|
967
|
+
}, children: U.map((m, W) => {
|
|
968
|
+
const H = we(m), _ = ee[m.id] ?? 150, G = m.id in ce;
|
|
968
969
|
return /* @__PURE__ */ t("div", { style: {
|
|
969
|
-
width:
|
|
970
|
-
minWidth:
|
|
970
|
+
width: _,
|
|
971
|
+
minWidth: _,
|
|
971
972
|
flexShrink: 0,
|
|
972
973
|
padding: "4px 6px",
|
|
973
974
|
boxSizing: "border-box",
|
|
974
|
-
borderLeft:
|
|
975
|
+
borderLeft: W === 0 ? "none" : ge,
|
|
975
976
|
background: e.surface,
|
|
976
|
-
...
|
|
977
|
+
...G ? {
|
|
977
978
|
position: "sticky",
|
|
978
|
-
left: ce[
|
|
979
|
+
left: ce[m.id],
|
|
979
980
|
zIndex: 4,
|
|
980
|
-
boxShadow:
|
|
981
|
+
boxShadow: m.id === se ? "2px 0 6px rgba(0,0,0,0.1)" : void 0
|
|
981
982
|
} : {}
|
|
982
|
-
}, children:
|
|
983
|
+
}, children: H === "selectFilter" || H === "comboFilter" ? /* @__PURE__ */ x(
|
|
983
984
|
"select",
|
|
984
985
|
{
|
|
985
986
|
className: "dhx dhx-input",
|
|
986
987
|
style: { height: 26, fontSize: 12, padding: "0 4px" },
|
|
987
|
-
value:
|
|
988
|
-
onChange: (
|
|
988
|
+
value: V[m.id] || "",
|
|
989
|
+
onChange: (Y) => h((ne) => ({ ...ne, [m.id]: Y.target.value })),
|
|
989
990
|
children: [
|
|
990
991
|
/* @__PURE__ */ t("option", { value: "", children: "All" }),
|
|
991
|
-
(
|
|
992
|
+
(re[m.id] || []).map((Y) => /* @__PURE__ */ t("option", { value: Y, children: Y }, Y))
|
|
992
993
|
]
|
|
993
994
|
}
|
|
994
|
-
) :
|
|
995
|
+
) : H === "inputFilter" ? /* @__PURE__ */ t(
|
|
995
996
|
"input",
|
|
996
997
|
{
|
|
997
998
|
className: "dhx dhx-input",
|
|
998
999
|
style: { height: 26, fontSize: 12 },
|
|
999
1000
|
placeholder: "Filter...",
|
|
1000
|
-
value:
|
|
1001
|
-
onChange: (
|
|
1001
|
+
value: V[m.id] || "",
|
|
1002
|
+
onChange: (Y) => h((ne) => ({ ...ne, [m.id]: Y.target.value }))
|
|
1002
1003
|
}
|
|
1003
|
-
) : null },
|
|
1004
|
+
) : null }, m.id);
|
|
1004
1005
|
}) }),
|
|
1005
|
-
/* @__PURE__ */
|
|
1006
|
-
te.map((
|
|
1007
|
-
const
|
|
1006
|
+
/* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
|
|
1007
|
+
te.map((m, W) => {
|
|
1008
|
+
const H = be(m, W), _ = I.has(H), G = _ ? e.primaryLt : M && W % 2 !== 0 ? e.bg : e.surface;
|
|
1008
1009
|
return /* @__PURE__ */ t(
|
|
1009
1010
|
"div",
|
|
1010
1011
|
{
|
|
1011
|
-
style: { display: "flex", height:
|
|
1012
|
-
onMouseEnter: (
|
|
1013
|
-
onMouseLeave: (
|
|
1014
|
-
children:
|
|
1015
|
-
const oe = (
|
|
1012
|
+
style: { display: "flex", height: s, borderBottom: ge, flexShrink: 0, background: G, transition: "background .1s", cursor: $ ? "pointer" : "default" },
|
|
1013
|
+
onMouseEnter: (Y) => !_ && (Y.currentTarget.style.background = e.primaryLt + "80"),
|
|
1014
|
+
onMouseLeave: (Y) => !_ && (Y.currentTarget.style.background = G),
|
|
1015
|
+
children: U.map((Y, ne) => {
|
|
1016
|
+
const oe = (R == null ? void 0 : R.key) === H && (R == null ? void 0 : R.colId) === Y.id, he = m[Y.id], Qe = ee[Y.id] ?? 150, Re = (y || Y.editable) && Y.editable !== !1;
|
|
1016
1017
|
let ye;
|
|
1017
|
-
return oe ? ye =
|
|
1018
|
+
return oe ? ye = It(Y, k, S, Ge, () => F(null)) : Y.template ? ye = Y.template(he, m) : Y.htmlEnable ? ye = /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: String(he ?? "") } }) : Y.type === "boolean" ? ye = /* @__PURE__ */ t(
|
|
1018
1019
|
"input",
|
|
1019
1020
|
{
|
|
1020
1021
|
type: "checkbox",
|
|
1021
1022
|
readOnly: !0,
|
|
1022
1023
|
checked: !!he,
|
|
1023
|
-
style: { width: 16, height: 16, accentColor: e.primary, cursor:
|
|
1024
|
+
style: { width: 16, height: 16, accentColor: e.primary, cursor: Re ? "pointer" : "default" }
|
|
1024
1025
|
}
|
|
1025
|
-
) : ye =
|
|
1026
|
+
) : ye = Nt(he, Y.type), /* @__PURE__ */ t(
|
|
1026
1027
|
"div",
|
|
1027
1028
|
{
|
|
1028
1029
|
onClick: () => {
|
|
1029
|
-
if (Se(
|
|
1030
|
-
if (
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1030
|
+
if (Se(m, W), !!Re)
|
|
1031
|
+
if (Y.type === "boolean") {
|
|
1032
|
+
const Ne = !he, Ee = String(H);
|
|
1033
|
+
v((Ie) => ({ ...Ie, [Ee]: { ...Ie[Ee] || {}, [Y.id]: Ne } })), w == null || w(m, Y.id, Ne);
|
|
1033
1034
|
} else
|
|
1034
|
-
|
|
1035
|
+
F({ key: H, colId: Y.id }), S(String(he ?? ""));
|
|
1035
1036
|
},
|
|
1036
|
-
style: { ...ke(
|
|
1037
|
+
style: { ...ke(Y.id, Qe, Y.align, ne === 0, s, oe ? "visible" : "hidden"), background: G },
|
|
1037
1038
|
children: ye
|
|
1038
1039
|
},
|
|
1039
|
-
|
|
1040
|
+
Y.id
|
|
1040
1041
|
);
|
|
1041
1042
|
})
|
|
1042
1043
|
},
|
|
1043
|
-
String(
|
|
1044
|
+
String(H)
|
|
1044
1045
|
);
|
|
1045
1046
|
}),
|
|
1046
1047
|
te.length === 0 && /* @__PURE__ */ t("div", { style: { textAlign: "center", padding: 40, color: e.textMut, fontSize: 13 }, children: "No data" })
|
|
1047
1048
|
] }),
|
|
1048
|
-
de && /* @__PURE__ */ t("div", { style: { display: "flex", borderTop:
|
|
1049
|
+
de && /* @__PURE__ */ t("div", { style: { display: "flex", borderTop: ge, background: e.bg, flexShrink: 0, position: "sticky", bottom: 0, zIndex: 2 }, children: U.map((m, W) => {
|
|
1049
1050
|
var oe;
|
|
1050
|
-
const
|
|
1051
|
-
let
|
|
1052
|
-
|
|
1053
|
-
const
|
|
1051
|
+
const H = (oe = m.footer) == null ? void 0 : oe[0], _ = pe[m.id] ?? { sum: 0, avg: 0, count: 0, min: 0, max: 0 };
|
|
1052
|
+
let G = "";
|
|
1053
|
+
H && (typeof H.text == "function" ? G = H.text(_) : H.text ? G = H.text : H.summary && (G = String(Math.round(_[H.summary] * 100) / 100)));
|
|
1054
|
+
const Y = ee[m.id] ?? 150, ne = m.id in ce;
|
|
1054
1055
|
return /* @__PURE__ */ t("div", { style: {
|
|
1055
|
-
...ke(
|
|
1056
|
+
...ke(m.id, Y, m.align, W === 0, a),
|
|
1056
1057
|
fontWeight: 600,
|
|
1057
1058
|
color: e.text,
|
|
1058
1059
|
background: e.bg,
|
|
1059
|
-
...
|
|
1060
|
-
}, children:
|
|
1060
|
+
...ne ? { zIndex: 3 } : {}
|
|
1061
|
+
}, children: G }, m.id);
|
|
1061
1062
|
}) })
|
|
1062
1063
|
] }) })
|
|
1063
1064
|
}
|
|
1064
1065
|
);
|
|
1065
1066
|
}
|
|
1066
|
-
const
|
|
1067
|
-
function
|
|
1068
|
-
const
|
|
1069
|
-
return
|
|
1070
|
-
name:
|
|
1071
|
-
children:
|
|
1067
|
+
const le = ["#0288d1", "#43a047", "#f57c00", "#e53935", "#8e24aa", "#00838f", "#ef6c00", "#2e7d32"];
|
|
1068
|
+
function Wt(r, i, d) {
|
|
1069
|
+
const s = r.filter((a) => !a.parent), f = r.filter((a) => !!a.parent);
|
|
1070
|
+
return s.map((a) => ({
|
|
1071
|
+
name: a[d],
|
|
1072
|
+
children: f.filter((u) => u.parent === a.id).map((u) => ({ name: u[d], value: Number(u[i] ?? 0) }))
|
|
1072
1073
|
}));
|
|
1073
1074
|
}
|
|
1074
|
-
function
|
|
1075
|
-
type:
|
|
1075
|
+
function or({
|
|
1076
|
+
type: r = "bar",
|
|
1076
1077
|
data: i = [],
|
|
1077
1078
|
series: d = [],
|
|
1078
|
-
scales:
|
|
1079
|
-
legend:
|
|
1080
|
-
height:
|
|
1081
|
-
style:
|
|
1079
|
+
scales: s = {},
|
|
1080
|
+
legend: f,
|
|
1081
|
+
height: a = 280,
|
|
1082
|
+
style: u
|
|
1082
1083
|
}) {
|
|
1083
|
-
var
|
|
1084
|
-
J(
|
|
1085
|
-
const p = ((
|
|
1086
|
-
|
|
1084
|
+
var w, L, E, A, z, C, V, h, I, l, g, K, O, n, R, F;
|
|
1085
|
+
J(Z, []);
|
|
1086
|
+
const p = ((w = s.bottom) == null ? void 0 : w.text) || i[0] && Object.keys(i[0])[0] || "x", y = /* @__PURE__ */ t(
|
|
1087
|
+
tt,
|
|
1087
1088
|
{
|
|
1088
1089
|
contentStyle: { fontSize: 12, borderRadius: e.r, border: `1px solid ${e.border}` }
|
|
1089
1090
|
}
|
|
1090
|
-
),
|
|
1091
|
-
|
|
1091
|
+
), M = f ? /* @__PURE__ */ t(
|
|
1092
|
+
rt,
|
|
1092
1093
|
{
|
|
1093
1094
|
iconSize: 10,
|
|
1094
1095
|
wrapperStyle: { fontSize: 12 },
|
|
1095
|
-
verticalAlign:
|
|
1096
|
-
align:
|
|
1096
|
+
verticalAlign: f.valign === "bottom" ? "bottom" : f.valign === "middle" ? "middle" : "top",
|
|
1097
|
+
align: f.halign ?? "center"
|
|
1097
1098
|
}
|
|
1098
|
-
) : null,
|
|
1099
|
-
|
|
1099
|
+
) : null, o = /* @__PURE__ */ t(nt, { strokeDasharray: "3 3", stroke: e.border }), b = /* @__PURE__ */ t(
|
|
1100
|
+
We,
|
|
1100
1101
|
{
|
|
1101
1102
|
dataKey: p,
|
|
1102
1103
|
tick: { fontSize: 11, fill: e.textSec },
|
|
1103
1104
|
axisLine: { stroke: e.border },
|
|
1104
1105
|
tickLine: !1,
|
|
1105
|
-
label: (
|
|
1106
|
+
label: (L = s.bottom) != null && L.title ? { value: s.bottom.title, position: "insideBottom", offset: -4, fontSize: 11 } : void 0
|
|
1106
1107
|
}
|
|
1107
|
-
),
|
|
1108
|
-
|
|
1108
|
+
), $ = /* @__PURE__ */ t(
|
|
1109
|
+
Be,
|
|
1109
1110
|
{
|
|
1110
1111
|
tick: { fontSize: 11, fill: e.textSec },
|
|
1111
1112
|
axisLine: !1,
|
|
1112
1113
|
tickLine: !1,
|
|
1113
|
-
domain: [((
|
|
1114
|
-
tickCount: (
|
|
1115
|
-
label: (
|
|
1114
|
+
domain: [((E = s.left) == null ? void 0 : E.min) ?? "auto", ((A = s.left) == null ? void 0 : A.max) ?? "auto"],
|
|
1115
|
+
tickCount: (z = s.left) == null ? void 0 : z.maxTicks,
|
|
1116
|
+
label: (C = s.left) != null && C.title ? { value: s.left.title, angle: -90, position: "insideLeft", fontSize: 11 } : void 0
|
|
1116
1117
|
}
|
|
1117
|
-
),
|
|
1118
|
+
), N = {
|
|
1118
1119
|
top: 10,
|
|
1119
1120
|
right: 20,
|
|
1120
1121
|
left: 0,
|
|
1121
|
-
bottom: (
|
|
1122
|
-
},
|
|
1123
|
-
let
|
|
1124
|
-
if (
|
|
1125
|
-
|
|
1126
|
-
|
|
1122
|
+
bottom: (V = s.bottom) != null && V.title ? 20 : 0
|
|
1123
|
+
}, D = { data: i, margin: N };
|
|
1124
|
+
let c;
|
|
1125
|
+
if (r === "bar")
|
|
1126
|
+
c = /* @__PURE__ */ x(ot, { ...D, children: [
|
|
1127
|
+
o,
|
|
1127
1128
|
b,
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
d.map((
|
|
1132
|
-
|
|
1129
|
+
$,
|
|
1130
|
+
y,
|
|
1131
|
+
M,
|
|
1132
|
+
d.map((k, S) => /* @__PURE__ */ t(
|
|
1133
|
+
it,
|
|
1133
1134
|
{
|
|
1134
|
-
dataKey:
|
|
1135
|
-
name:
|
|
1136
|
-
fill:
|
|
1135
|
+
dataKey: k.value || k.id || "",
|
|
1136
|
+
name: k.label || k.id,
|
|
1137
|
+
fill: k.fill || k.color || le[S % le.length],
|
|
1137
1138
|
radius: [3, 3, 0, 0]
|
|
1138
1139
|
},
|
|
1139
|
-
|
|
1140
|
+
k.id ?? S
|
|
1140
1141
|
))
|
|
1141
1142
|
] });
|
|
1142
|
-
else if (
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
else if (r === "line")
|
|
1144
|
+
c = /* @__PURE__ */ x(lt, { ...D, children: [
|
|
1145
|
+
o,
|
|
1145
1146
|
b,
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
d.map((
|
|
1150
|
-
const T =
|
|
1147
|
+
$,
|
|
1148
|
+
y,
|
|
1149
|
+
M,
|
|
1150
|
+
d.map((k, S) => {
|
|
1151
|
+
const T = k.color || le[S % le.length];
|
|
1151
1152
|
return /* @__PURE__ */ t(
|
|
1152
|
-
|
|
1153
|
+
st,
|
|
1153
1154
|
{
|
|
1154
1155
|
type: "monotone",
|
|
1155
|
-
dataKey:
|
|
1156
|
-
name:
|
|
1156
|
+
dataKey: k.value || k.id || "",
|
|
1157
|
+
name: k.label || k.id,
|
|
1157
1158
|
stroke: T,
|
|
1158
|
-
strokeWidth:
|
|
1159
|
+
strokeWidth: k.strokeWidth ?? 2,
|
|
1159
1160
|
dot: { r: 3, fill: T }
|
|
1160
1161
|
},
|
|
1161
|
-
|
|
1162
|
+
k.id ?? S
|
|
1162
1163
|
);
|
|
1163
1164
|
})
|
|
1164
1165
|
] });
|
|
1165
|
-
else if (
|
|
1166
|
-
|
|
1167
|
-
|
|
1166
|
+
else if (r === "area")
|
|
1167
|
+
c = /* @__PURE__ */ x(at, { ...D, children: [
|
|
1168
|
+
o,
|
|
1168
1169
|
b,
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
d.map((
|
|
1173
|
-
const T =
|
|
1170
|
+
$,
|
|
1171
|
+
y,
|
|
1172
|
+
M,
|
|
1173
|
+
d.map((k, S) => {
|
|
1174
|
+
const T = k.color || le[S % le.length];
|
|
1174
1175
|
return /* @__PURE__ */ t(
|
|
1175
|
-
|
|
1176
|
+
dt,
|
|
1176
1177
|
{
|
|
1177
1178
|
type: "monotone",
|
|
1178
|
-
dataKey:
|
|
1179
|
-
name:
|
|
1179
|
+
dataKey: k.value || k.id || "",
|
|
1180
|
+
name: k.label || k.id,
|
|
1180
1181
|
stroke: T,
|
|
1181
|
-
fill: (
|
|
1182
|
-
strokeWidth:
|
|
1182
|
+
fill: (k.fill || T) + "33",
|
|
1183
|
+
strokeWidth: k.strokeWidth ?? 2
|
|
1183
1184
|
},
|
|
1184
|
-
|
|
1185
|
+
k.id ?? S
|
|
1185
1186
|
);
|
|
1186
1187
|
})
|
|
1187
1188
|
] });
|
|
1188
|
-
else if (
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1189
|
+
else if (r === "pie" || r === "donut") {
|
|
1190
|
+
const k = d[0] || {}, S = k.value || "value", T = k.text || "name", v = k.color && i[0] && k.color in i[0] ? k.color : null;
|
|
1191
|
+
c = /* @__PURE__ */ x(ct, { children: [
|
|
1191
1192
|
/* @__PURE__ */ t(
|
|
1192
|
-
|
|
1193
|
+
ut,
|
|
1193
1194
|
{
|
|
1194
1195
|
data: i,
|
|
1195
1196
|
cx: "50%",
|
|
1196
1197
|
cy: "50%",
|
|
1197
|
-
outerRadius:
|
|
1198
|
-
innerRadius:
|
|
1199
|
-
dataKey:
|
|
1198
|
+
outerRadius: r === "donut" ? "70%" : "80%",
|
|
1199
|
+
innerRadius: r === "donut" ? "40%" : 0,
|
|
1200
|
+
dataKey: S,
|
|
1200
1201
|
nameKey: T,
|
|
1201
|
-
stroke:
|
|
1202
|
-
strokeWidth:
|
|
1203
|
-
label: ({ name: j, percent:
|
|
1202
|
+
stroke: k.stroke || "none",
|
|
1203
|
+
strokeWidth: k.strokeWidth ?? 0,
|
|
1204
|
+
label: ({ name: j, percent: X }) => `${j ?? ""} ${((X ?? 0) * 100).toFixed(0)}%`,
|
|
1204
1205
|
labelLine: !0,
|
|
1205
1206
|
paddingAngle: 2,
|
|
1206
|
-
children: i.map((j,
|
|
1207
|
-
|
|
1207
|
+
children: i.map((j, X) => /* @__PURE__ */ t(
|
|
1208
|
+
pt,
|
|
1208
1209
|
{
|
|
1209
|
-
fill:
|
|
1210
|
+
fill: v ? j[v] : le[X % le.length]
|
|
1210
1211
|
},
|
|
1211
|
-
|
|
1212
|
+
X
|
|
1212
1213
|
))
|
|
1213
1214
|
}
|
|
1214
1215
|
),
|
|
1215
|
-
|
|
1216
|
-
|
|
1216
|
+
y,
|
|
1217
|
+
M
|
|
1217
1218
|
] });
|
|
1218
|
-
} else if (
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
/* @__PURE__ */ t(
|
|
1222
|
-
/* @__PURE__ */ t(
|
|
1223
|
-
/* @__PURE__ */ t(
|
|
1224
|
-
d.map((
|
|
1225
|
-
const
|
|
1219
|
+
} else if (r === "radar") {
|
|
1220
|
+
const k = ((h = s.radial) == null ? void 0 : h.value) || p;
|
|
1221
|
+
c = /* @__PURE__ */ x(ht, { ...D, cx: "50%", cy: "50%", children: [
|
|
1222
|
+
/* @__PURE__ */ t(ft, {}),
|
|
1223
|
+
/* @__PURE__ */ t(gt, { dataKey: k, tick: { fontSize: 11 } }),
|
|
1224
|
+
/* @__PURE__ */ t(xt, { tick: { fontSize: 9, fill: e.textMut }, axisLine: !1 }),
|
|
1225
|
+
d.map((S, T) => {
|
|
1226
|
+
const v = S.color || S.pointColor || le[T % le.length];
|
|
1226
1227
|
return /* @__PURE__ */ t(
|
|
1227
|
-
|
|
1228
|
+
yt,
|
|
1228
1229
|
{
|
|
1229
|
-
dataKey:
|
|
1230
|
-
name:
|
|
1231
|
-
stroke:
|
|
1232
|
-
fill:
|
|
1230
|
+
dataKey: S.value || S.id || "",
|
|
1231
|
+
name: S.label || S.id,
|
|
1232
|
+
stroke: v,
|
|
1233
|
+
fill: v + "44"
|
|
1233
1234
|
},
|
|
1234
|
-
|
|
1235
|
+
S.id ?? T
|
|
1235
1236
|
);
|
|
1236
1237
|
}),
|
|
1237
|
-
|
|
1238
|
-
|
|
1238
|
+
y,
|
|
1239
|
+
M
|
|
1239
1240
|
] });
|
|
1240
|
-
} else if (
|
|
1241
|
-
|
|
1242
|
-
|
|
1241
|
+
} else if (r === "scatter")
|
|
1242
|
+
c = /* @__PURE__ */ x(bt, { margin: N, children: [
|
|
1243
|
+
o,
|
|
1243
1244
|
/* @__PURE__ */ t(
|
|
1244
|
-
|
|
1245
|
+
We,
|
|
1245
1246
|
{
|
|
1246
1247
|
type: "number",
|
|
1247
1248
|
dataKey: "x",
|
|
1248
|
-
name: ((
|
|
1249
|
+
name: ((I = s.bottom) == null ? void 0 : I.title) || "x",
|
|
1249
1250
|
tick: { fontSize: 11, fill: e.textSec },
|
|
1250
1251
|
tickLine: !1,
|
|
1251
|
-
domain: [((
|
|
1252
|
-
label: (
|
|
1252
|
+
domain: [((l = s.bottom) == null ? void 0 : l.min) ?? "auto", ((g = s.bottom) == null ? void 0 : g.max) ?? "auto"],
|
|
1253
|
+
label: (K = s.bottom) != null && K.title ? { value: s.bottom.title, position: "insideBottom", offset: -4, fontSize: 11 } : void 0
|
|
1253
1254
|
}
|
|
1254
1255
|
),
|
|
1255
1256
|
/* @__PURE__ */ t(
|
|
1256
|
-
|
|
1257
|
+
Be,
|
|
1257
1258
|
{
|
|
1258
1259
|
type: "number",
|
|
1259
1260
|
dataKey: "y",
|
|
1260
|
-
name: ((
|
|
1261
|
+
name: ((O = s.left) == null ? void 0 : O.title) || "y",
|
|
1261
1262
|
tick: { fontSize: 11, fill: e.textSec },
|
|
1262
1263
|
tickLine: !1,
|
|
1263
1264
|
axisLine: !1,
|
|
1264
|
-
domain: [((
|
|
1265
|
-
label: (
|
|
1265
|
+
domain: [((n = s.left) == null ? void 0 : n.min) ?? "auto", ((R = s.left) == null ? void 0 : R.max) ?? "auto"],
|
|
1266
|
+
label: (F = s.left) != null && F.title ? { value: s.left.title, angle: -90, position: "insideLeft", fontSize: 11 } : void 0
|
|
1266
1267
|
}
|
|
1267
1268
|
),
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
d.map((
|
|
1271
|
-
const T =
|
|
1272
|
-
x:
|
|
1273
|
-
y:
|
|
1269
|
+
y,
|
|
1270
|
+
M,
|
|
1271
|
+
d.map((k, S) => {
|
|
1272
|
+
const T = k.value || "x", v = k.valueY || "y", j = (k.data || i).map((X) => ({
|
|
1273
|
+
x: X[T],
|
|
1274
|
+
y: X[v]
|
|
1274
1275
|
}));
|
|
1275
1276
|
return /* @__PURE__ */ t(
|
|
1276
|
-
|
|
1277
|
+
mt,
|
|
1277
1278
|
{
|
|
1278
1279
|
data: j,
|
|
1279
|
-
name:
|
|
1280
|
-
fill:
|
|
1280
|
+
name: k.label || k.id,
|
|
1281
|
+
fill: k.color || le[S % le.length]
|
|
1281
1282
|
},
|
|
1282
|
-
|
|
1283
|
+
k.id ?? S
|
|
1283
1284
|
);
|
|
1284
1285
|
})
|
|
1285
1286
|
] });
|
|
1286
|
-
else if (
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
|
|
1287
|
+
else if (r === "treeMap") {
|
|
1288
|
+
const k = d[0] || {}, S = k.value || "value", T = k.text || "name", v = Wt(i, S, T), j = k.stroke || e.surface, X = k.strokeWidth ?? 2;
|
|
1289
|
+
c = /* @__PURE__ */ t(
|
|
1290
|
+
St,
|
|
1290
1291
|
{
|
|
1291
|
-
data:
|
|
1292
|
+
data: v,
|
|
1292
1293
|
dataKey: "value",
|
|
1293
1294
|
aspectRatio: 4 / 3,
|
|
1294
1295
|
stroke: j,
|
|
1295
|
-
content: (
|
|
1296
|
-
const { x:
|
|
1296
|
+
content: (Q) => {
|
|
1297
|
+
const { x: q, y: U, width: ee, height: te, depth: pe, index: re, name: P } = Q;
|
|
1297
1298
|
if (pe === 0) return null;
|
|
1298
|
-
const de =
|
|
1299
|
-
return /* @__PURE__ */
|
|
1299
|
+
const de = le[re % le.length];
|
|
1300
|
+
return /* @__PURE__ */ x("g", { children: [
|
|
1300
1301
|
/* @__PURE__ */ t(
|
|
1301
1302
|
"rect",
|
|
1302
1303
|
{
|
|
1303
|
-
x:
|
|
1304
|
-
y:
|
|
1304
|
+
x: q,
|
|
1305
|
+
y: U,
|
|
1305
1306
|
width: ee,
|
|
1306
1307
|
height: te,
|
|
1307
1308
|
fill: de,
|
|
1308
1309
|
stroke: j,
|
|
1309
|
-
strokeWidth:
|
|
1310
|
+
strokeWidth: X,
|
|
1310
1311
|
style: { borderRadius: 3 }
|
|
1311
1312
|
}
|
|
1312
1313
|
),
|
|
1313
1314
|
ee > 40 && te > 20 && /* @__PURE__ */ t(
|
|
1314
1315
|
"text",
|
|
1315
1316
|
{
|
|
1316
|
-
x:
|
|
1317
|
-
y:
|
|
1317
|
+
x: q + ee / 2,
|
|
1318
|
+
y: U + te / 2,
|
|
1318
1319
|
textAnchor: "middle",
|
|
1319
1320
|
dominantBaseline: "middle",
|
|
1320
1321
|
fill: "#fff",
|
|
@@ -1332,194 +1333,194 @@ function en({
|
|
|
1332
1333
|
"div",
|
|
1333
1334
|
{
|
|
1334
1335
|
className: "dhx",
|
|
1335
|
-
style: { width: "100%", height:
|
|
1336
|
-
children: /* @__PURE__ */ t(
|
|
1336
|
+
style: { width: "100%", height: a, padding: 12, background: e.surface, borderRadius: e.rMd, ...u },
|
|
1337
|
+
children: /* @__PURE__ */ t(vt, { width: "100%", height: "100%", children: c })
|
|
1337
1338
|
}
|
|
1338
1339
|
);
|
|
1339
1340
|
}
|
|
1340
|
-
const
|
|
1341
|
-
function
|
|
1342
|
-
const
|
|
1343
|
-
J(
|
|
1344
|
-
const
|
|
1345
|
-
for (let
|
|
1346
|
-
for (let
|
|
1347
|
-
const
|
|
1348
|
-
if (!
|
|
1349
|
-
if (i && Array.isArray(
|
|
1350
|
-
const [
|
|
1351
|
-
if (!
|
|
1352
|
-
const
|
|
1353
|
-
return
|
|
1341
|
+
const Bt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], Ht = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
1342
|
+
function ir({ value: r, range: i = !1, timepicker: d = !1, onChange: s, style: f }) {
|
|
1343
|
+
const a = /* @__PURE__ */ new Date(), u = r ? new Date(Array.isArray(r) ? r[0] : r) : a, [p, y] = B(u), [M, o] = B(r ?? (i ? [null, null] : null)), [b, $] = B(null), [N, D] = B({ h: 0, m: 0 });
|
|
1344
|
+
J(Z, []);
|
|
1345
|
+
const c = p.getFullYear(), w = p.getMonth(), L = new Date(c, w, 1).getDay(), E = new Date(c, w + 1, 0).getDate(), A = [];
|
|
1346
|
+
for (let h = 0; h < L; h++) A.push(null);
|
|
1347
|
+
for (let h = 1; h <= E; h++) A.push(new Date(c, w, h));
|
|
1348
|
+
const z = (h) => h.toDateString() === a.toDateString(), C = (h) => {
|
|
1349
|
+
if (!M) return !1;
|
|
1350
|
+
if (i && Array.isArray(M)) {
|
|
1351
|
+
const [I, l] = M;
|
|
1352
|
+
if (!I) return !1;
|
|
1353
|
+
const g = h.getTime();
|
|
1354
|
+
return l ? g >= I.getTime() && g <= l.getTime() : h.toDateString() === I.toDateString();
|
|
1354
1355
|
}
|
|
1355
|
-
return
|
|
1356
|
-
},
|
|
1356
|
+
return h.toDateString() === M.toDateString();
|
|
1357
|
+
}, V = (h) => {
|
|
1357
1358
|
if (i) {
|
|
1358
|
-
const [
|
|
1359
|
-
if (!
|
|
1360
|
-
|
|
1359
|
+
const [I, l] = Array.isArray(M) ? M : [null, null];
|
|
1360
|
+
if (!I || l)
|
|
1361
|
+
o([h, null]);
|
|
1361
1362
|
else {
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1363
|
+
const g = h < I ? [h, I] : [I, h];
|
|
1364
|
+
o(g), s == null || s(g);
|
|
1364
1365
|
}
|
|
1365
1366
|
} else
|
|
1366
|
-
|
|
1367
|
+
o(h), s == null || s(h);
|
|
1367
1368
|
};
|
|
1368
|
-
return /* @__PURE__ */
|
|
1369
|
-
/* @__PURE__ */
|
|
1370
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1371
|
-
/* @__PURE__ */
|
|
1372
|
-
|
|
1369
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...f }, children: [
|
|
1370
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 12 }, children: [
|
|
1371
|
+
/* @__PURE__ */ t("button", { onClick: () => y((h) => new Date(h.getFullYear(), h.getMonth() - 1, 1)), className: "dhx dhx-btn dhx-btn-ghost", style: { height: 28, padding: "0 8px", fontSize: 16 }, children: "‹" }),
|
|
1372
|
+
/* @__PURE__ */ x("div", { style: { fontWeight: 700, fontSize: 14 }, children: [
|
|
1373
|
+
Bt[w],
|
|
1373
1374
|
" ",
|
|
1374
|
-
|
|
1375
|
+
c
|
|
1375
1376
|
] }),
|
|
1376
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1377
|
+
/* @__PURE__ */ t("button", { onClick: () => y((h) => new Date(h.getFullYear(), h.getMonth() + 1, 1)), className: "dhx dhx-btn dhx-btn-ghost", style: { height: 28, padding: "0 8px", fontSize: 16 }, children: "›" })
|
|
1377
1378
|
] }),
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1379
|
+
/* @__PURE__ */ x("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 32px)", gap: 2 }, children: [
|
|
1380
|
+
Ht.map((h) => /* @__PURE__ */ t("div", { style: { textAlign: "center", fontSize: 11, fontWeight: 600, color: e.textMut, paddingBottom: 4 }, children: h }, h)),
|
|
1381
|
+
A.map((h, I) => {
|
|
1382
|
+
const l = h ? C(h) : !1, g = h && b && h.toDateString() === b.toDateString();
|
|
1382
1383
|
return /* @__PURE__ */ t(
|
|
1383
1384
|
"div",
|
|
1384
1385
|
{
|
|
1385
|
-
onClick: () =>
|
|
1386
|
-
onMouseEnter: () =>
|
|
1387
|
-
onMouseLeave: () =>
|
|
1388
|
-
style: { width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: e.r, cursor:
|
|
1389
|
-
children:
|
|
1386
|
+
onClick: () => h && V(h),
|
|
1387
|
+
onMouseEnter: () => h && $(h),
|
|
1388
|
+
onMouseLeave: () => $(null),
|
|
1389
|
+
style: { width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: e.r, cursor: h ? "pointer" : "default", fontSize: 12, fontWeight: h && z(h) ? 700 : 400, background: l ? e.primary : g ? e.bg : "transparent", color: l ? "#fff" : h && z(h) ? e.primary : h ? e.text : "transparent", border: h && z(h) && !l ? `1px solid ${e.primary}` : "1px solid transparent", transition: "all .1s" },
|
|
1390
|
+
children: h == null ? void 0 : h.getDate()
|
|
1390
1391
|
},
|
|
1391
|
-
|
|
1392
|
+
I
|
|
1392
1393
|
);
|
|
1393
1394
|
})
|
|
1394
1395
|
] }),
|
|
1395
|
-
d && /* @__PURE__ */
|
|
1396
|
-
/* @__PURE__ */ t("input", { type: "number", min: 0, max: 23, value:
|
|
1396
|
+
d && /* @__PURE__ */ x("div", { style: { borderTop: `1px solid ${e.border}`, marginTop: 12, paddingTop: 12, display: "flex", alignItems: "center", justifyContent: "center", gap: 8 }, children: [
|
|
1397
|
+
/* @__PURE__ */ t("input", { type: "number", min: 0, max: 23, value: N.h, onChange: (h) => D((I) => ({ ...I, h: +h.target.value })), className: "dhx dhx-input", style: { width: 50, textAlign: "center" } }),
|
|
1397
1398
|
/* @__PURE__ */ t("span", { style: { fontWeight: 700, color: e.textSec }, children: ":" }),
|
|
1398
|
-
/* @__PURE__ */ t("input", { type: "number", min: 0, max: 59, value:
|
|
1399
|
+
/* @__PURE__ */ t("input", { type: "number", min: 0, max: 59, value: N.m, onChange: (h) => D((I) => ({ ...I, m: +h.target.value })), className: "dhx dhx-input", style: { width: 50, textAlign: "center" } })
|
|
1399
1400
|
] })
|
|
1400
1401
|
] });
|
|
1401
1402
|
}
|
|
1402
|
-
function
|
|
1403
|
-
const [
|
|
1404
|
-
J(
|
|
1405
|
-
const
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1409
|
-
|
|
1410
|
-
},
|
|
1403
|
+
function At({ value: r, onChange: i, timeFormat: d = 12, controls: s = !1, minuteStep: f = 5, style: a }) {
|
|
1404
|
+
const [u, p] = B((r == null ? void 0 : r.h) ?? (d === 24 ? 0 : 12)), [y, M] = B((r == null ? void 0 : r.m) ?? 0), [o, b] = B((r == null ? void 0 : r.ampm) ?? "AM"), [$, N] = B(null);
|
|
1405
|
+
J(Z, []);
|
|
1406
|
+
const D = d === 24 ? Array.from({ length: 24 }, (z, C) => C) : Array.from({ length: 12 }, (z, C) => C + 1), c = Array.from({ length: Math.ceil(60 / f) }, (z, C) => C * f), w = (z, C, V) => {
|
|
1407
|
+
const h = d === 24 ? { h: z, m: C } : { h: z, m: C, ampm: V };
|
|
1408
|
+
s ? N(h) : i == null || i(h);
|
|
1409
|
+
}, L = () => {
|
|
1410
|
+
N(null), p((r == null ? void 0 : r.h) ?? (d === 24 ? 0 : 12)), M((r == null ? void 0 : r.m) ?? 0), b((r == null ? void 0 : r.ampm) ?? "AM");
|
|
1411
|
+
}, E = { display: "flex", flexDirection: "column", alignItems: "center", gap: 4 }, A = (z) => ({
|
|
1411
1412
|
height: 32,
|
|
1412
1413
|
display: "flex",
|
|
1413
1414
|
alignItems: "center",
|
|
1414
1415
|
justifyContent: "center",
|
|
1415
1416
|
cursor: "pointer",
|
|
1416
1417
|
fontSize: 13,
|
|
1417
|
-
fontWeight:
|
|
1418
|
-
background:
|
|
1419
|
-
color:
|
|
1418
|
+
fontWeight: z ? 700 : 400,
|
|
1419
|
+
background: z ? e.primaryLt : "transparent",
|
|
1420
|
+
color: z ? e.primary : e.text
|
|
1420
1421
|
});
|
|
1421
|
-
return /* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
/* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...a }, children: [
|
|
1423
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, alignItems: "stretch" }, children: [
|
|
1424
|
+
/* @__PURE__ */ x("div", { style: E, children: [
|
|
1424
1425
|
/* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textMut }, children: "Hours" }),
|
|
1425
|
-
/* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children:
|
|
1426
|
+
/* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children: D.map((z) => /* @__PURE__ */ t(
|
|
1426
1427
|
"div",
|
|
1427
1428
|
{
|
|
1428
1429
|
onClick: () => {
|
|
1429
|
-
p(
|
|
1430
|
+
p(z), w(z, y, o);
|
|
1430
1431
|
},
|
|
1431
|
-
style:
|
|
1432
|
-
onMouseEnter: (
|
|
1433
|
-
onMouseLeave: (
|
|
1434
|
-
children: String(
|
|
1432
|
+
style: A(u === z),
|
|
1433
|
+
onMouseEnter: (C) => u !== z && (C.currentTarget.style.background = e.bg),
|
|
1434
|
+
onMouseLeave: (C) => u !== z && (C.currentTarget.style.background = "transparent"),
|
|
1435
|
+
children: String(z).padStart(2, "0")
|
|
1435
1436
|
},
|
|
1436
|
-
|
|
1437
|
+
z
|
|
1437
1438
|
)) })
|
|
1438
1439
|
] }),
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
+
/* @__PURE__ */ x("div", { style: E, children: [
|
|
1440
1441
|
/* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textMut }, children: "Minutes" }),
|
|
1441
|
-
/* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children:
|
|
1442
|
+
/* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children: c.map((z) => /* @__PURE__ */ t(
|
|
1442
1443
|
"div",
|
|
1443
1444
|
{
|
|
1444
1445
|
onClick: () => {
|
|
1445
|
-
z
|
|
1446
|
+
M(z), w(u, z, o);
|
|
1446
1447
|
},
|
|
1447
|
-
style:
|
|
1448
|
-
onMouseEnter: (
|
|
1449
|
-
onMouseLeave: (
|
|
1450
|
-
children: String(
|
|
1448
|
+
style: A(y === z),
|
|
1449
|
+
onMouseEnter: (C) => y !== z && (C.currentTarget.style.background = e.bg),
|
|
1450
|
+
onMouseLeave: (C) => y !== z && (C.currentTarget.style.background = "transparent"),
|
|
1451
|
+
children: String(z).padStart(2, "0")
|
|
1451
1452
|
},
|
|
1452
|
-
|
|
1453
|
+
z
|
|
1453
1454
|
)) })
|
|
1454
1455
|
] }),
|
|
1455
|
-
d === 12 && /* @__PURE__ */
|
|
1456
|
+
d === 12 && /* @__PURE__ */ x("div", { style: E, children: [
|
|
1456
1457
|
/* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textMut }, children: "AM/PM" }),
|
|
1457
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden" }, children: ["AM", "PM"].map((
|
|
1458
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden" }, children: ["AM", "PM"].map((z) => /* @__PURE__ */ t(
|
|
1458
1459
|
"div",
|
|
1459
1460
|
{
|
|
1460
1461
|
onClick: () => {
|
|
1461
|
-
b(
|
|
1462
|
+
b(z), w(u, y, z);
|
|
1462
1463
|
},
|
|
1463
|
-
style: { height: 40, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", padding: "0 12px", fontSize: 13, fontWeight:
|
|
1464
|
-
children:
|
|
1464
|
+
style: { height: 40, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", padding: "0 12px", fontSize: 13, fontWeight: o === z ? 700 : 400, background: o === z ? e.primary : e.surface, color: o === z ? "#fff" : e.text },
|
|
1465
|
+
children: z
|
|
1465
1466
|
},
|
|
1466
|
-
|
|
1467
|
+
z
|
|
1467
1468
|
)) })
|
|
1468
1469
|
] })
|
|
1469
1470
|
] }),
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
String(
|
|
1471
|
+
/* @__PURE__ */ x("div", { style: { textAlign: "center", marginTop: 12, fontSize: 22, fontWeight: 700, color: e.primary, letterSpacing: 2 }, children: [
|
|
1472
|
+
String(u).padStart(2, "0"),
|
|
1472
1473
|
":",
|
|
1473
|
-
String(
|
|
1474
|
-
d === 12 ? ` ${
|
|
1474
|
+
String(y).padStart(2, "0"),
|
|
1475
|
+
d === 12 ? ` ${o}` : ""
|
|
1475
1476
|
] }),
|
|
1476
|
-
|
|
1477
|
-
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick:
|
|
1477
|
+
s && /* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, justifyContent: "flex-end", marginTop: 12 }, children: [
|
|
1478
|
+
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: L, children: "Cancel" }),
|
|
1478
1479
|
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () => {
|
|
1479
|
-
const
|
|
1480
|
-
i == null || i(
|
|
1480
|
+
const z = $ ?? (d === 24 ? { h: u, m: y } : { h: u, m: y, ampm: o });
|
|
1481
|
+
i == null || i(z);
|
|
1481
1482
|
}, children: "Apply" })
|
|
1482
1483
|
] })
|
|
1483
1484
|
] });
|
|
1484
1485
|
}
|
|
1485
|
-
const
|
|
1486
|
-
function
|
|
1487
|
-
var
|
|
1488
|
-
const [p,
|
|
1489
|
-
|
|
1490
|
-
),
|
|
1491
|
-
J(
|
|
1492
|
-
|
|
1486
|
+
const jt = ({ open: r }) => /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", style: { flexShrink: 0, transition: "transform .15s", transform: r ? "rotate(180deg)" : "rotate(0deg)" }, children: /* @__PURE__ */ t("path", { d: "M2 4l4 4 4-4", stroke: e.textMut, strokeWidth: "1.5", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1487
|
+
function je({ data: r = [], value: i, placeholder: d = "Select or type...", multiselection: s = !1, label: f, onChange: a, style: u }) {
|
|
1488
|
+
var V;
|
|
1489
|
+
const [p, y] = B(!1), [M, o] = B(""), [b, $] = B(
|
|
1490
|
+
s ? i ? [].concat(i) : [] : i || null
|
|
1491
|
+
), N = ie(null), D = ie(null);
|
|
1492
|
+
J(Z, []), xe(N, ae(() => {
|
|
1493
|
+
y(!1), o("");
|
|
1493
1494
|
}, []));
|
|
1494
|
-
const
|
|
1495
|
-
() =>
|
|
1496
|
-
[
|
|
1497
|
-
),
|
|
1498
|
-
const
|
|
1499
|
-
if (
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1495
|
+
const c = ue(
|
|
1496
|
+
() => r.filter((h) => !M || h.value.toLowerCase().includes(M.toLowerCase())),
|
|
1497
|
+
[r, M]
|
|
1498
|
+
), w = (h) => s ? (b || []).includes(h) : b === h, L = (h) => {
|
|
1499
|
+
const I = h.id || h.value;
|
|
1500
|
+
if (s) {
|
|
1501
|
+
const l = w(I) ? b.filter((g) => g !== I) : [...b || [], I];
|
|
1502
|
+
$(l), a == null || a(l);
|
|
1502
1503
|
} else
|
|
1503
|
-
|
|
1504
|
-
},
|
|
1505
|
-
const
|
|
1506
|
-
|
|
1507
|
-
},
|
|
1508
|
-
|
|
1509
|
-
var
|
|
1510
|
-
return (
|
|
1504
|
+
$(I), o(""), y(!1), a == null || a(I);
|
|
1505
|
+
}, E = (h) => {
|
|
1506
|
+
const I = b.filter((l) => l !== h);
|
|
1507
|
+
$(I), a == null || a(I);
|
|
1508
|
+
}, A = () => {
|
|
1509
|
+
y(!0), setTimeout(() => {
|
|
1510
|
+
var h;
|
|
1511
|
+
return (h = D.current) == null ? void 0 : h.focus();
|
|
1511
1512
|
}, 0);
|
|
1512
|
-
},
|
|
1513
|
-
return /* @__PURE__ */
|
|
1514
|
-
|
|
1515
|
-
/* @__PURE__ */
|
|
1513
|
+
}, z = ((V = r.find((h) => (h.id || h.value) === b)) == null ? void 0 : V.value) || "", C = s ? b || [] : [];
|
|
1514
|
+
return /* @__PURE__ */ x("div", { ref: N, className: "dhx", style: { position: "relative", ...u }, children: [
|
|
1515
|
+
f && /* @__PURE__ */ t("label", { className: "dhx dhx-label", children: f }),
|
|
1516
|
+
/* @__PURE__ */ x(
|
|
1516
1517
|
"div",
|
|
1517
1518
|
{
|
|
1518
|
-
onClick:
|
|
1519
|
+
onClick: A,
|
|
1519
1520
|
style: {
|
|
1520
1521
|
display: "flex",
|
|
1521
1522
|
alignItems: "center",
|
|
1522
|
-
flexWrap:
|
|
1523
|
+
flexWrap: s ? "wrap" : "nowrap",
|
|
1523
1524
|
border: `1px solid ${p ? e.primary : e.border}`,
|
|
1524
1525
|
borderRadius: e.r,
|
|
1525
1526
|
minHeight: 34,
|
|
@@ -1531,10 +1532,10 @@ function He({ data: n = [], value: i, placeholder: d = "Select or type...", mult
|
|
|
1531
1532
|
boxShadow: p ? `0 0 0 3px ${e.primary}22` : "none"
|
|
1532
1533
|
},
|
|
1533
1534
|
children: [
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
var
|
|
1537
|
-
return /* @__PURE__ */
|
|
1535
|
+
s && /* @__PURE__ */ x(Ye, { children: [
|
|
1536
|
+
C.map((h) => {
|
|
1537
|
+
var I;
|
|
1538
|
+
return /* @__PURE__ */ x("span", { style: {
|
|
1538
1539
|
display: "inline-flex",
|
|
1539
1540
|
alignItems: "center",
|
|
1540
1541
|
gap: 4,
|
|
@@ -1546,51 +1547,51 @@ function He({ data: n = [], value: i, placeholder: d = "Select or type...", mult
|
|
|
1546
1547
|
lineHeight: 1.5,
|
|
1547
1548
|
whiteSpace: "nowrap"
|
|
1548
1549
|
}, children: [
|
|
1549
|
-
((
|
|
1550
|
+
((I = r.find((l) => (l.id || l.value) === h)) == null ? void 0 : I.value) || h,
|
|
1550
1551
|
/* @__PURE__ */ t(
|
|
1551
1552
|
"span",
|
|
1552
1553
|
{
|
|
1553
|
-
onClick: (
|
|
1554
|
-
|
|
1554
|
+
onClick: (l) => {
|
|
1555
|
+
l.stopPropagation(), E(h);
|
|
1555
1556
|
},
|
|
1556
1557
|
style: { cursor: "pointer", fontSize: 15, lineHeight: 1, opacity: 0.75, marginLeft: 2 },
|
|
1557
1558
|
children: "×"
|
|
1558
1559
|
}
|
|
1559
1560
|
)
|
|
1560
|
-
] },
|
|
1561
|
+
] }, h);
|
|
1561
1562
|
}),
|
|
1562
1563
|
/* @__PURE__ */ t(
|
|
1563
1564
|
"input",
|
|
1564
1565
|
{
|
|
1565
|
-
ref:
|
|
1566
|
-
value:
|
|
1567
|
-
onChange: (
|
|
1568
|
-
|
|
1566
|
+
ref: D,
|
|
1567
|
+
value: M,
|
|
1568
|
+
onChange: (h) => {
|
|
1569
|
+
o(h.target.value), y(!0);
|
|
1569
1570
|
},
|
|
1570
|
-
onFocus: () =>
|
|
1571
|
-
onClick: (
|
|
1572
|
-
placeholder:
|
|
1571
|
+
onFocus: () => y(!0),
|
|
1572
|
+
onClick: (h) => h.stopPropagation(),
|
|
1573
|
+
placeholder: C.length ? "" : d,
|
|
1573
1574
|
style: { flex: 1, minWidth: 60, border: "none", outline: "none", fontSize: 13, background: "transparent", color: e.text, padding: 0 }
|
|
1574
1575
|
}
|
|
1575
1576
|
)
|
|
1576
1577
|
] }),
|
|
1577
|
-
!
|
|
1578
|
+
!s && /* @__PURE__ */ t(
|
|
1578
1579
|
"input",
|
|
1579
1580
|
{
|
|
1580
|
-
ref:
|
|
1581
|
-
value: p ?
|
|
1582
|
-
onChange: (
|
|
1583
|
-
|
|
1581
|
+
ref: D,
|
|
1582
|
+
value: p ? M : z,
|
|
1583
|
+
onChange: (h) => {
|
|
1584
|
+
o(h.target.value), y(!0);
|
|
1584
1585
|
},
|
|
1585
1586
|
onFocus: () => {
|
|
1586
|
-
|
|
1587
|
+
y(!0), o("");
|
|
1587
1588
|
},
|
|
1588
|
-
onClick: (
|
|
1589
|
+
onClick: (h) => h.stopPropagation(),
|
|
1589
1590
|
placeholder: d,
|
|
1590
1591
|
style: { flex: 1, border: "none", outline: "none", fontSize: 13, background: "transparent", color: e.text, padding: 0 }
|
|
1591
1592
|
}
|
|
1592
1593
|
),
|
|
1593
|
-
/* @__PURE__ */ t(
|
|
1594
|
+
/* @__PURE__ */ t(jt, { open: p })
|
|
1594
1595
|
]
|
|
1595
1596
|
}
|
|
1596
1597
|
),
|
|
@@ -1604,13 +1605,13 @@ function He({ data: n = [], value: i, placeholder: d = "Select or type...", mult
|
|
|
1604
1605
|
borderRadius: e.r,
|
|
1605
1606
|
boxShadow: e.shadowLg,
|
|
1606
1607
|
zIndex: 100
|
|
1607
|
-
}, children: /* @__PURE__ */
|
|
1608
|
-
|
|
1609
|
-
const
|
|
1610
|
-
return /* @__PURE__ */
|
|
1608
|
+
}, children: /* @__PURE__ */ x("div", { className: "dhx-scroll", style: { maxHeight: 220, overflowY: "auto" }, children: [
|
|
1609
|
+
c.map((h) => {
|
|
1610
|
+
const I = h.id || h.value, l = w(I);
|
|
1611
|
+
return /* @__PURE__ */ x(
|
|
1611
1612
|
"div",
|
|
1612
1613
|
{
|
|
1613
|
-
onClick: () =>
|
|
1614
|
+
onClick: () => L(h),
|
|
1614
1615
|
style: {
|
|
1615
1616
|
padding: "8px 12px",
|
|
1616
1617
|
cursor: "pointer",
|
|
@@ -1618,471 +1619,471 @@ function He({ data: n = [], value: i, placeholder: d = "Select or type...", mult
|
|
|
1618
1619
|
alignItems: "center",
|
|
1619
1620
|
gap: 8,
|
|
1620
1621
|
fontSize: 13,
|
|
1621
|
-
background:
|
|
1622
|
-
color:
|
|
1622
|
+
background: l ? e.primaryLt : "transparent",
|
|
1623
|
+
color: l ? e.primary : e.text
|
|
1623
1624
|
},
|
|
1624
|
-
onMouseEnter: (
|
|
1625
|
-
onMouseLeave: (
|
|
1625
|
+
onMouseEnter: (g) => !l && (g.currentTarget.style.background = e.bg),
|
|
1626
|
+
onMouseLeave: (g) => !l && (g.currentTarget.style.background = "transparent"),
|
|
1626
1627
|
children: [
|
|
1627
|
-
|
|
1628
|
+
s && /* @__PURE__ */ t("span", { style: {
|
|
1628
1629
|
width: 14,
|
|
1629
1630
|
height: 14,
|
|
1630
1631
|
flexShrink: 0,
|
|
1631
|
-
border: `2px solid ${
|
|
1632
|
+
border: `2px solid ${l ? e.primary : e.borderDk}`,
|
|
1632
1633
|
borderRadius: 3,
|
|
1633
1634
|
display: "flex",
|
|
1634
1635
|
alignItems: "center",
|
|
1635
1636
|
justifyContent: "center",
|
|
1636
|
-
background:
|
|
1637
|
-
}, children:
|
|
1638
|
-
/* @__PURE__ */ t("span", { style: { flex: 1 }, children:
|
|
1639
|
-
!
|
|
1640
|
-
|
|
1637
|
+
background: l ? e.primary : "transparent"
|
|
1638
|
+
}, children: l && /* @__PURE__ */ t("span", { style: { color: "#fff", fontSize: 9, lineHeight: 1 }, children: "✓" }) }),
|
|
1639
|
+
/* @__PURE__ */ t("span", { style: { flex: 1 }, children: h.value }),
|
|
1640
|
+
!s && l && /* @__PURE__ */ t("span", { style: { color: e.primary, fontSize: 12, fontWeight: 700 }, children: "✓" }),
|
|
1641
|
+
h.count !== void 0 && /* @__PURE__ */ x("span", { style: { fontSize: 11, color: e.textMut }, children: [
|
|
1641
1642
|
"(",
|
|
1642
|
-
|
|
1643
|
+
h.count,
|
|
1643
1644
|
")"
|
|
1644
1645
|
] })
|
|
1645
1646
|
]
|
|
1646
1647
|
},
|
|
1647
|
-
|
|
1648
|
+
I
|
|
1648
1649
|
);
|
|
1649
1650
|
}),
|
|
1650
|
-
|
|
1651
|
+
c.length === 0 && /* @__PURE__ */ t("div", { style: { padding: 16, textAlign: "center", color: e.textMut, fontSize: 13 }, children: "No matches" })
|
|
1651
1652
|
] }) })
|
|
1652
1653
|
] });
|
|
1653
1654
|
}
|
|
1654
|
-
function
|
|
1655
|
-
const [
|
|
1656
|
-
J(
|
|
1657
|
-
const
|
|
1655
|
+
function Oe({ min: r = 0, max: i = 100, step: d = 1, value: s, range: f = !1, label: a, tick: u, disabled: p = !1, onChange: y, style: M }) {
|
|
1656
|
+
const [o, b] = B(s ?? (f ? [r, i] : r));
|
|
1657
|
+
J(Z, []);
|
|
1658
|
+
const $ = (L, E) => {
|
|
1658
1659
|
if (!p)
|
|
1659
|
-
if (
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1660
|
+
if (f) {
|
|
1661
|
+
const A = [...o];
|
|
1662
|
+
A[L] = E, b(A), y == null || y(A);
|
|
1662
1663
|
} else
|
|
1663
|
-
b(
|
|
1664
|
-
},
|
|
1665
|
-
return /* @__PURE__ */
|
|
1666
|
-
|
|
1667
|
-
/* @__PURE__ */ t("div", { style: { position: "relative", height: 36, display: "flex", alignItems: "center" }, children: /* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */ t("div", { style: { position: "absolute", ...
|
|
1669
|
-
|
|
1664
|
+
b(E), y == null || y(E);
|
|
1665
|
+
}, N = (L) => (L - r) / (i - r) * 100, D = f ? o : [o], c = f ? { left: `${N(D[0])}%`, width: `${N(D[1]) - N(D[0])}%` } : { left: 0, width: `${N(D[0])}%` }, w = p ? e.border : e.primary;
|
|
1666
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { width: "100%", opacity: p ? 0.5 : 1, ...M }, children: [
|
|
1667
|
+
a && /* @__PURE__ */ t("label", { className: "dhx dhx-label", children: a }),
|
|
1668
|
+
/* @__PURE__ */ t("div", { style: { position: "relative", height: 36, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ x("div", { style: { position: "relative", flex: 1, height: 4, background: e.border, borderRadius: 2 }, children: [
|
|
1669
|
+
/* @__PURE__ */ t("div", { style: { position: "absolute", ...c, height: "100%", background: w, borderRadius: 2 } }),
|
|
1670
|
+
D.map((L, E) => /* @__PURE__ */ t(
|
|
1670
1671
|
"input",
|
|
1671
1672
|
{
|
|
1672
1673
|
type: "range",
|
|
1673
|
-
min:
|
|
1674
|
+
min: r,
|
|
1674
1675
|
max: i,
|
|
1675
1676
|
step: d,
|
|
1676
|
-
value:
|
|
1677
|
+
value: L,
|
|
1677
1678
|
disabled: p,
|
|
1678
|
-
onChange: (
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1679
|
+
onChange: (A) => {
|
|
1680
|
+
const z = +A.target.value;
|
|
1681
|
+
f && E === 0 && z >= o[1] || f && E === 1 && z <= o[0] || $(E, z);
|
|
1681
1682
|
},
|
|
1682
1683
|
style: { position: "absolute", width: "100%", height: "100%", opacity: 0, cursor: p ? "not-allowed" : "pointer", top: 0, left: 0, margin: 0 }
|
|
1683
1684
|
},
|
|
1684
|
-
|
|
1685
|
+
E
|
|
1685
1686
|
)),
|
|
1686
|
-
|
|
1687
|
+
D.map((L, E) => /* @__PURE__ */ t("div", { style: { position: "absolute", left: `${N(L)}%`, top: "50%", transform: "translate(-50%, -50%)", width: 16, height: 16, borderRadius: "50%", background: e.surface, border: `2px solid ${w}`, boxShadow: "0 1px 4px rgba(0,0,0,.2)", pointerEvents: "none" }, children: /* @__PURE__ */ t("div", { style: { position: "absolute", bottom: "calc(100% + 6px)", left: "50%", transform: "translateX(-50%)", background: p ? e.textMut : e.primaryDk, color: "#fff", padding: "2px 6px", borderRadius: e.r, fontSize: 11, fontWeight: 700, whiteSpace: "nowrap" }, children: L }) }, E))
|
|
1687
1688
|
] }) }),
|
|
1688
|
-
|
|
1689
|
+
u && /* @__PURE__ */ t("div", { style: { display: "flex", justifyContent: "space-between", marginTop: 2 }, children: [r, Math.round((i + r) / 2), i].map((L) => /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: L }, L)) })
|
|
1689
1690
|
] });
|
|
1690
1691
|
}
|
|
1691
|
-
const
|
|
1692
|
-
function ze(
|
|
1693
|
-
const i = parseInt(
|
|
1694
|
-
let
|
|
1695
|
-
const
|
|
1696
|
-
if (
|
|
1697
|
-
const
|
|
1698
|
-
p =
|
|
1692
|
+
const Ot = ["#f44336", "#e91e63", "#9c27b0", "#673ab7", "#3f51b5", "#2196f3", "#03a9f4", "#00bcd4", "#009688", "#4caf50", "#8bc34a", "#cddc39", "#ffeb3b", "#ffc107", "#ff9800", "#ff5722", "#795548", "#607d8b", "#9e9e9e", "#000000", "#ffffff", "#0288d1", "#01579b", "#43a047", "#e53935", "#f57c00"];
|
|
1693
|
+
function ze(r) {
|
|
1694
|
+
const i = parseInt(r.slice(1, 3), 16) / 255, d = parseInt(r.slice(3, 5), 16) / 255, s = parseInt(r.slice(5, 7), 16) / 255, f = Math.max(i, d, s), a = Math.min(i, d, s);
|
|
1695
|
+
let u = 0, p = 0;
|
|
1696
|
+
const y = (f + a) / 2;
|
|
1697
|
+
if (f !== a) {
|
|
1698
|
+
const M = f - a;
|
|
1699
|
+
p = y > 0.5 ? M / (2 - f - a) : M / (f + a), u = f === i ? ((d - s) / M + (d < s ? 6 : 0)) / 6 : f === d ? ((s - i) / M + 2) / 6 : ((i - d) / M + 4) / 6;
|
|
1699
1700
|
}
|
|
1700
|
-
return [Math.round(
|
|
1701
|
+
return [Math.round(u * 360), Math.round(p * 100), Math.round(y * 100)];
|
|
1701
1702
|
}
|
|
1702
|
-
function
|
|
1703
|
+
function Pe(r, i, d) {
|
|
1703
1704
|
i /= 100, d /= 100;
|
|
1704
|
-
const
|
|
1705
|
-
const
|
|
1705
|
+
const s = i * Math.min(d, 1 - d), f = (a) => {
|
|
1706
|
+
const u = (a + r / 30) % 12, p = d - s * Math.max(Math.min(u - 3, 9 - u, 1), -1);
|
|
1706
1707
|
return Math.round(255 * p).toString(16).padStart(2, "0");
|
|
1707
1708
|
};
|
|
1708
|
-
return "#" +
|
|
1709
|
+
return "#" + f(0) + f(8) + f(4);
|
|
1709
1710
|
}
|
|
1710
|
-
function
|
|
1711
|
-
const [
|
|
1712
|
-
J(
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1711
|
+
function lr({ value: r = "#0288d1", onChange: i, style: d }) {
|
|
1712
|
+
const [s, f] = B(() => ze(r)), a = Pe(...s);
|
|
1713
|
+
J(Z, []);
|
|
1714
|
+
const u = (p) => {
|
|
1715
|
+
f(p), i == null || i(Pe(...p));
|
|
1715
1716
|
};
|
|
1716
|
-
return /* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */ t("div", { style: { width: 200, height: 120, borderRadius: e.r, marginBottom: 12, background: `linear-gradient(to bottom, transparent, black), linear-gradient(to right, white, hsl(${
|
|
1718
|
-
[["Hue", 0, 360,
|
|
1719
|
-
/* @__PURE__ */
|
|
1717
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...d }, children: [
|
|
1718
|
+
/* @__PURE__ */ t("div", { style: { width: 200, height: 120, borderRadius: e.r, marginBottom: 12, background: `linear-gradient(to bottom, transparent, black), linear-gradient(to right, white, hsl(${s[0]},100%,50%))`, cursor: "crosshair" } }),
|
|
1719
|
+
[["Hue", 0, 360, s[0]], ["Saturation", 0, 100, s[1]], ["Lightness", 0, 100, s[2]]].map(([p, y, M, o], b) => /* @__PURE__ */ x("div", { style: { marginBottom: b < 2 ? 8 : 12 }, children: [
|
|
1720
|
+
/* @__PURE__ */ x("div", { className: "dhx dhx-label", children: [
|
|
1720
1721
|
p,
|
|
1721
|
-
b > 0 ? ` (${
|
|
1722
|
+
b > 0 ? ` (${o}%)` : ""
|
|
1722
1723
|
] }),
|
|
1723
|
-
/* @__PURE__ */ t("input", { type: "range", min:
|
|
1724
|
-
const
|
|
1725
|
-
|
|
1724
|
+
/* @__PURE__ */ t("input", { type: "range", min: y, max: M, value: o, onChange: ($) => {
|
|
1725
|
+
const N = [...s];
|
|
1726
|
+
N[b] = +$.target.value, u(N);
|
|
1726
1727
|
}, style: { width: "100%", accentColor: e.primary } })
|
|
1727
1728
|
] }, p)),
|
|
1728
|
-
/* @__PURE__ */
|
|
1729
|
-
/* @__PURE__ */ t("div", { style: { width: 36, height: 36, borderRadius: e.r, background:
|
|
1729
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
|
|
1730
|
+
/* @__PURE__ */ t("div", { style: { width: 36, height: 36, borderRadius: e.r, background: a, border: `1px solid ${e.border}`, flexShrink: 0 } }),
|
|
1730
1731
|
/* @__PURE__ */ t(
|
|
1731
1732
|
"input",
|
|
1732
1733
|
{
|
|
1733
1734
|
className: "dhx dhx-input",
|
|
1734
1735
|
style: { flex: 1, fontFamily: "monospace", fontSize: 12 },
|
|
1735
|
-
value:
|
|
1736
|
+
value: a,
|
|
1736
1737
|
onChange: (p) => {
|
|
1737
1738
|
try {
|
|
1738
|
-
|
|
1739
|
+
u(ze(p.target.value)), i == null || i(p.target.value);
|
|
1739
1740
|
} catch {
|
|
1740
1741
|
}
|
|
1741
1742
|
}
|
|
1742
1743
|
}
|
|
1743
1744
|
)
|
|
1744
1745
|
] }),
|
|
1745
|
-
/* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(13, 1fr)", gap: 3 }, children:
|
|
1746
|
+
/* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(13, 1fr)", gap: 3 }, children: Ot.map((p) => /* @__PURE__ */ t(
|
|
1746
1747
|
"div",
|
|
1747
1748
|
{
|
|
1748
1749
|
onClick: () => {
|
|
1749
|
-
|
|
1750
|
+
f(ze(p)), i == null || i(p);
|
|
1750
1751
|
},
|
|
1751
|
-
style: { width: 14, height: 14, borderRadius: 2, background: p, cursor: "pointer", border:
|
|
1752
|
-
onMouseEnter: (
|
|
1753
|
-
onMouseLeave: (
|
|
1752
|
+
style: { width: 14, height: 14, borderRadius: 2, background: p, cursor: "pointer", border: a === p ? `2px solid ${e.text}` : "1px solid rgba(0,0,0,.15)", transition: "transform .1s" },
|
|
1753
|
+
onMouseEnter: (y) => y.currentTarget.style.transform = "scale(1.3)",
|
|
1754
|
+
onMouseLeave: (y) => y.currentTarget.style.transform = "scale(1)"
|
|
1754
1755
|
},
|
|
1755
1756
|
p
|
|
1756
1757
|
)) })
|
|
1757
1758
|
] });
|
|
1758
1759
|
}
|
|
1759
|
-
function
|
|
1760
|
-
const [
|
|
1761
|
-
return J(
|
|
1762
|
-
/* @__PURE__ */ t("div", { ref:
|
|
1763
|
-
|
|
1764
|
-
if (!b &&
|
|
1765
|
-
const
|
|
1766
|
-
"bottom-start": { top:
|
|
1767
|
-
"bottom-end": { top:
|
|
1768
|
-
"top-start": { bottom:
|
|
1760
|
+
function sr({ trigger: r, children: i, placement: d = "bottom-start", style: s }) {
|
|
1761
|
+
const [f, a] = B(!1), [u, p] = B({ top: "100%", left: 0 }), y = ie(null), M = ie(null);
|
|
1762
|
+
return J(Z, []), xe(y, ae(() => a(!1), [])), /* @__PURE__ */ x("div", { ref: y, className: "dhx", style: { position: "relative", display: "inline-block" }, children: [
|
|
1763
|
+
/* @__PURE__ */ t("div", { ref: M, onClick: () => {
|
|
1764
|
+
a((b) => {
|
|
1765
|
+
if (!b && M.current) {
|
|
1766
|
+
const $ = M.current.getBoundingClientRect(), N = {
|
|
1767
|
+
"bottom-start": { top: $.height + 4, left: 0 },
|
|
1768
|
+
"bottom-end": { top: $.height + 4, right: 0, left: "auto" },
|
|
1769
|
+
"top-start": { bottom: $.height + 4, top: "auto", left: 0 }
|
|
1769
1770
|
};
|
|
1770
|
-
p(
|
|
1771
|
+
p(N[d] || N["bottom-start"]);
|
|
1771
1772
|
}
|
|
1772
1773
|
return !b;
|
|
1773
1774
|
});
|
|
1774
|
-
}, children:
|
|
1775
|
-
|
|
1775
|
+
}, children: r }),
|
|
1776
|
+
f && /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", ...u, zIndex: 200, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, boxShadow: e.shadowLg, ...s }, children: i })
|
|
1776
1777
|
] });
|
|
1777
1778
|
}
|
|
1778
|
-
function
|
|
1779
|
-
const [b,
|
|
1780
|
-
J(
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1779
|
+
function ar({ title: r, children: i, width: d = 480, height: s, closable: f = !0, movable: a = !0, modal: u = !1, defaultOpen: p = !0, footer: y, onClose: M, style: o }) {
|
|
1780
|
+
const [b, $] = B(p), [N, D] = B({ x: 0, y: 0 });
|
|
1781
|
+
J(Z, []);
|
|
1782
|
+
const c = zt(ae((L, E) => a && D({ x: L, y: E }), [a])), w = () => {
|
|
1783
|
+
$(!1), M == null || M();
|
|
1783
1784
|
};
|
|
1784
|
-
return b ? /* @__PURE__ */
|
|
1785
|
-
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */ t("span", { style: { flex: 1, fontWeight: 700, fontSize: 15 }, children:
|
|
1789
|
-
|
|
1785
|
+
return b ? /* @__PURE__ */ x(Ye, { children: [
|
|
1786
|
+
u && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,.45)", zIndex: 900 }, onClick: f ? w : void 0 }),
|
|
1787
|
+
/* @__PURE__ */ x("div", { className: "dhx", style: { position: u ? "fixed" : "absolute", left: "50%", top: "50%", transform: `translate(calc(-50% + ${N.x}px), calc(-50% + ${N.y}px))`, width: d, ...s ? { height: s } : {}, background: e.surface, borderRadius: e.rMd, boxShadow: e.shadowLg, zIndex: 901, display: "flex", flexDirection: "column", overflow: "hidden", ...o }, children: [
|
|
1788
|
+
/* @__PURE__ */ x("div", { onMouseDown: (L) => c(L, N.x, N.y), style: { display: "flex", alignItems: "center", padding: "12px 16px", borderBottom: `1px solid ${e.border}`, cursor: a ? "grab" : "default", background: e.bg, gap: 8, userSelect: "none" }, children: [
|
|
1789
|
+
/* @__PURE__ */ t("span", { style: { flex: 1, fontWeight: 700, fontSize: 15 }, children: r }),
|
|
1790
|
+
f && /* @__PURE__ */ t(
|
|
1790
1791
|
"button",
|
|
1791
1792
|
{
|
|
1792
|
-
onClick:
|
|
1793
|
+
onClick: w,
|
|
1793
1794
|
style: { background: "none", border: "none", cursor: "pointer", width: 28, height: 28, borderRadius: e.r, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 18, color: e.textSec },
|
|
1794
|
-
onMouseEnter: (
|
|
1795
|
-
onMouseLeave: (
|
|
1795
|
+
onMouseEnter: (L) => L.currentTarget.style.background = e.border,
|
|
1796
|
+
onMouseLeave: (L) => L.currentTarget.style.background = "none",
|
|
1796
1797
|
children: "×"
|
|
1797
1798
|
}
|
|
1798
1799
|
)
|
|
1799
1800
|
] }),
|
|
1800
1801
|
/* @__PURE__ */ t("div", { className: "dhx-scroll", style: { flex: 1, minHeight: 0, padding: 20, overflowY: "auto" }, children: i }),
|
|
1801
|
-
|
|
1802
|
+
y && /* @__PURE__ */ t("div", { style: { padding: "12px 16px", borderTop: `1px solid ${e.border}`, display: "flex", justifyContent: "flex-end", gap: 8, background: e.bg }, children: y })
|
|
1802
1803
|
] })
|
|
1803
1804
|
] }) : null;
|
|
1804
1805
|
}
|
|
1805
|
-
const Ke =
|
|
1806
|
-
function
|
|
1806
|
+
const Ke = Ze(null), Pt = { success: "✓", error: "✕", warning: "⚠", info: "ℹ" }, Fe = { success: e.success, error: e.danger, warning: e.warning, info: e.primary };
|
|
1807
|
+
function dr({ children: r }) {
|
|
1807
1808
|
const [i, d] = B([]);
|
|
1808
|
-
J(
|
|
1809
|
-
const
|
|
1809
|
+
J(Z, []);
|
|
1810
|
+
const s = ae((u) => d((p) => p.filter((y) => y.id !== u)), []), f = ae((u) => {
|
|
1810
1811
|
const p = Date.now();
|
|
1811
|
-
return d((
|
|
1812
|
-
}, [
|
|
1813
|
-
message:
|
|
1814
|
-
alert: (
|
|
1815
|
-
confirm: (
|
|
1812
|
+
return d((y) => [...y, { id: p, ...u }]), u.duration !== 0 && setTimeout(() => s(p), u.duration || 4e3), p;
|
|
1813
|
+
}, [s]), a = {
|
|
1814
|
+
message: f,
|
|
1815
|
+
alert: (u, p) => f({ type: "info", title: u, ...p }),
|
|
1816
|
+
confirm: (u, p, y) => f({ type: "warning", title: u, confirm: p, ...y })
|
|
1816
1817
|
};
|
|
1817
|
-
return /* @__PURE__ */
|
|
1818
|
-
|
|
1819
|
-
/* @__PURE__ */ t("div", { style: { position: "fixed", top: 20, right: 20, zIndex: 9999, display: "flex", flexDirection: "column", gap: 8, pointerEvents: "none" }, children: i.map((
|
|
1820
|
-
const p =
|
|
1821
|
-
return /* @__PURE__ */
|
|
1822
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 18, color:
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1818
|
+
return /* @__PURE__ */ x(Ke.Provider, { value: a, children: [
|
|
1819
|
+
r,
|
|
1820
|
+
/* @__PURE__ */ t("div", { style: { position: "fixed", top: 20, right: 20, zIndex: 9999, display: "flex", flexDirection: "column", gap: 8, pointerEvents: "none" }, children: i.map((u) => {
|
|
1821
|
+
const p = u.type || "info";
|
|
1822
|
+
return /* @__PURE__ */ x("div", { style: { background: e.surface, border: `1px solid ${e.border}`, borderLeft: `4px solid ${Fe[p]}`, borderRadius: e.r, boxShadow: e.shadowLg, padding: "12px 16px", minWidth: 280, maxWidth: 380, pointerEvents: "all", display: "flex", gap: 10, alignItems: "flex-start", animation: "dhx-toast .3s ease" }, children: [
|
|
1823
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 18, color: Fe[p], lineHeight: 1 }, children: Pt[p] }),
|
|
1824
|
+
/* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
|
|
1825
|
+
u.title && /* @__PURE__ */ t("div", { style: { fontWeight: 600, fontSize: 13, marginBottom: u.text ? 3 : 0 }, children: u.title }),
|
|
1826
|
+
u.text && /* @__PURE__ */ t("div", { style: { fontSize: 12, color: e.textSec, lineHeight: 1.5 }, children: u.text }),
|
|
1827
|
+
u.confirm && /* @__PURE__ */ x("div", { style: { display: "flex", gap: 6, marginTop: 8 }, children: [
|
|
1827
1828
|
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", style: { height: 26, fontSize: 12 }, onClick: () => {
|
|
1828
|
-
|
|
1829
|
+
u.confirm(!0), s(u.id);
|
|
1829
1830
|
}, children: "Confirm" }),
|
|
1830
1831
|
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", style: { height: 26, fontSize: 12 }, onClick: () => {
|
|
1831
|
-
|
|
1832
|
+
u.confirm(!1), s(u.id);
|
|
1832
1833
|
}, children: "Cancel" })
|
|
1833
1834
|
] })
|
|
1834
1835
|
] }),
|
|
1835
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1836
|
-
] },
|
|
1836
|
+
/* @__PURE__ */ t("button", { onClick: () => s(u.id), style: { background: "none", border: "none", cursor: "pointer", color: e.textMut, fontSize: 14, lineHeight: 1, padding: 0 }, children: "×" })
|
|
1837
|
+
] }, u.id);
|
|
1837
1838
|
}) })
|
|
1838
1839
|
] });
|
|
1839
1840
|
}
|
|
1840
|
-
function
|
|
1841
|
-
const
|
|
1842
|
-
if (!
|
|
1843
|
-
return
|
|
1841
|
+
function cr() {
|
|
1842
|
+
const r = et(Ke);
|
|
1843
|
+
if (!r) throw new Error("useMessage must be used inside <MessageProvider>");
|
|
1844
|
+
return r;
|
|
1844
1845
|
}
|
|
1845
|
-
function
|
|
1846
|
-
const [
|
|
1847
|
-
J(
|
|
1848
|
-
const
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
return
|
|
1853
|
-
}),
|
|
1854
|
-
},
|
|
1855
|
-
p == null || p({ ...
|
|
1846
|
+
function ur({ data: r = [], template: i, keyNavigation: d = !0, multiselection: s = !1, editable: f = !1, height: a = 400, onSelect: u, onEdit: p, style: y }) {
|
|
1847
|
+
const [M, o] = B(/* @__PURE__ */ new Set()), [b, $] = B(null), [N, D] = B(""), [c, w] = B(null);
|
|
1848
|
+
J(Z, []);
|
|
1849
|
+
const L = (A, z) => {
|
|
1850
|
+
const C = A.id ?? z;
|
|
1851
|
+
o((V) => {
|
|
1852
|
+
const h = s ? new Set(V) : /* @__PURE__ */ new Set();
|
|
1853
|
+
return h.has(C) ? h.delete(C) : h.add(C), h;
|
|
1854
|
+
}), w(z), u == null || u(A);
|
|
1855
|
+
}, E = (A, z) => {
|
|
1856
|
+
p == null || p({ ...A, value: N }, z), $(null);
|
|
1856
1857
|
};
|
|
1857
|
-
return /* @__PURE__ */
|
|
1858
|
+
return /* @__PURE__ */ x(
|
|
1858
1859
|
"div",
|
|
1859
1860
|
{
|
|
1860
1861
|
className: "dhx dhx-scroll",
|
|
1861
|
-
style: { height:
|
|
1862
|
+
style: { height: a, overflowY: "auto", border: `1px solid ${e.border}`, borderRadius: e.r, background: e.surface, ...y },
|
|
1862
1863
|
tabIndex: 0,
|
|
1863
|
-
onKeyDown: (
|
|
1864
|
-
d && (
|
|
1864
|
+
onKeyDown: (A) => {
|
|
1865
|
+
d && (A.key === "ArrowDown" && w((z) => Math.min((z ?? -1) + 1, r.length - 1)), A.key === "ArrowUp" && w((z) => Math.max((z ?? 1) - 1, 0)));
|
|
1865
1866
|
},
|
|
1866
1867
|
children: [
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1868
|
+
r.map((A, z) => {
|
|
1869
|
+
const C = A.id ?? z, V = M.has(C), h = c === z;
|
|
1869
1870
|
return /* @__PURE__ */ t(
|
|
1870
1871
|
"div",
|
|
1871
1872
|
{
|
|
1872
|
-
onClick: () =>
|
|
1873
|
-
onDoubleClick: () =>
|
|
1874
|
-
style: { display: "flex", alignItems: "center", padding: "0 12px", height: 40, cursor: "pointer", fontSize: 13, borderBottom: `1px solid ${e.border}`, background:
|
|
1875
|
-
children: b ===
|
|
1873
|
+
onClick: () => L(A, z),
|
|
1874
|
+
onDoubleClick: () => f && ($(z), D(String(A.value || ""))),
|
|
1875
|
+
style: { display: "flex", alignItems: "center", padding: "0 12px", height: 40, cursor: "pointer", fontSize: 13, borderBottom: `1px solid ${e.border}`, background: V ? e.primaryLt : h ? e.bg : e.surface, color: V ? e.primary : e.text, outline: h ? `2px solid ${e.primary}44` : "none", transition: "background .1s" },
|
|
1876
|
+
children: b === z ? /* @__PURE__ */ t(
|
|
1876
1877
|
"input",
|
|
1877
1878
|
{
|
|
1878
1879
|
autoFocus: !0,
|
|
1879
1880
|
className: "dhx dhx-input",
|
|
1880
1881
|
style: { height: 28, flex: 1 },
|
|
1881
|
-
value:
|
|
1882
|
-
onChange: (
|
|
1883
|
-
onBlur: () =>
|
|
1884
|
-
onKeyDown: (
|
|
1885
|
-
|
|
1882
|
+
value: N,
|
|
1883
|
+
onChange: (I) => D(I.target.value),
|
|
1884
|
+
onBlur: () => E(A, z),
|
|
1885
|
+
onKeyDown: (I) => {
|
|
1886
|
+
I.key === "Enter" && E(A, z), I.key === "Escape" && $(null);
|
|
1886
1887
|
},
|
|
1887
|
-
onClick: (
|
|
1888
|
+
onClick: (I) => I.stopPropagation()
|
|
1888
1889
|
}
|
|
1889
|
-
) : i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(
|
|
1890
|
+
) : i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(A) }, style: { flex: 1 } }) : /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: String(A.value ?? "") })
|
|
1890
1891
|
},
|
|
1891
|
-
String(
|
|
1892
|
+
String(C)
|
|
1892
1893
|
);
|
|
1893
1894
|
}),
|
|
1894
|
-
|
|
1895
|
+
r.length === 0 && /* @__PURE__ */ t("div", { style: { padding: 24, textAlign: "center", color: e.textMut }, children: "No items" })
|
|
1895
1896
|
]
|
|
1896
1897
|
}
|
|
1897
1898
|
);
|
|
1898
1899
|
}
|
|
1899
|
-
function
|
|
1900
|
-
const [p,
|
|
1901
|
-
J(
|
|
1902
|
-
const
|
|
1903
|
-
const b =
|
|
1904
|
-
|
|
1905
|
-
const
|
|
1906
|
-
return
|
|
1907
|
-
}),
|
|
1900
|
+
function pr({ data: r = [], template: i, itemsInRow: d = 3, gap: s = 12, multiselection: f = !1, onSelect: a, style: u }) {
|
|
1901
|
+
const [p, y] = B(/* @__PURE__ */ new Set());
|
|
1902
|
+
J(Z, []);
|
|
1903
|
+
const M = (o) => {
|
|
1904
|
+
const b = o.id ?? String(o.title);
|
|
1905
|
+
y(($) => {
|
|
1906
|
+
const N = f ? new Set($) : /* @__PURE__ */ new Set();
|
|
1907
|
+
return N.has(b) ? N.delete(b) : N.add(b), N;
|
|
1908
|
+
}), a == null || a(o);
|
|
1908
1909
|
};
|
|
1909
|
-
return /* @__PURE__ */ t("div", { className: "dhx", style: { display: "grid", gridTemplateColumns: `repeat(${d}, 1fr)`, gap:
|
|
1910
|
-
const
|
|
1910
|
+
return /* @__PURE__ */ t("div", { className: "dhx", style: { display: "grid", gridTemplateColumns: `repeat(${d}, 1fr)`, gap: s, padding: s, ...u }, children: r.map((o, b) => {
|
|
1911
|
+
const $ = o.id ?? b, N = p.has($);
|
|
1911
1912
|
return /* @__PURE__ */ t(
|
|
1912
1913
|
"div",
|
|
1913
1914
|
{
|
|
1914
|
-
onClick: () =>
|
|
1915
|
-
style: { background: e.surface, border: `2px solid ${
|
|
1916
|
-
onMouseEnter: (
|
|
1917
|
-
|
|
1915
|
+
onClick: () => M(o),
|
|
1916
|
+
style: { background: e.surface, border: `2px solid ${N ? e.primary : e.border}`, borderRadius: e.rMd, overflow: "hidden", cursor: "pointer", transition: "all .15s", boxShadow: N ? `0 0 0 3px ${e.primary}33` : e.shadow, transform: N ? "translateY(-2px)" : "none" },
|
|
1917
|
+
onMouseEnter: (D) => {
|
|
1918
|
+
D.currentTarget.style.boxShadow = e.shadowLg, D.currentTarget.style.transform = "translateY(-2px)";
|
|
1918
1919
|
},
|
|
1919
|
-
onMouseLeave: (
|
|
1920
|
-
|
|
1920
|
+
onMouseLeave: (D) => {
|
|
1921
|
+
D.currentTarget.style.boxShadow = N ? `0 0 0 3px ${e.primary}33` : e.shadow, D.currentTarget.style.transform = N ? "translateY(-2px)" : "none";
|
|
1921
1922
|
},
|
|
1922
|
-
children: i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(
|
|
1923
|
-
|
|
1924
|
-
/* @__PURE__ */ t("div", { style: { fontWeight: 600, fontSize: 14, marginBottom: 4 }, children:
|
|
1925
|
-
|
|
1923
|
+
children: i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(o) } }) : /* @__PURE__ */ x("div", { style: { padding: 16 }, children: [
|
|
1924
|
+
o.img && /* @__PURE__ */ t("img", { src: o.img, alt: o.title || "", style: { width: "100%", borderRadius: e.r, marginBottom: 8, display: "block" } }),
|
|
1925
|
+
/* @__PURE__ */ t("div", { style: { fontWeight: 600, fontSize: 14, marginBottom: 4 }, children: o.title || o.value }),
|
|
1926
|
+
o.subtitle && /* @__PURE__ */ t("div", { style: { fontSize: 12, color: e.textSec }, children: o.subtitle })
|
|
1926
1927
|
] })
|
|
1927
1928
|
},
|
|
1928
|
-
String(
|
|
1929
|
+
String($)
|
|
1929
1930
|
);
|
|
1930
1931
|
}) });
|
|
1931
1932
|
}
|
|
1932
|
-
function
|
|
1933
|
-
return
|
|
1933
|
+
function Le(r) {
|
|
1934
|
+
return r.map((i) => ({ ...i, items: i.items ? Le(i.items) : void 0 }));
|
|
1934
1935
|
}
|
|
1935
|
-
function
|
|
1936
|
-
return
|
|
1937
|
-
d.opened && (i[d.id] = !0), d.items &&
|
|
1936
|
+
function De(r, i = {}) {
|
|
1937
|
+
return r.forEach((d) => {
|
|
1938
|
+
d.opened && (i[d.id] = !0), d.items && De(d.items, i);
|
|
1938
1939
|
}), i;
|
|
1939
1940
|
}
|
|
1940
|
-
function
|
|
1941
|
+
function Ve(r, i) {
|
|
1941
1942
|
let d = null;
|
|
1942
|
-
return [
|
|
1943
|
-
if (
|
|
1944
|
-
const [
|
|
1945
|
-
return
|
|
1943
|
+
return [r.filter((f) => f.id === i ? (d = f, !1) : !0).map((f) => {
|
|
1944
|
+
if (f.items) {
|
|
1945
|
+
const [a, u] = Ve(f.items, i);
|
|
1946
|
+
return u && (d = u), { ...f, items: a };
|
|
1946
1947
|
}
|
|
1947
|
-
return
|
|
1948
|
+
return f;
|
|
1948
1949
|
}), d];
|
|
1949
1950
|
}
|
|
1950
|
-
function Ce(
|
|
1951
|
-
if (
|
|
1952
|
-
return
|
|
1953
|
-
if (
|
|
1954
|
-
const
|
|
1955
|
-
for (const
|
|
1956
|
-
|
|
1957
|
-
return
|
|
1951
|
+
function Ce(r, i, d, s) {
|
|
1952
|
+
if (s === "inside")
|
|
1953
|
+
return r.map((a) => a.id === i ? { ...a, items: [...a.items || [], d] } : a.items ? { ...a, items: Ce(a.items, i, d, s) } : a);
|
|
1954
|
+
if (r.some((a) => a.id === i)) {
|
|
1955
|
+
const a = [];
|
|
1956
|
+
for (const u of r)
|
|
1957
|
+
u.id === i ? s === "before" ? (a.push(d), a.push(u)) : (a.push(u), a.push(d)) : a.push(u);
|
|
1958
|
+
return a;
|
|
1958
1959
|
}
|
|
1959
|
-
return
|
|
1960
|
+
return r.map((a) => a.items ? { ...a, items: Ce(a.items, i, d, s) } : a);
|
|
1960
1961
|
}
|
|
1961
|
-
function
|
|
1962
|
-
function
|
|
1963
|
-
var
|
|
1964
|
-
if (
|
|
1965
|
-
const p = (
|
|
1966
|
-
var
|
|
1967
|
-
return
|
|
1962
|
+
function Ft(r, i, d) {
|
|
1963
|
+
function s(f) {
|
|
1964
|
+
var a, u;
|
|
1965
|
+
if (f.id === i) {
|
|
1966
|
+
const p = (y) => {
|
|
1967
|
+
var M;
|
|
1968
|
+
return y.id === d || (((M = y.items) == null ? void 0 : M.some(p)) ?? !1);
|
|
1968
1969
|
};
|
|
1969
|
-
return ((
|
|
1970
|
+
return ((a = f.items) == null ? void 0 : a.some(p)) ?? !1;
|
|
1970
1971
|
}
|
|
1971
|
-
return ((
|
|
1972
|
+
return ((u = f.items) == null ? void 0 : u.some(s)) ?? !1;
|
|
1972
1973
|
}
|
|
1973
|
-
return
|
|
1974
|
+
return r.some(s);
|
|
1974
1975
|
}
|
|
1975
|
-
function
|
|
1976
|
-
return
|
|
1977
|
-
(
|
|
1976
|
+
function Xe(r, i, d) {
|
|
1977
|
+
return r.map(
|
|
1978
|
+
(s) => s.id === i ? { ...s, value: d } : { ...s, items: s.items ? Xe(s.items, i, d) : void 0 }
|
|
1978
1979
|
);
|
|
1979
1980
|
}
|
|
1980
|
-
function
|
|
1981
|
-
var
|
|
1982
|
-
let d = 0,
|
|
1983
|
-
const
|
|
1981
|
+
function _t(r, i) {
|
|
1982
|
+
var a;
|
|
1983
|
+
let d = 0, s = 0;
|
|
1984
|
+
const f = (u) => {
|
|
1984
1985
|
var p;
|
|
1985
|
-
d++, i[
|
|
1986
|
+
d++, i[u.id] && s++, (p = u.items) == null || p.forEach(f);
|
|
1986
1987
|
};
|
|
1987
|
-
return (
|
|
1988
|
+
return (a = r.items) == null || a.forEach(f), { total: d, checkedCount: s };
|
|
1988
1989
|
}
|
|
1989
|
-
function
|
|
1990
|
-
data:
|
|
1990
|
+
function hr({
|
|
1991
|
+
data: r = [],
|
|
1991
1992
|
checkbox: i = !1,
|
|
1992
1993
|
editable: d = !1,
|
|
1993
|
-
dragMode:
|
|
1994
|
-
tooltip:
|
|
1995
|
-
onSelect:
|
|
1996
|
-
onCheck:
|
|
1994
|
+
dragMode: s,
|
|
1995
|
+
tooltip: f,
|
|
1996
|
+
onSelect: a,
|
|
1997
|
+
onCheck: u,
|
|
1997
1998
|
onChange: p,
|
|
1998
|
-
style:
|
|
1999
|
+
style: y
|
|
1999
2000
|
}) {
|
|
2000
|
-
const [
|
|
2001
|
-
J(
|
|
2002
|
-
|
|
2003
|
-
}, [
|
|
2004
|
-
const
|
|
2005
|
-
|
|
2006
|
-
},
|
|
2007
|
-
if (!
|
|
2008
|
-
const
|
|
2009
|
-
|
|
2010
|
-
const j =
|
|
2001
|
+
const [M, o] = B(() => Le(r)), [b, $] = B(() => De(r)), [N, D] = B(null), [c, w] = B({}), [L, E] = B(null), [A, z] = B(""), [C, V] = B(null), [h, I] = B(null);
|
|
2002
|
+
J(Z, []), J(() => {
|
|
2003
|
+
o(Le(r)), $((S) => ({ ...De(r), ...S }));
|
|
2004
|
+
}, [r]);
|
|
2005
|
+
const l = (S) => $((T) => ({ ...T, [S]: !T[S] })), g = (S, T) => {
|
|
2006
|
+
w((v) => ({ ...v, [S]: T })), u == null || u(S, T);
|
|
2007
|
+
}, K = () => {
|
|
2008
|
+
if (!L) return;
|
|
2009
|
+
const S = L, T = A;
|
|
2010
|
+
E(null), o((v) => {
|
|
2011
|
+
const j = Xe(v, S, T);
|
|
2011
2012
|
return p == null || p(j), j;
|
|
2012
2013
|
});
|
|
2013
|
-
},
|
|
2014
|
-
|
|
2015
|
-
},
|
|
2016
|
-
if (!
|
|
2017
|
-
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2020
|
-
},
|
|
2021
|
-
if (
|
|
2022
|
-
|
|
2014
|
+
}, O = (S, T) => {
|
|
2015
|
+
S.dataTransfer.effectAllowed = "move", V(T);
|
|
2016
|
+
}, n = (S, T) => {
|
|
2017
|
+
if (!C || C === T || Ft(M, C, T)) return;
|
|
2018
|
+
S.preventDefault();
|
|
2019
|
+
const v = S.currentTarget.getBoundingClientRect(), j = S.clientY - v.top, X = v.height, Q = j < X * 0.25 ? "before" : j > X * 0.75 ? "after" : "inside";
|
|
2020
|
+
I((q) => (q == null ? void 0 : q.id) === T && (q == null ? void 0 : q.pos) === Q ? q : { id: T, pos: Q });
|
|
2021
|
+
}, R = (S, T) => {
|
|
2022
|
+
if (S.preventDefault(), !C || !h || C === T) {
|
|
2023
|
+
I(null), V(null);
|
|
2023
2024
|
return;
|
|
2024
2025
|
}
|
|
2025
|
-
|
|
2026
|
-
const [j,
|
|
2027
|
-
if (!
|
|
2028
|
-
const
|
|
2029
|
-
return p == null || p(
|
|
2030
|
-
}),
|
|
2031
|
-
},
|
|
2032
|
-
|
|
2033
|
-
},
|
|
2034
|
-
var
|
|
2035
|
-
const
|
|
2036
|
-
let
|
|
2037
|
-
if (i &&
|
|
2038
|
-
const { total: P, checkedCount: de } =
|
|
2039
|
-
de > 0 && de < P ? ee = !0 : P > 0 && de === P && (
|
|
2026
|
+
o((v) => {
|
|
2027
|
+
const [j, X] = Ve(v, C);
|
|
2028
|
+
if (!X) return v;
|
|
2029
|
+
const Q = Ce(j, T, X, h.pos);
|
|
2030
|
+
return p == null || p(Q), Q;
|
|
2031
|
+
}), h.pos === "inside" && $((v) => ({ ...v, [T]: !0 })), I(null), V(null);
|
|
2032
|
+
}, F = () => {
|
|
2033
|
+
V(null), I(null);
|
|
2034
|
+
}, k = (S, T = 0) => {
|
|
2035
|
+
var re;
|
|
2036
|
+
const v = (((re = S.items) == null ? void 0 : re.length) ?? 0) > 0, j = b[S.id], X = N === S.id, Q = C === S.id, q = (h == null ? void 0 : h.id) === S.id;
|
|
2037
|
+
let U = !!c[S.id], ee = !1;
|
|
2038
|
+
if (i && v) {
|
|
2039
|
+
const { total: P, checkedCount: de } = _t(S, c);
|
|
2040
|
+
de > 0 && de < P ? ee = !0 : P > 0 && de === P && (U = !0);
|
|
2040
2041
|
}
|
|
2041
|
-
const te =
|
|
2042
|
-
return /* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2042
|
+
const te = q && h.pos !== "inside" ? { boxShadow: h.pos === "before" ? `inset 0 2px 0 0 ${e.primary}` : `inset 0 -2px 0 0 ${e.primary}` } : {}, pe = q && h.pos === "inside" || X ? e.primaryLt : "transparent";
|
|
2043
|
+
return /* @__PURE__ */ x("div", { style: { opacity: Q ? 0.4 : 1 }, children: [
|
|
2044
|
+
/* @__PURE__ */ x(
|
|
2044
2045
|
"div",
|
|
2045
2046
|
{
|
|
2046
|
-
draggable: !!
|
|
2047
|
-
onDragStart:
|
|
2048
|
-
onDragOver:
|
|
2049
|
-
onDrop:
|
|
2050
|
-
onDragEnd:
|
|
2051
|
-
title:
|
|
2047
|
+
draggable: !!s,
|
|
2048
|
+
onDragStart: s ? (P) => O(P, S.id) : void 0,
|
|
2049
|
+
onDragOver: s ? (P) => n(P, S.id) : void 0,
|
|
2050
|
+
onDrop: s ? (P) => R(P, S.id) : void 0,
|
|
2051
|
+
onDragEnd: s ? F : void 0,
|
|
2052
|
+
title: f == null ? void 0 : f(S),
|
|
2052
2053
|
onClick: () => {
|
|
2053
|
-
|
|
2054
|
+
D(S.id), a == null || a(S), v && l(S.id);
|
|
2054
2055
|
},
|
|
2055
2056
|
onDoubleClick: () => {
|
|
2056
|
-
d && (
|
|
2057
|
+
d && (E(S.id), z(S.value || ""));
|
|
2057
2058
|
},
|
|
2058
2059
|
style: {
|
|
2059
2060
|
display: "flex",
|
|
2060
2061
|
alignItems: "center",
|
|
2061
2062
|
gap: 4,
|
|
2062
2063
|
padding: `5px 8px 5px ${12 + T * 18}px`,
|
|
2063
|
-
cursor:
|
|
2064
|
+
cursor: s ? "grab" : "pointer",
|
|
2064
2065
|
borderRadius: e.r,
|
|
2065
2066
|
margin: "1px 4px",
|
|
2066
2067
|
background: pe,
|
|
2067
|
-
color:
|
|
2068
|
+
color: X ? e.primary : e.text,
|
|
2068
2069
|
userSelect: "none",
|
|
2069
2070
|
fontSize: 13,
|
|
2070
2071
|
...te
|
|
2071
2072
|
},
|
|
2072
|
-
onMouseEnter: (P) => !
|
|
2073
|
-
onMouseLeave: (P) => !
|
|
2073
|
+
onMouseEnter: (P) => !X && !q && (P.currentTarget.style.background = e.bg),
|
|
2074
|
+
onMouseLeave: (P) => !X && !q && (P.currentTarget.style.background = "transparent"),
|
|
2074
2075
|
children: [
|
|
2075
2076
|
/* @__PURE__ */ t(
|
|
2076
2077
|
"span",
|
|
2077
2078
|
{
|
|
2078
2079
|
style: { width: 16, textAlign: "center", fontSize: 11, color: e.textMut, flexShrink: 0 },
|
|
2079
2080
|
onClick: (P) => {
|
|
2080
|
-
P.stopPropagation(),
|
|
2081
|
+
P.stopPropagation(), v && l(S.id);
|
|
2081
2082
|
},
|
|
2082
|
-
children:
|
|
2083
|
+
children: v ? j ? "▾" : "▸" : ""
|
|
2083
2084
|
}
|
|
2084
2085
|
),
|
|
2085
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 15, flexShrink: 0 }, children:
|
|
2086
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 15, flexShrink: 0 }, children: v ? j ? "📂" : "📁" : "📄" }),
|
|
2086
2087
|
i && /* @__PURE__ */ t(
|
|
2087
2088
|
"input",
|
|
2088
2089
|
{
|
|
@@ -2090,337 +2091,337 @@ function cn({
|
|
|
2090
2091
|
P && (P.indeterminate = ee);
|
|
2091
2092
|
},
|
|
2092
2093
|
type: "checkbox",
|
|
2093
|
-
checked:
|
|
2094
|
+
checked: U,
|
|
2094
2095
|
onChange: (P) => {
|
|
2095
|
-
P.stopPropagation(), S
|
|
2096
|
+
P.stopPropagation(), g(S.id, P.target.checked);
|
|
2096
2097
|
},
|
|
2097
2098
|
style: { cursor: "pointer", accentColor: e.primary, flexShrink: 0 },
|
|
2098
2099
|
onClick: (P) => P.stopPropagation()
|
|
2099
2100
|
}
|
|
2100
2101
|
),
|
|
2101
|
-
|
|
2102
|
+
L === S.id ? /* @__PURE__ */ t(
|
|
2102
2103
|
"input",
|
|
2103
2104
|
{
|
|
2104
2105
|
autoFocus: !0,
|
|
2105
2106
|
className: "dhx dhx-input",
|
|
2106
2107
|
style: { height: 24, fontSize: 12, flex: 1 },
|
|
2107
|
-
value:
|
|
2108
|
-
onChange: (P) =>
|
|
2109
|
-
onBlur:
|
|
2108
|
+
value: A,
|
|
2109
|
+
onChange: (P) => z(P.target.value),
|
|
2110
|
+
onBlur: K,
|
|
2110
2111
|
onKeyDown: (P) => {
|
|
2111
|
-
P.key === "Enter" &&
|
|
2112
|
+
P.key === "Enter" && K(), P.key === "Escape" && E(null);
|
|
2112
2113
|
},
|
|
2113
2114
|
onClick: (P) => P.stopPropagation()
|
|
2114
2115
|
}
|
|
2115
|
-
) : /* @__PURE__ */ t("span", { style: { flex: 1 }, children:
|
|
2116
|
-
|
|
2116
|
+
) : /* @__PURE__ */ t("span", { style: { flex: 1 }, children: S.value }),
|
|
2117
|
+
S.count !== void 0 && /* @__PURE__ */ x("span", { style: { fontSize: 11, color: e.textMut }, children: [
|
|
2117
2118
|
"(",
|
|
2118
|
-
|
|
2119
|
+
S.count,
|
|
2119
2120
|
")"
|
|
2120
2121
|
] })
|
|
2121
2122
|
]
|
|
2122
2123
|
}
|
|
2123
2124
|
),
|
|
2124
|
-
|
|
2125
|
-
] },
|
|
2125
|
+
v && j && /* @__PURE__ */ t("div", { children: S.items.map((P) => k(P, T + 1)) })
|
|
2126
|
+
] }, S.id);
|
|
2126
2127
|
};
|
|
2127
2128
|
return /* @__PURE__ */ t(
|
|
2128
2129
|
"div",
|
|
2129
2130
|
{
|
|
2130
2131
|
className: "dhx dhx-scroll",
|
|
2131
|
-
style: { overflowY: "auto", ...
|
|
2132
|
-
onDragOver:
|
|
2133
|
-
onDrop:
|
|
2134
|
-
|
|
2132
|
+
style: { overflowY: "auto", ...y },
|
|
2133
|
+
onDragOver: s ? (S) => S.preventDefault() : void 0,
|
|
2134
|
+
onDrop: s ? (S) => {
|
|
2135
|
+
S.preventDefault(), I(null), V(null);
|
|
2135
2136
|
} : void 0,
|
|
2136
|
-
children:
|
|
2137
|
+
children: M.map((S) => k(S))
|
|
2137
2138
|
}
|
|
2138
2139
|
);
|
|
2139
2140
|
}
|
|
2140
|
-
function
|
|
2141
|
-
const [
|
|
2142
|
-
J(
|
|
2143
|
-
const
|
|
2144
|
-
const b = Math.min(Math.max(1,
|
|
2145
|
-
|
|
2146
|
-
},
|
|
2147
|
-
const
|
|
2148
|
-
for (let
|
|
2149
|
-
return
|
|
2150
|
-
}, [
|
|
2151
|
-
return /* @__PURE__ */
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
(
|
|
2141
|
+
function fr({ total: r, pageSize: i = 10, page: d, onChange: s, style: f }) {
|
|
2142
|
+
const [a, u] = B(d || 1), p = Math.ceil(r / i);
|
|
2143
|
+
J(Z, []);
|
|
2144
|
+
const y = (o) => {
|
|
2145
|
+
const b = Math.min(Math.max(1, o), p);
|
|
2146
|
+
u(b), s == null || s(b);
|
|
2147
|
+
}, M = ue(() => {
|
|
2148
|
+
const o = [];
|
|
2149
|
+
for (let $ = Math.max(1, a - 2); $ <= Math.min(p, a + 2); $++) o.push($);
|
|
2150
|
+
return o[0] > 1 && (o[0] > 2 && o.unshift("..."), o.unshift(1)), o[o.length - 1] < p && (o[o.length - 1] < p - 1 && o.push("..."), o.push(p)), o;
|
|
2151
|
+
}, [a, p]);
|
|
2152
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 12px", ...f }, children: [
|
|
2153
|
+
/* @__PURE__ */ x("span", { style: { fontSize: 12, color: e.textSec, marginRight: 8 }, children: [
|
|
2154
|
+
(a - 1) * i + 1,
|
|
2154
2155
|
"–",
|
|
2155
|
-
Math.min(
|
|
2156
|
+
Math.min(a * i, r),
|
|
2156
2157
|
" of ",
|
|
2157
|
-
|
|
2158
|
+
r
|
|
2158
2159
|
] }),
|
|
2159
|
-
[["«", 1], ["‹",
|
|
2160
|
-
|
|
2161
|
-
[["›",
|
|
2160
|
+
[["«", 1], ["‹", a - 1]].map(([o, b]) => /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-ghost", style: { height: 30, padding: "0 8px", fontSize: 14 }, disabled: a === 1, onClick: () => y(b), children: o }, o)),
|
|
2161
|
+
M.map((o, b) => /* @__PURE__ */ t("button", { onClick: () => typeof o == "number" && y(o), className: `dhx dhx-btn ${o === a ? "dhx-btn-primary" : "dhx-btn-ghost"}`, style: { height: 30, minWidth: 30, padding: "0 8px", fontSize: 13 }, disabled: o === "...", children: o }, b)),
|
|
2162
|
+
[["›", a + 1], ["»", p]].map(([o, b]) => /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-ghost", style: { height: 30, padding: "0 8px", fontSize: 14 }, disabled: a === p, onClick: () => y(b), children: o }, o))
|
|
2162
2163
|
] });
|
|
2163
2164
|
}
|
|
2164
|
-
function
|
|
2165
|
-
const [
|
|
2166
|
-
J(
|
|
2167
|
-
const
|
|
2168
|
-
|
|
2169
|
-
}, b = (
|
|
2170
|
-
const
|
|
2171
|
-
return
|
|
2172
|
-
!
|
|
2173
|
-
}),
|
|
2174
|
-
},
|
|
2175
|
-
const
|
|
2176
|
-
return b(
|
|
2177
|
-
|
|
2178
|
-
}), p(
|
|
2179
|
-
},
|
|
2180
|
-
const
|
|
2181
|
-
if (
|
|
2182
|
-
/* @__PURE__ */ t("legend", { style: { fontSize: 12, fontWeight: 700, color: e.textSec, padding: "0 6px" }, children:
|
|
2183
|
-
(
|
|
2184
|
-
] },
|
|
2185
|
-
if (
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
] }, "lbl") : null,
|
|
2165
|
+
function gr({ config: r = {}, defaultValues: i = {}, onSubmit: d, style: s }) {
|
|
2166
|
+
const [f, a] = B(i), [u, p] = B({}), [y, M] = B(null);
|
|
2167
|
+
J(Z, []);
|
|
2168
|
+
const o = (c, w) => {
|
|
2169
|
+
a((L) => ({ ...L, [c]: w })), p((L) => ({ ...L, [c]: null }));
|
|
2170
|
+
}, b = (c) => {
|
|
2171
|
+
const w = [];
|
|
2172
|
+
return c.flat().forEach((L) => {
|
|
2173
|
+
!L || typeof L != "object" || !("name" in L) || (w.push(L), L.type === "fieldset" && L.rows && w.push(...b(L.rows)));
|
|
2174
|
+
}), w;
|
|
2175
|
+
}, $ = () => {
|
|
2176
|
+
const c = {};
|
|
2177
|
+
return b(r.rows || []).forEach((w) => {
|
|
2178
|
+
w.required && !f[w.name] && (c[w.name] = `${w.label || w.name} is required`);
|
|
2179
|
+
}), p(c), Object.keys(c).length === 0;
|
|
2180
|
+
}, N = (c) => {
|
|
2181
|
+
const w = f[c.name] ?? c.value ?? "", L = u[c.name], E = c.labelWidth ?? r.labelWidth, A = E !== void 0 || c.labelPosition === "left";
|
|
2182
|
+
if (c.type === "fieldset") return /* @__PURE__ */ x("fieldset", { style: { border: `1px solid ${e.border}`, borderRadius: e.r, padding: "12px 16px", marginBottom: 14 }, children: [
|
|
2183
|
+
/* @__PURE__ */ t("legend", { style: { fontSize: 12, fontWeight: 700, color: e.textSec, padding: "0 6px" }, children: c.label }),
|
|
2184
|
+
(c.rows || []).map((g) => N(g))
|
|
2185
|
+
] }, c.name);
|
|
2186
|
+
if (c.type === "spacer") return /* @__PURE__ */ t("div", { style: { height: c.height || 16 } }, c.name);
|
|
2187
|
+
const z = E ? { minWidth: E, width: E, flexShrink: 0, paddingTop: 8, boxSizing: "border-box" } : {}, C = c.label ? /* @__PURE__ */ x("label", { className: "dhx dhx-label", style: { display: "flex", gap: 4, ...z }, children: [
|
|
2188
|
+
c.label,
|
|
2189
|
+
c.required && /* @__PURE__ */ t("span", { style: { color: e.danger }, children: "*" })
|
|
2190
|
+
] }, "lbl") : null, V = L ? /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.danger, marginTop: 3 }, children: L }) : null, h = c.helpMessage ? /* @__PURE__ */ x("div", { style: { fontSize: 11, color: e.textMut, marginTop: 3 }, children: [
|
|
2190
2191
|
"ⓘ ",
|
|
2191
|
-
|
|
2192
|
-
] }) : null,
|
|
2193
|
-
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2192
|
+
c.helpMessage
|
|
2193
|
+
] }) : null, I = { key: c.name, className: "dhx-form-group" }, l = (g) => A ? /* @__PURE__ */ x("div", { ...I, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
|
|
2194
|
+
C,
|
|
2195
|
+
/* @__PURE__ */ x("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2196
|
+
g,
|
|
2197
|
+
V,
|
|
2198
|
+
h
|
|
2198
2199
|
] })
|
|
2199
|
-
] }) : /* @__PURE__ */
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2200
|
+
] }) : /* @__PURE__ */ x("div", { ...I, children: [
|
|
2201
|
+
C,
|
|
2202
|
+
g,
|
|
2203
|
+
V,
|
|
2204
|
+
h
|
|
2204
2205
|
] });
|
|
2205
|
-
if (!
|
|
2206
|
-
/* @__PURE__ */
|
|
2207
|
-
|
|
2206
|
+
if (!c.type || c.type === "input") return l(
|
|
2207
|
+
/* @__PURE__ */ x("div", { className: "dhx-input-wrap", children: [
|
|
2208
|
+
c.icon && /* @__PURE__ */ t("span", { className: "dhx-input-icon", children: c.icon }),
|
|
2208
2209
|
/* @__PURE__ */ t(
|
|
2209
2210
|
"input",
|
|
2210
2211
|
{
|
|
2211
|
-
className: `dhx dhx-input${
|
|
2212
|
-
style: { borderColor:
|
|
2213
|
-
type:
|
|
2214
|
-
placeholder:
|
|
2215
|
-
value:
|
|
2216
|
-
onChange: (
|
|
2217
|
-
disabled:
|
|
2212
|
+
className: `dhx dhx-input${c.icon ? " dhx-input--with-icon" : ""}`,
|
|
2213
|
+
style: { borderColor: L ? e.danger : void 0 },
|
|
2214
|
+
type: c.inputType || "text",
|
|
2215
|
+
placeholder: c.placeholder,
|
|
2216
|
+
value: w,
|
|
2217
|
+
onChange: (g) => o(c.name, g.target.value),
|
|
2218
|
+
disabled: c.disabled
|
|
2218
2219
|
}
|
|
2219
2220
|
)
|
|
2220
2221
|
] })
|
|
2221
2222
|
);
|
|
2222
|
-
if (
|
|
2223
|
+
if (c.type === "textarea") return l(
|
|
2223
2224
|
/* @__PURE__ */ t(
|
|
2224
2225
|
"textarea",
|
|
2225
2226
|
{
|
|
2226
2227
|
className: "dhx dhx-input",
|
|
2227
2228
|
style: { height: 80, resize: "vertical", padding: "8px 10px" },
|
|
2228
|
-
placeholder:
|
|
2229
|
-
value:
|
|
2230
|
-
onChange: (
|
|
2229
|
+
placeholder: c.placeholder,
|
|
2230
|
+
value: w,
|
|
2231
|
+
onChange: (g) => o(c.name, g.target.value)
|
|
2231
2232
|
}
|
|
2232
2233
|
)
|
|
2233
2234
|
);
|
|
2234
|
-
if (
|
|
2235
|
-
/* @__PURE__ */
|
|
2235
|
+
if (c.type === "select") return l(
|
|
2236
|
+
/* @__PURE__ */ x("select", { className: "dhx dhx-input", value: w, onChange: (g) => o(c.name, g.target.value), style: { cursor: "pointer" }, children: [
|
|
2236
2237
|
/* @__PURE__ */ t("option", { value: "", children: "— Select —" }),
|
|
2237
|
-
(
|
|
2238
|
+
(c.options || []).map((g) => /* @__PURE__ */ t("option", { value: g.value, children: g.label || g.value }, g.value))
|
|
2238
2239
|
] })
|
|
2239
2240
|
);
|
|
2240
|
-
if (
|
|
2241
|
-
/* @__PURE__ */ t("input", { type: "date", className: "dhx dhx-input", value:
|
|
2241
|
+
if (c.type === "datepicker") return l(
|
|
2242
|
+
/* @__PURE__ */ t("input", { type: "date", className: "dhx dhx-input", value: w, onChange: (g) => o(c.name, g.target.value) })
|
|
2242
2243
|
);
|
|
2243
|
-
if (
|
|
2244
|
-
const
|
|
2245
|
-
/* @__PURE__ */
|
|
2244
|
+
if (c.type === "timepicker") {
|
|
2245
|
+
const g = f[c.name] ?? { h: 12, m: 0, ampm: "AM" }, K = !!f[c.name], O = K ? `${String(g.h).padStart(2, "0")}:${String(g.m).padStart(2, "0")}${g.ampm ? " " + g.ampm : ""}` : c.placeholder || "Click to select", n = /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
|
|
2246
|
+
/* @__PURE__ */ x(
|
|
2246
2247
|
"div",
|
|
2247
2248
|
{
|
|
2248
2249
|
className: "dhx dhx-input",
|
|
2249
2250
|
style: { cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "space-between" },
|
|
2250
|
-
onClick: () =>
|
|
2251
|
+
onClick: () => M(y === c.name ? null : c.name),
|
|
2251
2252
|
children: [
|
|
2252
|
-
/* @__PURE__ */ t("span", { style: { color:
|
|
2253
|
+
/* @__PURE__ */ t("span", { style: { color: K ? e.text : e.textMut }, children: O }),
|
|
2253
2254
|
/* @__PURE__ */ t("span", { style: { fontSize: 13, color: e.textSec }, children: "🕐" })
|
|
2254
2255
|
]
|
|
2255
2256
|
}
|
|
2256
2257
|
),
|
|
2257
|
-
|
|
2258
|
-
|
|
2258
|
+
y === c.name && /* @__PURE__ */ t("div", { style: { position: "absolute", zIndex: 100, top: "calc(100% + 4px)", left: 0 }, children: /* @__PURE__ */ t(At, { value: g, controls: !0, onChange: (R) => {
|
|
2259
|
+
o(c.name, R), M(null);
|
|
2259
2260
|
} }) })
|
|
2260
2261
|
] });
|
|
2261
|
-
return
|
|
2262
|
+
return l(n);
|
|
2262
2263
|
}
|
|
2263
|
-
if (
|
|
2264
|
-
/* @__PURE__ */
|
|
2264
|
+
if (c.type === "colorpicker") return l(
|
|
2265
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
2265
2266
|
/* @__PURE__ */ t(
|
|
2266
2267
|
"input",
|
|
2267
2268
|
{
|
|
2268
2269
|
type: "color",
|
|
2269
|
-
value:
|
|
2270
|
-
onChange: (
|
|
2270
|
+
value: w || "#000000",
|
|
2271
|
+
onChange: (g) => o(c.name, g.target.value),
|
|
2271
2272
|
style: { width: 36, height: 36, padding: 2, border: `1px solid ${e.border}`, borderRadius: e.r, cursor: "pointer", background: "none" }
|
|
2272
2273
|
}
|
|
2273
2274
|
),
|
|
2274
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontFamily: "monospace" }, children:
|
|
2275
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontFamily: "monospace" }, children: w || "#000000" })
|
|
2275
2276
|
] })
|
|
2276
2277
|
);
|
|
2277
|
-
if (
|
|
2278
|
-
/* @__PURE__ */ t("p", { style: { margin: "6px 0", fontSize: 13, color: e.text }, children:
|
|
2278
|
+
if (c.type === "text") return l(
|
|
2279
|
+
/* @__PURE__ */ t("p", { style: { margin: "6px 0", fontSize: 13, color: e.text }, children: c.value })
|
|
2279
2280
|
);
|
|
2280
|
-
if (
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */ t("input", { type: "checkbox", checked: !!
|
|
2285
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 13 }, children:
|
|
2281
|
+
if (c.type === "checkbox") return /* @__PURE__ */ x("div", { ...I, children: [
|
|
2282
|
+
A ? /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
2283
|
+
E && /* @__PURE__ */ t("div", { style: { width: E, flexShrink: 0 } }),
|
|
2284
|
+
/* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
|
|
2285
|
+
/* @__PURE__ */ t("input", { type: "checkbox", checked: !!w, onChange: (g) => o(c.name, g.target.checked), style: { width: 16, height: 16, accentColor: e.primary, cursor: "pointer" } }),
|
|
2286
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: c.label })
|
|
2286
2287
|
] })
|
|
2287
|
-
] }) : /* @__PURE__ */
|
|
2288
|
-
/* @__PURE__ */ t("input", { type: "checkbox", checked: !!
|
|
2289
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 13 }, children:
|
|
2288
|
+
] }) : /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
|
|
2289
|
+
/* @__PURE__ */ t("input", { type: "checkbox", checked: !!w, onChange: (g) => o(c.name, g.target.checked), style: { width: 16, height: 16, accentColor: e.primary, cursor: "pointer" } }),
|
|
2290
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: c.label })
|
|
2290
2291
|
] }),
|
|
2291
|
-
|
|
2292
|
+
h
|
|
2292
2293
|
] });
|
|
2293
|
-
if (
|
|
2294
|
-
const
|
|
2294
|
+
if (c.type === "radio") {
|
|
2295
|
+
const g = (c.options || []).map((K) => /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer", fontSize: 13 }, children: [
|
|
2295
2296
|
/* @__PURE__ */ t(
|
|
2296
2297
|
"input",
|
|
2297
2298
|
{
|
|
2298
2299
|
type: "radio",
|
|
2299
|
-
name:
|
|
2300
|
-
value:
|
|
2301
|
-
checked:
|
|
2302
|
-
onChange: () =>
|
|
2300
|
+
name: c.name,
|
|
2301
|
+
value: K.value,
|
|
2302
|
+
checked: w === K.value,
|
|
2303
|
+
onChange: () => o(c.name, K.value),
|
|
2303
2304
|
style: { accentColor: e.primary, cursor: "pointer" }
|
|
2304
2305
|
}
|
|
2305
2306
|
),
|
|
2306
|
-
|
|
2307
|
-
] },
|
|
2308
|
-
return
|
|
2309
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 16, flexWrap: "wrap", paddingTop: 8 }, children:
|
|
2307
|
+
K.label || K.value
|
|
2308
|
+
] }, K.value));
|
|
2309
|
+
return l(
|
|
2310
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 16, flexWrap: "wrap", paddingTop: 8 }, children: g })
|
|
2310
2311
|
);
|
|
2311
2312
|
}
|
|
2312
|
-
if (
|
|
2313
|
-
|
|
2314
|
-
/* @__PURE__ */
|
|
2313
|
+
if (c.type === "slider") return A ? /* @__PURE__ */ x("div", { ...I, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
|
|
2314
|
+
C,
|
|
2315
|
+
/* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
|
|
2315
2316
|
/* @__PURE__ */ t(
|
|
2316
|
-
|
|
2317
|
+
Oe,
|
|
2317
2318
|
{
|
|
2318
|
-
min:
|
|
2319
|
-
max:
|
|
2320
|
-
step:
|
|
2321
|
-
value:
|
|
2322
|
-
range:
|
|
2323
|
-
onChange: (
|
|
2319
|
+
min: c.min,
|
|
2320
|
+
max: c.max,
|
|
2321
|
+
step: c.step,
|
|
2322
|
+
value: w || c.min,
|
|
2323
|
+
range: c.range,
|
|
2324
|
+
onChange: (g) => o(c.name, g)
|
|
2324
2325
|
}
|
|
2325
2326
|
),
|
|
2326
|
-
|
|
2327
|
+
h
|
|
2327
2328
|
] })
|
|
2328
|
-
] }) : /* @__PURE__ */
|
|
2329
|
+
] }) : /* @__PURE__ */ x("div", { ...I, children: [
|
|
2329
2330
|
/* @__PURE__ */ t(
|
|
2330
|
-
|
|
2331
|
+
Oe,
|
|
2331
2332
|
{
|
|
2332
|
-
label:
|
|
2333
|
-
min:
|
|
2334
|
-
max:
|
|
2335
|
-
step:
|
|
2336
|
-
value:
|
|
2337
|
-
range:
|
|
2338
|
-
onChange: (
|
|
2333
|
+
label: c.label,
|
|
2334
|
+
min: c.min,
|
|
2335
|
+
max: c.max,
|
|
2336
|
+
step: c.step,
|
|
2337
|
+
value: w || c.min,
|
|
2338
|
+
range: c.range,
|
|
2339
|
+
onChange: (g) => o(c.name, g)
|
|
2339
2340
|
}
|
|
2340
2341
|
),
|
|
2341
|
-
|
|
2342
|
+
h
|
|
2342
2343
|
] });
|
|
2343
|
-
if (
|
|
2344
|
-
|
|
2345
|
-
/* @__PURE__ */
|
|
2344
|
+
if (c.type === "combo") return A ? /* @__PURE__ */ x("div", { ...I, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
|
|
2345
|
+
C,
|
|
2346
|
+
/* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
|
|
2346
2347
|
/* @__PURE__ */ t(
|
|
2347
|
-
|
|
2348
|
+
je,
|
|
2348
2349
|
{
|
|
2349
|
-
data:
|
|
2350
|
-
multiselection:
|
|
2351
|
-
placeholder:
|
|
2352
|
-
value:
|
|
2353
|
-
onChange: (
|
|
2350
|
+
data: c.data || [],
|
|
2351
|
+
multiselection: c.multiselection,
|
|
2352
|
+
placeholder: c.placeholder || "Select...",
|
|
2353
|
+
value: w || (c.multiselection ? [] : null),
|
|
2354
|
+
onChange: (g) => o(c.name, g)
|
|
2354
2355
|
}
|
|
2355
2356
|
),
|
|
2356
|
-
|
|
2357
|
-
|
|
2357
|
+
V,
|
|
2358
|
+
h
|
|
2358
2359
|
] })
|
|
2359
|
-
] }) : /* @__PURE__ */
|
|
2360
|
+
] }) : /* @__PURE__ */ x("div", { ...I, children: [
|
|
2360
2361
|
/* @__PURE__ */ t(
|
|
2361
|
-
|
|
2362
|
+
je,
|
|
2362
2363
|
{
|
|
2363
|
-
label:
|
|
2364
|
-
data:
|
|
2365
|
-
multiselection:
|
|
2366
|
-
placeholder:
|
|
2367
|
-
value:
|
|
2368
|
-
onChange: (
|
|
2364
|
+
label: c.label,
|
|
2365
|
+
data: c.data || [],
|
|
2366
|
+
multiselection: c.multiselection,
|
|
2367
|
+
placeholder: c.placeholder || "Select...",
|
|
2368
|
+
value: w || (c.multiselection ? [] : null),
|
|
2369
|
+
onChange: (g) => o(c.name, g)
|
|
2369
2370
|
}
|
|
2370
2371
|
),
|
|
2371
|
-
|
|
2372
|
-
|
|
2372
|
+
V,
|
|
2373
|
+
h
|
|
2373
2374
|
] });
|
|
2374
|
-
if (
|
|
2375
|
-
const
|
|
2376
|
-
return /* @__PURE__ */
|
|
2377
|
-
|
|
2378
|
-
/* @__PURE__ */ t("div", { style: { width:
|
|
2379
|
-
/* @__PURE__ */
|
|
2380
|
-
/* @__PURE__ */ t(
|
|
2381
|
-
|
|
2382
|
-
|
|
2375
|
+
if (c.type === "toggle") {
|
|
2376
|
+
const g = !!w, K = g ? c.icon : c.offIcon || c.icon, O = g ? c.text || c.label : c.offText || c.text || c.label;
|
|
2377
|
+
return /* @__PURE__ */ x("div", { ...I, children: [
|
|
2378
|
+
A && E && /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
2379
|
+
/* @__PURE__ */ t("div", { style: { width: E, flexShrink: 0 } }),
|
|
2380
|
+
/* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
|
|
2381
|
+
/* @__PURE__ */ t(_e, { on: g, onClick: () => o(c.name, !w) }),
|
|
2382
|
+
K && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: K }),
|
|
2383
|
+
O && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: O })
|
|
2383
2384
|
] })
|
|
2384
2385
|
] }),
|
|
2385
|
-
!
|
|
2386
|
-
/* @__PURE__ */ t(
|
|
2387
|
-
|
|
2388
|
-
|
|
2386
|
+
!A && /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 10, cursor: "pointer" }, children: [
|
|
2387
|
+
/* @__PURE__ */ t(_e, { on: g, onClick: () => o(c.name, !w) }),
|
|
2388
|
+
K && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: K }),
|
|
2389
|
+
O && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: O })
|
|
2389
2390
|
] }),
|
|
2390
|
-
|
|
2391
|
+
h
|
|
2391
2392
|
] });
|
|
2392
2393
|
}
|
|
2393
2394
|
return null;
|
|
2394
|
-
},
|
|
2395
|
-
(
|
|
2395
|
+
}, D = (c) => c.map(
|
|
2396
|
+
(w, L) => Array.isArray(w) ? /* @__PURE__ */ t("div", { style: { display: "flex", gap: 12, alignItems: "flex-start" }, children: w.map(N) }, L) : N(w)
|
|
2396
2397
|
);
|
|
2397
|
-
return /* @__PURE__ */
|
|
2398
|
-
|
|
2399
|
-
(
|
|
2400
|
-
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () =>
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
}, children:
|
|
2398
|
+
return /* @__PURE__ */ x("div", { className: "dhx", style: { padding: r.padding || 0, width: r.width || "100%", ...s }, children: [
|
|
2399
|
+
D(r.rows || []),
|
|
2400
|
+
(r.buttons || d) && /* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, justifyContent: r.buttonAlign || "flex-start", marginTop: 8 }, children: [
|
|
2401
|
+
/* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () => $() && (d == null ? void 0 : d(f)), children: r.submitText || "Submit" }),
|
|
2402
|
+
r.resetButton !== !1 && /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: () => {
|
|
2403
|
+
a(i), p({});
|
|
2404
|
+
}, children: r.resetText || "Reset" })
|
|
2404
2405
|
] })
|
|
2405
2406
|
] });
|
|
2406
2407
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return /* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */ t("div", { style: { width: 40, height: 22, borderRadius: 11, background:
|
|
2410
|
-
/* @__PURE__ */ t("div", { style: { position: "absolute", top: 3, left:
|
|
2408
|
+
function _e({ on: r, onClick: i }) {
|
|
2409
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative", width: 40, height: 22, flexShrink: 0 }, onClick: i, children: [
|
|
2410
|
+
/* @__PURE__ */ t("div", { style: { width: 40, height: 22, borderRadius: 11, background: r ? e.primary : e.border, transition: "background 0.2s" } }),
|
|
2411
|
+
/* @__PURE__ */ t("div", { style: { position: "absolute", top: 3, left: r ? 21 : 3, width: 16, height: 16, borderRadius: "50%", background: "#fff", transition: "left 0.2s", boxShadow: "0 1px 3px rgba(0,0,0,.3)" } })
|
|
2411
2412
|
] });
|
|
2412
2413
|
}
|
|
2413
|
-
function me(
|
|
2414
|
+
function me(r) {
|
|
2414
2415
|
const i = [];
|
|
2415
|
-
for (const d of
|
|
2416
|
+
for (const d of r)
|
|
2416
2417
|
d.type === "block" ? i.push(...me(d.items || [])) : i.push(d);
|
|
2417
2418
|
return i;
|
|
2418
2419
|
}
|
|
2419
|
-
function
|
|
2420
|
-
return
|
|
2420
|
+
function Yt(r) {
|
|
2421
|
+
return r === "primary" ? e.primary : r === "success" ? e.success : r === "secondary" ? e.borderDk : e.danger;
|
|
2421
2422
|
}
|
|
2422
|
-
function
|
|
2423
|
-
switch (
|
|
2423
|
+
function Kt(r, i) {
|
|
2424
|
+
switch (r) {
|
|
2424
2425
|
case "primary":
|
|
2425
2426
|
return { background: e.primary, color: "#fff", borderColor: e.primary };
|
|
2426
2427
|
case "danger":
|
|
@@ -2433,57 +2434,57 @@ function Yt(n, i) {
|
|
|
2433
2434
|
return i ? { background: e.primaryLt, color: e.primary } : {};
|
|
2434
2435
|
}
|
|
2435
2436
|
}
|
|
2436
|
-
function
|
|
2437
|
-
items:
|
|
2437
|
+
function xr({
|
|
2438
|
+
items: r = [],
|
|
2438
2439
|
css: i,
|
|
2439
2440
|
menuCss: d,
|
|
2440
|
-
style:
|
|
2441
|
-
onAction:
|
|
2442
|
-
onInputChange:
|
|
2443
|
-
onInputBlur:
|
|
2441
|
+
style: s,
|
|
2442
|
+
onAction: f,
|
|
2443
|
+
onInputChange: a,
|
|
2444
|
+
onInputBlur: u,
|
|
2444
2445
|
onInputFocus: p,
|
|
2445
|
-
onOpenMenu:
|
|
2446
|
+
onOpenMenu: y
|
|
2446
2447
|
}) {
|
|
2447
|
-
J(
|
|
2448
|
-
const [
|
|
2449
|
-
const
|
|
2450
|
-
for (const
|
|
2451
|
-
|
|
2452
|
-
return
|
|
2453
|
-
}), [b,
|
|
2454
|
-
const
|
|
2455
|
-
for (const
|
|
2456
|
-
|
|
2457
|
-
return
|
|
2458
|
-
}),
|
|
2459
|
-
xe(
|
|
2460
|
-
const
|
|
2461
|
-
var
|
|
2462
|
-
if (!
|
|
2463
|
-
if (
|
|
2464
|
-
if (
|
|
2465
|
-
const
|
|
2466
|
-
|
|
2467
|
-
const T = { ...
|
|
2468
|
-
for (const
|
|
2469
|
-
return T[
|
|
2448
|
+
J(Z, []);
|
|
2449
|
+
const [M, o] = B(() => {
|
|
2450
|
+
const n = {};
|
|
2451
|
+
for (const R of me(r))
|
|
2452
|
+
R.id && (n[R.id] = !!R.active);
|
|
2453
|
+
return n;
|
|
2454
|
+
}), [b, $] = B(null), [N, D] = B(() => {
|
|
2455
|
+
const n = {};
|
|
2456
|
+
for (const R of me(r))
|
|
2457
|
+
R.type === "selectButton" && R.id && R.value && (n[R.id] = R.value);
|
|
2458
|
+
return n;
|
|
2459
|
+
}), c = me(r), w = ie(null);
|
|
2460
|
+
xe(w, ae(() => $(null), []));
|
|
2461
|
+
const L = (n) => {
|
|
2462
|
+
var R, F;
|
|
2463
|
+
if (!n.disabled) {
|
|
2464
|
+
if (n.id) {
|
|
2465
|
+
if (n.group) {
|
|
2466
|
+
const k = c.filter((S) => S.group === n.group && S.id);
|
|
2467
|
+
o((S) => {
|
|
2468
|
+
const T = { ...S };
|
|
2469
|
+
for (const v of k) T[v.id] = !1;
|
|
2470
|
+
return T[n.id] = !0, T;
|
|
2470
2471
|
});
|
|
2471
|
-
} else
|
|
2472
|
-
if ((
|
|
2473
|
-
const
|
|
2474
|
-
|
|
2472
|
+
} else n.twoState && o((k) => ({ ...k, [n.id]: !k[n.id] }));
|
|
2473
|
+
if ((R = n.items) != null && R.length) {
|
|
2474
|
+
const k = n.id;
|
|
2475
|
+
$((S) => S === k ? null : k), y == null || y(n.id);
|
|
2475
2476
|
return;
|
|
2476
2477
|
}
|
|
2477
2478
|
}
|
|
2478
|
-
(
|
|
2479
|
+
(F = n.onClick) == null || F.call(n, n), n.id && (f == null || f(n.id, n));
|
|
2479
2480
|
}
|
|
2480
|
-
},
|
|
2481
|
+
}, E = ({ count: n, color: R }) => /* @__PURE__ */ t("span", { style: {
|
|
2481
2482
|
position: "absolute",
|
|
2482
2483
|
top: 2,
|
|
2483
2484
|
right: 2,
|
|
2484
2485
|
minWidth: 14,
|
|
2485
2486
|
height: 14,
|
|
2486
|
-
background:
|
|
2487
|
+
background: Yt(R),
|
|
2487
2488
|
color: "#fff",
|
|
2488
2489
|
borderRadius: 7,
|
|
2489
2490
|
fontSize: 9,
|
|
@@ -2493,242 +2494,242 @@ function hn({
|
|
|
2493
2494
|
justifyContent: "center",
|
|
2494
2495
|
padding: "0 2px",
|
|
2495
2496
|
pointerEvents: "none"
|
|
2496
|
-
}, children:
|
|
2497
|
-
var
|
|
2498
|
-
const
|
|
2499
|
-
return /* @__PURE__ */
|
|
2500
|
-
/* @__PURE__ */
|
|
2497
|
+
}, children: n > 99 ? "99+" : n }), A = (n, R) => {
|
|
2498
|
+
var re;
|
|
2499
|
+
const F = n.id !== void 0 ? M[n.id] ?? !!n.active : !!n.active, k = n.value ?? n.text, S = n.size ?? "medium", T = S === "auto", v = S === "small", j = !!((re = n.items) != null && re.length), X = n.id !== void 0 && b === n.id, Q = Kt(n.color, F && !n.color), q = T ? void 0 : v ? 26 : 32, U = T ? 22 : v ? 13 : 16, ee = [n.tooltip, n.hotkey ? `(${n.hotkey})` : ""].filter(Boolean).join(" "), te = n.circle ? { borderRadius: "50%", padding: T ? "8px" : "0", aspectRatio: "1", justifyContent: "center" } : {}, pe = n.view === "link" ? { background: "transparent", border: "none", textDecoration: "underline", padding: "0 4px" } : n.view === "flat" ? { borderRadius: 0 } : {};
|
|
2500
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex" }, children: [
|
|
2501
|
+
/* @__PURE__ */ x(
|
|
2501
2502
|
"button",
|
|
2502
2503
|
{
|
|
2503
2504
|
title: ee || void 0,
|
|
2504
|
-
disabled:
|
|
2505
|
+
disabled: n.disabled,
|
|
2505
2506
|
className: "dhx dhx-btn dhx-btn-ghost",
|
|
2506
2507
|
style: {
|
|
2507
2508
|
flexDirection: T ? "column" : "row",
|
|
2508
2509
|
alignSelf: T ? "stretch" : "center",
|
|
2509
2510
|
justifyContent: "center",
|
|
2510
|
-
minHeight: T ? 56 :
|
|
2511
|
-
height: T ? void 0 :
|
|
2512
|
-
padding: T ? "6px 10px" :
|
|
2511
|
+
minHeight: T ? 56 : q,
|
|
2512
|
+
height: T ? void 0 : q,
|
|
2513
|
+
padding: T ? "6px 10px" : v ? "0 6px" : "0 8px",
|
|
2513
2514
|
gap: 4,
|
|
2514
2515
|
position: "relative",
|
|
2515
|
-
background:
|
|
2516
|
-
color:
|
|
2517
|
-
opacity:
|
|
2518
|
-
cursor:
|
|
2519
|
-
borderColor:
|
|
2520
|
-
...
|
|
2516
|
+
background: F && !n.color ? e.primaryLt : "transparent",
|
|
2517
|
+
color: F && !n.color ? e.primary : n.disabled ? e.textMut : e.text,
|
|
2518
|
+
opacity: n.disabled ? 0.55 : 1,
|
|
2519
|
+
cursor: n.disabled ? "not-allowed" : "pointer",
|
|
2520
|
+
borderColor: X ? e.primary : void 0,
|
|
2521
|
+
...Q,
|
|
2521
2522
|
...te,
|
|
2522
2523
|
...pe
|
|
2523
2524
|
},
|
|
2524
|
-
onClick: () =>
|
|
2525
|
+
onClick: () => L(n),
|
|
2525
2526
|
children: [
|
|
2526
|
-
|
|
2527
|
-
fontSize:
|
|
2527
|
+
n.loading ? /* @__PURE__ */ t("span", { style: {
|
|
2528
|
+
fontSize: U,
|
|
2528
2529
|
lineHeight: 1,
|
|
2529
2530
|
flexShrink: 0,
|
|
2530
2531
|
display: "inline-block",
|
|
2531
2532
|
animation: "dhx-spin 1s linear infinite"
|
|
2532
|
-
}, children: "⟳" }) :
|
|
2533
|
-
|
|
2534
|
-
fontSize: T ? 10 :
|
|
2533
|
+
}, children: "⟳" }) : n.icon && /* @__PURE__ */ t("span", { style: { fontSize: U, lineHeight: 1, flexShrink: 0 }, children: n.icon }),
|
|
2534
|
+
k && !n.html && /* @__PURE__ */ t("span", { style: {
|
|
2535
|
+
fontSize: T ? 10 : v ? 11 : 12,
|
|
2535
2536
|
maxWidth: T ? 64 : void 0,
|
|
2536
2537
|
textAlign: T ? "center" : "left",
|
|
2537
2538
|
lineHeight: T ? 1.2 : 1,
|
|
2538
2539
|
whiteSpace: T ? "normal" : "nowrap"
|
|
2539
|
-
}, children:
|
|
2540
|
-
|
|
2540
|
+
}, children: k }),
|
|
2541
|
+
n.html && /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: n.html } }),
|
|
2541
2542
|
j && /* @__PURE__ */ t("span", { style: { fontSize: 8, opacity: 0.6, marginLeft: 1 }, children: "▼" }),
|
|
2542
|
-
|
|
2543
|
-
|
|
2543
|
+
n.hotkey && T && /* @__PURE__ */ t("span", { style: { fontSize: 9, color: e.textMut, lineHeight: 1 }, children: n.hotkey }),
|
|
2544
|
+
n.count !== void 0 && /* @__PURE__ */ t(E, { count: n.count, color: n.countColor })
|
|
2544
2545
|
]
|
|
2545
2546
|
}
|
|
2546
2547
|
),
|
|
2547
|
-
j &&
|
|
2548
|
-
|
|
2548
|
+
j && X && /* @__PURE__ */ t(
|
|
2549
|
+
fe,
|
|
2549
2550
|
{
|
|
2550
|
-
items:
|
|
2551
|
+
items: n.items,
|
|
2551
2552
|
onSelect: (P) => {
|
|
2552
|
-
|
|
2553
|
+
$(null), P.id && (f == null || f(String(P.id), n));
|
|
2553
2554
|
},
|
|
2554
2555
|
style: { top: "100%", left: 0, minWidth: 160 }
|
|
2555
2556
|
}
|
|
2556
2557
|
)
|
|
2557
|
-
] },
|
|
2558
|
-
},
|
|
2559
|
-
const
|
|
2560
|
-
return /* @__PURE__ */ t("div", { style: { position: "relative", display: "flex", alignSelf: "center" }, children: /* @__PURE__ */
|
|
2558
|
+
] }, R);
|
|
2559
|
+
}, z = (n, R) => {
|
|
2560
|
+
const F = n.size ?? "medium", k = F === "auto" ? 48 : F === "small" ? 28 : 36, S = n.id !== void 0 ? M[n.id] ?? !!n.active : !!n.active;
|
|
2561
|
+
return /* @__PURE__ */ t("div", { style: { position: "relative", display: "flex", alignSelf: "center" }, children: /* @__PURE__ */ x(
|
|
2561
2562
|
"button",
|
|
2562
2563
|
{
|
|
2563
|
-
title:
|
|
2564
|
-
disabled:
|
|
2564
|
+
title: n.tooltip,
|
|
2565
|
+
disabled: n.disabled,
|
|
2565
2566
|
style: {
|
|
2566
|
-
width:
|
|
2567
|
-
height:
|
|
2567
|
+
width: k,
|
|
2568
|
+
height: k,
|
|
2568
2569
|
padding: 2,
|
|
2569
|
-
border:
|
|
2570
|
+
border: S ? `2px solid ${e.primary}` : "2px solid transparent",
|
|
2570
2571
|
borderRadius: "50%",
|
|
2571
2572
|
overflow: "hidden",
|
|
2572
|
-
cursor:
|
|
2573
|
+
cursor: n.disabled ? "not-allowed" : "pointer",
|
|
2573
2574
|
background: "transparent",
|
|
2574
2575
|
flexShrink: 0,
|
|
2575
|
-
opacity:
|
|
2576
|
+
opacity: n.disabled ? 0.55 : 1
|
|
2576
2577
|
},
|
|
2577
|
-
onClick: () =>
|
|
2578
|
+
onClick: () => L(n),
|
|
2578
2579
|
children: [
|
|
2579
|
-
|
|
2580
|
+
n.src && /* @__PURE__ */ t(
|
|
2580
2581
|
"img",
|
|
2581
2582
|
{
|
|
2582
|
-
src:
|
|
2583
|
-
alt:
|
|
2583
|
+
src: n.src,
|
|
2584
|
+
alt: n.value || "",
|
|
2584
2585
|
style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" }
|
|
2585
2586
|
}
|
|
2586
2587
|
),
|
|
2587
|
-
|
|
2588
|
+
n.count !== void 0 && /* @__PURE__ */ t(E, { count: n.count, color: n.countColor })
|
|
2588
2589
|
]
|
|
2589
2590
|
}
|
|
2590
|
-
) },
|
|
2591
|
-
},
|
|
2592
|
-
var T,
|
|
2593
|
-
const
|
|
2591
|
+
) }, R);
|
|
2592
|
+
}, C = (n, R) => {
|
|
2593
|
+
var T, v;
|
|
2594
|
+
const F = n.id !== void 0 && b === `sel:${n.id}`, k = (n.id && N[n.id]) ?? n.value ?? ((v = (T = n.items) == null ? void 0 : T[0]) == null ? void 0 : v.value) ?? "", S = (n.items ?? []).map((j) => ({
|
|
2594
2595
|
id: j.value,
|
|
2595
2596
|
value: j.value,
|
|
2596
2597
|
icon: j.icon
|
|
2597
2598
|
}));
|
|
2598
|
-
return /* @__PURE__ */
|
|
2599
|
-
/* @__PURE__ */
|
|
2599
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative", alignSelf: "center" }, children: [
|
|
2600
|
+
/* @__PURE__ */ x(
|
|
2600
2601
|
"button",
|
|
2601
2602
|
{
|
|
2602
|
-
title:
|
|
2603
|
-
disabled:
|
|
2603
|
+
title: n.tooltip,
|
|
2604
|
+
disabled: n.disabled,
|
|
2604
2605
|
className: "dhx dhx-btn dhx-btn-ghost",
|
|
2605
2606
|
style: {
|
|
2606
2607
|
height: 28,
|
|
2607
2608
|
gap: 4,
|
|
2608
2609
|
padding: "0 8px",
|
|
2609
|
-
opacity:
|
|
2610
|
-
cursor:
|
|
2611
|
-
borderColor:
|
|
2610
|
+
opacity: n.disabled ? 0.55 : 1,
|
|
2611
|
+
cursor: n.disabled ? "not-allowed" : "pointer",
|
|
2612
|
+
borderColor: F ? e.primary : void 0
|
|
2612
2613
|
},
|
|
2613
2614
|
onClick: () => {
|
|
2614
|
-
if (
|
|
2615
|
-
const j = `sel:${
|
|
2616
|
-
|
|
2615
|
+
if (n.disabled || !n.id) return;
|
|
2616
|
+
const j = `sel:${n.id}`;
|
|
2617
|
+
$((X) => X === j ? null : j);
|
|
2617
2618
|
},
|
|
2618
2619
|
children: [
|
|
2619
|
-
|
|
2620
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 12 }, children:
|
|
2620
|
+
n.icon && /* @__PURE__ */ t("span", { style: { fontSize: 14 }, children: n.icon }),
|
|
2621
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 12 }, children: k }),
|
|
2621
2622
|
/* @__PURE__ */ t("span", { style: { fontSize: 8, opacity: 0.6 }, children: "▼" })
|
|
2622
2623
|
]
|
|
2623
2624
|
}
|
|
2624
2625
|
),
|
|
2625
|
-
|
|
2626
|
-
|
|
2626
|
+
F && /* @__PURE__ */ t(
|
|
2627
|
+
fe,
|
|
2627
2628
|
{
|
|
2628
|
-
items:
|
|
2629
|
+
items: S,
|
|
2629
2630
|
onSelect: (j) => {
|
|
2630
|
-
var
|
|
2631
|
-
const
|
|
2632
|
-
|
|
2631
|
+
var Q;
|
|
2632
|
+
const X = String(j.value ?? j.id ?? "");
|
|
2633
|
+
n.id && D((q) => ({ ...q, [n.id]: X })), $(null), (Q = n.onChange) == null || Q.call(n, X), n.id && (f == null || f(n.id, n));
|
|
2633
2634
|
},
|
|
2634
2635
|
style: { top: "100%", left: 0, minWidth: 100 }
|
|
2635
2636
|
}
|
|
2636
2637
|
)
|
|
2637
|
-
] },
|
|
2638
|
-
},
|
|
2639
|
-
|
|
2640
|
-
/* @__PURE__ */
|
|
2641
|
-
|
|
2638
|
+
] }, R);
|
|
2639
|
+
}, V = (n, R) => /* @__PURE__ */ x("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", justifyContent: "center", padding: "2px 4px", gap: 2 }, children: [
|
|
2640
|
+
n.label && /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: n.label }),
|
|
2641
|
+
/* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
|
|
2642
|
+
n.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 6, fontSize: 13, color: e.textMut, pointerEvents: "none", zIndex: 1 }, children: n.icon }),
|
|
2642
2643
|
/* @__PURE__ */ t(
|
|
2643
2644
|
"input",
|
|
2644
2645
|
{
|
|
2645
2646
|
className: "dhx dhx-input",
|
|
2646
|
-
disabled:
|
|
2647
|
-
style: { width:
|
|
2648
|
-
placeholder:
|
|
2649
|
-
defaultValue:
|
|
2650
|
-
onChange: (
|
|
2651
|
-
var
|
|
2652
|
-
(
|
|
2647
|
+
disabled: n.disabled,
|
|
2648
|
+
style: { width: n.width || 110, height: 26, fontSize: 12, paddingLeft: n.icon ? 24 : void 0 },
|
|
2649
|
+
placeholder: n.placeholder,
|
|
2650
|
+
defaultValue: n.value,
|
|
2651
|
+
onChange: (F) => {
|
|
2652
|
+
var k;
|
|
2653
|
+
(k = n.onChange) == null || k.call(n, F.target.value), n.id && (a == null || a(n.id, F.target.value));
|
|
2653
2654
|
},
|
|
2654
|
-
onBlur: (
|
|
2655
|
-
var
|
|
2656
|
-
(
|
|
2655
|
+
onBlur: (F) => {
|
|
2656
|
+
var k;
|
|
2657
|
+
(k = n.onBlur) == null || k.call(n, F.target.value), n.id && (u == null || u(n.id, F.target.value));
|
|
2657
2658
|
},
|
|
2658
|
-
onFocus: (
|
|
2659
|
-
var
|
|
2660
|
-
(
|
|
2659
|
+
onFocus: (F) => {
|
|
2660
|
+
var k;
|
|
2661
|
+
(k = n.onFocus) == null || k.call(n, F.target.value), n.id && (p == null || p(n.id, F.target.value));
|
|
2661
2662
|
}
|
|
2662
2663
|
}
|
|
2663
2664
|
)
|
|
2664
2665
|
] })
|
|
2665
|
-
] },
|
|
2666
|
+
] }, R), h = (n, R) => n.hidden ? null : /* @__PURE__ */ t("div", { title: n.tooltip, style: {
|
|
2666
2667
|
padding: "2px 6px",
|
|
2667
2668
|
fontSize: 11,
|
|
2668
|
-
color:
|
|
2669
|
+
color: n.disabled ? e.textMut : e.textSec,
|
|
2669
2670
|
display: "flex",
|
|
2670
2671
|
alignItems: "center",
|
|
2671
2672
|
alignSelf: "center",
|
|
2672
2673
|
userSelect: "none",
|
|
2673
|
-
opacity:
|
|
2674
|
-
}, children:
|
|
2674
|
+
opacity: n.disabled ? 0.5 : 1
|
|
2675
|
+
}, children: n.html ? /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: n.html } }) : n.value }, R), I = (n, R) => n.hidden ? null : /* @__PURE__ */ t(
|
|
2675
2676
|
"div",
|
|
2676
2677
|
{
|
|
2677
2678
|
style: { display: "flex", alignItems: "center", alignSelf: "center", padding: "0 4px" },
|
|
2678
|
-
dangerouslySetInnerHTML: { __html:
|
|
2679
|
+
dangerouslySetInnerHTML: { __html: n.html ?? "" }
|
|
2679
2680
|
},
|
|
2680
|
-
|
|
2681
|
-
),
|
|
2682
|
-
var
|
|
2683
|
-
if (
|
|
2684
|
-
const
|
|
2681
|
+
R
|
|
2682
|
+
), l = (n, R) => n.hidden ? null : n.type === "separator" || n.type === "sep" ? /* @__PURE__ */ t("div", { style: { width: 1, background: e.border, margin: "4px 2px", alignSelf: "stretch" } }, R) : n.type === "spacer" ? /* @__PURE__ */ t("div", { style: { flex: 1 } }, R) : n.type === "title" ? h(n, R) : n.type === "customHTML" ? I(n, R) : n.type === "imageButton" ? z(n, R) : n.type === "input" ? V(n, R) : n.type === "selectButton" ? C(n, R) : A(n, R), g = (n, R, F) => {
|
|
2683
|
+
var S;
|
|
2684
|
+
if (n.hidden) return null;
|
|
2685
|
+
const k = F || n.disabled;
|
|
2685
2686
|
return /* @__PURE__ */ t("div", { style: {
|
|
2686
2687
|
display: "flex",
|
|
2687
|
-
flexDirection:
|
|
2688
|
-
alignItems:
|
|
2688
|
+
flexDirection: n.direction === "col" ? "column" : "row",
|
|
2689
|
+
alignItems: n.direction === "col" ? "flex-start" : "center",
|
|
2689
2690
|
gap: 2,
|
|
2690
|
-
opacity:
|
|
2691
|
-
pointerEvents:
|
|
2692
|
-
}, children: (
|
|
2693
|
-
(T,
|
|
2694
|
-
) },
|
|
2695
|
-
},
|
|
2696
|
-
var
|
|
2697
|
-
if (
|
|
2698
|
-
const
|
|
2699
|
-
return /* @__PURE__ */
|
|
2691
|
+
opacity: n.disabled && !F ? 0.55 : 1,
|
|
2692
|
+
pointerEvents: k ? "none" : void 0
|
|
2693
|
+
}, children: (S = n.items) == null ? void 0 : S.map(
|
|
2694
|
+
(T, v) => T.type === "block" ? g(T, `${R}-${v}`, k) : l(T, `${R}-${v}`)
|
|
2695
|
+
) }, R);
|
|
2696
|
+
}, K = (n, R) => {
|
|
2697
|
+
var k;
|
|
2698
|
+
if (n.hidden) return null;
|
|
2699
|
+
const F = n.title || n.label;
|
|
2700
|
+
return /* @__PURE__ */ x("div", { style: {
|
|
2700
2701
|
display: "flex",
|
|
2701
2702
|
flexDirection: "column",
|
|
2702
2703
|
alignItems: "stretch",
|
|
2703
2704
|
borderRight: `1px solid ${e.border}`,
|
|
2704
2705
|
padding: "4px 6px 0",
|
|
2705
2706
|
minWidth: 40,
|
|
2706
|
-
opacity:
|
|
2707
|
-
pointerEvents:
|
|
2707
|
+
opacity: n.disabled ? 0.55 : 1,
|
|
2708
|
+
pointerEvents: n.disabled ? "none" : void 0
|
|
2708
2709
|
}, children: [
|
|
2709
2710
|
/* @__PURE__ */ t("div", { style: {
|
|
2710
2711
|
display: "flex",
|
|
2711
|
-
flexDirection:
|
|
2712
|
-
alignItems:
|
|
2712
|
+
flexDirection: n.direction === "col" ? "column" : "row",
|
|
2713
|
+
alignItems: n.direction === "col" ? "stretch" : "center",
|
|
2713
2714
|
gap: 2,
|
|
2714
2715
|
flex: 1
|
|
2715
|
-
}, children: (
|
|
2716
|
-
(
|
|
2716
|
+
}, children: (k = n.items) == null ? void 0 : k.map(
|
|
2717
|
+
(S, T) => S.type === "block" ? g(S, T, n.disabled) : l(S, T)
|
|
2717
2718
|
) }),
|
|
2718
|
-
|
|
2719
|
+
F && /* @__PURE__ */ t("div", { style: {
|
|
2719
2720
|
fontSize: 10,
|
|
2720
2721
|
color: e.textMut,
|
|
2721
2722
|
textAlign: "center",
|
|
2722
2723
|
padding: "3px 0 4px",
|
|
2723
2724
|
marginTop: 2,
|
|
2724
2725
|
borderTop: `1px solid ${e.border}`
|
|
2725
|
-
}, children:
|
|
2726
|
-
] },
|
|
2727
|
-
},
|
|
2726
|
+
}, children: F })
|
|
2727
|
+
] }, R);
|
|
2728
|
+
}, O = (n, R) => n.type === "block" ? K(n, R) : l(n, R);
|
|
2728
2729
|
return /* @__PURE__ */ t(
|
|
2729
2730
|
"div",
|
|
2730
2731
|
{
|
|
2731
|
-
ref:
|
|
2732
|
+
ref: w,
|
|
2732
2733
|
className: ["dhx", i].filter(Boolean).join(" "),
|
|
2733
2734
|
style: {
|
|
2734
2735
|
display: "flex",
|
|
@@ -2738,20 +2739,28 @@ function hn({
|
|
|
2738
2739
|
overflowX: "auto",
|
|
2739
2740
|
gap: 0,
|
|
2740
2741
|
minHeight: 72,
|
|
2741
|
-
...
|
|
2742
|
+
...s
|
|
2742
2743
|
},
|
|
2743
|
-
children:
|
|
2744
|
+
children: r.map(O)
|
|
2744
2745
|
}
|
|
2745
2746
|
);
|
|
2746
2747
|
}
|
|
2747
|
-
function
|
|
2748
|
+
function Me(r) {
|
|
2749
|
+
return r === "primary" ? e.primary : r === "success" ? e.success : r === "secondary" ? e.borderDk : e.danger;
|
|
2750
|
+
}
|
|
2751
|
+
function Vt(r, i, d) {
|
|
2752
|
+
if (!r && !i) return d ? { background: e.primaryLt, color: e.primary } : {};
|
|
2753
|
+
const s = r === "primary" ? e.primary : r === "danger" ? e.danger : r === "success" ? e.success : e.borderDk;
|
|
2754
|
+
return i === "link" ? { background: "transparent", color: s, border: "none", boxShadow: "none" } : i === "flat" ? { background: s, color: "#fff", border: "none", boxShadow: "none" } : { color: s };
|
|
2755
|
+
}
|
|
2756
|
+
function $e({ count: r, bg: i }) {
|
|
2748
2757
|
return /* @__PURE__ */ t("span", { style: {
|
|
2749
2758
|
position: "absolute",
|
|
2750
2759
|
top: 3,
|
|
2751
2760
|
right: 3,
|
|
2752
2761
|
minWidth: 16,
|
|
2753
2762
|
height: 16,
|
|
2754
|
-
background: e.danger,
|
|
2763
|
+
background: i ?? e.danger,
|
|
2755
2764
|
color: "#fff",
|
|
2756
2765
|
borderRadius: 8,
|
|
2757
2766
|
fontSize: 10,
|
|
@@ -2762,125 +2771,212 @@ function Oe({ count: n }) {
|
|
|
2762
2771
|
padding: "0 3px",
|
|
2763
2772
|
lineHeight: 1,
|
|
2764
2773
|
pointerEvents: "none"
|
|
2765
|
-
}, children:
|
|
2774
|
+
}, children: r });
|
|
2766
2775
|
}
|
|
2767
|
-
function
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2776
|
+
function yr({
|
|
2777
|
+
logo: r,
|
|
2778
|
+
items: i = [],
|
|
2779
|
+
vertical: d = !1,
|
|
2780
|
+
css: s,
|
|
2781
|
+
menuCss: f,
|
|
2782
|
+
onAction: a,
|
|
2783
|
+
onInputChange: u,
|
|
2784
|
+
onInputBlur: p,
|
|
2785
|
+
onInputFocus: y,
|
|
2786
|
+
style: M
|
|
2787
|
+
}) {
|
|
2788
|
+
const [o, b] = B(null), [$, N] = B(() => {
|
|
2789
|
+
const l = {};
|
|
2790
|
+
return i.forEach((g) => {
|
|
2791
|
+
g.id && (g.twoState || g.group) && g.active && (l[g.id] = !0);
|
|
2792
|
+
}), l;
|
|
2793
|
+
}), [D, c] = B(() => {
|
|
2794
|
+
const l = {};
|
|
2795
|
+
return i.forEach((g) => {
|
|
2796
|
+
g.type === "selectButton" && g.id && g.value && (l[g.id] = g.value);
|
|
2797
|
+
}), l;
|
|
2798
|
+
}), w = ie(null);
|
|
2799
|
+
J(Z, []), xe(w, ae(() => b(null), []));
|
|
2800
|
+
const L = (l) => {
|
|
2801
|
+
var g, K;
|
|
2802
|
+
if (!l.disabled) {
|
|
2803
|
+
if (l.twoState && l.id && N((O) => ({ ...O, [l.id]: !O[l.id] })), l.group && l.id && N((O) => {
|
|
2804
|
+
const n = { ...O };
|
|
2805
|
+
return i.forEach((R) => {
|
|
2806
|
+
R.group === l.group && R.id && (n[R.id] = !1);
|
|
2807
|
+
}), n[l.id] = !0, n;
|
|
2808
|
+
}), (g = l.items) != null && g.length || l.type === "selectButton") {
|
|
2809
|
+
const O = l.id;
|
|
2810
|
+
b((n) => n === O ? null : O);
|
|
2780
2811
|
return;
|
|
2781
2812
|
}
|
|
2782
|
-
(
|
|
2813
|
+
(K = l.onClick) == null || K.call(l, l.id || ""), a == null || a(l.id || "");
|
|
2783
2814
|
}
|
|
2784
|
-
},
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
h.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 8, color: e.textMut, fontSize: 15, pointerEvents: "none", zIndex: 1 }, children: h.icon }),
|
|
2815
|
+
}, E = (l, g) => /* @__PURE__ */ t("span", { style: {
|
|
2816
|
+
fontSize: 12,
|
|
2817
|
+
color: e.textSec,
|
|
2818
|
+
padding: "0 8px",
|
|
2819
|
+
fontWeight: 500,
|
|
2820
|
+
whiteSpace: "nowrap",
|
|
2821
|
+
alignSelf: "center"
|
|
2822
|
+
}, children: l.value ?? l.text }, l.id ?? g), A = (l, g) => /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: l.html ?? "" } }, l.id ?? g), z = (l, g) => /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center", margin: "0 4px", gap: 4 }, children: [
|
|
2823
|
+
l.label && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, whiteSpace: "nowrap" }, children: l.label }),
|
|
2824
|
+
/* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
|
|
2825
|
+
l.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 8, color: e.textMut, fontSize: 15, pointerEvents: "none", zIndex: 1 }, children: l.icon }),
|
|
2796
2826
|
/* @__PURE__ */ t(
|
|
2797
2827
|
"input",
|
|
2798
2828
|
{
|
|
2799
2829
|
className: "dhx dhx-input",
|
|
2800
|
-
style: { width:
|
|
2801
|
-
placeholder:
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2830
|
+
style: { width: l.width || 200, height: 28, paddingLeft: l.icon ? 30 : void 0 },
|
|
2831
|
+
placeholder: l.placeholder,
|
|
2832
|
+
defaultValue: l.value,
|
|
2833
|
+
onChange: (K) => {
|
|
2834
|
+
var O;
|
|
2835
|
+
(O = l.onChange) == null || O.call(l, K.target.value), u == null || u(l.id || "", K.target.value);
|
|
2836
|
+
},
|
|
2837
|
+
onBlur: (K) => {
|
|
2838
|
+
var O;
|
|
2839
|
+
(O = l.onBlur) == null || O.call(l, K.target.value), p == null || p(l.id || "", K.target.value);
|
|
2840
|
+
},
|
|
2841
|
+
onFocus: (K) => {
|
|
2842
|
+
var O;
|
|
2843
|
+
(O = l.onFocus) == null || O.call(l, K.target.value), y == null || y(l.id || "", K.target.value);
|
|
2805
2844
|
}
|
|
2806
2845
|
}
|
|
2807
2846
|
)
|
|
2808
|
-
] }
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
},
|
|
2826
|
-
onClick: () => r(h, M),
|
|
2827
|
-
children: [
|
|
2828
|
-
h.src && /* @__PURE__ */ t("img", { src: h.src, alt: h.value || "", style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" } }),
|
|
2829
|
-
h.count !== void 0 && /* @__PURE__ */ t(Oe, { count: h.count })
|
|
2830
|
-
]
|
|
2847
|
+
] })
|
|
2848
|
+
] }, l.id ?? g), C = (l, g) => /* @__PURE__ */ x(
|
|
2849
|
+
"button",
|
|
2850
|
+
{
|
|
2851
|
+
title: l.tooltip,
|
|
2852
|
+
disabled: l.disabled,
|
|
2853
|
+
style: {
|
|
2854
|
+
position: "relative",
|
|
2855
|
+
width: 36,
|
|
2856
|
+
height: 36,
|
|
2857
|
+
padding: 2,
|
|
2858
|
+
border: "none",
|
|
2859
|
+
borderRadius: "50%",
|
|
2860
|
+
overflow: "hidden",
|
|
2861
|
+
cursor: l.disabled ? "not-allowed" : "pointer",
|
|
2862
|
+
background: "transparent",
|
|
2863
|
+
flexShrink: 0
|
|
2831
2864
|
},
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2865
|
+
onClick: () => L(l),
|
|
2866
|
+
children: [
|
|
2867
|
+
l.src && /* @__PURE__ */ t("img", { src: l.src, alt: l.value || "", style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" } }),
|
|
2868
|
+
l.count !== void 0 && /* @__PURE__ */ t($e, { count: l.count, bg: Me(l.countColor) })
|
|
2869
|
+
]
|
|
2870
|
+
},
|
|
2871
|
+
l.id ?? g
|
|
2872
|
+
), V = (l, g) => {
|
|
2873
|
+
var O;
|
|
2874
|
+
const K = o === l.id;
|
|
2875
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
|
|
2876
|
+
/* @__PURE__ */ x(
|
|
2877
|
+
"button",
|
|
2878
|
+
{
|
|
2879
|
+
className: "dhx dhx-btn dhx-btn-ghost",
|
|
2880
|
+
title: l.tooltip,
|
|
2881
|
+
disabled: l.disabled,
|
|
2882
|
+
style: {
|
|
2883
|
+
position: "relative",
|
|
2884
|
+
height: d ? 40 : 36,
|
|
2885
|
+
gap: 4,
|
|
2886
|
+
cursor: l.disabled ? "not-allowed" : "pointer",
|
|
2887
|
+
...d ? { width: "100%", justifyContent: "flex-start", padding: "0 16px", borderRadius: 0 } : {}
|
|
2888
|
+
},
|
|
2889
|
+
onClick: () => L(l),
|
|
2890
|
+
children: [
|
|
2891
|
+
l.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16, flexShrink: 0 }, children: l.icon }),
|
|
2892
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: D[l.id] ?? l.value ?? l.text }),
|
|
2893
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 9, opacity: 0.55 }, children: "▼" }),
|
|
2894
|
+
l.count !== void 0 && /* @__PURE__ */ t($e, { count: l.count, bg: Me(l.countColor) })
|
|
2895
|
+
]
|
|
2896
|
+
}
|
|
2897
|
+
),
|
|
2898
|
+
K && ((O = l.items) == null ? void 0 : O.length) && /* @__PURE__ */ t(
|
|
2899
|
+
fe,
|
|
2900
|
+
{
|
|
2901
|
+
items: l.items,
|
|
2902
|
+
onSelect: (n) => {
|
|
2903
|
+
var R;
|
|
2904
|
+
if (b(null), n.id !== void 0) {
|
|
2905
|
+
const F = String(n.value ?? n.id);
|
|
2906
|
+
c((k) => ({ ...k, [l.id]: F })), (R = l.onChange) == null || R.call(l, F), u == null || u(l.id, F);
|
|
2907
|
+
}
|
|
2908
|
+
},
|
|
2909
|
+
style: d ? { left: "100%", top: 0 } : { top: "100%", left: 0 }
|
|
2910
|
+
}
|
|
2911
|
+
)
|
|
2912
|
+
] }, l.id ?? g);
|
|
2913
|
+
}, h = (l, g) => {
|
|
2914
|
+
var T;
|
|
2915
|
+
const K = !!(l.id && (l.twoState || l.group) && $[l.id]), O = !!((T = l.items) != null && T.length), n = !!l.circle, R = !!l.loading, F = Vt(l.color, l.view, K), k = {
|
|
2835
2916
|
position: "relative",
|
|
2836
2917
|
height: d ? 40 : 36,
|
|
2837
2918
|
gap: 6,
|
|
2838
|
-
background:
|
|
2839
|
-
color:
|
|
2840
|
-
opacity:
|
|
2841
|
-
cursor:
|
|
2919
|
+
background: K ? e.primaryLt : "transparent",
|
|
2920
|
+
color: K ? e.primary : l.disabled ? e.textMut : e.text,
|
|
2921
|
+
opacity: l.disabled ? 0.55 : 1,
|
|
2922
|
+
cursor: l.disabled ? "not-allowed" : "pointer",
|
|
2842
2923
|
...d ? {
|
|
2843
2924
|
width: "100%",
|
|
2844
2925
|
justifyContent: "flex-start",
|
|
2845
2926
|
padding: "0 16px",
|
|
2846
2927
|
borderRadius: 0
|
|
2847
|
-
} : {}
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2928
|
+
} : {},
|
|
2929
|
+
...n ? {
|
|
2930
|
+
borderRadius: "50%",
|
|
2931
|
+
width: 36,
|
|
2932
|
+
height: 36,
|
|
2933
|
+
padding: 0,
|
|
2934
|
+
minWidth: 0,
|
|
2935
|
+
justifyContent: "center"
|
|
2936
|
+
} : {},
|
|
2937
|
+
...F
|
|
2938
|
+
}, S = l.value ?? l.text;
|
|
2939
|
+
return /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
|
|
2940
|
+
/* @__PURE__ */ x(
|
|
2851
2941
|
"button",
|
|
2852
2942
|
{
|
|
2853
2943
|
className: "dhx dhx-btn dhx-btn-ghost",
|
|
2854
|
-
title:
|
|
2855
|
-
disabled:
|
|
2944
|
+
title: l.tooltip,
|
|
2945
|
+
disabled: l.disabled,
|
|
2856
2946
|
style: k,
|
|
2857
|
-
onClick: () =>
|
|
2947
|
+
onClick: () => L(l),
|
|
2858
2948
|
children: [
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2949
|
+
R ? /* @__PURE__ */ t("span", { style: { fontSize: 16, animation: "dhx-spin 1s linear infinite", display: "inline-block" }, children: "⟳" }) : l.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16, flexShrink: 0 }, children: l.icon }),
|
|
2950
|
+
!n && S && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: S }),
|
|
2951
|
+
!n && l.hotkey && /* @__PURE__ */ t("span", { style: { fontSize: 10, opacity: 0.45, marginLeft: 4 }, children: l.hotkey }),
|
|
2952
|
+
O && !n && /* @__PURE__ */ t("span", { style: { fontSize: 9, opacity: 0.55, marginLeft: 2 }, children: "▼" }),
|
|
2953
|
+
l.count !== void 0 && /* @__PURE__ */ t($e, { count: l.count, bg: Me(l.countColor) })
|
|
2863
2954
|
]
|
|
2864
2955
|
}
|
|
2865
2956
|
),
|
|
2866
|
-
|
|
2867
|
-
|
|
2957
|
+
O && o === l.id && /* @__PURE__ */ t(
|
|
2958
|
+
fe,
|
|
2868
2959
|
{
|
|
2869
|
-
items:
|
|
2870
|
-
onSelect: (
|
|
2871
|
-
var
|
|
2872
|
-
|
|
2960
|
+
items: l.items,
|
|
2961
|
+
onSelect: (v) => {
|
|
2962
|
+
var j;
|
|
2963
|
+
b(null), v.id && ((j = l.onClick) == null || j.call(l, v.id), a == null || a(v.id));
|
|
2873
2964
|
},
|
|
2874
2965
|
style: d ? { left: "100%", top: 0 } : { top: "100%" }
|
|
2875
2966
|
}
|
|
2876
2967
|
)
|
|
2877
|
-
] },
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2968
|
+
] }, l.id ?? g);
|
|
2969
|
+
}, I = (l, g) => l.hidden ? null : l.type === "separator" ? /* @__PURE__ */ t("div", { style: {
|
|
2970
|
+
[d ? "height" : "width"]: 1,
|
|
2971
|
+
background: e.border,
|
|
2972
|
+
margin: d ? "4px 8px" : "0 6px",
|
|
2973
|
+
alignSelf: "stretch"
|
|
2974
|
+
} }, l.id ?? g) : l.type === "spacer" ? /* @__PURE__ */ t("div", { style: { flex: 1 } }, l.id ?? g) : l.type === "title" ? E(l, g) : l.type === "customHTML" ? A(l, g) : l.type === "input" ? z(l, g) : l.type === "selectButton" ? V(l, g) : l.type === "imageButton" ? C(l, g) : h(l, g);
|
|
2975
|
+
return /* @__PURE__ */ x(
|
|
2880
2976
|
"nav",
|
|
2881
2977
|
{
|
|
2882
|
-
ref:
|
|
2883
|
-
className: "dhx",
|
|
2978
|
+
ref: w,
|
|
2979
|
+
className: ["dhx", s].filter(Boolean).join(" "),
|
|
2884
2980
|
style: {
|
|
2885
2981
|
display: "flex",
|
|
2886
2982
|
flexDirection: d ? "column" : "row",
|
|
@@ -2891,10 +2987,10 @@ function fn({ logo: n, items: i = [], vertical: d = !1, onAction: l, style: u })
|
|
|
2891
2987
|
padding: d ? "8px 0" : "0 12px",
|
|
2892
2988
|
minHeight: d ? void 0 : 48,
|
|
2893
2989
|
gap: 2,
|
|
2894
|
-
...
|
|
2990
|
+
...M
|
|
2895
2991
|
},
|
|
2896
2992
|
children: [
|
|
2897
|
-
|
|
2993
|
+
r && /* @__PURE__ */ t("div", { style: {
|
|
2898
2994
|
color: e.text,
|
|
2899
2995
|
fontWeight: 800,
|
|
2900
2996
|
fontSize: 16,
|
|
@@ -2904,42 +3000,91 @@ function fn({ logo: n, items: i = [], vertical: d = !1, onAction: l, style: u })
|
|
|
2904
3000
|
marginRight: d ? 0 : 8,
|
|
2905
3001
|
marginBottom: d ? 4 : 0,
|
|
2906
3002
|
flexShrink: 0
|
|
2907
|
-
}, children:
|
|
2908
|
-
i.map(
|
|
3003
|
+
}, children: r }),
|
|
3004
|
+
i.map(I)
|
|
2909
3005
|
]
|
|
2910
3006
|
}
|
|
2911
3007
|
);
|
|
2912
3008
|
}
|
|
3009
|
+
function br({
|
|
3010
|
+
value: r,
|
|
3011
|
+
toolbar: i,
|
|
3012
|
+
menubar: d,
|
|
3013
|
+
fullscreenMode: s,
|
|
3014
|
+
layoutMode: f,
|
|
3015
|
+
imageUploadUrl: a,
|
|
3016
|
+
locale: u,
|
|
3017
|
+
defaultStyles: p,
|
|
3018
|
+
onChange: y,
|
|
3019
|
+
style: M,
|
|
3020
|
+
className: o
|
|
3021
|
+
}) {
|
|
3022
|
+
const b = ie(null), $ = ie(null), N = ie(y);
|
|
3023
|
+
return N.current = y, J(() => {
|
|
3024
|
+
if (!b.current) return;
|
|
3025
|
+
const D = {};
|
|
3026
|
+
r !== void 0 && (D.value = r), i !== void 0 && (D.toolbar = i), d !== void 0 && (D.menubar = d), s !== void 0 && (D.fullscreenMode = s), f !== void 0 && (D.layoutMode = f), a !== void 0 && (D.imageUploadUrl = a), u !== void 0 && (D.locale = u), p !== void 0 && (D.defaultStyles = p);
|
|
3027
|
+
const c = new kt(b.current, D);
|
|
3028
|
+
$.current = c;
|
|
3029
|
+
let w = c.getValue(), L;
|
|
3030
|
+
const E = new MutationObserver(() => {
|
|
3031
|
+
clearTimeout(L), L = setTimeout(() => {
|
|
3032
|
+
var z;
|
|
3033
|
+
const A = c.getValue();
|
|
3034
|
+
A !== w && (w = A, (z = N.current) == null || z.call(N, A));
|
|
3035
|
+
}, 150);
|
|
3036
|
+
});
|
|
3037
|
+
return E.observe(b.current, {
|
|
3038
|
+
childList: !0,
|
|
3039
|
+
subtree: !0,
|
|
3040
|
+
characterData: !0
|
|
3041
|
+
}), () => {
|
|
3042
|
+
clearTimeout(L), E.disconnect(), c.destructor(), b.current && (b.current.innerHTML = ""), $.current = null;
|
|
3043
|
+
};
|
|
3044
|
+
}, []), J(() => {
|
|
3045
|
+
const D = $.current;
|
|
3046
|
+
!D || r === void 0 || D.getValue() !== r && D.setValue(r);
|
|
3047
|
+
}, [r]), J(() => {
|
|
3048
|
+
$.current && u && $.current.setLocale(u);
|
|
3049
|
+
}, [u]), /* @__PURE__ */ t(
|
|
3050
|
+
"div",
|
|
3051
|
+
{
|
|
3052
|
+
ref: b,
|
|
3053
|
+
className: o,
|
|
3054
|
+
style: { display: "flex", flexDirection: "column", height: 500, ...M }
|
|
3055
|
+
}
|
|
3056
|
+
);
|
|
3057
|
+
}
|
|
2913
3058
|
export {
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
3059
|
+
Ut as Button,
|
|
3060
|
+
ir as Calendar,
|
|
3061
|
+
or as Chart,
|
|
3062
|
+
lr as Colorpicker,
|
|
3063
|
+
je as Combobox,
|
|
3064
|
+
Zt as ContextMenu,
|
|
3065
|
+
pr as DataView,
|
|
3066
|
+
gr as Form,
|
|
3067
|
+
nr as Grid,
|
|
2923
3068
|
Ct as Layout,
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
3069
|
+
ur as List,
|
|
3070
|
+
Qt as Menu,
|
|
3071
|
+
fe as MenuDropdown,
|
|
2927
3072
|
Ke as MessageContext,
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
3073
|
+
dr as MessageProvider,
|
|
3074
|
+
yr as Navbar,
|
|
3075
|
+
fr as Pagination,
|
|
3076
|
+
sr as Popup,
|
|
3077
|
+
xr as Ribbon,
|
|
3078
|
+
br as Richtext,
|
|
3079
|
+
tr as Sidebar,
|
|
3080
|
+
Oe as Slider,
|
|
3081
|
+
rr as Tabbar,
|
|
3082
|
+
At as Timepicker,
|
|
3083
|
+
er as Toolbar,
|
|
3084
|
+
hr as Tree,
|
|
3085
|
+
ar as Window,
|
|
2940
3086
|
e as tokens,
|
|
2941
3087
|
xe as useClickOutside,
|
|
2942
|
-
|
|
2943
|
-
|
|
3088
|
+
zt as useDrag,
|
|
3089
|
+
cr as useMessage
|
|
2944
3090
|
};
|
|
2945
|
-
//# sourceMappingURL=dhx-react-suite.js.map
|