@helpwave/hightide 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +97 -37
- package/dist/index.d.ts +97 -37
- package/dist/index.js +674 -295
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +637 -259
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +42 -11
- package/dist/style/uncompiled/theme/colors/semantic.css +1 -1
- package/dist/style/uncompiled/theme/components.css +1 -1
- package/package.json +18 -17
package/dist/index.mjs
CHANGED
|
@@ -6489,10 +6489,6 @@ var formatDateTime = (date) => {
|
|
|
6489
6489
|
const minutes = date.getMinutes().toString().padStart(2, "0");
|
|
6490
6490
|
return `${dateString}T${hours}:${minutes}`;
|
|
6491
6491
|
};
|
|
6492
|
-
var getDaysInMonth = (year, month) => {
|
|
6493
|
-
const lastDayOfMonth = new Date(year, month + 1, 0);
|
|
6494
|
-
return lastDayOfMonth.getDate();
|
|
6495
|
-
};
|
|
6496
6492
|
var changeDuration = (date, duration, isAdding) => {
|
|
6497
6493
|
const {
|
|
6498
6494
|
years = 0,
|
|
@@ -6602,6 +6598,51 @@ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
|
|
|
6602
6598
|
}
|
|
6603
6599
|
return equalSizeGroups(dayList, 7);
|
|
6604
6600
|
};
|
|
6601
|
+
var formatGerman = (date, showTime) => {
|
|
6602
|
+
const d = new Intl.DateTimeFormat("de-DE", {
|
|
6603
|
+
day: "2-digit",
|
|
6604
|
+
month: "2-digit",
|
|
6605
|
+
year: "numeric"
|
|
6606
|
+
}).format(date);
|
|
6607
|
+
if (!showTime) return d;
|
|
6608
|
+
const t = new Intl.DateTimeFormat("de-DE", {
|
|
6609
|
+
hour: "2-digit",
|
|
6610
|
+
minute: "2-digit"
|
|
6611
|
+
}).format(date);
|
|
6612
|
+
return `${d} um ${t} Uhr`;
|
|
6613
|
+
};
|
|
6614
|
+
var formatAbsolute = (date, locale, showTime) => {
|
|
6615
|
+
if (locale === "de-DE") {
|
|
6616
|
+
return formatGerman(date, showTime);
|
|
6617
|
+
}
|
|
6618
|
+
const options = {
|
|
6619
|
+
year: "numeric",
|
|
6620
|
+
month: "numeric",
|
|
6621
|
+
day: "numeric"
|
|
6622
|
+
};
|
|
6623
|
+
if (showTime) {
|
|
6624
|
+
options.hour = "numeric";
|
|
6625
|
+
options.minute = "numeric";
|
|
6626
|
+
}
|
|
6627
|
+
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
6628
|
+
};
|
|
6629
|
+
var formatRelative = (date, locale, showTime) => {
|
|
6630
|
+
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
6631
|
+
const now = /* @__PURE__ */ new Date();
|
|
6632
|
+
const diffInSeconds = (date.getTime() - now.getTime()) / 1e3;
|
|
6633
|
+
if (Math.abs(diffInSeconds) < 60) return rtf.format(Math.round(diffInSeconds), "second");
|
|
6634
|
+
if (Math.abs(diffInSeconds) < 3600) return rtf.format(Math.round(diffInSeconds / 60), "minute");
|
|
6635
|
+
if (Math.abs(diffInSeconds) < 86400) return rtf.format(Math.round(diffInSeconds / 3600), "hour");
|
|
6636
|
+
if (Math.abs(diffInSeconds) < 604800) return rtf.format(Math.round(diffInSeconds / 86400), "day");
|
|
6637
|
+
return formatAbsolute(date, locale, showTime);
|
|
6638
|
+
};
|
|
6639
|
+
var DateUtils = {
|
|
6640
|
+
monthsList,
|
|
6641
|
+
weekDayList,
|
|
6642
|
+
equalDate,
|
|
6643
|
+
formatAbsolute,
|
|
6644
|
+
formatRelative
|
|
6645
|
+
};
|
|
6605
6646
|
|
|
6606
6647
|
// src/components/date/DatePicker.tsx
|
|
6607
6648
|
import clsx7 from "clsx";
|
|
@@ -6784,6 +6825,16 @@ var hightideTranslation = {
|
|
|
6784
6825
|
"remove": `Entfernen`,
|
|
6785
6826
|
"required": `Erforderlich`,
|
|
6786
6827
|
"reset": `Zur\xFCcksetzen`,
|
|
6828
|
+
"rSortingOrderAfter": ({ otherSortings }) => {
|
|
6829
|
+
let _out = "";
|
|
6830
|
+
_out += `Angewendet `;
|
|
6831
|
+
_out += TranslationGen.resolvePlural(otherSortings, {
|
|
6832
|
+
"=0": `als prim\xE4re Sortierung`,
|
|
6833
|
+
"=1": `nach ${otherSortings} anderen Sortierung`,
|
|
6834
|
+
"other": `nach ${otherSortings} anderen Sortierungen`
|
|
6835
|
+
});
|
|
6836
|
+
return _out;
|
|
6837
|
+
},
|
|
6787
6838
|
"save": `Speichern`,
|
|
6788
6839
|
"saved": `Gespeichert`,
|
|
6789
6840
|
"search": `Suche`,
|
|
@@ -7020,6 +7071,16 @@ var hightideTranslation = {
|
|
|
7020
7071
|
"remove": `Remove`,
|
|
7021
7072
|
"required": `Required`,
|
|
7022
7073
|
"reset": `Reset`,
|
|
7074
|
+
"rSortingOrderAfter": ({ otherSortings }) => {
|
|
7075
|
+
let _out = "";
|
|
7076
|
+
_out += `Applied `;
|
|
7077
|
+
_out += TranslationGen.resolvePlural(otherSortings, {
|
|
7078
|
+
"=0": `as the first sorting`,
|
|
7079
|
+
"=1": `after ${otherSortings} other sorting`,
|
|
7080
|
+
"other": `after ${otherSortings} other sortings`
|
|
7081
|
+
});
|
|
7082
|
+
return _out;
|
|
7083
|
+
},
|
|
7023
7084
|
"save": `Save`,
|
|
7024
7085
|
"saved": `Saved`,
|
|
7025
7086
|
"search": `Search`,
|
|
@@ -7318,6 +7379,7 @@ var Button = forwardRef(function SolidButton({
|
|
|
7318
7379
|
startIcon,
|
|
7319
7380
|
endIcon,
|
|
7320
7381
|
disabled,
|
|
7382
|
+
allowClickEventPropagation = false,
|
|
7321
7383
|
className,
|
|
7322
7384
|
...restProps
|
|
7323
7385
|
}, ref) {
|
|
@@ -7340,6 +7402,12 @@ var Button = forwardRef(function SolidButton({
|
|
|
7340
7402
|
paddingMapping[layout][size],
|
|
7341
7403
|
className
|
|
7342
7404
|
),
|
|
7405
|
+
onClick: (event) => {
|
|
7406
|
+
if (!allowClickEventPropagation) {
|
|
7407
|
+
event.stopPropagation();
|
|
7408
|
+
}
|
|
7409
|
+
restProps?.onClick(event);
|
|
7410
|
+
},
|
|
7343
7411
|
disabled,
|
|
7344
7412
|
children: [
|
|
7345
7413
|
startIcon,
|
|
@@ -7368,8 +7436,8 @@ var DayPicker = ({
|
|
|
7368
7436
|
return /* @__PURE__ */ jsxs4("div", { className: clsx4("flex-col-1 min-w-[220px] select-none", className), children: [
|
|
7369
7437
|
/* @__PURE__ */ jsx4("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx4("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
|
|
7370
7438
|
weeks.map((week, index) => /* @__PURE__ */ jsx4("div", { className: "flex-row-2 text-center", children: week.map((date) => {
|
|
7371
|
-
const isSelected = !!selected && equalDate(selected, date);
|
|
7372
|
-
const isToday = equalDate(/* @__PURE__ */ new Date(), date);
|
|
7439
|
+
const isSelected = !!selected && DateUtils.equalDate(selected, date);
|
|
7440
|
+
const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
|
|
7373
7441
|
const isSameMonth = date.getMonth() === month;
|
|
7374
7442
|
const isDayValid = isInTimeSpan(date, start, end);
|
|
7375
7443
|
return /* @__PURE__ */ jsx4(
|
|
@@ -7569,8 +7637,9 @@ var YearMonthPicker = ({
|
|
|
7569
7637
|
label: /* @__PURE__ */ jsx6("span", { className: clsx6({ "text-primary font-bold": selectedYear }), children: year }),
|
|
7570
7638
|
isExpanded: showValueOpen && selectedYear,
|
|
7571
7639
|
contentClassName: "gap-y-1",
|
|
7572
|
-
|
|
7573
|
-
|
|
7640
|
+
contentExpandedClassName: "!p-2",
|
|
7641
|
+
children: equalSizeGroups([...DateUtils.monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx6("div", { className: "flex-row-1", children: monthList.map((month) => {
|
|
7642
|
+
const monthIndex = DateUtils.monthsList.indexOf(month);
|
|
7574
7643
|
const newDate = new Date(year, monthIndex);
|
|
7575
7644
|
const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
|
|
7576
7645
|
const firstOfMonth = new Date(year, monthIndex, 1);
|
|
@@ -7869,7 +7938,7 @@ var TimePicker = ({
|
|
|
7869
7938
|
transformer(newDate);
|
|
7870
7939
|
onChange?.(newDate);
|
|
7871
7940
|
};
|
|
7872
|
-
return /* @__PURE__ */ jsxs7("div", { className: clsx8("flex-row-2
|
|
7941
|
+
return /* @__PURE__ */ jsxs7("div", { className: clsx8("flex-row-2 select-none overflow-hidden", className), children: [
|
|
7873
7942
|
/* @__PURE__ */ jsx9("div", { className: "flex-col-1 h-full overflow-y-auto min-w-16", children: hours.map((hour) => {
|
|
7874
7943
|
const isSelected = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
|
|
7875
7944
|
return /* @__PURE__ */ jsx9(
|
|
@@ -10219,7 +10288,9 @@ function CarouselTabs({
|
|
|
10219
10288
|
"button",
|
|
10220
10289
|
{
|
|
10221
10290
|
id: `${id}-tab-${index}`,
|
|
10222
|
-
ref: (el) =>
|
|
10291
|
+
ref: (el) => {
|
|
10292
|
+
tabRefs.current[index] = el;
|
|
10293
|
+
},
|
|
10223
10294
|
onClick: () => onChange(index),
|
|
10224
10295
|
onKeyDown: (e) => handleKeyDown(e, index),
|
|
10225
10296
|
className: clsx19(
|
|
@@ -11165,7 +11236,9 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
|
|
|
11165
11236
|
"aria-controls": `${t.id}-panel`,
|
|
11166
11237
|
id: `${t.id}-tab`,
|
|
11167
11238
|
tabIndex: active === t.id ? 0 : -1,
|
|
11168
|
-
ref: (el) =>
|
|
11239
|
+
ref: (el) => {
|
|
11240
|
+
buttonRefs.current[t.id] = el;
|
|
11241
|
+
},
|
|
11169
11242
|
onClick: () => setActive(t.id),
|
|
11170
11243
|
onKeyDown: (e) => onKeyDown(e, t.id),
|
|
11171
11244
|
className: clsx24(
|
|
@@ -11304,6 +11377,14 @@ var VerticalDivider = ({
|
|
|
11304
11377
|
) });
|
|
11305
11378
|
};
|
|
11306
11379
|
|
|
11380
|
+
// src/components/layout/Visibility.tsx
|
|
11381
|
+
function Visibility({ children, isVisible }) {
|
|
11382
|
+
if (isVisible) {
|
|
11383
|
+
return children;
|
|
11384
|
+
}
|
|
11385
|
+
return void 0;
|
|
11386
|
+
}
|
|
11387
|
+
|
|
11307
11388
|
// src/components/loading-states/ErrorComponent.tsx
|
|
11308
11389
|
import { AlertOctagon } from "lucide-react";
|
|
11309
11390
|
import clsx26 from "clsx";
|
|
@@ -11485,7 +11566,7 @@ var NavigationItemWithSubItem = ({
|
|
|
11485
11566
|
...options
|
|
11486
11567
|
}) => {
|
|
11487
11568
|
const [isOpen, setOpen] = useState21(false);
|
|
11488
|
-
const containerRef = useRef11();
|
|
11569
|
+
const containerRef = useRef11(null);
|
|
11489
11570
|
const triggerRef = useRef11(null);
|
|
11490
11571
|
const id = useId8();
|
|
11491
11572
|
const style = useFloatingElement({
|
|
@@ -12399,8 +12480,8 @@ var TableFilters = {
|
|
|
12399
12480
|
};
|
|
12400
12481
|
|
|
12401
12482
|
// src/components/table/Table.tsx
|
|
12402
|
-
import { useCallback as useCallback12, useEffect as useEffect27, useMemo as useMemo7, useRef as
|
|
12403
|
-
import
|
|
12483
|
+
import { useCallback as useCallback12, useEffect as useEffect27, useMemo as useMemo7, useRef as useRef14, useState as useState27 } from "react";
|
|
12484
|
+
import clsx48 from "clsx";
|
|
12404
12485
|
import {
|
|
12405
12486
|
flexRender,
|
|
12406
12487
|
getCoreRowModel,
|
|
@@ -12433,43 +12514,181 @@ var useResizeCallbackWrapper = (callback) => {
|
|
|
12433
12514
|
|
|
12434
12515
|
// src/components/table/TableSortButton.tsx
|
|
12435
12516
|
import { ChevronDown as ChevronDown3, ChevronsUpDown, ChevronUp } from "lucide-react";
|
|
12436
|
-
import
|
|
12437
|
-
|
|
12517
|
+
import clsx46 from "clsx";
|
|
12518
|
+
|
|
12519
|
+
// src/components/user-action/Tooltip.tsx
|
|
12520
|
+
import { useRef as useRef12, useState as useState23 } from "react";
|
|
12521
|
+
import { clsx as clsx45 } from "clsx";
|
|
12522
|
+
import { createPortal as createPortal4 } from "react-dom";
|
|
12523
|
+
import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
12524
|
+
var Tooltip = ({
|
|
12525
|
+
tooltip,
|
|
12526
|
+
children,
|
|
12527
|
+
appearDelay = 400,
|
|
12528
|
+
disappearDelay = 50,
|
|
12529
|
+
tooltipClassName = "",
|
|
12530
|
+
containerClassName = "",
|
|
12531
|
+
position = "bottom",
|
|
12532
|
+
disabled = false
|
|
12533
|
+
}) => {
|
|
12534
|
+
const [state, setState] = useState23({
|
|
12535
|
+
isShown: false,
|
|
12536
|
+
timer: null
|
|
12537
|
+
});
|
|
12538
|
+
const { isShown } = state;
|
|
12539
|
+
const anchorRef = useRef12(null);
|
|
12540
|
+
const containerRef = useRef12(null);
|
|
12541
|
+
const triangleRef = useRef12(null);
|
|
12542
|
+
const triangleSize = 0.375;
|
|
12543
|
+
const triangleClasses = {
|
|
12544
|
+
top: `border-t-tooltip-background border-l-transparent border-r-transparent`,
|
|
12545
|
+
bottom: `border-b-tooltip-background border-l-transparent border-r-transparent`,
|
|
12546
|
+
left: `border-l-tooltip-background border-t-transparent border-b-transparent`,
|
|
12547
|
+
right: `border-r-tooltip-background border-t-transparent border-b-transparent`
|
|
12548
|
+
};
|
|
12549
|
+
const triangleStyle = {
|
|
12550
|
+
top: { borderWidth: `${triangleSize}rem ${triangleSize}rem 0 ${triangleSize}rem`, transform: `translate(0,${triangleSize}rem)` },
|
|
12551
|
+
bottom: { borderWidth: `0 ${triangleSize}rem ${triangleSize}rem ${triangleSize}rem`, transform: `translate(0,-${triangleSize}rem)` },
|
|
12552
|
+
left: { borderWidth: `${triangleSize}rem 0 ${triangleSize}rem ${triangleSize}rem`, transform: `translate(${triangleSize}rem,0)` },
|
|
12553
|
+
right: { borderWidth: `${triangleSize}rem ${triangleSize}rem ${triangleSize}rem 0`, transform: `translate(-${triangleSize}rem,0)` }
|
|
12554
|
+
};
|
|
12555
|
+
const isActive = !disabled && isShown;
|
|
12556
|
+
const css = useFloatingElement({
|
|
12557
|
+
active: isActive,
|
|
12558
|
+
anchorRef,
|
|
12559
|
+
containerRef,
|
|
12560
|
+
horizontalAlignment: position === "left" ? "beforeStart" : position === "right" ? "afterEnd" : "center",
|
|
12561
|
+
verticalAlignment: position === "top" ? "beforeStart" : position === "bottom" ? "afterEnd" : "center"
|
|
12562
|
+
});
|
|
12563
|
+
const cssTriangle = useFloatingElement({
|
|
12564
|
+
active: isActive,
|
|
12565
|
+
anchorRef,
|
|
12566
|
+
containerRef: triangleRef,
|
|
12567
|
+
horizontalAlignment: position === "left" ? "beforeStart" : position === "right" ? "afterEnd" : "center",
|
|
12568
|
+
verticalAlignment: position === "top" ? "beforeStart" : position === "bottom" ? "afterEnd" : "center"
|
|
12569
|
+
});
|
|
12570
|
+
const zIndex = useZIndexRegister(isActive);
|
|
12571
|
+
const zIndexTriangle = useZIndexRegister(isActive);
|
|
12572
|
+
return /* @__PURE__ */ jsxs35(
|
|
12573
|
+
"div",
|
|
12574
|
+
{
|
|
12575
|
+
ref: anchorRef,
|
|
12576
|
+
className: clsx45("relative inline-block", containerClassName),
|
|
12577
|
+
onMouseEnter: () => setState((prevState) => {
|
|
12578
|
+
clearTimeout(prevState.timer);
|
|
12579
|
+
return {
|
|
12580
|
+
...prevState,
|
|
12581
|
+
timer: setTimeout(() => {
|
|
12582
|
+
setState((prevState2) => {
|
|
12583
|
+
clearTimeout(prevState2.timer);
|
|
12584
|
+
return { isShown: true, timer: null };
|
|
12585
|
+
});
|
|
12586
|
+
}, appearDelay)
|
|
12587
|
+
};
|
|
12588
|
+
}),
|
|
12589
|
+
onMouseLeave: () => setState((prevState) => {
|
|
12590
|
+
clearTimeout(prevState.timer);
|
|
12591
|
+
return {
|
|
12592
|
+
...prevState,
|
|
12593
|
+
timer: setTimeout(() => {
|
|
12594
|
+
setState((prevState2) => {
|
|
12595
|
+
clearTimeout(prevState2.timer);
|
|
12596
|
+
return { isShown: false, timer: null };
|
|
12597
|
+
});
|
|
12598
|
+
}, disappearDelay)
|
|
12599
|
+
};
|
|
12600
|
+
}),
|
|
12601
|
+
children: [
|
|
12602
|
+
children,
|
|
12603
|
+
/* @__PURE__ */ jsxs35(Visibility, { isVisible: isActive, children: [
|
|
12604
|
+
createPortal4(
|
|
12605
|
+
/* @__PURE__ */ jsx56(
|
|
12606
|
+
"div",
|
|
12607
|
+
{
|
|
12608
|
+
ref: containerRef,
|
|
12609
|
+
className: clsx45(
|
|
12610
|
+
`opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded
|
|
12611
|
+
animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
|
|
12612
|
+
tooltipClassName
|
|
12613
|
+
),
|
|
12614
|
+
style: { ...css, zIndex, animationDelay: appearDelay + "ms" },
|
|
12615
|
+
children: tooltip
|
|
12616
|
+
}
|
|
12617
|
+
),
|
|
12618
|
+
document.body
|
|
12619
|
+
),
|
|
12620
|
+
createPortal4(
|
|
12621
|
+
/* @__PURE__ */ jsx56(
|
|
12622
|
+
"div",
|
|
12623
|
+
{
|
|
12624
|
+
ref: triangleRef,
|
|
12625
|
+
className: clsx45(`absolute w-0 h-0 opacity-0 animate-tooltip-fade-in`, triangleClasses[position]),
|
|
12626
|
+
style: {
|
|
12627
|
+
...cssTriangle,
|
|
12628
|
+
...triangleStyle[position],
|
|
12629
|
+
zIndex: zIndexTriangle,
|
|
12630
|
+
animationDelay: appearDelay + "ms"
|
|
12631
|
+
}
|
|
12632
|
+
}
|
|
12633
|
+
),
|
|
12634
|
+
document.body
|
|
12635
|
+
)
|
|
12636
|
+
] })
|
|
12637
|
+
]
|
|
12638
|
+
}
|
|
12639
|
+
);
|
|
12640
|
+
};
|
|
12641
|
+
|
|
12642
|
+
// src/components/table/TableSortButton.tsx
|
|
12643
|
+
import { jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
12438
12644
|
var TableSortButton = ({
|
|
12439
12645
|
sortDirection,
|
|
12440
12646
|
invert = false,
|
|
12441
12647
|
color = "neutral",
|
|
12442
12648
|
size = "tiny",
|
|
12443
12649
|
className,
|
|
12444
|
-
|
|
12650
|
+
sortingIndexDisplay,
|
|
12651
|
+
...props
|
|
12445
12652
|
}) => {
|
|
12446
|
-
|
|
12653
|
+
const translation = useHightideTranslation();
|
|
12654
|
+
const { sortingsCount, index } = sortingIndexDisplay;
|
|
12655
|
+
let icon = /* @__PURE__ */ jsx57(ChevronsUpDown, { className: "size-4" });
|
|
12447
12656
|
if (sortDirection) {
|
|
12448
12657
|
let usedSortDirection = sortDirection;
|
|
12449
12658
|
if (invert) {
|
|
12450
12659
|
usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
|
|
12451
12660
|
}
|
|
12452
|
-
icon = usedSortDirection === "asc" ? /* @__PURE__ */
|
|
12661
|
+
icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx57(ChevronUp, { className: "size-4" }) : /* @__PURE__ */ jsx57(ChevronDown3, { className: "size-4" });
|
|
12453
12662
|
}
|
|
12454
|
-
|
|
12663
|
+
const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
|
|
12664
|
+
return /* @__PURE__ */ jsx57(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ jsxs36(
|
|
12455
12665
|
Button,
|
|
12456
12666
|
{
|
|
12457
|
-
layout: "icon",
|
|
12667
|
+
layout: hasSortingIndex ? "default" : "icon",
|
|
12458
12668
|
color,
|
|
12459
12669
|
size,
|
|
12460
|
-
className:
|
|
12461
|
-
...
|
|
12462
|
-
children:
|
|
12670
|
+
className: clsx46("relative", className),
|
|
12671
|
+
...props,
|
|
12672
|
+
children: [
|
|
12673
|
+
/* @__PURE__ */ jsx57(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ jsx57(
|
|
12674
|
+
"div",
|
|
12675
|
+
{
|
|
12676
|
+
className: clsx46("absolute bottom-0 right-1/2 translate-x-1/2 translate-y-2/3 z-1 primary coloring-solid rounded-full h-4 w-5 text-sm"),
|
|
12677
|
+
children: `${index}.`
|
|
12678
|
+
}
|
|
12679
|
+
) }),
|
|
12680
|
+
icon
|
|
12681
|
+
]
|
|
12463
12682
|
}
|
|
12464
|
-
);
|
|
12683
|
+
) });
|
|
12465
12684
|
};
|
|
12466
12685
|
|
|
12467
12686
|
// src/components/table/TableFilterButton.tsx
|
|
12468
12687
|
import { FilterIcon } from "lucide-react";
|
|
12469
12688
|
|
|
12470
12689
|
// src/components/user-action/Menu.tsx
|
|
12471
|
-
import { useEffect as useEffect25, useRef as
|
|
12472
|
-
import
|
|
12690
|
+
import { useEffect as useEffect25, useRef as useRef13, useState as useState25 } from "react";
|
|
12691
|
+
import clsx47 from "clsx";
|
|
12473
12692
|
|
|
12474
12693
|
// src/utils/bagFunctions.ts
|
|
12475
12694
|
var resolve = (children, bag) => {
|
|
@@ -12483,7 +12702,7 @@ var BagFunctionUtil = {
|
|
|
12483
12702
|
};
|
|
12484
12703
|
|
|
12485
12704
|
// src/components/user-action/Menu.tsx
|
|
12486
|
-
import { createPortal as
|
|
12705
|
+
import { createPortal as createPortal5 } from "react-dom";
|
|
12487
12706
|
|
|
12488
12707
|
// src/hooks/usePopoverPosition.ts
|
|
12489
12708
|
var defaultPopoverPositionOptions = {
|
|
@@ -12540,15 +12759,15 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
12540
12759
|
};
|
|
12541
12760
|
|
|
12542
12761
|
// src/hooks/useHoverState.ts
|
|
12543
|
-
import { useEffect as useEffect23, useState as
|
|
12762
|
+
import { useEffect as useEffect23, useState as useState24 } from "react";
|
|
12544
12763
|
var defaultUseHoverStateProps = {
|
|
12545
12764
|
closingDelay: 200,
|
|
12546
12765
|
isDisabled: false
|
|
12547
12766
|
};
|
|
12548
12767
|
var useHoverState = (props = void 0) => {
|
|
12549
12768
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
12550
|
-
const [isHovered, setIsHovered] =
|
|
12551
|
-
const [timer, setTimer] =
|
|
12769
|
+
const [isHovered, setIsHovered] = useState24(false);
|
|
12770
|
+
const [timer, setTimer] = useState24();
|
|
12552
12771
|
const onMouseEnter = () => {
|
|
12553
12772
|
if (isDisabled) {
|
|
12554
12773
|
return;
|
|
@@ -12604,17 +12823,17 @@ var useOutsideClick = (refs, handler) => {
|
|
|
12604
12823
|
};
|
|
12605
12824
|
|
|
12606
12825
|
// src/components/user-action/Menu.tsx
|
|
12607
|
-
import { Fragment as Fragment6, jsx as
|
|
12826
|
+
import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12608
12827
|
var MenuItem = ({
|
|
12609
12828
|
children,
|
|
12610
12829
|
onClick,
|
|
12611
12830
|
alignment = "left",
|
|
12612
12831
|
isDisabled = false,
|
|
12613
12832
|
className
|
|
12614
|
-
}) => /* @__PURE__ */
|
|
12833
|
+
}) => /* @__PURE__ */ jsx58(
|
|
12615
12834
|
"div",
|
|
12616
12835
|
{
|
|
12617
|
-
className:
|
|
12836
|
+
className: clsx47("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
|
|
12618
12837
|
"text-right": alignment === "right",
|
|
12619
12838
|
"text-left": alignment === "left",
|
|
12620
12839
|
"text-disabled cursor-not-allowed": isDisabled,
|
|
@@ -12644,10 +12863,10 @@ var Menu = ({
|
|
|
12644
12863
|
menuClassName = ""
|
|
12645
12864
|
}) => {
|
|
12646
12865
|
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
12647
|
-
const triggerRef =
|
|
12648
|
-
const menuRef =
|
|
12866
|
+
const triggerRef = useRef13(null);
|
|
12867
|
+
const menuRef = useRef13(null);
|
|
12649
12868
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
12650
|
-
const [isHidden, setIsHidden] =
|
|
12869
|
+
const [isHidden, setIsHidden] = useState25(true);
|
|
12651
12870
|
const bag = {
|
|
12652
12871
|
isOpen,
|
|
12653
12872
|
close: () => setIsOpen(false),
|
|
@@ -12681,14 +12900,14 @@ var Menu = ({
|
|
|
12681
12900
|
}
|
|
12682
12901
|
}, [isOpen]);
|
|
12683
12902
|
const zIndex = useZIndexRegister(isOpen);
|
|
12684
|
-
return /* @__PURE__ */
|
|
12903
|
+
return /* @__PURE__ */ jsxs37(Fragment6, { children: [
|
|
12685
12904
|
trigger(bag, triggerRef),
|
|
12686
|
-
|
|
12905
|
+
createPortal5(/* @__PURE__ */ jsx58(
|
|
12687
12906
|
"div",
|
|
12688
12907
|
{
|
|
12689
12908
|
ref: menuRef,
|
|
12690
12909
|
onClick: (e) => e.stopPropagation(),
|
|
12691
|
-
className:
|
|
12910
|
+
className: clsx47(
|
|
12692
12911
|
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
|
|
12693
12912
|
{
|
|
12694
12913
|
"animate-pop-in": isOpen,
|
|
@@ -12713,34 +12932,34 @@ var Menu = ({
|
|
|
12713
12932
|
};
|
|
12714
12933
|
|
|
12715
12934
|
// src/components/table/TableFilterButton.tsx
|
|
12716
|
-
import { useEffect as useEffect26, useState as
|
|
12717
|
-
import { Fragment as Fragment7, jsx as
|
|
12935
|
+
import { useEffect as useEffect26, useState as useState26 } from "react";
|
|
12936
|
+
import { Fragment as Fragment7, jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12718
12937
|
var TableFilterButton = ({
|
|
12719
12938
|
filterType,
|
|
12720
12939
|
column
|
|
12721
12940
|
}) => {
|
|
12722
12941
|
const translation = useHightideTranslation();
|
|
12723
12942
|
const columnFilterValue = column.getFilterValue();
|
|
12724
|
-
const [filterValue, setFilterValue] =
|
|
12943
|
+
const [filterValue, setFilterValue] = useState26(columnFilterValue);
|
|
12725
12944
|
const hasFilter = !!filterValue;
|
|
12726
12945
|
useEffect26(() => {
|
|
12727
12946
|
setFilterValue(columnFilterValue);
|
|
12728
12947
|
}, [columnFilterValue]);
|
|
12729
|
-
return /* @__PURE__ */
|
|
12948
|
+
return /* @__PURE__ */ jsx59(
|
|
12730
12949
|
Menu,
|
|
12731
12950
|
{
|
|
12732
|
-
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */
|
|
12733
|
-
/* @__PURE__ */
|
|
12951
|
+
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs38("div", { ref, className: "relative", children: [
|
|
12952
|
+
/* @__PURE__ */ jsx59(
|
|
12734
12953
|
Button,
|
|
12735
12954
|
{
|
|
12736
12955
|
layout: "icon",
|
|
12737
12956
|
color: "neutral",
|
|
12738
12957
|
size: "tiny",
|
|
12739
12958
|
onClick: toggleOpen,
|
|
12740
|
-
children: /* @__PURE__ */
|
|
12959
|
+
children: /* @__PURE__ */ jsx59(FilterIcon, { className: "size-4" })
|
|
12741
12960
|
}
|
|
12742
12961
|
),
|
|
12743
|
-
hasFilter && /* @__PURE__ */
|
|
12962
|
+
hasFilter && /* @__PURE__ */ jsx59(
|
|
12744
12963
|
"div",
|
|
12745
12964
|
{
|
|
12746
12965
|
className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
|
|
@@ -12748,9 +12967,9 @@ var TableFilterButton = ({
|
|
|
12748
12967
|
}
|
|
12749
12968
|
)
|
|
12750
12969
|
] }),
|
|
12751
|
-
children: ({ close }) => /* @__PURE__ */
|
|
12752
|
-
/* @__PURE__ */
|
|
12753
|
-
filterType === "text" && /* @__PURE__ */
|
|
12970
|
+
children: ({ close }) => /* @__PURE__ */ jsxs38("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
12971
|
+
/* @__PURE__ */ jsx59("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
|
|
12972
|
+
filterType === "text" && /* @__PURE__ */ jsx59(
|
|
12754
12973
|
Input,
|
|
12755
12974
|
{
|
|
12756
12975
|
value: filterValue ?? "",
|
|
@@ -12760,8 +12979,8 @@ var TableFilterButton = ({
|
|
|
12760
12979
|
className: "h-10"
|
|
12761
12980
|
}
|
|
12762
12981
|
),
|
|
12763
|
-
filterType === "range" && /* @__PURE__ */
|
|
12764
|
-
/* @__PURE__ */
|
|
12982
|
+
filterType === "range" && /* @__PURE__ */ jsxs38("div", { className: "flex-row-2 items-center", children: [
|
|
12983
|
+
/* @__PURE__ */ jsx59(
|
|
12765
12984
|
Input,
|
|
12766
12985
|
{
|
|
12767
12986
|
value: filterValue?.[0] ?? "",
|
|
@@ -12774,8 +12993,8 @@ var TableFilterButton = ({
|
|
|
12774
12993
|
className: "h-10 input-indicator-hidden w-40"
|
|
12775
12994
|
}
|
|
12776
12995
|
),
|
|
12777
|
-
/* @__PURE__ */
|
|
12778
|
-
/* @__PURE__ */
|
|
12996
|
+
/* @__PURE__ */ jsx59("span", { className: "font-bold", children: "-" }),
|
|
12997
|
+
/* @__PURE__ */ jsx59(
|
|
12779
12998
|
Input,
|
|
12780
12999
|
{
|
|
12781
13000
|
value: filterValue?.[1] ?? "",
|
|
@@ -12789,8 +13008,8 @@ var TableFilterButton = ({
|
|
|
12789
13008
|
}
|
|
12790
13009
|
)
|
|
12791
13010
|
] }),
|
|
12792
|
-
filterType === "dateRange" && /* @__PURE__ */
|
|
12793
|
-
/* @__PURE__ */
|
|
13011
|
+
filterType === "dateRange" && /* @__PURE__ */ jsxs38(Fragment7, { children: [
|
|
13012
|
+
/* @__PURE__ */ jsx59(
|
|
12794
13013
|
Input,
|
|
12795
13014
|
{
|
|
12796
13015
|
value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
|
|
@@ -12803,7 +13022,7 @@ var TableFilterButton = ({
|
|
|
12803
13022
|
className: "h-10 w-50"
|
|
12804
13023
|
}
|
|
12805
13024
|
),
|
|
12806
|
-
/* @__PURE__ */
|
|
13025
|
+
/* @__PURE__ */ jsx59(
|
|
12807
13026
|
Input,
|
|
12808
13027
|
{
|
|
12809
13028
|
value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
|
|
@@ -12817,12 +13036,12 @@ var TableFilterButton = ({
|
|
|
12817
13036
|
}
|
|
12818
13037
|
)
|
|
12819
13038
|
] }),
|
|
12820
|
-
/* @__PURE__ */
|
|
12821
|
-
hasFilter && /* @__PURE__ */
|
|
13039
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
13040
|
+
hasFilter && /* @__PURE__ */ jsx59(Button, { color: "negative", size: "small", onClick: () => {
|
|
12822
13041
|
column.setFilterValue(void 0);
|
|
12823
13042
|
close();
|
|
12824
13043
|
}, children: translation("remove") }),
|
|
12825
|
-
/* @__PURE__ */
|
|
13044
|
+
/* @__PURE__ */ jsx59(Button, { size: "small", onClick: () => {
|
|
12826
13045
|
column.setFilterValue(filterValue);
|
|
12827
13046
|
close();
|
|
12828
13047
|
}, children: translation("apply") })
|
|
@@ -12833,7 +13052,7 @@ var TableFilterButton = ({
|
|
|
12833
13052
|
};
|
|
12834
13053
|
|
|
12835
13054
|
// src/components/table/Table.tsx
|
|
12836
|
-
import { jsx as
|
|
13055
|
+
import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12837
13056
|
var Table = ({
|
|
12838
13057
|
data,
|
|
12839
13058
|
fillerRow,
|
|
@@ -12847,21 +13066,21 @@ var Table = ({
|
|
|
12847
13066
|
columns,
|
|
12848
13067
|
...tableOptions
|
|
12849
13068
|
}) => {
|
|
12850
|
-
const ref =
|
|
12851
|
-
const tableRef =
|
|
12852
|
-
const [columnSizing, setColumnSizing] =
|
|
13069
|
+
const ref = useRef14(null);
|
|
13070
|
+
const tableRef = useRef14(null);
|
|
13071
|
+
const [columnSizing, setColumnSizing] = useState27(columns.reduce((previousValue, currentValue) => {
|
|
12853
13072
|
return {
|
|
12854
13073
|
...previousValue,
|
|
12855
13074
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
12856
13075
|
};
|
|
12857
13076
|
}, {}));
|
|
12858
|
-
const [columnSizingInfo, setColumnSizingInfo] =
|
|
12859
|
-
const [pagination, setPagination] =
|
|
13077
|
+
const [columnSizingInfo, setColumnSizingInfo] = useState27();
|
|
13078
|
+
const [pagination, setPagination] = useState27({
|
|
12860
13079
|
pageSize: 10,
|
|
12861
13080
|
pageIndex: 0,
|
|
12862
13081
|
...initialState?.pagination
|
|
12863
13082
|
});
|
|
12864
|
-
const [columnFilters, setColumnFilters] =
|
|
13083
|
+
const [columnFilters, setColumnFilters] = useState27(initialState?.columnFilters);
|
|
12865
13084
|
const computedColumnMinWidths = useMemo7(() => {
|
|
12866
13085
|
return columns.reduce((previousValue, column) => {
|
|
12867
13086
|
return {
|
|
@@ -12953,7 +13172,7 @@ var Table = ({
|
|
|
12953
13172
|
minSize: 60,
|
|
12954
13173
|
maxSize: 700,
|
|
12955
13174
|
cell: ({ cell }) => {
|
|
12956
|
-
return /* @__PURE__ */
|
|
13175
|
+
return /* @__PURE__ */ jsx60(TableCell, { children: cell.getValue() });
|
|
12957
13176
|
},
|
|
12958
13177
|
...defaultColumn
|
|
12959
13178
|
},
|
|
@@ -13001,7 +13220,7 @@ var Table = ({
|
|
|
13001
13220
|
columnResizeMode: "onChange",
|
|
13002
13221
|
...tableOptions
|
|
13003
13222
|
});
|
|
13004
|
-
const [hasInitializedSizing, setHasInitializedSizing] =
|
|
13223
|
+
const [hasInitializedSizing, setHasInitializedSizing] = useState27(false);
|
|
13005
13224
|
useEffect27(() => {
|
|
13006
13225
|
if (!hasInitializedSizing && ref.current) {
|
|
13007
13226
|
setHasInitializedSizing(true);
|
|
@@ -13038,18 +13257,18 @@ var Table = ({
|
|
|
13038
13257
|
}
|
|
13039
13258
|
return colSizes;
|
|
13040
13259
|
}, [table.getState().columnSizingInfo, table.getState().columnSizing]);
|
|
13041
|
-
return /* @__PURE__ */
|
|
13042
|
-
/* @__PURE__ */
|
|
13260
|
+
return /* @__PURE__ */ jsxs39("div", { ref, className: clsx48("flex-col-4", className), children: [
|
|
13261
|
+
/* @__PURE__ */ jsx60("div", { className: clsx48("flex-col-0 w-full overflow-auto", tableContainerClassName), children: /* @__PURE__ */ jsxs39(
|
|
13043
13262
|
"table",
|
|
13044
13263
|
{
|
|
13045
13264
|
ref: tableRef,
|
|
13046
|
-
className:
|
|
13265
|
+
className: clsx48(tableClassName),
|
|
13047
13266
|
style: {
|
|
13048
13267
|
...columnSizeVars,
|
|
13049
13268
|
width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
|
|
13050
13269
|
},
|
|
13051
13270
|
children: [
|
|
13052
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */
|
|
13271
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx60("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx60(
|
|
13053
13272
|
"col",
|
|
13054
13273
|
{
|
|
13055
13274
|
style: {
|
|
@@ -13060,18 +13279,22 @@ var Table = ({
|
|
|
13060
13279
|
},
|
|
13061
13280
|
header.id
|
|
13062
13281
|
)) }, headerGroup.id)),
|
|
13063
|
-
/* @__PURE__ */
|
|
13064
|
-
return /* @__PURE__ */
|
|
13282
|
+
/* @__PURE__ */ jsx60("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx60("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
|
|
13283
|
+
return /* @__PURE__ */ jsxs39(
|
|
13065
13284
|
"th",
|
|
13066
13285
|
{
|
|
13067
13286
|
colSpan: header.colSpan,
|
|
13068
|
-
className:
|
|
13287
|
+
className: clsx48("relative group", header.column.columnDef.meta?.className),
|
|
13069
13288
|
children: [
|
|
13070
|
-
/* @__PURE__ */
|
|
13071
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
13289
|
+
/* @__PURE__ */ jsx60("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs39("div", { className: "flex-row-1 items-center", children: [
|
|
13290
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx60(
|
|
13072
13291
|
TableSortButton,
|
|
13073
13292
|
{
|
|
13074
13293
|
sortDirection: header.column.getIsSorted(),
|
|
13294
|
+
sortingIndexDisplay: {
|
|
13295
|
+
index: header.column.getIsSorted() ? header.column.getSortIndex() + 1 : -1,
|
|
13296
|
+
sortingsCount: table.getState().sorting.length
|
|
13297
|
+
},
|
|
13075
13298
|
onClick: () => {
|
|
13076
13299
|
const sorted = header.column.getIsSorted();
|
|
13077
13300
|
const isMulti = header.column.getCanMultiSort();
|
|
@@ -13090,7 +13313,7 @@ var Table = ({
|
|
|
13090
13313
|
}
|
|
13091
13314
|
}
|
|
13092
13315
|
),
|
|
13093
|
-
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */
|
|
13316
|
+
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx60(
|
|
13094
13317
|
TableFilterButton,
|
|
13095
13318
|
{
|
|
13096
13319
|
column: header.column,
|
|
@@ -13102,7 +13325,7 @@ var Table = ({
|
|
|
13102
13325
|
header.getContext()
|
|
13103
13326
|
)
|
|
13104
13327
|
] }) }),
|
|
13105
|
-
header.column.getCanResize() && /* @__PURE__ */
|
|
13328
|
+
header.column.getCanResize() && /* @__PURE__ */ jsx60(
|
|
13106
13329
|
"div",
|
|
13107
13330
|
{
|
|
13108
13331
|
onMouseDown: header.getResizeHandler(),
|
|
@@ -13121,15 +13344,15 @@ var Table = ({
|
|
|
13121
13344
|
header.id
|
|
13122
13345
|
);
|
|
13123
13346
|
}) }, headerGroup.id)) }),
|
|
13124
|
-
/* @__PURE__ */
|
|
13347
|
+
/* @__PURE__ */ jsxs39("tbody", { children: [
|
|
13125
13348
|
table.getRowModel().rows.map((row) => {
|
|
13126
|
-
return /* @__PURE__ */
|
|
13349
|
+
return /* @__PURE__ */ jsx60(
|
|
13127
13350
|
"tr",
|
|
13128
13351
|
{
|
|
13129
13352
|
onClick: () => onRowClick?.(row, table),
|
|
13130
13353
|
className: table.options.meta?.bodyRowClassName,
|
|
13131
13354
|
children: row.getVisibleCells().map((cell) => {
|
|
13132
|
-
return /* @__PURE__ */
|
|
13355
|
+
return /* @__PURE__ */ jsx60("td", { children: flexRender(
|
|
13133
13356
|
cell.column.columnDef.cell,
|
|
13134
13357
|
cell.getContext()
|
|
13135
13358
|
) }, cell.id);
|
|
@@ -13139,15 +13362,15 @@ var Table = ({
|
|
|
13139
13362
|
);
|
|
13140
13363
|
}),
|
|
13141
13364
|
range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
|
|
13142
|
-
return /* @__PURE__ */
|
|
13143
|
-
return /* @__PURE__ */
|
|
13365
|
+
return /* @__PURE__ */ jsx60("tr", { children: columns.map((column) => {
|
|
13366
|
+
return /* @__PURE__ */ jsx60("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx60(FillerRowElement, {}) }, column.id);
|
|
13144
13367
|
}) }, "filler-row-" + index);
|
|
13145
13368
|
})
|
|
13146
13369
|
] })
|
|
13147
13370
|
]
|
|
13148
13371
|
}
|
|
13149
13372
|
) }),
|
|
13150
|
-
/* @__PURE__ */
|
|
13373
|
+
/* @__PURE__ */ jsx60("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx60(
|
|
13151
13374
|
Pagination,
|
|
13152
13375
|
{
|
|
13153
13376
|
pageIndex: table.getState().pagination.pageIndex,
|
|
@@ -13159,7 +13382,7 @@ var Table = ({
|
|
|
13159
13382
|
};
|
|
13160
13383
|
var TableUncontrolled = ({ data, ...props }) => {
|
|
13161
13384
|
const [usedDate] = useOverwritableState(data);
|
|
13162
|
-
return /* @__PURE__ */
|
|
13385
|
+
return /* @__PURE__ */ jsx60(
|
|
13163
13386
|
Table,
|
|
13164
13387
|
{
|
|
13165
13388
|
...props,
|
|
@@ -13183,7 +13406,7 @@ var TableWithSelection = ({
|
|
|
13183
13406
|
{
|
|
13184
13407
|
id: selectionRowId,
|
|
13185
13408
|
header: ({ table }) => {
|
|
13186
|
-
return /* @__PURE__ */
|
|
13409
|
+
return /* @__PURE__ */ jsx60(
|
|
13187
13410
|
Checkbox,
|
|
13188
13411
|
{
|
|
13189
13412
|
checked: table.getIsAllRowsSelected(),
|
|
@@ -13196,7 +13419,7 @@ var TableWithSelection = ({
|
|
|
13196
13419
|
);
|
|
13197
13420
|
},
|
|
13198
13421
|
cell: ({ row }) => {
|
|
13199
|
-
return /* @__PURE__ */
|
|
13422
|
+
return /* @__PURE__ */ jsx60(
|
|
13200
13423
|
Checkbox,
|
|
13201
13424
|
{
|
|
13202
13425
|
disabled: !row.getCanSelect(),
|
|
@@ -13214,15 +13437,15 @@ var TableWithSelection = ({
|
|
|
13214
13437
|
...columns
|
|
13215
13438
|
];
|
|
13216
13439
|
}, [columns, selectionRowId]);
|
|
13217
|
-
return /* @__PURE__ */
|
|
13440
|
+
return /* @__PURE__ */ jsx60(
|
|
13218
13441
|
Table,
|
|
13219
13442
|
{
|
|
13220
13443
|
columns: columnsWithSelection,
|
|
13221
13444
|
fillerRow: (columnId, table) => {
|
|
13222
13445
|
if (columnId === selectionRowId) {
|
|
13223
|
-
return /* @__PURE__ */
|
|
13446
|
+
return /* @__PURE__ */ jsx60(Checkbox, { checked: false, disabled: true, className: "max-w-6" });
|
|
13224
13447
|
}
|
|
13225
|
-
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */
|
|
13448
|
+
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx60(FillerRowElement, {});
|
|
13226
13449
|
},
|
|
13227
13450
|
state: {
|
|
13228
13451
|
rowSelection,
|
|
@@ -13236,7 +13459,7 @@ var TableWithSelection = ({
|
|
|
13236
13459
|
},
|
|
13237
13460
|
meta: {
|
|
13238
13461
|
...meta,
|
|
13239
|
-
bodyRowClassName:
|
|
13462
|
+
bodyRowClassName: clsx48(
|
|
13240
13463
|
{ "cursor-pointer": !disableClickRowClickSelection },
|
|
13241
13464
|
meta?.bodyRowClassName
|
|
13242
13465
|
)
|
|
@@ -13247,8 +13470,8 @@ var TableWithSelection = ({
|
|
|
13247
13470
|
};
|
|
13248
13471
|
|
|
13249
13472
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
13250
|
-
import { useState as
|
|
13251
|
-
import { clsx as
|
|
13473
|
+
import { useState as useState28 } from "react";
|
|
13474
|
+
import { clsx as clsx49 } from "clsx";
|
|
13252
13475
|
|
|
13253
13476
|
// src/utils/writeToClipboard.ts
|
|
13254
13477
|
var writeToClipboard = (text) => {
|
|
@@ -13257,7 +13480,7 @@ var writeToClipboard = (text) => {
|
|
|
13257
13480
|
|
|
13258
13481
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
13259
13482
|
import { CheckIcon as CheckIcon2, Copy } from "lucide-react";
|
|
13260
|
-
import { jsx as
|
|
13483
|
+
import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
13261
13484
|
var CopyToClipboardWrapper = ({
|
|
13262
13485
|
children,
|
|
13263
13486
|
textToCopy,
|
|
@@ -13267,8 +13490,8 @@ var CopyToClipboardWrapper = ({
|
|
|
13267
13490
|
zIndex = 10
|
|
13268
13491
|
}) => {
|
|
13269
13492
|
const translation = useHightideTranslation();
|
|
13270
|
-
const [isShowingIndication, setIsShowingIndication] =
|
|
13271
|
-
const [isShowingConfirmation, setIsShowingConfirmation] =
|
|
13493
|
+
const [isShowingIndication, setIsShowingIndication] = useState28(false);
|
|
13494
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = useState28(false);
|
|
13272
13495
|
const positionClasses = {
|
|
13273
13496
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
13274
13497
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -13288,10 +13511,10 @@ var CopyToClipboardWrapper = ({
|
|
|
13288
13511
|
left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
|
|
13289
13512
|
right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
|
|
13290
13513
|
};
|
|
13291
|
-
return /* @__PURE__ */
|
|
13514
|
+
return /* @__PURE__ */ jsxs40(
|
|
13292
13515
|
"div",
|
|
13293
13516
|
{
|
|
13294
|
-
className:
|
|
13517
|
+
className: clsx49("relative inline-block cursor-copy", containerClassName),
|
|
13295
13518
|
onMouseEnter: () => {
|
|
13296
13519
|
setIsShowingIndication(true);
|
|
13297
13520
|
},
|
|
@@ -13306,10 +13529,10 @@ var CopyToClipboardWrapper = ({
|
|
|
13306
13529
|
},
|
|
13307
13530
|
children: [
|
|
13308
13531
|
children,
|
|
13309
|
-
/* @__PURE__ */
|
|
13532
|
+
/* @__PURE__ */ jsxs40(
|
|
13310
13533
|
"div",
|
|
13311
13534
|
{
|
|
13312
|
-
className:
|
|
13535
|
+
className: clsx49(
|
|
13313
13536
|
`absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
13314
13537
|
shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
|
|
13315
13538
|
"transition-opacity duration-200",
|
|
@@ -13321,18 +13544,18 @@ var CopyToClipboardWrapper = ({
|
|
|
13321
13544
|
opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
|
|
13322
13545
|
},
|
|
13323
13546
|
children: [
|
|
13324
|
-
isShowingConfirmation && /* @__PURE__ */
|
|
13325
|
-
/* @__PURE__ */
|
|
13547
|
+
isShowingConfirmation && /* @__PURE__ */ jsxs40("div", { className: "flex-row-1", children: [
|
|
13548
|
+
/* @__PURE__ */ jsx61(CheckIcon2, { size: 16, className: "text-positive" }),
|
|
13326
13549
|
translation("copied")
|
|
13327
13550
|
] }),
|
|
13328
|
-
isShowingIndication && /* @__PURE__ */
|
|
13329
|
-
/* @__PURE__ */
|
|
13551
|
+
isShowingIndication && /* @__PURE__ */ jsxs40("div", { className: "flex-row-1 text-description", children: [
|
|
13552
|
+
/* @__PURE__ */ jsx61(Copy, { size: 16 }),
|
|
13330
13553
|
translation("clickToCopy")
|
|
13331
13554
|
] }),
|
|
13332
|
-
/* @__PURE__ */
|
|
13555
|
+
/* @__PURE__ */ jsx61(
|
|
13333
13556
|
"div",
|
|
13334
13557
|
{
|
|
13335
|
-
className:
|
|
13558
|
+
className: clsx49(`absolute w-0 h-0`, triangleClasses[position]),
|
|
13336
13559
|
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
13337
13560
|
}
|
|
13338
13561
|
)
|
|
@@ -13345,30 +13568,27 @@ var CopyToClipboardWrapper = ({
|
|
|
13345
13568
|
};
|
|
13346
13569
|
|
|
13347
13570
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
13348
|
-
import
|
|
13349
|
-
import { jsx as
|
|
13571
|
+
import clsx50 from "clsx";
|
|
13572
|
+
import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
13350
13573
|
var DateTimePicker = ({
|
|
13351
13574
|
value = /* @__PURE__ */ new Date(),
|
|
13352
13575
|
start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
|
|
13353
13576
|
end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
|
|
13354
13577
|
mode = "dateTime",
|
|
13355
|
-
onFinish,
|
|
13356
13578
|
onChange,
|
|
13357
|
-
onRemove,
|
|
13358
13579
|
timePickerProps,
|
|
13359
13580
|
datePickerProps
|
|
13360
13581
|
}) => {
|
|
13361
|
-
const translation = useHightideTranslation();
|
|
13362
13582
|
const useDate = mode === "dateTime" || mode === "date";
|
|
13363
13583
|
const useTime = mode === "dateTime" || mode === "time";
|
|
13364
13584
|
let dateDisplay;
|
|
13365
13585
|
let timeDisplay;
|
|
13366
13586
|
if (useDate) {
|
|
13367
|
-
dateDisplay = /* @__PURE__ */
|
|
13587
|
+
dateDisplay = /* @__PURE__ */ jsx62(
|
|
13368
13588
|
DatePicker,
|
|
13369
13589
|
{
|
|
13370
13590
|
...datePickerProps,
|
|
13371
|
-
className: "min-w-80
|
|
13591
|
+
className: "min-w-80",
|
|
13372
13592
|
yearMonthPickerProps: { className: "h-full grow" },
|
|
13373
13593
|
value,
|
|
13374
13594
|
start,
|
|
@@ -13378,39 +13598,26 @@ var DateTimePicker = ({
|
|
|
13378
13598
|
);
|
|
13379
13599
|
}
|
|
13380
13600
|
if (useTime) {
|
|
13381
|
-
timeDisplay = /* @__PURE__ */
|
|
13601
|
+
timeDisplay = /* @__PURE__ */ jsx62(
|
|
13382
13602
|
TimePicker,
|
|
13383
13603
|
{
|
|
13384
13604
|
...timePickerProps,
|
|
13385
|
-
className:
|
|
13605
|
+
className: clsx50({ "justify-between": mode === "time" }),
|
|
13386
13606
|
time: value,
|
|
13387
13607
|
onChange
|
|
13388
13608
|
}
|
|
13389
13609
|
);
|
|
13390
13610
|
}
|
|
13391
|
-
return /* @__PURE__ */
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
timeDisplay
|
|
13395
|
-
] }),
|
|
13396
|
-
/* @__PURE__ */ jsx61("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ jsxs39("div", { className: "flex-row-2 mt-1", children: [
|
|
13397
|
-
/* @__PURE__ */ jsx61(Button, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
13398
|
-
/* @__PURE__ */ jsx61(
|
|
13399
|
-
Button,
|
|
13400
|
-
{
|
|
13401
|
-
size: "medium",
|
|
13402
|
-
onClick: () => onFinish?.(value),
|
|
13403
|
-
children: translation("change")
|
|
13404
|
-
}
|
|
13405
|
-
)
|
|
13406
|
-
] }) })
|
|
13611
|
+
return /* @__PURE__ */ jsxs41("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
|
|
13612
|
+
dateDisplay,
|
|
13613
|
+
timeDisplay
|
|
13407
13614
|
] });
|
|
13408
13615
|
};
|
|
13409
13616
|
|
|
13410
13617
|
// src/components/user-action/ScrollPicker.tsx
|
|
13411
|
-
import { useCallback as useCallback13, useEffect as useEffect28, useState as
|
|
13412
|
-
import
|
|
13413
|
-
import { jsx as
|
|
13618
|
+
import { useCallback as useCallback13, useEffect as useEffect28, useState as useState29 } from "react";
|
|
13619
|
+
import clsx51 from "clsx";
|
|
13620
|
+
import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
13414
13621
|
var up = 1;
|
|
13415
13622
|
var down = -1;
|
|
13416
13623
|
var ScrollPicker = ({
|
|
@@ -13429,7 +13636,7 @@ var ScrollPicker = ({
|
|
|
13429
13636
|
transition,
|
|
13430
13637
|
items,
|
|
13431
13638
|
lastTimeStamp
|
|
13432
|
-
}, setAnimation] =
|
|
13639
|
+
}, setAnimation] = useState29({
|
|
13433
13640
|
targetIndex: selectedIndex,
|
|
13434
13641
|
currentIndex: disabled ? selectedIndex : 0,
|
|
13435
13642
|
velocity: 0,
|
|
@@ -13549,7 +13756,7 @@ var ScrollPicker = ({
|
|
|
13549
13756
|
}
|
|
13550
13757
|
return clamp(1 - opacityValue / max);
|
|
13551
13758
|
};
|
|
13552
|
-
return /* @__PURE__ */
|
|
13759
|
+
return /* @__PURE__ */ jsx63(
|
|
13553
13760
|
"div",
|
|
13554
13761
|
{
|
|
13555
13762
|
className: "relative overflow-hidden",
|
|
@@ -13560,15 +13767,15 @@ var ScrollPicker = ({
|
|
|
13560
13767
|
setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + deltaY }));
|
|
13561
13768
|
}
|
|
13562
13769
|
},
|
|
13563
|
-
children: /* @__PURE__ */
|
|
13564
|
-
/* @__PURE__ */
|
|
13770
|
+
children: /* @__PURE__ */ jsxs42("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
|
|
13771
|
+
/* @__PURE__ */ jsx63(
|
|
13565
13772
|
"div",
|
|
13566
13773
|
{
|
|
13567
13774
|
className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/50 border-y-2 border-x-0 ",
|
|
13568
13775
|
style: { height: `${itemHeight}px` }
|
|
13569
13776
|
}
|
|
13570
13777
|
),
|
|
13571
|
-
/* @__PURE__ */
|
|
13778
|
+
/* @__PURE__ */ jsx63(
|
|
13572
13779
|
"div",
|
|
13573
13780
|
{
|
|
13574
13781
|
className: "flex-col-2 select-none",
|
|
@@ -13576,10 +13783,10 @@ var ScrollPicker = ({
|
|
|
13576
13783
|
transform: `translateY(${-transition * (distance + itemHeight)}px)`,
|
|
13577
13784
|
columnGap: `${distance}px`
|
|
13578
13785
|
},
|
|
13579
|
-
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */
|
|
13786
|
+
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx63(
|
|
13580
13787
|
"div",
|
|
13581
13788
|
{
|
|
13582
|
-
className:
|
|
13789
|
+
className: clsx51(
|
|
13583
13790
|
`flex-col-2 items-center justify-center rounded-md`,
|
|
13584
13791
|
{
|
|
13585
13792
|
"text-primary font-bold": currentIndex === index,
|
|
@@ -13605,93 +13812,163 @@ var ScrollPicker = ({
|
|
|
13605
13812
|
);
|
|
13606
13813
|
};
|
|
13607
13814
|
|
|
13608
|
-
// src/components/user-action/
|
|
13609
|
-
import {
|
|
13610
|
-
import {
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13815
|
+
// src/components/user-action/input/DateTimeInput.tsx
|
|
13816
|
+
import { useEffect as useEffect29, useMemo as useMemo8, useRef as useRef15, useState as useState30 } from "react";
|
|
13817
|
+
import { CalendarIcon } from "lucide-react";
|
|
13818
|
+
import clsx52 from "clsx";
|
|
13819
|
+
import { Fragment as Fragment8, jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13820
|
+
var DateTimeInput = ({
|
|
13821
|
+
date,
|
|
13822
|
+
onValueChange,
|
|
13823
|
+
onEditCompleted,
|
|
13824
|
+
onRemove,
|
|
13825
|
+
containerProps,
|
|
13826
|
+
mode = "date",
|
|
13827
|
+
pickerProps,
|
|
13828
|
+
...props
|
|
13618
13829
|
}) => {
|
|
13619
|
-
const
|
|
13620
|
-
const
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
};
|
|
13626
|
-
const
|
|
13627
|
-
const
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
};
|
|
13633
|
-
const
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13830
|
+
const translation = useHightideTranslation();
|
|
13831
|
+
const { locale } = useLocale();
|
|
13832
|
+
const [isOpen, setIsOpen] = useState30(false);
|
|
13833
|
+
const containerRef = useRef15(null);
|
|
13834
|
+
useOutsideClick([containerRef], () => {
|
|
13835
|
+
setIsOpen(false);
|
|
13836
|
+
});
|
|
13837
|
+
const zIndex = useZIndexRegister(isOpen);
|
|
13838
|
+
const isReadOnly = useMemo8(() => props.readOnly || props.disabled, [props.readOnly, props.disabled]);
|
|
13839
|
+
useEffect29(() => {
|
|
13840
|
+
if (isReadOnly) {
|
|
13841
|
+
setIsOpen(false);
|
|
13842
|
+
}
|
|
13843
|
+
}, [isReadOnly]);
|
|
13844
|
+
const cleanInputProps = { ...props };
|
|
13845
|
+
delete cleanInputProps["isShowingError"];
|
|
13846
|
+
delete cleanInputProps["setIsShowingError"];
|
|
13847
|
+
return /* @__PURE__ */ jsxs43(Fragment8, { children: [
|
|
13848
|
+
/* @__PURE__ */ jsxs43("div", { ...containerProps, className: clsx52("relative w-full", containerProps?.className), children: [
|
|
13849
|
+
/* @__PURE__ */ jsx64(
|
|
13850
|
+
Input,
|
|
13851
|
+
{
|
|
13852
|
+
...cleanInputProps,
|
|
13853
|
+
placeholder: translation("clickToAdd"),
|
|
13854
|
+
value: date ? DateUtils.formatAbsolute(date, locale, mode === "dateTime") : "",
|
|
13855
|
+
onClick: (event) => {
|
|
13856
|
+
setIsOpen(true);
|
|
13857
|
+
cleanInputProps.onClick?.(event);
|
|
13858
|
+
},
|
|
13859
|
+
readOnly: true,
|
|
13860
|
+
className: clsx52(
|
|
13861
|
+
"pr-10 w-full",
|
|
13862
|
+
{ "hover:cursor-pointer": !isReadOnly },
|
|
13863
|
+
cleanInputProps.className
|
|
13864
|
+
)
|
|
13865
|
+
}
|
|
13866
|
+
),
|
|
13867
|
+
/* @__PURE__ */ jsx64(
|
|
13868
|
+
Button,
|
|
13869
|
+
{
|
|
13870
|
+
coloringStyle: "text",
|
|
13871
|
+
layout: "icon",
|
|
13872
|
+
color: "neutral",
|
|
13873
|
+
size: "small",
|
|
13874
|
+
className: "absolute right-1 top-1/2 -translate-y-1/2",
|
|
13875
|
+
disabled: isReadOnly,
|
|
13876
|
+
onClick: () => setIsOpen((prevState) => !prevState),
|
|
13877
|
+
children: /* @__PURE__ */ jsx64(CalendarIcon, { className: "size-5" })
|
|
13878
|
+
}
|
|
13879
|
+
)
|
|
13880
|
+
] }),
|
|
13881
|
+
/* @__PURE__ */ jsx64(Visibility, { isVisible: isOpen, children: /* @__PURE__ */ jsxs43(
|
|
13882
|
+
"div",
|
|
13883
|
+
{
|
|
13884
|
+
ref: containerRef,
|
|
13885
|
+
className: "absolute left-0 flex-col-3 rounded-lg shadow-xl border bg-surface-variant text-on-surface border-divider p-2",
|
|
13886
|
+
style: { zIndex },
|
|
13887
|
+
children: [
|
|
13888
|
+
/* @__PURE__ */ jsx64(
|
|
13889
|
+
DateTimePicker,
|
|
13890
|
+
{
|
|
13891
|
+
...pickerProps,
|
|
13892
|
+
mode,
|
|
13893
|
+
value: date,
|
|
13894
|
+
onChange: (newDate) => {
|
|
13895
|
+
onValueChange(newDate);
|
|
13896
|
+
}
|
|
13897
|
+
}
|
|
13898
|
+
),
|
|
13899
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex-row-2 justify-end", children: [
|
|
13900
|
+
/* @__PURE__ */ jsx64(Visibility, { isVisible: !!onRemove, children: /* @__PURE__ */ jsx64(
|
|
13901
|
+
Button,
|
|
13902
|
+
{
|
|
13903
|
+
size: "medium",
|
|
13904
|
+
color: "negative",
|
|
13905
|
+
onClick: () => {
|
|
13906
|
+
onRemove?.();
|
|
13907
|
+
setIsOpen(false);
|
|
13908
|
+
},
|
|
13909
|
+
children: translation("clear")
|
|
13910
|
+
}
|
|
13911
|
+
) }),
|
|
13912
|
+
/* @__PURE__ */ jsx64(
|
|
13913
|
+
Button,
|
|
13914
|
+
{
|
|
13915
|
+
size: "medium",
|
|
13916
|
+
onClick: () => {
|
|
13917
|
+
onEditCompleted?.(date);
|
|
13918
|
+
setIsOpen(false);
|
|
13919
|
+
},
|
|
13920
|
+
children: translation("change")
|
|
13921
|
+
}
|
|
13922
|
+
)
|
|
13923
|
+
] })
|
|
13924
|
+
]
|
|
13925
|
+
}
|
|
13926
|
+
) })
|
|
13927
|
+
] });
|
|
13928
|
+
};
|
|
13929
|
+
var DateTimeInputUncontrolled = ({
|
|
13930
|
+
date: initialDate,
|
|
13931
|
+
...props
|
|
13932
|
+
}) => {
|
|
13933
|
+
const [date, setDate] = useOverwritableState(useMemo8(() => initialDate ?? /* @__PURE__ */ new Date(), [initialDate]));
|
|
13934
|
+
return /* @__PURE__ */ jsx64(
|
|
13935
|
+
DateTimeInput,
|
|
13642
13936
|
{
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
positionClasses[position],
|
|
13654
|
-
tooltipClassName
|
|
13655
|
-
),
|
|
13656
|
-
style: { zIndex, animationDelay: animationDelay + "ms" },
|
|
13657
|
-
children: [
|
|
13658
|
-
tooltip,
|
|
13659
|
-
/* @__PURE__ */ jsx63(
|
|
13660
|
-
"div",
|
|
13661
|
-
{
|
|
13662
|
-
className: clsx51(`absolute w-0 h-0`, triangleClasses[position]),
|
|
13663
|
-
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
13664
|
-
}
|
|
13665
|
-
)
|
|
13666
|
-
]
|
|
13667
|
-
}
|
|
13668
|
-
)
|
|
13669
|
-
]
|
|
13937
|
+
...props,
|
|
13938
|
+
date,
|
|
13939
|
+
onValueChange: (newDate) => {
|
|
13940
|
+
setDate(newDate);
|
|
13941
|
+
props.onValueChange?.(newDate);
|
|
13942
|
+
},
|
|
13943
|
+
onRemove: () => {
|
|
13944
|
+
setDate(/* @__PURE__ */ new Date());
|
|
13945
|
+
props.onRemove?.();
|
|
13946
|
+
}
|
|
13670
13947
|
}
|
|
13671
13948
|
);
|
|
13672
13949
|
};
|
|
13673
13950
|
|
|
13674
13951
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
13675
13952
|
import { useId as useId11 } from "react";
|
|
13676
|
-
import { forwardRef as forwardRef9, useState as
|
|
13677
|
-
import
|
|
13678
|
-
import { jsx as
|
|
13953
|
+
import { forwardRef as forwardRef9, useState as useState31 } from "react";
|
|
13954
|
+
import clsx53 from "clsx";
|
|
13955
|
+
import { jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
13679
13956
|
var InsideLabelInput = forwardRef9(function InsideLabelInput2({
|
|
13680
13957
|
id: customId,
|
|
13681
13958
|
label,
|
|
13682
13959
|
...props
|
|
13683
13960
|
}, forwardedRef) {
|
|
13684
13961
|
const { value } = props;
|
|
13685
|
-
const [isFocused, setIsFocused] =
|
|
13962
|
+
const [isFocused, setIsFocused] = useState31(false);
|
|
13686
13963
|
const generatedId = useId11();
|
|
13687
13964
|
const id = customId ?? generatedId;
|
|
13688
|
-
return /* @__PURE__ */
|
|
13689
|
-
/* @__PURE__ */
|
|
13965
|
+
return /* @__PURE__ */ jsxs44("div", { className: clsx53("relative"), children: [
|
|
13966
|
+
/* @__PURE__ */ jsx65(
|
|
13690
13967
|
Input,
|
|
13691
13968
|
{
|
|
13692
13969
|
...props,
|
|
13693
13970
|
id,
|
|
13694
|
-
className:
|
|
13971
|
+
className: clsx53("h-14 px-4 pb-2 py-6.5", props.className),
|
|
13695
13972
|
ref: forwardedRef,
|
|
13696
13973
|
"aria-labelledby": id + "-label",
|
|
13697
13974
|
onFocus: (event) => {
|
|
@@ -13704,13 +13981,13 @@ var InsideLabelInput = forwardRef9(function InsideLabelInput2({
|
|
|
13704
13981
|
}
|
|
13705
13982
|
}
|
|
13706
13983
|
),
|
|
13707
|
-
/* @__PURE__ */
|
|
13984
|
+
/* @__PURE__ */ jsx65(
|
|
13708
13985
|
"label",
|
|
13709
13986
|
{
|
|
13710
13987
|
id: id + "-label",
|
|
13711
13988
|
"aria-hidden": true,
|
|
13712
13989
|
"data-display": isFocused || !!value ? "small" : "full",
|
|
13713
|
-
className:
|
|
13990
|
+
className: clsx53(
|
|
13714
13991
|
// margin left to account for the border which is ignored for absolute positions
|
|
13715
13992
|
"absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
|
|
13716
13993
|
"data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
|
|
@@ -13726,7 +14003,7 @@ var InsideLabelInputUncontrolled = ({
|
|
|
13726
14003
|
...props
|
|
13727
14004
|
}) => {
|
|
13728
14005
|
const [value, setValue] = useOverwritableState(initialValue, props.onChangeText);
|
|
13729
|
-
return /* @__PURE__ */
|
|
14006
|
+
return /* @__PURE__ */ jsx65(
|
|
13730
14007
|
InsideLabelInput,
|
|
13731
14008
|
{
|
|
13732
14009
|
...props,
|
|
@@ -13738,8 +14015,8 @@ var InsideLabelInputUncontrolled = ({
|
|
|
13738
14015
|
|
|
13739
14016
|
// src/components/user-action/input/SearchBar.tsx
|
|
13740
14017
|
import { Search } from "lucide-react";
|
|
13741
|
-
import { clsx as
|
|
13742
|
-
import { jsx as
|
|
14018
|
+
import { clsx as clsx54 } from "clsx";
|
|
14019
|
+
import { jsx as jsx66, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
13743
14020
|
var SearchBar = ({
|
|
13744
14021
|
onSearch,
|
|
13745
14022
|
searchButtonProps,
|
|
@@ -13747,16 +14024,16 @@ var SearchBar = ({
|
|
|
13747
14024
|
...inputProps
|
|
13748
14025
|
}) => {
|
|
13749
14026
|
const translation = useHightideTranslation();
|
|
13750
|
-
return /* @__PURE__ */
|
|
13751
|
-
/* @__PURE__ */
|
|
14027
|
+
return /* @__PURE__ */ jsxs45("div", { ...containerProps, className: clsx54("relative", containerProps?.className), children: [
|
|
14028
|
+
/* @__PURE__ */ jsx66(
|
|
13752
14029
|
InputUncontrolled,
|
|
13753
14030
|
{
|
|
13754
14031
|
...inputProps,
|
|
13755
14032
|
placeholder: inputProps.placeholder ?? translation("search"),
|
|
13756
|
-
className:
|
|
14033
|
+
className: clsx54("pr-10 w-full", inputProps.className)
|
|
13757
14034
|
}
|
|
13758
14035
|
),
|
|
13759
|
-
onSearch && /* @__PURE__ */
|
|
14036
|
+
onSearch && /* @__PURE__ */ jsx66(
|
|
13760
14037
|
Button,
|
|
13761
14038
|
{
|
|
13762
14039
|
...searchButtonProps,
|
|
@@ -13765,34 +14042,34 @@ var SearchBar = ({
|
|
|
13765
14042
|
color: "neutral",
|
|
13766
14043
|
coloringStyle: "text",
|
|
13767
14044
|
onClick: (event) => onSearch(event),
|
|
13768
|
-
className:
|
|
13769
|
-
children: /* @__PURE__ */
|
|
14045
|
+
className: clsx54("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
|
|
14046
|
+
children: /* @__PURE__ */ jsx66(Search, { className: "w-full h-full" })
|
|
13770
14047
|
}
|
|
13771
14048
|
)
|
|
13772
14049
|
] });
|
|
13773
14050
|
};
|
|
13774
14051
|
|
|
13775
14052
|
// src/components/user-action/input/ToggleableInput.tsx
|
|
13776
|
-
import { forwardRef as forwardRef10, useEffect as
|
|
14053
|
+
import { forwardRef as forwardRef10, useEffect as useEffect30, useImperativeHandle as useImperativeHandle4, useRef as useRef16, useState as useState32 } from "react";
|
|
13777
14054
|
import { Pencil } from "lucide-react";
|
|
13778
|
-
import
|
|
13779
|
-
import { jsx as
|
|
14055
|
+
import clsx55 from "clsx";
|
|
14056
|
+
import { jsx as jsx67, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13780
14057
|
var ToggleableInput = forwardRef10(function ToggleableInput2({
|
|
13781
14058
|
value,
|
|
13782
14059
|
initialState = "display",
|
|
13783
14060
|
editCompleteOptions,
|
|
13784
14061
|
...props
|
|
13785
14062
|
}, forwardedRef) {
|
|
13786
|
-
const [isEditing, setIsEditing] =
|
|
13787
|
-
const innerRef =
|
|
14063
|
+
const [isEditing, setIsEditing] = useState32(initialState !== "display");
|
|
14064
|
+
const innerRef = useRef16(null);
|
|
13788
14065
|
useImperativeHandle4(forwardedRef, () => innerRef.current);
|
|
13789
|
-
|
|
14066
|
+
useEffect30(() => {
|
|
13790
14067
|
if (isEditing) {
|
|
13791
14068
|
innerRef.current?.focus();
|
|
13792
14069
|
}
|
|
13793
14070
|
}, [isEditing]);
|
|
13794
|
-
return /* @__PURE__ */
|
|
13795
|
-
/* @__PURE__ */
|
|
14071
|
+
return /* @__PURE__ */ jsxs46("div", { className: clsx55("relative flex-row-2", { "flex-1": isEditing }), children: [
|
|
14072
|
+
/* @__PURE__ */ jsx67(
|
|
13796
14073
|
Input,
|
|
13797
14074
|
{
|
|
13798
14075
|
...props,
|
|
@@ -13813,14 +14090,14 @@ var ToggleableInput = forwardRef10(function ToggleableInput2({
|
|
|
13813
14090
|
},
|
|
13814
14091
|
"data-name": props["data-name"] ?? "togglable-input",
|
|
13815
14092
|
"data-isEditing": isEditing ? "" : void 0,
|
|
13816
|
-
className:
|
|
14093
|
+
className: clsx55(`w-full rounded-md`, {
|
|
13817
14094
|
"text-transparent": !isEditing
|
|
13818
14095
|
})
|
|
13819
14096
|
}
|
|
13820
14097
|
),
|
|
13821
|
-
!isEditing && /* @__PURE__ */
|
|
13822
|
-
/* @__PURE__ */
|
|
13823
|
-
/* @__PURE__ */
|
|
14098
|
+
!isEditing && /* @__PURE__ */ jsxs46("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
|
|
14099
|
+
/* @__PURE__ */ jsx67("span", { className: clsx55(" truncate"), children: value }),
|
|
14100
|
+
/* @__PURE__ */ jsx67(Pencil, { className: clsx55(`size-force-4`, { "text-transparent": isEditing }) })
|
|
13824
14101
|
] })
|
|
13825
14102
|
] });
|
|
13826
14103
|
});
|
|
@@ -13830,7 +14107,7 @@ var ToggleableInputUncontrolled = ({
|
|
|
13830
14107
|
...restProps
|
|
13831
14108
|
}) => {
|
|
13832
14109
|
const [value, setValue] = useOverwritableState(initialValue, onChangeText);
|
|
13833
|
-
return /* @__PURE__ */
|
|
14110
|
+
return /* @__PURE__ */ jsx67(
|
|
13834
14111
|
ToggleableInput,
|
|
13835
14112
|
{
|
|
13836
14113
|
value,
|
|
@@ -13841,33 +14118,33 @@ var ToggleableInputUncontrolled = ({
|
|
|
13841
14118
|
};
|
|
13842
14119
|
|
|
13843
14120
|
// src/components/utils/FocusTrap.tsx
|
|
13844
|
-
import { useRef as
|
|
14121
|
+
import { useRef as useRef17 } from "react";
|
|
13845
14122
|
import { useImperativeHandle as useImperativeHandle5 } from "react";
|
|
13846
14123
|
import { forwardRef as forwardRef11 } from "react";
|
|
13847
|
-
import { jsx as
|
|
14124
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
13848
14125
|
var FocusTrap = forwardRef11(function FocusTrap2({
|
|
13849
14126
|
active = true,
|
|
13850
14127
|
initialFocus,
|
|
13851
14128
|
focusFirst = false,
|
|
13852
14129
|
...props
|
|
13853
14130
|
}, forwardedRef) {
|
|
13854
|
-
const innerRef =
|
|
14131
|
+
const innerRef = useRef17(null);
|
|
13855
14132
|
useImperativeHandle5(forwardedRef, () => innerRef.current);
|
|
13856
14133
|
useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
|
|
13857
|
-
return /* @__PURE__ */
|
|
14134
|
+
return /* @__PURE__ */ jsx68("div", { ref: innerRef, ...props });
|
|
13858
14135
|
});
|
|
13859
14136
|
|
|
13860
14137
|
// src/components/utils/Transition.tsx
|
|
13861
|
-
import { useEffect as
|
|
14138
|
+
import { useEffect as useEffect31, useState as useState33 } from "react";
|
|
13862
14139
|
function Transition({
|
|
13863
14140
|
children,
|
|
13864
14141
|
show,
|
|
13865
14142
|
includeAnimation = true
|
|
13866
14143
|
}) {
|
|
13867
|
-
const [isOpen, setIsOpen] =
|
|
13868
|
-
const [isTransitioning, setIsTransitioning] =
|
|
14144
|
+
const [isOpen, setIsOpen] = useState33(show);
|
|
14145
|
+
const [isTransitioning, setIsTransitioning] = useState33(!isOpen);
|
|
13869
14146
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
13870
|
-
|
|
14147
|
+
useEffect31(() => {
|
|
13871
14148
|
setIsOpen(show);
|
|
13872
14149
|
setIsTransitioning(true);
|
|
13873
14150
|
}, [show]);
|
|
@@ -13892,7 +14169,7 @@ function Transition({
|
|
|
13892
14169
|
}
|
|
13893
14170
|
|
|
13894
14171
|
// src/hooks/focus/useFocusGuards.ts
|
|
13895
|
-
import { useEffect as
|
|
14172
|
+
import { useEffect as useEffect32 } from "react";
|
|
13896
14173
|
var selectorName = "data-hw-focus-guard";
|
|
13897
14174
|
function FocusGuard() {
|
|
13898
14175
|
const element = document.createElement("div");
|
|
@@ -13930,7 +14207,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
13930
14207
|
}
|
|
13931
14208
|
};
|
|
13932
14209
|
var useFocusGuards = () => {
|
|
13933
|
-
|
|
14210
|
+
useEffect32(() => {
|
|
13934
14211
|
FocusGuardsService.getInstance().add();
|
|
13935
14212
|
return () => {
|
|
13936
14213
|
FocusGuardsService.getInstance().remove();
|
|
@@ -13939,10 +14216,10 @@ var useFocusGuards = () => {
|
|
|
13939
14216
|
};
|
|
13940
14217
|
|
|
13941
14218
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
13942
|
-
import React6, { useEffect as
|
|
14219
|
+
import React6, { useEffect as useEffect33 } from "react";
|
|
13943
14220
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
13944
14221
|
const [hasUsedFocus, setHasUsedFocus] = React6.useState(false);
|
|
13945
|
-
|
|
14222
|
+
useEffect33(() => {
|
|
13946
14223
|
if (disable || hasUsedFocus) {
|
|
13947
14224
|
return;
|
|
13948
14225
|
}
|
|
@@ -13968,7 +14245,7 @@ var useRerender = () => {
|
|
|
13968
14245
|
};
|
|
13969
14246
|
|
|
13970
14247
|
// src/hooks/useSearch.ts
|
|
13971
|
-
import { useCallback as useCallback14, useEffect as
|
|
14248
|
+
import { useCallback as useCallback14, useEffect as useEffect34, useMemo as useMemo9, useState as useState34 } from "react";
|
|
13972
14249
|
|
|
13973
14250
|
// src/utils/simpleSearch.ts
|
|
13974
14251
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -14007,9 +14284,9 @@ var useSearch = ({
|
|
|
14007
14284
|
filter,
|
|
14008
14285
|
disabled = false
|
|
14009
14286
|
}) => {
|
|
14010
|
-
const [search, setSearch] =
|
|
14011
|
-
const [result, setResult] =
|
|
14012
|
-
const searchTags =
|
|
14287
|
+
const [search, setSearch] = useState34(initialSearch ?? "");
|
|
14288
|
+
const [result, setResult] = useState34(list);
|
|
14289
|
+
const searchTags = useMemo9(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
14013
14290
|
const updateSearch = useCallback14((newSearch) => {
|
|
14014
14291
|
const usedSearch = newSearch ?? search;
|
|
14015
14292
|
if (newSearch) {
|
|
@@ -14017,24 +14294,24 @@ var useSearch = ({
|
|
|
14017
14294
|
}
|
|
14018
14295
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
14019
14296
|
}, [searchTags, list, search, searchMapping]);
|
|
14020
|
-
|
|
14297
|
+
useEffect34(() => {
|
|
14021
14298
|
if (isSearchInstant) {
|
|
14022
14299
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
14023
14300
|
}
|
|
14024
14301
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
14025
|
-
const filteredResult =
|
|
14302
|
+
const filteredResult = useMemo9(() => {
|
|
14026
14303
|
if (!filter) {
|
|
14027
14304
|
return result;
|
|
14028
14305
|
}
|
|
14029
14306
|
return result.filter(filter);
|
|
14030
14307
|
}, [result, filter]);
|
|
14031
|
-
const sortedAndFilteredResult =
|
|
14308
|
+
const sortedAndFilteredResult = useMemo9(() => {
|
|
14032
14309
|
if (!sortingFunction) {
|
|
14033
14310
|
return filteredResult;
|
|
14034
14311
|
}
|
|
14035
14312
|
return filteredResult.sort(sortingFunction);
|
|
14036
14313
|
}, [filteredResult, sortingFunction]);
|
|
14037
|
-
const usedResult =
|
|
14314
|
+
const usedResult = useMemo9(() => {
|
|
14038
14315
|
if (!disabled) {
|
|
14039
14316
|
return sortedAndFilteredResult;
|
|
14040
14317
|
}
|
|
@@ -14144,6 +14421,106 @@ var builder = (value, update) => {
|
|
|
14144
14421
|
return value;
|
|
14145
14422
|
};
|
|
14146
14423
|
|
|
14424
|
+
// src/utils/duration.ts
|
|
14425
|
+
var Duration = class _Duration {
|
|
14426
|
+
constructor({
|
|
14427
|
+
years = 0,
|
|
14428
|
+
months = 0,
|
|
14429
|
+
days = 0,
|
|
14430
|
+
hours = 0,
|
|
14431
|
+
minutes = 0,
|
|
14432
|
+
seconds = 0,
|
|
14433
|
+
milliseconds = 0
|
|
14434
|
+
} = {}) {
|
|
14435
|
+
this.assertRanges({ years, months, days, hours, minutes, seconds, milliseconds });
|
|
14436
|
+
this.years = years;
|
|
14437
|
+
this.months = months;
|
|
14438
|
+
this.days = days;
|
|
14439
|
+
this.hours = hours;
|
|
14440
|
+
this.minutes = minutes;
|
|
14441
|
+
this.seconds = seconds;
|
|
14442
|
+
this.milliseconds = milliseconds;
|
|
14443
|
+
}
|
|
14444
|
+
/** Date arithmetic */
|
|
14445
|
+
addTo(date) {
|
|
14446
|
+
return this.applyTo(date, 1);
|
|
14447
|
+
}
|
|
14448
|
+
subtractFrom(date) {
|
|
14449
|
+
return this.applyTo(date, -1);
|
|
14450
|
+
}
|
|
14451
|
+
/** Duration arithmetic */
|
|
14452
|
+
add(other) {
|
|
14453
|
+
return new _Duration({
|
|
14454
|
+
years: this.years + other.years,
|
|
14455
|
+
months: this.months + other.months,
|
|
14456
|
+
days: this.days + other.days,
|
|
14457
|
+
hours: this.hours + other.hours,
|
|
14458
|
+
minutes: this.minutes + other.minutes,
|
|
14459
|
+
seconds: this.seconds + other.seconds,
|
|
14460
|
+
milliseconds: this.milliseconds + other.milliseconds
|
|
14461
|
+
});
|
|
14462
|
+
}
|
|
14463
|
+
subtract(other) {
|
|
14464
|
+
return new _Duration({
|
|
14465
|
+
years: this.years - other.years,
|
|
14466
|
+
months: this.months - other.months,
|
|
14467
|
+
days: this.days - other.days,
|
|
14468
|
+
hours: this.hours - other.hours,
|
|
14469
|
+
minutes: this.minutes - other.minutes,
|
|
14470
|
+
seconds: this.seconds - other.seconds,
|
|
14471
|
+
milliseconds: this.milliseconds - other.milliseconds
|
|
14472
|
+
});
|
|
14473
|
+
}
|
|
14474
|
+
equals(other) {
|
|
14475
|
+
return this.years === other.years && this.months === other.months && this.days === other.days && this.hours === other.hours && this.minutes === other.minutes && this.seconds === other.seconds && this.milliseconds === other.milliseconds;
|
|
14476
|
+
}
|
|
14477
|
+
toJSON() {
|
|
14478
|
+
return { ...this };
|
|
14479
|
+
}
|
|
14480
|
+
/** Static difference */
|
|
14481
|
+
static difference(start, end) {
|
|
14482
|
+
const diff = end.getTime() - start.getTime();
|
|
14483
|
+
const ms = 1e3;
|
|
14484
|
+
const min = 60 * ms;
|
|
14485
|
+
const hr = 60 * min;
|
|
14486
|
+
const day = 24 * hr;
|
|
14487
|
+
const month = 30 * day;
|
|
14488
|
+
const year = 365.25 * day;
|
|
14489
|
+
return new _Duration({
|
|
14490
|
+
years: Math.floor(diff / year),
|
|
14491
|
+
months: Math.floor(diff / month),
|
|
14492
|
+
days: Math.floor(diff / day),
|
|
14493
|
+
hours: Math.floor(diff % day / hr),
|
|
14494
|
+
minutes: Math.floor(diff % hr / min),
|
|
14495
|
+
seconds: Math.floor(diff % min / ms),
|
|
14496
|
+
milliseconds: diff % ms
|
|
14497
|
+
});
|
|
14498
|
+
}
|
|
14499
|
+
applyTo(date, multiplier) {
|
|
14500
|
+
const d = new Date(date);
|
|
14501
|
+
d.setFullYear(d.getFullYear() + multiplier * this.years);
|
|
14502
|
+
d.setMonth(d.getMonth() + multiplier * this.months);
|
|
14503
|
+
d.setDate(d.getDate() + multiplier * this.days);
|
|
14504
|
+
d.setHours(d.getHours() + multiplier * this.hours);
|
|
14505
|
+
d.setMinutes(d.getMinutes() + multiplier * this.minutes);
|
|
14506
|
+
d.setSeconds(d.getSeconds() + multiplier * this.seconds);
|
|
14507
|
+
d.setMilliseconds(d.getMilliseconds() + multiplier * this.milliseconds);
|
|
14508
|
+
return d;
|
|
14509
|
+
}
|
|
14510
|
+
assertRanges(d) {
|
|
14511
|
+
if (d.years < 0) throw new RangeError("years >= 0");
|
|
14512
|
+
if (d.months < 0 || d.months > 11) throw new RangeError("months: 0\u201311");
|
|
14513
|
+
if (d.days < 0) throw new RangeError("days >= 0");
|
|
14514
|
+
if (d.hours < 0 || d.hours > 23) throw new RangeError("hours: 0\u201323");
|
|
14515
|
+
if (d.minutes < 0 || d.minutes > 59) throw new RangeError("minutes: 0\u201359");
|
|
14516
|
+
if (d.seconds < 0 || d.seconds > 59) throw new RangeError("seconds: 0\u201359");
|
|
14517
|
+
if (d.milliseconds < 0) throw new RangeError("milliseconds >= 0");
|
|
14518
|
+
}
|
|
14519
|
+
valueOf() {
|
|
14520
|
+
return this.milliseconds + this.seconds * 1e3 + this.minutes * 6e4 + this.hours * 36e5 + this.days * 864e5;
|
|
14521
|
+
}
|
|
14522
|
+
};
|
|
14523
|
+
|
|
14147
14524
|
// src/utils/easeFunctions.ts
|
|
14148
14525
|
var EaseFunctions = class _EaseFunctions {
|
|
14149
14526
|
static cubicBezierGeneric(x1, y1, x2, y2) {
|
|
@@ -14281,12 +14658,16 @@ export {
|
|
|
14281
14658
|
DatePicker,
|
|
14282
14659
|
DatePickerUncontrolled,
|
|
14283
14660
|
DateProperty,
|
|
14661
|
+
DateTimeInput,
|
|
14662
|
+
DateTimeInputUncontrolled,
|
|
14284
14663
|
DateTimePicker,
|
|
14664
|
+
DateUtils,
|
|
14285
14665
|
DayPicker,
|
|
14286
14666
|
DayPickerUncontrolled,
|
|
14287
14667
|
Dialog,
|
|
14288
14668
|
DiscardChangesDialog,
|
|
14289
14669
|
DividerInserter,
|
|
14670
|
+
Duration,
|
|
14290
14671
|
EaseFunctions,
|
|
14291
14672
|
ErrorComponent,
|
|
14292
14673
|
Expandable,
|
|
@@ -14384,6 +14765,7 @@ export {
|
|
|
14384
14765
|
Transition,
|
|
14385
14766
|
UseValidators,
|
|
14386
14767
|
VerticalDivider,
|
|
14768
|
+
Visibility,
|
|
14387
14769
|
YearMonthPicker,
|
|
14388
14770
|
YearMonthPickerUncontrolled,
|
|
14389
14771
|
addDuration,
|
|
@@ -14393,19 +14775,16 @@ export {
|
|
|
14393
14775
|
closestMatch,
|
|
14394
14776
|
createLoopingList,
|
|
14395
14777
|
createLoopingListWithIndex,
|
|
14396
|
-
equalDate,
|
|
14397
14778
|
equalSizeGroups,
|
|
14398
14779
|
formatDate,
|
|
14399
14780
|
formatDateTime,
|
|
14400
14781
|
getBetweenDuration,
|
|
14401
|
-
getDaysInMonth,
|
|
14402
14782
|
getNeighbours,
|
|
14403
14783
|
getWeeksForCalenderMonth,
|
|
14404
14784
|
hightideTranslation,
|
|
14405
14785
|
hightideTranslationLocales,
|
|
14406
14786
|
isInTimeSpan,
|
|
14407
14787
|
match,
|
|
14408
|
-
monthsList,
|
|
14409
14788
|
noop,
|
|
14410
14789
|
range,
|
|
14411
14790
|
resolveSetState,
|
|
@@ -14435,7 +14814,6 @@ export {
|
|
|
14435
14814
|
useTranslatedValidators,
|
|
14436
14815
|
useZIndexRegister,
|
|
14437
14816
|
validateEmail,
|
|
14438
|
-
weekDayList,
|
|
14439
14817
|
writeToClipboard
|
|
14440
14818
|
};
|
|
14441
14819
|
//# sourceMappingURL=index.mjs.map
|