@mlw-packages/react-components 1.9.5 → 1.9.7

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
@@ -42,7 +42,7 @@ import ptBR3 from 'date-fns/locale/pt-BR';
42
42
  import { useSensors, useSensor, MouseSensor, TouchSensor, PointerSensor, DndContext, DragOverlay, useDroppable, useDraggable } from '@dnd-kit/core';
43
43
  import { CSS } from '@dnd-kit/utilities';
44
44
  import { RadioGroup, RadioGroupItem } from '@radix-ui/react-radio-group';
45
- import { ResponsiveContainer, ComposedChart, XAxis, YAxis, Bar, Line, Area, CartesianGrid, Tooltip, Legend, LabelList, Rectangle, PieChart, Pie, Cell } from 'recharts';
45
+ import { ResponsiveContainer, ComposedChart, XAxis, YAxis, Bar, Line, Area, CartesianGrid, Tooltip, Legend, LabelList, Rectangle } from 'recharts';
46
46
 
47
47
  var __create = Object.create;
48
48
  var __defProp = Object.defineProperty;
@@ -2515,8 +2515,8 @@ function MultiSelectTriggerBase({
2515
2515
  "aria-disabled": disabled || void 0,
2516
2516
  disabled,
2517
2517
  className: cn(
2518
- "flex h-auto max-h-9 min-h-9 w-full items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
2519
- error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input focus:ring-1 focus:ring-ring",
2518
+ "flex h-auto max-h-9 min-h-9 w-full items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground hover:text-primary",
2519
+ error ? "border-destructive focus:ring-1 focus:ring-destructive dark:border-red-500" : "border-border focus:ring-1 focus:ring-ring",
2520
2520
  className
2521
2521
  ),
2522
2522
  children: [
@@ -7843,7 +7843,7 @@ function ScrollColumn({
7843
7843
  {
7844
7844
  className: cn(
7845
7845
  "snap-center flex items-center justify-center select-none font-bold tabular-nums transition-all duration-200",
7846
- isCentered ? "text-2xl sm:text-xl text-foreground scale-110" : "text-base sm:text-sm text-muted-foreground/60"
7846
+ isCentered ? "text-foreground scale-110" : "text-base sm:text-sm text-muted-foreground/60"
7847
7847
  ),
7848
7848
  style: { height: `${itemHeight}px` },
7849
7849
  children: item.toString().padStart(2, "0")
@@ -13974,8 +13974,7 @@ function MultiSelect({
13974
13974
  )
13975
13975
  ]
13976
13976
  }
13977
- ),
13978
- /* @__PURE__ */ jsx(ErrorMessage_default, { error })
13977
+ )
13979
13978
  ] });
13980
13979
  }
13981
13980
 
