@roax/ui 0.2.0 → 0.3.1

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.js CHANGED
@@ -32,16 +32,25 @@ __export(index_exports, {
32
32
  BackButton: () => BackButton,
33
33
  CardSkeleton: () => CardSkeleton,
34
34
  CustomTooltip: () => CustomTooltip,
35
+ FunnelChart: () => FunnelChart,
36
+ GeneralCard: () => GeneralCard,
35
37
  IconButton: () => IconButton,
38
+ InvestmentByPlatformChart: () => InvestmentByPlatformChart,
36
39
  MetricCard: () => MetricCard,
37
40
  MetricsSkeleton: () => MetricsSkeleton,
38
41
  Modal: () => Modal,
42
+ NoDataMessage: () => NoDataMessage,
39
43
  OutlineButton: () => OutlineButton,
40
44
  PaginatedGrid: () => PaginatedGrid,
41
45
  PaginatedTable: () => PaginatedTable,
46
+ ReportTableSkeleton: () => ReportTableSkeleton,
47
+ SalesByChannelChart: () => SalesByChannelChart,
42
48
  SolidButton: () => SolidButton,
49
+ SummaryReportSkeleton: () => SummaryReportSkeleton,
43
50
  TextButton: () => TextButton,
44
51
  TextSkeleton: () => TextSkeleton,
52
+ TimeSeriesComparisonChart: () => TimeSeriesComparisonChart,
53
+ TopProductsChart: () => TopProductsChart,
45
54
  formatDateRange: () => formatDateRange,
46
55
  formatValue: () => formatValue,
47
56
  getBadgeStyles: () => getBadgeStyles
@@ -52,19 +61,7 @@ module.exports = __toCommonJS(index_exports);
52
61
  var import_react_pro = require("@coreui/react-pro");
53
62
  var import_icons_react = __toESM(require("@coreui/icons-react"));
54
63
  var import_SolidButton = require("./SolidButton.scss");
55
- function SolidButton({
56
- title = "Button",
57
- onClick,
58
- color = "custom-primary",
59
- textColor = "custom-white",
60
- className = "",
61
- loading = false,
62
- icon,
63
- svgComponent: SvgComponent,
64
- type = "submit",
65
- badge,
66
- disabled
67
- }) {
64
+ function SolidButton({ title = "Button", onClick, color = "custom-primary", textColor = "custom-white", className = "", loading = false, icon, svgComponent: SvgComponent, type = "submit", badge, disabled }) {
68
65
  return /* @__PURE__ */ React.createElement(
69
66
  import_react_pro.CLoadingButton,
70
67
  {
@@ -74,12 +71,7 @@ function SolidButton({
74
71
  loading,
75
72
  disabledOnLoading: true,
76
73
  disabled,
77
- style: {
78
- minHeight: "44px",
79
- minWidth: "fit-content",
80
- fontSize: "0.95rem",
81
- letterSpacing: "0.3px"
82
- }
74
+ style: { minHeight: "44px", minWidth: "fit-content", fontSize: "0.95rem", letterSpacing: "0.3px" }
83
75
  },
84
76
  icon && /* @__PURE__ */ React.createElement(import_icons_react.default, { icon, className: "btn-icon" }),
85
77
  SvgComponent && !icon && /* @__PURE__ */ React.createElement(SvgComponent, null),
@@ -92,16 +84,7 @@ function SolidButton({
92
84
  var import_react_pro2 = require("@coreui/react-pro");
93
85
  var import_icons_react2 = __toESM(require("@coreui/icons-react"));
94
86
  var import_OutlineButton = require("./OutlineButton.scss");
95
- function OutlineButton({
96
- title = "Button",
97
- onClick,
98
- color = "custom-primary",
99
- className = "",
100
- loading = false,
101
- icon,
102
- type = "submit",
103
- disabled
104
- }) {
87
+ function OutlineButton({ title = "Button", onClick, color = "custom-primary", className = "", loading = false, icon, type = "submit", disabled }) {
105
88
  return /* @__PURE__ */ React.createElement(
106
89
  import_react_pro2.CLoadingButton,
107
90
  {
@@ -112,10 +95,7 @@ function OutlineButton({
112
95
  disabledOnLoading: true,
113
96
  disabled,
114
97
  variant: "outline",
115
- style: {
116
- maxHeight: "40px",
117
- minWidth: "fit-content"
118
- }
98
+ style: { maxHeight: "40px", minWidth: "fit-content" }
119
99
  },
120
100
  icon && /* @__PURE__ */ React.createElement(import_icons_react2.default, { icon }),
121
101
  /* @__PURE__ */ React.createElement("span", null, title)
@@ -125,17 +105,7 @@ function OutlineButton({
125
105
  // src/components/buttons/TextButton.jsx
126
106
  var import_react_pro3 = require("@coreui/react-pro");
127
107
  var import_icons_react3 = __toESM(require("@coreui/icons-react"));
128
- function TextButton({
129
- disabled,
130
- title,
131
- onClick,
132
- color = "dark",
133
- className = "",
134
- loading = false,
135
- icon,
136
- children
137
- }) {
138
- const buttonClasses = `rounded-3 px-2 d-flex justify-content-center gap-2 fw-medium ${className}`;
108
+ function TextButton({ disabled, title, onClick, color = "dark", className = "", loading = false, icon, children }) {
139
109
  return /* @__PURE__ */ React.createElement("span", { className: "d-inline-block", tabIndex: 0 }, /* @__PURE__ */ React.createElement(
140
110
  import_react_pro3.CLoadingButton,
141
111
  {
@@ -144,7 +114,7 @@ function TextButton({
144
114
  variant: "ghost",
145
115
  type: "button",
146
116
  color,
147
- className: buttonClasses,
117
+ className: `rounded-3 px-2 d-flex justify-content-center gap-2 fw-medium ${className}`,
148
118
  loading
149
119
  },
150
120
  icon && /* @__PURE__ */ React.createElement(import_icons_react3.default, { size: "xl", icon }),
@@ -159,37 +129,12 @@ var import_icons_react4 = __toESM(require("@coreui/icons-react"));
159
129
  // src/components/custom-tooltip/CustomTooltip.jsx
160
130
  var import_react = __toESM(require("@tippyjs/react"));
161
131
  var import_tippy = require("tippy.js/dist/tippy.css");
162
- function CustomTooltip({
163
- content,
164
- placement = "bottom",
165
- delay = 0,
166
- className = "",
167
- children
168
- }) {
169
- return /* @__PURE__ */ React.createElement(
170
- import_react.default,
171
- {
172
- content,
173
- placement,
174
- className,
175
- delay
176
- },
177
- children
178
- );
132
+ function CustomTooltip({ content, placement = "bottom", delay = 0, className = "", children }) {
133
+ return /* @__PURE__ */ React.createElement(import_react.default, { content, placement, className, delay }, children);
179
134
  }
180
135
 
181
136
  // src/components/buttons/IconButton.jsx
182
- function IconButton({
183
- title,
184
- onClick,
185
- color = "dark",
186
- className = "",
187
- loading = false,
188
- icon,
189
- tooltip = "",
190
- disabled
191
- }) {
192
- const buttonClasses = `d-flex justify-content-center align-items-center gap-1 m-0 p-1 ${className}`;
137
+ function IconButton({ title, onClick, color = "dark", className = "", loading = false, icon, tooltip = "", disabled }) {
193
138
  return /* @__PURE__ */ React.createElement(CustomTooltip, { content: tooltip, placement: "bottom" }, /* @__PURE__ */ React.createElement(
194
139
  import_react_pro4.CLoadingButton,
195
140
  {
@@ -197,7 +142,7 @@ function IconButton({
197
142
  variant: "ghost",
198
143
  type: "button",
199
144
  color,
200
- className: buttonClasses,
145
+ className: `d-flex justify-content-center align-items-center gap-1 m-0 p-1 ${className}`,
201
146
  loading,
202
147
  disabled
203
148
  },
@@ -209,61 +154,25 @@ function IconButton({
209
154
  // src/components/modal/Modal.jsx
210
155
  var import_icons_react5 = __toESM(require("@coreui/icons-react"));
211
156
  var import_react_pro5 = require("@coreui/react-pro");
212
-
213
- // ../../node_modules/@coreui/icons/dist/esm/free/cil-arrow-bottom.js
214
- var cilArrowBottom = ["512 512", "<polygon fill='var(--ci-primary-color, currentColor)' points='367.997 338.75 271.999 434.747 271.999 17.503 239.999 17.503 239.999 434.745 144.003 338.75 121.376 361.377 256 496 390.624 361.377 367.997 338.75' class='ci-primary'/>"];
215
-
216
- // ../../node_modules/@coreui/icons/dist/esm/free/cil-arrow-left.js
217
- var cilArrowLeft = ["512 512", "<polygon fill='var(--ci-primary-color, currentColor)' points='497.333 239.999 80.092 239.999 176.087 144.004 153.46 121.377 18.837 256 153.46 390.623 176.087 367.996 80.09 271.999 497.333 271.999 497.333 239.999' class='ci-primary'/>"];
218
-
219
- // ../../node_modules/@coreui/icons/dist/esm/free/cil-arrow-top.js
220
- var cilArrowTop = ["512 512", "<polygon fill='var(--ci-primary-color, currentColor)' points='390.624 150.625 256 16 121.376 150.625 144.004 173.252 240.001 77.254 240.001 495.236 272.001 495.236 272.001 77.257 367.996 173.252 390.624 150.625' class='ci-primary'/>"];
221
-
222
- // ../../node_modules/@coreui/icons/dist/esm/free/cil-info.js
223
- var cilInfo = ["512 512", "<rect width='34.924' height='34.924' x='256' y='95.998' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M16,496H496V16H16ZM48,48H464V464H48Z' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M285.313,359.032a18.123,18.123,0,0,1-15.6,8.966,18.061,18.061,0,0,1-17.327-23.157l35.67-121.277A49.577,49.577,0,0,0,194.7,190.572l-11.718,28.234,29.557,12.266,11.718-28.235a17.577,17.577,0,0,1,33.1,11.7l-35.67,121.277A50.061,50.061,0,0,0,269.709,400a50.227,50.227,0,0,0,43.25-24.853l15.1-25.913-27.646-16.115Z' class='ci-primary'/>"];
224
-
225
- // ../../node_modules/@coreui/icons/dist/esm/free/cil-x.js
226
- var cilX = ["512 512", "<polygon fill='var(--ci-primary-color, currentColor)' points='427.314 107.313 404.686 84.687 256 233.373 107.314 84.687 84.686 107.313 233.373 256 84.686 404.687 107.314 427.313 256 278.627 404.686 427.313 427.314 404.687 278.627 256 427.314 107.313' class='ci-primary'/>"];
227
-
228
- // src/components/modal/Modal.jsx
229
- function Modal({
230
- title,
231
- titleIcon,
232
- visible,
233
- setVisible,
234
- alignment = "center",
235
- size,
236
- children
237
- }) {
238
- return /* @__PURE__ */ React.createElement(
239
- import_react_pro5.CModal,
157
+ var import_icons = require("@coreui/icons");
158
+ function Modal({ title, titleIcon, visible, setVisible, alignment = "center", size, children }) {
159
+ return /* @__PURE__ */ React.createElement(import_react_pro5.CModal, { alignment, visible, onClose: () => setVisible(false), size, focus: true, keyboard: true, "aria-labelledby": "roax-modal-title" }, /* @__PURE__ */ React.createElement(import_react_pro5.CModalHeader, { className: "position-relative" }, /* @__PURE__ */ React.createElement(import_react_pro5.CModalTitle, { id: "roax-modal-title", className: "d-flex align-items-center gap-2" }, titleIcon && /* @__PURE__ */ React.createElement(import_icons_react5.default, { icon: titleIcon, size: "lg", className: "text-muted" }), title), /* @__PURE__ */ React.createElement(
160
+ "button",
240
161
  {
241
- alignment,
242
- visible,
243
- onClose: () => setVisible(false),
244
- size,
245
- focus: true,
246
- keyboard: true,
247
- "aria-labelledby": "roax-modal-title"
162
+ onClick: () => setVisible(false),
163
+ type: "button",
164
+ className: "position-absolute end-0 top-0 mt-3 me-3 p-0 bg-transparent border-0",
165
+ style: { fontSize: "1.25rem", color: "var(--cui-body-color)", zIndex: 10 },
166
+ "aria-label": "Cerrar"
248
167
  },
249
- /* @__PURE__ */ React.createElement(import_react_pro5.CModalHeader, { className: "position-relative" }, /* @__PURE__ */ React.createElement(import_react_pro5.CModalTitle, { id: "roax-modal-title", className: "d-flex align-items-center gap-2" }, titleIcon && /* @__PURE__ */ React.createElement(import_icons_react5.default, { icon: titleIcon, size: "lg", className: "text-muted" }), title), /* @__PURE__ */ React.createElement(
250
- "button",
251
- {
252
- onClick: () => setVisible(false),
253
- type: "button",
254
- className: "position-absolute end-0 top-0 mt-3 me-3 p-0 bg-transparent border-0",
255
- style: { fontSize: "1.25rem", color: "var(--cui-body-color)", zIndex: 10 },
256
- "aria-label": "Cerrar"
257
- },
258
- /* @__PURE__ */ React.createElement(import_icons_react5.default, { icon: cilX, size: "lg" })
259
- )),
260
- /* @__PURE__ */ React.createElement(import_react_pro5.CModalBody, null, children)
261
- );
168
+ /* @__PURE__ */ React.createElement(import_icons_react5.default, { icon: import_icons.cilX, size: "lg" })
169
+ )), /* @__PURE__ */ React.createElement(import_react_pro5.CModalBody, null, children));
262
170
  }
263
171
 
264
172
  // src/components/card/MetricCard.jsx
265
173
  var import_react_pro6 = require("@coreui/react-pro");
266
174
  var import_icons_react6 = __toESM(require("@coreui/icons-react"));
175
+ var import_icons2 = require("@coreui/icons");
267
176
 
268
177
  // src/components/card/card-utils.js
269
178
  var formatValue = (val, unit = "", title = "") => {
@@ -290,8 +199,8 @@ function formatDateRange(previousDateRange) {
290
199
  if (!previousDateRange) return { formattedRange: "" };
291
200
  const parts = previousDateRange.split(" - ");
292
201
  const parseDate = (str) => {
293
- const [year, month, day] = str.split("-").map(Number);
294
- return new Date(year, month - 1, day);
202
+ const [y, m, d] = str.split("-").map(Number);
203
+ return new Date(y, m - 1, d);
295
204
  };
296
205
  const format = (date) => {
297
206
  const day = String(date.getDate()).padStart(2, "0");
@@ -301,13 +210,33 @@ function formatDateRange(previousDateRange) {
301
210
  };
302
211
  const since = parseDate(parts[0]);
303
212
  const until = parts[1] ? parseDate(parts[1]) : null;
304
- const formattedRange = until ? `${format(since)} - ${format(until)}` : format(since);
305
- return { formattedRange };
213
+ return { formattedRange: until ? `${format(since)} - ${format(until)}` : format(since) };
306
214
  }
307
215
 
308
216
  // src/components/card/MetricCard.jsx
309
217
  var import_MetricCard = require("./MetricCard.scss");
310
- function MetricCard({
218
+ function MetricCard({ title, current, previous, change, isPositive, unit = "", previousDateRange = "", tooltipText = "", backgroundColor }) {
219
+ const isColored = !!backgroundColor;
220
+ return /* @__PURE__ */ React.createElement(
221
+ import_react_pro6.CCard,
222
+ {
223
+ className: `metric-card w-100 h-100 d-flex flex-column border-0${isColored ? " metric-card--colored" : ""}`,
224
+ style: isColored ? { background: backgroundColor } : void 0
225
+ },
226
+ /* @__PURE__ */ React.createElement(import_react_pro6.CCardBody, { className: "d-flex flex-column justify-content-between h-100 p-4 position-relative" }, tooltipText && /* @__PURE__ */ React.createElement("div", { className: "position-absolute top-0 end-0 m-2" }, /* @__PURE__ */ React.createElement(CustomTooltip, { content: tooltipText, placement: "top" }, /* @__PURE__ */ React.createElement(import_icons_react6.default, { icon: import_icons2.cilInfo, style: { cursor: "pointer", opacity: 0.5, width: 16, height: 16 } }))), /* @__PURE__ */ React.createElement("p", { className: "metric-card__title m-0" }, title), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center gap-2 mt-1" }, /* @__PURE__ */ React.createElement("span", { className: "metric-card__value" }, formatValue(current, unit, title)), typeof change === "number" && isFinite(change) && current > 0 && /* @__PURE__ */ React.createElement("div", { style: getBadgeStyles(isPositive) }, /* @__PURE__ */ React.createElement(import_icons_react6.default, { icon: isPositive ? import_icons2.cilArrowTop : import_icons2.cilArrowBottom, size: "sm" }), Math.abs(change), "%")), /* @__PURE__ */ React.createElement("hr", { className: "metric-card__divider" }), (() => {
227
+ const { formattedRange } = formatDateRange(previousDateRange);
228
+ return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-between align-items-center metric-card__footer" }, /* @__PURE__ */ React.createElement("strong", null, formatValue(previous, unit, title)), /* @__PURE__ */ React.createElement("span", null, formattedRange));
229
+ })())
230
+ );
231
+ }
232
+
233
+ // src/components/card/GeneralCard.jsx
234
+ var import_react_pro7 = require("@coreui/react-pro");
235
+ var import_icons_react7 = __toESM(require("@coreui/icons-react"));
236
+ var import_icons3 = require("@coreui/icons");
237
+ var import_lucide_react = require("lucide-react");
238
+ var import_general_card = require("./general-card.scss");
239
+ function GeneralCard({
311
240
  title,
312
241
  current,
313
242
  previous,
@@ -319,189 +248,445 @@ function MetricCard({
319
248
  backgroundColor
320
249
  }) {
321
250
  const isColored = !!backgroundColor;
322
- const cardClass = `metric-card w-100 h-100 d-flex flex-column border-0${isColored ? " metric-card--colored" : ""}`;
251
+ const cardClass = `general-card w-100 h-100 d-flex flex-column border-0${isColored ? " general-card--colored" : ""}`;
323
252
  return /* @__PURE__ */ React.createElement(
324
- import_react_pro6.CCard,
253
+ import_react_pro7.CCard,
325
254
  {
326
255
  className: cardClass,
327
256
  style: isColored ? { background: backgroundColor } : void 0
328
257
  },
329
- /* @__PURE__ */ React.createElement(import_react_pro6.CCardBody, { className: "d-flex flex-column justify-content-between h-100 p-4 position-relative" }, tooltipText && /* @__PURE__ */ React.createElement("div", { className: "position-absolute top-0 end-0 m-2" }, /* @__PURE__ */ React.createElement(CustomTooltip, { content: tooltipText, placement: "top" }, /* @__PURE__ */ React.createElement(
330
- import_icons_react6.default,
258
+ /* @__PURE__ */ React.createElement(import_react_pro7.CCardBody, { className: "d-flex flex-column justify-content-between h-100 p-4 position-relative" }, tooltipText && /* @__PURE__ */ React.createElement("div", { className: "position-absolute top-0 end-0 m-2" }, /* @__PURE__ */ React.createElement(CustomTooltip, { content: tooltipText, placement: "top" }, /* @__PURE__ */ React.createElement(
259
+ import_lucide_react.Info,
331
260
  {
332
- icon: cilInfo,
333
- style: { cursor: "pointer", opacity: 0.5, width: 16, height: 16 }
261
+ size: 16,
262
+ strokeWidth: 2,
263
+ style: { cursor: "pointer", opacity: 0.5 }
334
264
  }
335
- ))), /* @__PURE__ */ React.createElement("p", { className: "metric-card__title m-0" }, title), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center gap-2 mt-1" }, /* @__PURE__ */ React.createElement("span", { className: "metric-card__value" }, formatValue(current, unit, title)), typeof change === "number" && isFinite(change) && current > 0 && /* @__PURE__ */ React.createElement("div", { style: getBadgeStyles(isPositive) }, /* @__PURE__ */ React.createElement(import_icons_react6.default, { icon: isPositive ? cilArrowTop : cilArrowBottom, size: "sm" }), Math.abs(change), "%")), /* @__PURE__ */ React.createElement("hr", { className: "metric-card__divider" }), (() => {
265
+ ))), /* @__PURE__ */ React.createElement("p", { className: "general-card__title m-0" }, title), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center gap-2 mt-1" }, /* @__PURE__ */ React.createElement("span", { className: "general-card__value" }, formatValue(current, unit, title)), typeof change === "number" && isFinite(change) && current > 0 && /* @__PURE__ */ React.createElement("div", { style: getBadgeStyles(isPositive) }, /* @__PURE__ */ React.createElement(import_icons_react7.default, { icon: isPositive ? import_icons3.cilArrowTop : import_icons3.cilArrowBottom, size: "sm" }), Math.abs(change), "%")), /* @__PURE__ */ React.createElement("hr", { className: "general-card__divider" }), (() => {
336
266
  const { formattedRange } = formatDateRange(previousDateRange);
337
- return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-between align-items-center metric-card__footer" }, /* @__PURE__ */ React.createElement("strong", null, formatValue(previous, unit, title)), /* @__PURE__ */ React.createElement("span", null, formattedRange));
267
+ return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-between align-items-center general-card__footer" }, /* @__PURE__ */ React.createElement("strong", null, formatValue(previous, unit, title)), /* @__PURE__ */ React.createElement("span", null, formattedRange));
338
268
  })())
339
269
  );
340
270
  }
341
271
 
342
- // src/components/pagination/PaginatedTable.jsx
343
- var import_react_pro7 = require("@coreui/react-pro");
344
- function PaginatedTable({
272
+ // src/components/charts/FunnelChart.jsx
273
+ var import_recharts = require("recharts");
274
+ var import_react_pro8 = require("@coreui/react-pro");
275
+ function FunnelChart({
345
276
  data = [],
346
- itemsPerPage = 10,
347
- currentPage = 1,
348
- setCurrentPage = () => {
349
- },
350
- columns = [],
351
- renderRow = () => null,
352
- loading = false,
353
- emptyMessage = "No hay datos disponibles."
277
+ gradientStart = "#FF8AAE",
278
+ gradientEnd = "#FF1F3D",
279
+ barHeight = 45
354
280
  }) {
355
- const totalPages = Math.ceil(data.length / itemsPerPage);
356
- const paginatedData = data.slice(
357
- (currentPage - 1) * itemsPerPage,
358
- currentPage * itemsPerPage
359
- );
360
- if (loading) {
361
- return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5" }, /* @__PURE__ */ React.createElement(import_react_pro7.CSpinner, { color: "secondary" }));
362
- }
363
- if (!data.length) {
364
- return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5 text-muted" }, emptyMessage);
365
- }
366
- const renderPagination = () => {
367
- const pages = [];
368
- for (let i = 1; i <= totalPages; i++) {
369
- pages.push(
370
- /* @__PURE__ */ React.createElement(
371
- "button",
372
- {
373
- key: i,
374
- onClick: () => setCurrentPage(i),
375
- className: `px-3 py-1 rounded-pill border ${i === currentPage ? "bg-dark text-white" : "bg-white text-dark"}`
376
- },
377
- i
378
- )
379
- );
380
- }
381
- return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-center align-items-center gap-2 mt-3 flex-wrap" }, currentPage > 1 && /* @__PURE__ */ React.createElement(
382
- "button",
281
+ return /* @__PURE__ */ React.createElement(import_react_pro8.CCard, { className: "rounded-4 shadow-sm p-3" }, /* @__PURE__ */ React.createElement(import_react_pro8.CCardBody, null, /* @__PURE__ */ React.createElement(import_recharts.ResponsiveContainer, { width: "100%", height: data.length * barHeight + 50 }, /* @__PURE__ */ React.createElement(
282
+ import_recharts.BarChart,
283
+ {
284
+ data,
285
+ layout: "vertical",
286
+ margin: { top: 10, right: 60, left: 20, bottom: 0 },
287
+ barCategoryGap: 15
288
+ },
289
+ /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: "funnelGradient", x1: "0", y1: "0", x2: "1", y2: "0" }, /* @__PURE__ */ React.createElement("stop", { offset: "0%", stopColor: gradientStart }), /* @__PURE__ */ React.createElement("stop", { offset: "100%", stopColor: gradientEnd }))),
290
+ /* @__PURE__ */ React.createElement(import_recharts.XAxis, { type: "number", hide: true, domain: [0, "dataMax"] }),
291
+ /* @__PURE__ */ React.createElement(
292
+ import_recharts.YAxis,
293
+ {
294
+ dataKey: "label",
295
+ type: "category",
296
+ width: 130,
297
+ axisLine: false,
298
+ tickLine: false,
299
+ style: { fontWeight: 600, fill: "#333", fontSize: 13 }
300
+ }
301
+ ),
302
+ /* @__PURE__ */ React.createElement(
303
+ import_recharts.Tooltip,
383
304
  {
384
- onClick: () => setCurrentPage(currentPage - 1),
385
- className: "px-3 py-1 rounded-pill border bg-white text-dark",
386
- style: { minWidth: "80px", fontWeight: 500 }
387
- },
388
- "Anterior"
389
- ), pages, currentPage < totalPages && /* @__PURE__ */ React.createElement(
390
- "button",
305
+ content: ({ active, payload }) => {
306
+ if (active && payload && payload.length > 0) {
307
+ const { value, payload: item } = payload[0];
308
+ return /* @__PURE__ */ React.createElement("div", { className: "bg-white shadow-sm p-2 rounded" }, /* @__PURE__ */ React.createElement("strong", null, item.label), ":", " ", /* @__PURE__ */ React.createElement("span", null, formatValue(value, item.unit, item.label)));
309
+ }
310
+ return null;
311
+ }
312
+ }
313
+ ),
314
+ /* @__PURE__ */ React.createElement(import_recharts.Bar, { dataKey: "value", fill: "url(#funnelGradient)", radius: [0, 10, 10, 0] }, /* @__PURE__ */ React.createElement(
315
+ import_recharts.LabelList,
391
316
  {
392
- onClick: () => setCurrentPage(currentPage + 1),
393
- className: "px-3 py-1 rounded-pill border bg-white text-dark",
394
- style: { minWidth: "80px", fontWeight: 500 }
395
- },
396
- "Siguiente"
397
- ));
398
- };
399
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_react_pro7.CTable, { hover: true, responsive: true }, /* @__PURE__ */ React.createElement(import_react_pro7.CTableHead, { className: "bg-dark text-white" }, /* @__PURE__ */ React.createElement(import_react_pro7.CTableRow, null, columns.map((col, idx) => /* @__PURE__ */ React.createElement(import_react_pro7.CTableHeaderCell, { key: idx }, col)))), /* @__PURE__ */ React.createElement(import_react_pro7.CTableBody, null, paginatedData.map(renderRow))), totalPages > 1 && renderPagination());
317
+ dataKey: "value",
318
+ position: "right",
319
+ formatter: (val) => formatValue(val),
320
+ style: { fill: "#333", fontWeight: 500, fontSize: 12 }
321
+ }
322
+ ), data.map((entry, index) => /* @__PURE__ */ React.createElement(
323
+ import_recharts.Cell,
324
+ {
325
+ key: `cell-${entry.label || index}`,
326
+ fill: entry.color || "url(#funnelGradient)"
327
+ }
328
+ )))
329
+ ))));
400
330
  }
401
331
 
402
- // src/components/pagination/PaginatedGrid.jsx
403
- var import_react_pro8 = require("@coreui/react-pro");
404
- function PaginatedGrid({
332
+ // src/components/charts/TimeSeriesComparisonChart.jsx
333
+ var import_recharts2 = require("recharts");
334
+ var import_react_pro9 = require("@coreui/react-pro");
335
+ function TimeSeriesComparisonChart({
405
336
  data = [],
406
- itemsPerPage = 6,
407
- currentPage = 1,
408
- setCurrentPage = () => {
409
- },
410
- renderItem = () => null,
411
- loading = false,
412
- emptyMessage = "No hay elementos."
337
+ lines = [],
338
+ colors = {},
339
+ currency = "",
340
+ yAxisLabel = "",
341
+ displayNames = {},
342
+ xDataKey = "date",
343
+ height = 340
413
344
  }) {
414
- const totalPages = Math.ceil(data.length / itemsPerPage);
415
- const paginatedData = data.slice(
416
- (currentPage - 1) * itemsPerPage,
417
- currentPage * itemsPerPage
418
- );
419
- if (loading) {
420
- return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5" }, /* @__PURE__ */ React.createElement(import_react_pro8.CSpinner, { color: "secondary" }));
345
+ const maxY = data.length && lines.length ? Math.ceil(
346
+ Math.max(...lines.map((key) => Math.max(...data.map((d) => d[key] || 0)))) * 1.1
347
+ ) : 100;
348
+ const formatYTick = (val) => {
349
+ const prefix = currency ? `${currency} ` : "";
350
+ if (val >= 1e6) return `${prefix}${(val / 1e6).toFixed(1)}M`;
351
+ if (val >= 1e3) return `${prefix}${(val / 1e3).toFixed(0)}K`;
352
+ return `${prefix}${val}`;
353
+ };
354
+ return /* @__PURE__ */ React.createElement(import_react_pro9.CCard, { className: "rounded-4 shadow-sm p-3" }, /* @__PURE__ */ React.createElement(import_react_pro9.CCardBody, null, /* @__PURE__ */ React.createElement(import_recharts2.ResponsiveContainer, { width: "100%", height }, /* @__PURE__ */ React.createElement(import_recharts2.LineChart, { data, margin: { top: 20, right: 30, left: 10, bottom: 10 } }, /* @__PURE__ */ React.createElement(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", stroke: "#e5e5e5" }), /* @__PURE__ */ React.createElement(
355
+ import_recharts2.XAxis,
356
+ {
357
+ dataKey: xDataKey,
358
+ stroke: "#333",
359
+ tick: { fontSize: 12 }
360
+ }
361
+ ), /* @__PURE__ */ React.createElement(
362
+ import_recharts2.YAxis,
363
+ {
364
+ yAxisId: "left",
365
+ stroke: "#333",
366
+ tickFormatter: formatYTick,
367
+ tick: { fontSize: 12 },
368
+ width: 80,
369
+ domain: [0, maxY],
370
+ allowDecimals: false,
371
+ label: yAxisLabel ? {
372
+ value: yAxisLabel,
373
+ angle: -90,
374
+ position: "insideLeft",
375
+ style: { textAnchor: "middle", fill: "#333", fontSize: 13 }
376
+ } : void 0
377
+ }
378
+ ), /* @__PURE__ */ React.createElement(
379
+ import_recharts2.Tooltip,
380
+ {
381
+ formatter: (val, key) => [
382
+ `${currency ? currency + " " : ""}${val.toLocaleString()}`,
383
+ displayNames[key] || key
384
+ ],
385
+ labelClassName: "fw-bold",
386
+ wrapperStyle: { zIndex: 1e3 }
387
+ }
388
+ ), /* @__PURE__ */ React.createElement(
389
+ import_recharts2.Legend,
390
+ {
391
+ verticalAlign: "bottom",
392
+ height: 36,
393
+ iconType: "circle",
394
+ formatter: (key) => displayNames[key] || key
395
+ }
396
+ ), lines.map((key) => /* @__PURE__ */ React.createElement(
397
+ import_recharts2.Line,
398
+ {
399
+ key,
400
+ yAxisId: "left",
401
+ type: "monotone",
402
+ dataKey: key,
403
+ stroke: colors[key] || "#ED1E78",
404
+ strokeWidth: 2.5,
405
+ dot: { r: 4 },
406
+ activeDot: { r: 6 }
407
+ }
408
+ ))))));
409
+ }
410
+
411
+ // src/components/charts/TopProductsChart.jsx
412
+ var import_recharts3 = require("recharts");
413
+ var import_react_pro10 = require("@coreui/react-pro");
414
+ var COLORS = ["#FF6A8D", "#FF8AAE", "#FFA3BC", "#FFC3D0", "#FFE0E7"];
415
+ var ChartTooltip = ({ active, payload }) => {
416
+ if (active && payload && payload.length) {
417
+ return /* @__PURE__ */ React.createElement("div", { className: "bg-white p-2 shadow rounded border border-light" }, /* @__PURE__ */ React.createElement("p", { className: "mb-1 fw-semibold" }, payload[0].payload.name), /* @__PURE__ */ React.createElement("p", { className: "mb-0 text-muted" }, "Cantidad: ", payload[0].value.toLocaleString()));
421
418
  }
422
- if (!data.length) {
423
- return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5 text-muted" }, emptyMessage);
419
+ return null;
420
+ };
421
+ function TopProductsChart({
422
+ data = [],
423
+ title = "Productos M\xE1s Vendidos",
424
+ emptyText = "No se registraron productos vendidos en este rango de fechas.",
425
+ maxItems = 5
426
+ }) {
427
+ const processedData = (data || []).filter((item) => {
428
+ var _a;
429
+ return item.quantity > 0 && ((_a = item.name) == null ? void 0 : _a.trim());
430
+ }).sort((a, b) => b.quantity - a.quantity).slice(0, maxItems).map((item) => ({ name: item.name, quantity: item.quantity }));
431
+ if (!processedData.length) {
432
+ return /* @__PURE__ */ React.createElement(import_react_pro10.CCard, { className: "mt-4 rounded-4 shadow-sm p-3" }, /* @__PURE__ */ React.createElement(import_react_pro10.CCardBody, { className: "text-center py-5" }, /* @__PURE__ */ React.createElement("p", { className: "text-muted mb-2" }, /* @__PURE__ */ React.createElement("i", { className: "bi bi-box-seam fs-4 d-block mb-2" }), emptyText)));
424
433
  }
425
- const renderPagination = () => {
426
- const pages = [];
427
- for (let i = 1; i <= totalPages; i++) {
428
- pages.push(
429
- /* @__PURE__ */ React.createElement(
430
- "button",
431
- {
432
- key: i,
433
- onClick: () => setCurrentPage(i),
434
- className: `px-3 py-1 rounded-pill border ${i === currentPage ? "bg-dark text-white" : "bg-white text-dark"}`
435
- },
436
- i
437
- )
438
- );
439
- }
440
- return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-center gap-2 mt-4 flex-wrap" }, currentPage > 1 && /* @__PURE__ */ React.createElement(
441
- "button",
434
+ return /* @__PURE__ */ React.createElement(import_react_pro10.CCard, { className: "mt-4 rounded-4 shadow-sm p-3" }, /* @__PURE__ */ React.createElement(import_react_pro10.CCardBody, null, /* @__PURE__ */ React.createElement("h5", { className: "fw-semibold text-center fs-5 mb-4" }, title), /* @__PURE__ */ React.createElement("div", { style: { height: `${Math.max(processedData.length * 50, 80)}px` } }, /* @__PURE__ */ React.createElement(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%" }, /* @__PURE__ */ React.createElement(
435
+ import_recharts3.BarChart,
436
+ {
437
+ layout: "vertical",
438
+ data: processedData,
439
+ margin: { top: 10, right: 40, left: 20, bottom: 10 }
440
+ },
441
+ /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: "barGradient", x1: "0", y1: "0", x2: "1", y2: "0" }, /* @__PURE__ */ React.createElement("stop", { offset: "0%", stopColor: "#FF8AAE" }), /* @__PURE__ */ React.createElement("stop", { offset: "100%", stopColor: "#FF1F3D" }))),
442
+ /* @__PURE__ */ React.createElement(
443
+ import_recharts3.XAxis,
442
444
  {
443
- onClick: () => setCurrentPage(currentPage - 1),
444
- className: "px-3 py-1 rounded-pill border bg-white text-dark"
445
- },
446
- "Anterior"
447
- ), pages, currentPage < totalPages && /* @__PURE__ */ React.createElement(
448
- "button",
445
+ type: "number",
446
+ tickFormatter: (value) => value.toLocaleString(),
447
+ axisLine: false,
448
+ tick: { fontSize: 12 }
449
+ }
450
+ ),
451
+ /* @__PURE__ */ React.createElement(
452
+ import_recharts3.YAxis,
449
453
  {
450
- onClick: () => setCurrentPage(currentPage + 1),
451
- className: "px-3 py-1 rounded-pill border bg-white text-dark"
452
- },
453
- "Siguiente"
454
- ));
454
+ type: "category",
455
+ dataKey: "name",
456
+ width: 150,
457
+ tick: { fontSize: 13 },
458
+ tickFormatter: (value) => value.length > 30 ? value.substring(0, 30) + "..." : value
459
+ }
460
+ ),
461
+ /* @__PURE__ */ React.createElement(import_recharts3.Tooltip, { content: /* @__PURE__ */ React.createElement(ChartTooltip, null) }),
462
+ /* @__PURE__ */ React.createElement(import_recharts3.Bar, { dataKey: "quantity", fill: "url(#barGradient)", radius: [0, 8, 8, 0] }, /* @__PURE__ */ React.createElement(
463
+ import_recharts3.LabelList,
464
+ {
465
+ dataKey: "quantity",
466
+ position: "right",
467
+ formatter: (value) => value.toLocaleString(),
468
+ style: { fill: "#333", fontWeight: 500, fontSize: 12 }
469
+ }
470
+ ), processedData.map((_, index) => /* @__PURE__ */ React.createElement(import_recharts3.Cell, { key: `cell-${index}`, fill: COLORS[index % COLORS.length] })))
471
+ )))));
472
+ }
473
+
474
+ // src/components/charts/SalesByChannelChart.jsx
475
+ var import_recharts4 = require("recharts");
476
+ var import_react_pro11 = require("@coreui/react-pro");
477
+ function SalesByChannelChart({
478
+ data = [],
479
+ title = "Ventas por canal",
480
+ emptyText = "Sin datos para este per\xEDodo",
481
+ channels = ["Meta", "TikTok", "Google"],
482
+ channelColors = { Meta: "#FF2F86", TikTok: "#C0C0C0", Google: "#333333" }
483
+ }) {
484
+ const hasData = data.length > 0;
485
+ return /* @__PURE__ */ React.createElement(import_react_pro11.CCard, { className: "rounded-4 shadow-sm p-3" }, /* @__PURE__ */ React.createElement(import_react_pro11.CCardBody, null, /* @__PURE__ */ React.createElement("h5", { className: "fw-bold text-center" }, title), !hasData ? /* @__PURE__ */ React.createElement("p", { className: "text-center text-muted" }, emptyText) : /* @__PURE__ */ React.createElement(import_recharts4.ResponsiveContainer, { width: "100%", height: 300 }, /* @__PURE__ */ React.createElement(import_recharts4.BarChart, { data, margin: { top: 20, right: 30, left: 10, bottom: 10 } }, /* @__PURE__ */ React.createElement(import_recharts4.CartesianGrid, { strokeDasharray: "3 3", stroke: "#e5e5e5" }), /* @__PURE__ */ React.createElement(
486
+ import_recharts4.XAxis,
487
+ {
488
+ dataKey: "fecha",
489
+ tick: { fontSize: 12 },
490
+ angle: -45,
491
+ textAnchor: "end",
492
+ interval: Math.ceil(data.length / 10)
493
+ }
494
+ ), /* @__PURE__ */ React.createElement(import_recharts4.YAxis, { tick: { fontSize: 12 } }), /* @__PURE__ */ React.createElement(import_recharts4.Tooltip, null), /* @__PURE__ */ React.createElement(import_recharts4.Legend, { verticalAlign: "top", height: 36, iconType: "circle" }), channels.map((channel) => /* @__PURE__ */ React.createElement(
495
+ import_recharts4.Bar,
496
+ {
497
+ key: channel,
498
+ dataKey: channel,
499
+ stackId: "ventas",
500
+ fill: channelColors[channel] || "#888"
501
+ }
502
+ ))))));
503
+ }
504
+
505
+ // src/components/charts/InvestmentByPlatformChart.jsx
506
+ var import_recharts5 = require("recharts");
507
+ var import_react_pro12 = require("@coreui/react-pro");
508
+ var DEFAULT_COLORS = ["#FF2F86", "#D9D9D9", "#333333"];
509
+ function InvestmentByPlatformChart({
510
+ data = [],
511
+ title = "Inversi\xF3n por plataforma",
512
+ colors = DEFAULT_COLORS,
513
+ currencySymbol = "COP",
514
+ locale = "es-CO"
515
+ }) {
516
+ return /* @__PURE__ */ React.createElement(import_react_pro12.CCard, { className: "rounded-4 shadow-sm p-3" }, /* @__PURE__ */ React.createElement(import_react_pro12.CCardBody, null, /* @__PURE__ */ React.createElement("h5", { className: "text-center fw-bold" }, title), /* @__PURE__ */ React.createElement(import_recharts5.ResponsiveContainer, { width: "100%", height: 280 }, /* @__PURE__ */ React.createElement(import_recharts5.PieChart, null, /* @__PURE__ */ React.createElement(
517
+ import_recharts5.Pie,
518
+ {
519
+ data,
520
+ dataKey: "value",
521
+ nameKey: "name",
522
+ cx: "50%",
523
+ cy: "50%",
524
+ innerRadius: 60,
525
+ outerRadius: 100,
526
+ paddingAngle: 5,
527
+ label: ({ name, percent }) => `${name} ${(percent * 100).toFixed(1)}%`
528
+ },
529
+ data.map((_, index) => /* @__PURE__ */ React.createElement(import_recharts5.Cell, { key: `cell-${index}`, fill: colors[index % colors.length] }))
530
+ ), /* @__PURE__ */ React.createElement(
531
+ import_recharts5.Tooltip,
532
+ {
533
+ formatter: (value) => `${currencySymbol} ${value.toLocaleString(locale)}`
534
+ }
535
+ ), /* @__PURE__ */ React.createElement(import_recharts5.Legend, { verticalAlign: "bottom", height: 36 })))));
536
+ }
537
+
538
+ // src/components/pagination/PaginatedTable.jsx
539
+ var import_react_pro13 = require("@coreui/react-pro");
540
+ function PaginatedTable({ data = [], itemsPerPage = 10, currentPage = 1, setCurrentPage = () => {
541
+ }, columns = [], renderRow = () => null, loading = false, emptyMessage = "No hay datos disponibles." }) {
542
+ const totalPages = Math.ceil(data.length / itemsPerPage);
543
+ const paginatedData = data.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage);
544
+ if (loading) return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5" }, /* @__PURE__ */ React.createElement(import_react_pro13.CSpinner, { color: "secondary" }));
545
+ if (!data.length) return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5 text-muted" }, emptyMessage);
546
+ const renderPagination = () => {
547
+ const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
548
+ return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-center align-items-center gap-2 mt-3 flex-wrap" }, currentPage > 1 && /* @__PURE__ */ React.createElement("button", { onClick: () => setCurrentPage(currentPage - 1), className: "px-3 py-1 rounded-pill border bg-white text-dark", style: { minWidth: 80, fontWeight: 500 } }, "Anterior"), pages.map((i) => /* @__PURE__ */ React.createElement("button", { key: i, onClick: () => setCurrentPage(i), className: `px-3 py-1 rounded-pill border ${i === currentPage ? "bg-dark text-white" : "bg-white text-dark"}` }, i)), currentPage < totalPages && /* @__PURE__ */ React.createElement("button", { onClick: () => setCurrentPage(currentPage + 1), className: "px-3 py-1 rounded-pill border bg-white text-dark", style: { minWidth: 80, fontWeight: 500 } }, "Siguiente"));
549
+ };
550
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_react_pro13.CTable, { hover: true, responsive: true }, /* @__PURE__ */ React.createElement(import_react_pro13.CTableHead, { className: "bg-dark text-white" }, /* @__PURE__ */ React.createElement(import_react_pro13.CTableRow, null, columns.map((col, i) => /* @__PURE__ */ React.createElement(import_react_pro13.CTableHeaderCell, { key: i }, col)))), /* @__PURE__ */ React.createElement(import_react_pro13.CTableBody, null, paginatedData.map(renderRow))), totalPages > 1 && renderPagination());
551
+ }
552
+
553
+ // src/components/pagination/PaginatedGrid.jsx
554
+ var import_react_pro14 = require("@coreui/react-pro");
555
+ function PaginatedGrid({ data = [], itemsPerPage = 6, currentPage = 1, setCurrentPage = () => {
556
+ }, renderItem = () => null, loading = false, emptyMessage = "No hay elementos." }) {
557
+ const totalPages = Math.ceil(data.length / itemsPerPage);
558
+ const paginatedData = data.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage);
559
+ if (loading) return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5" }, /* @__PURE__ */ React.createElement(import_react_pro14.CSpinner, { color: "secondary" }));
560
+ if (!data.length) return /* @__PURE__ */ React.createElement("div", { className: "text-center py-5 text-muted" }, emptyMessage);
561
+ const renderPagination = () => {
562
+ const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
563
+ return /* @__PURE__ */ React.createElement("div", { className: "d-flex justify-content-center gap-2 mt-4 flex-wrap" }, currentPage > 1 && /* @__PURE__ */ React.createElement("button", { onClick: () => setCurrentPage(currentPage - 1), className: "px-3 py-1 rounded-pill border bg-white text-dark" }, "Anterior"), pages.map((i) => /* @__PURE__ */ React.createElement("button", { key: i, onClick: () => setCurrentPage(i), className: `px-3 py-1 rounded-pill border ${i === currentPage ? "bg-dark text-white" : "bg-white text-dark"}` }, i)), currentPage < totalPages && /* @__PURE__ */ React.createElement("button", { onClick: () => setCurrentPage(currentPage + 1), className: "px-3 py-1 rounded-pill border bg-white text-dark" }, "Siguiente"));
455
564
  };
456
565
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "row g-4" }, paginatedData.map(renderItem)), totalPages > 1 && renderPagination());
457
566
  }
458
567
 
459
568
  // src/components/skeletons/CardSkeleton.jsx
460
- var import_react_pro9 = require("@coreui/react-pro");
569
+ var import_react_pro15 = require("@coreui/react-pro");
461
570
  function CardSkeleton() {
462
- return /* @__PURE__ */ React.createElement(import_react_pro9.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(import_react_pro9.CPlaceholder, { component: "div", animation: "glow", className: "d-flex flex-column gap-2 bg-transparent" }, /* @__PURE__ */ React.createElement(import_react_pro9.CPlaceholder, { className: "p-4 mt-2 rounded-1", size: "lg", xs: 12, color: "skeleton" })));
571
+ return /* @__PURE__ */ React.createElement(import_react_pro15.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(import_react_pro15.CPlaceholder, { component: "div", animation: "glow", className: "d-flex flex-column gap-2 bg-transparent" }, /* @__PURE__ */ React.createElement(import_react_pro15.CPlaceholder, { className: "p-4 mt-2 rounded-1", size: "lg", xs: 12, color: "skeleton" })));
463
572
  }
464
573
 
465
574
  // src/components/skeletons/TextSkeleton.jsx
466
- var import_react_pro10 = require("@coreui/react-pro");
575
+ var import_react_pro16 = require("@coreui/react-pro");
467
576
  function TextSkeleton() {
468
- return /* @__PURE__ */ React.createElement(import_react_pro10.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(import_react_pro10.CPlaceholder, { component: "div", animation: "glow", className: "d-flex flex-column gap-2 bg-transparent" }, /* @__PURE__ */ React.createElement(import_react_pro10.CPlaceholder, { className: "p-0 my-2 rounded-1", size: "lg", xs: 8, color: "skeleton" })));
577
+ return /* @__PURE__ */ React.createElement(import_react_pro16.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(import_react_pro16.CPlaceholder, { component: "div", animation: "glow", className: "d-flex flex-column gap-2 bg-transparent" }, /* @__PURE__ */ React.createElement(import_react_pro16.CPlaceholder, { className: "p-0 my-2 rounded-1", size: "lg", xs: 8, color: "skeleton" })));
469
578
  }
470
579
 
471
580
  // src/components/skeletons/MetricsSkeleton.jsx
472
- var import_react_pro11 = require("@coreui/react-pro");
581
+ var import_react_pro17 = require("@coreui/react-pro");
473
582
  function MetricsSkeleton() {
474
- return /* @__PURE__ */ React.createElement(import_react_pro11.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(import_react_pro11.CPlaceholder, { component: "div", animation: "glow", className: "d-flex flex-column gap-2 bg-transparent" }, /* @__PURE__ */ React.createElement(import_react_pro11.CPlaceholder, { className: "p-5 mt-2 rounded-1", size: "lg", xs: 12, color: "skeleton" }), /* @__PURE__ */ React.createElement(import_react_pro11.CPlaceholder, { className: "p-3 mt-2 rounded-1", size: "xs", xs: 12, color: "skeleton" })));
583
+ return /* @__PURE__ */ React.createElement(import_react_pro17.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(import_react_pro17.CPlaceholder, { component: "div", animation: "glow", className: "d-flex flex-column gap-2 bg-transparent" }, /* @__PURE__ */ React.createElement(import_react_pro17.CPlaceholder, { className: "p-5 mt-2 rounded-1", size: "lg", xs: 12, color: "skeleton" }), /* @__PURE__ */ React.createElement(import_react_pro17.CPlaceholder, { className: "p-3 mt-2 rounded-1", size: "xs", xs: 12, color: "skeleton" })));
584
+ }
585
+
586
+ // src/components/skeletons/ReportTableSkeleton.jsx
587
+ var import_react_pro18 = require("@coreui/react-pro");
588
+ function ReportTableSkeleton() {
589
+ return /* @__PURE__ */ React.createElement(import_react_pro18.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(
590
+ import_react_pro18.CPlaceholder,
591
+ {
592
+ component: "div",
593
+ animation: "glow",
594
+ className: "d-flex flex-column gap-2 bg-transparent"
595
+ },
596
+ /* @__PURE__ */ React.createElement(import_react_pro18.CPlaceholder, { className: "p-4 mt-2 rounded-1", size: "lg", xs: 12, color: "skeleton" }),
597
+ /* @__PURE__ */ React.createElement(import_react_pro18.CPlaceholder, { className: "p-5 mt-2 rounded-1", size: "lg", xs: 12, color: "skeleton" })
598
+ ));
599
+ }
600
+
601
+ // src/components/skeletons/SummaryReportSkeleton.jsx
602
+ var import_react_pro19 = require("@coreui/react-pro");
603
+ var CardPlaceholder = ({ className = "" }) => /* @__PURE__ */ React.createElement(import_react_pro19.CCard, { className: "shadow-none p-0 m-0 bg-transparent border-0" }, /* @__PURE__ */ React.createElement(
604
+ import_react_pro19.CPlaceholder,
605
+ {
606
+ component: "div",
607
+ animation: "glow",
608
+ className: `d-flex flex-column gap-2 bg-transparent ${className}`
609
+ },
610
+ /* @__PURE__ */ React.createElement(import_react_pro19.CPlaceholder, { className: "p-4 mt-2 rounded-2", size: "lg", xs: 12, color: "skeleton" })
611
+ ));
612
+ function SummaryReportSkeleton({
613
+ layout = [
614
+ { sm: 6, md: 6 },
615
+ { sm: 6, md: 6 },
616
+ { sm: 6, md: 4 },
617
+ { sm: 6, md: 4 },
618
+ { sm: 6, md: 4 },
619
+ { sm: 6, md: 6 },
620
+ { sm: 6, md: 4 },
621
+ { sm: 6, md: 2 }
622
+ ]
623
+ }) {
624
+ return /* @__PURE__ */ React.createElement(import_react_pro19.CRow, { className: "g-md-3 px-4 px-sm-2 g-sm-2 pt-2 pb-4" }, layout.map((col, index) => /* @__PURE__ */ React.createElement(import_react_pro19.CCol, { sm: col.sm, md: col.md, key: index }, /* @__PURE__ */ React.createElement(CardPlaceholder, null))));
625
+ }
626
+
627
+ // ../../node_modules/@coreui/icons-pro/dist/esm/duotone/cid-exclamation-circle.js
628
+ var cidExclamationCircle = ["512 512", "<path fill='var(--ci-secondary-color, currentColor)' d='M256,16C123.452,16,16,123.452,16,256S123.452,496,256,496a238.867,238.867,0,0,0,132.685-40q1.668-1.108,3.315-2.246A239.721,239.721,0,0,0,496,256C496,123.452,388.548,16,256,16Z' class='ci-secondary' opacity='var(--ci-secondary-opacity, 0.25)'/><polygon fill='var(--ci-primary-color, currentColor)' points='224 232 238 304 274 304 288 232 288 120 224 120 224 232' class='ci-primary'/><rect width='40' height='40' x='236' y='344' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/>"];
629
+
630
+ // src/components/feedback/NoDataMessage.jsx
631
+ var import_icons_react8 = __toESM(require("@coreui/icons-react"));
632
+ function NoDataMessage({
633
+ message = "No se obtuvieron datos. Revisa el rango de fechas y la integraci\xF3n."
634
+ }) {
635
+ return /* @__PURE__ */ React.createElement(
636
+ "div",
637
+ {
638
+ className: "d-flex align-items-center gap-2 rounded-3 px-3 py-3 mt-3 mb-3",
639
+ style: {
640
+ backgroundColor: "var(--cui-warning-bg-subtle)",
641
+ border: "1px solid var(--cui-warning)",
642
+ color: "var(--cui-body-color)"
643
+ }
644
+ },
645
+ /* @__PURE__ */ React.createElement(
646
+ import_icons_react8.default,
647
+ {
648
+ icon: cidExclamationCircle,
649
+ className: "flex-shrink-0 me-2 text-warning",
650
+ size: "xxl"
651
+ }
652
+ ),
653
+ message
654
+ );
475
655
  }
476
656
 
477
657
  // src/components/back-button/BackButton.jsx
478
658
  var import_navigation = require("next/navigation");
479
- var import_react_pro12 = require("@coreui/react-pro");
480
- var import_icons_react7 = __toESM(require("@coreui/icons-react"));
659
+ var import_react_pro20 = require("@coreui/react-pro");
660
+ var import_icons4 = require("@coreui/icons");
661
+ var import_icons_react9 = __toESM(require("@coreui/icons-react"));
481
662
  function BackButton({ title, color = "dark", className = "", path }) {
482
663
  const { back, push } = (0, import_navigation.useRouter)();
483
- const buttonClasses = `back-button d-flex align-items-center px-0 ${className}`;
484
- function handleBack() {
485
- if (path) push(path);
486
- else back();
487
- }
488
- return /* @__PURE__ */ React.createElement(CustomTooltip, { content: "Volver atr\xE1s", placement: "bottom" }, /* @__PURE__ */ React.createElement(import_react_pro12.CButton, { color, variant: "ghost", className: buttonClasses, onClick: handleBack }, /* @__PURE__ */ React.createElement(import_icons_react7.default, { icon: cilArrowLeft, size: "lg", className: "mx-1" }), title && /* @__PURE__ */ React.createElement("span", { className: "px-2" }, title)));
664
+ return /* @__PURE__ */ React.createElement(CustomTooltip, { content: "Volver atr\xE1s", placement: "bottom" }, /* @__PURE__ */ React.createElement(import_react_pro20.CButton, { color, variant: "ghost", className: `back-button d-flex align-items-center px-0 ${className}`, onClick: () => path ? push(path) : back() }, /* @__PURE__ */ React.createElement(import_icons_react9.default, { icon: import_icons4.cilArrowLeft, size: "lg", className: "mx-1" }), title && /* @__PURE__ */ React.createElement("span", { className: "px-2" }, title)));
489
665
  }
490
666
  // Annotate the CommonJS export names for ESM import in node:
491
667
  0 && (module.exports = {
492
668
  BackButton,
493
669
  CardSkeleton,
494
670
  CustomTooltip,
671
+ FunnelChart,
672
+ GeneralCard,
495
673
  IconButton,
674
+ InvestmentByPlatformChart,
496
675
  MetricCard,
497
676
  MetricsSkeleton,
498
677
  Modal,
678
+ NoDataMessage,
499
679
  OutlineButton,
500
680
  PaginatedGrid,
501
681
  PaginatedTable,
682
+ ReportTableSkeleton,
683
+ SalesByChannelChart,
502
684
  SolidButton,
685
+ SummaryReportSkeleton,
503
686
  TextButton,
504
687
  TextSkeleton,
688
+ TimeSeriesComparisonChart,
689
+ TopProductsChart,
505
690
  formatDateRange,
506
691
  formatValue,
507
692
  getBadgeStyles