@mlw-packages/react-components 1.8.8 → 1.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { Slot } from '@radix-ui/react-slot';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
- import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, ArrowRightIcon as ArrowRightIcon$1, FolderIcon, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowUpRightIcon, ArrowDownRightIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
8
+ import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, ArrowRightIcon as ArrowRightIcon$1, FolderIcon, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowRight, ArrowUpRightIcon, ArrowDownRightIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
9
9
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -645,7 +645,7 @@ var DialogContentBase = React33.forwardRef(
645
645
  {
646
646
  ref,
647
647
  className: cn(
648
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg max-h-[100dvh] overflow-auto rounded-md border-border",
648
+ "fixed left-[50%] top-[50%] z-50 w-lg grid translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg max-h-[100dvh] overflow-auto rounded-md border-border",
649
649
  className
650
650
  ),
651
651
  "data-testid": dataTestId,
@@ -654,7 +654,7 @@ var DialogContentBase = React33.forwardRef(
654
654
  children: [
655
655
  children,
656
656
  /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-10 touch-manipulation", children: [
657
- /* @__PURE__ */ jsx(XIcon, { className: "h-5 w-5 sm:h-4 sm:w-4" }),
657
+ /* @__PURE__ */ jsx(XIcon, { className: "h-6 w-6 sm:h-4 sm:w-4 hover:text-red-500 font-extrabold" }),
658
658
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
659
659
  ] })
660
660
  ]
@@ -1289,35 +1289,55 @@ var useDrag = (options = {}) => {
1289
1289
  const [positions, setPositions] = useState({});
1290
1290
  const dragStartPos = useRef(null);
1291
1291
  const dragId = useRef(null);
1292
- const handleMouseDown = useCallback((id, e) => {
1293
- e.preventDefault();
1294
- const currentPosition = positions[id] || { top: 0, left: 0 };
1295
- dragStartPos.current = {
1296
- x: e.clientX,
1297
- y: e.clientY,
1298
- elementX: currentPosition.left,
1299
- elementY: currentPosition.top
1300
- };
1301
- dragId.current = id;
1302
- setIsDragging(id);
1303
- options.onDragStart?.(id);
1304
- }, [positions, options]);
1305
- const handleMouseMove = useCallback((e) => {
1306
- if (!isDragging || !dragStartPos.current || !dragId.current) return;
1307
- const deltaX = e.clientX - dragStartPos.current.x;
1308
- const deltaY = e.clientY - dragStartPos.current.y;
1309
- const newPosition = {
1310
- left: dragStartPos.current.elementX + deltaX,
1311
- top: dragStartPos.current.elementY + deltaY
1312
- };
1313
- newPosition.left = Math.max(0, Math.min(window.innerWidth - 300, newPosition.left));
1314
- newPosition.top = Math.max(0, Math.min(window.innerHeight - 200, newPosition.top));
1315
- setPositions((prev) => ({
1316
- ...prev,
1317
- [dragId.current]: newPosition
1318
- }));
1319
- options.onDrag?.(dragId.current, newPosition);
1320
- }, [isDragging, options]);
1292
+ const handleDragStart = useCallback(
1293
+ (id, e) => {
1294
+ const isTouchEvent = "touches" in e;
1295
+ const clientX = isTouchEvent ? e.touches[0].clientX : e.clientX;
1296
+ const clientY = isTouchEvent ? e.touches[0].clientY : e.clientY;
1297
+ if (!isTouchEvent) {
1298
+ e.preventDefault();
1299
+ }
1300
+ const currentPosition = positions[id] || { top: 0, left: 0 };
1301
+ dragStartPos.current = {
1302
+ x: clientX,
1303
+ y: clientY,
1304
+ elementX: currentPosition.left,
1305
+ elementY: currentPosition.top
1306
+ };
1307
+ dragId.current = id;
1308
+ setIsDragging(id);
1309
+ options.onDragStart?.(id);
1310
+ },
1311
+ [positions, options]
1312
+ );
1313
+ const handleMouseMove = useCallback(
1314
+ (e) => {
1315
+ if (!isDragging || !dragStartPos.current || !dragId.current) return;
1316
+ const isTouchEvent = "touches" in e;
1317
+ const clientX = isTouchEvent ? e.touches[0].clientX : e.clientX;
1318
+ const clientY = isTouchEvent ? e.touches[0].clientY : e.clientY;
1319
+ const deltaX = clientX - dragStartPos.current.x;
1320
+ const deltaY = clientY - dragStartPos.current.y;
1321
+ const newPosition = {
1322
+ left: dragStartPos.current.elementX + deltaX,
1323
+ top: dragStartPos.current.elementY + deltaY
1324
+ };
1325
+ newPosition.left = Math.max(
1326
+ 0,
1327
+ Math.min(window.innerWidth - 300, newPosition.left)
1328
+ );
1329
+ newPosition.top = Math.max(
1330
+ 0,
1331
+ Math.min(window.innerHeight - 200, newPosition.top)
1332
+ );
1333
+ setPositions((prev) => ({
1334
+ ...prev,
1335
+ [dragId.current]: newPosition
1336
+ }));
1337
+ options.onDrag?.(dragId.current, newPosition);
1338
+ },
1339
+ [isDragging, options]
1340
+ );
1321
1341
  const handleMouseUp = useCallback(() => {
1322
1342
  if (dragId.current) {
1323
1343
  options.onDragEnd?.(dragId.current);
@@ -1330,10 +1350,16 @@ var useDrag = (options = {}) => {
1330
1350
  if (isDragging) {
1331
1351
  document.addEventListener("mousemove", handleMouseMove);
1332
1352
  document.addEventListener("mouseup", handleMouseUp);
1353
+ document.addEventListener("touchmove", handleMouseMove, {
1354
+ passive: false
1355
+ });
1356
+ document.addEventListener("touchend", handleMouseUp);
1333
1357
  document.body.style.userSelect = "none";
1334
1358
  return () => {
1335
1359
  document.removeEventListener("mousemove", handleMouseMove);
1336
1360
  document.removeEventListener("mouseup", handleMouseUp);
1361
+ document.removeEventListener("touchmove", handleMouseMove);
1362
+ document.removeEventListener("touchend", handleMouseUp);
1337
1363
  document.body.style.userSelect = "";
1338
1364
  };
1339
1365
  }
@@ -1344,14 +1370,20 @@ var useDrag = (options = {}) => {
1344
1370
  [id]: position
1345
1371
  }));
1346
1372
  }, []);
1347
- const getPosition = useCallback((id) => {
1348
- return positions[id] || { top: 0, left: 0 };
1349
- }, [positions]);
1350
- const isElementDragging = useCallback((id) => {
1351
- return isDragging === id;
1352
- }, [isDragging]);
1373
+ const getPosition = useCallback(
1374
+ (id) => {
1375
+ return positions[id] || { top: 0, left: 0 };
1376
+ },
1377
+ [positions]
1378
+ );
1379
+ const isElementDragging = useCallback(
1380
+ (id) => {
1381
+ return isDragging === id;
1382
+ },
1383
+ [isDragging]
1384
+ );
1353
1385
  return {
1354
- handleMouseDown,
1386
+ handleMouseDown: handleDragStart,
1355
1387
  getPosition,
1356
1388
  setPosition,
1357
1389
  isElementDragging,
@@ -1392,7 +1424,8 @@ var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props
1392
1424
  ) });