@@ -15375,7 +15374,7 @@ var RechartTooltipWithTotal = ({
15375
15374
  {
15376
15375
  role: "dialog",
15377
15376
  "aria-label": `Tooltip ${label ?? ""}`,
15378
- className: "bg-card border border-border rounded-lg p-3 shadow-2xl max-w-xs",
15377
+ className: "bg-card border border-border rounded-lg p-3 shadow-2xl max-w-xs z-9999",
15379
15378
  style: { minWidth: 220 },
15380
15379
  children: [
15381
15380
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between mb-2", children: [
@@ -15488,7 +15487,7 @@ var TooltipSimple = ({
15488
15487
  {
15489
15488
  role: "dialog",
15490
15489
  "aria-label": `Tooltip ${label ?? ""}`,
15491
- className: "bg-card border border-border rounded-lg p-3 shadow-2xl max-w-[280px]",
15490
+ className: "bg-card border border-border rounded-lg p-3 shadow-2xl max-w-[280px] z-9999",
15492
15491
  style: { minWidth: 220 },
15493
15492
  children: [
15494
15493
  /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
@@ -16127,7 +16126,7 @@ var HorizontalLegend = ({
16127
16126
  const label = mapperConfig[key]?.label ?? labelMap?.[key] ?? formatFieldName2(key);
16128
16127
  return legendUppercase ? label.toUpperCase() : label;
16129
16128
  };
16130
- return /* @__PURE__ */ jsx("div", { className: cn(className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 sm:gap-3 md:gap-4 overflow-x-auto", children: [
16129
+ return /* @__PURE__ */ jsx("div", { className: cn(className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-left gap-2 sm:gap-3 md:gap-4 overflow-x-auto", children: [
16131
16130
  allKeys.map((key) => {
16132
16131
  const displayLabel = formatLegendLabel(key);
16133
16132
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-shrink-0", children: [
@@ -16166,6 +16165,119 @@ var HorizontalLegend = ({
16166
16165
  ] }) });
16167
16166
  };
16168
16167
  var HorizontalLegend_default = HorizontalLegend;
16168
+ function ChartControls({
16169
+ allKeys,
16170
+ mapperConfig,
16171
+ finalColors,
16172
+ highlightedSeries,
16173
+ toggleHighlight,
16174
+ showOnlyHighlighted,
16175
+ setShowOnlyHighlighted,
16176
+ highlightedSeriesSize,
16177
+ clearHighlights,
16178
+ enableHighlights,
16179
+ enableShowOnly,
16180
+ enablePeriodsDropdown,
16181
+ enableDraggableTooltips,
16182
+ processedData,
16183
+ onOpenPeriod,
16184
+ rightOffset,
16185
+ activePeriods,
16186
+ containerClass,
16187
+ containerWidth
16188
+ }) {
16189
+ return /* @__PURE__ */ jsxs("div", { className: containerClass, children: [
16190
+ enableHighlights && /* @__PURE__ */ jsx(
16191
+ Highlights_default,
16192
+ {
16193
+ allKeys,
16194
+ mapperConfig,
16195
+ finalColors,
16196
+ highlightedSeries,
16197
+ toggleHighlight,
16198
+ containerWidth
16199
+ }
16200
+ ),
16201
+ enableShowOnly && /* @__PURE__ */ jsx(
16202
+ ShowOnly_default,
16203
+ {
16204
+ showOnlyHighlighted,
16205
+ setShowOnlyHighlighted,
16206
+ highlightedSeriesSize,
16207
+ clearHighlights
16208
+ }
16209
+ ),
16210
+ enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsx(
16211
+ PeriodsDropdown_default,
16212
+ {
16213
+ processedData: processedData ?? [],
16214
+ onOpenPeriod: onOpenPeriod ?? (() => {
16215
+ }),
16216
+ rightOffset,
16217
+ activePeriods
16218
+ }
16219
+ ) })
16220
+ ] });
16221
+ }
16222
+ function ChartHeader({
16223
+ title,
16224
+ titlePosition = "left",
16225
+ HORIZONTAL_PADDING_CLASS = "px-24",
16226
+ customLegend,
16227
+ data,
16228
+ allKeys,
16229
+ processedData,
16230
+ finalColors,
16231
+ mapperConfig,
16232
+ finalValueFormatter,
16233
+ formatBR
16234
+ }) {
16235
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16236
+ title && /* @__PURE__ */ jsx(
16237
+ "div",
16238
+ {
16239
+ className: cn(
16240
+ "w-full flex items-center mt-3 mb-2",
16241
+ HORIZONTAL_PADDING_CLASS,
16242
+ titlePosition === "center" && "justify-center",
16243
+ titlePosition === "right" && "justify-end",
16244
+ titlePosition === "left" && "justify-start"
16245
+ ),
16246
+ children: /* @__PURE__ */ jsx("div", { className: "text-[1.4rem] font-semibold text-foreground", children: title })
16247
+ }
16248
+ ),
16249
+ customLegend && !!data.length && /* @__PURE__ */ jsx("div", { className: cn("px-6 mb-2", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
16250
+ ChartTotalLegend_default,
16251
+ {
16252
+ items: allKeys.map((key) => {
16253
+ const values = processedData.map(
16254
+ (d) => Number(d[key] || 0)
16255
+ );
16256
+ const total = values.reduce((a, b) => a + b, 0);
16257
+ const first = values[0] || 0;
16258
+ const last = values[values.length - 1] || 0;
16259
+ const trendValue = first !== 0 ? Math.round((last - first) / first * 100) : 0;
16260
+ const formattedTotal = finalValueFormatter ? finalValueFormatter({
16261
+ value: total,
16262
+ formattedValue: String(total)
16263
+ }) : new Intl.NumberFormat(formatBR ? "pt-BR" : "en-US").format(
16264
+ total
16265
+ );
16266
+ return {
16267
+ label: mapperConfig[key]?.label || key,
16268
+ value: formattedTotal,
16269
+ color: finalColors[key],
16270
+ trend: {
16271
+ value: Math.abs(trendValue),
16272
+ positive: trendValue >= 0,
16273
+ neutral: trendValue === 0
16274
+ }
16275
+ };
16276
+ })
16277
+ }
16278
+ ) })
16279
+ ] });
16280
+ }
16169
16281
  var formatCompactNumber = (value) => {
16170
16282
  const isNegative = value < 0;
16171
16283
  const absValue = Math.abs(value);
@@ -16360,6 +16472,19 @@ var renderInsideBarLabel = (color, valueFormatter) => {
16360
16472
  );
16361
16473
  };
16362
16474
  };
16475
+
16476
+ // src/utils/calcDivision.ts
16477
+ var calcDivision = (dividend, divisor) => {
16478
+ return dividend / divisor;
16479
+ };
16480
+
16481
+ // src/components/ui/charts/utils/formatters.ts
16482
+ function formatLinePercentage(value) {
16483
+ const numValue = typeof value === "number" ? value : typeof value === "string" ? parseFloat(value) : 0;
16484
+ const percentage = calcDivision(numValue, 100);
16485
+ const formattedPercentage = typeof percentage === "number" ? percentage.toFixed(1).replace(".", ",") : String(percentage).replace(".", ",");
16486
+ return `${formattedPercentage}%`;
16487
+ }
16363
16488
  var ChartBar = ({ x, y, w, h, i, loading }) => {
16364
16489
  const baseY = y - h;
16365
16490
  const d = i * 0.08;
@@ -16941,6 +17066,94 @@ var useChartMinMax = ({
16941
17066
  };
16942
17067
  }, [processedData, orderBy, xAxisDataKey, categoryFormatter]);
16943
17068
  };
17069
+ function useProcessedData({
17070
+ data,
17071
+ xAxisKey,
17072
+ timeSeriesConfig,
17073
+ startIndex,
17074
+ endIndex
17075
+ }) {
17076
+ return useMemo(() => {
17077
+ const mapped = data.map((item) => ({
17078
+ ...item,
17079
+ name: String(item[xAxisKey] || "N/A")
17080
+ }));
17081
+ if (timeSeriesConfig) {
17082
+ return mapped.slice(startIndex, endIndex + 1);
17083
+ }
17084
+ return mapped;
17085
+ }, [data, xAxisKey, timeSeriesConfig, startIndex, endIndex]);
17086
+ }
17087
+ function useBiaxial(biaxial, yAxisLabel) {
17088
+ return useMemo(() => {
17089
+ if (!biaxial) return null;
17090
+ if (typeof biaxial === "string") return { key: [biaxial] };
17091
+ if (Array.isArray(biaxial)) return { key: biaxial };
17092
+ const normalized = biaxial;
17093
+ const leftLabelMissing = !yAxisLabel || String(yAxisLabel).trim() === "";
17094
+ const rightLabelMissing = !normalized.label || String(normalized.label).trim() === "";
17095
+ if (leftLabelMissing || rightLabelMissing) {
17096
+ throw new Error(
17097
+ "When using `biaxial`, you must provide both `yAxisLabel` (left axis) and `biaxial.label` (right axis)."
17098
+ );
17099
+ }
17100
+ return normalized;
17101
+ }, [biaxial, yAxisLabel]);
17102
+ }
17103
+ function useChartLayout({
17104
+ chartMargin,
17105
+ yAxisLabel,
17106
+ AXIS_LABEL_MARGIN,
17107
+ yTickFormatter,
17108
+ minLeftDataValue,
17109
+ niceMaxLeft,
17110
+ rightKeysLength,
17111
+ measuredWidth,
17112
+ width,
17113
+ computedWidth
17114
+ }) {
17115
+ const finalChartRightMargin = chartMargin?.right ?? (rightKeysLength > 0 ? AXIS_LABEL_MARGIN : 30);
17116
+ const finalChartLeftMargin = chartMargin?.left ?? (yAxisLabel ? AXIS_LABEL_MARGIN : 0);
17117
+ const yAxisTickWidth = useMemo(() => {
17118
+ const yAxisLabelStr = yAxisLabel === null || yAxisLabel === void 0 ? void 0 : String(yAxisLabel);
17119
+ return computeYAxisTickWidth(
17120
+ chartMargin?.left,
17121
+ yAxisLabelStr,
17122
+ AXIS_LABEL_MARGIN,
17123
+ yTickFormatter,
17124
+ minLeftDataValue,
17125
+ niceMaxLeft
17126
+ );
17127
+ }, [
17128
+ chartMargin?.left,
17129
+ yAxisLabel,
17130
+ AXIS_LABEL_MARGIN,
17131
+ yTickFormatter,
17132
+ minLeftDataValue,
17133
+ niceMaxLeft
17134
+ ]);
17135
+ const effectiveChartWidth = typeof width === "number" ? width : measuredWidth ? Math.max(0, measuredWidth - 32) : computedWidth;
17136
+ const chartInnerWidth = effectiveChartWidth - finalChartLeftMargin - finalChartRightMargin;
17137
+ const leftYAxisLabelDx = -Math.max(12, Math.round(yAxisTickWidth / 2));
17138
+ const rightYAxisLabelDx = Math.max(12, Math.round(finalChartRightMargin / 2));
17139
+ return {
17140
+ finalChartRightMargin,
17141
+ finalChartLeftMargin,
17142
+ yAxisTickWidth,
17143
+ effectiveChartWidth,
17144
+ chartInnerWidth,
17145
+ leftYAxisLabelDx,
17146
+ rightYAxisLabelDx
17147
+ };
17148
+ }
17149
+ function useSeriesOpacity(highlightedSeries) {
17150
+ return useCallback(
17151
+ (key) => {
17152
+ return highlightedSeries.size > 0 ? highlightedSeries.has(key) ? 1 : 0.25 : 1;
17153
+ },
17154
+ [highlightedSeries]
17155
+ );
17156
+ }
16944
17157
  var filtersOrder = (mapperConfig, series) => {
16945
17158
  const seriesOrder = [];
16946
17159
  if (series) {
@@ -17064,10 +17277,37 @@ var fnContentLabelList = (p) => {
17064
17277
  return needsOutside ? null : true;
17065
17278
  };
17066
17279
 
17067
- // src/utils/calcDivision.ts
17068
- var calcDivision = (dividend, divisor) => {
17069
- return dividend / divisor;
17070
- };
17280
+ // src/components/ui/charts/hooks/useOpenTooltipForPeriod.ts
17281
+ function useOpenTooltipForPeriod({
17282
+ enableDraggableTooltips,
17283
+ processedData,
17284
+ activeTooltips,
17285
+ setActiveTooltips,
17286
+ maxTooltips,
17287
+ effectiveChartWidth
17288
+ }) {
17289
+ return useCallback(
17290
+ (periodName) => {
17291
+ fnOpenTooltipForPeriod(
17292
+ enableDraggableTooltips,
17293
+ processedData,
17294
+ periodName,
17295
+ activeTooltips,
17296
+ setActiveTooltips,
17297
+ maxTooltips,
17298
+ effectiveChartWidth
17299
+ );
17300
+ },
17301
+ [
17302
+ enableDraggableTooltips,
17303
+ processedData,
17304
+ activeTooltips,
17305
+ effectiveChartWidth,
17306
+ maxTooltips,
17307
+ setActiveTooltips
17308
+ ]
17309
+ );
17310
+ }
17071
17311
  var DEFAULT_COLORS2 = ["#55af7d", "#8e68ff", "#2273e1"];
17072
17312
  var Chart = ({
17073
17313
  data,
@@ -17142,39 +17382,20 @@ var Chart = ({
17142
17382
  defaultEndIndex: timeSeriesConfig?.end,
17143
17383
  onRangeChange: timeSeriesConfig?.onRangeChange
17144
17384
  });
17145
- const processedData = useMemo(() => {
17146
- const mapped = data.map((item) => ({
17147
- ...item,
17148
- name: String(item[xAxisConfig.dataKey] || "N/A")
17149
- }));
17150
- let result = mapped;
17151
- if (timeSeriesConfig) {
17152
- result = mapped.slice(startIndex, endIndex + 1);
17153
- }
17154
- return result;
17155
- }, [data, xAxisConfig.dataKey, timeSeriesConfig, startIndex, endIndex]);
17385
+ const processedData = useProcessedData({
17386
+ data,
17387
+ xAxisKey: xAxisConfig.dataKey,
17388
+ timeSeriesConfig,
17389
+ startIndex,
17390
+ endIndex
17391
+ });
17156
17392
  const seriesOrder = filtersOrder(mapperConfig, series);
17157
17393
  const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
17158
17394
  const finalColors = useMemo(
17159
17395
  () => generateColorMap(allKeys, colors2, mapperConfig),
17160
17396
  [allKeys, colors2, mapperConfig]
17161
17397
  );
17162
- const biaxialConfigNormalized = useMemo(() => {
17163
- if (!biaxial) return null;
17164
- if (typeof biaxial === "string") return { key: [biaxial] };
17165
- if (Array.isArray(biaxial)) return { key: biaxial };
17166
- return biaxial;
17167
- }, [biaxial]);
17168
- useMemo(() => {
17169
- if (!biaxialConfigNormalized) return;
17170
- const leftLabelMissing = !yAxisLabel || String(yAxisLabel).trim() === "";
17171
- const rightLabelMissing = !biaxialConfigNormalized.label || String(biaxialConfigNormalized.label).trim() === "";
17172
- if (leftLabelMissing || rightLabelMissing) {
17173
- throw new Error(
17174
- "When using `biaxial`, you must provide both `yAxisLabel` (left axis) and `biaxial.label` (right axis)."
17175
- );
17176
- }
17177
- }, [biaxialConfigNormalized, yAxisLabel]);
17398
+ const biaxialConfigNormalized = useBiaxial(biaxial, yAxisLabel);
17178
17399
  const rightKeys = useMemo(
17179
17400
  () => biaxialConfigNormalized?.key ?? [],
17180
17401
  [biaxialConfigNormalized]
@@ -17229,12 +17450,7 @@ var Chart = ({
17229
17450
  setActiveTooltips
17230
17451
  }
17231
17452
  );
17232
- const getSeriesOpacity = useCallback(
17233
- (key) => {
17234
- return highlightedSeries.size > 0 ? highlightedSeries.has(key) ? 1 : 0.25 : 1;
17235
- },
17236
- [highlightedSeries]
17237
- );
17453
+ const getSeriesOpacity = useSeriesOpacity(highlightedSeries);
17238
17454
  const finalValueFormatter = useMemo(
17239
17455
  () => createValueFormatter(valueFormatter, formatBR),
17240
17456
  [valueFormatter, formatBR]
@@ -17245,51 +17461,36 @@ var Chart = ({
17245
17461
  );
17246
17462
  const AXIS_LABEL_MARGIN = 56;
17247
17463
  const CONTAINER_PADDING_LEFT = -6;
17248
- const finalChartRightMargin = chartMargin?.right ?? (rightKeys.length > 0 ? AXIS_LABEL_MARGIN : 30);
17249
- const finalChartLeftMargin = chartMargin?.left ?? (yAxisLabel ? AXIS_LABEL_MARGIN : 0);
17250
- const yAxisTickWidth = useMemo(() => {
17251
- return computeYAxisTickWidth(
17252
- chartMargin?.left,
17253
- yAxisLabel,
17254
- AXIS_LABEL_MARGIN,
17255
- yTickFormatter,
17256
- minLeftDataValue,
17257
- niceMaxLeft
17258
- );
17259
- }, [
17260
- chartMargin?.left,
17464
+ const HORIZONTAL_PADDING_CLASS = "px-24";
17465
+ const teste = "pl-24 pr-4";
17466
+ const {
17467
+ finalChartRightMargin,
17468
+ finalChartLeftMargin,
17469
+ yAxisTickWidth,
17470
+ effectiveChartWidth,
17471
+ chartInnerWidth,
17472
+ leftYAxisLabelDx,
17473
+ rightYAxisLabelDx
17474
+ } = useChartLayout({
17475
+ chartMargin,
17261
17476
  yAxisLabel,
17477
+ AXIS_LABEL_MARGIN,
17262
17478
  yTickFormatter,
17263
17479
  minLeftDataValue,
17264
- niceMaxLeft
17265
- ]);
17266
- const HORIZONTAL_PADDING_CLASS = "px-24";
17267
- const teste = "pl-24 pr-4";
17268
- const effectiveChartWidth = typeof width === "number" ? width : measuredWidth ? Math.max(0, measuredWidth - 32) : computedWidth;
17269
- const chartInnerWidth = effectiveChartWidth - finalChartLeftMargin - finalChartRightMargin;
17270
- const leftYAxisLabelDx = -Math.max(12, Math.round(yAxisTickWidth / 2));
17271
- const rightYAxisLabelDx = Math.max(12, Math.round(finalChartRightMargin / 2));
17272
- const openTooltipForPeriod = useCallback(
17273
- (periodName) => {
17274
- fnOpenTooltipForPeriod(
17275
- enableDraggableTooltips,
17276
- processedData,
17277
- periodName,
17278
- activeTooltips,
17279
- setActiveTooltips,
17280
- maxTooltips,
17281
- effectiveChartWidth
17282
- );
17283
- },
17284
- [
17285
- enableDraggableTooltips,
17286
- processedData,
17287
- activeTooltips,
17288
- effectiveChartWidth,
17289
- maxTooltips,
17290
- setActiveTooltips
17291
- ]
17292
- );
17480
+ niceMaxLeft,
17481
+ rightKeysLength: rightKeys.length,
17482
+ measuredWidth,
17483
+ width,
17484
+ computedWidth
17485
+ });
17486
+ const openTooltipForPeriod = useOpenTooltipForPeriod({
17487
+ enableDraggableTooltips,
17488
+ processedData,
17489
+ activeTooltips,
17490
+ setActiveTooltips,
17491
+ maxTooltips,
17492
+ effectiveChartWidth
17493
+ });
17293
17494
  if (!data && !isLoading) return null;
17294
17495
  if (isLoading) {
17295
17496
  return /* @__PURE__ */ jsx(
@@ -17304,128 +17505,65 @@ var Chart = ({
17304
17505
  );
17305
17506
  }
17306
17507
  if (Array.isArray(data) && data.length === 0) {
17307
- return /* @__PURE__ */ jsxs("div", { children: [
17308
- /* @__PURE__ */ jsx(
17309
- NoData_default,
17310
- {
17311
- title,
17312
- paddingLeft: CONTAINER_PADDING_LEFT + finalChartLeftMargin,
17313
- height
17314
- }
17315
- ),
17316
- /* @__PURE__ */ jsx("div", { style: { height: 0 }, children: /* @__PURE__ */ jsxs("svg", { width: effectiveChartWidth, height, children: [
17317
- xAxisLabel && /* @__PURE__ */ jsx(
17318
- "text",
17319
- {
17320
- x: effectiveChartWidth - 40,
17321
- y: height - 10,
17322
- fontSize: 12,
17323
- fill: "hsl(var(--muted-foreground))",
17324
- fontWeight: 500,
17325
- textAnchor: "end",
17326
- children: xAxisLabel
17327
- }
17328
- ),
17329
- yAxisLabel && /* @__PURE__ */ jsx(
17330
- "text",
17331
- {
17332
- x: 20,
17333
- y: 40,
17334
- fontSize: 12,
17335
- fill: "hsl(var(--muted-foreground))",
17336
- fontWeight: 500,
17337
- textAnchor: "start",
17338
- transform: `rotate(-90 20 40)`,
17339
- children: yAxisLabel
17340
- }
17341
- )
17342
- ] }) })
17343
- ] });
17508
+ return /* @__PURE__ */ jsx(
17509
+ NoData_default,
17510
+ {
17511
+ title,
17512
+ paddingLeft: CONTAINER_PADDING_LEFT + finalChartLeftMargin,
17513
+ height
17514
+ }
17515
+ );
17344
17516
  }
17345
17517
  return /* @__PURE__ */ jsxs(
17346
17518
  "div",
17347
17519
  {
17348
17520
  ref: wrapperRef,
17349
17521
  className: cn(
17350
- "w-full overflow-hidden min-w-0 rounded-lg border-border",
17522
+ "w-full overflow-hidden min-w-0 rounded-lg border-border h-full",
17351
17523
  className
17352
17524
  ),
17353
17525
  children: [
17354
17526
  /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card relative w-full max-w-full min-w-0 py-1", children: [
17355
- title && /* @__PURE__ */ jsx(
17356
- "div",
17527
+ /* @__PURE__ */ jsx(
17528
+ ChartHeader,
17357
17529
  {
17358
- className: cn(
17359
- "w-full flex items-center mt-3 mb-2",
17360
- HORIZONTAL_PADDING_CLASS,
17361
- titlePosition === "center" && "justify-center",
17362
- titlePosition === "right" && "justify-end",
17363
- titlePosition === "left" && "justify-start"
17364
- ),
17365
- children: /* @__PURE__ */ jsx("div", { className: "text-[1.4rem] font-semibold text-foreground", children: title })
17530
+ title,
17531
+ titlePosition,
17532
+ HORIZONTAL_PADDING_CLASS,
17533
+ customLegend,
17534
+ data,
17535
+ allKeys,
17536
+ processedData,
17537
+ finalColors,
17538
+ mapperConfig,
17539
+ finalValueFormatter,
17540
+ formatBR
17366
17541
  }
17367
17542
  ),
17368
- customLegend && !!data.length && /* @__PURE__ */ jsx("div", { className: cn("px-6 mb-2", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
17369
- ChartTotalLegend_default,
17543
+ allKeys.length > 0 && (enableHighlights || enableShowOnly) && /* @__PURE__ */ jsx(
17544
+ ChartControls,
17370
17545
  {
17371
- items: allKeys.map((key) => {
17372
- const values = processedData.map(
17373
- (d) => Number(d[key] || 0)
17374
- );
17375
- const total = values.reduce((a, b) => a + b, 0);
17376
- const first = values[0] || 0;
17377
- const last = values[values.length - 1] || 0;
17378
- const trendValue = first !== 0 ? Math.round((last - first) / first * 100) : 0;
17379
- const formattedTotal = finalValueFormatter ? finalValueFormatter({
17380
- value: total,
17381
- formattedValue: String(total)
17382
- }) : new Intl.NumberFormat(formatBR ? "pt-BR" : "en-US").format(
17383
- total
17384
- );
17385
- return {
17386
- label: mapperConfig[key]?.label || key,
17387
- value: formattedTotal,
17388
- color: finalColors[key],
17389
- trend: {
17390
- value: Math.abs(trendValue),
17391
- positive: trendValue >= 0,
17392
- neutral: trendValue === 0
17393
- }
17394
- };
17395
- })
17546
+ allKeys,
17547
+ mapperConfig,
17548
+ finalColors,
17549
+ highlightedSeries,
17550
+ toggleHighlight,
17551
+ showOnlyHighlighted,
17552
+ setShowOnlyHighlighted,
17553
+ highlightedSeriesSize: highlightedSeries.size,
17554
+ clearHighlights,
17555
+ enableHighlights,
17556
+ enableShowOnly,
17557
+ enablePeriodsDropdown,
17558
+ enableDraggableTooltips,
17559
+ processedData,
17560
+ onOpenPeriod: openTooltipForPeriod,
17561
+ rightOffset: finalChartRightMargin,
17562
+ activePeriods,
17563
+ containerClass: cn("flex items-center gap-2", teste),
17564
+ containerWidth: chartInnerWidth
17396
17565
  }
17397
- ) }),
17398
- allKeys.length > 0 && (enableHighlights || enableShowOnly) && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", teste), children: [
17399
- enableHighlights && /* @__PURE__ */ jsx(
17400
- Highlights_default,
17401
- {
17402
- allKeys,
17403
- mapperConfig,
17404
- finalColors,
17405
- highlightedSeries,
17406
- toggleHighlight,
17407
- containerWidth: chartInnerWidth
17408
- }
17409
- ),
17410
- enableShowOnly && /* @__PURE__ */ jsx(
17411
- ShowOnly_default,
17412
- {
17413
- showOnlyHighlighted,
17414
- setShowOnlyHighlighted,
17415
- highlightedSeriesSize: highlightedSeries.size,
17416
- clearHighlights
17417
- }
17418
- ),
17419
- enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsx(
17420
- PeriodsDropdown_default,
17421
- {
17422
- processedData,
17423
- onOpenPeriod: openTooltipForPeriod,
17424
- rightOffset: finalChartRightMargin,
17425
- activePeriods
17426
- }
17427
- ) })
17428
- ] }),
17566
+ ),
17429
17567
  !(allKeys.length > 0 && (enableHighlights || enableShowOnly)) && enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx(
17430
17568
  "div",
17431
17569
  {
@@ -17447,7 +17585,7 @@ var Chart = ({
17447
17585
  )
17448
17586
  }
17449
17587
  ),
17450
- /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(
17588
+ /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, className: "h-full", children: /* @__PURE__ */ jsxs(
17451
17589
  ComposedChart,
17452
17590
  {
17453
17591
  data: processedData,
@@ -17664,12 +17802,6 @@ var Chart = ({
17664
17802
  );
17665
17803
  }
17666
17804
  if (s.type === "line") {
17667
- const lineFormatter = (props) => {
17668
- const numValue = typeof props.value === "number" ? props.value : typeof props.value === "string" ? parseFloat(props.value) : 0;
17669
- const percentage = calcDivision(numValue, 100);
17670
- const formattedPercentage = typeof percentage === "number" ? percentage.toFixed(1).replace(".", ",") : String(percentage).replace(".", ",");
17671
- return `${formattedPercentage}%`;
17672
- };
17673
17805
  return /* @__PURE__ */ jsx(
17674
17806
  Line,
17675
17807
  {
@@ -17691,7 +17823,7 @@ var Chart = ({
17691
17823
  content: pillLabelRenderer_default(
17692
17824
  color,
17693
17825
  "filled",
17694
- lineFormatter
17826
+ (props) => formatLinePercentage(props.value)
17695
17827
  ),
17696
17828
  offset: 14
17697
17829
  }
@@ -17806,109 +17938,493 @@ var Chart = ({
17806
17938
  );
17807
17939
  };
17808
17940
  var Chart_default = Chart;
17809
- var defaultData = [
17810
- { name: "Vendas", value: 4e3 },
17811
- { name: "Marketing", value: 3e3 },
17812
- { name: "Desenvolvimento", value: 2e3 },
17813
- { name: "Suporte", value: 1e3 },
17814
- { name: "Outros", value: 800 }
17815
- ];
17816
- var DEFAULT_COLORS3 = [
17817
- "#55af7d",
17818
- // verde do projeto
17819
- "#8e68ff",
17820
- // roxo do projeto
17821
- "#2273e1",
17822
- // azul do projeto
17823
- "#f59e0b",
17824
- // amarelo complementar
17825
- "#ef4444",
17826
- // vermelho complementar
17827
- "#8b5cf6",
17828
- // roxo claro
17829
- "#06b6d4",
17830
- // ciano
17831
- "#84cc16"
17832
- // verde lima
17833
- ];
17834
- var RADIAN = Math.PI / 180;
17835
- var renderCustomizedLabel = ({
17836
- cx = 0,
17837
- cy = 0,
17838
- midAngle = 0,
17839
- innerRadius = 0,
17840
- outerRadius = 0,
17841
- percent = 0
17842
- }) => {
17843
- const radius = innerRadius + (outerRadius - innerRadius) * 0.5;
17844
- const x = cx + radius * Math.cos(-midAngle * RADIAN);
17845
- const y = cy + radius * Math.sin(-midAngle * RADIAN);
17846
- return /* @__PURE__ */ jsx(
17847
- "text",
17848
- {
17849
- x,
17850
- y,
17851
- fill: "white",
17852
- textAnchor: x > cx ? "start" : "end",
17853
- dominantBaseline: "central",
17854
- fontSize: 12,
17855
- fontWeight: "600",
17856
- children: `${(percent * 100).toFixed(0)}%`
17857
- }
17858
- );
17859
- };
17860
- var CustomPieChart = ({
17861
- data = defaultData,
17941
+ var DEFAULT_COLORS3 = ["#0d1136", "#666655", "#1a1a1a"];
17942
+ var HorizontalChart = ({
17943
+ data,
17944
+ series,
17862
17945
  className,
17863
- height = 400,
17946
+ height = 500,
17864
17947
  width = "100%",
17865
- colors: colors2,
17948
+ colors: colors2 = DEFAULT_COLORS3,
17949
+ gridColor,
17950
+ showGrid = true,
17866
17951
  showTooltip = true,
17867
17952
  showLegend = true,
17868
- showLabels = true,
17869
- innerRadius = 0,
17870
- outerRadius = 120,
17871
- centerX = "50%",
17872
- centerY = "50%"
17953
+ title,
17954
+ titlePosition = "left",
17955
+ showLabels = false,
17956
+ labelsVisibility = { bar: true },
17957
+ xAxis,
17958
+ xAxisLabel,
17959
+ yAxisLabel,
17960
+ labelMap,
17961
+ valueFormatter,
17962
+ categoryFormatter,
17963
+ enableHighlights = false,
17964
+ enableShowOnly = false,
17965
+ enablePeriodsDropdown = false,
17966
+ enableDraggableTooltips = false,
17967
+ showTooltipTotal = false,
17968
+ periodLabel = "Per\xEDodo",
17969
+ maxTooltips = 5,
17970
+ formatBR = false,
17971
+ legendUppercase = false,
17972
+ chartMargin,
17973
+ isLoading = false,
17974
+ customLegend,
17975
+ orderBy
17873
17976
  }) => {
17874
- const finalColors = colors2 || DEFAULT_COLORS3;
17875
- return /* @__PURE__ */ jsx("div", { className: cn("w-full rounded-lg bg-card p-4", className), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(PieChart, { children: [
17876
- /* @__PURE__ */ jsx(
17877
- Pie,
17977
+ const { xAxisConfig, mapperConfig } = useMemo(() => {
17978
+ return fnSmartConfig({ xAxis, data, labelMap });
17979
+ }, [data, xAxis, labelMap]);
17980
+ const {
17981
+ highlightedSeries,
17982
+ showOnlyHighlighted,
17983
+ toggleHighlight,
17984
+ setShowOnlyHighlighted,
17985
+ clearHighlights
17986
+ } = useChartHighlights();
17987
+ const { wrapperRef, measuredWidth } = useChartDimensions();
17988
+ const {
17989
+ activeTooltips,
17990
+ toggleTooltip,
17991
+ onTooltipPositionChange,
17992
+ setActiveTooltips
17993
+ } = useChartTooltips(maxTooltips);
17994
+ useEffect(() => {
17995
+ if (highlightedSeries.size === 0 && showOnlyHighlighted) {
17996
+ setShowOnlyHighlighted(false);
17997
+ }
17998
+ }, [highlightedSeries, showOnlyHighlighted, setShowOnlyHighlighted]);
17999
+ const processedData = useMemo(() => {
18000
+ const mapped = data.map((item) => ({
18001
+ ...item,
18002
+ name: String(item[xAxisConfig.dataKey] || "N/A")
18003
+ }));
18004
+ if (orderBy && mapped.length > 0) {
18005
+ return [...mapped].sort((a, b) => {
18006
+ const valueA = Number(a[orderBy]) || 0;
18007
+ const valueB = Number(b[orderBy]) || 0;
18008
+ return valueB - valueA;
18009
+ });
18010
+ }
18011
+ return mapped;
18012
+ }, [data, xAxisConfig.dataKey, orderBy]);
18013
+ const seriesOrder = filtersOrder(mapperConfig, series);
18014
+ const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
18015
+ const finalColors = useMemo(
18016
+ () => generateColorMap(allKeys, colors2, mapperConfig),
18017
+ [allKeys, colors2, mapperConfig]
18018
+ );
18019
+ const activePeriods = useMemo(
18020
+ () => activeTooltips.map((t) => adaptDataForTooltip(t.data, xAxisConfig.dataKey).name),
18021
+ [activeTooltips, xAxisConfig.dataKey]
18022
+ );
18023
+ const maxDataValue = useMemo(() => {
18024
+ return getMaxDataValue(processedData, allKeys);
18025
+ }, [processedData, allKeys]);
18026
+ const minDataValue = useMemo(() => {
18027
+ return getMinDataValue(processedData, allKeys);
18028
+ }, [processedData, allKeys]);
18029
+ const niceMax = useMemo(() => computeNiceMax(maxDataValue), [maxDataValue]);
18030
+ const { handleChartClick, handleBarClick } = useChartClick({
18031
+ enableDraggableTooltips,
18032
+ xAxisDataKey: xAxisConfig.dataKey,
18033
+ toggleTooltip,
18034
+ setActiveTooltips
18035
+ });
18036
+ const getSeriesOpacity = useCallback(
18037
+ (key) => {
18038
+ return highlightedSeries.size > 0 ? highlightedSeries.has(key) ? 1 : 0.25 : 1;
18039
+ },
18040
+ [highlightedSeries]
18041
+ );
18042
+ const finalValueFormatter = useMemo(
18043
+ () => createValueFormatter(valueFormatter, formatBR),
18044
+ [valueFormatter, formatBR]
18045
+ );
18046
+ const yTickFormatter = useMemo(
18047
+ () => createYTickFormatter(finalValueFormatter),
18048
+ [finalValueFormatter]
18049
+ );
18050
+ const CONTAINER_PADDING_LEFT = -6;
18051
+ const finalChartRightMargin = chartMargin?.right ?? 0;
18052
+ const finalChartLeftMargin = chartMargin?.left ?? 0;
18053
+ const HORIZONTAL_PADDING_CLASS = "px-6";
18054
+ const effectiveChartWidth = typeof width === "number" ? width : measuredWidth ? Math.max(0, measuredWidth - 32) : 800;
18055
+ const chartInnerWidth = effectiveChartWidth - finalChartLeftMargin - finalChartRightMargin;
18056
+ const openTooltipForPeriod = useCallback(
18057
+ (periodName) => {
18058
+ fnOpenTooltipForPeriod(
18059
+ enableDraggableTooltips,
18060
+ processedData,
18061
+ periodName,
18062
+ activeTooltips,
18063
+ setActiveTooltips,
18064
+ maxTooltips,
18065
+ effectiveChartWidth
18066
+ );
18067
+ },
18068
+ [
18069
+ enableDraggableTooltips,
18070
+ processedData,
18071
+ activeTooltips,
18072
+ effectiveChartWidth,
18073
+ maxTooltips,
18074
+ setActiveTooltips
18075
+ ]
18076
+ );
18077
+ if (!data && !isLoading) return null;
18078
+ if (isLoading) {
18079
+ return /* @__PURE__ */ jsx(
18080
+ NoData_default,
17878
18081
  {
17879
- data,
17880
- cx: centerX,
17881
- cy: centerY,
17882
- labelLine: false,
17883
- label: showLabels ? renderCustomizedLabel : false,
17884
- outerRadius,
17885
- innerRadius,
17886
- fill: "#8884d8",
17887
- dataKey: "value",
17888
- children: data.map((entry, index) => /* @__PURE__ */ jsx(
17889
- Cell,
17890
- {
17891
- fill: finalColors[index % finalColors.length]
17892
- },
17893
- `cell-${entry.name}-${index}`
17894
- ))
18082
+ title,
18083
+ isLoading: true,
18084
+ loadingMessage: typeof title === "string" ? `${title} \u2014 Carregando` : "Carregando",
18085
+ paddingLeft: CONTAINER_PADDING_LEFT + finalChartLeftMargin,
18086
+ height
17895
18087
  }
17896
- ),
17897
- showTooltip && /* @__PURE__ */ jsx(
17898
- Tooltip,
18088
+ );
18089
+ }
18090
+ if (Array.isArray(data) && data.length === 0) {
18091
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
18092
+ NoData_default,
17899
18093
  {
17900
- contentStyle: {
17901
- backgroundColor: "hsl(var(--popover))",
17902
- border: "1px solid hsl(var(--border))",
17903
- borderRadius: "6px",
17904
- color: "hsl(var(--popover-foreground))"
17905
- }
18094
+ title,
18095
+ paddingLeft: CONTAINER_PADDING_LEFT + finalChartLeftMargin,
18096
+ height
17906
18097
  }
17907
- ),
17908
- showLegend && /* @__PURE__ */ jsx(Legend, {})
17909
- ] }) }) });
18098
+ ) });
18099
+ }
18100
+ return /* @__PURE__ */ jsxs(
18101
+ "div",
18102
+ {
18103
+ ref: wrapperRef,
18104
+ className: cn(
18105
+ "w-full overflow-hidden min-w-0 rounded-lg border-border",
18106
+ className
18107
+ ),
18108
+ children: [
18109
+ /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card relative w-full max-w-full min-w-0 py-1", children: [
18110
+ title && /* @__PURE__ */ jsx(
18111
+ "div",
18112
+ {
18113
+ className: cn(
18114
+ "w-full flex items-center mt-3 mb-2",
18115
+ HORIZONTAL_PADDING_CLASS,
18116
+ titlePosition === "center" && "justify-center",
18117
+ titlePosition === "right" && "justify-end",
18118
+ titlePosition === "left" && "justify-start"
18119
+ ),
18120
+ children: /* @__PURE__ */ jsx("div", { className: "text-[1.4rem] font-semibold text-foreground", children: title })
18121
+ }
18122
+ ),
18123
+ customLegend && !!data.length && /* @__PURE__ */ jsx("div", { className: cn("px-6 mb-2", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
18124
+ ChartTotalLegend_default,
18125
+ {
18126
+ items: allKeys.map((key) => {
18127
+ const values = processedData.map(
18128
+ (d) => Number(d[key] || 0)
18129
+ );
18130
+ const total = values.reduce((a, b) => a + b, 0);
18131
+ const first = values[0] || 0;
18132
+ const last = values[values.length - 1] || 0;
18133
+ const trendValue = first !== 0 ? Math.round((last - first) / first * 100) : 0;
18134
+ const formattedTotal = finalValueFormatter ? finalValueFormatter({
18135
+ value: total,
18136
+ formattedValue: String(total)
18137
+ }) : new Intl.NumberFormat(formatBR ? "pt-BR" : "en-US").format(
18138
+ total
18139
+ );
18140
+ return {
18141
+ label: mapperConfig[key]?.label || key,
18142
+ value: formattedTotal,
18143
+ color: finalColors[key],
18144
+ trend: {
18145
+ value: Math.abs(trendValue),
18146
+ positive: trendValue >= 0,
18147
+ neutral: trendValue === 0
18148
+ }
18149
+ };
18150
+ })
18151
+ }
18152
+ ) }),
18153
+ allKeys.length > 0 && (enableHighlights || enableShowOnly) && /* @__PURE__ */ jsxs(
18154
+ "div",
18155
+ {
18156
+ className: cn("flex items-center gap-2", HORIZONTAL_PADDING_CLASS),
18157
+ children: [
18158
+ enableHighlights && /* @__PURE__ */ jsx(
18159
+ Highlights_default,
18160
+ {
18161
+ allKeys,
18162
+ mapperConfig,
18163
+ finalColors,
18164
+ highlightedSeries,
18165
+ toggleHighlight,
18166
+ containerWidth: chartInnerWidth
18167
+ }
18168
+ ),
18169
+ enableShowOnly && /* @__PURE__ */ jsx(
18170
+ ShowOnly_default,
18171
+ {
18172
+ showOnlyHighlighted,
18173
+ setShowOnlyHighlighted,
18174
+ highlightedSeriesSize: highlightedSeries.size,
18175
+ clearHighlights
18176
+ }
18177
+ ),
18178
+ enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsx(
18179
+ PeriodsDropdown_default,
18180
+ {
18181
+ processedData,
18182
+ onOpenPeriod: openTooltipForPeriod,
18183
+ rightOffset: finalChartRightMargin,
18184
+ activePeriods
18185
+ }
18186
+ ) })
18187
+ ]
18188
+ }
18189
+ ),
18190
+ !(allKeys.length > 0 && (enableHighlights || enableShowOnly)) && enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx(
18191
+ "div",
18192
+ {
18193
+ className: cn(
18194
+ "w-full flex justify-end mb-2",
18195
+ HORIZONTAL_PADDING_CLASS
18196
+ ),
18197
+ children: /* @__PURE__ */ jsx(
18198
+ PeriodsDropdown_default,
18199
+ {
18200
+ processedData,
18201
+ onOpenPeriod: openTooltipForPeriod,
18202
+ rightOffset: finalChartRightMargin
18203
+ }
18204
+ )
18205
+ }
18206
+ ),
18207
+ showLegend && /* @__PURE__ */ jsx("div", { className: cn("mb-3", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
18208
+ HorizontalLegend_default,
18209
+ {
18210
+ allKeys,
18211
+ mapperConfig,
18212
+ finalColors,
18213
+ labelMap,
18214
+ legendUppercase
18215
+ }
18216
+ ) }),
18217
+ /* @__PURE__ */ jsx(
18218
+ "div",
18219
+ {
18220
+ className: cn(
18221
+ "overflow-y-auto overflow-x-hidden px-6",
18222
+ "scrollbar-thin scrollbar-thumb-muted scrollbar-track-transparent mb-2"
18223
+ ),
18224
+ style: {
18225
+ maxHeight: height
18226
+ },
18227
+ children: /* @__PURE__ */ jsx(
18228
+ ResponsiveContainer,
18229
+ {
18230
+ width: "100%",
18231
+ height: Math.max(height, processedData.length * 50),
18232
+ children: /* @__PURE__ */ jsxs(
18233
+ ComposedChart,
18234
+ {
18235
+ layout: "vertical",
18236
+ data: processedData,
18237
+ height: Math.max(height, processedData.length * 50),
18238
+ margin: {
18239
+ top: 10,
18240
+ right: finalChartRightMargin,
18241
+ left: 55 + finalChartLeftMargin,
18242
+ bottom: 10
18243
+ },
18244
+ onClick: handleChartClick,
18245
+ children: [
18246
+ showGrid && /* @__PURE__ */ jsx(
18247
+ CartesianGrid,
18248
+ {
18249
+ strokeDasharray: "3 3",
18250
+ stroke: gridColor || "hsl(var(--muted-foreground))",
18251
+ opacity: 0.5
18252
+ }
18253
+ ),
18254
+ /* @__PURE__ */ jsx(
18255
+ XAxis,
18256
+ {
18257
+ type: "number",
18258
+ stroke: "hsl(var(--muted-foreground))",
18259
+ fontSize: 12,
18260
+ tickLine: false,
18261
+ orientation: "top",
18262
+ axisLine: false,
18263
+ tickFormatter: yTickFormatter,
18264
+ domain: [Math.min(minDataValue, 0), niceMax],
18265
+ label: yAxisLabel ? {
18266
+ value: yAxisLabel,
18267
+ position: "insideTopRight",
18268
+ offset: -1,
18269
+ style: {
18270
+ fontSize: 12,
18271
+ fill: "hsl(var(--muted-foreground))",
18272
+ fontWeight: 500
18273
+ }
18274
+ } : void 0
18275
+ }
18276
+ ),
18277
+ /* @__PURE__ */ jsx(
18278
+ YAxis,
18279
+ {
18280
+ type: "category",
18281
+ dataKey: xAxisConfig.dataKey,
18282
+ stroke: "hsl(var(--muted-foreground))",
18283
+ fontSize: 12,
18284
+ tickLine: true,
18285
+ minTickGap: 24,
18286
+ axisLine: true,
18287
+ tickFormatter: (value) => {
18288
+ if (categoryFormatter)
18289
+ return categoryFormatter(value);
18290
+ if (xAxisConfig.valueFormatter)
18291
+ return xAxisConfig.valueFormatter(value);
18292
+ return String(value ?? "");
18293
+ },
18294
+ label: xAxisLabel ? {
18295
+ value: xAxisLabel,
18296
+ angle: -90,
18297
+ position: "insideTopLeft",
18298
+ style: {
18299
+ fontSize: 12,
18300
+ fill: "hsl(var(--muted-foreground))",
18301
+ fontWeight: 500,
18302
+ textAnchor: "middle"
18303
+ }
18304
+ } : void 0
18305
+ }
18306
+ ),
18307
+ showTooltip && /* @__PURE__ */ jsx(
18308
+ Tooltip,
18309
+ {
18310
+ content: showTooltipTotal ? /* @__PURE__ */ jsx(
18311
+ TooltipWithTotal_default,
18312
+ {
18313
+ finalColors,
18314
+ valueFormatter: finalValueFormatter,
18315
+ categoryFormatter,
18316
+ periodLabel
18317
+ }
18318
+ ) : /* @__PURE__ */ jsx(
18319
+ TooltipSimple_default,
18320
+ {
18321
+ finalColors,
18322
+ valueFormatter: finalValueFormatter,
18323
+ categoryFormatter,
18324
+ periodLabel
18325
+ }
18326
+ ),
18327
+ cursor: { fill: "hsl(var(--muted))", opacity: 0.1 }
18328
+ }
18329
+ ),
18330
+ seriesOrder.map((s) => {
18331
+ if (showOnlyHighlighted && !highlightedSeries.has(s.key))
18332
+ return null;
18333
+ const { label, color, key } = fnBuildConfigData(
18334
+ s,
18335
+ mapperConfig,
18336
+ labelMap,
18337
+ finalColors,
18338
+ [],
18339
+ null
18340
+ );
18341
+ if (s.type === "bar") {
18342
+ return /* @__PURE__ */ jsx(
18343
+ Bar,
18344
+ {
18345
+ dataKey: key,
18346
+ name: label,
18347
+ fill: color,
18348
+ radius: [0, 4, 4, 0],
18349
+ onClick: handleBarClick,
18350
+ className: "cursor-pointer",
18351
+ style: { opacity: getSeriesOpacity(key) },
18352
+ activeBar: /* @__PURE__ */ jsx(
18353
+ Rectangle,
18354
+ {
18355
+ fill: color,
18356
+ stroke: color,
18357
+ strokeWidth: 2,
18358
+ opacity: 0.8
18359
+ }
18360
+ ),
18361
+ children: showLabels && labelsVisibility.bar !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
18362
+ LabelList,
18363
+ {
18364
+ dataKey: key,
18365
+ content: (props) => {
18366
+ const inside = renderInsideBarLabel(
18367
+ color,
18368
+ finalValueFormatter
18369
+ );
18370
+ return inside(props);
18371
+ },
18372
+ offset: 0
18373
+ }
18374
+ ) : null
18375
+ },
18376
+ `bar-${key}`
18377
+ );
18378
+ }
18379
+ return null;
18380
+ })
18381
+ ]
18382
+ }
18383
+ )
18384
+ }
18385
+ )
18386
+ }
18387
+ )
18388
+ ] }),
18389
+ enableDraggableTooltips && activeTooltips.map((tooltip) => /* @__PURE__ */ jsx(
18390
+ DraggableTooltip_default,
18391
+ {
18392
+ id: tooltip.id,
18393
+ data: adaptDataForTooltip(tooltip.data, xAxisConfig.dataKey),
18394
+ position: tooltip.position,
18395
+ title,
18396
+ dataKeys: allKeys,
18397
+ finalColors,
18398
+ highlightedSeries,
18399
+ toggleHighlight,
18400
+ showOnlyHighlighted,
18401
+ onClose: (id) => setActiveTooltips((prev) => prev.filter((t) => t.id !== id)),
18402
+ onPositionChange: onTooltipPositionChange,
18403
+ periodLabel,
18404
+ dataLabel: "Dados do Per\xEDodo",
18405
+ valueFormatter: finalValueFormatter,
18406
+ categoryFormatter,
18407
+ globalTooltipCount: activeTooltips.length,
18408
+ onCloseAll: () => window.dispatchEvent(new Event("closeAllTooltips")),
18409
+ closeAllButtonPosition: "top-center",
18410
+ closeAllButtonVariant: "floating"
18411
+ },
18412
+ tooltip.id
18413
+ )),
18414
+ enableDraggableTooltips && activeTooltips.length > 1 && /* @__PURE__ */ jsx(
18415
+ CloseAllButton_default,
18416
+ {
18417
+ count: activeTooltips.length,
18418
+ onCloseAll: () => window.dispatchEvent(new Event("closeAllTooltips")),
18419
+ position: "top-center",
18420
+ variant: "floating"
18421
+ }
18422
+ )
18423
+ ]
18424
+ }
18425
+ );
17910
18426
  };
17911
- var PieChart_default = CustomPieChart;
18427
+ var HorizontalChart_default = HorizontalChart;
17912
18428
  var TimeSeries = ({
17913
18429
  data,
17914
18430
  xAxis,
@@ -18168,4 +18684,4 @@ function Leaderboard({
18168
18684
  );
18169
18685
  }
18170
18686
 
18171
- export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, 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, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, 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, NumericInput, 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, SelectEmpty, 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, VISIBLE_ITEMS, 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, getItems, 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, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useTheme, useTimeSeriesRange, visualForItem };
18687
+ export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart_default as Chart, ChartControls, ChartHeader, 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, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, 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, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, 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, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, 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, useBiaxial, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartLayout, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };