@mlw-packages/react-components 1.10.8 → 1.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +53 -0
- package/dist/index.d.mts +22 -38
- package/dist/index.d.ts +22 -38
- package/dist/index.js +545 -328
- package/dist/index.mjs +545 -327
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -670,7 +670,7 @@ var DialogOverlayBase = React32__namespace.forwardRef(({ className, testid: data
|
|
|
670
670
|
{
|
|
671
671
|
ref,
|
|
672
672
|
className: cn(
|
|
673
|
-
"fixed inset-0 z-
|
|
673
|
+
"fixed inset-0 z-[200] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ",
|
|
674
674
|
className
|
|
675
675
|
),
|
|
676
676
|
"data-testid": dataTestId,
|
|
@@ -688,7 +688,7 @@ var DialogContentBase = React32__namespace.forwardRef(
|
|
|
688
688
|
{
|
|
689
689
|
ref,
|
|
690
690
|
className: cn(
|
|
691
|
-
"fixed left-[50%] top-[50%] z-
|
|
691
|
+
"fixed left-[50%] top-[50%] z-[200] w-[90%] sm:w-lg grid translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg max-h-[100dvh] overflow-y-auto overflow-x-hidden rounded-md border-border",
|
|
692
692
|
className
|
|
693
693
|
),
|
|
694
694
|
"data-testid": dataTestId,
|
|
@@ -696,10 +696,16 @@ var DialogContentBase = React32__namespace.forwardRef(
|
|
|
696
696
|
onWheel: userOnWheel,
|
|
697
697
|
children: [
|
|
698
698
|
children,
|
|
699
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
699
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
700
|
+
DialogPrimitive__namespace.Close,
|
|
701
|
+
{
|
|
702
|
+
className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-n\n 0 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-10 touch-manipulation",
|
|
703
|
+
children: [
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { className: "h-6 w-6 sm:h-4 sm:w-4 hover:text-red-500 font-extrabold" }),
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
)
|
|
703
709
|
]
|
|
704
710
|
}
|
|
705
711
|
)
|
|
@@ -8639,7 +8645,8 @@ function Agenda({
|
|
|
8639
8645
|
currentDate,
|
|
8640
8646
|
events,
|
|
8641
8647
|
onEventSelect,
|
|
8642
|
-
showUndatedEvents = true
|
|
8648
|
+
showUndatedEvents = true,
|
|
8649
|
+
noTime = false
|
|
8643
8650
|
}) {
|
|
8644
8651
|
const isValidDate5 = (d) => {
|
|
8645
8652
|
try {
|
|
@@ -8708,6 +8715,7 @@ function Agenda({
|
|
|
8708
8715
|
event,
|
|
8709
8716
|
onClick: onEventSelect ? (e) => handleEventClick(event, e) : void 0,
|
|
8710
8717
|
view: "agenda",
|
|
8718
|
+
noTime,
|
|
8711
8719
|
className: onEventSelect ? void 0 : "hover:shadow-none hover:scale-100"
|
|
8712
8720
|
},
|
|
8713
8721
|
event.id
|
|
@@ -8972,6 +8980,9 @@ var StartHourAgenda = 0;
|
|
|
8972
8980
|
var EndHourAgenda = 24;
|
|
8973
8981
|
var DefaultStartHourAgenda = 9;
|
|
8974
8982
|
var DefaultEndHourAgenda = 10;
|
|
8983
|
+
function startOfLocalDay(d) {
|
|
8984
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
8985
|
+
}
|
|
8975
8986
|
function getAutoColorAgenda(id) {
|
|
8976
8987
|
const colors2 = [
|
|
8977
8988
|
"sky",
|
|
@@ -9082,7 +9093,9 @@ function getSpanningEventsForDayAgenda(events, day) {
|
|
|
9082
9093
|
const eventStart = getEventStartDate(event);
|
|
9083
9094
|
const eventEnd = getEventEndDate(event);
|
|
9084
9095
|
if (!eventStart || !eventEnd) return false;
|
|
9085
|
-
|
|
9096
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9097
|
+
const endDay = startOfLocalDay(eventEnd);
|
|
9098
|
+
return !dateFns.isSameDay(day, eventStart) && (dateFns.isSameDay(day, eventEnd) || day > startDay && day < endDay);
|
|
9086
9099
|
});
|
|
9087
9100
|
}
|
|
9088
9101
|
function getAllEventsForDayAgenda(events, day) {
|
|
@@ -9090,7 +9103,9 @@ function getAllEventsForDayAgenda(events, day) {
|
|
|
9090
9103
|
const eventStart = getEventStartDate(event);
|
|
9091
9104
|
const eventEnd = getEventEndDate(event);
|
|
9092
9105
|
if (!eventStart) return false;
|
|
9093
|
-
|
|
9106
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9107
|
+
const endDay = eventEnd ? startOfLocalDay(eventEnd) : null;
|
|
9108
|
+
return dateFns.isSameDay(day, eventStart) || (endDay ? dateFns.isSameDay(day, eventEnd) : false) || (endDay ? day > startDay && day < endDay : false);
|
|
9094
9109
|
});
|
|
9095
9110
|
}
|
|
9096
9111
|
function getAgendaEventsForDayAgenda(events, day) {
|
|
@@ -9098,7 +9113,9 @@ function getAgendaEventsForDayAgenda(events, day) {
|
|
|
9098
9113
|
const eventStart = getEventStartDate(event);
|
|
9099
9114
|
const eventEnd = getEventEndDate(event);
|
|
9100
9115
|
if (!eventStart) return false;
|
|
9101
|
-
|
|
9116
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9117
|
+
const endDay = eventEnd ? startOfLocalDay(eventEnd) : null;
|
|
9118
|
+
return dateFns.isSameDay(day, eventStart) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (endDay ? day > startDay && day < endDay : false);
|
|
9102
9119
|
}).sort((a, b) => getEventStartTimestamp(a) - getEventStartTimestamp(b));
|
|
9103
9120
|
}
|
|
9104
9121
|
function getEventStartDate(event) {
|
|
@@ -9269,6 +9286,7 @@ function EventItemAgenda({
|
|
|
9269
9286
|
view,
|
|
9270
9287
|
onClick,
|
|
9271
9288
|
showTime,
|
|
9289
|
+
noTime = false,
|
|
9272
9290
|
currentTime,
|
|
9273
9291
|
isFirstDay = true,
|
|
9274
9292
|
isLastDay = true,
|
|
@@ -9347,9 +9365,10 @@ function EventItemAgenda({
|
|
|
9347
9365
|
ariaLabel,
|
|
9348
9366
|
isFirstDay,
|
|
9349
9367
|
isLastDay,
|
|
9368
|
+
noTime,
|
|
9350
9369
|
onClick,
|
|
9351
9370
|
children: children || /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2 truncate min-w-0", children: [
|
|
9352
|
-
!event.allDay && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm sm:text-base md:text-lg lg:text-xl opacity-80 bg-white/10 px-2 rounded-full min-w-0", children: formatTimeWithOptionalMinutes(displayStart) }),
|
|
9371
|
+
!noTime && !event.allDay && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm sm:text-base md:text-lg lg:text-xl opacity-80 bg-white/10 px-2 rounded-full min-w-0", children: formatTimeWithOptionalMinutes(displayStart) }),
|
|
9353
9372
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9354
9373
|
"span",
|
|
9355
9374
|
{
|
|
@@ -9403,6 +9422,7 @@ function EventItemAgenda({
|
|
|
9403
9422
|
ariaLabel,
|
|
9404
9423
|
isFirstDay,
|
|
9405
9424
|
isLastDay,
|
|
9425
|
+
noTime,
|
|
9406
9426
|
onClick,
|
|
9407
9427
|
onMouseDown,
|
|
9408
9428
|
onTouchStart,
|
|
@@ -9426,15 +9446,16 @@ function EventItemAgenda({
|
|
|
9426
9446
|
ariaLabel,
|
|
9427
9447
|
isFirstDay,
|
|
9428
9448
|
isLastDay,
|
|
9449
|
+
noTime,
|
|
9429
9450
|
onClick,
|
|
9430
9451
|
onMouseDown,
|
|
9431
9452
|
onTouchStart,
|
|
9432
9453
|
children: isCompact ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 w-full min-w-0 overflow-hidden", children: [
|
|
9433
9454
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold leading-none min-w-0", children: event.title }),
|
|
9434
|
-
showTime && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-75 leading-none", children: formatTimeWithOptionalMinutes(displayStart) })
|
|
9455
|
+
!noTime && showTime && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-75 leading-none", children: formatTimeWithOptionalMinutes(displayStart) })
|
|
9435
9456
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 w-full min-w-0 overflow-hidden h-full", children: [
|
|
9436
9457
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold leading-snug truncate", children: event.title }),
|
|
9437
|
-
showTime && hasValidTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-75 leading-none truncate", children: getEventTime() })
|
|
9458
|
+
!noTime && showTime && hasValidTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-75 leading-none truncate", children: getEventTime() })
|
|
9438
9459
|
] })
|
|
9439
9460
|
}
|
|
9440
9461
|
);
|
|
@@ -9513,7 +9534,7 @@ function EventItemAgenda({
|
|
|
9513
9534
|
children: event.title
|
|
9514
9535
|
}
|
|
9515
9536
|
),
|
|
9516
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9537
|
+
!noTime && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9517
9538
|
"div",
|
|
9518
9539
|
{
|
|
9519
9540
|
className: cn(
|
|
@@ -9576,7 +9597,8 @@ function DayViewAgenda({
|
|
|
9576
9597
|
currentDate,
|
|
9577
9598
|
events,
|
|
9578
9599
|
onEventSelect,
|
|
9579
|
-
showUndatedEvents
|
|
9600
|
+
showUndatedEvents,
|
|
9601
|
+
noTime = false
|
|
9580
9602
|
}) {
|
|
9581
9603
|
const hours = React32.useMemo(() => {
|
|
9582
9604
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
@@ -9764,7 +9786,8 @@ function DayViewAgenda({
|
|
|
9764
9786
|
isFirstDay,
|
|
9765
9787
|
isLastDay,
|
|
9766
9788
|
onClick: (e) => handleEventClick(evt, e),
|
|
9767
|
-
showTime: true
|
|
9789
|
+
showTime: true,
|
|
9790
|
+
noTime
|
|
9768
9791
|
}
|
|
9769
9792
|
) }) }),
|
|
9770
9793
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10081,7 +10104,8 @@ function EventAgenda({
|
|
|
10081
10104
|
initialView = "month",
|
|
10082
10105
|
initialDate,
|
|
10083
10106
|
onClick,
|
|
10084
|
-
showYearView = false
|
|
10107
|
+
showYearView = false,
|
|
10108
|
+
noTime = false
|
|
10085
10109
|
}) {
|
|
10086
10110
|
const [currentDate, setCurrentDate] = React32.useState(
|
|
10087
10111
|
initialDate && new Date(initialDate) || /* @__PURE__ */ new Date()
|
|
@@ -10237,7 +10261,8 @@ function EventAgenda({
|
|
|
10237
10261
|
{
|
|
10238
10262
|
currentDate,
|
|
10239
10263
|
events,
|
|
10240
|
-
onEventSelect: handleEventSelect
|
|
10264
|
+
onEventSelect: handleEventSelect,
|
|
10265
|
+
noTime
|
|
10241
10266
|
}
|
|
10242
10267
|
),
|
|
10243
10268
|
view === "week" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10245,7 +10270,8 @@ function EventAgenda({
|
|
|
10245
10270
|
{
|
|
10246
10271
|
currentDate,
|
|
10247
10272
|
events,
|
|
10248
|
-
onEventSelect: handleEventSelect
|
|
10273
|
+
onEventSelect: handleEventSelect,
|
|
10274
|
+
noTime
|
|
10249
10275
|
}
|
|
10250
10276
|
),
|
|
10251
10277
|
view === "day" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10253,7 +10279,8 @@ function EventAgenda({
|
|
|
10253
10279
|
{
|
|
10254
10280
|
currentDate,
|
|
10255
10281
|
events,
|
|
10256
|
-
onEventSelect: handleEventSelect
|
|
10282
|
+
onEventSelect: handleEventSelect,
|
|
10283
|
+
noTime
|
|
10257
10284
|
}
|
|
10258
10285
|
),
|
|
10259
10286
|
view === "agenda" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10261,7 +10288,8 @@ function EventAgenda({
|
|
|
10261
10288
|
{
|
|
10262
10289
|
currentDate,
|
|
10263
10290
|
events,
|
|
10264
|
-
onEventSelect: handleEventSelect
|
|
10291
|
+
onEventSelect: handleEventSelect,
|
|
10292
|
+
noTime
|
|
10265
10293
|
}
|
|
10266
10294
|
),
|
|
10267
10295
|
view === "year" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10279,7 +10307,8 @@ function EventAgenda({
|
|
|
10279
10307
|
] }),
|
|
10280
10308
|
selectedEvent && React32__namespace.default.isValidElement(onClick) ? React32__namespace.default.cloneElement(onClick, {
|
|
10281
10309
|
event: selectedEvent,
|
|
10282
|
-
onClose: () => setSelectedEvent(null)
|
|
10310
|
+
onClose: () => setSelectedEvent(null),
|
|
10311
|
+
noTime
|
|
10283
10312
|
}) : null
|
|
10284
10313
|
]
|
|
10285
10314
|
}
|
|
@@ -10365,12 +10394,17 @@ function useEventVisibilityAgenda({
|
|
|
10365
10394
|
getVisibleEventCount
|
|
10366
10395
|
};
|
|
10367
10396
|
}
|
|
10397
|
+
function startOfDay2(d) {
|
|
10398
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
10399
|
+
}
|
|
10368
10400
|
function clampToWeek(date, weekStart, weekEnd) {
|
|
10369
10401
|
return dateFns.max([dateFns.min([date, weekEnd]), weekStart]);
|
|
10370
10402
|
}
|
|
10371
10403
|
function dayCol(date, weekStart) {
|
|
10404
|
+
const dateDay = startOfDay2(date);
|
|
10405
|
+
const weekStartDay = startOfDay2(weekStart);
|
|
10372
10406
|
const diff = Math.round(
|
|
10373
|
-
(
|
|
10407
|
+
(dateDay.getTime() - weekStartDay.getTime()) / (1e3 * 60 * 60 * 24)
|
|
10374
10408
|
);
|
|
10375
10409
|
return Math.max(0, Math.min(6, diff));
|
|
10376
10410
|
}
|
|
@@ -10382,7 +10416,7 @@ function computeMultiDayBars(events, weekDays) {
|
|
|
10382
10416
|
const start = getEventStartDate(ev);
|
|
10383
10417
|
const end = getEventEndDate(ev) ?? start;
|
|
10384
10418
|
if (!start || !end) return false;
|
|
10385
|
-
return start <= weekEnd && end >= weekStart;
|
|
10419
|
+
return startOfDay2(start) <= startOfDay2(weekEnd) && startOfDay2(end) >= startOfDay2(weekStart);
|
|
10386
10420
|
});
|
|
10387
10421
|
const sorted = [...multiDayEvents].sort((a, b) => {
|
|
10388
10422
|
const aS = getEventStartDate(a) ?? /* @__PURE__ */ new Date(0);
|
|
@@ -10433,7 +10467,8 @@ function MultiDayOverlay({
|
|
|
10433
10467
|
weekIndex,
|
|
10434
10468
|
hoveredEventId,
|
|
10435
10469
|
onHover,
|
|
10436
|
-
onEventSelect
|
|
10470
|
+
onEventSelect,
|
|
10471
|
+
noTime = false
|
|
10437
10472
|
}) {
|
|
10438
10473
|
if (bars.length === 0) return null;
|
|
10439
10474
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none mt-1", children: bars.map((bar) => {
|
|
@@ -10476,7 +10511,7 @@ function MultiDayOverlay({
|
|
|
10476
10511
|
),
|
|
10477
10512
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 w-full min-w-0", children: [
|
|
10478
10513
|
continuesFromPrev && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-50 leading-none mr-0.5 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeftIcon, { size: 10, weight: "bold" }) }),
|
|
10479
|
-
!event.allDay && isFirstDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-normal opacity-75 text-[10px] bg-white/15 px-1 py-0.5 rounded-full leading-none", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10514
|
+
!noTime && !event.allDay && isFirstDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-normal opacity-75 text-[10px] bg-white/15 px-1 py-0.5 rounded-full leading-none", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10480
10515
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-[11px] sm:text-xs truncate min-w-0 leading-none flex-1", children: event.title }),
|
|
10481
10516
|
isFirstDay && (() => {
|
|
10482
10517
|
const evStart = getEventStartDate(event);
|
|
@@ -10498,7 +10533,7 @@ function MultiDayOverlay({
|
|
|
10498
10533
|
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContentBase, { side: "top", children: [
|
|
10499
10534
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
|
|
10500
10535
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
|
|
10501
|
-
event.location && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px]", children: [
|
|
10536
|
+
event.location && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center", children: [
|
|
10502
10537
|
/* @__PURE__ */ jsxRuntime.jsx(react.MapPinIcon, { size: 15 }),
|
|
10503
10538
|
" ",
|
|
10504
10539
|
event.location
|
|
@@ -10514,7 +10549,8 @@ function MonthViewAgenda({
|
|
|
10514
10549
|
currentDate,
|
|
10515
10550
|
events,
|
|
10516
10551
|
onEventSelect,
|
|
10517
|
-
showUndatedEvents
|
|
10552
|
+
showUndatedEvents,
|
|
10553
|
+
noTime = false
|
|
10518
10554
|
}) {
|
|
10519
10555
|
const days = React32.useMemo(() => {
|
|
10520
10556
|
const monthStart = dateFns.startOfMonth(currentDate);
|
|
@@ -10704,8 +10740,9 @@ function MonthViewAgenda({
|
|
|
10704
10740
|
isLastDay: true,
|
|
10705
10741
|
onClick: (e) => handleEventClick(event, e),
|
|
10706
10742
|
view: "month",
|
|
10743
|
+
noTime,
|
|
10707
10744
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 sm:gap-1.5 truncate text-[11px] relative z-10", children: [
|
|
10708
|
-
!event.allDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10745
|
+
!noTime && !event.allDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10709
10746
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold truncate", children: event.title })
|
|
10710
10747
|
] })
|
|
10711
10748
|
}
|
|
@@ -10747,28 +10784,36 @@ function MonthViewAgenda({
|
|
|
10747
10784
|
PopoverContentBase,
|
|
10748
10785
|
{
|
|
10749
10786
|
align: "center",
|
|
10750
|
-
className: "max-w-52 p-3",
|
|
10787
|
+
className: "max-w-52 p-3 border-border",
|
|
10751
10788
|
style: {
|
|
10752
10789
|
"--event-height": `${EventHeightAgenda}px`
|
|
10753
10790
|
},
|
|
10754
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
{
|
|
10762
|
-
event
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10791
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10792
|
+
"div",
|
|
10793
|
+
{
|
|
10794
|
+
className: "space-y-2 ",
|
|
10795
|
+
onClick: (e) => e.stopPropagation(),
|
|
10796
|
+
children: [
|
|
10797
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm", children: dateFns.format(day, "EEE d", { locale: locale.ptBR }) }),
|
|
10798
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: sortEventsAgenda(allEvents).map((event) => {
|
|
10799
|
+
const s = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
|
|
10800
|
+
const e2 = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
|
|
10801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10802
|
+
EventItemAgenda,
|
|
10803
|
+
{
|
|
10804
|
+
noTime: true,
|
|
10805
|
+
event,
|
|
10806
|
+
isFirstDay: dateFns.isSameDay(day, s),
|
|
10807
|
+
isLastDay: dateFns.isSameDay(day, e2),
|
|
10808
|
+
onClick: (e) => handleEventClick(event, e),
|
|
10809
|
+
view: "month"
|
|
10810
|
+
},
|
|
10811
|
+
event.id
|
|
10812
|
+
);
|
|
10813
|
+
}) })
|
|
10814
|
+
]
|
|
10815
|
+
}
|
|
10816
|
+
)
|
|
10772
10817
|
}
|
|
10773
10818
|
)
|
|
10774
10819
|
] })
|
|
@@ -10786,7 +10831,8 @@ function MonthViewAgenda({
|
|
|
10786
10831
|
weekIndex,
|
|
10787
10832
|
hoveredEventId,
|
|
10788
10833
|
onHover: handleHover,
|
|
10789
|
-
onEventSelect
|
|
10834
|
+
onEventSelect,
|
|
10835
|
+
noTime
|
|
10790
10836
|
}
|
|
10791
10837
|
)
|
|
10792
10838
|
]
|
|
@@ -10819,6 +10865,7 @@ function DraggableEvent({
|
|
|
10819
10865
|
event,
|
|
10820
10866
|
view,
|
|
10821
10867
|
showTime,
|
|
10868
|
+
noTime,
|
|
10822
10869
|
onClick,
|
|
10823
10870
|
height,
|
|
10824
10871
|
isMultiDay,
|
|
@@ -10912,6 +10959,7 @@ function DraggableEvent({
|
|
|
10912
10959
|
onMouseDown: handleMouseDown,
|
|
10913
10960
|
onTouchStart: handleTouchStart,
|
|
10914
10961
|
showTime,
|
|
10962
|
+
noTime,
|
|
10915
10963
|
view,
|
|
10916
10964
|
totalCols
|
|
10917
10965
|
}
|
|
@@ -10924,7 +10972,8 @@ function WeekViewAgenda({
|
|
|
10924
10972
|
events,
|
|
10925
10973
|
onEventSelect,
|
|
10926
10974
|
onEventCreate,
|
|
10927
|
-
showUndatedEvents
|
|
10975
|
+
showUndatedEvents,
|
|
10976
|
+
noTime = false
|
|
10928
10977
|
}) {
|
|
10929
10978
|
const days = React32.useMemo(() => {
|
|
10930
10979
|
const weekStart = dateFns.startOfWeek(currentDate, { weekStartsOn: 0 });
|
|
@@ -10957,7 +11006,7 @@ function WeekViewAgenda({
|
|
|
10957
11006
|
return days.some((day) => {
|
|
10958
11007
|
if (eventStart && dateFns.isSameDay(day, eventStart)) return true;
|
|
10959
11008
|
if (eventEnd && dateFns.isSameDay(day, eventEnd)) return true;
|
|
10960
|
-
if (eventStart && eventEnd && day > eventStart && day < eventEnd)
|
|
11009
|
+
if (eventStart && eventEnd && day > startOfLocalDay(eventStart) && day < startOfLocalDay(eventEnd))
|
|
10961
11010
|
return true;
|
|
10962
11011
|
return false;
|
|
10963
11012
|
});
|
|
@@ -10989,7 +11038,7 @@ function WeekViewAgenda({
|
|
|
10989
11038
|
if (event.start == null) return false;
|
|
10990
11039
|
const eventStart = getEventStartDate(event);
|
|
10991
11040
|
const eventEnd = getEventEndDate(event) ?? getEventStartDate(event);
|
|
10992
|
-
return (eventStart ? dateFns.isSameDay(day, eventStart) : false) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (eventStart && eventEnd ? eventStart
|
|
11041
|
+
return (eventStart ? dateFns.isSameDay(day, eventStart) : false) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (eventStart && eventEnd ? day > startOfLocalDay(eventStart) && day < startOfLocalDay(eventEnd) : false);
|
|
10993
11042
|
});
|
|
10994
11043
|
const sortedEvents = [...dayEvents].sort((a, b) => {
|
|
10995
11044
|
const aStart = getEventStartDate(a) ?? getEventEndDate(a) ?? /* @__PURE__ */ new Date();
|
|
@@ -11230,7 +11279,7 @@ function WeekViewAgenda({
|
|
|
11230
11279
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
|
|
11231
11280
|
!isFirstDay && colStart === 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(ssr.CaretLeftIcon, {}) }),
|
|
11232
11281
|
showTitle && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11233
|
-
isFirstDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
11282
|
+
isFirstDay && !noTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
11234
11283
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
|
|
11235
11284
|
isFirstDay && (() => {
|
|
11236
11285
|
const evStart = getEventStartDate(event);
|
|
@@ -11308,6 +11357,7 @@ function WeekViewAgenda({
|
|
|
11308
11357
|
onClick: (e) => handleEventClick(positionedEvent.event, e),
|
|
11309
11358
|
draggable: false,
|
|
11310
11359
|
showTime: true,
|
|
11360
|
+
noTime,
|
|
11311
11361
|
view: "week",
|
|
11312
11362
|
totalCols: positionedEvent.totalCols
|
|
11313
11363
|
}
|
|
@@ -11511,7 +11561,8 @@ function capitalize(s) {
|
|
|
11511
11561
|
}
|
|
11512
11562
|
function EventDetailModalAgenda({
|
|
11513
11563
|
event,
|
|
11514
|
-
onClose
|
|
11564
|
+
onClose,
|
|
11565
|
+
noTime = false
|
|
11515
11566
|
}) {
|
|
11516
11567
|
const [open, setOpen] = React32.useState(true);
|
|
11517
11568
|
if (!event) return null;
|
|
@@ -11576,7 +11627,7 @@ function EventDetailModalAgenda({
|
|
|
11576
11627
|
] }) : isMultiDay ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
|
|
11577
11628
|
/* @__PURE__ */ jsxRuntime.jsx(react.CalendarDotsIcon, { size: 11, weight: "bold" }),
|
|
11578
11629
|
formatDurationAgendaDays(event)
|
|
11579
|
-
] }) : durationMinutes > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
|
|
11630
|
+
] }) : !noTime && durationMinutes > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
|
|
11580
11631
|
/* @__PURE__ */ jsxRuntime.jsx(react.ClockIcon, { size: 11, weight: "bold" }),
|
|
11581
11632
|
formatDuration(durationMinutes)
|
|
11582
11633
|
] }) : null }),
|
|
@@ -11586,11 +11637,24 @@ function EventDetailModalAgenda({
|
|
|
11586
11637
|
),
|
|
11587
11638
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col px-7 py-6 bg-background", children: [
|
|
11588
11639
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4 py-4", children: [
|
|
11589
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11640
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11641
|
+
react.CalendarDotsIcon,
|
|
11642
|
+
{
|
|
11643
|
+
size: 18,
|
|
11644
|
+
weight: "duotone",
|
|
11645
|
+
className: "text-primary"
|
|
11646
|
+
}
|
|
11647
|
+
) }),
|
|
11590
11648
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11591
11649
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-semibold text-foreground leading-snug", children: dateSection.primary }),
|
|
11592
|
-
dateSection.secondary && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 mt-0.5", children: isMultiDay && !event.allDay || isMultiDay && dateSection.isAllDay ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11593
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11650
|
+
!noTime && dateSection.secondary && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 mt-0.5", children: isMultiDay && !event.allDay || isMultiDay && dateSection.isAllDay ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11651
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11652
|
+
react.ArrowRightIcon,
|
|
11653
|
+
{
|
|
11654
|
+
size: 11,
|
|
11655
|
+
className: "shrink-0 text-muted-foreground/60"
|
|
11656
|
+
}
|
|
11657
|
+
),
|
|
11594
11658
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary })
|
|
11595
11659
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary }) })
|
|
11596
11660
|
] })
|
|
@@ -11598,7 +11662,14 @@ function EventDetailModalAgenda({
|
|
|
11598
11662
|
(event.location || event.description) && /* @__PURE__ */ jsxRuntime.jsx(SeparatorBase, { className: "opacity-40" }),
|
|
11599
11663
|
event.location && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11600
11664
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4 py-4", children: [
|
|
11601
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11665
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11666
|
+
react.MapPinIcon,
|
|
11667
|
+
{
|
|
11668
|
+
size: 18,
|
|
11669
|
+
weight: "duotone",
|
|
11670
|
+
className: "text-primary"
|
|
11671
|
+
}
|
|
11672
|
+
) }),
|
|
11602
11673
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11603
11674
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Localiza\xE7\xE3o" }),
|
|
11604
11675
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-foreground leading-snug", children: event.location })
|
|
@@ -11607,7 +11678,14 @@ function EventDetailModalAgenda({
|
|
|
11607
11678
|
event.description && /* @__PURE__ */ jsxRuntime.jsx(SeparatorBase, { className: "opacity-40" })
|
|
11608
11679
|
] }),
|
|
11609
11680
|
event.description && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4 py-4", children: [
|
|
11610
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11681
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11682
|
+
react.AlignLeftIcon,
|
|
11683
|
+
{
|
|
11684
|
+
size: 18,
|
|
11685
|
+
weight: "duotone",
|
|
11686
|
+
className: "text-primary"
|
|
11687
|
+
}
|
|
11688
|
+
) }),
|
|
11611
11689
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11612
11690
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Descri\xE7\xE3o" }),
|
|
11613
11691
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-muted-foreground leading-relaxed font-normal", children: event.description })
|
|
@@ -14651,7 +14729,7 @@ var detectXAxis = (data) => {
|
|
|
14651
14729
|
return stringFields[0] || Object.keys(firstItem)[0] || "name";
|
|
14652
14730
|
};
|
|
14653
14731
|
var generateAdditionalColors = (baseColors, count) => {
|
|
14654
|
-
const
|
|
14732
|
+
const hexToRgb2 = (hex) => {
|
|
14655
14733
|
const clean = hex.replace("#", "");
|
|
14656
14734
|
const bigint = parseInt(
|
|
14657
14735
|
clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean,
|
|
@@ -14700,7 +14778,7 @@ var generateAdditionalColors = (baseColors, count) => {
|
|
|
14700
14778
|
};
|
|
14701
14779
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
14702
14780
|
};
|
|
14703
|
-
const anchors = baseColors.map((c) => rgbToHsl(
|
|
14781
|
+
const anchors = baseColors.map((c) => rgbToHsl(hexToRgb2(c)));
|
|
14704
14782
|
const colors2 = [...baseColors];
|
|
14705
14783
|
let i = 0;
|
|
14706
14784
|
while (colors2.length < count) {
|
|
@@ -16713,7 +16791,7 @@ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
|
|
|
16713
16791
|
"div",
|
|
16714
16792
|
{
|
|
16715
16793
|
ref: containerRef,
|
|
16716
|
-
className: "relative flex items-center justify-between py-1
|
|
16794
|
+
className: "relative flex items-center justify-between py-1",
|
|
16717
16795
|
children: [
|
|
16718
16796
|
/* @__PURE__ */ jsxRuntime.jsx(SystemNode, { ref: leftRef, label: isInput ? externalSystem : currentSystem }),
|
|
16719
16797
|
/* @__PURE__ */ jsxRuntime.jsx(SystemNode, { ref: rightRef, label: isInput ? currentSystem : externalSystem }),
|
|
@@ -16730,7 +16808,7 @@ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
|
|
|
16730
16808
|
}
|
|
16731
16809
|
);
|
|
16732
16810
|
};
|
|
16733
|
-
var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-3 space-y-3 max-
|
|
16811
|
+
var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-3 space-y-3 max-h-[460px] overflow-y-auto [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/40 transition-colors", children: [
|
|
16734
16812
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
16735
16813
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "h-6 w-3/4" }),
|
|
16736
16814
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "h-3.5 w-1/2" })
|
|
@@ -16774,268 +16852,7 @@ var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem })
|
|
|
16774
16852
|
)) })
|
|
16775
16853
|
] })
|
|
16776
16854
|
] });
|
|
16777
|
-
|
|
16778
|
-
var modalVariants = {
|
|
16779
|
-
hidden: {
|
|
16780
|
-
opacity: 0,
|
|
16781
|
-
scale: 0.96,
|
|
16782
|
-
transition: { type: "spring", stiffness: 400, damping: 28 }
|
|
16783
|
-
},
|
|
16784
|
-
visible: {
|
|
16785
|
-
opacity: 1,
|
|
16786
|
-
scale: 1,
|
|
16787
|
-
transition: { type: "spring", stiffness: 300, damping: 28 }
|
|
16788
|
-
},
|
|
16789
|
-
exit: {
|
|
16790
|
-
opacity: 0,
|
|
16791
|
-
scale: 0.96,
|
|
16792
|
-
transition: { type: "spring", stiffness: 400, damping: 28 }
|
|
16793
|
-
}
|
|
16794
|
-
};
|
|
16795
|
-
var IntegrationModal = ({
|
|
16796
|
-
id,
|
|
16797
|
-
data,
|
|
16798
|
-
position,
|
|
16799
|
-
title = "Conex\xF5es",
|
|
16800
|
-
isLoading = false,
|
|
16801
|
-
systemName,
|
|
16802
|
-
onMouseDown,
|
|
16803
|
-
onClose,
|
|
16804
|
-
onPositionChange
|
|
16805
|
-
}) => {
|
|
16806
|
-
const isMobile = useIsMobile();
|
|
16807
|
-
const [localPos, setLocalPos] = React32.useState(position);
|
|
16808
|
-
const [dragging, setDragging] = React32.useState(false);
|
|
16809
|
-
const offsetRef = React32.useRef({ x: 0, y: 0 });
|
|
16810
|
-
const lastMouse = React32.useRef({ x: 0, y: 0 });
|
|
16811
|
-
const tooltipRef = React32.useRef(null);
|
|
16812
|
-
const currentPosRef = React32.useRef(position);
|
|
16813
|
-
React32.useEffect(() => {
|
|
16814
|
-
currentPosRef.current = position;
|
|
16815
|
-
setLocalPos(position);
|
|
16816
|
-
}, [position]);
|
|
16817
|
-
React32.useEffect(() => {
|
|
16818
|
-
let rafId = null;
|
|
16819
|
-
const handleMouseMove = (e) => {
|
|
16820
|
-
if (!dragging) return;
|
|
16821
|
-
lastMouse.current = { x: e.clientX, y: e.clientY };
|
|
16822
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16823
|
-
rafId = requestAnimationFrame(() => {
|
|
16824
|
-
const newLeft = lastMouse.current.x - offsetRef.current.x;
|
|
16825
|
-
const newTop = lastMouse.current.y - offsetRef.current.y;
|
|
16826
|
-
const p = {
|
|
16827
|
-
top: Math.max(0, Math.min(newTop, window.innerHeight - 200)),
|
|
16828
|
-
left: Math.max(0, Math.min(newLeft, window.innerWidth - 320))
|
|
16829
|
-
};
|
|
16830
|
-
currentPosRef.current = p;
|
|
16831
|
-
if (tooltipRef.current) {
|
|
16832
|
-
tooltipRef.current.style.top = `${p.top}px`;
|
|
16833
|
-
tooltipRef.current.style.left = `${p.left}px`;
|
|
16834
|
-
}
|
|
16835
|
-
onPositionChange?.(id, p);
|
|
16836
|
-
});
|
|
16837
|
-
};
|
|
16838
|
-
const handleMouseUp = () => {
|
|
16839
|
-
if (dragging) {
|
|
16840
|
-
setDragging(false);
|
|
16841
|
-
setLocalPos(currentPosRef.current);
|
|
16842
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16843
|
-
}
|
|
16844
|
-
};
|
|
16845
|
-
if (dragging) {
|
|
16846
|
-
document.addEventListener("mousemove", handleMouseMove, { passive: true });
|
|
16847
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
16848
|
-
document.body.style.cursor = "grabbing";
|
|
16849
|
-
document.body.style.userSelect = "none";
|
|
16850
|
-
}
|
|
16851
|
-
return () => {
|
|
16852
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16853
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
16854
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
16855
|
-
document.body.style.cursor = "";
|
|
16856
|
-
document.body.style.userSelect = "";
|
|
16857
|
-
};
|
|
16858
|
-
}, [dragging, id, onPositionChange]);
|
|
16859
|
-
const handleMouseDownLocal = React32.useCallback(
|
|
16860
|
-
(e) => {
|
|
16861
|
-
e.preventDefault();
|
|
16862
|
-
e.stopPropagation();
|
|
16863
|
-
const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
|
|
16864
|
-
if (!rect) return;
|
|
16865
|
-
offsetRef.current = { x: e.clientX - rect.left, y: e.clientY - rect.top };
|
|
16866
|
-
setDragging(true);
|
|
16867
|
-
onMouseDown?.(id, e);
|
|
16868
|
-
},
|
|
16869
|
-
[id, onMouseDown]
|
|
16870
|
-
);
|
|
16871
|
-
const handleTouchStartLocal = React32.useCallback(
|
|
16872
|
-
(e) => {
|
|
16873
|
-
e.stopPropagation();
|
|
16874
|
-
const touch = e.touches[0];
|
|
16875
|
-
if (!touch) return;
|
|
16876
|
-
const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
|
|
16877
|
-
if (!rect) return;
|
|
16878
|
-
offsetRef.current = {
|
|
16879
|
-
x: touch.clientX - rect.left,
|
|
16880
|
-
y: touch.clientY - rect.top
|
|
16881
|
-
};
|
|
16882
|
-
setDragging(true);
|
|
16883
|
-
onMouseDown?.(id, e);
|
|
16884
|
-
},
|
|
16885
|
-
[id, onMouseDown]
|
|
16886
|
-
);
|
|
16887
|
-
const inputConnections = React32.useMemo(
|
|
16888
|
-
() => data.connections.filter((c) => c.type === "entrada"),
|
|
16889
|
-
[data.connections]
|
|
16890
|
-
);
|
|
16891
|
-
const outputConnections = React32.useMemo(
|
|
16892
|
-
() => data.connections.filter((c) => c.type === "saida"),
|
|
16893
|
-
[data.connections]
|
|
16894
|
-
);
|
|
16895
|
-
const isInput = inputConnections.length > 0;
|
|
16896
|
-
const connections = isInput ? inputConnections : outputConnections;
|
|
16897
|
-
const externalSystem = systemName ?? connections[0]?.name ?? "Sistema";
|
|
16898
|
-
const header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16899
|
-
"div",
|
|
16900
|
-
{
|
|
16901
|
-
className: "flex items-center justify-between py-1 border-b border-border/10 bg-muted/30 shrink-0 max-w-lg",
|
|
16902
|
-
onMouseDown: handleMouseDownLocal,
|
|
16903
|
-
onTouchStart: handleTouchStartLocal,
|
|
16904
|
-
style: {
|
|
16905
|
-
touchAction: "none",
|
|
16906
|
-
cursor: dragging ? "grabbing" : "grab"
|
|
16907
|
-
},
|
|
16908
|
-
children: [
|
|
16909
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3", children: [
|
|
16910
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.DotsSixVerticalIcon, { size: 16, className: "text-primary" }),
|
|
16911
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: title })
|
|
16912
|
-
] }),
|
|
16913
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16914
|
-
ButtonBase,
|
|
16915
|
-
{
|
|
16916
|
-
variant: "ghost",
|
|
16917
|
-
size: "icon",
|
|
16918
|
-
onClick: () => onClose(id),
|
|
16919
|
-
className: "text-muted-foreground hover:text-destructive transition-colors hover:bg-destructive/10 mr-1",
|
|
16920
|
-
style: { cursor: "pointer" },
|
|
16921
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { size: 16 })
|
|
16922
|
-
}
|
|
16923
|
-
)
|
|
16924
|
-
]
|
|
16925
|
-
}
|
|
16926
|
-
);
|
|
16927
|
-
const bodyProps = { data, isLoading, connections, isInput, externalSystem };
|
|
16928
|
-
if (isMobile) {
|
|
16929
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16930
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16931
|
-
framerMotion.motion.div,
|
|
16932
|
-
{
|
|
16933
|
-
className: "fixed inset-0 z-[9999] bg-black/40 backdrop-blur-[2px]",
|
|
16934
|
-
initial: { opacity: 0 },
|
|
16935
|
-
animate: { opacity: 1 },
|
|
16936
|
-
exit: { opacity: 0 },
|
|
16937
|
-
onClick: () => onClose(id)
|
|
16938
|
-
},
|
|
16939
|
-
`overlay-${id}`
|
|
16940
|
-
),
|
|
16941
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16942
|
-
framerMotion.motion.div,
|
|
16943
|
-
{
|
|
16944
|
-
className: "fixed bottom-0 left-0 right-0 z-[10000] bg-card border-t border-border/50 rounded-t-2xl shadow-2xl flex flex-col min-h-0",
|
|
16945
|
-
style: { maxHeight: "85dvh" },
|
|
16946
|
-
initial: { y: "100%" },
|
|
16947
|
-
animate: { y: 0 },
|
|
16948
|
-
exit: { y: "100%" },
|
|
16949
|
-
transition: { type: "spring", stiffness: 320, damping: 36 },
|
|
16950
|
-
onClick: (e) => e.stopPropagation(),
|
|
16951
|
-
children: [
|
|
16952
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2.5 pb-1 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-1 rounded-full bg-border" }) }),
|
|
16953
|
-
header,
|
|
16954
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/40 transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx(Body, { ...bodyProps }) })
|
|
16955
|
-
]
|
|
16956
|
-
},
|
|
16957
|
-
`sheet-${id}`
|
|
16958
|
-
)
|
|
16959
|
-
] }) });
|
|
16960
|
-
}
|
|
16961
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16962
|
-
framerMotion.motion.div,
|
|
16963
|
-
{
|
|
16964
|
-
ref: tooltipRef,
|
|
16965
|
-
className: "fixed bg-card/95 backdrop-blur-md border border-border/50 rounded-lg shadow-2xl z-[10000] w-[calc(100vw-32px)] max-w-sm sm:w-80 overflow-hidden",
|
|
16966
|
-
variants: modalVariants,
|
|
16967
|
-
initial: "hidden",
|
|
16968
|
-
animate: "visible",
|
|
16969
|
-
exit: "exit",
|
|
16970
|
-
style: { top: localPos.top, left: localPos.left },
|
|
16971
|
-
onClick: (e) => e.stopPropagation(),
|
|
16972
|
-
children: [
|
|
16973
|
-
header,
|
|
16974
|
-
/* @__PURE__ */ jsxRuntime.jsx(Body, { ...bodyProps })
|
|
16975
|
-
]
|
|
16976
|
-
},
|
|
16977
|
-
id
|
|
16978
|
-
) });
|
|
16979
|
-
};
|
|
16980
|
-
var IntegrationModal_default = IntegrationModal;
|
|
16981
|
-
|
|
16982
|
-
// src/components/ui/charts/components/tooltips/utils/integrationTooltipUtils.ts
|
|
16983
|
-
function processIntegrationData(integrations, targetSystemName) {
|
|
16984
|
-
const connections = [];
|
|
16985
|
-
integrations.forEach((integration) => {
|
|
16986
|
-
const origemNome = integration.origem.properties.nome;
|
|
16987
|
-
const destinoNome = integration.destino.properties.nome;
|
|
16988
|
-
if (origemNome === targetSystemName) {
|
|
16989
|
-
connections.push({
|
|
16990
|
-
id: integration.r.elementId,
|
|
16991
|
-
name: destinoNome,
|
|
16992
|
-
type: "saida",
|
|
16993
|
-
integration: integration.r.properties
|
|
16994
|
-
});
|
|
16995
|
-
}
|
|
16996
|
-
if (destinoNome === targetSystemName) {
|
|
16997
|
-
connections.push({
|
|
16998
|
-
id: integration.r.elementId,
|
|
16999
|
-
name: origemNome,
|
|
17000
|
-
type: "entrada",
|
|
17001
|
-
integration: integration.r.properties
|
|
17002
|
-
});
|
|
17003
|
-
}
|
|
17004
|
-
});
|
|
17005
|
-
return {
|
|
17006
|
-
name: targetSystemName,
|
|
17007
|
-
connections
|
|
17008
|
-
};
|
|
17009
|
-
}
|
|
17010
|
-
|
|
17011
|
-
// src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
|
|
17012
|
-
function processNeo4jData(integrations, targetSystemName) {
|
|
17013
|
-
const connections = [];
|
|
17014
|
-
integrations.forEach((integration) => {
|
|
17015
|
-
const origemNome = integration.origem.properties.nome;
|
|
17016
|
-
const destinoNome = integration.destino.properties.nome;
|
|
17017
|
-
if (origemNome === targetSystemName) {
|
|
17018
|
-
connections.push({
|
|
17019
|
-
id: integration.r.elementId,
|
|
17020
|
-
name: destinoNome,
|
|
17021
|
-
type: "saida",
|
|
17022
|
-
integration: integration.r.properties
|
|
17023
|
-
});
|
|
17024
|
-
}
|
|
17025
|
-
if (destinoNome === targetSystemName) {
|
|
17026
|
-
connections.push({
|
|
17027
|
-
id: integration.r.elementId,
|
|
17028
|
-
name: origemNome,
|
|
17029
|
-
type: "entrada",
|
|
17030
|
-
integration: integration.r.properties
|
|
17031
|
-
});
|
|
17032
|
-
}
|
|
17033
|
-
});
|
|
17034
|
-
return {
|
|
17035
|
-
name: targetSystemName,
|
|
17036
|
-
connections
|
|
17037
|
-
};
|
|
17038
|
-
}
|
|
16855
|
+
React32__namespace.default.memo(BodyComponent);
|
|
17039
16856
|
var Brush = ({
|
|
17040
16857
|
data,
|
|
17041
16858
|
legend,
|
|
@@ -19665,6 +19482,35 @@ var TimeSeries = ({
|
|
|
19665
19482
|
) });
|
|
19666
19483
|
};
|
|
19667
19484
|
var TimeSeries_default = TimeSeries;
|
|
19485
|
+
|
|
19486
|
+
// src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
|
|
19487
|
+
function processNeo4jData(integrations, targetSystemName) {
|
|
19488
|
+
const connections = [];
|
|
19489
|
+
integrations.forEach((integration) => {
|
|
19490
|
+
const origemNome = integration.origem.properties.nome;
|
|
19491
|
+
const destinoNome = integration.destino.properties.nome;
|
|
19492
|
+
if (origemNome === targetSystemName) {
|
|
19493
|
+
connections.push({
|
|
19494
|
+
id: integration.r.elementId,
|
|
19495
|
+
name: destinoNome,
|
|
19496
|
+
type: "saida",
|
|
19497
|
+
integration: integration.r.properties
|
|
19498
|
+
});
|
|
19499
|
+
}
|
|
19500
|
+
if (destinoNome === targetSystemName) {
|
|
19501
|
+
connections.push({
|
|
19502
|
+
id: integration.r.elementId,
|
|
19503
|
+
name: origemNome,
|
|
19504
|
+
type: "entrada",
|
|
19505
|
+
integration: integration.r.properties
|
|
19506
|
+
});
|
|
19507
|
+
}
|
|
19508
|
+
});
|
|
19509
|
+
return {
|
|
19510
|
+
name: targetSystemName,
|
|
19511
|
+
connections
|
|
19512
|
+
};
|
|
19513
|
+
}
|
|
19668
19514
|
function NumericInput({
|
|
19669
19515
|
value,
|
|
19670
19516
|
onChange,
|
|
@@ -19756,6 +19602,378 @@ function NumericInput({
|
|
|
19756
19602
|
] })
|
|
19757
19603
|
] });
|
|
19758
19604
|
}
|
|
19605
|
+
function hexToRgb(hex) {
|
|
19606
|
+
const clean = hex.replace("#", "");
|
|
19607
|
+
if (clean.length !== 6) return null;
|
|
19608
|
+
const num = parseInt(clean, 16);
|
|
19609
|
+
return { r: num >> 16 & 255, g: num >> 8 & 255, b: num & 255 };
|
|
19610
|
+
}
|
|
19611
|
+
function isValidHex(hex) {
|
|
19612
|
+
return /^#[0-9A-Fa-f]{6}$/.test(hex);
|
|
19613
|
+
}
|
|
19614
|
+
var DEFAULT_SWATCHES = [
|
|
19615
|
+
"#000000",
|
|
19616
|
+
"#ffffff",
|
|
19617
|
+
"#6B7280",
|
|
19618
|
+
"#EF4444",
|
|
19619
|
+
"#F97316",
|
|
19620
|
+
"#F59E0B",
|
|
19621
|
+
"#84CC16",
|
|
19622
|
+
"#22C55E",
|
|
19623
|
+
"#14B8A6",
|
|
19624
|
+
"#06B6D4",
|
|
19625
|
+
"#3B82F6",
|
|
19626
|
+
"#8B5CF6",
|
|
19627
|
+
"#EC4899",
|
|
19628
|
+
"#F43F5E",
|
|
19629
|
+
"#D97706",
|
|
19630
|
+
"#0EA5E9"
|
|
19631
|
+
];
|
|
19632
|
+
var ColorPickerBase = React32__namespace.forwardRef(
|
|
19633
|
+
({
|
|
19634
|
+
value = "#3B82F6",
|
|
19635
|
+
onChange,
|
|
19636
|
+
opacity = 1,
|
|
19637
|
+
onOpacityChange,
|
|
19638
|
+
swatches = DEFAULT_SWATCHES,
|
|
19639
|
+
label,
|
|
19640
|
+
error,
|
|
19641
|
+
disabled = false,
|
|
19642
|
+
className,
|
|
19643
|
+
"data-testid": dataTestId = "color-picker-base"
|
|
19644
|
+
}, ref) => {
|
|
19645
|
+
const [hexInput, setHexInput] = React32__namespace.useState(value.toUpperCase());
|
|
19646
|
+
React32__namespace.useEffect(() => {
|
|
19647
|
+
setHexInput(value.toUpperCase());
|
|
19648
|
+
}, [value]);
|
|
19649
|
+
const rgb = hexToRgb(value) ?? { r: 59, g: 130, b: 246 };
|
|
19650
|
+
const rgbString = `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
|
|
19651
|
+
const opacityPercent = Math.round(opacity * 100);
|
|
19652
|
+
const handleNativeChange = (e) => {
|
|
19653
|
+
onChange?.(e.target.value.toUpperCase());
|
|
19654
|
+
};
|
|
19655
|
+
const handleHexInput = (e) => {
|
|
19656
|
+
const raw = e.target.value;
|
|
19657
|
+
setHexInput(raw.toUpperCase());
|
|
19658
|
+
const withHash = raw.startsWith("#") ? raw : `#${raw}`;
|
|
19659
|
+
if (isValidHex(withHash)) onChange?.(withHash.toUpperCase());
|
|
19660
|
+
};
|
|
19661
|
+
const handleHexBlur = () => {
|
|
19662
|
+
const withHash = hexInput.startsWith("#") ? hexInput : `#${hexInput}`;
|
|
19663
|
+
if (!isValidHex(withHash)) setHexInput(value.toUpperCase());
|
|
19664
|
+
};
|
|
19665
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19666
|
+
"div",
|
|
19667
|
+
{
|
|
19668
|
+
ref,
|
|
19669
|
+
className: cn("flex flex-col w-full min-w-[150px]", className),
|
|
19670
|
+
"data-testid": dataTestId,
|
|
19671
|
+
children: [
|
|
19672
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(LabelBase_default, { className: "mb-1", children: label }),
|
|
19673
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverBase, { children: [
|
|
19674
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTriggerBase, { asChild: true, disabled, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19675
|
+
ButtonBase,
|
|
19676
|
+
{
|
|
19677
|
+
variant: "outline",
|
|
19678
|
+
size: "select",
|
|
19679
|
+
disabled,
|
|
19680
|
+
"data-testid": `${dataTestId}-trigger`,
|
|
19681
|
+
className: cn(
|
|
19682
|
+
"w-full justify-start font-normal",
|
|
19683
|
+
error && "border-destructive"
|
|
19684
|
+
),
|
|
19685
|
+
children: [
|
|
19686
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19687
|
+
"span",
|
|
19688
|
+
{
|
|
19689
|
+
className: "inline-block size-4 rounded-sm border border-border shrink-0",
|
|
19690
|
+
style: {
|
|
19691
|
+
backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`
|
|
19692
|
+
}
|
|
19693
|
+
}
|
|
19694
|
+
),
|
|
19695
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-xs tracking-wide", children: value.toUpperCase() }),
|
|
19696
|
+
onOpacityChange && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto text-muted-foreground text-xs", children: [
|
|
19697
|
+
opacityPercent,
|
|
19698
|
+
"%"
|
|
19699
|
+
] })
|
|
19700
|
+
]
|
|
19701
|
+
}
|
|
19702
|
+
) }),
|
|
19703
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19704
|
+
PopoverContentBase,
|
|
19705
|
+
{
|
|
19706
|
+
className: "w-64 p-3 flex flex-col gap-3",
|
|
19707
|
+
align: "start",
|
|
19708
|
+
children: [
|
|
19709
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-8 gap-1", children: swatches.map((swatch) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
19710
|
+
"button",
|
|
19711
|
+
{
|
|
19712
|
+
type: "button",
|
|
19713
|
+
title: swatch,
|
|
19714
|
+
"data-testid": `${dataTestId}-swatch`,
|
|
19715
|
+
onClick: () => onChange?.(swatch),
|
|
19716
|
+
className: cn(
|
|
19717
|
+
"size-6 rounded-md border transition hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
19718
|
+
value.toUpperCase() === swatch.toUpperCase() ? "border-ring ring-2 ring-ring/50 scale-110" : "border-border"
|
|
19719
|
+
),
|
|
19720
|
+
style: { backgroundColor: swatch }
|
|
19721
|
+
},
|
|
19722
|
+
swatch
|
|
19723
|
+
)) }),
|
|
19724
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
19725
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative size-9 shrink-0 rounded-md border border-border overflow-hidden cursor-pointer", children: [
|
|
19726
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19727
|
+
"input",
|
|
19728
|
+
{
|
|
19729
|
+
type: "color",
|
|
19730
|
+
value,
|
|
19731
|
+
onChange: handleNativeChange,
|
|
19732
|
+
"data-testid": `${dataTestId}-native`,
|
|
19733
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
|
19734
|
+
}
|
|
19735
|
+
),
|
|
19736
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19737
|
+
"span",
|
|
19738
|
+
{
|
|
19739
|
+
className: "absolute inset-0 rounded-md pointer-events-none",
|
|
19740
|
+
style: { backgroundColor: rgbString }
|
|
19741
|
+
}
|
|
19742
|
+
)
|
|
19743
|
+
] }),
|
|
19744
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-1 rounded-md border border-input bg-background h-9 px-2", children: [
|
|
19745
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs font-mono", children: "#" }),
|
|
19746
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19747
|
+
"input",
|
|
19748
|
+
{
|
|
19749
|
+
type: "text",
|
|
19750
|
+
maxLength: 6,
|
|
19751
|
+
value: hexInput.startsWith("#") ? hexInput.slice(1) : hexInput,
|
|
19752
|
+
onChange: handleHexInput,
|
|
19753
|
+
onBlur: handleHexBlur,
|
|
19754
|
+
"data-testid": `${dataTestId}-hex-input`,
|
|
19755
|
+
className: "flex-1 bg-transparent text-xs font-mono text-foreground focus:outline-none uppercase tracking-widest placeholder:text-muted-foreground",
|
|
19756
|
+
placeholder: "RRGGBB"
|
|
19757
|
+
}
|
|
19758
|
+
)
|
|
19759
|
+
] })
|
|
19760
|
+
] }),
|
|
19761
|
+
onOpacityChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
19762
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
19763
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Opacidade" }),
|
|
19764
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-mono text-foreground", children: [
|
|
19765
|
+
opacityPercent,
|
|
19766
|
+
"%"
|
|
19767
|
+
] })
|
|
19768
|
+
] }),
|
|
19769
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
19770
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19771
|
+
"div",
|
|
19772
|
+
{
|
|
19773
|
+
className: "absolute inset-y-0 left-0 right-0 my-auto h-1.5 rounded-full pointer-events-none",
|
|
19774
|
+
style: {
|
|
19775
|
+
backgroundImage: "repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)",
|
|
19776
|
+
backgroundSize: "8px 8px"
|
|
19777
|
+
}
|
|
19778
|
+
}
|
|
19779
|
+
),
|
|
19780
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19781
|
+
"div",
|
|
19782
|
+
{
|
|
19783
|
+
className: "absolute inset-y-0 left-0 right-0 my-auto h-1.5 rounded-full pointer-events-none",
|
|
19784
|
+
style: {
|
|
19785
|
+
background: `linear-gradient(to right, transparent, ${rgbString})`
|
|
19786
|
+
}
|
|
19787
|
+
}
|
|
19788
|
+
),
|
|
19789
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19790
|
+
SlideBase,
|
|
19791
|
+
{
|
|
19792
|
+
min: 0,
|
|
19793
|
+
max: 100,
|
|
19794
|
+
step: 1,
|
|
19795
|
+
value: [opacityPercent],
|
|
19796
|
+
onValueChange: ([val]) => onOpacityChange(val / 100),
|
|
19797
|
+
"data-testid": `${dataTestId}-opacity`,
|
|
19798
|
+
className: "relative"
|
|
19799
|
+
}
|
|
19800
|
+
)
|
|
19801
|
+
] })
|
|
19802
|
+
] })
|
|
19803
|
+
]
|
|
19804
|
+
}
|
|
19805
|
+
)
|
|
19806
|
+
] }),
|
|
19807
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { error })
|
|
19808
|
+
]
|
|
19809
|
+
}
|
|
19810
|
+
);
|
|
19811
|
+
}
|
|
19812
|
+
);
|
|
19813
|
+
ColorPickerBase.displayName = "ColorPickerBase";
|
|
19814
|
+
var TagChip = ({
|
|
19815
|
+
label,
|
|
19816
|
+
onRemove,
|
|
19817
|
+
disabled,
|
|
19818
|
+
testid
|
|
19819
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19820
|
+
"span",
|
|
19821
|
+
{
|
|
19822
|
+
className: cn(
|
|
19823
|
+
"inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",
|
|
19824
|
+
"bg-primary/10 text-primary border border-primary/20",
|
|
19825
|
+
"transition-colors"
|
|
19826
|
+
),
|
|
19827
|
+
"data-testid": testid,
|
|
19828
|
+
children: [
|
|
19829
|
+
label,
|
|
19830
|
+
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19831
|
+
"button",
|
|
19832
|
+
{
|
|
19833
|
+
type: "button",
|
|
19834
|
+
onClick: onRemove,
|
|
19835
|
+
"data-testid": `${testid}-remove`,
|
|
19836
|
+
"aria-label": `Remover ${label}`,
|
|
19837
|
+
className: cn(
|
|
19838
|
+
"inline-flex items-center justify-center rounded-full size-3.5",
|
|
19839
|
+
"hover:bg-primary/20 text-primary/70 hover:text-primary",
|
|
19840
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary",
|
|
19841
|
+
"transition-colors"
|
|
19842
|
+
),
|
|
19843
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { weight: "bold", className: "size-2.5" })
|
|
19844
|
+
}
|
|
19845
|
+
)
|
|
19846
|
+
]
|
|
19847
|
+
}
|
|
19848
|
+
);
|
|
19849
|
+
var TagInput = React32__namespace.forwardRef(
|
|
19850
|
+
({
|
|
19851
|
+
tags = [],
|
|
19852
|
+
onTagsChange,
|
|
19853
|
+
maxTags,
|
|
19854
|
+
allowDuplicates = false,
|
|
19855
|
+
separators = [","],
|
|
19856
|
+
label,
|
|
19857
|
+
error,
|
|
19858
|
+
disabled = false,
|
|
19859
|
+
placeholder = "Digite e pressione Enter...",
|
|
19860
|
+
className,
|
|
19861
|
+
"data-testid": dataTestId = "tag-input",
|
|
19862
|
+
onKeyDown,
|
|
19863
|
+
onBlur,
|
|
19864
|
+
...props
|
|
19865
|
+
}, ref) => {
|
|
19866
|
+
const [inputValue, setInputValue] = React32__namespace.useState("");
|
|
19867
|
+
const isMaxReached = maxTags !== void 0 && tags.length >= maxTags;
|
|
19868
|
+
const addTag = (raw) => {
|
|
19869
|
+
const trimmed = raw.trim();
|
|
19870
|
+
if (!trimmed) return;
|
|
19871
|
+
if (!allowDuplicates && tags.includes(trimmed)) {
|
|
19872
|
+
setInputValue("");
|
|
19873
|
+
return;
|
|
19874
|
+
}
|
|
19875
|
+
if (isMaxReached) return;
|
|
19876
|
+
onTagsChange?.([...tags, trimmed]);
|
|
19877
|
+
setInputValue("");
|
|
19878
|
+
};
|
|
19879
|
+
const removeTag = (index) => {
|
|
19880
|
+
onTagsChange?.(tags.filter((_, i) => i !== index));
|
|
19881
|
+
};
|
|
19882
|
+
const handleKeyDown = (e) => {
|
|
19883
|
+
onKeyDown?.(e);
|
|
19884
|
+
if (e.key === "Enter") {
|
|
19885
|
+
e.preventDefault();
|
|
19886
|
+
addTag(inputValue);
|
|
19887
|
+
return;
|
|
19888
|
+
}
|
|
19889
|
+
if (e.key === "Backspace" && inputValue === "" && tags.length > 0) {
|
|
19890
|
+
removeTag(tags.length - 1);
|
|
19891
|
+
return;
|
|
19892
|
+
}
|
|
19893
|
+
if (separators.includes(e.key)) {
|
|
19894
|
+
e.preventDefault();
|
|
19895
|
+
addTag(inputValue);
|
|
19896
|
+
}
|
|
19897
|
+
};
|
|
19898
|
+
const handleBlur = (e) => {
|
|
19899
|
+
onBlur?.(e);
|
|
19900
|
+
if (inputValue.trim()) {
|
|
19901
|
+
addTag(inputValue);
|
|
19902
|
+
}
|
|
19903
|
+
};
|
|
19904
|
+
const handleChange = (e) => {
|
|
19905
|
+
const val = e.target.value;
|
|
19906
|
+
const hasSeparator = separators.some((sep) => val.includes(sep));
|
|
19907
|
+
if (hasSeparator) {
|
|
19908
|
+
const parts = val.split(new RegExp(`[${separators.join("")}]`));
|
|
19909
|
+
parts.slice(0, -1).forEach((part) => addTag(part));
|
|
19910
|
+
setInputValue(parts[parts.length - 1]);
|
|
19911
|
+
} else {
|
|
19912
|
+
setInputValue(val);
|
|
19913
|
+
}
|
|
19914
|
+
};
|
|
19915
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19916
|
+
"div",
|
|
19917
|
+
{
|
|
19918
|
+
className: cn("flex flex-col w-full min-w-[150px]"),
|
|
19919
|
+
"data-testid": dataTestId,
|
|
19920
|
+
children: [
|
|
19921
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(LabelBase_default, { className: "mb-1", children: label }),
|
|
19922
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19923
|
+
"div",
|
|
19924
|
+
{
|
|
19925
|
+
className: cn(
|
|
19926
|
+
"flex flex-wrap items-center gap-1.5 min-h-9 rounded-md border bg-background px-2 py-1.5 transition",
|
|
19927
|
+
error ? "border-destructive focus-within:ring-1 focus-within:ring-destructive" : "border-input focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring",
|
|
19928
|
+
disabled && "opacity-50 pointer-events-none",
|
|
19929
|
+
className
|
|
19930
|
+
),
|
|
19931
|
+
children: [
|
|
19932
|
+
tags.map((tag, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
19933
|
+
TagChip,
|
|
19934
|
+
{
|
|
19935
|
+
label: tag,
|
|
19936
|
+
disabled,
|
|
19937
|
+
onRemove: () => removeTag(i),
|
|
19938
|
+
testid: `${dataTestId}-tag-${i}`
|
|
19939
|
+
},
|
|
19940
|
+
`${tag}-${i}`
|
|
19941
|
+
)),
|
|
19942
|
+
!isMaxReached && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19943
|
+
"input",
|
|
19944
|
+
{
|
|
19945
|
+
ref,
|
|
19946
|
+
type: "text",
|
|
19947
|
+
value: inputValue,
|
|
19948
|
+
onChange: handleChange,
|
|
19949
|
+
onKeyDown: handleKeyDown,
|
|
19950
|
+
onBlur: handleBlur,
|
|
19951
|
+
disabled,
|
|
19952
|
+
placeholder: tags.length === 0 ? placeholder : "",
|
|
19953
|
+
"data-testid": `${dataTestId}-input`,
|
|
19954
|
+
className: cn(
|
|
19955
|
+
"flex-1 min-w-[120px] bg-transparent text-sm text-foreground",
|
|
19956
|
+
"placeholder:text-muted-foreground focus:outline-none",
|
|
19957
|
+
"disabled:cursor-not-allowed"
|
|
19958
|
+
),
|
|
19959
|
+
...props
|
|
19960
|
+
}
|
|
19961
|
+
),
|
|
19962
|
+
isMaxReached && tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground ml-1", children: [
|
|
19963
|
+
"M\xE1x. ",
|
|
19964
|
+
maxTags,
|
|
19965
|
+
" tags"
|
|
19966
|
+
] })
|
|
19967
|
+
]
|
|
19968
|
+
}
|
|
19969
|
+
),
|
|
19970
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { error })
|
|
19971
|
+
]
|
|
19972
|
+
}
|
|
19973
|
+
);
|
|
19974
|
+
}
|
|
19975
|
+
);
|
|
19976
|
+
TagInput.displayName = "TagInput";
|
|
19759
19977
|
function Leaderboard({
|
|
19760
19978
|
items,
|
|
19761
19979
|
order: initialOrder = "desc",
|
|
@@ -21184,7 +21402,6 @@ exports.InputOTPBase = InputOTPBase;
|
|
|
21184
21402
|
exports.InputOTPGroupBase = InputOTPGroupBase;
|
|
21185
21403
|
exports.InputOTPSeparatorBase = InputOTPSeparatorBase;
|
|
21186
21404
|
exports.InputOTPSlotBase = InputOTPSlotBase;
|
|
21187
|
-
exports.IntegrationTooltip = IntegrationModal_default;
|
|
21188
21405
|
exports.LabelBase = LabelBase_default;
|
|
21189
21406
|
exports.Leaderboard = Leaderboard;
|
|
21190
21407
|
exports.LikeButton = LikeButton;
|
|
@@ -21390,7 +21607,6 @@ exports.isValidHour = isValidHour;
|
|
|
21390
21607
|
exports.isValidMinuteOrSecond = isValidMinuteOrSecond;
|
|
21391
21608
|
exports.niceCeil = niceCeil;
|
|
21392
21609
|
exports.normalizeAttendDate = normalizeAttendDate;
|
|
21393
|
-
exports.processIntegrationData = processIntegrationData;
|
|
21394
21610
|
exports.processNeo4jData = processNeo4jData;
|
|
21395
21611
|
exports.renderInsideBarLabel = renderInsideBarLabel;
|
|
21396
21612
|
exports.renderPillLabel = pillLabelRenderer_default;
|
|
@@ -21403,6 +21619,7 @@ exports.setMinutes = setMinutes;
|
|
|
21403
21619
|
exports.setSeconds = setSeconds;
|
|
21404
21620
|
exports.sortEvents = sortEvents;
|
|
21405
21621
|
exports.sortEventsAgenda = sortEventsAgenda;
|
|
21622
|
+
exports.startOfLocalDay = startOfLocalDay;
|
|
21406
21623
|
exports.toast = toast;
|
|
21407
21624
|
exports.useBiaxial = useBiaxial;
|
|
21408
21625
|
exports.useCalendarDnd = useCalendarDnd;
|