1393
1425
  };
1394
1426
  TooltipBase.displayName = "TooltipBase";
1395
- var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, ...props }, ref) => {
1427
+ var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, onClick: propOnClick, ...props }, ref) => {
1428
+ const { setOpen, isMobile } = React33.useContext(TooltipClickContext);
1396
1429
  const handlePointerDown = React33.useCallback(
1397
1430
  (e) => {
1398
1431
  if (onPointerDown) {
@@ -1403,11 +1436,26 @@ var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, ...props
1403
1436
  );
1404
1437
  const onClick = React33.useCallback(
1405
1438
  (e) => {
1439
+ if (propOnClick) {
1440
+ propOnClick(e);
1441
+ }
1406
1442
  if (onPointerDown) {
1407
1443
  onPointerDown(e);
1408
1444
  }
1445
+ if (isMobile && setOpen) {
1446
+ e.preventDefault();
1447
+ setOpen((prev) => !prev);
1448
+ }
1409
1449
  },
1410
- [onPointerDown]
1450
+ [onPointerDown, isMobile, setOpen, propOnClick]
1451
+ );
1452
+ const preventDefaultOnMobile = React33.useCallback(
1453
+ (e) => {
1454
+ if (isMobile) {
1455
+ e.preventDefault();
1456
+ }
1457
+ },
1458
+ [isMobile]
1411
1459
  );
1412
1460
  return /* @__PURE__ */ jsx(
1413
1461
  TooltipPrimitive.Trigger,
@@ -1416,6 +1464,9 @@ var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, ...props
1416
1464
  tabIndex: -1,
1417
1465
  onPointerDown: onPointerDown ? handlePointerDown : void 0,
1418
1466
  onClick,
1467
+ onFocus: preventDefaultOnMobile,
1468
+ onMouseEnter: preventDefaultOnMobile,
1469
+ onMouseLeave: preventDefaultOnMobile,
1419
1470
  "data-tooltip-trigger": true,
1420
1471
  "aria-describedby": "tooltip-content",
1421
1472
  ...props,
@@ -3118,9 +3169,13 @@ function ModeToggleBase({
3118
3169
  className,
3119
3170
  variant = "ghost"
3120
3171
  }) {
3172
+ const [mounted, setMounted] = useState(false);
3121
3173
  const { setTheme, theme: currentTheme } = useTheme();
3122
3174
  const buttonRef = useRef(null);
3123
- const isDark = currentTheme?.includes("dark") || currentTheme === "system" && typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches;
3175
+ useEffect(() => {
3176
+ setMounted(true);
3177
+ }, []);
3178
+ const isDark = mounted && (currentTheme?.includes("dark") || currentTheme === "system" && typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches);
3124
3179
  const toggleTheme = async (newTheme) => {
3125
3180
  if (!buttonRef.current || !document.startViewTransition) {
3126
3181
  setTheme(newTheme);
@@ -3161,7 +3216,7 @@ function ModeToggleBase({
3161
3216
  variant,
3162
3217
  size: "icon",
3163
3218
  className: cn(
3164
- "relative overflow-hidden border-transparent group",
3219
+ "relative overflow-hidden group",
3165
3220
  className
3166
3221
  ),
3167
3222
  children: [
@@ -13783,7 +13838,7 @@ function MultiSelect({
13783
13838
 
13784
13839
  // src/components/ui/charts/utils/helpers.ts
13785
13840
  var formatFieldName = (fieldName) => {
13786
- return fieldName.split(/[/_-]/).filter(Boolean).map((word) => {
13841
+ return (fieldName.match(/[^/_-]+/g) || []).map((word) => {
13787
13842
  return word.charAt(0).toUpperCase() + word.slice(1);
13788
13843
  }).join(" ").trim();
13789
13844
  };
@@ -14510,7 +14565,7 @@ var DraggableTooltipComponent = ({
14510
14565
  highlightedSeries,
14511
14566
  toggleHighlight,
14512
14567
  showOnlyHighlighted,
14513
- valueFormatter: valueFormatter2,
14568
+ valueFormatter,
14514
14569
  categoryFormatter
14515
14570
  }) => {
14516
14571
  const visibleKeys = useMemo(
@@ -14926,7 +14981,7 @@ var DraggableTooltipComponent = ({
14926
14981
  {
14927
14982
  data,
14928
14983
  visibleKeys,
14929
- valueFormatter: valueFormatter2
14984
+ valueFormatter
14930
14985
  }
14931
14986
  ) })
14932
14987
  ] }) }),
@@ -14945,7 +15000,7 @@ var DraggableTooltipComponent = ({
14945
15000
  );
14946
15001
  const val = typeof value === "number" ? value : Number(value) || 0;
14947
15002
  const defaultFormatted = val.toLocaleString("pt-BR");
14948
- const displayValue = valueFormatter2 ? valueFormatter2({
15003
+ const displayValue = valueFormatter ? valueFormatter({
14949
15004
  value,
14950
15005
  formattedValue: defaultFormatted,
14951
15006
  dataKey: key,
@@ -15026,7 +15081,7 @@ var DraggableTooltipComponent = ({
15026
15081
  highlightedSeries,
15027
15082
  toggleHighlight,
15028
15083
  finalColors,
15029
- valueFormatter2
15084
+ valueFormatter
15030
15085
  ]
15031
15086
  ),
15032
15087
  /* @__PURE__ */ jsx("div", { className: "mt-3 pt-2 border-t", children: /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground flex items-center gap-1", children: [
@@ -15060,7 +15115,7 @@ var RechartTooltipWithTotal = ({
15060
15115
  finalColors = {},
15061
15116
  periodLabel = "Per\xEDodo",
15062
15117
  totalLabel = "Total",
15063
- valueFormatter: valueFormatter2,
15118
+ valueFormatter,
15064
15119
  categoryFormatter,
15065
15120
  yAxisMap,
15066
15121
  isBiaxial = false
@@ -15084,7 +15139,7 @@ var RechartTooltipWithTotal = ({
15084
15139
  }
15085
15140
  return total.toLocaleString("pt-BR");
15086
15141
  })();
15087
- const displayTotal = valueFormatter2 ? valueFormatter2({
15142
+ const displayTotal = valueFormatter ? valueFormatter({
15088
15143
  value: total,
15089
15144
  formattedValue: defaultTotalFormatted,
15090
15145
  dataKey: "total",
@@ -15147,7 +15202,7 @@ var RechartTooltipWithTotal = ({
15147
15202
  }
15148
15203
  return value.toLocaleString("pt-BR");
15149
15204
  })();
15150
- const displayValue = valueFormatter2 ? valueFormatter2({
15205
+ const displayValue = valueFormatter ? valueFormatter({
15151
15206
  value: entry.value,
15152
15207
  formattedValue: defaultFormatted,
15153
15208
  dataKey: entry.dataKey,
@@ -15212,7 +15267,7 @@ var TooltipSimple = ({
15212
15267
  label,
15213
15268
  finalColors = {},
15214
15269
  periodLabel = "Per\xEDodo",
15215
- valueFormatter: valueFormatter2,
15270
+ valueFormatter,
15216
15271
  categoryFormatter,
15217
15272
  yAxisMap,
15218
15273
  isBiaxial = false
@@ -15260,7 +15315,7 @@ var TooltipSimple = ({
15260
15315
  }
15261
15316
  return value.toLocaleString("pt-BR");
15262
15317
  })();
15263
- const displayValue = valueFormatter2 ? valueFormatter2({
15318
+ const displayValue = valueFormatter ? valueFormatter({
15264
15319
  value: entry.value,
15265
15320
  formattedValue: defaultFormatted,
15266
15321
  dataKey: entry.dataKey,
@@ -15302,6 +15357,210 @@ var TooltipSimple = ({
15302
15357
  );
15303
15358
  };
15304
15359
  var TooltipSimple_default = TooltipSimple;
15360
+ var tooltipVariants2 = {
15361
+ hidden: {
15362
+ opacity: 0,
15363
+ scale: 0.96,
15364
+ transition: { type: "spring", stiffness: 400, damping: 28 }
15365
+ },
15366
+ visible: {
15367
+ opacity: 1,
15368
+ scale: 1,
15369
+ transition: { type: "spring", stiffness: 300, damping: 28 }
15370
+ },
15371
+ exit: {
15372
+ opacity: 0,
15373
+ scale: 0.96,
15374
+ transition: { type: "spring", stiffness: 400, damping: 28 }
15375
+ }
15376
+ };
15377
+ var SystemTooltip = ({
15378
+ id,
15379
+ data,
15380
+ position,
15381
+ title = "Conex\xF5es",
15382
+ onMouseDown,
15383
+ onClose,
15384
+ onPositionChange
15385
+ }) => {
15386
+ const [localPos, setLocalPos] = useState(position);
15387
+ const [dragging, setDragging] = useState(false);
15388
+ const offsetRef = useRef({ x: 0, y: 0 });
15389
+ const lastMouse = useRef({ x: 0, y: 0 });
15390
+ useEffect(() => setLocalPos(position), [position]);
15391
+ useEffect(() => {
15392
+ let rafId = null;
15393
+ const handleMouseMove = (e) => {
15394
+ if (!dragging) return;
15395
+ lastMouse.current = { x: e.clientX, y: e.clientY };
15396
+ if (rafId) cancelAnimationFrame(rafId);
15397
+ rafId = requestAnimationFrame(() => {
15398
+ const newLeft = lastMouse.current.x - offsetRef.current.x;
15399
+ const newTop = lastMouse.current.y - offsetRef.current.y;
15400
+ const rawPosition = {
15401
+ top: Math.max(0, Math.min(newTop, window.innerHeight - 200)),
15402
+ left: Math.max(0, Math.min(newLeft, window.innerWidth - 320))
15403
+ };
15404
+ setLocalPos(rawPosition);
15405
+ if (onPositionChange) onPositionChange(id, rawPosition);
15406
+ });
15407
+ };
15408
+ const handleMouseUp = () => {
15409
+ if (dragging) {
15410
+ setDragging(false);
15411
+ if (rafId) cancelAnimationFrame(rafId);
15412
+ }
15413
+ };
15414
+ if (dragging) {
15415
+ document.addEventListener("mousemove", handleMouseMove, {
15416
+ passive: true
15417
+ });
15418
+ document.addEventListener("mouseup", handleMouseUp);
15419
+ document.body.style.cursor = "grabbing";
15420
+ document.body.style.userSelect = "none";
15421
+ }
15422
+ return () => {
15423
+ if (rafId) cancelAnimationFrame(rafId);
15424
+ document.removeEventListener("mousemove", handleMouseMove);
15425
+ document.removeEventListener("mouseup", handleMouseUp);
15426
+ document.body.style.cursor = "";
15427
+ document.body.style.userSelect = "";
15428
+ };
15429
+ }, [dragging, id, onPositionChange]);
15430
+ const handleMouseDownLocal = useCallback(
15431
+ (e) => {
15432
+ e.preventDefault();
15433
+ e.stopPropagation();
15434
+ const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
15435
+ if (!rect) return;
15436
+ offsetRef.current = { x: e.clientX - rect.left, y: e.clientY - rect.top };
15437
+ setDragging(true);
15438
+ onMouseDown?.(id, e);
15439
+ },
15440
+ [id, onMouseDown]
15441
+ );
15442
+ const handleTouchStartLocal = useCallback(
15443
+ (e) => {
15444
+ e.stopPropagation();
15445
+ const touch = e.touches[0];
15446
+ if (!touch) return;
15447
+ const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
15448
+ if (!rect) return;
15449
+ offsetRef.current = {
15450
+ x: touch.clientX - rect.left,
15451
+ y: touch.clientY - rect.top
15452
+ };
15453
+ setDragging(true);
15454
+ onMouseDown?.(id, e);
15455
+ },
15456
+ [id, onMouseDown]
15457
+ );
15458
+ const entries = useMemo(
15459
+ () => data.connections.filter((c) => c.type === "entrada"),
15460
+ [data.connections]
15461
+ );
15462
+ const exits = useMemo(
15463
+ () => data.connections.filter((c) => c.type === "saida"),
15464
+ [data.connections]
15465
+ );
15466
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsxs(
15467
+ motion.div,
15468
+ {
15469
+ className: "fixed bg-card/95 backdrop-blur-md border border-border/50 rounded-xl shadow-2xl z-50 w-80 overflow-hidden",
15470
+ variants: tooltipVariants2,
15471
+ initial: "hidden",
15472
+ animate: "visible",
15473
+ exit: "exit",
15474
+ style: {
15475
+ top: localPos.top,
15476
+ left: localPos.left
15477
+ },
15478
+ onClick: (e) => e.stopPropagation(),
15479
+ children: [
15480
+ /* @__PURE__ */ jsxs(
15481
+ "div",
15482
+ {
15483
+ className: "flex items-center justify-between py-1 border-b border-border/10 bg-muted/30 ",
15484
+ onMouseDown: handleMouseDownLocal,
15485
+ onTouchStart: handleTouchStartLocal,
15486
+ style: {
15487
+ touchAction: "none",
15488
+ cursor: dragging ? "grabbing" : "grab"
15489
+ },
15490
+ children: [
15491
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3", children: [
15492
+ /* @__PURE__ */ jsx("div", { className: "rounded", children: /* @__PURE__ */ jsx(DotsSixVerticalIcon, { size: 16, className: "text-primary" }) }),
15493
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: title })
15494
+ ] }),
15495
+ /* @__PURE__ */ jsx(
15496
+ ButtonBase,
15497
+ {
15498
+ variant: "ghost",
15499
+ size: "icon",
15500
+ onClick: () => onClose(id),
15501
+ className: "text-muted-foreground hover:text-destructive transition-colors hover:bg-destructive/10 mr-1",
15502
+ style: { cursor: "pointer" },
15503
+ children: /* @__PURE__ */ jsx(XIcon$1, { size: 16 })
15504
+ }
15505
+ )
15506
+ ]
15507
+ }
15508
+ ),
15509
+ /* @__PURE__ */ jsxs("div", { className: "px-4 pt-4 pb-3", children: [
15510
+ /* @__PURE__ */ jsx("h3", { className: "text-xl font-bold text-foreground tracking-tight truncate", children: data.name }),
15511
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-bold text-muted-foreground tracking-tight truncate", children: data.description })
15512
+ ] }),
15513
+ /* @__PURE__ */ jsxs("div", { className: "px-3 pb-4 space-y-4 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w- [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/40 transition-colors", children: [
15514
+ /* @__PURE__ */ jsx(SeparatorBase, { className: "w-full" }),
15515
+ entries.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15516
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-1", children: [
15517
+ /* @__PURE__ */ jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500" }),
15518
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-muted-foreground uppercase", children: "Entradas" })
15519
+ ] }),
15520
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: entries.map((conn) => /* @__PURE__ */ jsxs(
15521
+ "div",
15522
+ {
15523
+ className: "group flex items-center justify-between p-2 rounded-lg bg-emerald-500/5 border border-emerald-500/10 hover:border-emerald-500/30 transition-all",
15524
+ children: [
15525
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate", children: conn.name }) }),
15526
+ " ",
15527
+ /* @__PURE__ */ jsx(
15528
+ ArrowRight,
15529
+ {
15530
+ size: 14,
15531
+ className: "text-emerald-500 shrink-0 rotate-180"
15532
+ }
15533
+ )
15534
+ ]
15535
+ },
15536
+ conn.id
15537
+ )) })
15538
+ ] }),
15539
+ exits.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15540
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-1", children: [
15541
+ /* @__PURE__ */ jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-blue-500" }),
15542
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-muted-foreground uppercase", children: "Sa\xEDdas" })
15543
+ ] }),
15544
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: exits.map((conn) => /* @__PURE__ */ jsxs(
15545
+ "div",
15546
+ {
15547
+ className: "group flex items-center justify-between p-2 rounded-lg bg-blue-500/5 border border-blue-500/10 hover:border-blue-500/30 transition-all",
15548
+ children: [
15549
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate", children: conn.name }) }),
15550
+ /* @__PURE__ */ jsx(ArrowRight, { size: 14, className: "text-blue-500 shrink-0" })
15551
+ ]
15552
+ },
15553
+ conn.id
15554
+ )) })
15555
+ ] }),
15556
+ data.connections.length === 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center p-6 text-center", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Nenhuma conex\xE3o encontrada" }) })
15557
+ ] })
15558
+ ]
15559
+ },
15560
+ id
15561
+ ) });
15562
+ };
15563
+ var SystemTooltip_default = SystemTooltip;
15305
15564
  var Brush = ({
15306
15565
  data,
15307
15566
  legend,
@@ -15556,11 +15815,11 @@ var parseNumber = (v) => {
15556
15815
  return Number(v);
15557
15816
  return void 0;
15558
15817
  };
15559
- var renderPillLabel = (color, variant, valueFormatter2) => {
15818
+ var renderPillLabel = (color, variant, valueFormatter) => {
15560
15819
  return (props) => {
15561
15820
  const { x, y, value } = props;
15562
15821
  const defaultFormatted = typeof value === "number" ? formatCompactNumber(value) : String(value ?? "");
15563
- const text = valueFormatter2 ? valueFormatter2({
15822
+ const text = valueFormatter ? valueFormatter({
15564
15823
  value,
15565
15824
  formattedValue: defaultFormatted,
15566
15825
  ...props
@@ -15649,11 +15908,11 @@ var renderPillLabel = (color, variant, valueFormatter2) => {
15649
15908
  };
15650
15909
  };
15651
15910
  var pillLabelRenderer_default = renderPillLabel;
15652
- var renderInsideBarLabel = (color, valueFormatter2) => {
15911
+ var renderInsideBarLabel = (color, valueFormatter) => {
15653
15912
  return (props) => {
15654
15913
  const { x, y, value, width, height, viewBox, cx, cy, index } = props;
15655
15914
  const defaultFormatted = typeof value === "number" ? formatCompactNumber(value) : String(value ?? "");
15656
- const text = valueFormatter2 ? valueFormatter2({ value, formattedValue: defaultFormatted, ...props }) : defaultFormatted;
15915
+ const text = valueFormatter ? valueFormatter({ value, formattedValue: defaultFormatted, ...props }) : defaultFormatted;
15657
15916
  const parseNumberLocal = (v) => {
15658
15917
  if (typeof v === "number") return v;
15659
15918
  if (typeof v === "string" && v.trim() !== "" && !Number.isNaN(Number(v)))
@@ -15798,7 +16057,7 @@ var NoData = ({
15798
16057
  "div",
15799
16058
  {
15800
16059
  className: cn(
15801
- "rounded-xl bg-card relative overflow-hidden w-full border border-border/50 shadow-sm",
16060
+ "rounded-xl bg-card relative overflow-hidden w-full border border-border/50 shadow-sm h-full",
15802
16061
  className
15803
16062
  ),
15804
16063
  style: {
@@ -16255,6 +16514,128 @@ function useTimeSeriesRange({
16255
16514
  handleMouseDown
16256
16515
  };
16257
16516
  }
16517
+ var filtersOrder = (mapperConfig, series) => {
16518
+ const seriesOrder = [];
16519
+ if (series) {
16520
+ if (series.bar)
16521
+ series.bar.forEach((k) => seriesOrder.push({ type: "bar", key: k }));
16522
+ if (series.line)
16523
+ series.line.forEach((k) => seriesOrder.push({ type: "line", key: k }));
16524
+ if (series.area)
16525
+ series.area.forEach((k) => seriesOrder.push({ type: "area", key: k }));
16526
+ } else {
16527
+ Object.keys(mapperConfig).forEach(
16528
+ (k) => seriesOrder.push({ type: "bar", key: k })
16529
+ );
16530
+ }
16531
+ return seriesOrder;
16532
+ };
16533
+ var fnOpenTooltipForPeriod = (enableDraggableTooltips, processedData, periodName, activeTooltips, setActiveTooltips, maxTooltips, effectiveChartWidth) => {
16534
+ if (!enableDraggableTooltips) return;
16535
+ const row = processedData.find((r) => String(r.name) === periodName);
16536
+ if (!row) return;
16537
+ const tooltipId = String(periodName);
16538
+ const existingIndex = activeTooltips.findIndex((t) => t.id === tooltipId);
16539
+ if (existingIndex !== -1) {
16540
+ setActiveTooltips((prev) => prev.filter((t) => t.id !== tooltipId));
16541
+ return;
16542
+ }
16543
+ if (activeTooltips.length >= maxTooltips) {
16544
+ toast$1.warning(
16545
+ `Limite de ${maxTooltips} janelas de informa\xE7\xE3o atingido. A mais antiga ser\xE1 substitu\xEDda.`
16546
+ );
16547
+ }
16548
+ const offsetIndex = activeTooltips.length;
16549
+ const availableWidth = effectiveChartWidth;
16550
+ const gap = 28;
16551
+ const leftGap = 28;
16552
+ const newTooltip = {
16553
+ id: tooltipId,
16554
+ data: row,
16555
+ position: {
16556
+ top: 48 + offsetIndex * gap,
16557
+ left: Math.max(120, availableWidth - 280 - offsetIndex * leftGap)
16558
+ }
16559
+ };
16560
+ setActiveTooltips((prev) => {
16561
+ const next = [...prev, newTooltip];
16562
+ return next.length > maxTooltips ? next.slice(1) : next;
16563
+ });
16564
+ };
16565
+ var fnSmartConfig = ({ xAxis, data, labelMap }) => {
16566
+ const resolvedXAxisKey = typeof xAxis === "string" ? xAxis : xAxis && xAxis.dataKey || detectXAxis(data);
16567
+ const xAxisConfig = typeof xAxis === "string" ? {
16568
+ dataKey: resolvedXAxisKey,
16569
+ label: formatFieldName(resolvedXAxisKey),
16570
+ autoLabel: true
16571
+ } : {
16572
+ dataKey: resolvedXAxisKey,
16573
+ label: xAxis?.label ?? formatFieldName(resolvedXAxisKey),
16574
+ valueFormatter: xAxis?.valueFormatter,
16575
+ autoLabel: xAxis?.autoLabel ?? true
16576
+ };
16577
+ const detectedFields = detectDataFields(data, xAxisConfig.dataKey);
16578
+ const mapperConfig = detectedFields.reduce((acc, field) => {
16579
+ acc[field] = {
16580
+ label: labelMap?.[field] ?? formatFieldName(field),
16581
+ type: "number",
16582
+ visible: true
16583
+ };
16584
+ return acc;
16585
+ }, {});
16586
+ return { xAxisConfig, mapperConfig };
16587
+ };
16588
+ var fnConfigRightKeys = (biaxialConfigNormalized, yTickFormatter, finalColors) => {
16589
+ const decimals = typeof biaxialConfigNormalized?.decimals === "number" ? Math.max(0, Math.floor(biaxialConfigNormalized.decimals)) : 2;
16590
+ const rightTickFormatter = (v) => {
16591
+ if (biaxialConfigNormalized?.percentage) {
16592
+ const num = Number(String(v));
16593
+ const nf = new Intl.NumberFormat("pt-BR", {
16594
+ minimumFractionDigits: decimals,
16595
+ maximumFractionDigits: decimals
16596
+ });
16597
+ const out = Number.isNaN(num) ? String(v ?? "") : nf.format(num);
16598
+ return `${out}%`;
16599
+ }
16600
+ return yTickFormatter(v);
16601
+ };
16602
+ const firstRightKey = biaxialConfigNormalized?.key && biaxialConfigNormalized.key[0];
16603
+ const defaultRightColor = firstRightKey && finalColors[firstRightKey] || "hsl(var(--muted-foreground))";
16604
+ const rightAxisColor = (() => {
16605
+ if (!biaxialConfigNormalized) return defaultRightColor;
16606
+ if (typeof biaxialConfigNormalized.stroke === "string")
16607
+ return biaxialConfigNormalized.stroke;
16608
+ if (biaxialConfigNormalized.stroke && firstRightKey && typeof biaxialConfigNormalized.stroke === "object")
16609
+ return biaxialConfigNormalized.stroke[firstRightKey] || defaultRightColor;
16610
+ return defaultRightColor;
16611
+ })();
16612
+ return { rightAxisColor, rightTickFormatter };
16613
+ };
16614
+ var fnFormatterValueLegend = (value, mapperConfig, labelMap, legendUppercase) => {
16615
+ const key = String(value);
16616
+ const label = mapperConfig[key]?.label ?? labelMap?.[key] ?? formatFieldName(key);
16617
+ return legendUppercase ? label.toUpperCase() : label;
16618
+ };
16619
+ var fnBuildConfigData = (s, mapperConfig, labelMap, finalColors, rightKeys, biaxialConfigNormalized) => {
16620
+ const key = s.key;
16621
+ const label = mapperConfig[key]?.label ?? labelMap?.[key] ?? formatFieldName(key);
16622
+ let color = finalColors[key];
16623
+ if (rightKeys.includes(key) && biaxialConfigNormalized?.stroke) {
16624
+ if (typeof biaxialConfigNormalized.stroke === "string") {
16625
+ color = biaxialConfigNormalized.stroke;
16626
+ } else {
16627
+ color = biaxialConfigNormalized.stroke[key] ?? color;
16628
+ }
16629
+ }
16630
+ return { label, color, key };
16631
+ };
16632
+ var fnContentLabelList = (p) => {
16633
+ const barHeight = typeof p.height === "number" ? p.height : typeof p.height === "string" ? Number(p.height) : 0;
16634
+ const barWidth = typeof p.width === "number" ? p.width : typeof p.width === "string" ? Number(p.width) : 0;
16635
+ const smallThreshold = 14;
16636
+ const needsOutside = barHeight > 0 && barHeight < smallThreshold || barWidth > 0 && barWidth < smallThreshold;
16637
+ return needsOutside ? null : true;
16638
+ };
16258
16639
  var DEFAULT_COLORS2 = ["#55af7d", "#8e68ff", "#2273e1"];
16259
16640
  var Chart = ({
16260
16641
  data,
@@ -16276,7 +16657,7 @@ var Chart = ({
16276
16657
  xAxisLabel,
16277
16658
  yAxisLabel,
16278
16659
  labelMap,
16279
- valueFormatter: valueFormatter2,
16660
+ valueFormatter,
16280
16661
  categoryFormatter,
16281
16662
  enableHighlights = false,
16282
16663
  enableShowOnly = false,
@@ -16293,30 +16674,9 @@ var Chart = ({
16293
16674
  timeSeriesLegend,
16294
16675
  customLegend
16295
16676
  }) => {
16296
- const smartConfig = useMemo(() => {
16297
- const resolvedXAxisKey = typeof xAxis === "string" ? xAxis : xAxis && xAxis.dataKey || detectXAxis(data);
16298
- const xAxisConfig2 = typeof xAxis === "string" ? {
16299
- dataKey: resolvedXAxisKey,
16300
- label: formatFieldName(resolvedXAxisKey),
16301
- autoLabel: true
16302
- } : {
16303
- dataKey: resolvedXAxisKey,
16304
- label: xAxis?.label ?? formatFieldName(resolvedXAxisKey),
16305
- valueFormatter: xAxis?.valueFormatter,
16306
- autoLabel: xAxis?.autoLabel ?? true
16307
- };
16308
- const detectedFields = detectDataFields(data, xAxisConfig2.dataKey);
16309
- const mapperConfig2 = detectedFields.reduce((acc, field) => {
16310
- acc[field] = {
16311
- label: labelMap?.[field] ?? formatFieldName(field),
16312
- type: "number",
16313
- visible: true
16314
- };
16315
- return acc;
16316
- }, {});
16317
- return { xAxisConfig: xAxisConfig2, mapperConfig: mapperConfig2 };
16677
+ const { xAxisConfig, mapperConfig } = useMemo(() => {
16678
+ return fnSmartConfig({ xAxis, data, labelMap });
16318
16679
  }, [data, xAxis, labelMap]);
16319
- const { xAxisConfig, mapperConfig } = smartConfig;
16320
16680
  const {
16321
16681
  highlightedSeries,
16322
16682
  showOnlyHighlighted,
@@ -16358,19 +16718,7 @@ var Chart = ({
16358
16718
  }
16359
16719
  return mapped;
16360
16720
  }, [data, xAxisConfig.dataKey, timeSeriesConfig, startIndex, endIndex]);
16361
- const seriesOrder = [];
16362
- if (series) {
16363
- if (series.bar)
16364
- series.bar.forEach((k) => seriesOrder.push({ type: "bar", key: k }));
16365
- if (series.line)
16366
- series.line.forEach((k) => seriesOrder.push({ type: "line", key: k }));
16367
- if (series.area)
16368
- series.area.forEach((k) => seriesOrder.push({ type: "area", key: k }));
16369
- } else {
16370
- Object.keys(mapperConfig).forEach(
16371
- (k) => seriesOrder.push({ type: "bar", key: k })
16372
- );
16373
- }
16721
+ const seriesOrder = filtersOrder(mapperConfig, series);
16374
16722
  const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
16375
16723
  const finalColors = useMemo(
16376
16724
  () => generateColorMap(allKeys, colors2, mapperConfig),
@@ -16453,8 +16801,8 @@ var Chart = ({
16453
16801
  [highlightedSeries]
16454
16802
  );
16455
16803
  const finalValueFormatter = useMemo(
16456
- () => createValueFormatter(valueFormatter2, formatBR),
16457
- [valueFormatter2, formatBR]
16804
+ () => createValueFormatter(valueFormatter, formatBR),
16805
+ [valueFormatter, formatBR]
16458
16806
  );
16459
16807
  const yTickFormatter = useMemo(
16460
16808
  () => createYTickFormatter(finalValueFormatter),
@@ -16489,36 +16837,15 @@ var Chart = ({
16489
16837
  const rightYAxisLabelDx = Math.max(12, Math.round(finalChartRightMargin / 2));
16490
16838
  const openTooltipForPeriod = useCallback(
16491
16839
  (periodName) => {
16492
- if (!enableDraggableTooltips) return;
16493
- const row = processedData.find((r) => String(r.name) === periodName);
16494
- if (!row) return;
16495
- const tooltipId = String(periodName);
16496
- const existingIndex = activeTooltips.findIndex((t) => t.id === tooltipId);
16497
- if (existingIndex !== -1) {
16498
- setActiveTooltips((prev) => prev.filter((t) => t.id !== tooltipId));
16499
- return;
16500
- }
16501
- if (activeTooltips.length >= maxTooltips) {
16502
- toast$1.warning(
16503
- `Limite de ${maxTooltips} janelas de informa\xE7\xE3o atingido. A mais antiga ser\xE1 substitu\xEDda.`
16504
- );
16505
- }
16506
- const offsetIndex = activeTooltips.length;
16507
- const availableWidth = effectiveChartWidth;
16508
- const gap = 28;
16509
- const leftGap = 28;
16510
- const newTooltip = {
16511
- id: tooltipId,
16512
- data: row,
16513
- position: {
16514
- top: 48 + offsetIndex * gap,
16515
- left: Math.max(120, availableWidth - 280 - offsetIndex * leftGap)
16516
- }
16517
- };
16518
- setActiveTooltips((prev) => {
16519
- const next = [...prev, newTooltip];
16520
- return next.length > maxTooltips ? next.slice(1) : next;
16521
- });
16840
+ fnOpenTooltipForPeriod(
16841
+ enableDraggableTooltips,
16842
+ processedData,
16843
+ periodName,
16844
+ activeTooltips,
16845
+ setActiveTooltips,
16846
+ maxTooltips,
16847
+ effectiveChartWidth
16848
+ );
16522
16849
  },
16523
16850
  [
16524
16851
  enableDraggableTooltips,
@@ -16757,29 +17084,7 @@ var Chart = ({
16757
17084
  }
16758
17085
  ),
16759
17086
  rightKeys.length > 0 && (() => {
16760
- const decimals = typeof biaxialConfigNormalized?.decimals === "number" ? Math.max(0, Math.floor(biaxialConfigNormalized.decimals)) : 2;
16761
- const rightTickFormatter = (v) => {
16762
- if (biaxialConfigNormalized?.percentage) {
16763
- const num = Number(String(v));
16764
- const nf = new Intl.NumberFormat("pt-BR", {
16765
- minimumFractionDigits: decimals,
16766
- maximumFractionDigits: decimals
16767
- });
16768
- const out = Number.isNaN(num) ? String(v ?? "") : nf.format(num);
16769
- return `${out}%`;
16770
- }
16771
- return yTickFormatter(v);
16772
- };
16773
- const firstRightKey = biaxialConfigNormalized?.key && biaxialConfigNormalized.key[0];
16774
- const defaultRightColor = firstRightKey && finalColors[firstRightKey] || "hsl(var(--muted-foreground))";
16775
- const rightAxisColor = (() => {
16776
- if (!biaxialConfigNormalized) return defaultRightColor;
16777
- if (typeof biaxialConfigNormalized.stroke === "string")
16778
- return biaxialConfigNormalized.stroke;
16779
- if (biaxialConfigNormalized.stroke && firstRightKey && typeof biaxialConfigNormalized.stroke === "object")
16780
- return biaxialConfigNormalized.stroke[firstRightKey] || defaultRightColor;
16781
- return defaultRightColor;
16782
- })();
17087
+ const { rightAxisColor, rightTickFormatter } = fnConfigRightKeys(biaxialConfigNormalized, yTickFormatter, finalColors);
16783
17088
  return /* @__PURE__ */ jsx(
16784
17089
  YAxis,
16785
17090
  {
@@ -16837,38 +17142,26 @@ var Chart = ({
16837
17142
  {
16838
17143
  iconSize: 12,
16839
17144
  formatter: (value) => {
16840
- const key = String(value);
16841
- const label = mapperConfig[key]?.label ?? labelMap?.[key] ?? formatFieldName(key);
16842
- const displayLabel = legendUppercase ? label.toUpperCase() : label;
16843
- return /* @__PURE__ */ jsx(
16844
- "span",
16845
- {
16846
- className: "inline-flex items-center gap-2 px-1 py-1.5",
16847
- style: {
16848
- fontSize: "13px",
16849
- fontWeight: 600,
16850
- letterSpacing: "0.01em",
16851
- color: "hsl(var(--foreground))"
16852
- },
16853
- children: displayLabel
16854
- }
16855
- );
17145
+ return /* @__PURE__ */ jsx("span", { className: "tracking-[0]", children: fnFormatterValueLegend(
17146
+ value,
17147
+ mapperConfig,
17148
+ labelMap,
17149
+ legendUppercase
17150
+ ) });
16856
17151
  }
16857
17152
  }
16858
17153
  ),
16859
17154
  seriesOrder.map((s) => {
16860
- const key = s.key;
16861
- if (showOnlyHighlighted && !highlightedSeries.has(key))
17155
+ if (showOnlyHighlighted && !highlightedSeries.has(s.key))
16862
17156
  return null;
16863
- const label = mapperConfig[key]?.label ?? labelMap?.[key] ?? formatFieldName(key);
16864
- let color = finalColors[key];
16865
- if (rightKeys.includes(key) && biaxialConfigNormalized?.stroke) {
16866
- if (typeof biaxialConfigNormalized.stroke === "string") {
16867
- color = biaxialConfigNormalized.stroke;
16868
- } else {
16869
- color = biaxialConfigNormalized.stroke[key] ?? color;
16870
- }
16871
- }
17157
+ const { label, color, key } = fnBuildConfigData(
17158
+ s,
17159
+ mapperConfig,
17160
+ labelMap,
17161
+ finalColors,
17162
+ rightKeys,
17163
+ biaxialConfigNormalized
17164
+ );
16872
17165
  if (s.type === "bar") {
16873
17166
  return /* @__PURE__ */ jsx(
16874
17167
  Bar,
@@ -16895,14 +17188,8 @@ var Chart = ({
16895
17188
  {
16896
17189
  dataKey: key,
16897
17190
  content: (props) => {
16898
- const p = props;
16899
- const barHeight = typeof p.height === "number" ? p.height : typeof p.height === "string" ? Number(p.height) : 0;
16900
- const barWidth = typeof p.width === "number" ? p.width : typeof p.width === "string" ? Number(p.width) : 0;
16901
- const smallThreshold = 14;
16902
- const needsOutside = barHeight > 0 && barHeight < smallThreshold || barWidth > 0 && barWidth < smallThreshold;
16903
- if (needsOutside) {
17191
+ if (!fnContentLabelList(props))
16904
17192
  return null;
16905
- }
16906
17193
  const inside = renderInsideBarLabel(
16907
17194
  color,
16908
17195
  finalValueFormatter
@@ -18426,8 +18713,7 @@ function Leaderboard({
18426
18713
  title = "LeaderBoard",
18427
18714
  className,
18428
18715
  isLoading = false,
18429
- legend,
18430
- best = false
18716
+ legend
18431
18717
  }) {
18432
18718
  const [order, setOrder] = useState(initialOrder);
18433
18719
  const [searchTerm, setSearchTerm] = useState("");
@@ -18459,55 +18745,54 @@ function Leaderboard({
18459
18745
  if (typeof aValue === "number") return order === "desc" ? -1 : 1;
18460
18746
  return order === "desc" ? 1 : -1;
18461
18747
  });
18462
- const getBadgeColor = (value, index, total) => {
18463
- if (best) {
18464
- const third = total / 3;
18465
- if (best) {
18466
- if (index < third) return "green";
18467
- if (index < 2 * third) return "yellow";
18468
- return "red";
18469
- }
18470
- }
18748
+ const getBadgeColor = (value) => {
18471
18749
  const numValue = typeof value === "string" ? parseFloat(value) : value;
18472
18750
  if (isNaN(numValue)) return "green";
18473
- if (numValue >= 75) return "red";
18474
- if (numValue >= 25) return "yellow";
18475
- return "green";
18751
+ if (numValue > 100) return "green";
18752
+ if (numValue >= 95) return "yellow";
18753
+ return "red";
18476
18754
  };
18477
18755
  return /* @__PURE__ */ jsxs(
18478
18756
  "div",
18479
18757
  {
18480
- className: `border rounded-xl flex flex-col max-h-80 w-96 ${className}`,
18758
+ className: `border rounded-xl flex flex-col max-h-80 w-[52rem] ${className}`,
18481
18759
  children: [
18482
18760
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-2 px-4 border-b flex-shrink-0 gap-3 ", children: [
18483
18761
  /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold px-1 whitespace-nowrap", children: title }),
18484
- /* @__PURE__ */ jsx("div", { className: "flex-1 max-w-[200px]", children: /* @__PURE__ */ jsx(
18485
- InputBase,
18486
- {
18487
- value: searchTerm,
18488
- onChange: (e) => setSearchTerm(e.target.value),
18489
- placeholder: "Pesquisar...",
18490
- leftIcon: /* @__PURE__ */ jsx(MagnifyingGlassIcon, { size: 16 }),
18491
- className: "h-8 py-1"
18492
- }
18493
- ) }),
18494
- /* @__PURE__ */ jsx(
18495
- ButtonBase,
18496
- {
18497
- size: "icon",
18498
- variant: "outline",
18499
- onClick: () => setOrder(order === "desc" ? "asc" : "desc"),
18500
- disabled: isLoading || sortedData.length === 0,
18501
- children: /* @__PURE__ */ jsx(
18502
- motion.div,
18503
- {
18504
- animate: { rotate: order === "asc" ? 180 : 0 },
18505
- transition: { type: "spring", stiffness: 300, damping: 20 },
18506
- children: /* @__PURE__ */ jsx(CaretUpDownIcon, {})
18507
- }
18508
- )
18509
- }
18510
- )
18762
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
18763
+ /* @__PURE__ */ jsx(
18764
+ InputBase,
18765
+ {
18766
+ value: searchTerm,
18767
+ onChange: (e) => {
18768
+ const value = e.target.value;
18769
+ if (/^[a-zA-Z0-9\s()À-ÿ~^´`]*$/.test(value)) {
18770
+ setSearchTerm(value);
18771
+ }
18772
+ },
18773
+ placeholder: "Pesquisar...",
18774
+ leftIcon: /* @__PURE__ */ jsx(MagnifyingGlassIcon, { size: 16 }),
18775
+ className: "h-8 py-1 w-24"
18776
+ }
18777
+ ),
18778
+ /* @__PURE__ */ jsx(
18779
+ ButtonBase,
18780
+ {
18781
+ size: "icon",
18782
+ variant: "outline",
18783
+ onClick: () => setOrder(order === "desc" ? "asc" : "desc"),
18784
+ disabled: isLoading || sortedData.length === 0,
18785
+ children: /* @__PURE__ */ jsx(
18786
+ motion.div,
18787
+ {
18788
+ animate: { rotate: order === "asc" ? 180 : 0 },
18789
+ transition: { type: "spring", stiffness: 300, damping: 20 },
18790
+ children: /* @__PURE__ */ jsx(CaretUpDownIcon, {})
18791
+ }
18792
+ )
18793
+ }
18794
+ )
18795
+ ] })
18511
18796
  ] }),
18512
18797
  /* @__PURE__ */ jsx("div", { className: "overflow-y-auto flex-1 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/40 transition-colors", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "p-4 space-y-3", children: Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-1", children: [
18513
18798
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1", children: [
@@ -18534,7 +18819,7 @@ function Leaderboard({
18534
18819
  /* @__PURE__ */ jsx(
18535
18820
  Badge,
18536
18821
  {
18537
- color: getBadgeColor(item.value, idx, sortedData.length),
18822
+ color: getBadgeColor(item.value),
18538
18823
  size: "md",
18539
18824
  className: "font-bold",
18540
18825
  children: item.value
@@ -18550,4 +18835,4 @@ function Leaderboard({
18550
18835
  );
18551
18836
  }
18552
18837
 
18553
- export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BarChart_default as BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart_default as Chart, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LineChart_default as LineChart, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, PeriodsDropdown_default as PeriodsDropdown, PieChart_default as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useTheme, useTimeSeriesRange, visualForItem };
18838
+ export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BarChart_default as BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart_default as Chart, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LineChart_default as LineChart, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, PeriodsDropdown_default as PeriodsDropdown, PieChart_default as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useTheme, useTimeSeriesRange, visualForItem };