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