denwa-react-shared 1.0.21 → 1.0.23

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.
@@ -1,669 +0,0 @@
1
- import { G as d, J as K, K as Ct, M as _, L as G, N as W, O as nt, P as yt, Q as Ot, U as jt, V as Nt, W as Et, X as kt, Z as Rt, $ as Mt, a0 as Dt, a1 as Ht, a2 as Tt, a3 as Bt, a4 as X, a5 as Pt, a6 as It, a7 as Vt, a8 as ct, a9 as zt, aa as A, ab as At, ac as ot, ad as L, ae as Lt, af as Wt, ag as B, ah as Ft, ai as ut, aj as q, ak as Xt, al as Jt, am as Kt, an as qt } from "./index-DiC1uMp3.js";
2
- import * as o from "react";
3
- import { useState as Ut, useMemo as _t, cloneElement as Gt } from "react";
4
- var it = function(t, e) {
5
- if (!t) return null;
6
- var n = {
7
- left: t.offsetLeft,
8
- right: t.parentElement.clientWidth - t.clientWidth - t.offsetLeft,
9
- width: t.clientWidth,
10
- top: t.offsetTop,
11
- bottom: t.parentElement.clientHeight - t.clientHeight - t.offsetTop,
12
- height: t.clientHeight
13
- };
14
- return e ? {
15
- left: 0,
16
- right: 0,
17
- width: 0,
18
- top: n.top,
19
- bottom: n.bottom,
20
- height: n.height
21
- } : {
22
- left: n.left,
23
- right: n.right,
24
- width: n.width,
25
- top: 0,
26
- bottom: 0,
27
- height: 0
28
- };
29
- }, P = function(t) {
30
- return t !== void 0 ? "".concat(t, "px") : void 0;
31
- };
32
- function Yt(t) {
33
- var e = t.prefixCls, n = t.containerRef, a = t.value, i = t.getValueIndex, r = t.motionName, f = t.onMotionStart, h = t.onMotionEnd, b = t.direction, S = t.vertical, l = S === void 0 ? !1 : S, w = o.useRef(null), C = o.useState(a), y = A(C, 2), v = y[0], R = y[1], N = function(c) {
34
- var j, m = i(c), T = (j = n.current) === null || j === void 0 ? void 0 : j.querySelectorAll(".".concat(e, "-item"))[m];
35
- return (T == null ? void 0 : T.offsetParent) && T;
36
- }, D = o.useState(null), g = A(D, 2), s = g[0], E = g[1], I = o.useState(null), x = A(I, 2), u = x[0], M = x[1];
37
- Xt(function() {
38
- if (v !== a) {
39
- var c = N(v), j = N(a), m = it(c, l), T = it(j, l);
40
- R(a), E(m), M(T), c && j ? f() : h();
41
- }
42
- }, [a]);
43
- var $ = o.useMemo(function() {
44
- if (l) {
45
- var c;
46
- return P((c = s == null ? void 0 : s.top) !== null && c !== void 0 ? c : 0);
47
- }
48
- return P(b === "rtl" ? -(s == null ? void 0 : s.right) : s == null ? void 0 : s.left);
49
- }, [l, b, s]), O = o.useMemo(function() {
50
- if (l) {
51
- var c;
52
- return P((c = u == null ? void 0 : u.top) !== null && c !== void 0 ? c : 0);
53
- }
54
- return P(b === "rtl" ? -(u == null ? void 0 : u.right) : u == null ? void 0 : u.left);
55
- }, [l, b, u]), V = function() {
56
- return l ? {
57
- transform: "translateY(var(--thumb-start-top))",
58
- height: "var(--thumb-start-height)"
59
- } : {
60
- transform: "translateX(var(--thumb-start-left))",
61
- width: "var(--thumb-start-width)"
62
- };
63
- }, H = function() {
64
- return l ? {
65
- transform: "translateY(var(--thumb-active-top))",
66
- height: "var(--thumb-active-height)"
67
- } : {
68
- transform: "translateX(var(--thumb-active-left))",
69
- width: "var(--thumb-active-width)"
70
- };
71
- }, z = function() {
72
- E(null), M(null), h();
73
- };
74
- return !s || !u ? null : /* @__PURE__ */ o.createElement(Jt, {
75
- visible: !0,
76
- motionName: r,
77
- motionAppear: !0,
78
- onAppearStart: V,
79
- onAppearActive: H,
80
- onVisibleChanged: z
81
- }, function(c, j) {
82
- var m = c.className, T = c.style, F = q(q({}, T), {}, {
83
- "--thumb-start-left": $,
84
- "--thumb-start-width": P(s == null ? void 0 : s.width),
85
- "--thumb-active-left": O,
86
- "--thumb-active-width": P(u == null ? void 0 : u.width),
87
- "--thumb-start-top": $,
88
- "--thumb-start-height": P(s == null ? void 0 : s.height),
89
- "--thumb-active-top": O,
90
- "--thumb-active-height": P(u == null ? void 0 : u.height)
91
- }), J = {
92
- ref: ct(w, j),
93
- style: F,
94
- className: X("".concat(e, "-thumb"), m)
95
- };
96
- return process.env.NODE_ENV === "test" && (J["data-test-style"] = JSON.stringify(F)), /* @__PURE__ */ o.createElement("div", J);
97
- });
98
- }
99
- var Zt = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
100
- function Qt(t) {
101
- if (typeof t.title < "u")
102
- return t.title;
103
- if (ut(t.label) !== "object") {
104
- var e;
105
- return (e = t.label) === null || e === void 0 ? void 0 : e.toString();
106
- }
107
- }
108
- function te(t) {
109
- return t.map(function(e) {
110
- if (ut(e) === "object" && e !== null) {
111
- var n = Qt(e);
112
- return q(q({}, e), {}, {
113
- title: n
114
- });
115
- }
116
- return {
117
- label: e == null ? void 0 : e.toString(),
118
- title: e == null ? void 0 : e.toString(),
119
- value: e
120
- };
121
- });
122
- }
123
- var ee = function(t) {
124
- var e = t.prefixCls, n = t.className, a = t.disabled, i = t.checked, r = t.label, f = t.title, h = t.value, b = t.name, S = t.onChange, l = t.onFocus, w = t.onBlur, C = t.onKeyDown, y = t.onKeyUp, v = t.onMouseDown, R = function(N) {
125
- a || S(N, h);
126
- };
127
- return /* @__PURE__ */ o.createElement("label", {
128
- className: X(n, L({}, "".concat(e, "-item-disabled"), a)),
129
- onMouseDown: v
130
- }, /* @__PURE__ */ o.createElement("input", {
131
- name: b,
132
- className: "".concat(e, "-item-input"),
133
- type: "radio",
134
- disabled: a,
135
- checked: i,
136
- onChange: R,
137
- onFocus: l,
138
- onBlur: w,
139
- onKeyDown: C,
140
- onKeyUp: y
141
- }), /* @__PURE__ */ o.createElement("div", {
142
- className: "".concat(e, "-item-label"),
143
- title: f,
144
- "aria-selected": i
145
- }, r));
146
- }, dt = /* @__PURE__ */ o.forwardRef(function(t, e) {
147
- var n, a, i = t.prefixCls, r = i === void 0 ? "rc-segmented" : i, f = t.direction, h = t.vertical, b = t.options, S = b === void 0 ? [] : b, l = t.disabled, w = t.defaultValue, C = t.value, y = t.name, v = t.onChange, R = t.className, N = R === void 0 ? "" : R, D = t.motionName, g = D === void 0 ? "thumb-motion" : D, s = Vt(t, Zt), E = o.useRef(null), I = o.useMemo(function() {
148
- return ct(E, e);
149
- }, [E, e]), x = o.useMemo(function() {
150
- return te(S);
151
- }, [S]), u = zt((n = x[0]) === null || n === void 0 ? void 0 : n.value, {
152
- value: C,
153
- defaultValue: w
154
- }), M = A(u, 2), $ = M[0], O = M[1], V = o.useState(!1), H = A(V, 2), z = H[0], c = H[1], j = function(p, k) {
155
- O(k), v == null || v(k);
156
- }, m = At(s, ["children"]), T = o.useState(!1), F = A(T, 2), J = F[0], Z = F[1], gt = o.useState(!1), Q = A(gt, 2), pt = Q[0], tt = Q[1], bt = function() {
157
- tt(!0);
158
- }, ft = function() {
159
- tt(!1);
160
- }, vt = function() {
161
- Z(!1);
162
- }, xt = function(p) {
163
- p.key === "Tab" && Z(!0);
164
- }, et = function(p) {
165
- var k = x.findIndex(function(wt) {
166
- return wt.value === $;
167
- }), at = x.length, $t = (k + p + at) % at, U = x[$t];
168
- U && (O(U.value), v == null || v(U.value));
169
- }, St = function(p) {
170
- switch (p.key) {
171
- case "ArrowLeft":
172
- case "ArrowUp":
173
- et(-1);
174
- break;
175
- case "ArrowRight":
176
- case "ArrowDown":
177
- et(1);
178
- break;
179
- }
180
- };
181
- return /* @__PURE__ */ o.createElement("div", ot({
182
- role: "radiogroup",
183
- "aria-label": "segmented control",
184
- tabIndex: l ? void 0 : 0
185
- }, m, {
186
- className: X(r, (a = {}, L(a, "".concat(r, "-rtl"), f === "rtl"), L(a, "".concat(r, "-disabled"), l), L(a, "".concat(r, "-vertical"), h), a), N),
187
- ref: I
188
- }), /* @__PURE__ */ o.createElement("div", {
189
- className: "".concat(r, "-group")
190
- }, /* @__PURE__ */ o.createElement(Yt, {
191
- vertical: h,
192
- prefixCls: r,
193
- value: $,
194
- containerRef: E,
195
- motionName: "".concat(r, "-").concat(g),
196
- direction: f,
197
- getValueIndex: function(p) {
198
- return x.findIndex(function(k) {
199
- return k.value === p;
200
- });
201
- },
202
- onMotionStart: function() {
203
- c(!0);
204
- },
205
- onMotionEnd: function() {
206
- c(!1);
207
- }
208
- }), x.map(function(p) {
209
- var k;
210
- return /* @__PURE__ */ o.createElement(ee, ot({}, p, {
211
- name: y,
212
- key: p.value,
213
- prefixCls: r,
214
- className: X(p.className, "".concat(r, "-item"), (k = {}, L(k, "".concat(r, "-item-selected"), p.value === $ && !z), L(k, "".concat(r, "-item-focused"), pt && J && p.value === $), k)),
215
- checked: p.value === $,
216
- onChange: j,
217
- onFocus: bt,
218
- onBlur: ft,
219
- onKeyDown: St,
220
- onKeyUp: xt,
221
- onMouseDown: vt,
222
- disabled: !!l || !!p.disabled
223
- }));
224
- })));
225
- });
226
- process.env.NODE_ENV !== "production" && (dt.displayName = "Segmented");
227
- var ae = dt;
228
- function rt(t, e) {
229
- return {
230
- [`${t}, ${t}:hover, ${t}:focus`]: {
231
- color: e.colorTextDisabled,
232
- cursor: "not-allowed"
233
- }
234
- };
235
- }
236
- function lt(t) {
237
- return {
238
- backgroundColor: t.itemSelectedBg,
239
- boxShadow: t.boxShadowTertiary
240
- };
241
- }
242
- const ne = Object.assign({
243
- overflow: "hidden"
244
- }, Kt), oe = (t) => {
245
- const {
246
- componentCls: e
247
- } = t, n = t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(), a = t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(), i = t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();
248
- return {
249
- [e]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Lt(t)), {
250
- display: "inline-block",
251
- padding: t.trackPadding,
252
- color: t.itemColor,
253
- background: t.trackBg,
254
- borderRadius: t.borderRadius,
255
- transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`
256
- }), Wt(t)), {
257
- [`${e}-group`]: {
258
- position: "relative",
259
- display: "flex",
260
- alignItems: "stretch",
261
- justifyItems: "flex-start",
262
- flexDirection: "row",
263
- width: "100%"
264
- },
265
- // RTL styles
266
- [`&${e}-rtl`]: {
267
- direction: "rtl"
268
- },
269
- [`&${e}-vertical`]: {
270
- [`${e}-group`]: {
271
- flexDirection: "column"
272
- },
273
- [`${e}-thumb`]: {
274
- width: "100%",
275
- height: 0,
276
- padding: `0 ${B(t.paddingXXS)}`
277
- }
278
- },
279
- // block styles
280
- [`&${e}-block`]: {
281
- display: "flex"
282
- },
283
- [`&${e}-block ${e}-item`]: {
284
- flex: 1,
285
- minWidth: 0
286
- },
287
- // item styles
288
- [`${e}-item`]: {
289
- position: "relative",
290
- textAlign: "center",
291
- cursor: "pointer",
292
- transition: `color ${t.motionDurationMid} ${t.motionEaseInOut}`,
293
- borderRadius: t.borderRadiusSM,
294
- // Fix Safari render bug
295
- // https://github.com/ant-design/ant-design/issues/45250
296
- transform: "translateZ(0)",
297
- "&-selected": Object.assign(Object.assign({}, lt(t)), {
298
- color: t.itemSelectedColor
299
- }),
300
- "&-focused": Object.assign({}, Ft(t)),
301
- "&::after": {
302
- content: '""',
303
- position: "absolute",
304
- zIndex: -1,
305
- width: "100%",
306
- height: "100%",
307
- top: 0,
308
- insetInlineStart: 0,
309
- borderRadius: "inherit",
310
- opacity: 0,
311
- transition: `opacity ${t.motionDurationMid}`,
312
- // This is mandatory to make it not clickable or hoverable
313
- // Ref: https://github.com/ant-design/ant-design/issues/40888
314
- pointerEvents: "none"
315
- },
316
- [`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]: {
317
- color: t.itemHoverColor,
318
- "&::after": {
319
- opacity: 1,
320
- backgroundColor: t.itemHoverBg
321
- }
322
- },
323
- [`&:active:not(${e}-item-selected):not(${e}-item-disabled)`]: {
324
- color: t.itemHoverColor,
325
- "&::after": {
326
- opacity: 1,
327
- backgroundColor: t.itemActiveBg
328
- }
329
- },
330
- "&-label": Object.assign({
331
- minHeight: n,
332
- lineHeight: B(n),
333
- padding: `0 ${B(t.segmentedPaddingHorizontal)}`
334
- }, ne),
335
- // syntactic sugar to add `icon` for Segmented Item
336
- "&-icon + *": {
337
- marginInlineStart: t.calc(t.marginSM).div(2).equal()
338
- },
339
- "&-input": {
340
- position: "absolute",
341
- insetBlockStart: 0,
342
- insetInlineStart: 0,
343
- width: 0,
344
- height: 0,
345
- opacity: 0,
346
- pointerEvents: "none"
347
- }
348
- },
349
- // thumb styles
350
- [`${e}-thumb`]: Object.assign(Object.assign({}, lt(t)), {
351
- position: "absolute",
352
- insetBlockStart: 0,
353
- insetInlineStart: 0,
354
- width: 0,
355
- height: "100%",
356
- padding: `${B(t.paddingXXS)} 0`,
357
- borderRadius: t.borderRadiusSM,
358
- transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOut}, height ${t.motionDurationSlow} ${t.motionEaseInOut}`,
359
- [`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]: {
360
- backgroundColor: "transparent"
361
- }
362
- }),
363
- // size styles
364
- [`&${e}-lg`]: {
365
- borderRadius: t.borderRadiusLG,
366
- [`${e}-item-label`]: {
367
- minHeight: a,
368
- lineHeight: B(a),
369
- padding: `0 ${B(t.segmentedPaddingHorizontal)}`,
370
- fontSize: t.fontSizeLG
371
- },
372
- [`${e}-item, ${e}-thumb`]: {
373
- borderRadius: t.borderRadius
374
- }
375
- },
376
- [`&${e}-sm`]: {
377
- borderRadius: t.borderRadiusSM,
378
- [`${e}-item-label`]: {
379
- minHeight: i,
380
- lineHeight: B(i),
381
- padding: `0 ${B(t.segmentedPaddingHorizontalSM)}`
382
- },
383
- [`${e}-item, ${e}-thumb`]: {
384
- borderRadius: t.borderRadiusXS
385
- }
386
- }
387
- }), rt(`&-disabled ${e}-item`, t)), rt(`${e}-item-disabled`, t)), {
388
- // transition effect when `appear-active`
389
- [`${e}-thumb-motion-appear-active`]: {
390
- transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,
391
- willChange: "transform, width"
392
- },
393
- [`&${e}-shape-round`]: {
394
- borderRadius: 9999,
395
- [`${e}-item, ${e}-thumb`]: {
396
- borderRadius: 9999
397
- }
398
- }
399
- })
400
- };
401
- }, ie = (t) => {
402
- const {
403
- colorTextLabel: e,
404
- colorText: n,
405
- colorFillSecondary: a,
406
- colorBgElevated: i,
407
- colorFill: r,
408
- lineWidthBold: f,
409
- colorBgLayout: h
410
- } = t;
411
- return {
412
- trackPadding: f,
413
- trackBg: h,
414
- itemColor: e,
415
- itemHoverColor: n,
416
- itemHoverBg: a,
417
- itemSelectedBg: i,
418
- itemActiveBg: r,
419
- itemSelectedColor: n
420
- };
421
- }, re = Tt("Segmented", (t) => {
422
- const {
423
- lineWidth: e,
424
- calc: n
425
- } = t, a = It(t, {
426
- segmentedPaddingHorizontal: n(t.controlPaddingHorizontal).sub(e).equal(),
427
- segmentedPaddingHorizontalSM: n(t.controlPaddingHorizontalSM).sub(e).equal()
428
- });
429
- return [oe(a)];
430
- }, ie);
431
- var st = function(t, e) {
432
- var n = {};
433
- for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && e.indexOf(a) < 0 && (n[a] = t[a]);
434
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, a = Object.getOwnPropertySymbols(t); i < a.length; i++)
435
- e.indexOf(a[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, a[i]) && (n[a[i]] = t[a[i]]);
436
- return n;
437
- };
438
- function le(t) {
439
- return typeof t == "object" && !!(t != null && t.icon);
440
- }
441
- const se = /* @__PURE__ */ o.forwardRef((t, e) => {
442
- const n = Dt(), {
443
- prefixCls: a,
444
- className: i,
445
- rootClassName: r,
446
- block: f,
447
- options: h = [],
448
- size: b = "middle",
449
- style: S,
450
- vertical: l,
451
- shape: w = "default",
452
- name: C = n
453
- } = t, y = st(t, ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical", "shape", "name"]), {
454
- getPrefixCls: v,
455
- direction: R,
456
- className: N,
457
- style: D
458
- } = Ht("segmented"), g = v("segmented", a), [s, E, I] = re(g), x = Bt(b), u = o.useMemo(() => h.map((O) => {
459
- if (le(O)) {
460
- const {
461
- icon: V,
462
- label: H
463
- } = O, z = st(O, ["icon", "label"]);
464
- return Object.assign(Object.assign({}, z), {
465
- label: /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
466
- className: `${g}-item-icon`
467
- }, V), H && /* @__PURE__ */ o.createElement("span", null, H))
468
- });
469
- }
470
- return O;
471
- }), [h, g]), M = X(i, r, N, {
472
- [`${g}-block`]: f,
473
- [`${g}-sm`]: x === "small",
474
- [`${g}-lg`]: x === "large",
475
- [`${g}-vertical`]: l,
476
- [`${g}-shape-${w}`]: w === "round"
477
- }, E, I), $ = Object.assign(Object.assign({}, D), S);
478
- return s(/* @__PURE__ */ o.createElement(ae, Object.assign({}, y, {
479
- name: C,
480
- className: M,
481
- style: $,
482
- options: u,
483
- ref: e,
484
- prefixCls: g,
485
- direction: R,
486
- vertical: l
487
- })));
488
- }), mt = se;
489
- process.env.NODE_ENV !== "production" && (mt.displayName = "Segmented");
490
- var ce = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" } }] }, name: "redo", theme: "outlined" };
491
- function Y() {
492
- return Y = Object.assign ? Object.assign.bind() : function(t) {
493
- for (var e = 1; e < arguments.length; e++) {
494
- var n = arguments[e];
495
- for (var a in n)
496
- Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
497
- }
498
- return t;
499
- }, Y.apply(this, arguments);
500
- }
501
- const ue = (t, e) => /* @__PURE__ */ o.createElement(Pt, Y({}, t, {
502
- ref: e,
503
- icon: ce
504
- })), ht = /* @__PURE__ */ o.forwardRef(ue);
505
- process.env.NODE_ENV !== "production" && (ht.displayName = "RedoOutlined");
506
- const de = ({
507
- datePickerComponent: t,
508
- searchText: e,
509
- noDateText: n,
510
- emptyText: a,
511
- searchSelect: i,
512
- radioOptions: r,
513
- searchOptions: f,
514
- searchType: h,
515
- textSearchValue: b = "",
516
- dateSearchValue: S,
517
- numberSearchValue: l,
518
- multiselectSearchValue: w,
519
- multiselectOptions: C,
520
- onChangeSearch: y,
521
- onChangeTextSearch: v,
522
- onChangeRadioSearch: R,
523
- onChangeDateSearch: N,
524
- onChangeNumberSearch: D,
525
- onChangeMultiselectSearch: g
526
- }) => {
527
- const [s, E] = Ut(b), {
528
- token: { borderRadius: I, colorBgBase: x, paddingXXS: u }
529
- } = Ot.useToken(), { isMobileMaxWidth: M } = jt(), { isSmallMaxWidth: $ } = Nt(), O = _t(() => $ ? 2 : M ? 5 : 15, [M, $]);
530
- Et(
531
- () => {
532
- v == null || v(s);
533
- },
534
- qt.milliseconds.milliseconds500,
535
- [s]
536
- );
537
- const V = () => {
538
- E("");
539
- }, H = (m) => {
540
- y(m), V();
541
- }, z = (m) => {
542
- E(m.target.value.replace(/"/g, ""));
543
- }, c = (m) => {
544
- N == null || N(m);
545
- }, j = (m) => {
546
- !m && m !== 0 || D == null || D(+m);
547
- };
548
- return /* @__PURE__ */ d.jsxs(
549
- K,
550
- {
551
- className: W.flex,
552
- gap: "small",
553
- style: {
554
- padding: u,
555
- borderRadius: I,
556
- background: x
557
- },
558
- children: [
559
- /* @__PURE__ */ d.jsx(
560
- G,
561
- {
562
- defaultValue: i,
563
- value: i,
564
- style: { width: 120, minWidth: 120 },
565
- options: f,
566
- onChange: H
567
- }
568
- ),
569
- {
570
- text: /* @__PURE__ */ d.jsx(Mt, { placeholder: e, value: s, allowClear: !0, onChange: z }),
571
- radio: /* @__PURE__ */ d.jsx(
572
- mt,
573
- {
574
- options: r,
575
- defaultValue: Rt,
576
- onChange: R
577
- }
578
- ),
579
- date: Gt(t, {
580
- noDateText: n,
581
- currentValue: S ?? "",
582
- onChangeDate: c
583
- }),
584
- number: /* @__PURE__ */ d.jsx(
585
- kt,
586
- {
587
- emptyText: a,
588
- value: l,
589
- placeholder: e,
590
- min: 0,
591
- max: 2147483647,
592
- onChange: j
593
- }
594
- ),
595
- multiselect: /* @__PURE__ */ d.jsx(
596
- G,
597
- {
598
- className: W.select,
599
- mode: "multiple",
600
- placeholder: e,
601
- maxTagCount: 1,
602
- maxTagTextLength: O,
603
- showSearch: !1,
604
- allowClear: !0,
605
- options: C,
606
- value: w,
607
- onChange: g
608
- }
609
- )
610
- }[h]
611
- ]
612
- }
613
- );
614
- }, ge = ({
615
- sortTooltipText: t,
616
- updateDataText: e,
617
- refreshText: n,
618
- createText: a,
619
- createNewElementText: i,
620
- order: r,
621
- orderOptions: f,
622
- createButtonTooltip: h,
623
- searchProps: b,
624
- isCanCreate: S,
625
- isHiddenCreate: l,
626
- onCreate: w,
627
- onRefetch: C,
628
- onChangeOrder: y
629
- }) => /* @__PURE__ */ d.jsxs(
630
- K,
631
- {
632
- gap: "middle",
633
- justify: "space-between",
634
- wrap: "wrap",
635
- style: {
636
- marginBottom: Ct.OFFSET[1]
637
- },
638
- children: [
639
- /* @__PURE__ */ d.jsxs(K, { align: "center", gap: "middle", wrap: "wrap", children: [
640
- /* @__PURE__ */ d.jsx(de, { ...b }),
641
- /* @__PURE__ */ d.jsx(_, { title: t, children: /* @__PURE__ */ d.jsx(
642
- G,
643
- {
644
- className: W.sort,
645
- value: r,
646
- options: f,
647
- onChange: y
648
- }
649
- ) })
650
- ] }),
651
- /* @__PURE__ */ d.jsxs(K, { className: W.buttonsContainer, gap: "small", align: "center", children: [
652
- C && /* @__PURE__ */ d.jsx(_, { title: e, children: /* @__PURE__ */ d.jsx(nt, { className: W.button, icon: /* @__PURE__ */ d.jsx(ht, {}), onClick: C, children: n }) }),
653
- !l && S && /* @__PURE__ */ d.jsx(_, { title: h ?? i, children: /* @__PURE__ */ d.jsx(
654
- nt,
655
- {
656
- className: W.button,
657
- type: "primary",
658
- icon: /* @__PURE__ */ d.jsx(yt, {}),
659
- onClick: w,
660
- children: a
661
- }
662
- ) })
663
- ] })
664
- ]
665
- }
666
- );
667
- export {
668
- ge as TableHead
669
- };