@easyvision/easyvision-ui 1.3.9 → 1.5.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/README.md +65 -8
- package/dist/EasyVisionTable.css +337 -11
- package/dist/easyvision.css +1333 -20
- package/dist/index.cjs +341 -500
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +342 -501
- 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
|
] });
|
|
@@ -1190,6 +1129,8 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1190
1129
|
performPosition = "inline",
|
|
1191
1130
|
performTargetRef,
|
|
1192
1131
|
performOnMount = false,
|
|
1132
|
+
performMode = "auto",
|
|
1133
|
+
performDebounceMs = 0,
|
|
1193
1134
|
onPerform,
|
|
1194
1135
|
onChange,
|
|
1195
1136
|
onStateChange,
|
|
@@ -1199,6 +1140,7 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1199
1140
|
persist = false,
|
|
1200
1141
|
clearWhen
|
|
1201
1142
|
} = props;
|
|
1143
|
+
const resolvedPerformMode = performMode === "live" ? "live" : "manual";
|
|
1202
1144
|
const labels = { ...DEFAULT_LABELS, ...labelOverrides };
|
|
1203
1145
|
const showClear = showClearAll ?? editable;
|
|
1204
1146
|
const initialActive = React8.useMemo(() => {
|
|
@@ -1236,17 +1178,17 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1236
1178
|
}) : void 0
|
|
1237
1179
|
});
|
|
1238
1180
|
const { activeFields, values, lastConfirmedSnapshotJSON } = slice;
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1181
|
+
const registryState = React8.useSyncExternalStore(
|
|
1182
|
+
easyVisionRegistry.subscribe,
|
|
1183
|
+
easyVisionRegistry.getState,
|
|
1184
|
+
easyVisionRegistry.getState
|
|
1185
|
+
);
|
|
1244
1186
|
const childSnapshots = React8.useMemo(() => {
|
|
1245
1187
|
const out = {};
|
|
1246
1188
|
for (const f of config.fields) {
|
|
1247
1189
|
if (f.type !== "multifilter") continue;
|
|
1248
1190
|
const childFullId = `${fullId}.${f.id}-multifilter`;
|
|
1249
|
-
const childSlice =
|
|
1191
|
+
const childSlice = registryState.slices[childFullId];
|
|
1250
1192
|
if (childSlice) {
|
|
1251
1193
|
out[f.id] = {
|
|
1252
1194
|
values: childSlice.values,
|
|
@@ -1255,7 +1197,7 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1255
1197
|
}
|
|
1256
1198
|
}
|
|
1257
1199
|
return out;
|
|
1258
|
-
}, [fullId, config.fields,
|
|
1200
|
+
}, [fullId, config.fields, registryState]);
|
|
1259
1201
|
const childQueries = React8.useMemo(() => {
|
|
1260
1202
|
const out = {};
|
|
1261
1203
|
for (const f of config.fields) {
|
|
@@ -1327,7 +1269,10 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1327
1269
|
const performAction = React8.useCallback(() => {
|
|
1328
1270
|
const key = buildSnapshotKey({ activeFields, values: composedValues });
|
|
1329
1271
|
patch({ lastConfirmedSnapshotJSON: key });
|
|
1330
|
-
onPerform
|
|
1272
|
+
if (onPerform) {
|
|
1273
|
+
const emitted = { ...snapshot, isDirty: false };
|
|
1274
|
+
queueMicrotask(() => onPerform(emitted));
|
|
1275
|
+
}
|
|
1331
1276
|
}, [activeFields, composedValues, patch, onPerform, snapshot]);
|
|
1332
1277
|
const didPerformOnMountRef = React8.useRef(false);
|
|
1333
1278
|
React8.useEffect(() => {
|
|
@@ -1336,6 +1281,28 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1336
1281
|
performAction();
|
|
1337
1282
|
}
|
|
1338
1283
|
}, [performOnMount]);
|
|
1284
|
+
const liveTimerRef = React8.useRef(null);
|
|
1285
|
+
const livePrevKeyRef = React8.useRef(null);
|
|
1286
|
+
React8.useEffect(() => {
|
|
1287
|
+
if (resolvedPerformMode !== "live") return;
|
|
1288
|
+
if (livePrevKeyRef.current === null) {
|
|
1289
|
+
livePrevKeyRef.current = snapshotKey;
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
if (livePrevKeyRef.current === snapshotKey) return;
|
|
1293
|
+
livePrevKeyRef.current = snapshotKey;
|
|
1294
|
+
if (liveTimerRef.current !== null) clearTimeout(liveTimerRef.current);
|
|
1295
|
+
liveTimerRef.current = setTimeout(() => {
|
|
1296
|
+
liveTimerRef.current = null;
|
|
1297
|
+
performAction();
|
|
1298
|
+
}, performDebounceMs);
|
|
1299
|
+
return () => {
|
|
1300
|
+
if (liveTimerRef.current !== null) {
|
|
1301
|
+
clearTimeout(liveTimerRef.current);
|
|
1302
|
+
liveTimerRef.current = null;
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
}, [snapshotKey, resolvedPerformMode, performDebounceMs, performAction]);
|
|
1339
1306
|
React8.useImperativeHandle(ref, () => ({
|
|
1340
1307
|
perform: performAction,
|
|
1341
1308
|
getSnapshot: () => snapshot
|
|
@@ -1425,37 +1392,30 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1425
1392
|
const renderField = (f) => {
|
|
1426
1393
|
if (f.type === "multifilter") {
|
|
1427
1394
|
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
|
-
);
|
|
1395
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-nested", children: [
|
|
1396
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-nested-header", children: [
|
|
1397
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-mf-nested-label", children: f.label }),
|
|
1398
|
+
removable2 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1399
|
+
"button",
|
|
1400
|
+
{
|
|
1401
|
+
type: "button",
|
|
1402
|
+
onClick: () => removeField(f.id),
|
|
1403
|
+
className: "ev-mf-nested-remove",
|
|
1404
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
] }),
|
|
1408
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1409
|
+
EasyVisionMultifilter2,
|
|
1410
|
+
{
|
|
1411
|
+
id: f.id,
|
|
1412
|
+
config: f.config,
|
|
1413
|
+
editable,
|
|
1414
|
+
performButton: false,
|
|
1415
|
+
labels: labelOverrides
|
|
1416
|
+
}
|
|
1417
|
+
)
|
|
1418
|
+
] }, f.id);
|
|
1459
1419
|
}
|
|
1460
1420
|
const removable = editable && !f.pinned && !f.locked;
|
|
1461
1421
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1469,18 +1429,18 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1469
1429
|
f.id
|
|
1470
1430
|
);
|
|
1471
1431
|
};
|
|
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: "
|
|
1432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-panel", children: [
|
|
1433
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-mf-row", children: [
|
|
1474
1434
|
prominentSlots.map(({ def, removable, isLegacySearchField }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1475
1435
|
"div",
|
|
1476
1436
|
{
|
|
1477
|
-
className: "
|
|
1437
|
+
className: "ev-mf-search-slot",
|
|
1478
1438
|
children: [
|
|
1479
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "
|
|
1439
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "ev-mf-search-icon" }),
|
|
1480
1440
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1481
|
-
|
|
1441
|
+
"input",
|
|
1482
1442
|
{
|
|
1483
|
-
className:
|
|
1443
|
+
className: ["ev-mf-search-input", removable ? "has-clear" : "no-clear"].filter(Boolean).join(" "),
|
|
1484
1444
|
placeholder: def.placeholder ?? def.label ?? labels.searchPlaceholder,
|
|
1485
1445
|
value: values[def.id] ?? "",
|
|
1486
1446
|
onChange: (e) => updateValue(def.id, e.target.value),
|
|
@@ -1497,8 +1457,8 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1497
1457
|
type: "button",
|
|
1498
1458
|
onClick: () => removeField(def.id),
|
|
1499
1459
|
"aria-label": labels.clear,
|
|
1500
|
-
className: "
|
|
1501
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
1460
|
+
className: "ev-mf-search-clear",
|
|
1461
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
1502
1462
|
}
|
|
1503
1463
|
)
|
|
1504
1464
|
]
|
|
@@ -1511,19 +1471,19 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1511
1471
|
{
|
|
1512
1472
|
variant: "outline",
|
|
1513
1473
|
size: "sm",
|
|
1514
|
-
className: "
|
|
1474
|
+
className: "ev-mf-add-btn",
|
|
1515
1475
|
"aria-label": labels.addFilter,
|
|
1516
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {
|
|
1476
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {})
|
|
1517
1477
|
}
|
|
1518
1478
|
) }),
|
|
1519
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "
|
|
1479
|
+
/* @__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
1480
|
"button",
|
|
1521
1481
|
{
|
|
1522
1482
|
type: "button",
|
|
1523
1483
|
onClick: () => addField(f.id),
|
|
1524
|
-
className: "
|
|
1484
|
+
className: "ev-mf-add-item",
|
|
1525
1485
|
children: [
|
|
1526
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {
|
|
1486
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {}),
|
|
1527
1487
|
f.label
|
|
1528
1488
|
]
|
|
1529
1489
|
},
|
|
@@ -1536,9 +1496,9 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1536
1496
|
size: "sm",
|
|
1537
1497
|
onClick: performAction,
|
|
1538
1498
|
disabled: !performEnabled,
|
|
1539
|
-
className: "
|
|
1499
|
+
className: "ev-mf-perform",
|
|
1540
1500
|
children: [
|
|
1541
|
-
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {
|
|
1501
|
+
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {}),
|
|
1542
1502
|
performLabelText
|
|
1543
1503
|
]
|
|
1544
1504
|
}
|
|
@@ -1549,25 +1509,25 @@ var EasyVisionMultifilter = React8.forwardRef(function EasyVisionMultifilter2(pr
|
|
|
1549
1509
|
variant: "ghost",
|
|
1550
1510
|
size: "sm",
|
|
1551
1511
|
onClick: clearAll,
|
|
1552
|
-
className: "
|
|
1512
|
+
className: "ev-mf-clear",
|
|
1553
1513
|
children: [
|
|
1554
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {
|
|
1514
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}),
|
|
1555
1515
|
labels.clear
|
|
1556
1516
|
]
|
|
1557
1517
|
}
|
|
1558
1518
|
)
|
|
1559
1519
|
] }),
|
|
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: "
|
|
1520
|
+
pinnedFields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-row", children: pinnedFields.map(renderField) }),
|
|
1521
|
+
chipFields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-row", children: chipFields.map(renderField) }),
|
|
1522
|
+
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-mf-below-row", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1563
1523
|
Button,
|
|
1564
1524
|
{
|
|
1565
1525
|
size: "sm",
|
|
1566
1526
|
onClick: performAction,
|
|
1567
1527
|
disabled: !performEnabled,
|
|
1568
|
-
className: "
|
|
1528
|
+
className: "ev-mf-perform",
|
|
1569
1529
|
children: [
|
|
1570
|
-
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {
|
|
1530
|
+
performIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {}),
|
|
1571
1531
|
performLabelText
|
|
1572
1532
|
]
|
|
1573
1533
|
}
|
|
@@ -1626,133 +1586,33 @@ function buildChildQueryDirect(field, values) {
|
|
|
1626
1586
|
return Object.keys(where).length > 0 ? { where } : {};
|
|
1627
1587
|
}
|
|
1628
1588
|
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
|
-
));
|
|
1589
|
+
var EasyVisionCard = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card", className), ...props }));
|
|
1640
1590
|
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
|
-
));
|
|
1591
|
+
var EasyVisionCardHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card-header", className), ...props }));
|
|
1649
1592
|
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
|
-
));
|
|
1593
|
+
var EasyVisionCardTitle = React8__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: join("ev-card-title", className), ...props, children }));
|
|
1662
1594
|
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
|
-
));
|
|
1595
|
+
var EasyVisionCardDescription = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: join("ev-card-description", className), ...props }));
|
|
1671
1596
|
EasyVisionCardDescription.displayName = "EasyVisionCardDescription";
|
|
1672
|
-
var EasyVisionCardContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("
|
|
1597
|
+
var EasyVisionCardContent = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card-content", className), ...props }));
|
|
1673
1598
|
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
|
-
));
|
|
1599
|
+
var EasyVisionCardFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: join("ev-card-footer", className), ...props }));
|
|
1682
1600
|
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
|
-
) }));
|
|
1601
|
+
var Table = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("ev-table", className), ...props }));
|
|
1691
1602
|
Table.displayName = "Table";
|
|
1692
|
-
var TableHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className
|
|
1603
|
+
var TableHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className, ...props }));
|
|
1693
1604
|
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
|
-
));
|
|
1605
|
+
var TableBody = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className, ...props }));
|
|
1702
1606
|
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
|
-
));
|
|
1607
|
+
var TableFooter = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tfoot", { ref, className, ...props }));
|
|
1714
1608
|
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
|
-
));
|
|
1609
|
+
var TableRow = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className, ...props }));
|
|
1726
1610
|
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
|
-
));
|
|
1611
|
+
var TableHead = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("th", { ref, className, ...props }));
|
|
1738
1612
|
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
|
-
));
|
|
1613
|
+
var TableCell = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("td", { ref, className, ...props }));
|
|
1747
1614
|
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
|
-
));
|
|
1615
|
+
var TableCaption = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className, ...props }));
|
|
1756
1616
|
TableCaption.displayName = "TableCaption";
|
|
1757
1617
|
var isNestedField = (field) => field.includes(".");
|
|
1758
1618
|
var resolvePath = (obj, path) => path.split(".").reduce(
|
|
@@ -1887,14 +1747,14 @@ var DropdownMenuSubTrigger = React8__namespace.forwardRef(({ className, inset, c
|
|
|
1887
1747
|
{
|
|
1888
1748
|
ref,
|
|
1889
1749
|
className: cn(
|
|
1890
|
-
"
|
|
1891
|
-
inset && "
|
|
1750
|
+
"ev-dropdown-sub-trigger",
|
|
1751
|
+
inset && "ev-dropdown-inset",
|
|
1892
1752
|
className
|
|
1893
1753
|
),
|
|
1894
1754
|
...props,
|
|
1895
1755
|
children: [
|
|
1896
1756
|
children,
|
|
1897
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "
|
|
1757
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ev-dropdown-sub-trigger-chevron" })
|
|
1898
1758
|
]
|
|
1899
1759
|
}
|
|
1900
1760
|
));
|
|
@@ -1903,10 +1763,7 @@ var DropdownMenuSubContent = React8__namespace.forwardRef(({ className, ...props
|
|
|
1903
1763
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
1904
1764
|
{
|
|
1905
1765
|
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
|
-
),
|
|
1766
|
+
className: cn("ev-dropdown-sub-content", className),
|
|
1910
1767
|
...props
|
|
1911
1768
|
}
|
|
1912
1769
|
));
|
|
@@ -1916,10 +1773,7 @@ var DropdownMenuContent = React8__namespace.forwardRef(({ className, sideOffset
|
|
|
1916
1773
|
{
|
|
1917
1774
|
ref,
|
|
1918
1775
|
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
|
-
),
|
|
1776
|
+
className: cn("ev-dropdown-content", className),
|
|
1923
1777
|
...props
|
|
1924
1778
|
}
|
|
1925
1779
|
) }));
|
|
@@ -1929,8 +1783,8 @@ var DropdownMenuItem = React8__namespace.forwardRef(({ className, inset, ...prop
|
|
|
1929
1783
|
{
|
|
1930
1784
|
ref,
|
|
1931
1785
|
className: cn(
|
|
1932
|
-
"
|
|
1933
|
-
inset && "
|
|
1786
|
+
"ev-dropdown-item",
|
|
1787
|
+
inset && "ev-dropdown-inset",
|
|
1934
1788
|
className
|
|
1935
1789
|
),
|
|
1936
1790
|
...props
|
|
@@ -1941,14 +1795,11 @@ var DropdownMenuCheckboxItem = React8__namespace.forwardRef(({ className, childr
|
|
|
1941
1795
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
1942
1796
|
{
|
|
1943
1797
|
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
|
-
),
|
|
1798
|
+
className: cn("ev-dropdown-checkbox-item", className),
|
|
1948
1799
|
checked,
|
|
1949
1800
|
...props,
|
|
1950
1801
|
children: [
|
|
1951
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
1802
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-dropdown-item-indicator", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) }) }),
|
|
1952
1803
|
children
|
|
1953
1804
|
]
|
|
1954
1805
|
}
|
|
@@ -1958,13 +1809,10 @@ var DropdownMenuRadioItem = React8__namespace.forwardRef(({ className, children,
|
|
|
1958
1809
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
1959
1810
|
{
|
|
1960
1811
|
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
|
-
),
|
|
1812
|
+
className: cn("ev-dropdown-radio-item", className),
|
|
1965
1813
|
...props,
|
|
1966
1814
|
children: [
|
|
1967
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
1815
|
+
/* @__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
1816
|
children
|
|
1969
1817
|
]
|
|
1970
1818
|
}
|
|
@@ -1975,8 +1823,8 @@ var DropdownMenuLabel = React8__namespace.forwardRef(({ className, inset, ...pro
|
|
|
1975
1823
|
{
|
|
1976
1824
|
ref,
|
|
1977
1825
|
className: cn(
|
|
1978
|
-
"
|
|
1979
|
-
inset && "
|
|
1826
|
+
"ev-dropdown-label",
|
|
1827
|
+
inset && "ev-dropdown-inset",
|
|
1980
1828
|
className
|
|
1981
1829
|
),
|
|
1982
1830
|
...props
|
|
@@ -1987,7 +1835,7 @@ var DropdownMenuSeparator = React8__namespace.forwardRef(({ className, ...props
|
|
|
1987
1835
|
DropdownMenuPrimitive__namespace.Separator,
|
|
1988
1836
|
{
|
|
1989
1837
|
ref,
|
|
1990
|
-
className: cn("-
|
|
1838
|
+
className: cn("ev-dropdown-separator", className),
|
|
1991
1839
|
...props
|
|
1992
1840
|
}
|
|
1993
1841
|
));
|
|
@@ -2000,7 +1848,7 @@ function SelectAllControl({
|
|
|
2000
1848
|
onScopeChange,
|
|
2001
1849
|
labels
|
|
2002
1850
|
}) {
|
|
2003
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1851
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-sa-control", children: [
|
|
2004
1852
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
1853
|
Checkbox,
|
|
2006
1854
|
{
|
|
@@ -2014,9 +1862,9 @@ function SelectAllControl({
|
|
|
2014
1862
|
"button",
|
|
2015
1863
|
{
|
|
2016
1864
|
type: "button",
|
|
2017
|
-
className: "
|
|
1865
|
+
className: "ev-sa-toggle",
|
|
2018
1866
|
"aria-label": "Toggle select-all scope",
|
|
2019
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "
|
|
1867
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "ev-sa-toggle-icon" })
|
|
2020
1868
|
}
|
|
2021
1869
|
) }),
|
|
2022
1870
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2043,8 +1891,8 @@ function PaginationFooter({
|
|
|
2043
1891
|
labels
|
|
2044
1892
|
}) {
|
|
2045
1893
|
const totalPages = Math.max(1, Math.ceil(totalCount / itemsPerPage));
|
|
2046
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2047
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1894
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer", children: [
|
|
1895
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2048
1896
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: labels.rowsPerPage }),
|
|
2049
1897
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2050
1898
|
Select,
|
|
@@ -2052,7 +1900,7 @@ function PaginationFooter({
|
|
|
2052
1900
|
value: String(itemsPerPage),
|
|
2053
1901
|
onValueChange: (v) => onItemsPerPageChange(Number(v)),
|
|
2054
1902
|
children: [
|
|
2055
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "
|
|
1903
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "ev-table-footer-ipp", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
2056
1904
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: itemsPerPageOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(opt), children: opt }, opt)) })
|
|
2057
1905
|
]
|
|
2058
1906
|
}
|
|
@@ -2063,7 +1911,7 @@ function PaginationFooter({
|
|
|
2063
1911
|
labels.results
|
|
2064
1912
|
] })
|
|
2065
1913
|
] }),
|
|
2066
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1914
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2067
1915
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: labels.page }),
|
|
2068
1916
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2069
1917
|
Select,
|
|
@@ -2071,7 +1919,7 @@ function PaginationFooter({
|
|
|
2071
1919
|
value: String(currentPage),
|
|
2072
1920
|
onValueChange: (v) => onPageChange(Number(v)),
|
|
2073
1921
|
children: [
|
|
2074
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "
|
|
1922
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "ev-table-footer-pg", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
2075
1923
|
/* @__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
1924
|
]
|
|
2077
1925
|
}
|
|
@@ -2081,16 +1929,16 @@ function PaginationFooter({
|
|
|
2081
1929
|
" ",
|
|
2082
1930
|
totalPages
|
|
2083
1931
|
] }),
|
|
2084
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
1932
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-footer-nav", children: [
|
|
2085
1933
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2086
1934
|
Button,
|
|
2087
1935
|
{
|
|
2088
1936
|
variant: "ghost",
|
|
2089
1937
|
size: "icon",
|
|
2090
|
-
className: "
|
|
1938
|
+
className: "ev-table-footer-nav-btn",
|
|
2091
1939
|
disabled: currentPage <= 1,
|
|
2092
1940
|
onClick: () => onPageChange(currentPage - 1),
|
|
2093
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "
|
|
1941
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "ev-table-footer-nav-icon" })
|
|
2094
1942
|
}
|
|
2095
1943
|
),
|
|
2096
1944
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2098,10 +1946,10 @@ function PaginationFooter({
|
|
|
2098
1946
|
{
|
|
2099
1947
|
variant: "ghost",
|
|
2100
1948
|
size: "icon",
|
|
2101
|
-
className: "
|
|
1949
|
+
className: "ev-table-footer-nav-btn",
|
|
2102
1950
|
disabled: currentPage >= totalPages,
|
|
2103
1951
|
onClick: () => onPageChange(currentPage + 1),
|
|
2104
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "
|
|
1952
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ev-table-footer-nav-icon" })
|
|
2105
1953
|
}
|
|
2106
1954
|
)
|
|
2107
1955
|
] })
|
|
@@ -2111,10 +1959,10 @@ function PaginationFooter({
|
|
|
2111
1959
|
function ColumnVisibilityMenu({ table, label }) {
|
|
2112
1960
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
2113
1961
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
2114
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "
|
|
1962
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "ev-cv-icon" }),
|
|
2115
1963
|
label
|
|
2116
1964
|
] }) }),
|
|
2117
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", className: "
|
|
1965
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", className: "ev-cv-menu", children: table.getAllColumns().filter((col) => col.getCanHide() && col.id !== "_select").map((col) => {
|
|
2118
1966
|
const rawHeader = col.columnDef.header;
|
|
2119
1967
|
const headerLabel = typeof rawHeader === "string" && rawHeader.trim().length > 0 ? rawHeader : col.id;
|
|
2120
1968
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2122,7 +1970,7 @@ function ColumnVisibilityMenu({ table, label }) {
|
|
|
2122
1970
|
{
|
|
2123
1971
|
checked: col.getIsVisible(),
|
|
2124
1972
|
onCheckedChange: (v) => col.toggleVisibility(!!v),
|
|
2125
|
-
className: "
|
|
1973
|
+
className: "ev-cv-item",
|
|
2126
1974
|
children: headerLabel
|
|
2127
1975
|
},
|
|
2128
1976
|
col.id
|
|
@@ -2732,17 +2580,18 @@ function EasyVisionTable(props) {
|
|
|
2732
2580
|
}
|
|
2733
2581
|
}, [totalCount, itemsPerPage, page, paginationMode, patch, isApi]);
|
|
2734
2582
|
return /* @__PURE__ */ jsxRuntime.jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
2735
|
-
multifilter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
2583
|
+
multifilter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-table-multifilter", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2736
2584
|
EasyVisionMultifilter,
|
|
2737
2585
|
{
|
|
2738
2586
|
...multifilter,
|
|
2587
|
+
performMode: multifilter.performMode === void 0 || multifilter.performMode === "auto" ? isApi ? "manual" : "live" : multifilter.performMode,
|
|
2739
2588
|
ref: setMultifilterRef,
|
|
2740
2589
|
onPerform: handlePerform
|
|
2741
2590
|
}
|
|
2742
2591
|
) }),
|
|
2743
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2744
|
-
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2745
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
2592
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-card", children: [
|
|
2593
|
+
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-toolbar", children: [
|
|
2594
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ev-table-toolbar-section", children: toolbarLeft }),
|
|
2746
2595
|
enableRowSelection && (() => {
|
|
2747
2596
|
const isAllScope = selection.scope === "all";
|
|
2748
2597
|
const pageCount = isAllScope ? 0 : Object.keys(selection.ids ?? {}).length;
|
|
@@ -2752,25 +2601,25 @@ function EasyVisionTable(props) {
|
|
|
2752
2601
|
) : null;
|
|
2753
2602
|
const allCount = isAllScope ? eagerCount ?? Math.max(0, totalCount - Object.keys(selection.exceptIds ?? {}).length) : 0;
|
|
2754
2603
|
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: "
|
|
2604
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-sel-banner", children: [
|
|
2605
|
+
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ev-table-sel-banner-spinner" }),
|
|
2606
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ev-table-sel-banner-text", children: isAllScope ? isEagerWildcard && isResolvingEager ? `${labels.loading}\u2026` : labels.selectedAllBanner(allCount) : labels.selectedCountBanner(pageCount) }),
|
|
2758
2607
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2759
2608
|
Button,
|
|
2760
2609
|
{
|
|
2761
2610
|
variant: "ghost",
|
|
2762
2611
|
size: "sm",
|
|
2763
2612
|
onClick: () => onScopeChange("page"),
|
|
2764
|
-
className: "
|
|
2613
|
+
className: "ev-table-clear-btn",
|
|
2765
2614
|
children: [
|
|
2766
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "
|
|
2615
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ev-table-clear-icon" }),
|
|
2767
2616
|
labels.clearSelection
|
|
2768
2617
|
]
|
|
2769
2618
|
}
|
|
2770
2619
|
)
|
|
2771
2620
|
] });
|
|
2772
2621
|
})(),
|
|
2773
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2622
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ev-table-toolbar-section", children: [
|
|
2774
2623
|
toolbarRight,
|
|
2775
2624
|
showColumnVisibility && /* @__PURE__ */ jsxRuntime.jsx(ColumnVisibilityMenu, { table: tableInstance, label: labels.customizeColumns })
|
|
2776
2625
|
] })
|
|
@@ -2778,18 +2627,18 @@ function EasyVisionTable(props) {
|
|
|
2778
2627
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2779
2628
|
"div",
|
|
2780
2629
|
{
|
|
2781
|
-
className: "easyvision-table-scroll
|
|
2630
|
+
className: "easyvision-table-scroll",
|
|
2782
2631
|
style: maxBodyHeight !== void 0 ? {
|
|
2783
2632
|
maxHeight: typeof maxBodyHeight === "number" ? `${maxBodyHeight}px` : maxBodyHeight
|
|
2784
2633
|
} : void 0,
|
|
2785
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "
|
|
2634
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "ev-table", children: [
|
|
2786
2635
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2787
2636
|
TableHeader,
|
|
2788
2637
|
{
|
|
2789
|
-
className: maxBodyHeight !== void 0 ? "
|
|
2638
|
+
className: maxBodyHeight !== void 0 ? "ev-table-thead-sticky" : void 0,
|
|
2790
2639
|
children: tableInstance.getHeaderGroups().map((hg) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: hg.headers.map((header) => {
|
|
2791
2640
|
if (header.column.id === "_select" && enableRowSelection) {
|
|
2792
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "
|
|
2641
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "ev-table-th-checkbox", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2793
2642
|
SelectAllControl,
|
|
2794
2643
|
{
|
|
2795
2644
|
scope: selection.scope,
|
|
@@ -2814,19 +2663,17 @@ function EasyVisionTable(props) {
|
|
|
2814
2663
|
TableHead,
|
|
2815
2664
|
{
|
|
2816
2665
|
style: headerWidthStyle,
|
|
2817
|
-
className:
|
|
2818
|
-
"relative",
|
|
2819
|
-
colMeta.largeScreensOnly ? "hidden lg:table-cell" : ""
|
|
2820
|
-
].filter(Boolean).join(" "),
|
|
2666
|
+
className: colMeta.largeScreensOnly ? "ev-table-large-only" : void 0,
|
|
2821
2667
|
children: [
|
|
2822
2668
|
header.isPlaceholder ? null : sortable ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2823
2669
|
"button",
|
|
2824
2670
|
{
|
|
2825
|
-
|
|
2671
|
+
type: "button",
|
|
2672
|
+
className: "ev-table-sort-btn",
|
|
2826
2673
|
onClick: header.column.getToggleSortingHandler(),
|
|
2827
2674
|
children: [
|
|
2828
2675
|
reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
|
2829
|
-
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "
|
|
2676
|
+
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
2677
|
]
|
|
2831
2678
|
}
|
|
2832
2679
|
) : reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
|
@@ -2840,11 +2687,8 @@ function EasyVisionTable(props) {
|
|
|
2840
2687
|
"aria-orientation": "vertical",
|
|
2841
2688
|
"aria-label": "Resize column",
|
|
2842
2689
|
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" : ""
|
|
2690
|
+
"ev-resize-handle",
|
|
2691
|
+
header.column.getIsResizing() ? "is-resizing" : ""
|
|
2848
2692
|
].filter(Boolean).join(" ")
|
|
2849
2693
|
}
|
|
2850
2694
|
)
|
|
@@ -2855,8 +2699,8 @@ function EasyVisionTable(props) {
|
|
|
2855
2699
|
}) }, hg.id))
|
|
2856
2700
|
}
|
|
2857
2701
|
),
|
|
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: "
|
|
2702
|
+
/* @__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: [
|
|
2703
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "ev-table-empty-text", children: emptyMessage ?? labels.noData }),
|
|
2860
2704
|
emptyAction
|
|
2861
2705
|
] }) }) }) : tableInstance.getRowModel().rows.map((row) => {
|
|
2862
2706
|
const rid = rowIdOf(row.original);
|
|
@@ -2867,10 +2711,7 @@ function EasyVisionTable(props) {
|
|
|
2867
2711
|
{
|
|
2868
2712
|
"data-state": row.getIsSelected() || isAllSelected ? "selected" : void 0,
|
|
2869
2713
|
"data-highlighted": highlighted ? "true" : void 0,
|
|
2870
|
-
className:
|
|
2871
|
-
onRowClick ? "cursor-pointer" : "",
|
|
2872
|
-
highlighted ? "bg-muted/50" : ""
|
|
2873
|
-
].filter(Boolean).join(" "),
|
|
2714
|
+
className: onRowClick ? "ev-table-row-clickable" : void 0,
|
|
2874
2715
|
onClick: () => onRowClick?.(row.original),
|
|
2875
2716
|
children: row.getVisibleCells().map((cell) => {
|
|
2876
2717
|
if (cell.column.id === "_select" && selection.scope === "all") {
|
|
@@ -2910,13 +2751,13 @@ function EasyVisionTable(props) {
|
|
|
2910
2751
|
{
|
|
2911
2752
|
style: cellWidthStyle,
|
|
2912
2753
|
className: [
|
|
2913
|
-
cellMeta.largeScreensOnly ? "
|
|
2914
|
-
cellMeta.truncate ? "
|
|
2915
|
-
].filter(Boolean).join(" "),
|
|
2754
|
+
cellMeta.largeScreensOnly ? "ev-table-large-only" : "",
|
|
2755
|
+
cellMeta.truncate ? "ev-table-cell-truncate" : ""
|
|
2756
|
+
].filter(Boolean).join(" ") || void 0,
|
|
2916
2757
|
children: cellMeta.truncate ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2917
2758
|
"div",
|
|
2918
2759
|
{
|
|
2919
|
-
className: "truncate",
|
|
2760
|
+
className: "ev-table-cell-truncate-inner",
|
|
2920
2761
|
title: titleAttr,
|
|
2921
2762
|
children: rendered
|
|
2922
2763
|
}
|