@easyvision/easyvision-ui 1.3.8 → 1.4.0
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/EasyVisionTable.css +394 -0
- package/dist/easyvision.css +1343 -1
- package/dist/index.cjs +305 -496
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +305 -493
- package/dist/index.js.map +1 -1
- package/package.json +3 -7
- package/dist/EasyVisionTable.module-OTJHTKCW.module.css +0 -27
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./easyvision.css');
|
|
4
|
+
require('./EasyVisionTable.css');
|
|
4
5
|
var React8 = require('react');
|
|
5
6
|
var lucideReact = require('lucide-react');
|
|
6
7
|
var clsx = require('clsx');
|
|
@@ -17,12 +18,9 @@ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
|
17
18
|
var dateFns = require('date-fns');
|
|
18
19
|
var locale = require('date-fns/locale');
|
|
19
20
|
var reactDayPicker = require('react-day-picker');
|
|
20
|
-
var styles = require('./EasyVisionTable.module-OTJHTKCW.module.css');
|
|
21
21
|
var reactTable = require('@tanstack/react-table');
|
|
22
22
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
23
23
|
|
|
24
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
|
-
|
|
26
24
|
function _interopNamespace(e) {
|
|
27
25
|
if (e && e.__esModule) return e;
|
|
28
26
|
var n = Object.create(null);
|
|
@@ -45,7 +43,6 @@ var React8__namespace = /*#__PURE__*/_interopNamespace(React8);
|
|
|
45
43
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
46
44
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
47
45
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
48
|
-
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
49
46
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
50
47
|
|
|
51
48
|
// index.ts
|
|
@@ -58,10 +55,7 @@ var Input = React8__namespace.forwardRef(
|
|
|
58
55
|
"input",
|
|
59
56
|
{
|
|
60
57
|
type,
|
|
61
|
-
className: cn(
|
|
62
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
63
|
-
className
|
|
64
|
-
),
|
|
58
|
+
className: cn("ev-input", className),
|
|
65
59
|
ref,
|
|
66
60
|
...props
|
|
67
61
|
}
|
|
@@ -218,34 +212,47 @@ function EasyVisionInput({
|
|
|
218
212
|
}
|
|
219
213
|
}, [debounced, onChange]);
|
|
220
214
|
const isInvalid = mandatory && slice.value.trim().length === 0;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
215
|
+
const hasIcon = icon === "search";
|
|
216
|
+
const hasClear = Boolean(showClearButton && slice.value && !disabled);
|
|
217
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
218
|
+
"div",
|
|
219
|
+
{
|
|
220
|
+
className: [
|
|
221
|
+
"ev-input-comp",
|
|
222
|
+
hasIcon ? "has-icon" : "",
|
|
223
|
+
hasClear ? "has-clear" : "",
|
|
224
|
+
className ?? ""
|
|
225
|
+
].filter(Boolean).join(" "),
|
|
226
|
+
children: [
|
|
227
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-input-comp-label", children: [
|
|
228
|
+
label,
|
|
229
|
+
mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-input-comp-required", children: "*" })
|
|
230
|
+
] }),
|
|
231
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-input-comp-wrap", children: [
|
|
232
|
+
hasIcon && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "ev-input-comp-icon" }),
|
|
233
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
234
|
+
Input,
|
|
235
|
+
{
|
|
236
|
+
className: isInvalid ? "is-invalid" : void 0,
|
|
237
|
+
placeholder,
|
|
238
|
+
value: slice.value,
|
|
239
|
+
onChange: (e) => patch({ value: e.target.value }),
|
|
240
|
+
disabled
|
|
241
|
+
}
|
|
242
|
+
),
|
|
243
|
+
hasClear && /* @__PURE__ */ jsxRuntime.jsx(
|
|
244
|
+
"button",
|
|
245
|
+
{
|
|
246
|
+
type: "button",
|
|
247
|
+
onClick: () => patch({ value: "" }),
|
|
248
|
+
className: "ev-input-comp-clear",
|
|
249
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
] })
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
);
|
|
249
256
|
}
|
|
250
257
|
var Select = SelectPrimitive__namespace.Root;
|
|
251
258
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
@@ -253,14 +260,11 @@ var SelectTrigger = React8__namespace.forwardRef(({ className, children, ...prop
|
|
|
253
260
|
SelectPrimitive__namespace.Trigger,
|
|
254
261
|
{
|
|
255
262
|
ref,
|
|
256
|
-
className: cn(
|
|
257
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
258
|
-
className
|
|
259
|
-
),
|
|
263
|
+
className: cn("ev-select-trigger", className),
|
|
260
264
|
...props,
|
|
261
265
|
children: [
|
|
262
266
|
children,
|
|
263
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "
|
|
267
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "ev-select-trigger-icon" }) })
|
|
264
268
|
]
|
|
265
269
|
}
|
|
266
270
|
));
|
|
@@ -269,12 +273,9 @@ var SelectScrollUpButton = React8__namespace.forwardRef(({ className, ...props }
|
|
|
269
273
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
270
274
|
{
|
|
271
275
|
ref,
|
|
272
|
-
className: cn(
|
|
273
|
-
"flex cursor-default items-center justify-center py-1",
|
|
274
|
-
className
|
|
275
|
-
),
|
|
276
|
+
className: cn("ev-select-scroll-button", className),
|
|
276
277
|
...props,
|
|
277
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, {
|
|
278
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, {})
|
|
278
279
|
}
|
|
279
280
|
));
|
|
280
281
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
@@ -282,12 +283,9 @@ var SelectScrollDownButton = React8__namespace.forwardRef(({ className, ...props
|
|
|
282
283
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
283
284
|
{
|
|
284
285
|
ref,
|
|
285
|
-
className: cn(
|
|
286
|
-
"flex cursor-default items-center justify-center py-1",
|
|
287
|
-
className
|
|
288
|
-
),
|
|
286
|
+
className: cn("ev-select-scroll-button", className),
|
|
289
287
|
...props,
|
|
290
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {
|
|
288
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {})
|
|
291
289
|
}
|
|
292
290
|
));
|
|
293
291
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
@@ -295,11 +293,7 @@ var SelectContent = React8__namespace.forwardRef(({ className, children, positio
|
|
|
295
293
|
SelectPrimitive__namespace.Content,
|
|
296
294
|
{
|
|
297
295
|
ref,
|
|
298
|
-
className: cn(
|
|
299
|
-
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
|
|
300
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
301
|
-
className
|
|
302
|
-
),
|
|
296
|
+
className: cn("ev-select-content", className),
|
|
303
297
|
position,
|
|
304
298
|
...props,
|
|
305
299
|
children: [
|
|
@@ -308,8 +302,8 @@ var SelectContent = React8__namespace.forwardRef(({ className, children, positio
|
|
|
308
302
|
SelectPrimitive__namespace.Viewport,
|
|
309
303
|
{
|
|
310
304
|
className: cn(
|
|
311
|
-
"
|
|
312
|
-
position === "popper" && "
|
|
305
|
+
"ev-select-viewport",
|
|
306
|
+
position === "popper" && "ev-select-viewport-popper"
|
|
313
307
|
),
|
|
314
308
|
children
|
|
315
309
|
}
|
|
@@ -323,7 +317,7 @@ var SelectLabel = React8__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
323
317
|
SelectPrimitive__namespace.Label,
|
|
324
318
|
{
|
|
325
319
|
ref,
|
|
326
|
-
className: cn("
|
|
320
|
+
className: cn("ev-select-label", className),
|
|
327
321
|
...props
|
|
328
322
|
}
|
|
329
323
|
));
|
|
@@ -332,13 +326,10 @@ var SelectItem = React8__namespace.forwardRef(({ className, children, ...props }
|
|
|
332
326
|
SelectPrimitive__namespace.Item,
|
|
333
327
|
{
|
|
334
328
|
ref,
|
|
335
|
-
className: cn(
|
|
336
|
-
"relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
337
|
-
className
|
|
338
|
-
),
|
|
329
|
+
className: cn("ev-select-item", className),
|
|
339
330
|
...props,
|
|
340
331
|
children: [
|
|
341
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-select-item-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) }) }),
|
|
342
333
|
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
343
334
|
]
|
|
344
335
|
}
|
|
@@ -348,36 +339,33 @@ var SelectSeparator = React8__namespace.forwardRef(({ className, ...props }, ref
|
|
|
348
339
|
SelectPrimitive__namespace.Separator,
|
|
349
340
|
{
|
|
350
341
|
ref,
|
|
351
|
-
className: cn("-
|
|
342
|
+
className: cn("ev-select-separator", className),
|
|
352
343
|
...props
|
|
353
344
|
}
|
|
354
345
|
));
|
|
355
346
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
356
|
-
var buttonVariants = classVarianceAuthority.cva(
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
366
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
367
|
-
},
|
|
368
|
-
size: {
|
|
369
|
-
default: "h-10 px-4 py-2",
|
|
370
|
-
sm: "h-9 rounded-md px-3",
|
|
371
|
-
lg: "h-11 rounded-md px-8",
|
|
372
|
-
icon: "h-10 w-10"
|
|
373
|
-
}
|
|
347
|
+
var buttonVariants = classVarianceAuthority.cva("ev-btn", {
|
|
348
|
+
variants: {
|
|
349
|
+
variant: {
|
|
350
|
+
default: "ev-btn-default",
|
|
351
|
+
destructive: "ev-btn-destructive",
|
|
352
|
+
outline: "ev-btn-outline",
|
|
353
|
+
secondary: "ev-btn-secondary",
|
|
354
|
+
ghost: "ev-btn-ghost",
|
|
355
|
+
link: "ev-btn-link"
|
|
374
356
|
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
357
|
+
size: {
|
|
358
|
+
default: "ev-btn-size-default",
|
|
359
|
+
sm: "ev-btn-size-sm",
|
|
360
|
+
lg: "ev-btn-size-lg",
|
|
361
|
+
icon: "ev-btn-size-icon"
|
|
378
362
|
}
|
|
363
|
+
},
|
|
364
|
+
defaultVariants: {
|
|
365
|
+
variant: "default",
|
|
366
|
+
size: "default"
|
|
379
367
|
}
|
|
380
|
-
);
|
|
368
|
+
});
|
|
381
369
|
var Button = React8__namespace.forwardRef(
|
|
382
370
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
383
371
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
@@ -400,10 +388,7 @@ var PopoverContent = React8__namespace.forwardRef(({ className, align = "center"
|
|
|
400
388
|
ref,
|
|
401
389
|
align,
|
|
402
390
|
sideOffset,
|
|
403
|
-
className: cn(
|
|
404
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
|
|
405
|
-
className
|
|
406
|
-
),
|
|
391
|
+
className: cn("ev-popover-content", className),
|
|
407
392
|
...props
|
|
408
393
|
}
|
|
409
394
|
) }));
|
|
@@ -412,24 +397,18 @@ var Command = React8__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
412
397
|
cmdk.Command,
|
|
413
398
|
{
|
|
414
399
|
ref,
|
|
415
|
-
className: cn(
|
|
416
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
417
|
-
className
|
|
418
|
-
),
|
|
400
|
+
className: cn("ev-cmd", className),
|
|
419
401
|
...props
|
|
420
402
|
}
|
|
421
403
|
));
|
|
422
404
|
Command.displayName = cmdk.Command.displayName;
|
|
423
|
-
var CommandInput = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
424
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.MagnifyingGlassIcon, { className: "
|
|
405
|
+
var CommandInput = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-cmd-input-wrapper", "cmdk-input-wrapper": "", children: [
|
|
406
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.MagnifyingGlassIcon, { className: "ev-cmd-input-icon" }),
|
|
425
407
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
426
408
|
cmdk.Command.Input,
|
|
427
409
|
{
|
|
428
410
|
ref,
|
|
429
|
-
className: cn(
|
|
430
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
431
|
-
className
|
|
432
|
-
),
|
|
411
|
+
className: cn("ev-cmd-input", className),
|
|
433
412
|
...props
|
|
434
413
|
}
|
|
435
414
|
)
|
|
@@ -439,7 +418,7 @@ var CommandList = React8__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
439
418
|
cmdk.Command.List,
|
|
440
419
|
{
|
|
441
420
|
ref,
|
|
442
|
-
className: cn("
|
|
421
|
+
className: cn("ev-cmd-list", className),
|
|
443
422
|
...props
|
|
444
423
|
}
|
|
445
424
|
));
|
|
@@ -448,7 +427,7 @@ var CommandEmpty = React8__namespace.forwardRef((props, ref) => /* @__PURE__ */
|
|
|
448
427
|
cmdk.Command.Empty,
|
|
449
428
|
{
|
|
450
429
|
ref,
|
|
451
|
-
className: "
|
|
430
|
+
className: "ev-cmd-empty",
|
|
452
431
|
...props
|
|
453
432
|
}
|
|
454
433
|
));
|
|
@@ -457,10 +436,7 @@ var CommandGroup = React8__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
457
436
|
cmdk.Command.Group,
|
|
458
437
|
{
|
|
459
438
|
ref,
|
|
460
|
-
className: cn(
|
|
461
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
462
|
-
className
|
|
463
|
-
),
|
|
439
|
+
className: cn("ev-cmd-group", className),
|
|
464
440
|
...props
|
|
465
441
|
}
|
|
466
442
|
));
|
|
@@ -469,7 +445,7 @@ var CommandSeparator = React8__namespace.forwardRef(({ className, ...props }, re
|
|
|
469
445
|
cmdk.Command.Separator,
|
|
470
446
|
{
|
|
471
447
|
ref,
|
|
472
|
-
className: cn("-
|
|
448
|
+
className: cn("ev-cmd-separator", className),
|
|
473
449
|
...props
|
|
474
450
|
}
|
|
475
451
|
));
|
|
@@ -478,10 +454,7 @@ var CommandItem = React8__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
478
454
|
cmdk.Command.Item,
|
|
479
455
|
{
|
|
480
456
|
ref,
|
|
481
|
-
className: cn(
|
|
482
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
|
483
|
-
className
|
|
484
|
-
),
|
|
457
|
+
className: cn("ev-cmd-item", className),
|
|
485
458
|
...props
|
|
486
459
|
}
|
|
487
460
|
));
|
|
@@ -533,13 +506,16 @@ function EasyVisionSelector({
|
|
|
533
506
|
}, [value, onChange]);
|
|
534
507
|
const isInvalid = mandatory && (value === void 0 || value === "");
|
|
535
508
|
const commit = (v) => patch({ value: v });
|
|
536
|
-
const
|
|
509
|
+
const triggerExtraClasses = [
|
|
510
|
+
isInvalid ? "ev-selector-trigger-invalid" : "",
|
|
511
|
+
className ?? ""
|
|
512
|
+
].filter(Boolean).join(" ");
|
|
537
513
|
if (searchable) {
|
|
538
514
|
const labelOf = (v) => opts.find((o) => o.value === v)?.label ?? "";
|
|
539
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
540
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
515
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-selector", children: [
|
|
516
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-selector-label", children: [
|
|
541
517
|
label,
|
|
542
|
-
mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
518
|
+
mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-selector-required", children: "*" })
|
|
543
519
|
] }),
|
|
544
520
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
545
521
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -548,14 +524,14 @@ function EasyVisionSelector({
|
|
|
548
524
|
variant: "outline",
|
|
549
525
|
role: "combobox",
|
|
550
526
|
disabled,
|
|
551
|
-
className:
|
|
527
|
+
className: ["ev-selector-combo-trigger", triggerExtraClasses].filter(Boolean).join(" "),
|
|
552
528
|
children: [
|
|
553
|
-
value !== void 0 && value !== "" ? labelOf(value) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
554
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "
|
|
529
|
+
value !== void 0 && value !== "" ? labelOf(value) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-selector-combo-placeholder", children: placeholder }),
|
|
530
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "ev-selector-combo-icon" })
|
|
555
531
|
]
|
|
556
532
|
}
|
|
557
533
|
) }),
|
|
558
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "
|
|
534
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "ev-selector-combo-popover", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
559
535
|
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: "Buscar..." }),
|
|
560
536
|
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
561
537
|
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "Sin resultados" }),
|
|
@@ -565,7 +541,7 @@ function EasyVisionSelector({
|
|
|
565
541
|
value: o.label,
|
|
566
542
|
onSelect: () => commit(o.value),
|
|
567
543
|
children: [
|
|
568
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className:
|
|
544
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: ["ev-selector-item-check", value === o.value ? "" : "is-hidden"].filter(Boolean).join(" ") }),
|
|
569
545
|
o.label
|
|
570
546
|
]
|
|
571
547
|
},
|
|
@@ -588,14 +564,14 @@ function EasyVisionSelector({
|
|
|
588
564
|
if (confirmMode) setPending(next);
|
|
589
565
|
else commit(next);
|
|
590
566
|
};
|
|
591
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
592
|
-
label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
567
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-selector", children: [
|
|
568
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-selector-label", children: [
|
|
593
569
|
label,
|
|
594
|
-
mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
570
|
+
mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-selector-required", children: "*" })
|
|
595
571
|
] }),
|
|
596
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
572
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-selector-row", children: [
|
|
597
573
|
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: selectValue, onValueChange, disabled, children: [
|
|
598
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className:
|
|
574
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: triggerExtraClasses || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder }) }),
|
|
599
575
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: opts.map((o) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
|
|
600
576
|
] }),
|
|
601
577
|
!mandatory && value !== void 0 && value !== "" && !disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -603,9 +579,9 @@ function EasyVisionSelector({
|
|
|
603
579
|
{
|
|
604
580
|
type: "button",
|
|
605
581
|
onClick: () => confirmMode ? setPending(void 0) : commit(void 0),
|
|
606
|
-
className: "
|
|
582
|
+
className: "ev-selector-clear",
|
|
607
583
|
"aria-label": "Limpiar",
|
|
608
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
584
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
609
585
|
}
|
|
610
586
|
),
|
|
611
587
|
confirmMode && pending !== value && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: () => commit(pending), children: confirmLabel })
|
|
@@ -613,16 +589,16 @@ function EasyVisionSelector({
|
|
|
613
589
|
] });
|
|
614
590
|
}
|
|
615
591
|
function TextWidget({ definition, value, onChange, onRemove }) {
|
|
616
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
617
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
592
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-chip", children: [
|
|
593
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
618
594
|
definition.label,
|
|
619
|
-
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
595
|
+
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
620
596
|
":"
|
|
621
597
|
] }),
|
|
622
598
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
623
599
|
Input,
|
|
624
600
|
{
|
|
625
|
-
className: "
|
|
601
|
+
className: "ev-mf-chip-input",
|
|
626
602
|
placeholder: definition.placeholder,
|
|
627
603
|
value: value ?? "",
|
|
628
604
|
onChange: (e) => onChange(e.target.value)
|
|
@@ -633,8 +609,8 @@ function TextWidget({ definition, value, onChange, onRemove }) {
|
|
|
633
609
|
{
|
|
634
610
|
type: "button",
|
|
635
611
|
onClick: onRemove,
|
|
636
|
-
className: "
|
|
637
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
612
|
+
className: "ev-mf-chip-remove",
|
|
613
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
638
614
|
}
|
|
639
615
|
)
|
|
640
616
|
] });
|
|
@@ -653,10 +629,10 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
653
629
|
}, [definition.options, resolved]);
|
|
654
630
|
const opts = resolved ?? [];
|
|
655
631
|
const selectValue = value === void 0 || value === "" ? SENTINEL : String(value);
|
|
656
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
657
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
632
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-chip", children: [
|
|
633
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
658
634
|
definition.label,
|
|
659
|
-
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
635
|
+
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
660
636
|
":"
|
|
661
637
|
] }),
|
|
662
638
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -671,7 +647,7 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
671
647
|
}
|
|
672
648
|
},
|
|
673
649
|
children: [
|
|
674
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "
|
|
650
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "ev-mf-chip-select-trigger", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: definition.placeholder ?? "Seleccionar" }) }),
|
|
675
651
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: opts.map((o) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
|
|
676
652
|
]
|
|
677
653
|
}
|
|
@@ -681,8 +657,8 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
681
657
|
{
|
|
682
658
|
type: "button",
|
|
683
659
|
onClick: onRemove,
|
|
684
|
-
className: "
|
|
685
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
660
|
+
className: "ev-mf-chip-remove",
|
|
661
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
686
662
|
}
|
|
687
663
|
)
|
|
688
664
|
] });
|
|
@@ -691,18 +667,9 @@ var Checkbox = React8__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
691
667
|
CheckboxPrimitive__namespace.Root,
|
|
692
668
|
{
|
|
693
669
|
ref,
|
|
694
|
-
className: cn(
|
|
695
|
-
"peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground flex items-center justify-center",
|
|
696
|
-
className
|
|
697
|
-
),
|
|
670
|
+
className: cn("ev-checkbox", className),
|
|
698
671
|
...props,
|
|
699
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
700
|
-
CheckboxPrimitive__namespace.Indicator,
|
|
701
|
-
{
|
|
702
|
-
className: cn("flex items-center justify-center text-current w-full h-full"),
|
|
703
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3 w-3" })
|
|
704
|
-
}
|
|
705
|
-
)
|
|
672
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: "ev-checkbox-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) })
|
|
706
673
|
}
|
|
707
674
|
));
|
|
708
675
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
@@ -734,69 +701,48 @@ function MultiSelectWidget({
|
|
|
734
701
|
};
|
|
735
702
|
const removeOne = (v) => onChange(selected.filter((x) => x !== v));
|
|
736
703
|
const labelOf = (v) => opts.find((o) => o.value === v)?.label ?? String(v);
|
|
737
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
738
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
704
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-chip is-wrap", children: [
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
739
706
|
definition.label,
|
|
740
|
-
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
707
|
+
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
741
708
|
":"
|
|
742
709
|
] }),
|
|
743
|
-
selected.map((v) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
className: "inline-flex items-center gap-1 bg-primary/10 text-primary text-xs px-2 py-0.5 rounded-md",
|
|
747
|
-
children: [
|
|
748
|
-
labelOf(v),
|
|
749
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
750
|
-
"button",
|
|
751
|
-
{
|
|
752
|
-
type: "button",
|
|
753
|
-
onClick: () => removeOne(v),
|
|
754
|
-
className: "p-0.5 hover:bg-muted rounded",
|
|
755
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
|
|
756
|
-
}
|
|
757
|
-
)
|
|
758
|
-
]
|
|
759
|
-
},
|
|
760
|
-
String(v)
|
|
761
|
-
)),
|
|
762
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
763
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
710
|
+
selected.map((v) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-mf-chip-badge", children: [
|
|
711
|
+
labelOf(v),
|
|
712
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
764
713
|
"button",
|
|
765
714
|
{
|
|
766
715
|
type: "button",
|
|
767
|
-
|
|
768
|
-
|
|
716
|
+
onClick: () => removeOne(v),
|
|
717
|
+
className: "ev-mf-chip-badge-x",
|
|
718
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
769
719
|
}
|
|
770
|
-
)
|
|
771
|
-
|
|
720
|
+
)
|
|
721
|
+
] }, String(v))),
|
|
722
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
723
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "ev-mf-chip-caret", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {}) }) }),
|
|
724
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { className: "ev-mf-ms-popover", align: "start", children: [
|
|
772
725
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
773
726
|
Input,
|
|
774
727
|
{
|
|
775
|
-
className: "
|
|
728
|
+
className: "ev-mf-ms-search",
|
|
776
729
|
placeholder: "Buscar...",
|
|
777
730
|
value: search,
|
|
778
731
|
onChange: (e) => setSearch(e.target.value)
|
|
779
732
|
}
|
|
780
733
|
),
|
|
781
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
782
|
-
filtered.map((o) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
),
|
|
794
|
-
o.label
|
|
795
|
-
]
|
|
796
|
-
},
|
|
797
|
-
String(o.value)
|
|
798
|
-
)),
|
|
799
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: "Sin opciones" })
|
|
734
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-ms-list", children: [
|
|
735
|
+
filtered.map((o) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "ev-mf-ms-option", children: [
|
|
736
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
737
|
+
Checkbox,
|
|
738
|
+
{
|
|
739
|
+
checked: selected.includes(o.value),
|
|
740
|
+
onCheckedChange: () => toggle(o.value)
|
|
741
|
+
}
|
|
742
|
+
),
|
|
743
|
+
o.label
|
|
744
|
+
] }, String(o.value))),
|
|
745
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ev-mf-ms-empty", children: "Sin opciones" })
|
|
800
746
|
] })
|
|
801
747
|
] })
|
|
802
748
|
] }),
|
|
@@ -805,8 +751,8 @@ function MultiSelectWidget({
|
|
|
805
751
|
{
|
|
806
752
|
type: "button",
|
|
807
753
|
onClick: onRemove,
|
|
808
|
-
className: "
|
|
809
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
754
|
+
className: "ev-mf-chip-remove",
|
|
755
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
810
756
|
}
|
|
811
757
|
)
|
|
812
758
|
] });
|
|
@@ -821,40 +767,37 @@ function Calendar({
|
|
|
821
767
|
reactDayPicker.DayPicker,
|
|
822
768
|
{
|
|
823
769
|
showOutsideDays,
|
|
824
|
-
className: cn("
|
|
770
|
+
className: cn("ev-cal", className),
|
|
825
771
|
classNames: {
|
|
826
|
-
months: "
|
|
827
|
-
month: "
|
|
828
|
-
caption: "
|
|
829
|
-
caption_label: "
|
|
830
|
-
nav: "
|
|
772
|
+
months: "ev-cal-months",
|
|
773
|
+
month: "ev-cal-month",
|
|
774
|
+
caption: "ev-cal-caption",
|
|
775
|
+
caption_label: "ev-cal-caption-label",
|
|
776
|
+
nav: "ev-cal-nav",
|
|
831
777
|
nav_button: cn(
|
|
832
778
|
buttonVariants({ variant: "outline" }),
|
|
833
|
-
"
|
|
834
|
-
),
|
|
835
|
-
nav_button_previous: "absolute left-1",
|
|
836
|
-
nav_button_next: "absolute right-1",
|
|
837
|
-
table: "w-full border-collapse space-y-1",
|
|
838
|
-
head_row: "flex",
|
|
839
|
-
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
840
|
-
row: "flex w-full mt-2",
|
|
841
|
-
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
842
|
-
day: cn(
|
|
843
|
-
buttonVariants({ variant: "ghost" }),
|
|
844
|
-
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
779
|
+
"ev-cal-nav-button"
|
|
845
780
|
),
|
|
781
|
+
nav_button_previous: "ev-cal-nav-button-previous",
|
|
782
|
+
nav_button_next: "ev-cal-nav-button-next",
|
|
783
|
+
table: "ev-cal-table",
|
|
784
|
+
head_row: "ev-cal-head-row",
|
|
785
|
+
head_cell: "ev-cal-head-cell",
|
|
786
|
+
row: "ev-cal-row",
|
|
787
|
+
cell: "ev-cal-cell",
|
|
788
|
+
day: cn(buttonVariants({ variant: "ghost" }), "ev-cal-day"),
|
|
846
789
|
day_range_end: "day-range-end",
|
|
847
|
-
day_selected: "
|
|
848
|
-
day_today: "
|
|
849
|
-
day_outside: "day-outside
|
|
850
|
-
day_disabled: "
|
|
851
|
-
day_range_middle: "
|
|
852
|
-
day_hidden: "
|
|
790
|
+
day_selected: "ev-cal-day-selected",
|
|
791
|
+
day_today: "ev-cal-day-today",
|
|
792
|
+
day_outside: "day-outside ev-cal-day-outside",
|
|
793
|
+
day_disabled: "ev-cal-day-disabled",
|
|
794
|
+
day_range_middle: "ev-cal-day-range-middle",
|
|
795
|
+
day_hidden: "ev-cal-day-hidden",
|
|
853
796
|
...classNames
|
|
854
797
|
},
|
|
855
798
|
components: {
|
|
856
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: cn("
|
|
857
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: cn("
|
|
799
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: cn("ev-cal-icon", className2), ...props2 }),
|
|
800
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: cn("ev-cal-icon", className2), ...props2 })
|
|
858
801
|
},
|
|
859
802
|
...props
|
|
860
803
|
}
|
|
@@ -876,25 +819,18 @@ function DateRangeWidget({
|
|
|
876
819
|
if (range.to) return `Hasta ${dateFns.format(range.to, "dd/MM/yy", { locale: locale.es })}`;
|
|
877
820
|
return definition.placeholder ?? "Seleccionar rango";
|
|
878
821
|
})();
|
|
879
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
880
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
822
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-chip", children: [
|
|
823
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
881
824
|
definition.label,
|
|
882
|
-
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
825
|
+
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
883
826
|
":"
|
|
884
827
|
] }),
|
|
885
828
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
886
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
887
|
-
|
|
888
|
-
{
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
children: [
|
|
892
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-3.5 w-3.5" }),
|
|
893
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
894
|
-
]
|
|
895
|
-
}
|
|
896
|
-
) }),
|
|
897
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
829
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "ev-mf-chip-trigger-btn", children: [
|
|
830
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, {}),
|
|
831
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
832
|
+
] }) }),
|
|
833
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "ev-mf-daterange-popover", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
898
834
|
Calendar,
|
|
899
835
|
{
|
|
900
836
|
mode: "range",
|
|
@@ -910,8 +846,8 @@ function DateRangeWidget({
|
|
|
910
846
|
{
|
|
911
847
|
type: "button",
|
|
912
848
|
onClick: onRemove,
|
|
913
|
-
className: "
|
|
914
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
849
|
+
className: "ev-mf-chip-remove",
|
|
850
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
915
851
|
}
|
|
916
852
|
)
|
|
917
853
|
] });
|
|
@@ -923,28 +859,28 @@ function NumberRangeWidget({
|
|
|
923
859
|
onRemove
|
|
924
860
|
}) {
|
|
925
861
|
const range = value ?? {};
|
|
926
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
927
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "
|
|
862
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-chip", children: [
|
|
863
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
928
864
|
definition.label,
|
|
929
|
-
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
865
|
+
definition.mandatory && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
930
866
|
":"
|
|
931
867
|
] }),
|
|
932
868
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
933
869
|
Input,
|
|
934
870
|
{
|
|
935
871
|
type: "number",
|
|
936
|
-
className: "
|
|
872
|
+
className: "ev-mf-chip-number",
|
|
937
873
|
placeholder: "Min",
|
|
938
874
|
value: range.min ?? "",
|
|
939
875
|
onChange: (e) => onChange({ ...range, min: e.target.value ? Number(e.target.value) : void 0 })
|
|
940
876
|
}
|
|
941
877
|
),
|
|
942
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
878
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-chip-dash", children: "\u2014" }),
|
|
943
879
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
944
880
|
Input,
|
|
945
881
|
{
|
|
946
882
|
type: "number",
|
|
947
|
-
className: "
|
|
883
|
+
className: "ev-mf-chip-number",
|
|
948
884
|
placeholder: "Max",
|
|
949
885
|
value: range.max ?? "",
|
|
950
886
|
onChange: (e) => onChange({ ...range, max: e.target.value ? Number(e.target.value) : void 0 })
|
|
@@ -955,8 +891,8 @@ function NumberRangeWidget({
|
|
|
955
891
|
{
|
|
956
892
|
type: "button",
|
|
957
893
|
onClick: onRemove,
|
|
958
|
-
className: "
|
|
959
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
894
|
+
className: "ev-mf-chip-remove",
|
|
895
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
960
896
|
}
|
|
961
897
|
)
|
|
962
898
|
] });
|
|
@@ -1428,37 +1364,30 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1428
1364
|
const renderField = (f) => {
|
|
1429
1365
|
if (f.type === "multifilter") {
|
|
1430
1366
|
const removable2 = editable && !f.pinned && !f.locked;
|
|
1431
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1432
|
-
"div",
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
labels: labelOverrides
|
|
1456
|
-
}
|
|
1457
|
-
)
|
|
1458
|
-
]
|
|
1459
|
-
},
|
|
1460
|
-
f.id
|
|
1461
|
-
);
|
|
1367
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-nested", children: [
|
|
1368
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-nested-header", children: [
|
|
1369
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-nested-label", children: f.label }),
|
|
1370
|
+
removable2 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1371
|
+
"button",
|
|
1372
|
+
{
|
|
1373
|
+
type: "button",
|
|
1374
|
+
onClick: () => removeField(f.id),
|
|
1375
|
+
className: "ev-mf-nested-remove",
|
|
1376
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
] }),
|
|
1380
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1381
|
+
EasyVisionMultifilter2,
|
|
1382
|
+
{
|
|
1383
|
+
id: f.id,
|
|
1384
|
+
config: f.config,
|
|
1385
|
+
editable,
|
|
1386
|
+
performButton: false,
|
|
1387
|
+
labels: labelOverrides
|
|
1388
|
+
}
|
|
1389
|
+
)
|
|
1390
|
+
] }, f.id);
|
|
1462
1391
|
}
|
|
1463
1392
|
const removable = editable && !f.pinned && !f.locked;
|
|
1464
1393
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1472,18 +1401,18 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1472
1401
|
f.id
|
|
1473
1402
|
);
|
|
1474
1403
|
};
|
|
1475
|
-
return /* @__PURE__ */ jsxRuntime.jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1476
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1404
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-panel", children: [
|
|
1405
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-row", children: [
|
|
1477
1406
|
prominentSlots.map(({ def, removable, isLegacySearchField }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1478
1407
|
"div",
|
|
1479
1408
|
{
|
|
1480
|
-
className: "
|
|
1409
|
+
className: "ev-mf-search-slot",
|
|
1481
1410
|
children: [
|
|
1482
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "
|
|
1411
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "ev-mf-search-icon" }),
|
|
1483
1412
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
|
-
|
|
1413
|
+
"input",
|
|
1485
1414
|
{
|
|
1486
|
-
className:
|
|
1415
|
+
className: ["ev-mf-search-input", removable ? "has-clear" : "no-clear"].filter(Boolean).join(" "),
|
|
1487
1416
|
placeholder: def.placeholder ?? def.label ?? labels.searchPlaceholder,
|
|
1488
1417
|
value: values[def.id] ?? "",
|
|
1489
1418
|
onChange: (e) => updateValue(def.id, e.target.value),
|
|
@@ -1500,8 +1429,8 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1500
1429
|
type: "button",
|
|
1501
1430
|
onClick: () => removeField(def.id),
|
|
1502
1431
|
"aria-label": labels.clear,
|
|
1503
|
-
className: "
|
|
1504
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
1432
|
+
className: "ev-mf-search-clear",
|
|
1433
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
1505
1434
|
}
|
|
1506
1435
|
)
|
|
1507
1436
|
]
|
|
@@ -1514,19 +1443,19 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1514
1443
|
{
|
|
1515
1444
|
variant: "outline",
|
|
1516
1445
|
size: "sm",
|
|
1517
|
-
className: "
|
|
1446
|
+
className: "ev-mf-add-btn",
|
|
1518
1447
|
"aria-label": labels.addFilter,
|
|
1519
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {
|
|
1448
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {})
|
|
1520
1449
|
}
|
|
1521
1450
|
) }),
|
|
1522
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "
|
|
1451
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "ev-mf-add-popover", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-add-list", children: availableToAdd.map((f) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1523
1452
|
"button",
|
|
1524
1453
|
{
|
|
1525
1454
|
type: "button",
|
|
1526
1455
|
onClick: () => addField(f.id),
|
|
1527
|
-
className: "
|
|
1456
|
+
className: "ev-mf-add-item",
|
|
1528
1457
|
children: [
|
|
1529
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {
|
|
1458
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {}),
|
|
1530
1459
|
f.label
|
|
1531
1460
|
]
|
|
1532
1461
|
},
|
|
@@ -1539,9 +1468,9 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1539
1468
|
size: "sm",
|
|
1540
1469
|
onClick: performAction,
|
|
1541
1470
|
disabled: !performEnabled,
|
|
1542
|
-
className: "
|
|
1471
|
+
className: "ev-mf-perform",
|
|
1543
1472
|
children: [
|
|
1544
|
-
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {
|
|
1473
|
+
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {}),
|
|
1545
1474
|
performLabelText
|
|
1546
1475
|
]
|
|
1547
1476
|
}
|
|
@@ -1552,25 +1481,25 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1552
1481
|
variant: "ghost",
|
|
1553
1482
|
size: "sm",
|
|
1554
1483
|
onClick: clearAll,
|
|
1555
|
-
className: "
|
|
1484
|
+
className: "ev-mf-clear",
|
|
1556
1485
|
children: [
|
|
1557
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
1486
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}),
|
|
1558
1487
|
labels.clear
|
|
1559
1488
|
]
|
|
1560
1489
|
}
|
|
1561
1490
|
)
|
|
1562
1491
|
] }),
|
|
1563
|
-
pinnedFields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
1564
|
-
chipFields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
1565
|
-
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
1492
|
+
pinnedFields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-row", children: pinnedFields.map(renderField) }),
|
|
1493
|
+
chipFields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-row", children: chipFields.map(renderField) }),
|
|
1494
|
+
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-below-row", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1566
1495
|
Button,
|
|
1567
1496
|
{
|
|
1568
1497
|
size: "sm",
|
|
1569
1498
|
onClick: performAction,
|
|
1570
1499
|
disabled: !performEnabled,
|
|
1571
|
-
className: "
|
|
1500
|
+
className: "ev-mf-perform",
|
|
1572
1501
|
children: [
|
|
1573
|
-
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {
|
|
1502
|
+
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {}),
|
|
1574
1503
|
performLabelText
|
|
1575
1504
|
]
|
|
1576
1505
|
}
|
|
@@ -1629,133 +1558,33 @@ function buildChildQueryDirect(field, values) {
|
|
|
1629
1558
|
return Object.keys(where).length > 0 ? { where } : {};
|
|
1630
1559
|
}
|
|
1631
1560
|
var join = (...parts) => parts.filter(Boolean).join(" ");
|
|
1632
|
-
var EasyVisionCard = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1633
|
-
"div",
|
|
1634
|
-
{
|
|
1635
|
-
ref,
|
|
1636
|
-
className: join(
|
|
1637
|
-
"rounded-md border border-border bg-card text-card-foreground shadow-sm",
|
|
1638
|
-
className
|
|
1639
|
-
),
|
|
1640
|
-
...props
|
|
1641
|
-
}
|
|
1642
|
-
));
|
|
1561
|
+
var EasyVisionCard = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card", className), ...props }));
|
|
1643
1562
|
EasyVisionCard.displayName = "EasyVisionCard";
|
|
1644
|
-
var EasyVisionCardHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1645
|
-
"div",
|
|
1646
|
-
{
|
|
1647
|
-
ref,
|
|
1648
|
-
className: join("flex flex-col space-y-1.5 p-6", className),
|
|
1649
|
-
...props
|
|
1650
|
-
}
|
|
1651
|
-
));
|
|
1563
|
+
var EasyVisionCardHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card-header", className), ...props }));
|
|
1652
1564
|
EasyVisionCardHeader.displayName = "EasyVisionCardHeader";
|
|
1653
|
-
var EasyVisionCardTitle = React8__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1654
|
-
"h3",
|
|
1655
|
-
{
|
|
1656
|
-
ref,
|
|
1657
|
-
className: join(
|
|
1658
|
-
"text-2xl font-semibold leading-none tracking-tight",
|
|
1659
|
-
className
|
|
1660
|
-
),
|
|
1661
|
-
...props,
|
|
1662
|
-
children
|
|
1663
|
-
}
|
|
1664
|
-
));
|
|
1565
|
+
var EasyVisionCardTitle = React8__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: join("ev-card-title", className), ...props, children }));
|
|
1665
1566
|
EasyVisionCardTitle.displayName = "EasyVisionCardTitle";
|
|
1666
|
-
var EasyVisionCardDescription = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1667
|
-
"p",
|
|
1668
|
-
{
|
|
1669
|
-
ref,
|
|
1670
|
-
className: join("text-sm text-muted-foreground", className),
|
|
1671
|
-
...props
|
|
1672
|
-
}
|
|
1673
|
-
));
|
|
1567
|
+
var EasyVisionCardDescription = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: join("ev-card-description", className), ...props }));
|
|
1674
1568
|
EasyVisionCardDescription.displayName = "EasyVisionCardDescription";
|
|
1675
|
-
var EasyVisionCardContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("
|
|
1569
|
+
var EasyVisionCardContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card-content", className), ...props }));
|
|
1676
1570
|
EasyVisionCardContent.displayName = "EasyVisionCardContent";
|
|
1677
|
-
var EasyVisionCardFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1678
|
-
"div",
|
|
1679
|
-
{
|
|
1680
|
-
ref,
|
|
1681
|
-
className: join("flex items-center p-6 pt-0", className),
|
|
1682
|
-
...props
|
|
1683
|
-
}
|
|
1684
|
-
));
|
|
1571
|
+
var EasyVisionCardFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card-footer", className), ...props }));
|
|
1685
1572
|
EasyVisionCardFooter.displayName = "EasyVisionCardFooter";
|
|
1686
|
-
var Table = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("
|
|
1687
|
-
"table",
|
|
1688
|
-
{
|
|
1689
|
-
ref,
|
|
1690
|
-
className: cn("w-full caption-bottom text-sm", className),
|
|
1691
|
-
...props
|
|
1692
|
-
}
|
|
1693
|
-
) }));
|
|
1573
|
+
var Table = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("ev-table", className), ...props }));
|
|
1694
1574
|
Table.displayName = "Table";
|
|
1695
|
-
var TableHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className
|
|
1575
|
+
var TableHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className, ...props }));
|
|
1696
1576
|
TableHeader.displayName = "TableHeader";
|
|
1697
|
-
var TableBody = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1698
|
-
"tbody",
|
|
1699
|
-
{
|
|
1700
|
-
ref,
|
|
1701
|
-
className: cn("[&_tr:last-child]:border-0", className),
|
|
1702
|
-
...props
|
|
1703
|
-
}
|
|
1704
|
-
));
|
|
1577
|
+
var TableBody = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className, ...props }));
|
|
1705
1578
|
TableBody.displayName = "TableBody";
|
|
1706
|
-
var TableFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1707
|
-
"tfoot",
|
|
1708
|
-
{
|
|
1709
|
-
ref,
|
|
1710
|
-
className: cn(
|
|
1711
|
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1712
|
-
className
|
|
1713
|
-
),
|
|
1714
|
-
...props
|
|
1715
|
-
}
|
|
1716
|
-
));
|
|
1579
|
+
var TableFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tfoot", { ref, className, ...props }));
|
|
1717
1580
|
TableFooter.displayName = "TableFooter";
|
|
1718
|
-
var TableRow = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1719
|
-
"tr",
|
|
1720
|
-
{
|
|
1721
|
-
ref,
|
|
1722
|
-
className: cn(
|
|
1723
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1724
|
-
className
|
|
1725
|
-
),
|
|
1726
|
-
...props
|
|
1727
|
-
}
|
|
1728
|
-
));
|
|
1581
|
+
var TableRow = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className, ...props }));
|
|
1729
1582
|
TableRow.displayName = "TableRow";
|
|
1730
|
-
var TableHead = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1731
|
-
"th",
|
|
1732
|
-
{
|
|
1733
|
-
ref,
|
|
1734
|
-
className: cn(
|
|
1735
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
1736
|
-
className
|
|
1737
|
-
),
|
|
1738
|
-
...props
|
|
1739
|
-
}
|
|
1740
|
-
));
|
|
1583
|
+
var TableHead = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("th", { ref, className, ...props }));
|
|
1741
1584
|
TableHead.displayName = "TableHead";
|
|
1742
|
-
var TableCell = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1743
|
-
"td",
|
|
1744
|
-
{
|
|
1745
|
-
ref,
|
|
1746
|
-
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
1747
|
-
...props
|
|
1748
|
-
}
|
|
1749
|
-
));
|
|
1585
|
+
var TableCell = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("td", { ref, className, ...props }));
|
|
1750
1586
|
TableCell.displayName = "TableCell";
|
|
1751
|
-
var TableCaption = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
|
-
"caption",
|
|
1753
|
-
{
|
|
1754
|
-
ref,
|
|
1755
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1756
|
-
...props
|
|
1757
|
-
}
|
|
1758
|
-
));
|
|
1587
|
+
var TableCaption = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className, ...props }));
|
|
1759
1588
|
TableCaption.displayName = "TableCaption";
|
|
1760
1589
|
var isNestedField = (field) => field.includes(".");
|
|
1761
1590
|
var resolvePath = (obj, path) => path.split(".").reduce(
|
|
@@ -1890,14 +1719,14 @@ var DropdownMenuSubTrigger = React8__namespace.forwardRef(({ className, inset, c
|
|
|
1890
1719
|
{
|
|
1891
1720
|
ref,
|
|
1892
1721
|
className: cn(
|
|
1893
|
-
"
|
|
1894
|
-
inset && "
|
|
1722
|
+
"ev-dropdown-sub-trigger",
|
|
1723
|
+
inset && "ev-dropdown-inset",
|
|
1895
1724
|
className
|
|
1896
1725
|
),
|
|
1897
1726
|
...props,
|
|
1898
1727
|
children: [
|
|
1899
1728
|
children,
|
|
1900
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "
|
|
1729
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ev-dropdown-sub-trigger-chevron" })
|
|
1901
1730
|
]
|
|
1902
1731
|
}
|
|
1903
1732
|
));
|
|
@@ -1906,10 +1735,7 @@ var DropdownMenuSubContent = React8__namespace.forwardRef(({ className, ...props
|
|
|
1906
1735
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
1907
1736
|
{
|
|
1908
1737
|
ref,
|
|
1909
|
-
className: cn(
|
|
1910
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
1911
|
-
className
|
|
1912
|
-
),
|
|
1738
|
+
className: cn("ev-dropdown-sub-content", className),
|
|
1913
1739
|
...props
|
|
1914
1740
|
}
|
|
1915
1741
|
));
|
|
@@ -1919,10 +1745,7 @@ var DropdownMenuContent = React8__namespace.forwardRef(({ className, sideOffset
|
|
|
1919
1745
|
{
|
|
1920
1746
|
ref,
|
|
1921
1747
|
sideOffset,
|
|
1922
|
-
className: cn(
|
|
1923
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
1924
|
-
className
|
|
1925
|
-
),
|
|
1748
|
+
className: cn("ev-dropdown-content", className),
|
|
1926
1749
|
...props
|
|
1927
1750
|
}
|
|
1928
1751
|
) }));
|
|
@@ -1932,8 +1755,8 @@ var DropdownMenuItem = React8__namespace.forwardRef(({ className, inset, ...prop
|
|
|
1932
1755
|
{
|
|
1933
1756
|
ref,
|
|
1934
1757
|
className: cn(
|
|
1935
|
-
"
|
|
1936
|
-
inset && "
|
|
1758
|
+
"ev-dropdown-item",
|
|
1759
|
+
inset && "ev-dropdown-inset",
|
|
1937
1760
|
className
|
|
1938
1761
|
),
|
|
1939
1762
|
...props
|
|
@@ -1944,14 +1767,11 @@ var DropdownMenuCheckboxItem = React8__namespace.forwardRef(({ className, childr
|
|
|
1944
1767
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
1945
1768
|
{
|
|
1946
1769
|
ref,
|
|
1947
|
-
className: cn(
|
|
1948
|
-
"relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1949
|
-
className
|
|
1950
|
-
),
|
|
1770
|
+
className: cn("ev-dropdown-checkbox-item", className),
|
|
1951
1771
|
checked,
|
|
1952
1772
|
...props,
|
|
1953
1773
|
children: [
|
|
1954
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
1774
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-dropdown-item-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) }) }),
|
|
1955
1775
|
children
|
|
1956
1776
|
]
|
|
1957
1777
|
}
|
|
@@ -1961,13 +1781,10 @@ var DropdownMenuRadioItem = React8__namespace.forwardRef(({ className, children,
|
|
|
1961
1781
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
1962
1782
|
{
|
|
1963
1783
|
ref,
|
|
1964
|
-
className: cn(
|
|
1965
|
-
"relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1966
|
-
className
|
|
1967
|
-
),
|
|
1784
|
+
className: cn("ev-dropdown-radio-item", className),
|
|
1968
1785
|
...props,
|
|
1969
1786
|
children: [
|
|
1970
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
1787
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-dropdown-item-indicator ev-dropdown-radio-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, {}) }) }),
|
|
1971
1788
|
children
|
|
1972
1789
|
]
|
|
1973
1790
|
}
|
|
@@ -1978,8 +1795,8 @@ var DropdownMenuLabel = React8__namespace.forwardRef(({ className, inset, ...pro
|
|
|
1978
1795
|
{
|
|
1979
1796
|
ref,
|
|
1980
1797
|
className: cn(
|
|
1981
|
-
"
|
|
1982
|
-
inset && "
|
|
1798
|
+
"ev-dropdown-label",
|
|
1799
|
+
inset && "ev-dropdown-inset",
|
|
1983
1800
|
className
|
|
1984
1801
|
),
|
|
1985
1802
|
...props
|
|
@@ -1990,7 +1807,7 @@ var DropdownMenuSeparator = React8__namespace.forwardRef(({ className, ...props
|
|
|
1990
1807
|
DropdownMenuPrimitive__namespace.Separator,
|
|
1991
1808
|
{
|
|
1992
1809
|
ref,
|
|
1993
|
-
className: cn("-
|
|
1810
|
+
className: cn("ev-dropdown-separator", className),
|
|
1994
1811
|
...props
|
|
1995
1812
|
}
|
|
1996
1813
|
));
|
|
@@ -2003,7 +1820,7 @@ function SelectAllControl({
|
|
|
2003
1820
|
onScopeChange,
|
|
2004
1821
|
labels
|
|
2005
1822
|
}) {
|
|
2006
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1823
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-sa-control", children: [
|
|
2007
1824
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2008
1825
|
Checkbox,
|
|
2009
1826
|
{
|
|
@@ -2017,9 +1834,9 @@ function SelectAllControl({
|
|
|
2017
1834
|
"button",
|
|
2018
1835
|
{
|
|
2019
1836
|
type: "button",
|
|
2020
|
-
className: "
|
|
1837
|
+
className: "ev-sa-toggle",
|
|
2021
1838
|
"aria-label": "Toggle select-all scope",
|
|
2022
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "
|
|
1839
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "ev-sa-toggle-icon" })
|
|
2023
1840
|
}
|
|
2024
1841
|
) }),
|
|
2025
1842
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2046,8 +1863,8 @@ function PaginationFooter({
|
|
|
2046
1863
|
labels
|
|
2047
1864
|
}) {
|
|
2048
1865
|
const totalPages = Math.max(1, Math.ceil(totalCount / itemsPerPage));
|
|
2049
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2050
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1866
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer", children: [
|
|
1867
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2051
1868
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: labels.rowsPerPage }),
|
|
2052
1869
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2053
1870
|
Select,
|
|
@@ -2055,7 +1872,7 @@ function PaginationFooter({
|
|
|
2055
1872
|
value: String(itemsPerPage),
|
|
2056
1873
|
onValueChange: (v) => onItemsPerPageChange(Number(v)),
|
|
2057
1874
|
children: [
|
|
2058
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "
|
|
1875
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "ev-table-footer-ipp", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
2059
1876
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: itemsPerPageOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(opt), children: opt }, opt)) })
|
|
2060
1877
|
]
|
|
2061
1878
|
}
|
|
@@ -2066,7 +1883,7 @@ function PaginationFooter({
|
|
|
2066
1883
|
labels.results
|
|
2067
1884
|
] })
|
|
2068
1885
|
] }),
|
|
2069
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1886
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2070
1887
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: labels.page }),
|
|
2071
1888
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2072
1889
|
Select,
|
|
@@ -2074,7 +1891,7 @@ function PaginationFooter({
|
|
|
2074
1891
|
value: String(currentPage),
|
|
2075
1892
|
onValueChange: (v) => onPageChange(Number(v)),
|
|
2076
1893
|
children: [
|
|
2077
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "
|
|
1894
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "ev-table-footer-pg", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
2078
1895
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: Array.from({ length: totalPages }, (_, i) => i + 1).map((p) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(p), children: p }, p)) })
|
|
2079
1896
|
]
|
|
2080
1897
|
}
|
|
@@ -2084,16 +1901,16 @@ function PaginationFooter({
|
|
|
2084
1901
|
" ",
|
|
2085
1902
|
totalPages
|
|
2086
1903
|
] }),
|
|
2087
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1904
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer-nav", children: [
|
|
2088
1905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2089
1906
|
Button,
|
|
2090
1907
|
{
|
|
2091
1908
|
variant: "ghost",
|
|
2092
1909
|
size: "icon",
|
|
2093
|
-
className: "
|
|
1910
|
+
className: "ev-table-footer-nav-btn",
|
|
2094
1911
|
disabled: currentPage <= 1,
|
|
2095
1912
|
onClick: () => onPageChange(currentPage - 1),
|
|
2096
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "
|
|
1913
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "ev-table-footer-nav-icon" })
|
|
2097
1914
|
}
|
|
2098
1915
|
),
|
|
2099
1916
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2101,10 +1918,10 @@ function PaginationFooter({
|
|
|
2101
1918
|
{
|
|
2102
1919
|
variant: "ghost",
|
|
2103
1920
|
size: "icon",
|
|
2104
|
-
className: "
|
|
1921
|
+
className: "ev-table-footer-nav-btn",
|
|
2105
1922
|
disabled: currentPage >= totalPages,
|
|
2106
1923
|
onClick: () => onPageChange(currentPage + 1),
|
|
2107
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "
|
|
1924
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ev-table-footer-nav-icon" })
|
|
2108
1925
|
}
|
|
2109
1926
|
)
|
|
2110
1927
|
] })
|
|
@@ -2114,10 +1931,10 @@ function PaginationFooter({
|
|
|
2114
1931
|
function ColumnVisibilityMenu({ table, label }) {
|
|
2115
1932
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
2116
1933
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
2117
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "
|
|
1934
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "ev-cv-icon" }),
|
|
2118
1935
|
label
|
|
2119
1936
|
] }) }),
|
|
2120
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", className: "
|
|
1937
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", className: "ev-cv-menu", children: table.getAllColumns().filter((col) => col.getCanHide() && col.id !== "_select").map((col) => {
|
|
2121
1938
|
const rawHeader = col.columnDef.header;
|
|
2122
1939
|
const headerLabel = typeof rawHeader === "string" && rawHeader.trim().length > 0 ? rawHeader : col.id;
|
|
2123
1940
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2125,7 +1942,7 @@ function ColumnVisibilityMenu({ table, label }) {
|
|
|
2125
1942
|
{
|
|
2126
1943
|
checked: col.getIsVisible(),
|
|
2127
1944
|
onCheckedChange: (v) => col.toggleVisibility(!!v),
|
|
2128
|
-
className: "
|
|
1945
|
+
className: "ev-cv-item",
|
|
2129
1946
|
children: headerLabel
|
|
2130
1947
|
},
|
|
2131
1948
|
col.id
|
|
@@ -2735,7 +2552,7 @@ function EasyVisionTable(props) {
|
|
|
2735
2552
|
}
|
|
2736
2553
|
}, [totalCount, itemsPerPage, page, paginationMode, patch, isApi]);
|
|
2737
2554
|
return /* @__PURE__ */ jsxRuntime.jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
2738
|
-
multifilter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
2555
|
+
multifilter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-table-multifilter", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2739
2556
|
EasyVisionMultifilter,
|
|
2740
2557
|
{
|
|
2741
2558
|
...multifilter,
|
|
@@ -2743,9 +2560,9 @@ function EasyVisionTable(props) {
|
|
|
2743
2560
|
onPerform: handlePerform
|
|
2744
2561
|
}
|
|
2745
2562
|
) }),
|
|
2746
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2747
|
-
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2748
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
2563
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-card", children: [
|
|
2564
|
+
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-toolbar", children: [
|
|
2565
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-table-toolbar-section", children: toolbarLeft }),
|
|
2749
2566
|
enableRowSelection && (() => {
|
|
2750
2567
|
const isAllScope = selection.scope === "all";
|
|
2751
2568
|
const pageCount = isAllScope ? 0 : Object.keys(selection.ids ?? {}).length;
|
|
@@ -2755,25 +2572,25 @@ function EasyVisionTable(props) {
|
|
|
2755
2572
|
) : null;
|
|
2756
2573
|
const allCount = isAllScope ? eagerCount ?? Math.max(0, totalCount - Object.keys(selection.exceptIds ?? {}).length) : 0;
|
|
2757
2574
|
if (!isAllScope && pageCount === 0) return null;
|
|
2758
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2759
|
-
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "
|
|
2760
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
2575
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-sel-banner", children: [
|
|
2576
|
+
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ev-table-sel-banner-spinner" }),
|
|
2577
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-table-sel-banner-text", children: isAllScope ? isEagerWildcard && isResolvingEager ? `${labels.loading}\u2026` : labels.selectedAllBanner(allCount) : labels.selectedCountBanner(pageCount) }),
|
|
2761
2578
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2762
2579
|
Button,
|
|
2763
2580
|
{
|
|
2764
2581
|
variant: "ghost",
|
|
2765
2582
|
size: "sm",
|
|
2766
2583
|
onClick: () => onScopeChange("page"),
|
|
2767
|
-
className: "
|
|
2584
|
+
className: "ev-table-clear-btn",
|
|
2768
2585
|
children: [
|
|
2769
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "
|
|
2586
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ev-table-clear-icon" }),
|
|
2770
2587
|
labels.clearSelection
|
|
2771
2588
|
]
|
|
2772
2589
|
}
|
|
2773
2590
|
)
|
|
2774
2591
|
] });
|
|
2775
2592
|
})(),
|
|
2776
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2593
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-toolbar-section", children: [
|
|
2777
2594
|
toolbarRight,
|
|
2778
2595
|
showColumnVisibility && /* @__PURE__ */ jsxRuntime.jsx(ColumnVisibilityMenu, { table: tableInstance, label: labels.customizeColumns })
|
|
2779
2596
|
] })
|
|
@@ -2781,18 +2598,18 @@ function EasyVisionTable(props) {
|
|
|
2781
2598
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2782
2599
|
"div",
|
|
2783
2600
|
{
|
|
2784
|
-
className: "easyvision-table-scroll
|
|
2601
|
+
className: "easyvision-table-scroll",
|
|
2785
2602
|
style: maxBodyHeight !== void 0 ? {
|
|
2786
2603
|
maxHeight: typeof maxBodyHeight === "number" ? `${maxBodyHeight}px` : maxBodyHeight
|
|
2787
2604
|
} : void 0,
|
|
2788
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "
|
|
2605
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "ev-table", children: [
|
|
2789
2606
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2790
2607
|
TableHeader,
|
|
2791
2608
|
{
|
|
2792
|
-
className: maxBodyHeight !== void 0 ? "
|
|
2609
|
+
className: maxBodyHeight !== void 0 ? "ev-table-thead-sticky" : void 0,
|
|
2793
2610
|
children: tableInstance.getHeaderGroups().map((hg) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: hg.headers.map((header) => {
|
|
2794
2611
|
if (header.column.id === "_select" && enableRowSelection) {
|
|
2795
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "
|
|
2612
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "ev-table-th-checkbox", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2796
2613
|
SelectAllControl,
|
|
2797
2614
|
{
|
|
2798
2615
|
scope: selection.scope,
|
|
@@ -2817,19 +2634,17 @@ function EasyVisionTable(props) {
|
|
|
2817
2634
|
TableHead,
|
|
2818
2635
|
{
|
|
2819
2636
|
style: headerWidthStyle,
|
|
2820
|
-
className:
|
|
2821
|
-
"relative",
|
|
2822
|
-
colMeta.largeScreensOnly ? "hidden lg:table-cell" : ""
|
|
2823
|
-
].filter(Boolean).join(" "),
|
|
2637
|
+
className: colMeta.largeScreensOnly ? "ev-table-large-only" : void 0,
|
|
2824
2638
|
children: [
|
|
2825
2639
|
header.isPlaceholder ? null : sortable ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2826
2640
|
"button",
|
|
2827
2641
|
{
|
|
2828
|
-
|
|
2642
|
+
type: "button",
|
|
2643
|
+
className: "ev-table-sort-btn",
|
|
2829
2644
|
onClick: header.column.getToggleSortingHandler(),
|
|
2830
2645
|
children: [
|
|
2831
2646
|
reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
|
2832
|
-
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "
|
|
2647
|
+
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "ev-table-sort-icon" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "ev-table-sort-icon" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpDown, { className: "ev-table-sort-icon ev-table-sort-icon-inactive" })
|
|
2833
2648
|
]
|
|
2834
2649
|
}
|
|
2835
2650
|
) : reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
|
@@ -2843,11 +2658,8 @@ function EasyVisionTable(props) {
|
|
|
2843
2658
|
"aria-orientation": "vertical",
|
|
2844
2659
|
"aria-label": "Resize column",
|
|
2845
2660
|
className: [
|
|
2846
|
-
"
|
|
2847
|
-
|
|
2848
|
-
"after:h-1/2 after:w-px after:bg-border after:transition-all",
|
|
2849
|
-
"hover:after:w-1.5 hover:after:h-full hover:after:top-0 hover:after:translate-y-0 hover:after:bg-primary/30",
|
|
2850
|
-
header.column.getIsResizing() ? "after:!w-1.5 after:!h-full after:!top-0 after:!translate-y-0 after:!bg-primary/60" : ""
|
|
2661
|
+
"ev-resize-handle",
|
|
2662
|
+
header.column.getIsResizing() ? "is-resizing" : ""
|
|
2851
2663
|
].filter(Boolean).join(" ")
|
|
2852
2664
|
}
|
|
2853
2665
|
)
|
|
@@ -2858,8 +2670,8 @@ function EasyVisionTable(props) {
|
|
|
2858
2670
|
}) }, hg.id))
|
|
2859
2671
|
}
|
|
2860
2672
|
),
|
|
2861
|
-
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: allColumns.length, className: "
|
|
2862
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "
|
|
2673
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: allColumns.length, className: "ev-table-empty-cell", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-table-spinner-wrapper", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ev-table-loading-spinner" }) }) }) }) : tableInstance.getRowModel().rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: allColumns.length, className: "ev-table-empty-cell", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-empty-state", children: [
|
|
2674
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "ev-table-empty-text", children: emptyMessage ?? labels.noData }),
|
|
2863
2675
|
emptyAction
|
|
2864
2676
|
] }) }) }) : tableInstance.getRowModel().rows.map((row) => {
|
|
2865
2677
|
const rid = rowIdOf(row.original);
|
|
@@ -2870,10 +2682,7 @@ function EasyVisionTable(props) {
|
|
|
2870
2682
|
{
|
|
2871
2683
|
"data-state": row.getIsSelected() || isAllSelected ? "selected" : void 0,
|
|
2872
2684
|
"data-highlighted": highlighted ? "true" : void 0,
|
|
2873
|
-
className:
|
|
2874
|
-
onRowClick ? "cursor-pointer" : "",
|
|
2875
|
-
highlighted ? "bg-muted/50" : ""
|
|
2876
|
-
].filter(Boolean).join(" "),
|
|
2685
|
+
className: onRowClick ? "ev-table-row-clickable" : void 0,
|
|
2877
2686
|
onClick: () => onRowClick?.(row.original),
|
|
2878
2687
|
children: row.getVisibleCells().map((cell) => {
|
|
2879
2688
|
if (cell.column.id === "_select" && selection.scope === "all") {
|
|
@@ -2913,13 +2722,13 @@ function EasyVisionTable(props) {
|
|
|
2913
2722
|
{
|
|
2914
2723
|
style: cellWidthStyle,
|
|
2915
2724
|
className: [
|
|
2916
|
-
cellMeta.largeScreensOnly ? "
|
|
2917
|
-
cellMeta.truncate ? "
|
|
2918
|
-
].filter(Boolean).join(" "),
|
|
2725
|
+
cellMeta.largeScreensOnly ? "ev-table-large-only" : "",
|
|
2726
|
+
cellMeta.truncate ? "ev-table-cell-truncate" : ""
|
|
2727
|
+
].filter(Boolean).join(" ") || void 0,
|
|
2919
2728
|
children: cellMeta.truncate ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2920
2729
|
"div",
|
|
2921
2730
|
{
|
|
2922
|
-
className:
|
|
2731
|
+
className: "ev-table-cell-truncate-inner",
|
|
2923
2732
|
title: titleAttr,
|
|
2924
2733
|
children: rendered
|
|
2925
2734
|
}
|