@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.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './easyvision.css';
|
|
2
2
|
import './EasyVisionTable.css';
|
|
3
3
|
import * as React8 from 'react';
|
|
4
|
-
import { createContext, forwardRef, useMemo,
|
|
4
|
+
import { createContext, forwardRef, useMemo, useSyncExternalStore, useRef, useEffect, useCallback, useImperativeHandle, useContext, useState, createElement } from 'react';
|
|
5
5
|
import { ChevronDown, ChevronUp, Check, Search, X, Plus, ChevronRight, Circle, Calendar as Calendar$1, ChevronLeft, ChevronsUpDown, Loader2, ArrowUp, ArrowDown, ArrowUpDown, Settings2 } from 'lucide-react';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -30,10 +30,7 @@ var Input = React8.forwardRef(
|
|
|
30
30
|
"input",
|
|
31
31
|
{
|
|
32
32
|
type,
|
|
33
|
-
className: cn(
|
|
34
|
-
"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",
|
|
35
|
-
className
|
|
36
|
-
),
|
|
33
|
+
className: cn("ev-input", className),
|
|
37
34
|
ref,
|
|
38
35
|
...props
|
|
39
36
|
}
|
|
@@ -190,34 +187,47 @@ function EasyVisionInput({
|
|
|
190
187
|
}
|
|
191
188
|
}, [debounced, onChange]);
|
|
192
189
|
const isInvalid = mandatory && slice.value.trim().length === 0;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
190
|
+
const hasIcon = icon === "search";
|
|
191
|
+
const hasClear = Boolean(showClearButton && slice.value && !disabled);
|
|
192
|
+
return /* @__PURE__ */ jsxs(
|
|
193
|
+
"div",
|
|
194
|
+
{
|
|
195
|
+
className: [
|
|
196
|
+
"ev-input-comp",
|
|
197
|
+
hasIcon ? "has-icon" : "",
|
|
198
|
+
hasClear ? "has-clear" : "",
|
|
199
|
+
className ?? ""
|
|
200
|
+
].filter(Boolean).join(" "),
|
|
201
|
+
children: [
|
|
202
|
+
label && /* @__PURE__ */ jsxs("span", { className: "ev-input-comp-label", children: [
|
|
203
|
+
label,
|
|
204
|
+
mandatory && /* @__PURE__ */ jsx("span", { className: "ev-input-comp-required", children: "*" })
|
|
205
|
+
] }),
|
|
206
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-input-comp-wrap", children: [
|
|
207
|
+
hasIcon && /* @__PURE__ */ jsx(Search, { className: "ev-input-comp-icon" }),
|
|
208
|
+
/* @__PURE__ */ jsx(
|
|
209
|
+
Input,
|
|
210
|
+
{
|
|
211
|
+
className: isInvalid ? "is-invalid" : void 0,
|
|
212
|
+
placeholder,
|
|
213
|
+
value: slice.value,
|
|
214
|
+
onChange: (e) => patch({ value: e.target.value }),
|
|
215
|
+
disabled
|
|
216
|
+
}
|
|
217
|
+
),
|
|
218
|
+
hasClear && /* @__PURE__ */ jsx(
|
|
219
|
+
"button",
|
|
220
|
+
{
|
|
221
|
+
type: "button",
|
|
222
|
+
onClick: () => patch({ value: "" }),
|
|
223
|
+
className: "ev-input-comp-clear",
|
|
224
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
] })
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
);
|
|
221
231
|
}
|
|
222
232
|
var Select = SelectPrimitive.Root;
|
|
223
233
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -225,14 +235,11 @@ var SelectTrigger = React8.forwardRef(({ className, children, ...props }, ref) =
|
|
|
225
235
|
SelectPrimitive.Trigger,
|
|
226
236
|
{
|
|
227
237
|
ref,
|
|
228
|
-
className: cn(
|
|
229
|
-
"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",
|
|
230
|
-
className
|
|
231
|
-
),
|
|
238
|
+
className: cn("ev-select-trigger", className),
|
|
232
239
|
...props,
|
|
233
240
|
children: [
|
|
234
241
|
children,
|
|
235
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "
|
|
242
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "ev-select-trigger-icon" }) })
|
|
236
243
|
]
|
|
237
244
|
}
|
|
238
245
|
));
|
|
@@ -241,12 +248,9 @@ var SelectScrollUpButton = React8.forwardRef(({ className, ...props }, ref) => /
|
|
|
241
248
|
SelectPrimitive.ScrollUpButton,
|
|
242
249
|
{
|
|
243
250
|
ref,
|
|
244
|
-
className: cn(
|
|
245
|
-
"flex cursor-default items-center justify-center py-1",
|
|
246
|
-
className
|
|
247
|
-
),
|
|
251
|
+
className: cn("ev-select-scroll-button", className),
|
|
248
252
|
...props,
|
|
249
|
-
children: /* @__PURE__ */ jsx(ChevronUp, {
|
|
253
|
+
children: /* @__PURE__ */ jsx(ChevronUp, {})
|
|
250
254
|
}
|
|
251
255
|
));
|
|
252
256
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
@@ -254,12 +258,9 @@ var SelectScrollDownButton = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
254
258
|
SelectPrimitive.ScrollDownButton,
|
|
255
259
|
{
|
|
256
260
|
ref,
|
|
257
|
-
className: cn(
|
|
258
|
-
"flex cursor-default items-center justify-center py-1",
|
|
259
|
-
className
|
|
260
|
-
),
|
|
261
|
+
className: cn("ev-select-scroll-button", className),
|
|
261
262
|
...props,
|
|
262
|
-
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
263
|
+
children: /* @__PURE__ */ jsx(ChevronDown, {})
|
|
263
264
|
}
|
|
264
265
|
));
|
|
265
266
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
@@ -267,11 +268,7 @@ var SelectContent = React8.forwardRef(({ className, children, position = "popper
|
|
|
267
268
|
SelectPrimitive.Content,
|
|
268
269
|
{
|
|
269
270
|
ref,
|
|
270
|
-
className: cn(
|
|
271
|
-
"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]",
|
|
272
|
-
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",
|
|
273
|
-
className
|
|
274
|
-
),
|
|
271
|
+
className: cn("ev-select-content", className),
|
|
275
272
|
position,
|
|
276
273
|
...props,
|
|
277
274
|
children: [
|
|
@@ -280,8 +277,8 @@ var SelectContent = React8.forwardRef(({ className, children, position = "popper
|
|
|
280
277
|
SelectPrimitive.Viewport,
|
|
281
278
|
{
|
|
282
279
|
className: cn(
|
|
283
|
-
"
|
|
284
|
-
position === "popper" && "
|
|
280
|
+
"ev-select-viewport",
|
|
281
|
+
position === "popper" && "ev-select-viewport-popper"
|
|
285
282
|
),
|
|
286
283
|
children
|
|
287
284
|
}
|
|
@@ -295,7 +292,7 @@ var SelectLabel = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
295
292
|
SelectPrimitive.Label,
|
|
296
293
|
{
|
|
297
294
|
ref,
|
|
298
|
-
className: cn("
|
|
295
|
+
className: cn("ev-select-label", className),
|
|
299
296
|
...props
|
|
300
297
|
}
|
|
301
298
|
));
|
|
@@ -304,13 +301,10 @@ var SelectItem = React8.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
304
301
|
SelectPrimitive.Item,
|
|
305
302
|
{
|
|
306
303
|
ref,
|
|
307
|
-
className: cn(
|
|
308
|
-
"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",
|
|
309
|
-
className
|
|
310
|
-
),
|
|
304
|
+
className: cn("ev-select-item", className),
|
|
311
305
|
...props,
|
|
312
306
|
children: [
|
|
313
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
307
|
+
/* @__PURE__ */ jsx("span", { className: "ev-select-item-indicator", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, {}) }) }),
|
|
314
308
|
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
315
309
|
]
|
|
316
310
|
}
|
|
@@ -320,36 +314,33 @@ var SelectSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
320
314
|
SelectPrimitive.Separator,
|
|
321
315
|
{
|
|
322
316
|
ref,
|
|
323
|
-
className: cn("-
|
|
317
|
+
className: cn("ev-select-separator", className),
|
|
324
318
|
...props
|
|
325
319
|
}
|
|
326
320
|
));
|
|
327
321
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
328
|
-
var buttonVariants = cva(
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
338
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
339
|
-
},
|
|
340
|
-
size: {
|
|
341
|
-
default: "h-10 px-4 py-2",
|
|
342
|
-
sm: "h-9 rounded-md px-3",
|
|
343
|
-
lg: "h-11 rounded-md px-8",
|
|
344
|
-
icon: "h-10 w-10"
|
|
345
|
-
}
|
|
322
|
+
var buttonVariants = cva("ev-btn", {
|
|
323
|
+
variants: {
|
|
324
|
+
variant: {
|
|
325
|
+
default: "ev-btn-default",
|
|
326
|
+
destructive: "ev-btn-destructive",
|
|
327
|
+
outline: "ev-btn-outline",
|
|
328
|
+
secondary: "ev-btn-secondary",
|
|
329
|
+
ghost: "ev-btn-ghost",
|
|
330
|
+
link: "ev-btn-link"
|
|
346
331
|
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
332
|
+
size: {
|
|
333
|
+
default: "ev-btn-size-default",
|
|
334
|
+
sm: "ev-btn-size-sm",
|
|
335
|
+
lg: "ev-btn-size-lg",
|
|
336
|
+
icon: "ev-btn-size-icon"
|
|
350
337
|
}
|
|
338
|
+
},
|
|
339
|
+
defaultVariants: {
|
|
340
|
+
variant: "default",
|
|
341
|
+
size: "default"
|
|
351
342
|
}
|
|
352
|
-
);
|
|
343
|
+
});
|
|
353
344
|
var Button = React8.forwardRef(
|
|
354
345
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
355
346
|
const Comp = asChild ? Slot : "button";
|
|
@@ -372,10 +363,7 @@ var PopoverContent = React8.forwardRef(({ className, align = "center", sideOffse
|
|
|
372
363
|
ref,
|
|
373
364
|
align,
|
|
374
365
|
sideOffset,
|
|
375
|
-
className: cn(
|
|
376
|
-
"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]",
|
|
377
|
-
className
|
|
378
|
-
),
|
|
366
|
+
className: cn("ev-popover-content", className),
|
|
379
367
|
...props
|
|
380
368
|
}
|
|
381
369
|
) }));
|
|
@@ -384,24 +372,18 @@ var Command = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
384
372
|
Command$1,
|
|
385
373
|
{
|
|
386
374
|
ref,
|
|
387
|
-
className: cn(
|
|
388
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
389
|
-
className
|
|
390
|
-
),
|
|
375
|
+
className: cn("ev-cmd", className),
|
|
391
376
|
...props
|
|
392
377
|
}
|
|
393
378
|
));
|
|
394
379
|
Command.displayName = Command$1.displayName;
|
|
395
|
-
var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "
|
|
396
|
-
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "
|
|
380
|
+
var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "ev-cmd-input-wrapper", "cmdk-input-wrapper": "", children: [
|
|
381
|
+
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "ev-cmd-input-icon" }),
|
|
397
382
|
/* @__PURE__ */ jsx(
|
|
398
383
|
Command$1.Input,
|
|
399
384
|
{
|
|
400
385
|
ref,
|
|
401
|
-
className: cn(
|
|
402
|
-
"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",
|
|
403
|
-
className
|
|
404
|
-
),
|
|
386
|
+
className: cn("ev-cmd-input", className),
|
|
405
387
|
...props
|
|
406
388
|
}
|
|
407
389
|
)
|
|
@@ -411,7 +393,7 @@ var CommandList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
411
393
|
Command$1.List,
|
|
412
394
|
{
|
|
413
395
|
ref,
|
|
414
|
-
className: cn("
|
|
396
|
+
className: cn("ev-cmd-list", className),
|
|
415
397
|
...props
|
|
416
398
|
}
|
|
417
399
|
));
|
|
@@ -420,7 +402,7 @@ var CommandEmpty = React8.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
420
402
|
Command$1.Empty,
|
|
421
403
|
{
|
|
422
404
|
ref,
|
|
423
|
-
className: "
|
|
405
|
+
className: "ev-cmd-empty",
|
|
424
406
|
...props
|
|
425
407
|
}
|
|
426
408
|
));
|
|
@@ -429,10 +411,7 @@ var CommandGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
429
411
|
Command$1.Group,
|
|
430
412
|
{
|
|
431
413
|
ref,
|
|
432
|
-
className: cn(
|
|
433
|
-
"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",
|
|
434
|
-
className
|
|
435
|
-
),
|
|
414
|
+
className: cn("ev-cmd-group", className),
|
|
436
415
|
...props
|
|
437
416
|
}
|
|
438
417
|
));
|
|
@@ -441,7 +420,7 @@ var CommandSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
441
420
|
Command$1.Separator,
|
|
442
421
|
{
|
|
443
422
|
ref,
|
|
444
|
-
className: cn("-
|
|
423
|
+
className: cn("ev-cmd-separator", className),
|
|
445
424
|
...props
|
|
446
425
|
}
|
|
447
426
|
));
|
|
@@ -450,10 +429,7 @@ var CommandItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
450
429
|
Command$1.Item,
|
|
451
430
|
{
|
|
452
431
|
ref,
|
|
453
|
-
className: cn(
|
|
454
|
-
"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",
|
|
455
|
-
className
|
|
456
|
-
),
|
|
432
|
+
className: cn("ev-cmd-item", className),
|
|
457
433
|
...props
|
|
458
434
|
}
|
|
459
435
|
));
|
|
@@ -505,13 +481,16 @@ function EasyVisionSelector({
|
|
|
505
481
|
}, [value, onChange]);
|
|
506
482
|
const isInvalid = mandatory && (value === void 0 || value === "");
|
|
507
483
|
const commit = (v) => patch({ value: v });
|
|
508
|
-
const
|
|
484
|
+
const triggerExtraClasses = [
|
|
485
|
+
isInvalid ? "ev-selector-trigger-invalid" : "",
|
|
486
|
+
className ?? ""
|
|
487
|
+
].filter(Boolean).join(" ");
|
|
509
488
|
if (searchable) {
|
|
510
489
|
const labelOf = (v) => opts.find((o) => o.value === v)?.label ?? "";
|
|
511
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
512
|
-
label && /* @__PURE__ */ jsxs("span", { className: "
|
|
490
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-selector", children: [
|
|
491
|
+
label && /* @__PURE__ */ jsxs("span", { className: "ev-selector-label", children: [
|
|
513
492
|
label,
|
|
514
|
-
mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
493
|
+
mandatory && /* @__PURE__ */ jsx("span", { className: "ev-selector-required", children: "*" })
|
|
515
494
|
] }),
|
|
516
495
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
517
496
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -520,14 +499,14 @@ function EasyVisionSelector({
|
|
|
520
499
|
variant: "outline",
|
|
521
500
|
role: "combobox",
|
|
522
501
|
disabled,
|
|
523
|
-
className:
|
|
502
|
+
className: ["ev-selector-combo-trigger", triggerExtraClasses].filter(Boolean).join(" "),
|
|
524
503
|
children: [
|
|
525
|
-
value !== void 0 && value !== "" ? labelOf(value) : /* @__PURE__ */ jsx("span", { className: "
|
|
526
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "
|
|
504
|
+
value !== void 0 && value !== "" ? labelOf(value) : /* @__PURE__ */ jsx("span", { className: "ev-selector-combo-placeholder", children: placeholder }),
|
|
505
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "ev-selector-combo-icon" })
|
|
527
506
|
]
|
|
528
507
|
}
|
|
529
508
|
) }),
|
|
530
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "
|
|
509
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "ev-selector-combo-popover", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
531
510
|
/* @__PURE__ */ jsx(CommandInput, { placeholder: "Buscar..." }),
|
|
532
511
|
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
533
512
|
/* @__PURE__ */ jsx(CommandEmpty, { children: "Sin resultados" }),
|
|
@@ -537,7 +516,7 @@ function EasyVisionSelector({
|
|
|
537
516
|
value: o.label,
|
|
538
517
|
onSelect: () => commit(o.value),
|
|
539
518
|
children: [
|
|
540
|
-
/* @__PURE__ */ jsx(Check, { className:
|
|
519
|
+
/* @__PURE__ */ jsx(Check, { className: ["ev-selector-item-check", value === o.value ? "" : "is-hidden"].filter(Boolean).join(" ") }),
|
|
541
520
|
o.label
|
|
542
521
|
]
|
|
543
522
|
},
|
|
@@ -560,14 +539,14 @@ function EasyVisionSelector({
|
|
|
560
539
|
if (confirmMode) setPending(next);
|
|
561
540
|
else commit(next);
|
|
562
541
|
};
|
|
563
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
564
|
-
label && /* @__PURE__ */ jsxs("span", { className: "
|
|
542
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-selector", children: [
|
|
543
|
+
label && /* @__PURE__ */ jsxs("span", { className: "ev-selector-label", children: [
|
|
565
544
|
label,
|
|
566
|
-
mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
545
|
+
mandatory && /* @__PURE__ */ jsx("span", { className: "ev-selector-required", children: "*" })
|
|
567
546
|
] }),
|
|
568
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
547
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-selector-row", children: [
|
|
569
548
|
/* @__PURE__ */ jsxs(Select, { value: selectValue, onValueChange, disabled, children: [
|
|
570
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className:
|
|
549
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: triggerExtraClasses || void 0, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
|
|
571
550
|
/* @__PURE__ */ jsx(SelectContent, { children: opts.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
|
|
572
551
|
] }),
|
|
573
552
|
!mandatory && value !== void 0 && value !== "" && !disabled && /* @__PURE__ */ jsx(
|
|
@@ -575,9 +554,9 @@ function EasyVisionSelector({
|
|
|
575
554
|
{
|
|
576
555
|
type: "button",
|
|
577
556
|
onClick: () => confirmMode ? setPending(void 0) : commit(void 0),
|
|
578
|
-
className: "
|
|
557
|
+
className: "ev-selector-clear",
|
|
579
558
|
"aria-label": "Limpiar",
|
|
580
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
559
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
581
560
|
}
|
|
582
561
|
),
|
|
583
562
|
confirmMode && pending !== value && /* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => commit(pending), children: confirmLabel })
|
|
@@ -585,16 +564,16 @@ function EasyVisionSelector({
|
|
|
585
564
|
] });
|
|
586
565
|
}
|
|
587
566
|
function TextWidget({ definition, value, onChange, onRemove }) {
|
|
588
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
589
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
567
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
568
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
590
569
|
definition.label,
|
|
591
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
570
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
592
571
|
":"
|
|
593
572
|
] }),
|
|
594
573
|
/* @__PURE__ */ jsx(
|
|
595
574
|
Input,
|
|
596
575
|
{
|
|
597
|
-
className: "
|
|
576
|
+
className: "ev-mf-chip-input",
|
|
598
577
|
placeholder: definition.placeholder,
|
|
599
578
|
value: value ?? "",
|
|
600
579
|
onChange: (e) => onChange(e.target.value)
|
|
@@ -605,8 +584,8 @@ function TextWidget({ definition, value, onChange, onRemove }) {
|
|
|
605
584
|
{
|
|
606
585
|
type: "button",
|
|
607
586
|
onClick: onRemove,
|
|
608
|
-
className: "
|
|
609
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
587
|
+
className: "ev-mf-chip-remove",
|
|
588
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
610
589
|
}
|
|
611
590
|
)
|
|
612
591
|
] });
|
|
@@ -625,10 +604,10 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
625
604
|
}, [definition.options, resolved]);
|
|
626
605
|
const opts = resolved ?? [];
|
|
627
606
|
const selectValue = value === void 0 || value === "" ? SENTINEL : String(value);
|
|
628
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
629
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
607
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
608
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
630
609
|
definition.label,
|
|
631
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
610
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
632
611
|
":"
|
|
633
612
|
] }),
|
|
634
613
|
/* @__PURE__ */ jsxs(
|
|
@@ -643,7 +622,7 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
643
622
|
}
|
|
644
623
|
},
|
|
645
624
|
children: [
|
|
646
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "
|
|
625
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "ev-mf-chip-select-trigger", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: definition.placeholder ?? "Seleccionar" }) }),
|
|
647
626
|
/* @__PURE__ */ jsx(SelectContent, { children: opts.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
|
|
648
627
|
]
|
|
649
628
|
}
|
|
@@ -653,8 +632,8 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
653
632
|
{
|
|
654
633
|
type: "button",
|
|
655
634
|
onClick: onRemove,
|
|
656
|
-
className: "
|
|
657
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
635
|
+
className: "ev-mf-chip-remove",
|
|
636
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
658
637
|
}
|
|
659
638
|
)
|
|
660
639
|
] });
|
|
@@ -663,18 +642,9 @@ var Checkbox = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
663
642
|
CheckboxPrimitive.Root,
|
|
664
643
|
{
|
|
665
644
|
ref,
|
|
666
|
-
className: cn(
|
|
667
|
-
"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",
|
|
668
|
-
className
|
|
669
|
-
),
|
|
645
|
+
className: cn("ev-checkbox", className),
|
|
670
646
|
...props,
|
|
671
|
-
children: /* @__PURE__ */ jsx(
|
|
672
|
-
CheckboxPrimitive.Indicator,
|
|
673
|
-
{
|
|
674
|
-
className: cn("flex items-center justify-center text-current w-full h-full"),
|
|
675
|
-
children: /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" })
|
|
676
|
-
}
|
|
677
|
-
)
|
|
647
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "ev-checkbox-indicator", children: /* @__PURE__ */ jsx(Check, {}) })
|
|
678
648
|
}
|
|
679
649
|
));
|
|
680
650
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -706,69 +676,48 @@ function MultiSelectWidget({
|
|
|
706
676
|
};
|
|
707
677
|
const removeOne = (v) => onChange(selected.filter((x) => x !== v));
|
|
708
678
|
const labelOf = (v) => opts.find((o) => o.value === v)?.label ?? String(v);
|
|
709
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
710
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
679
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip is-wrap", children: [
|
|
680
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
711
681
|
definition.label,
|
|
712
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
682
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
713
683
|
":"
|
|
714
684
|
] }),
|
|
715
|
-
selected.map((v) => /* @__PURE__ */ jsxs(
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
className: "inline-flex items-center gap-1 bg-primary/10 text-primary text-xs px-2 py-0.5 rounded-md",
|
|
719
|
-
children: [
|
|
720
|
-
labelOf(v),
|
|
721
|
-
/* @__PURE__ */ jsx(
|
|
722
|
-
"button",
|
|
723
|
-
{
|
|
724
|
-
type: "button",
|
|
725
|
-
onClick: () => removeOne(v),
|
|
726
|
-
className: "p-0.5 hover:bg-muted rounded",
|
|
727
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
728
|
-
}
|
|
729
|
-
)
|
|
730
|
-
]
|
|
731
|
-
},
|
|
732
|
-
String(v)
|
|
733
|
-
)),
|
|
734
|
-
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
735
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
685
|
+
selected.map((v) => /* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-badge", children: [
|
|
686
|
+
labelOf(v),
|
|
687
|
+
/* @__PURE__ */ jsx(
|
|
736
688
|
"button",
|
|
737
689
|
{
|
|
738
690
|
type: "button",
|
|
739
|
-
|
|
740
|
-
|
|
691
|
+
onClick: () => removeOne(v),
|
|
692
|
+
className: "ev-mf-chip-badge-x",
|
|
693
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
741
694
|
}
|
|
742
|
-
)
|
|
743
|
-
|
|
695
|
+
)
|
|
696
|
+
] }, String(v))),
|
|
697
|
+
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
698
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "ev-mf-chip-caret", children: /* @__PURE__ */ jsx(ChevronDown, {}) }) }),
|
|
699
|
+
/* @__PURE__ */ jsxs(PopoverContent, { className: "ev-mf-ms-popover", align: "start", children: [
|
|
744
700
|
/* @__PURE__ */ jsx(
|
|
745
701
|
Input,
|
|
746
702
|
{
|
|
747
|
-
className: "
|
|
703
|
+
className: "ev-mf-ms-search",
|
|
748
704
|
placeholder: "Buscar...",
|
|
749
705
|
value: search,
|
|
750
706
|
onChange: (e) => setSearch(e.target.value)
|
|
751
707
|
}
|
|
752
708
|
),
|
|
753
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
754
|
-
filtered.map((o) => /* @__PURE__ */ jsxs(
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
),
|
|
766
|
-
o.label
|
|
767
|
-
]
|
|
768
|
-
},
|
|
769
|
-
String(o.value)
|
|
770
|
-
)),
|
|
771
|
-
filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: "Sin opciones" })
|
|
709
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-mf-ms-list", children: [
|
|
710
|
+
filtered.map((o) => /* @__PURE__ */ jsxs("label", { className: "ev-mf-ms-option", children: [
|
|
711
|
+
/* @__PURE__ */ jsx(
|
|
712
|
+
Checkbox,
|
|
713
|
+
{
|
|
714
|
+
checked: selected.includes(o.value),
|
|
715
|
+
onCheckedChange: () => toggle(o.value)
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
o.label
|
|
719
|
+
] }, String(o.value))),
|
|
720
|
+
filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "ev-mf-ms-empty", children: "Sin opciones" })
|
|
772
721
|
] })
|
|
773
722
|
] })
|
|
774
723
|
] }),
|
|
@@ -777,8 +726,8 @@ function MultiSelectWidget({
|
|
|
777
726
|
{
|
|
778
727
|
type: "button",
|
|
779
728
|
onClick: onRemove,
|
|
780
|
-
className: "
|
|
781
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
729
|
+
className: "ev-mf-chip-remove",
|
|
730
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
782
731
|
}
|
|
783
732
|
)
|
|
784
733
|
] });
|
|
@@ -793,40 +742,37 @@ function Calendar({
|
|
|
793
742
|
DayPicker,
|
|
794
743
|
{
|
|
795
744
|
showOutsideDays,
|
|
796
|
-
className: cn("
|
|
745
|
+
className: cn("ev-cal", className),
|
|
797
746
|
classNames: {
|
|
798
|
-
months: "
|
|
799
|
-
month: "
|
|
800
|
-
caption: "
|
|
801
|
-
caption_label: "
|
|
802
|
-
nav: "
|
|
747
|
+
months: "ev-cal-months",
|
|
748
|
+
month: "ev-cal-month",
|
|
749
|
+
caption: "ev-cal-caption",
|
|
750
|
+
caption_label: "ev-cal-caption-label",
|
|
751
|
+
nav: "ev-cal-nav",
|
|
803
752
|
nav_button: cn(
|
|
804
753
|
buttonVariants({ variant: "outline" }),
|
|
805
|
-
"
|
|
806
|
-
),
|
|
807
|
-
nav_button_previous: "absolute left-1",
|
|
808
|
-
nav_button_next: "absolute right-1",
|
|
809
|
-
table: "w-full border-collapse space-y-1",
|
|
810
|
-
head_row: "flex",
|
|
811
|
-
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
812
|
-
row: "flex w-full mt-2",
|
|
813
|
-
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",
|
|
814
|
-
day: cn(
|
|
815
|
-
buttonVariants({ variant: "ghost" }),
|
|
816
|
-
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
754
|
+
"ev-cal-nav-button"
|
|
817
755
|
),
|
|
756
|
+
nav_button_previous: "ev-cal-nav-button-previous",
|
|
757
|
+
nav_button_next: "ev-cal-nav-button-next",
|
|
758
|
+
table: "ev-cal-table",
|
|
759
|
+
head_row: "ev-cal-head-row",
|
|
760
|
+
head_cell: "ev-cal-head-cell",
|
|
761
|
+
row: "ev-cal-row",
|
|
762
|
+
cell: "ev-cal-cell",
|
|
763
|
+
day: cn(buttonVariants({ variant: "ghost" }), "ev-cal-day"),
|
|
818
764
|
day_range_end: "day-range-end",
|
|
819
|
-
day_selected: "
|
|
820
|
-
day_today: "
|
|
821
|
-
day_outside: "day-outside
|
|
822
|
-
day_disabled: "
|
|
823
|
-
day_range_middle: "
|
|
824
|
-
day_hidden: "
|
|
765
|
+
day_selected: "ev-cal-day-selected",
|
|
766
|
+
day_today: "ev-cal-day-today",
|
|
767
|
+
day_outside: "day-outside ev-cal-day-outside",
|
|
768
|
+
day_disabled: "ev-cal-day-disabled",
|
|
769
|
+
day_range_middle: "ev-cal-day-range-middle",
|
|
770
|
+
day_hidden: "ev-cal-day-hidden",
|
|
825
771
|
...classNames
|
|
826
772
|
},
|
|
827
773
|
components: {
|
|
828
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronLeft, { className: cn("
|
|
829
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronRight, { className: cn("
|
|
774
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronLeft, { className: cn("ev-cal-icon", className2), ...props2 }),
|
|
775
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronRight, { className: cn("ev-cal-icon", className2), ...props2 })
|
|
830
776
|
},
|
|
831
777
|
...props
|
|
832
778
|
}
|
|
@@ -848,25 +794,18 @@ function DateRangeWidget({
|
|
|
848
794
|
if (range.to) return `Hasta ${format(range.to, "dd/MM/yy", { locale: es })}`;
|
|
849
795
|
return definition.placeholder ?? "Seleccionar rango";
|
|
850
796
|
})();
|
|
851
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
852
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
797
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
798
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
853
799
|
definition.label,
|
|
854
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
800
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
855
801
|
":"
|
|
856
802
|
] }),
|
|
857
803
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
858
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
859
|
-
|
|
860
|
-
{
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
children: [
|
|
864
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "h-3.5 w-3.5" }),
|
|
865
|
-
/* @__PURE__ */ jsx("span", { children: label })
|
|
866
|
-
]
|
|
867
|
-
}
|
|
868
|
-
) }),
|
|
869
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
|
|
804
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { type: "button", className: "ev-mf-chip-trigger-btn", children: [
|
|
805
|
+
/* @__PURE__ */ jsx(Calendar$1, {}),
|
|
806
|
+
/* @__PURE__ */ jsx("span", { children: label })
|
|
807
|
+
] }) }),
|
|
808
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "ev-mf-daterange-popover", align: "start", children: /* @__PURE__ */ jsx(
|
|
870
809
|
Calendar,
|
|
871
810
|
{
|
|
872
811
|
mode: "range",
|
|
@@ -882,8 +821,8 @@ function DateRangeWidget({
|
|
|
882
821
|
{
|
|
883
822
|
type: "button",
|
|
884
823
|
onClick: onRemove,
|
|
885
|
-
className: "
|
|
886
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
824
|
+
className: "ev-mf-chip-remove",
|
|
825
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
887
826
|
}
|
|
888
827
|
)
|
|
889
828
|
] });
|
|
@@ -895,28 +834,28 @@ function NumberRangeWidget({
|
|
|
895
834
|
onRemove
|
|
896
835
|
}) {
|
|
897
836
|
const range = value ?? {};
|
|
898
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
899
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
837
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
838
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
900
839
|
definition.label,
|
|
901
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
840
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
902
841
|
":"
|
|
903
842
|
] }),
|
|
904
843
|
/* @__PURE__ */ jsx(
|
|
905
844
|
Input,
|
|
906
845
|
{
|
|
907
846
|
type: "number",
|
|
908
|
-
className: "
|
|
847
|
+
className: "ev-mf-chip-number",
|
|
909
848
|
placeholder: "Min",
|
|
910
849
|
value: range.min ?? "",
|
|
911
850
|
onChange: (e) => onChange({ ...range, min: e.target.value ? Number(e.target.value) : void 0 })
|
|
912
851
|
}
|
|
913
852
|
),
|
|
914
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
853
|
+
/* @__PURE__ */ jsx("span", { className: "ev-mf-chip-dash", children: "\u2014" }),
|
|
915
854
|
/* @__PURE__ */ jsx(
|
|
916
855
|
Input,
|
|
917
856
|
{
|
|
918
857
|
type: "number",
|
|
919
|
-
className: "
|
|
858
|
+
className: "ev-mf-chip-number",
|
|
920
859
|
placeholder: "Max",
|
|
921
860
|
value: range.max ?? "",
|
|
922
861
|
onChange: (e) => onChange({ ...range, max: e.target.value ? Number(e.target.value) : void 0 })
|
|
@@ -927,8 +866,8 @@ function NumberRangeWidget({
|
|
|
927
866
|
{
|
|
928
867
|
type: "button",
|
|
929
868
|
onClick: onRemove,
|
|
930
|
-
className: "
|
|
931
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
869
|
+
className: "ev-mf-chip-remove",
|
|
870
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
932
871
|
}
|
|
933
872
|
)
|
|
934
873
|
] });
|
|
@@ -1165,6 +1104,8 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1165
1104
|
performPosition = "inline",
|
|
1166
1105
|
performTargetRef,
|
|
1167
1106
|
performOnMount = false,
|
|
1107
|
+
performMode = "auto",
|
|
1108
|
+
performDebounceMs = 0,
|
|
1168
1109
|
onPerform,
|
|
1169
1110
|
onChange,
|
|
1170
1111
|
onStateChange,
|
|
@@ -1174,6 +1115,7 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1174
1115
|
persist = false,
|
|
1175
1116
|
clearWhen
|
|
1176
1117
|
} = props;
|
|
1118
|
+
const resolvedPerformMode = performMode === "live" ? "live" : "manual";
|
|
1177
1119
|
const labels = { ...DEFAULT_LABELS, ...labelOverrides };
|
|
1178
1120
|
const showClear = showClearAll ?? editable;
|
|
1179
1121
|
const initialActive = useMemo(() => {
|
|
@@ -1211,17 +1153,17 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1211
1153
|
}) : void 0
|
|
1212
1154
|
});
|
|
1213
1155
|
const { activeFields, values, lastConfirmedSnapshotJSON } = slice;
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1156
|
+
const registryState = useSyncExternalStore(
|
|
1157
|
+
easyVisionRegistry.subscribe,
|
|
1158
|
+
easyVisionRegistry.getState,
|
|
1159
|
+
easyVisionRegistry.getState
|
|
1160
|
+
);
|
|
1219
1161
|
const childSnapshots = useMemo(() => {
|
|
1220
1162
|
const out = {};
|
|
1221
1163
|
for (const f of config.fields) {
|
|
1222
1164
|
if (f.type !== "multifilter") continue;
|
|
1223
1165
|
const childFullId = `${fullId}.${f.id}-multifilter`;
|
|
1224
|
-
const childSlice =
|
|
1166
|
+
const childSlice = registryState.slices[childFullId];
|
|
1225
1167
|
if (childSlice) {
|
|
1226
1168
|
out[f.id] = {
|
|
1227
1169
|
values: childSlice.values,
|
|
@@ -1230,7 +1172,7 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1230
1172
|
}
|
|
1231
1173
|
}
|
|
1232
1174
|
return out;
|
|
1233
|
-
}, [fullId, config.fields,
|
|
1175
|
+
}, [fullId, config.fields, registryState]);
|
|
1234
1176
|
const childQueries = useMemo(() => {
|
|
1235
1177
|
const out = {};
|
|
1236
1178
|
for (const f of config.fields) {
|
|
@@ -1302,7 +1244,10 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1302
1244
|
const performAction = useCallback(() => {
|
|
1303
1245
|
const key = buildSnapshotKey({ activeFields, values: composedValues });
|
|
1304
1246
|
patch({ lastConfirmedSnapshotJSON: key });
|
|
1305
|
-
onPerform
|
|
1247
|
+
if (onPerform) {
|
|
1248
|
+
const emitted = { ...snapshot, isDirty: false };
|
|
1249
|
+
queueMicrotask(() => onPerform(emitted));
|
|
1250
|
+
}
|
|
1306
1251
|
}, [activeFields, composedValues, patch, onPerform, snapshot]);
|
|
1307
1252
|
const didPerformOnMountRef = useRef(false);
|
|
1308
1253
|
useEffect(() => {
|
|
@@ -1311,6 +1256,28 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1311
1256
|
performAction();
|
|
1312
1257
|
}
|
|
1313
1258
|
}, [performOnMount]);
|
|
1259
|
+
const liveTimerRef = useRef(null);
|
|
1260
|
+
const livePrevKeyRef = useRef(null);
|
|
1261
|
+
useEffect(() => {
|
|
1262
|
+
if (resolvedPerformMode !== "live") return;
|
|
1263
|
+
if (livePrevKeyRef.current === null) {
|
|
1264
|
+
livePrevKeyRef.current = snapshotKey;
|
|
1265
|
+
return;
|
|
1266
|
+
}
|
|
1267
|
+
if (livePrevKeyRef.current === snapshotKey) return;
|
|
1268
|
+
livePrevKeyRef.current = snapshotKey;
|
|
1269
|
+
if (liveTimerRef.current !== null) clearTimeout(liveTimerRef.current);
|
|
1270
|
+
liveTimerRef.current = setTimeout(() => {
|
|
1271
|
+
liveTimerRef.current = null;
|
|
1272
|
+
performAction();
|
|
1273
|
+
}, performDebounceMs);
|
|
1274
|
+
return () => {
|
|
1275
|
+
if (liveTimerRef.current !== null) {
|
|
1276
|
+
clearTimeout(liveTimerRef.current);
|
|
1277
|
+
liveTimerRef.current = null;
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1280
|
+
}, [snapshotKey, resolvedPerformMode, performDebounceMs, performAction]);
|
|
1314
1281
|
useImperativeHandle(ref, () => ({
|
|
1315
1282
|
perform: performAction,
|
|
1316
1283
|
getSnapshot: () => snapshot
|
|
@@ -1400,37 +1367,30 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1400
1367
|
const renderField = (f) => {
|
|
1401
1368
|
if (f.type === "multifilter") {
|
|
1402
1369
|
const removable2 = editable && !f.pinned && !f.locked;
|
|
1403
|
-
return /* @__PURE__ */ jsxs(
|
|
1404
|
-
"div",
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
labels: labelOverrides
|
|
1428
|
-
}
|
|
1429
|
-
)
|
|
1430
|
-
]
|
|
1431
|
-
},
|
|
1432
|
-
f.id
|
|
1433
|
-
);
|
|
1370
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-nested", children: [
|
|
1371
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-mf-nested-header", children: [
|
|
1372
|
+
/* @__PURE__ */ jsx("span", { className: "ev-mf-nested-label", children: f.label }),
|
|
1373
|
+
removable2 && /* @__PURE__ */ jsx(
|
|
1374
|
+
"button",
|
|
1375
|
+
{
|
|
1376
|
+
type: "button",
|
|
1377
|
+
onClick: () => removeField(f.id),
|
|
1378
|
+
className: "ev-mf-nested-remove",
|
|
1379
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
1380
|
+
}
|
|
1381
|
+
)
|
|
1382
|
+
] }),
|
|
1383
|
+
/* @__PURE__ */ jsx(
|
|
1384
|
+
EasyVisionMultifilter2,
|
|
1385
|
+
{
|
|
1386
|
+
id: f.id,
|
|
1387
|
+
config: f.config,
|
|
1388
|
+
editable,
|
|
1389
|
+
performButton: false,
|
|
1390
|
+
labels: labelOverrides
|
|
1391
|
+
}
|
|
1392
|
+
)
|
|
1393
|
+
] }, f.id);
|
|
1434
1394
|
}
|
|
1435
1395
|
const removable = editable && !f.pinned && !f.locked;
|
|
1436
1396
|
return /* @__PURE__ */ jsx(
|
|
@@ -1444,18 +1404,18 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1444
1404
|
f.id
|
|
1445
1405
|
);
|
|
1446
1406
|
};
|
|
1447
|
-
return /* @__PURE__ */ jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsxs("div", { className: "
|
|
1448
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1407
|
+
return /* @__PURE__ */ jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsxs("div", { className: "ev-mf-panel", children: [
|
|
1408
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-mf-row", children: [
|
|
1449
1409
|
prominentSlots.map(({ def, removable, isLegacySearchField }) => /* @__PURE__ */ jsxs(
|
|
1450
1410
|
"div",
|
|
1451
1411
|
{
|
|
1452
|
-
className: "
|
|
1412
|
+
className: "ev-mf-search-slot",
|
|
1453
1413
|
children: [
|
|
1454
|
-
/* @__PURE__ */ jsx(Search, { className: "
|
|
1414
|
+
/* @__PURE__ */ jsx(Search, { className: "ev-mf-search-icon" }),
|
|
1455
1415
|
/* @__PURE__ */ jsx(
|
|
1456
|
-
|
|
1416
|
+
"input",
|
|
1457
1417
|
{
|
|
1458
|
-
className:
|
|
1418
|
+
className: ["ev-mf-search-input", removable ? "has-clear" : "no-clear"].filter(Boolean).join(" "),
|
|
1459
1419
|
placeholder: def.placeholder ?? def.label ?? labels.searchPlaceholder,
|
|
1460
1420
|
value: values[def.id] ?? "",
|
|
1461
1421
|
onChange: (e) => updateValue(def.id, e.target.value),
|
|
@@ -1472,8 +1432,8 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1472
1432
|
type: "button",
|
|
1473
1433
|
onClick: () => removeField(def.id),
|
|
1474
1434
|
"aria-label": labels.clear,
|
|
1475
|
-
className: "
|
|
1476
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
1435
|
+
className: "ev-mf-search-clear",
|
|
1436
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
1477
1437
|
}
|
|
1478
1438
|
)
|
|
1479
1439
|
]
|
|
@@ -1486,19 +1446,19 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1486
1446
|
{
|
|
1487
1447
|
variant: "outline",
|
|
1488
1448
|
size: "sm",
|
|
1489
|
-
className: "
|
|
1449
|
+
className: "ev-mf-add-btn",
|
|
1490
1450
|
"aria-label": labels.addFilter,
|
|
1491
|
-
children: /* @__PURE__ */ jsx(Plus, {
|
|
1451
|
+
children: /* @__PURE__ */ jsx(Plus, {})
|
|
1492
1452
|
}
|
|
1493
1453
|
) }),
|
|
1494
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "
|
|
1454
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "ev-mf-add-popover", align: "start", children: /* @__PURE__ */ jsx("div", { className: "ev-mf-add-list", children: availableToAdd.map((f) => /* @__PURE__ */ jsxs(
|
|
1495
1455
|
"button",
|
|
1496
1456
|
{
|
|
1497
1457
|
type: "button",
|
|
1498
1458
|
onClick: () => addField(f.id),
|
|
1499
|
-
className: "
|
|
1459
|
+
className: "ev-mf-add-item",
|
|
1500
1460
|
children: [
|
|
1501
|
-
/* @__PURE__ */ jsx(Plus, {
|
|
1461
|
+
/* @__PURE__ */ jsx(Plus, {}),
|
|
1502
1462
|
f.label
|
|
1503
1463
|
]
|
|
1504
1464
|
},
|
|
@@ -1511,9 +1471,9 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1511
1471
|
size: "sm",
|
|
1512
1472
|
onClick: performAction,
|
|
1513
1473
|
disabled: !performEnabled,
|
|
1514
|
-
className: "
|
|
1474
|
+
className: "ev-mf-perform",
|
|
1515
1475
|
children: [
|
|
1516
|
-
performIcon ?? /* @__PURE__ */ jsx(Search, {
|
|
1476
|
+
performIcon ?? /* @__PURE__ */ jsx(Search, {}),
|
|
1517
1477
|
performLabelText
|
|
1518
1478
|
]
|
|
1519
1479
|
}
|
|
@@ -1524,25 +1484,25 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1524
1484
|
variant: "ghost",
|
|
1525
1485
|
size: "sm",
|
|
1526
1486
|
onClick: clearAll,
|
|
1527
|
-
className: "
|
|
1487
|
+
className: "ev-mf-clear",
|
|
1528
1488
|
children: [
|
|
1529
|
-
/* @__PURE__ */ jsx(X, {
|
|
1489
|
+
/* @__PURE__ */ jsx(X, {}),
|
|
1530
1490
|
labels.clear
|
|
1531
1491
|
]
|
|
1532
1492
|
}
|
|
1533
1493
|
)
|
|
1534
1494
|
] }),
|
|
1535
|
-
pinnedFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "
|
|
1536
|
-
chipFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "
|
|
1537
|
-
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsx("div", { className: "
|
|
1495
|
+
pinnedFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "ev-mf-row", children: pinnedFields.map(renderField) }),
|
|
1496
|
+
chipFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "ev-mf-row", children: chipFields.map(renderField) }),
|
|
1497
|
+
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsx("div", { className: "ev-mf-below-row", children: /* @__PURE__ */ jsxs(
|
|
1538
1498
|
Button,
|
|
1539
1499
|
{
|
|
1540
1500
|
size: "sm",
|
|
1541
1501
|
onClick: performAction,
|
|
1542
1502
|
disabled: !performEnabled,
|
|
1543
|
-
className: "
|
|
1503
|
+
className: "ev-mf-perform",
|
|
1544
1504
|
children: [
|
|
1545
|
-
performIcon ?? /* @__PURE__ */ jsx(Search, {
|
|
1505
|
+
performIcon ?? /* @__PURE__ */ jsx(Search, {}),
|
|
1546
1506
|
performLabelText
|
|
1547
1507
|
]
|
|
1548
1508
|
}
|
|
@@ -1601,133 +1561,33 @@ function buildChildQueryDirect(field, values) {
|
|
|
1601
1561
|
return Object.keys(where).length > 0 ? { where } : {};
|
|
1602
1562
|
}
|
|
1603
1563
|
var join = (...parts) => parts.filter(Boolean).join(" ");
|
|
1604
|
-
var EasyVisionCard = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1605
|
-
"div",
|
|
1606
|
-
{
|
|
1607
|
-
ref,
|
|
1608
|
-
className: join(
|
|
1609
|
-
"rounded-md border border-border bg-card text-card-foreground shadow-sm",
|
|
1610
|
-
className
|
|
1611
|
-
),
|
|
1612
|
-
...props
|
|
1613
|
-
}
|
|
1614
|
-
));
|
|
1564
|
+
var EasyVisionCard = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card", className), ...props }));
|
|
1615
1565
|
EasyVisionCard.displayName = "EasyVisionCard";
|
|
1616
|
-
var EasyVisionCardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1617
|
-
"div",
|
|
1618
|
-
{
|
|
1619
|
-
ref,
|
|
1620
|
-
className: join("flex flex-col space-y-1.5 p-6", className),
|
|
1621
|
-
...props
|
|
1622
|
-
}
|
|
1623
|
-
));
|
|
1566
|
+
var EasyVisionCardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card-header", className), ...props }));
|
|
1624
1567
|
EasyVisionCardHeader.displayName = "EasyVisionCardHeader";
|
|
1625
|
-
var EasyVisionCardTitle = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1626
|
-
"h3",
|
|
1627
|
-
{
|
|
1628
|
-
ref,
|
|
1629
|
-
className: join(
|
|
1630
|
-
"text-2xl font-semibold leading-none tracking-tight",
|
|
1631
|
-
className
|
|
1632
|
-
),
|
|
1633
|
-
...props,
|
|
1634
|
-
children
|
|
1635
|
-
}
|
|
1636
|
-
));
|
|
1568
|
+
var EasyVisionCardTitle = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: join("ev-card-title", className), ...props, children }));
|
|
1637
1569
|
EasyVisionCardTitle.displayName = "EasyVisionCardTitle";
|
|
1638
|
-
var EasyVisionCardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1639
|
-
"p",
|
|
1640
|
-
{
|
|
1641
|
-
ref,
|
|
1642
|
-
className: join("text-sm text-muted-foreground", className),
|
|
1643
|
-
...props
|
|
1644
|
-
}
|
|
1645
|
-
));
|
|
1570
|
+
var EasyVisionCardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: join("ev-card-description", className), ...props }));
|
|
1646
1571
|
EasyVisionCardDescription.displayName = "EasyVisionCardDescription";
|
|
1647
|
-
var EasyVisionCardContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("
|
|
1572
|
+
var EasyVisionCardContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card-content", className), ...props }));
|
|
1648
1573
|
EasyVisionCardContent.displayName = "EasyVisionCardContent";
|
|
1649
|
-
var EasyVisionCardFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1650
|
-
"div",
|
|
1651
|
-
{
|
|
1652
|
-
ref,
|
|
1653
|
-
className: join("flex items-center p-6 pt-0", className),
|
|
1654
|
-
...props
|
|
1655
|
-
}
|
|
1656
|
-
));
|
|
1574
|
+
var EasyVisionCardFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card-footer", className), ...props }));
|
|
1657
1575
|
EasyVisionCardFooter.displayName = "EasyVisionCardFooter";
|
|
1658
|
-
var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("
|
|
1659
|
-
"table",
|
|
1660
|
-
{
|
|
1661
|
-
ref,
|
|
1662
|
-
className: cn("w-full caption-bottom text-sm", className),
|
|
1663
|
-
...props
|
|
1664
|
-
}
|
|
1665
|
-
) }));
|
|
1576
|
+
var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("table", { ref, className: cn("ev-table", className), ...props }));
|
|
1666
1577
|
Table.displayName = "Table";
|
|
1667
|
-
var TableHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className
|
|
1578
|
+
var TableHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className, ...props }));
|
|
1668
1579
|
TableHeader.displayName = "TableHeader";
|
|
1669
|
-
var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1670
|
-
"tbody",
|
|
1671
|
-
{
|
|
1672
|
-
ref,
|
|
1673
|
-
className: cn("[&_tr:last-child]:border-0", className),
|
|
1674
|
-
...props
|
|
1675
|
-
}
|
|
1676
|
-
));
|
|
1580
|
+
var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className, ...props }));
|
|
1677
1581
|
TableBody.displayName = "TableBody";
|
|
1678
|
-
var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1679
|
-
"tfoot",
|
|
1680
|
-
{
|
|
1681
|
-
ref,
|
|
1682
|
-
className: cn(
|
|
1683
|
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1684
|
-
className
|
|
1685
|
-
),
|
|
1686
|
-
...props
|
|
1687
|
-
}
|
|
1688
|
-
));
|
|
1582
|
+
var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className, ...props }));
|
|
1689
1583
|
TableFooter.displayName = "TableFooter";
|
|
1690
|
-
var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1691
|
-
"tr",
|
|
1692
|
-
{
|
|
1693
|
-
ref,
|
|
1694
|
-
className: cn(
|
|
1695
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1696
|
-
className
|
|
1697
|
-
),
|
|
1698
|
-
...props
|
|
1699
|
-
}
|
|
1700
|
-
));
|
|
1584
|
+
var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", { ref, className, ...props }));
|
|
1701
1585
|
TableRow.displayName = "TableRow";
|
|
1702
|
-
var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1703
|
-
"th",
|
|
1704
|
-
{
|
|
1705
|
-
ref,
|
|
1706
|
-
className: cn(
|
|
1707
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
1708
|
-
className
|
|
1709
|
-
),
|
|
1710
|
-
...props
|
|
1711
|
-
}
|
|
1712
|
-
));
|
|
1586
|
+
var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className, ...props }));
|
|
1713
1587
|
TableHead.displayName = "TableHead";
|
|
1714
|
-
var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1715
|
-
"td",
|
|
1716
|
-
{
|
|
1717
|
-
ref,
|
|
1718
|
-
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
1719
|
-
...props
|
|
1720
|
-
}
|
|
1721
|
-
));
|
|
1588
|
+
var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className, ...props }));
|
|
1722
1589
|
TableCell.displayName = "TableCell";
|
|
1723
|
-
var TableCaption = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1724
|
-
"caption",
|
|
1725
|
-
{
|
|
1726
|
-
ref,
|
|
1727
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1728
|
-
...props
|
|
1729
|
-
}
|
|
1730
|
-
));
|
|
1590
|
+
var TableCaption = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className, ...props }));
|
|
1731
1591
|
TableCaption.displayName = "TableCaption";
|
|
1732
1592
|
var isNestedField = (field) => field.includes(".");
|
|
1733
1593
|
var resolvePath = (obj, path) => path.split(".").reduce(
|
|
@@ -1862,14 +1722,14 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
1862
1722
|
{
|
|
1863
1723
|
ref,
|
|
1864
1724
|
className: cn(
|
|
1865
|
-
"
|
|
1866
|
-
inset && "
|
|
1725
|
+
"ev-dropdown-sub-trigger",
|
|
1726
|
+
inset && "ev-dropdown-inset",
|
|
1867
1727
|
className
|
|
1868
1728
|
),
|
|
1869
1729
|
...props,
|
|
1870
1730
|
children: [
|
|
1871
1731
|
children,
|
|
1872
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "
|
|
1732
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ev-dropdown-sub-trigger-chevron" })
|
|
1873
1733
|
]
|
|
1874
1734
|
}
|
|
1875
1735
|
));
|
|
@@ -1878,10 +1738,7 @@ var DropdownMenuSubContent = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
1878
1738
|
DropdownMenuPrimitive.SubContent,
|
|
1879
1739
|
{
|
|
1880
1740
|
ref,
|
|
1881
|
-
className: cn(
|
|
1882
|
-
"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]",
|
|
1883
|
-
className
|
|
1884
|
-
),
|
|
1741
|
+
className: cn("ev-dropdown-sub-content", className),
|
|
1885
1742
|
...props
|
|
1886
1743
|
}
|
|
1887
1744
|
));
|
|
@@ -1891,10 +1748,7 @@ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
1891
1748
|
{
|
|
1892
1749
|
ref,
|
|
1893
1750
|
sideOffset,
|
|
1894
|
-
className: cn(
|
|
1895
|
-
"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]",
|
|
1896
|
-
className
|
|
1897
|
-
),
|
|
1751
|
+
className: cn("ev-dropdown-content", className),
|
|
1898
1752
|
...props
|
|
1899
1753
|
}
|
|
1900
1754
|
) }));
|
|
@@ -1904,8 +1758,8 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1904
1758
|
{
|
|
1905
1759
|
ref,
|
|
1906
1760
|
className: cn(
|
|
1907
|
-
"
|
|
1908
|
-
inset && "
|
|
1761
|
+
"ev-dropdown-item",
|
|
1762
|
+
inset && "ev-dropdown-inset",
|
|
1909
1763
|
className
|
|
1910
1764
|
),
|
|
1911
1765
|
...props
|
|
@@ -1916,14 +1770,11 @@ var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked
|
|
|
1916
1770
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1917
1771
|
{
|
|
1918
1772
|
ref,
|
|
1919
|
-
className: cn(
|
|
1920
|
-
"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",
|
|
1921
|
-
className
|
|
1922
|
-
),
|
|
1773
|
+
className: cn("ev-dropdown-checkbox-item", className),
|
|
1923
1774
|
checked,
|
|
1924
1775
|
...props,
|
|
1925
1776
|
children: [
|
|
1926
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
1777
|
+
/* @__PURE__ */ jsx("span", { className: "ev-dropdown-item-indicator", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, {}) }) }),
|
|
1927
1778
|
children
|
|
1928
1779
|
]
|
|
1929
1780
|
}
|
|
@@ -1933,13 +1784,10 @@ var DropdownMenuRadioItem = React8.forwardRef(({ className, children, ...props }
|
|
|
1933
1784
|
DropdownMenuPrimitive.RadioItem,
|
|
1934
1785
|
{
|
|
1935
1786
|
ref,
|
|
1936
|
-
className: cn(
|
|
1937
|
-
"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",
|
|
1938
|
-
className
|
|
1939
|
-
),
|
|
1787
|
+
className: cn("ev-dropdown-radio-item", className),
|
|
1940
1788
|
...props,
|
|
1941
1789
|
children: [
|
|
1942
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
1790
|
+
/* @__PURE__ */ jsx("span", { className: "ev-dropdown-item-indicator ev-dropdown-radio-indicator", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, {}) }) }),
|
|
1943
1791
|
children
|
|
1944
1792
|
]
|
|
1945
1793
|
}
|
|
@@ -1950,8 +1798,8 @@ var DropdownMenuLabel = React8.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1950
1798
|
{
|
|
1951
1799
|
ref,
|
|
1952
1800
|
className: cn(
|
|
1953
|
-
"
|
|
1954
|
-
inset && "
|
|
1801
|
+
"ev-dropdown-label",
|
|
1802
|
+
inset && "ev-dropdown-inset",
|
|
1955
1803
|
className
|
|
1956
1804
|
),
|
|
1957
1805
|
...props
|
|
@@ -1962,7 +1810,7 @@ var DropdownMenuSeparator = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
1962
1810
|
DropdownMenuPrimitive.Separator,
|
|
1963
1811
|
{
|
|
1964
1812
|
ref,
|
|
1965
|
-
className: cn("-
|
|
1813
|
+
className: cn("ev-dropdown-separator", className),
|
|
1966
1814
|
...props
|
|
1967
1815
|
}
|
|
1968
1816
|
));
|
|
@@ -1975,7 +1823,7 @@ function SelectAllControl({
|
|
|
1975
1823
|
onScopeChange,
|
|
1976
1824
|
labels
|
|
1977
1825
|
}) {
|
|
1978
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
1826
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-sa-control", children: [
|
|
1979
1827
|
/* @__PURE__ */ jsx(
|
|
1980
1828
|
Checkbox,
|
|
1981
1829
|
{
|
|
@@ -1989,9 +1837,9 @@ function SelectAllControl({
|
|
|
1989
1837
|
"button",
|
|
1990
1838
|
{
|
|
1991
1839
|
type: "button",
|
|
1992
|
-
className: "
|
|
1840
|
+
className: "ev-sa-toggle",
|
|
1993
1841
|
"aria-label": "Toggle select-all scope",
|
|
1994
|
-
children: /* @__PURE__ */ jsx(ChevronDown, { className: "
|
|
1842
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "ev-sa-toggle-icon" })
|
|
1995
1843
|
}
|
|
1996
1844
|
) }),
|
|
1997
1845
|
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", children: /* @__PURE__ */ jsxs(
|
|
@@ -2018,8 +1866,8 @@ function PaginationFooter({
|
|
|
2018
1866
|
labels
|
|
2019
1867
|
}) {
|
|
2020
1868
|
const totalPages = Math.max(1, Math.ceil(totalCount / itemsPerPage));
|
|
2021
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
2022
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1869
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-table-footer", children: [
|
|
1870
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2023
1871
|
/* @__PURE__ */ jsx("span", { children: labels.rowsPerPage }),
|
|
2024
1872
|
/* @__PURE__ */ jsxs(
|
|
2025
1873
|
Select,
|
|
@@ -2027,7 +1875,7 @@ function PaginationFooter({
|
|
|
2027
1875
|
value: String(itemsPerPage),
|
|
2028
1876
|
onValueChange: (v) => onItemsPerPageChange(Number(v)),
|
|
2029
1877
|
children: [
|
|
2030
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "
|
|
1878
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "ev-table-footer-ipp", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
2031
1879
|
/* @__PURE__ */ jsx(SelectContent, { children: itemsPerPageOptions.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: String(opt), children: opt }, opt)) })
|
|
2032
1880
|
]
|
|
2033
1881
|
}
|
|
@@ -2038,7 +1886,7 @@ function PaginationFooter({
|
|
|
2038
1886
|
labels.results
|
|
2039
1887
|
] })
|
|
2040
1888
|
] }),
|
|
2041
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1889
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2042
1890
|
/* @__PURE__ */ jsx("span", { children: labels.page }),
|
|
2043
1891
|
/* @__PURE__ */ jsxs(
|
|
2044
1892
|
Select,
|
|
@@ -2046,7 +1894,7 @@ function PaginationFooter({
|
|
|
2046
1894
|
value: String(currentPage),
|
|
2047
1895
|
onValueChange: (v) => onPageChange(Number(v)),
|
|
2048
1896
|
children: [
|
|
2049
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "
|
|
1897
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "ev-table-footer-pg", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
2050
1898
|
/* @__PURE__ */ jsx(SelectContent, { children: Array.from({ length: totalPages }, (_, i) => i + 1).map((p) => /* @__PURE__ */ jsx(SelectItem, { value: String(p), children: p }, p)) })
|
|
2051
1899
|
]
|
|
2052
1900
|
}
|
|
@@ -2056,16 +1904,16 @@ function PaginationFooter({
|
|
|
2056
1904
|
" ",
|
|
2057
1905
|
totalPages
|
|
2058
1906
|
] }),
|
|
2059
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1907
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-footer-nav", children: [
|
|
2060
1908
|
/* @__PURE__ */ jsx(
|
|
2061
1909
|
Button,
|
|
2062
1910
|
{
|
|
2063
1911
|
variant: "ghost",
|
|
2064
1912
|
size: "icon",
|
|
2065
|
-
className: "
|
|
1913
|
+
className: "ev-table-footer-nav-btn",
|
|
2066
1914
|
disabled: currentPage <= 1,
|
|
2067
1915
|
onClick: () => onPageChange(currentPage - 1),
|
|
2068
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "
|
|
1916
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "ev-table-footer-nav-icon" })
|
|
2069
1917
|
}
|
|
2070
1918
|
),
|
|
2071
1919
|
/* @__PURE__ */ jsx(
|
|
@@ -2073,10 +1921,10 @@ function PaginationFooter({
|
|
|
2073
1921
|
{
|
|
2074
1922
|
variant: "ghost",
|
|
2075
1923
|
size: "icon",
|
|
2076
|
-
className: "
|
|
1924
|
+
className: "ev-table-footer-nav-btn",
|
|
2077
1925
|
disabled: currentPage >= totalPages,
|
|
2078
1926
|
onClick: () => onPageChange(currentPage + 1),
|
|
2079
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: "
|
|
1927
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "ev-table-footer-nav-icon" })
|
|
2080
1928
|
}
|
|
2081
1929
|
)
|
|
2082
1930
|
] })
|
|
@@ -2086,10 +1934,10 @@ function PaginationFooter({
|
|
|
2086
1934
|
function ColumnVisibilityMenu({ table, label }) {
|
|
2087
1935
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2088
1936
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
2089
|
-
/* @__PURE__ */ jsx(Settings2, { className: "
|
|
1937
|
+
/* @__PURE__ */ jsx(Settings2, { className: "ev-cv-icon" }),
|
|
2090
1938
|
label
|
|
2091
1939
|
] }) }),
|
|
2092
|
-
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "
|
|
1940
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "ev-cv-menu", children: table.getAllColumns().filter((col) => col.getCanHide() && col.id !== "_select").map((col) => {
|
|
2093
1941
|
const rawHeader = col.columnDef.header;
|
|
2094
1942
|
const headerLabel = typeof rawHeader === "string" && rawHeader.trim().length > 0 ? rawHeader : col.id;
|
|
2095
1943
|
return /* @__PURE__ */ jsx(
|
|
@@ -2097,7 +1945,7 @@ function ColumnVisibilityMenu({ table, label }) {
|
|
|
2097
1945
|
{
|
|
2098
1946
|
checked: col.getIsVisible(),
|
|
2099
1947
|
onCheckedChange: (v) => col.toggleVisibility(!!v),
|
|
2100
|
-
className: "
|
|
1948
|
+
className: "ev-cv-item",
|
|
2101
1949
|
children: headerLabel
|
|
2102
1950
|
},
|
|
2103
1951
|
col.id
|
|
@@ -2707,17 +2555,18 @@ function EasyVisionTable(props) {
|
|
|
2707
2555
|
}
|
|
2708
2556
|
}, [totalCount, itemsPerPage, page, paginationMode, patch, isApi]);
|
|
2709
2557
|
return /* @__PURE__ */ jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxs("div", { className, children: [
|
|
2710
|
-
multifilter && /* @__PURE__ */ jsx("div", { className: "
|
|
2558
|
+
multifilter && /* @__PURE__ */ jsx("div", { className: "ev-table-multifilter", children: /* @__PURE__ */ jsx(
|
|
2711
2559
|
EasyVisionMultifilter,
|
|
2712
2560
|
{
|
|
2713
2561
|
...multifilter,
|
|
2562
|
+
performMode: multifilter.performMode === void 0 || multifilter.performMode === "auto" ? isApi ? "manual" : "live" : multifilter.performMode,
|
|
2714
2563
|
ref: setMultifilterRef,
|
|
2715
2564
|
onPerform: handlePerform
|
|
2716
2565
|
}
|
|
2717
2566
|
) }),
|
|
2718
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
2719
|
-
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxs("div", { className: "
|
|
2720
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
2567
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-card", children: [
|
|
2568
|
+
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxs("div", { className: "ev-table-toolbar", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx("div", { className: "ev-table-toolbar-section", children: toolbarLeft }),
|
|
2721
2570
|
enableRowSelection && (() => {
|
|
2722
2571
|
const isAllScope = selection.scope === "all";
|
|
2723
2572
|
const pageCount = isAllScope ? 0 : Object.keys(selection.ids ?? {}).length;
|
|
@@ -2727,25 +2576,25 @@ function EasyVisionTable(props) {
|
|
|
2727
2576
|
) : null;
|
|
2728
2577
|
const allCount = isAllScope ? eagerCount ?? Math.max(0, totalCount - Object.keys(selection.exceptIds ?? {}).length) : 0;
|
|
2729
2578
|
if (!isAllScope && pageCount === 0) return null;
|
|
2730
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
2731
|
-
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsx(Loader2, { className: "
|
|
2732
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2579
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-table-sel-banner", children: [
|
|
2580
|
+
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsx(Loader2, { className: "ev-table-sel-banner-spinner" }),
|
|
2581
|
+
/* @__PURE__ */ jsx("span", { className: "ev-table-sel-banner-text", children: isAllScope ? isEagerWildcard && isResolvingEager ? `${labels.loading}\u2026` : labels.selectedAllBanner(allCount) : labels.selectedCountBanner(pageCount) }),
|
|
2733
2582
|
/* @__PURE__ */ jsxs(
|
|
2734
2583
|
Button,
|
|
2735
2584
|
{
|
|
2736
2585
|
variant: "ghost",
|
|
2737
2586
|
size: "sm",
|
|
2738
2587
|
onClick: () => onScopeChange("page"),
|
|
2739
|
-
className: "
|
|
2588
|
+
className: "ev-table-clear-btn",
|
|
2740
2589
|
children: [
|
|
2741
|
-
/* @__PURE__ */ jsx(X, { className: "
|
|
2590
|
+
/* @__PURE__ */ jsx(X, { className: "ev-table-clear-icon" }),
|
|
2742
2591
|
labels.clearSelection
|
|
2743
2592
|
]
|
|
2744
2593
|
}
|
|
2745
2594
|
)
|
|
2746
2595
|
] });
|
|
2747
2596
|
})(),
|
|
2748
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
2597
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-toolbar-section", children: [
|
|
2749
2598
|
toolbarRight,
|
|
2750
2599
|
showColumnVisibility && /* @__PURE__ */ jsx(ColumnVisibilityMenu, { table: tableInstance, label: labels.customizeColumns })
|
|
2751
2600
|
] })
|
|
@@ -2753,18 +2602,18 @@ function EasyVisionTable(props) {
|
|
|
2753
2602
|
/* @__PURE__ */ jsx(
|
|
2754
2603
|
"div",
|
|
2755
2604
|
{
|
|
2756
|
-
className: "easyvision-table-scroll
|
|
2605
|
+
className: "easyvision-table-scroll",
|
|
2757
2606
|
style: maxBodyHeight !== void 0 ? {
|
|
2758
2607
|
maxHeight: typeof maxBodyHeight === "number" ? `${maxBodyHeight}px` : maxBodyHeight
|
|
2759
2608
|
} : void 0,
|
|
2760
|
-
children: /* @__PURE__ */ jsxs("table", { className: "
|
|
2609
|
+
children: /* @__PURE__ */ jsxs("table", { className: "ev-table", children: [
|
|
2761
2610
|
/* @__PURE__ */ jsx(
|
|
2762
2611
|
TableHeader,
|
|
2763
2612
|
{
|
|
2764
|
-
className: maxBodyHeight !== void 0 ? "
|
|
2613
|
+
className: maxBodyHeight !== void 0 ? "ev-table-thead-sticky" : void 0,
|
|
2765
2614
|
children: tableInstance.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx(TableRow, { children: hg.headers.map((header) => {
|
|
2766
2615
|
if (header.column.id === "_select" && enableRowSelection) {
|
|
2767
|
-
return /* @__PURE__ */ jsx(TableHead, { className: "
|
|
2616
|
+
return /* @__PURE__ */ jsx(TableHead, { className: "ev-table-th-checkbox", children: /* @__PURE__ */ jsx(
|
|
2768
2617
|
SelectAllControl,
|
|
2769
2618
|
{
|
|
2770
2619
|
scope: selection.scope,
|
|
@@ -2789,19 +2638,17 @@ function EasyVisionTable(props) {
|
|
|
2789
2638
|
TableHead,
|
|
2790
2639
|
{
|
|
2791
2640
|
style: headerWidthStyle,
|
|
2792
|
-
className:
|
|
2793
|
-
"relative",
|
|
2794
|
-
colMeta.largeScreensOnly ? "hidden lg:table-cell" : ""
|
|
2795
|
-
].filter(Boolean).join(" "),
|
|
2641
|
+
className: colMeta.largeScreensOnly ? "ev-table-large-only" : void 0,
|
|
2796
2642
|
children: [
|
|
2797
2643
|
header.isPlaceholder ? null : sortable ? /* @__PURE__ */ jsxs(
|
|
2798
2644
|
"button",
|
|
2799
2645
|
{
|
|
2800
|
-
|
|
2646
|
+
type: "button",
|
|
2647
|
+
className: "ev-table-sort-btn",
|
|
2801
2648
|
onClick: header.column.getToggleSortingHandler(),
|
|
2802
2649
|
children: [
|
|
2803
2650
|
flexRender(header.column.columnDef.header, header.getContext()),
|
|
2804
|
-
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "
|
|
2651
|
+
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "ev-table-sort-icon" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { className: "ev-table-sort-icon" }) : /* @__PURE__ */ jsx(ArrowUpDown, { className: "ev-table-sort-icon ev-table-sort-icon-inactive" })
|
|
2805
2652
|
]
|
|
2806
2653
|
}
|
|
2807
2654
|
) : flexRender(header.column.columnDef.header, header.getContext()),
|
|
@@ -2815,11 +2662,8 @@ function EasyVisionTable(props) {
|
|
|
2815
2662
|
"aria-orientation": "vertical",
|
|
2816
2663
|
"aria-label": "Resize column",
|
|
2817
2664
|
className: [
|
|
2818
|
-
"
|
|
2819
|
-
|
|
2820
|
-
"after:h-1/2 after:w-px after:bg-border after:transition-all",
|
|
2821
|
-
"hover:after:w-1.5 hover:after:h-full hover:after:top-0 hover:after:translate-y-0 hover:after:bg-primary/30",
|
|
2822
|
-
header.column.getIsResizing() ? "after:!w-1.5 after:!h-full after:!top-0 after:!translate-y-0 after:!bg-primary/60" : ""
|
|
2665
|
+
"ev-resize-handle",
|
|
2666
|
+
header.column.getIsResizing() ? "is-resizing" : ""
|
|
2823
2667
|
].filter(Boolean).join(" ")
|
|
2824
2668
|
}
|
|
2825
2669
|
)
|
|
@@ -2830,8 +2674,8 @@ function EasyVisionTable(props) {
|
|
|
2830
2674
|
}) }, hg.id))
|
|
2831
2675
|
}
|
|
2832
2676
|
),
|
|
2833
|
-
/* @__PURE__ */ jsx(TableBody, { children: isLoading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: allColumns.length, className: "
|
|
2834
|
-
/* @__PURE__ */ jsx("p", { className: "
|
|
2677
|
+
/* @__PURE__ */ jsx(TableBody, { children: isLoading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: allColumns.length, className: "ev-table-empty-cell", children: /* @__PURE__ */ jsx("div", { className: "ev-table-spinner-wrapper", children: /* @__PURE__ */ jsx(Loader2, { className: "ev-table-loading-spinner" }) }) }) }) : tableInstance.getRowModel().rows.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: allColumns.length, className: "ev-table-empty-cell", children: /* @__PURE__ */ jsxs("div", { className: "ev-table-empty-state", children: [
|
|
2678
|
+
/* @__PURE__ */ jsx("p", { className: "ev-table-empty-text", children: emptyMessage ?? labels.noData }),
|
|
2835
2679
|
emptyAction
|
|
2836
2680
|
] }) }) }) : tableInstance.getRowModel().rows.map((row) => {
|
|
2837
2681
|
const rid = rowIdOf(row.original);
|
|
@@ -2842,10 +2686,7 @@ function EasyVisionTable(props) {
|
|
|
2842
2686
|
{
|
|
2843
2687
|
"data-state": row.getIsSelected() || isAllSelected ? "selected" : void 0,
|
|
2844
2688
|
"data-highlighted": highlighted ? "true" : void 0,
|
|
2845
|
-
className:
|
|
2846
|
-
onRowClick ? "cursor-pointer" : "",
|
|
2847
|
-
highlighted ? "bg-muted/50" : ""
|
|
2848
|
-
].filter(Boolean).join(" "),
|
|
2689
|
+
className: onRowClick ? "ev-table-row-clickable" : void 0,
|
|
2849
2690
|
onClick: () => onRowClick?.(row.original),
|
|
2850
2691
|
children: row.getVisibleCells().map((cell) => {
|
|
2851
2692
|
if (cell.column.id === "_select" && selection.scope === "all") {
|
|
@@ -2885,13 +2726,13 @@ function EasyVisionTable(props) {
|
|
|
2885
2726
|
{
|
|
2886
2727
|
style: cellWidthStyle,
|
|
2887
2728
|
className: [
|
|
2888
|
-
cellMeta.largeScreensOnly ? "
|
|
2889
|
-
cellMeta.truncate ? "
|
|
2890
|
-
].filter(Boolean).join(" "),
|
|
2729
|
+
cellMeta.largeScreensOnly ? "ev-table-large-only" : "",
|
|
2730
|
+
cellMeta.truncate ? "ev-table-cell-truncate" : ""
|
|
2731
|
+
].filter(Boolean).join(" ") || void 0,
|
|
2891
2732
|
children: cellMeta.truncate ? /* @__PURE__ */ jsx(
|
|
2892
2733
|
"div",
|
|
2893
2734
|
{
|
|
2894
|
-
className: "truncate",
|
|
2735
|
+
className: "ev-table-cell-truncate-inner",
|
|
2895
2736
|
title: titleAttr,
|
|
2896
2737
|
children: rendered
|
|
2897
2738
|
}
|