@helpwave/hightide 0.8.10 → 0.8.12
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 +293 -297
- package/dist/index.d.ts +293 -297
- package/dist/index.js +311 -167
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +273 -129
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +1 -1
- package/dist/style/uncompiled/theme/components/time-picker.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14638,10 +14638,10 @@ var TableSortButton = ({
|
|
|
14638
14638
|
|
|
14639
14639
|
// src/components/layout/table/TableFilterButton.tsx
|
|
14640
14640
|
var import_lucide_react19 = require("lucide-react");
|
|
14641
|
-
var
|
|
14641
|
+
var import_react83 = require("react");
|
|
14642
14642
|
|
|
14643
14643
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
14644
|
-
var
|
|
14644
|
+
var import_react79 = require("react");
|
|
14645
14645
|
var import_lucide_react16 = require("lucide-react");
|
|
14646
14646
|
var import_clsx24 = __toESM(require("clsx"));
|
|
14647
14647
|
|
|
@@ -14655,6 +14655,9 @@ var TimePicker = ({
|
|
|
14655
14655
|
onEditComplete,
|
|
14656
14656
|
is24HourFormat = true,
|
|
14657
14657
|
minuteIncrement = "5min",
|
|
14658
|
+
secondIncrement = "5s",
|
|
14659
|
+
millisecondIncrement = "100ms",
|
|
14660
|
+
precision = "minute",
|
|
14658
14661
|
className
|
|
14659
14662
|
}) => {
|
|
14660
14663
|
const [value, setValue] = useControlledState({
|
|
@@ -14666,22 +14669,58 @@ var TimePicker = ({
|
|
|
14666
14669
|
const hourRef = (0, import_react64.useRef)(null);
|
|
14667
14670
|
const isPM = value.getHours() > 11;
|
|
14668
14671
|
const hours = is24HourFormat ? range(24) : range(12);
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14672
|
+
const minutes = (0, import_react64.useMemo)(() => {
|
|
14673
|
+
const full = range(60);
|
|
14674
|
+
switch (minuteIncrement) {
|
|
14675
|
+
case "5min":
|
|
14676
|
+
return full.filter((value2) => value2 % 5 === 0);
|
|
14677
|
+
case "10min":
|
|
14678
|
+
return full.filter((value2) => value2 % 10 === 0);
|
|
14679
|
+
case "15min":
|
|
14680
|
+
return full.filter((value2) => value2 % 15 === 0);
|
|
14681
|
+
case "30min":
|
|
14682
|
+
return full.filter((value2) => value2 % 30 === 0);
|
|
14683
|
+
}
|
|
14684
|
+
}, [minuteIncrement]);
|
|
14685
|
+
const seconds = (0, import_react64.useMemo)(() => {
|
|
14686
|
+
const full = range(60);
|
|
14687
|
+
switch (secondIncrement) {
|
|
14688
|
+
case "1s":
|
|
14689
|
+
return full.filter((value2) => value2 % 1 === 0);
|
|
14690
|
+
case "5s":
|
|
14691
|
+
return full.filter((value2) => value2 % 5 === 0);
|
|
14692
|
+
case "10s":
|
|
14693
|
+
return full.filter((value2) => value2 % 10 === 0);
|
|
14694
|
+
case "15s":
|
|
14695
|
+
return full.filter((value2) => value2 % 15 === 0);
|
|
14696
|
+
case "30s":
|
|
14697
|
+
return full.filter((value2) => value2 % 30 === 0);
|
|
14698
|
+
}
|
|
14699
|
+
}, [secondIncrement]);
|
|
14700
|
+
const milliseconds = (0, import_react64.useMemo)(() => {
|
|
14701
|
+
const full = range(1e3);
|
|
14702
|
+
switch (millisecondIncrement) {
|
|
14703
|
+
case "1ms":
|
|
14704
|
+
return full.filter((value2) => value2 % 1 === 0);
|
|
14705
|
+
case "5ms":
|
|
14706
|
+
return full.filter((value2) => value2 % 5 === 0);
|
|
14707
|
+
case "10ms":
|
|
14708
|
+
return full.filter((value2) => value2 % 10 === 0);
|
|
14709
|
+
case "25ms":
|
|
14710
|
+
return full.filter((value2) => value2 % 25 === 0);
|
|
14711
|
+
case "50ms":
|
|
14712
|
+
return full.filter((value2) => value2 % 50 === 0);
|
|
14713
|
+
case "100ms":
|
|
14714
|
+
return full.filter((value2) => value2 % 100 === 0);
|
|
14715
|
+
case "250ms":
|
|
14716
|
+
return full.filter((value2) => value2 % 250 === 0);
|
|
14717
|
+
case "500ms":
|
|
14718
|
+
return full.filter((value2) => value2 % 500 === 0);
|
|
14719
|
+
}
|
|
14720
|
+
}, [millisecondIncrement]);
|
|
14721
|
+
const closestMinute = (0, import_react64.useMemo)(() => closestMatch(minutes, (item1, item2) => Math.abs(item1 - value.getMinutes()) < Math.abs(item2 - value.getMinutes())), [minutes, value]);
|
|
14722
|
+
const closestSecond = (0, import_react64.useMemo)(() => closestMatch(seconds, (item1, item2) => Math.abs(item1 - value.getSeconds()) < Math.abs(item2 - value.getSeconds())), [seconds, value]);
|
|
14723
|
+
const closestMillisecond = (0, import_react64.useMemo)(() => closestMatch(milliseconds, (item1, item2) => Math.abs(item1 - value.getMilliseconds()) < Math.abs(item2 - value.getMilliseconds())), [milliseconds, value]);
|
|
14685
14724
|
const hour = value.getHours();
|
|
14686
14725
|
(0, import_react64.useEffect)(() => {
|
|
14687
14726
|
minuteRef.current?.scrollIntoView({
|
|
@@ -14732,6 +14771,36 @@ var TimePicker = ({
|
|
|
14732
14771
|
minute + minuteIncrement
|
|
14733
14772
|
);
|
|
14734
14773
|
}) }),
|
|
14774
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Visibility, { isVisible: precision === "second" || precision === "millisecond", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-name": "time-picker-value-column", children: seconds.map((second) => {
|
|
14775
|
+
const isSelected = second === closestSecond;
|
|
14776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14777
|
+
Button,
|
|
14778
|
+
{
|
|
14779
|
+
size: "sm",
|
|
14780
|
+
color: isSelected ? "primary" : "neutral",
|
|
14781
|
+
ref: isSelected ? minuteRef : void 0,
|
|
14782
|
+
onClick: () => onChangeWrapper((newDate) => newDate.setSeconds(second)),
|
|
14783
|
+
className: "min-w-16",
|
|
14784
|
+
children: second.toString().padStart(2, "0")
|
|
14785
|
+
},
|
|
14786
|
+
second + secondIncrement
|
|
14787
|
+
);
|
|
14788
|
+
}) }) }),
|
|
14789
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Visibility, { isVisible: precision === "millisecond", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-name": "time-picker-value-column", children: milliseconds.map((millisecond) => {
|
|
14790
|
+
const isSelected = millisecond === closestMillisecond;
|
|
14791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14792
|
+
Button,
|
|
14793
|
+
{
|
|
14794
|
+
size: "sm",
|
|
14795
|
+
color: isSelected ? "primary" : "neutral",
|
|
14796
|
+
ref: isSelected ? minuteRef : void 0,
|
|
14797
|
+
onClick: () => onChangeWrapper((newDate) => newDate.setMilliseconds(millisecond)),
|
|
14798
|
+
className: "min-w-16",
|
|
14799
|
+
children: millisecond.toString().padStart(2, "0")
|
|
14800
|
+
},
|
|
14801
|
+
millisecond + millisecondIncrement
|
|
14802
|
+
);
|
|
14803
|
+
}) }) }),
|
|
14735
14804
|
!is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { "data-name": "time-picker-value-column", children: [
|
|
14736
14805
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14737
14806
|
Button,
|
|
@@ -14902,14 +14971,40 @@ var formatRelative = (date, locale) => {
|
|
|
14902
14971
|
if (Math.abs(diffInSeconds) < timesInSeconds.yearImprecise) return rtf.format(Math.round(diffInSeconds / timesInSeconds.monthImprecise), "month");
|
|
14903
14972
|
return rtf.format(Math.round(diffInSeconds / timesInSeconds.yearImprecise), "year");
|
|
14904
14973
|
};
|
|
14905
|
-
var toInputString = (date, format) => {
|
|
14974
|
+
var toInputString = (date, format, precision = "minute", isLocalTime = true) => {
|
|
14975
|
+
const pad = (n, l = 2) => String(n).padStart(l, "0");
|
|
14976
|
+
const parts = isLocalTime ? {
|
|
14977
|
+
y: date.getFullYear(),
|
|
14978
|
+
m: date.getMonth() + 1,
|
|
14979
|
+
d: date.getDate(),
|
|
14980
|
+
h: date.getHours(),
|
|
14981
|
+
min: date.getMinutes(),
|
|
14982
|
+
s: date.getSeconds(),
|
|
14983
|
+
ms: date.getMilliseconds()
|
|
14984
|
+
} : {
|
|
14985
|
+
y: date.getUTCFullYear(),
|
|
14986
|
+
m: date.getUTCMonth() + 1,
|
|
14987
|
+
d: date.getUTCDate(),
|
|
14988
|
+
h: date.getUTCHours(),
|
|
14989
|
+
min: date.getUTCMinutes(),
|
|
14990
|
+
s: date.getUTCSeconds(),
|
|
14991
|
+
ms: date.getUTCMilliseconds()
|
|
14992
|
+
};
|
|
14993
|
+
const dateStr = `${pad(parts.y, 4)}-${pad(parts.m)}-${pad(parts.d)}`;
|
|
14994
|
+
let timeStr = `${pad(parts.h)}:${pad(parts.min)}`;
|
|
14995
|
+
if (precision === "second" || precision === "millisecond") {
|
|
14996
|
+
timeStr += `:${pad(parts.s)}`;
|
|
14997
|
+
}
|
|
14998
|
+
if (precision === "millisecond") {
|
|
14999
|
+
timeStr += `.${pad(parts.ms, 3)}`;
|
|
15000
|
+
}
|
|
14906
15001
|
switch (format) {
|
|
14907
15002
|
case "date":
|
|
14908
|
-
return
|
|
15003
|
+
return dateStr;
|
|
14909
15004
|
case "time":
|
|
14910
|
-
return
|
|
15005
|
+
return timeStr;
|
|
14911
15006
|
case "dateTime":
|
|
14912
|
-
return
|
|
15007
|
+
return `${dateStr}T${timeStr}`;
|
|
14913
15008
|
}
|
|
14914
15009
|
};
|
|
14915
15010
|
var DateUtils = {
|
|
@@ -15026,7 +15121,8 @@ var DayPicker = ({
|
|
|
15026
15121
|
date.getDate(),
|
|
15027
15122
|
value.getHours(),
|
|
15028
15123
|
value.getMinutes(),
|
|
15029
|
-
value.getSeconds()
|
|
15124
|
+
value.getSeconds(),
|
|
15125
|
+
value.getMilliseconds()
|
|
15030
15126
|
);
|
|
15031
15127
|
setValue(newDate);
|
|
15032
15128
|
onEditComplete?.(newDate);
|
|
@@ -15300,6 +15396,9 @@ var DateTimePicker = ({
|
|
|
15300
15396
|
is24HourFormat,
|
|
15301
15397
|
minuteIncrement,
|
|
15302
15398
|
weekStart,
|
|
15399
|
+
secondIncrement,
|
|
15400
|
+
millisecondIncrement,
|
|
15401
|
+
precision,
|
|
15303
15402
|
onValueChange,
|
|
15304
15403
|
onEditComplete,
|
|
15305
15404
|
timePickerProps,
|
|
@@ -15337,6 +15436,9 @@ var DateTimePicker = ({
|
|
|
15337
15436
|
...timePickerProps,
|
|
15338
15437
|
is24HourFormat,
|
|
15339
15438
|
minuteIncrement,
|
|
15439
|
+
secondIncrement,
|
|
15440
|
+
millisecondIncrement,
|
|
15441
|
+
precision,
|
|
15340
15442
|
value,
|
|
15341
15443
|
onValueChange: setValue,
|
|
15342
15444
|
onEditComplete
|
|
@@ -15350,6 +15452,7 @@ var DateTimePicker = ({
|
|
|
15350
15452
|
};
|
|
15351
15453
|
|
|
15352
15454
|
// src/components/user-interaction/date/DateTimePickerDialog.tsx
|
|
15455
|
+
var import_react68 = require("react");
|
|
15353
15456
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
15354
15457
|
var DateTimePickerDialog = ({
|
|
15355
15458
|
initialValue = null,
|
|
@@ -15359,6 +15462,15 @@ var DateTimePickerDialog = ({
|
|
|
15359
15462
|
onEditComplete,
|
|
15360
15463
|
mode = "date",
|
|
15361
15464
|
pickerProps,
|
|
15465
|
+
start,
|
|
15466
|
+
end,
|
|
15467
|
+
weekStart,
|
|
15468
|
+
markToday,
|
|
15469
|
+
is24HourFormat,
|
|
15470
|
+
minuteIncrement,
|
|
15471
|
+
secondIncrement,
|
|
15472
|
+
millisecondIncrement,
|
|
15473
|
+
precision,
|
|
15362
15474
|
labelId,
|
|
15363
15475
|
label
|
|
15364
15476
|
}) => {
|
|
@@ -15368,6 +15480,10 @@ var DateTimePickerDialog = ({
|
|
|
15368
15480
|
onValueChange,
|
|
15369
15481
|
defaultValue: initialValue
|
|
15370
15482
|
});
|
|
15483
|
+
const [pickerState, setPickerState] = (0, import_react68.useState)(state ?? /* @__PURE__ */ new Date());
|
|
15484
|
+
(0, import_react68.useEffect)(() => {
|
|
15485
|
+
setPickerState(state ?? /* @__PURE__ */ new Date());
|
|
15486
|
+
}, [state]);
|
|
15371
15487
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
15372
15488
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex-row-2 justify-center w-full py-1", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15373
15489
|
"span",
|
|
@@ -15382,13 +15498,22 @@ var DateTimePickerDialog = ({
|
|
|
15382
15498
|
{
|
|
15383
15499
|
...pickerProps,
|
|
15384
15500
|
mode,
|
|
15385
|
-
value:
|
|
15386
|
-
onValueChange:
|
|
15387
|
-
onEditComplete:
|
|
15501
|
+
value: pickerState,
|
|
15502
|
+
onValueChange: setPickerState,
|
|
15503
|
+
onEditComplete: setPickerState,
|
|
15504
|
+
start,
|
|
15505
|
+
end,
|
|
15506
|
+
weekStart,
|
|
15507
|
+
markToday,
|
|
15508
|
+
is24HourFormat,
|
|
15509
|
+
minuteIncrement,
|
|
15510
|
+
secondIncrement,
|
|
15511
|
+
millisecondIncrement,
|
|
15512
|
+
precision
|
|
15388
15513
|
}
|
|
15389
15514
|
),
|
|
15390
15515
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex-row-2 justify-end", children: [
|
|
15391
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: allowRemove && !!
|
|
15516
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: allowRemove && !!state, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15392
15517
|
Button,
|
|
15393
15518
|
{
|
|
15394
15519
|
size: "md",
|
|
@@ -15401,14 +15526,14 @@ var DateTimePickerDialog = ({
|
|
|
15401
15526
|
children: translation("clear")
|
|
15402
15527
|
}
|
|
15403
15528
|
) }),
|
|
15404
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: !
|
|
15529
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: !state, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15405
15530
|
Button,
|
|
15406
15531
|
{
|
|
15407
15532
|
size: "md",
|
|
15408
15533
|
color: "neutral",
|
|
15409
15534
|
onClick: () => {
|
|
15410
|
-
setState(
|
|
15411
|
-
onEditComplete?.(
|
|
15535
|
+
setState(state);
|
|
15536
|
+
onEditComplete?.(state);
|
|
15412
15537
|
},
|
|
15413
15538
|
className: "min-w-26",
|
|
15414
15539
|
children: translation("cancel")
|
|
@@ -15419,7 +15544,7 @@ var DateTimePickerDialog = ({
|
|
|
15419
15544
|
{
|
|
15420
15545
|
size: "md",
|
|
15421
15546
|
onClick: () => {
|
|
15422
|
-
onEditComplete?.(
|
|
15547
|
+
onEditComplete?.(pickerState);
|
|
15423
15548
|
},
|
|
15424
15549
|
className: "min-w-26",
|
|
15425
15550
|
children: translation("done")
|
|
@@ -15430,7 +15555,7 @@ var DateTimePickerDialog = ({
|
|
|
15430
15555
|
};
|
|
15431
15556
|
|
|
15432
15557
|
// src/hooks/focus/useFocusGuards.ts
|
|
15433
|
-
var
|
|
15558
|
+
var import_react69 = require("react");
|
|
15434
15559
|
var selectorName = "data-hw-focus-guard";
|
|
15435
15560
|
function FocusGuard() {
|
|
15436
15561
|
const element = document.createElement("div");
|
|
@@ -15468,7 +15593,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
15468
15593
|
}
|
|
15469
15594
|
};
|
|
15470
15595
|
var useFocusGuards = () => {
|
|
15471
|
-
(0,
|
|
15596
|
+
(0, import_react69.useEffect)(() => {
|
|
15472
15597
|
FocusGuardsService.getInstance().add();
|
|
15473
15598
|
return () => {
|
|
15474
15599
|
FocusGuardsService.getInstance().remove();
|
|
@@ -15477,10 +15602,10 @@ var useFocusGuards = () => {
|
|
|
15477
15602
|
};
|
|
15478
15603
|
|
|
15479
15604
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
15480
|
-
var
|
|
15605
|
+
var import_react70 = __toESM(require("react"));
|
|
15481
15606
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
15482
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
15483
|
-
(0,
|
|
15607
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react70.default.useState(false);
|
|
15608
|
+
(0, import_react70.useEffect)(() => {
|
|
15484
15609
|
if (disable || hasUsedFocus) {
|
|
15485
15610
|
return;
|
|
15486
15611
|
}
|
|
@@ -15500,11 +15625,11 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
15500
15625
|
};
|
|
15501
15626
|
|
|
15502
15627
|
// src/hooks/focus/useIsMounted.ts
|
|
15503
|
-
var
|
|
15628
|
+
var import_react71 = require("react");
|
|
15504
15629
|
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
15505
|
-
var useIsomorphicEffect = isClient ?
|
|
15630
|
+
var useIsomorphicEffect = isClient ? import_react71.useLayoutEffect : import_react71.useEffect;
|
|
15506
15631
|
var useIsMounted = () => {
|
|
15507
|
-
const [isMounted, setIsMounted] = (0,
|
|
15632
|
+
const [isMounted, setIsMounted] = (0, import_react71.useState)(false);
|
|
15508
15633
|
useIsomorphicEffect(() => {
|
|
15509
15634
|
setIsMounted(true);
|
|
15510
15635
|
return () => {
|
|
@@ -15515,10 +15640,10 @@ var useIsMounted = () => {
|
|
|
15515
15640
|
};
|
|
15516
15641
|
|
|
15517
15642
|
// src/hooks/useHandleRefs.ts
|
|
15518
|
-
var
|
|
15643
|
+
var import_react72 = require("react");
|
|
15519
15644
|
function useHandleRefs(handleRef) {
|
|
15520
|
-
const refs = (0,
|
|
15521
|
-
(0,
|
|
15645
|
+
const refs = (0, import_react72.useRef)([]);
|
|
15646
|
+
(0, import_react72.useEffect)(() => {
|
|
15522
15647
|
refs.current = Object.keys(handleRef?.current ?? {}).map(
|
|
15523
15648
|
() => ({ current: null })
|
|
15524
15649
|
);
|
|
@@ -15531,10 +15656,10 @@ function useHandleRefs(handleRef) {
|
|
|
15531
15656
|
}
|
|
15532
15657
|
|
|
15533
15658
|
// src/hooks/useLogUnstableDependencies.ts
|
|
15534
|
-
var
|
|
15659
|
+
var import_react73 = __toESM(require("react"));
|
|
15535
15660
|
function useLogUnstableDependencies(name, value) {
|
|
15536
|
-
const prev =
|
|
15537
|
-
|
|
15661
|
+
const prev = import_react73.default.useRef(null);
|
|
15662
|
+
import_react73.default.useEffect(() => {
|
|
15538
15663
|
if (!prev.current) {
|
|
15539
15664
|
prev.current = value;
|
|
15540
15665
|
return;
|
|
@@ -15556,10 +15681,10 @@ function useLogUnstableDependencies(name, value) {
|
|
|
15556
15681
|
}
|
|
15557
15682
|
|
|
15558
15683
|
// src/hooks/useOverwritableState.ts
|
|
15559
|
-
var
|
|
15684
|
+
var import_react74 = require("react");
|
|
15560
15685
|
var useOverwritableState = (overwriteValue, onChange) => {
|
|
15561
|
-
const [state, setState] = (0,
|
|
15562
|
-
(0,
|
|
15686
|
+
const [state, setState] = (0, import_react74.useState)(overwriteValue);
|
|
15687
|
+
(0, import_react74.useEffect)(() => {
|
|
15563
15688
|
setState(overwriteValue);
|
|
15564
15689
|
}, [overwriteValue]);
|
|
15565
15690
|
const onChangeWrapper = (action) => {
|
|
@@ -15571,13 +15696,13 @@ var useOverwritableState = (overwriteValue, onChange) => {
|
|
|
15571
15696
|
};
|
|
15572
15697
|
|
|
15573
15698
|
// src/hooks/useRerender.ts
|
|
15574
|
-
var
|
|
15699
|
+
var import_react75 = require("react");
|
|
15575
15700
|
var useRerender = () => {
|
|
15576
|
-
return (0,
|
|
15701
|
+
return (0, import_react75.useReducer)(() => ({}), {})[1];
|
|
15577
15702
|
};
|
|
15578
15703
|
|
|
15579
15704
|
// src/hooks/useSearch.ts
|
|
15580
|
-
var
|
|
15705
|
+
var import_react76 = require("react");
|
|
15581
15706
|
|
|
15582
15707
|
// src/utils/simpleSearch.ts
|
|
15583
15708
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -15616,34 +15741,34 @@ var useSearch = ({
|
|
|
15616
15741
|
filter,
|
|
15617
15742
|
disabled = false
|
|
15618
15743
|
}) => {
|
|
15619
|
-
const [search, setSearch] = (0,
|
|
15620
|
-
const [result, setResult] = (0,
|
|
15621
|
-
const searchTags = (0,
|
|
15622
|
-
const updateSearch = (0,
|
|
15744
|
+
const [search, setSearch] = (0, import_react76.useState)(initialSearch ?? "");
|
|
15745
|
+
const [result, setResult] = (0, import_react76.useState)(list);
|
|
15746
|
+
const searchTags = (0, import_react76.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
15747
|
+
const updateSearch = (0, import_react76.useCallback)((newSearch) => {
|
|
15623
15748
|
const usedSearch = newSearch ?? search;
|
|
15624
15749
|
if (newSearch) {
|
|
15625
15750
|
setSearch(search);
|
|
15626
15751
|
}
|
|
15627
15752
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
15628
15753
|
}, [searchTags, list, search, searchMapping]);
|
|
15629
|
-
(0,
|
|
15754
|
+
(0, import_react76.useEffect)(() => {
|
|
15630
15755
|
if (isSearchInstant) {
|
|
15631
15756
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
15632
15757
|
}
|
|
15633
15758
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
15634
|
-
const filteredResult = (0,
|
|
15759
|
+
const filteredResult = (0, import_react76.useMemo)(() => {
|
|
15635
15760
|
if (!filter) {
|
|
15636
15761
|
return result;
|
|
15637
15762
|
}
|
|
15638
15763
|
return result.filter(filter);
|
|
15639
15764
|
}, [result, filter]);
|
|
15640
|
-
const sortedAndFilteredResult = (0,
|
|
15765
|
+
const sortedAndFilteredResult = (0, import_react76.useMemo)(() => {
|
|
15641
15766
|
if (!sortingFunction) {
|
|
15642
15767
|
return filteredResult;
|
|
15643
15768
|
}
|
|
15644
15769
|
return filteredResult.sort(sortingFunction);
|
|
15645
15770
|
}, [filteredResult, sortingFunction]);
|
|
15646
|
-
const usedResult = (0,
|
|
15771
|
+
const usedResult = (0, import_react76.useMemo)(() => {
|
|
15647
15772
|
if (!disabled) {
|
|
15648
15773
|
return sortedAndFilteredResult;
|
|
15649
15774
|
}
|
|
@@ -15660,23 +15785,23 @@ var useSearch = ({
|
|
|
15660
15785
|
};
|
|
15661
15786
|
|
|
15662
15787
|
// src/hooks/useUpdatingDateString.ts
|
|
15663
|
-
var
|
|
15788
|
+
var import_react77 = require("react");
|
|
15664
15789
|
var useUpdatingDateString = ({ absoluteFormat = "dateTime", localeOverride, date }) => {
|
|
15665
15790
|
const { locale: contextLocale } = useLocale();
|
|
15666
15791
|
const locale = localeOverride ?? contextLocale;
|
|
15667
|
-
const [dateAndTimeStrings, setDateAndTimeStrings] = (0,
|
|
15792
|
+
const [dateAndTimeStrings, setDateAndTimeStrings] = (0, import_react77.useState)({
|
|
15668
15793
|
compareDate: date,
|
|
15669
15794
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat),
|
|
15670
15795
|
relative: DateUtils.formatRelative(date, locale)
|
|
15671
15796
|
});
|
|
15672
|
-
(0,
|
|
15797
|
+
(0, import_react77.useEffect)(() => {
|
|
15673
15798
|
setDateAndTimeStrings({
|
|
15674
15799
|
compareDate: date,
|
|
15675
15800
|
absolute: DateUtils.formatAbsolute(date, locale, absoluteFormat),
|
|
15676
15801
|
relative: DateUtils.formatRelative(date, locale)
|
|
15677
15802
|
});
|
|
15678
15803
|
}, [date, absoluteFormat, locale]);
|
|
15679
|
-
(0,
|
|
15804
|
+
(0, import_react77.useEffect)(() => {
|
|
15680
15805
|
let timeoutId;
|
|
15681
15806
|
const startTimer = () => {
|
|
15682
15807
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -15712,7 +15837,7 @@ var validateEmail = (email) => {
|
|
|
15712
15837
|
};
|
|
15713
15838
|
|
|
15714
15839
|
// src/hooks/useValidators.ts
|
|
15715
|
-
var
|
|
15840
|
+
var import_react78 = require("react");
|
|
15716
15841
|
var notEmpty = (value) => {
|
|
15717
15842
|
if (!value) {
|
|
15718
15843
|
return "notEmpty";
|
|
@@ -15762,7 +15887,7 @@ var UseValidators = {
|
|
|
15762
15887
|
};
|
|
15763
15888
|
var useTranslatedValidators = () => {
|
|
15764
15889
|
const translation = useHightideTranslation();
|
|
15765
|
-
return (0,
|
|
15890
|
+
return (0, import_react78.useMemo)(() => ({
|
|
15766
15891
|
notEmpty: (value) => {
|
|
15767
15892
|
const result = notEmpty(value);
|
|
15768
15893
|
if (result) {
|
|
@@ -15797,7 +15922,7 @@ var useTranslatedValidators = () => {
|
|
|
15797
15922
|
|
|
15798
15923
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
15799
15924
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
15800
|
-
var DateTimeInput = (0,
|
|
15925
|
+
var DateTimeInput = (0, import_react79.forwardRef)(function DateTimeInput2({
|
|
15801
15926
|
id: inputId,
|
|
15802
15927
|
value,
|
|
15803
15928
|
initialValue = null,
|
|
@@ -15809,6 +15934,15 @@ var DateTimeInput = (0, import_react78.forwardRef)(function DateTimeInput2({
|
|
|
15809
15934
|
pickerProps,
|
|
15810
15935
|
outsideClickCloses = true,
|
|
15811
15936
|
onDialogOpeningChange,
|
|
15937
|
+
start,
|
|
15938
|
+
end,
|
|
15939
|
+
weekStart,
|
|
15940
|
+
markToday,
|
|
15941
|
+
is24HourFormat,
|
|
15942
|
+
minuteIncrement,
|
|
15943
|
+
secondIncrement,
|
|
15944
|
+
millisecondIncrement,
|
|
15945
|
+
precision,
|
|
15812
15946
|
disabled = false,
|
|
15813
15947
|
readOnly = false,
|
|
15814
15948
|
invalid = false,
|
|
@@ -15816,37 +15950,37 @@ var DateTimeInput = (0, import_react78.forwardRef)(function DateTimeInput2({
|
|
|
15816
15950
|
...props
|
|
15817
15951
|
}, forwardedRef) {
|
|
15818
15952
|
const translation = useHightideTranslation();
|
|
15819
|
-
const [isOpen, setIsOpen] = (0,
|
|
15953
|
+
const [isOpen, setIsOpen] = (0, import_react79.useState)(false);
|
|
15820
15954
|
const [state, setState] = useControlledState({
|
|
15821
15955
|
value,
|
|
15822
15956
|
onValueChange,
|
|
15823
15957
|
defaultValue: initialValue
|
|
15824
15958
|
});
|
|
15825
|
-
const [dialogValue, setDialogValue] = (0,
|
|
15826
|
-
const [stringInputState, setStringInputState] = (0,
|
|
15827
|
-
state: state ? DateUtils.toInputString(state, mode) : "",
|
|
15959
|
+
const [dialogValue, setDialogValue] = (0, import_react79.useState)(state);
|
|
15960
|
+
const [stringInputState, setStringInputState] = (0, import_react79.useState)({
|
|
15961
|
+
state: state ? DateUtils.toInputString(state, mode, precision) : "",
|
|
15828
15962
|
date: void 0
|
|
15829
15963
|
});
|
|
15830
|
-
(0,
|
|
15831
|
-
setDialogValue(state
|
|
15964
|
+
(0, import_react79.useEffect)(() => {
|
|
15965
|
+
setDialogValue(state);
|
|
15832
15966
|
setStringInputState({
|
|
15833
15967
|
state: state ? DateUtils.toInputString(state, mode) : "",
|
|
15834
15968
|
date: void 0
|
|
15835
15969
|
});
|
|
15836
15970
|
}, [mode, state]);
|
|
15837
|
-
const changeOpenWrapper = (0,
|
|
15971
|
+
const changeOpenWrapper = (0, import_react79.useCallback)((isOpen2) => {
|
|
15838
15972
|
onDialogOpeningChange?.(isOpen2);
|
|
15839
15973
|
setIsOpen(isOpen2);
|
|
15840
15974
|
}, [onDialogOpeningChange]);
|
|
15841
|
-
const generatedId = (0,
|
|
15842
|
-
const ids = (0,
|
|
15975
|
+
const generatedId = (0, import_react79.useId)();
|
|
15976
|
+
const ids = (0, import_react79.useMemo)(() => ({
|
|
15843
15977
|
input: inputId ?? `date-time-input-${generatedId}`,
|
|
15844
15978
|
popup: `date-time-input-popup-${generatedId}`,
|
|
15845
15979
|
label: `date-time-input-label-${generatedId}`
|
|
15846
15980
|
}), [generatedId, inputId]);
|
|
15847
|
-
const innerRef = (0,
|
|
15848
|
-
(0,
|
|
15849
|
-
(0,
|
|
15981
|
+
const innerRef = (0, import_react79.useRef)(null);
|
|
15982
|
+
(0, import_react79.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
15983
|
+
(0, import_react79.useEffect)(() => {
|
|
15850
15984
|
if (readOnly || disabled) {
|
|
15851
15985
|
changeOpenWrapper(false);
|
|
15852
15986
|
}
|
|
@@ -15865,8 +15999,9 @@ var DateTimeInput = (0, import_react78.forwardRef)(function DateTimeInput2({
|
|
|
15865
15999
|
id: ids.input,
|
|
15866
16000
|
value: stringInputState.state,
|
|
15867
16001
|
onChange: (event) => {
|
|
15868
|
-
const date = event.target.
|
|
15869
|
-
|
|
16002
|
+
const date = new Date(event.target.value ?? "");
|
|
16003
|
+
const isValid = !isNaN(date.getTime());
|
|
16004
|
+
if (isValid) {
|
|
15870
16005
|
restartTimer(() => {
|
|
15871
16006
|
innerRef.current?.blur();
|
|
15872
16007
|
setState(date);
|
|
@@ -15877,7 +16012,7 @@ var DateTimeInput = (0, import_react78.forwardRef)(function DateTimeInput2({
|
|
|
15877
16012
|
}
|
|
15878
16013
|
setStringInputState({
|
|
15879
16014
|
state: event.target.value,
|
|
15880
|
-
date:
|
|
16015
|
+
date: isValid ? date : void 0
|
|
15881
16016
|
});
|
|
15882
16017
|
},
|
|
15883
16018
|
onBlur: (event) => {
|
|
@@ -15953,7 +16088,16 @@ var DateTimeInput = (0, import_react78.forwardRef)(function DateTimeInput2({
|
|
|
15953
16088
|
changeOpenWrapper(false);
|
|
15954
16089
|
},
|
|
15955
16090
|
pickerProps,
|
|
15956
|
-
mode
|
|
16091
|
+
mode,
|
|
16092
|
+
start,
|
|
16093
|
+
end,
|
|
16094
|
+
weekStart,
|
|
16095
|
+
markToday,
|
|
16096
|
+
is24HourFormat,
|
|
16097
|
+
minuteIncrement,
|
|
16098
|
+
secondIncrement,
|
|
16099
|
+
millisecondIncrement,
|
|
16100
|
+
precision
|
|
15957
16101
|
}
|
|
15958
16102
|
)
|
|
15959
16103
|
}
|
|
@@ -15962,12 +16106,12 @@ var DateTimeInput = (0, import_react78.forwardRef)(function DateTimeInput2({
|
|
|
15962
16106
|
});
|
|
15963
16107
|
|
|
15964
16108
|
// src/components/layout/table/TableFilterPopups.tsx
|
|
15965
|
-
var
|
|
16109
|
+
var import_react82 = require("react");
|
|
15966
16110
|
|
|
15967
16111
|
// src/components/user-interaction/select/MultiSelect.tsx
|
|
15968
|
-
var
|
|
16112
|
+
var import_react80 = require("react");
|
|
15969
16113
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
15970
|
-
var MultiSelect = (0,
|
|
16114
|
+
var MultiSelect = (0, import_react80.forwardRef)(function MultiSelect2({
|
|
15971
16115
|
children,
|
|
15972
16116
|
contentPanelProps,
|
|
15973
16117
|
buttonProps,
|
|
@@ -15984,7 +16128,7 @@ var import_lucide_react18 = require("lucide-react");
|
|
|
15984
16128
|
|
|
15985
16129
|
// src/components/user-interaction/Checkbox.tsx
|
|
15986
16130
|
var import_lucide_react17 = require("lucide-react");
|
|
15987
|
-
var
|
|
16131
|
+
var import_react81 = require("react");
|
|
15988
16132
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
15989
16133
|
var Checkbox = ({
|
|
15990
16134
|
value: controlledValue,
|
|
@@ -16002,7 +16146,7 @@ var Checkbox = ({
|
|
|
16002
16146
|
}) => {
|
|
16003
16147
|
const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
|
|
16004
16148
|
const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
|
|
16005
|
-
const onChangeWrapper = (0,
|
|
16149
|
+
const onChangeWrapper = (0, import_react81.useCallback)((value2) => {
|
|
16006
16150
|
onValueChangeStable(value2);
|
|
16007
16151
|
onEditCompleteStable(value2);
|
|
16008
16152
|
}, [onValueChangeStable, onEditCompleteStable]);
|
|
@@ -16224,8 +16368,8 @@ var TextFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16224
16368
|
const translation = useHightideTranslation();
|
|
16225
16369
|
const operator = filterValue?.operator ?? "textContains";
|
|
16226
16370
|
const parameter = filterValue?.parameter ?? {};
|
|
16227
|
-
const id = (0,
|
|
16228
|
-
const availableOperators = (0,
|
|
16371
|
+
const id = (0, import_react82.useId)();
|
|
16372
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16229
16373
|
...TableFilterOperator.text,
|
|
16230
16374
|
...TableFilterOperator.generic
|
|
16231
16375
|
], []);
|
|
@@ -16285,7 +16429,7 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16285
16429
|
const translation = useHightideTranslation();
|
|
16286
16430
|
const operator = filterValue?.operator ?? "numberBetween";
|
|
16287
16431
|
const parameter = filterValue?.parameter ?? {};
|
|
16288
|
-
const availableOperators = (0,
|
|
16432
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16289
16433
|
...TableFilterOperator.number,
|
|
16290
16434
|
...TableFilterOperator.generic
|
|
16291
16435
|
], []);
|
|
@@ -16368,7 +16512,7 @@ var NumberFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16368
16512
|
};
|
|
16369
16513
|
var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
16370
16514
|
const translation = useHightideTranslation();
|
|
16371
|
-
const id = (0,
|
|
16515
|
+
const id = (0, import_react82.useId)();
|
|
16372
16516
|
const ids = {
|
|
16373
16517
|
startDate: `date-filter-start-date-${id}`,
|
|
16374
16518
|
endDate: `date-filter-end-date-${id}`,
|
|
@@ -16376,9 +16520,9 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16376
16520
|
};
|
|
16377
16521
|
const operator = filterValue?.operator ?? "dateBetween";
|
|
16378
16522
|
const parameter = filterValue?.parameter ?? {};
|
|
16379
|
-
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0,
|
|
16380
|
-
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0,
|
|
16381
|
-
const availableOperators = (0,
|
|
16523
|
+
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react82.useState)(null);
|
|
16524
|
+
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react82.useState)(null);
|
|
16525
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16382
16526
|
...TableFilterOperator.date,
|
|
16383
16527
|
...TableFilterOperator.generic
|
|
16384
16528
|
], []);
|
|
@@ -16493,7 +16637,7 @@ var DateFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16493
16637
|
};
|
|
16494
16638
|
var DatetimeFilter = ({ filterValue, onFilterValueChange }) => {
|
|
16495
16639
|
const translation = useHightideTranslation();
|
|
16496
|
-
const id = (0,
|
|
16640
|
+
const id = (0, import_react82.useId)();
|
|
16497
16641
|
const ids = {
|
|
16498
16642
|
startDate: `datetime-filter-start-date-${id}`,
|
|
16499
16643
|
endDate: `datetime-filter-end-date-${id}`,
|
|
@@ -16501,9 +16645,9 @@ var DatetimeFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16501
16645
|
};
|
|
16502
16646
|
const operator = filterValue?.operator ?? "dateTimeBetween";
|
|
16503
16647
|
const parameter = filterValue?.parameter ?? {};
|
|
16504
|
-
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0,
|
|
16505
|
-
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0,
|
|
16506
|
-
const availableOperators = (0,
|
|
16648
|
+
const [temporaryMinDateValue, setTemporaryMinDateValue] = (0, import_react82.useState)(null);
|
|
16649
|
+
const [temporaryMaxDateValue, setTemporaryMaxDateValue] = (0, import_react82.useState)(null);
|
|
16650
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16507
16651
|
...TableFilterOperator.dateTime,
|
|
16508
16652
|
...TableFilterOperator.generic
|
|
16509
16653
|
], []);
|
|
@@ -16620,7 +16764,7 @@ var DatetimeFilter = ({ filterValue, onFilterValueChange }) => {
|
|
|
16620
16764
|
};
|
|
16621
16765
|
var BooleanFilter = ({ filterValue, onFilterValueChange }) => {
|
|
16622
16766
|
const operator = filterValue?.operator ?? "booleanIsTrue";
|
|
16623
|
-
const availableOperators = (0,
|
|
16767
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16624
16768
|
...TableFilterOperator.boolean,
|
|
16625
16769
|
...TableFilterOperator.generic
|
|
16626
16770
|
], []);
|
|
@@ -16644,11 +16788,11 @@ var TagsFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
16644
16788
|
const { table } = useTableStateWithoutSizingContext();
|
|
16645
16789
|
const operator = filterValue?.operator ?? "tagsContains";
|
|
16646
16790
|
const parameter = filterValue?.parameter ?? {};
|
|
16647
|
-
const availableOperators = (0,
|
|
16791
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16648
16792
|
...TableFilterOperator.multiTags,
|
|
16649
16793
|
...TableFilterOperator.generic
|
|
16650
16794
|
], []);
|
|
16651
|
-
const availableTags = (0,
|
|
16795
|
+
const availableTags = (0, import_react82.useMemo)(() => {
|
|
16652
16796
|
const column = table.getColumn(columnId);
|
|
16653
16797
|
if (!column) return [];
|
|
16654
16798
|
return column.columnDef.meta?.filterData?.tags ?? [];
|
|
@@ -16695,11 +16839,11 @@ var TagsSingleFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
16695
16839
|
const { table } = useTableStateWithoutSizingContext();
|
|
16696
16840
|
const operator = filterValue?.operator ?? "tagsSingleContains";
|
|
16697
16841
|
const parameter = filterValue?.parameter ?? {};
|
|
16698
|
-
const availableOperators = (0,
|
|
16842
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16699
16843
|
...TableFilterOperator.singleTag,
|
|
16700
16844
|
...TableFilterOperator.generic
|
|
16701
16845
|
], []);
|
|
16702
|
-
const availableTags = (0,
|
|
16846
|
+
const availableTags = (0, import_react82.useMemo)(() => {
|
|
16703
16847
|
const column = table.getColumn(columnId);
|
|
16704
16848
|
if (!column) return [];
|
|
16705
16849
|
return column.columnDef.meta?.filterData?.tags ?? [];
|
|
@@ -16758,7 +16902,7 @@ var TagsSingleFilter = ({ columnId, filterValue, onFilterValueChange }) => {
|
|
|
16758
16902
|
};
|
|
16759
16903
|
var GenericFilter = ({ filterValue, onFilterValueChange }) => {
|
|
16760
16904
|
const operator = filterValue?.operator ?? "notUndefined";
|
|
16761
|
-
const availableOperators = (0,
|
|
16905
|
+
const availableOperators = (0, import_react82.useMemo)(() => [
|
|
16762
16906
|
...TableFilterOperator.generic
|
|
16763
16907
|
], []);
|
|
16764
16908
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex-col-2 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
@@ -16807,18 +16951,18 @@ var TableFilterButton = ({
|
|
|
16807
16951
|
}) => {
|
|
16808
16952
|
const translation = useHightideTranslation();
|
|
16809
16953
|
const columnFilterValue = column.getFilterValue();
|
|
16810
|
-
const [filterValue, setFilterValue] = (0,
|
|
16954
|
+
const [filterValue, setFilterValue] = (0, import_react83.useState)(columnFilterValue);
|
|
16811
16955
|
const hasFilter = !!filterValue;
|
|
16812
|
-
const anchorRef = (0,
|
|
16813
|
-
const containerRef = (0,
|
|
16814
|
-
const [isOpen, setIsOpen] = (0,
|
|
16815
|
-
const id = (0,
|
|
16816
|
-
const ids = (0,
|
|
16956
|
+
const anchorRef = (0, import_react83.useRef)(null);
|
|
16957
|
+
const containerRef = (0, import_react83.useRef)(null);
|
|
16958
|
+
const [isOpen, setIsOpen] = (0, import_react83.useState)(false);
|
|
16959
|
+
const id = (0, import_react83.useId)();
|
|
16960
|
+
const ids = (0, import_react83.useMemo)(() => ({
|
|
16817
16961
|
button: `table-filter-button-${id}`,
|
|
16818
16962
|
popup: `table-filter-popup-${id}`,
|
|
16819
16963
|
label: `table-filter-label-${id}`
|
|
16820
16964
|
}), [id]);
|
|
16821
|
-
(0,
|
|
16965
|
+
(0, import_react83.useEffect)(() => {
|
|
16822
16966
|
setFilterValue(columnFilterValue);
|
|
16823
16967
|
}, [columnFilterValue]);
|
|
16824
16968
|
const isTagsFilter = filterType === "multiTags" || filterType === "singleTag";
|
|
@@ -16893,11 +17037,11 @@ var TableFilterButton = ({
|
|
|
16893
17037
|
};
|
|
16894
17038
|
|
|
16895
17039
|
// src/components/layout/table/TableHeader.tsx
|
|
16896
|
-
var
|
|
17040
|
+
var import_react84 = require("react");
|
|
16897
17041
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
16898
17042
|
var TableHeader = ({ isSticky = false }) => {
|
|
16899
17043
|
const { table } = useTableStateWithoutSizingContext();
|
|
16900
|
-
const handleResizeMove = (0,
|
|
17044
|
+
const handleResizeMove = (0, import_react84.useCallback)((e) => {
|
|
16901
17045
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
16902
17046
|
const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
|
|
16903
17047
|
const deltaOffset = currentX - (table.getState().columnSizingInfo.startOffset ?? 0);
|
|
@@ -16913,7 +17057,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
16913
17057
|
deltaOffset
|
|
16914
17058
|
}));
|
|
16915
17059
|
}, [table]);
|
|
16916
|
-
const handleResizeEnd = (0,
|
|
17060
|
+
const handleResizeEnd = (0, import_react84.useCallback)(() => {
|
|
16917
17061
|
if (!table.getState().columnSizingInfo.isResizingColumn) return;
|
|
16918
17062
|
const newWidth = (table.getState().columnSizingInfo.startSize ?? 0) + (table.getState().columnSizingInfo.deltaOffset ?? 0);
|
|
16919
17063
|
table.setColumnSizing((prev) => {
|
|
@@ -16931,7 +17075,7 @@ var TableHeader = ({ isSticky = false }) => {
|
|
|
16931
17075
|
startSize: null
|
|
16932
17076
|
});
|
|
16933
17077
|
}, [table]);
|
|
16934
|
-
(0,
|
|
17078
|
+
(0, import_react84.useEffect)(() => {
|
|
16935
17079
|
window.addEventListener("pointermove", handleResizeMove);
|
|
16936
17080
|
window.addEventListener("pointerup", handleResizeEnd);
|
|
16937
17081
|
return () => {
|
|
@@ -17100,7 +17244,7 @@ var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props
|
|
|
17100
17244
|
};
|
|
17101
17245
|
|
|
17102
17246
|
// src/components/layout/table/TableWithSelectionProvider.tsx
|
|
17103
|
-
var
|
|
17247
|
+
var import_react85 = require("react");
|
|
17104
17248
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
17105
17249
|
var TableWithSelectionProvider = ({
|
|
17106
17250
|
children,
|
|
@@ -17113,7 +17257,7 @@ var TableWithSelectionProvider = ({
|
|
|
17113
17257
|
...props
|
|
17114
17258
|
}) => {
|
|
17115
17259
|
const translation = useHightideTranslation();
|
|
17116
|
-
const columnDef = (0,
|
|
17260
|
+
const columnDef = (0, import_react85.useMemo)(() => [
|
|
17117
17261
|
{
|
|
17118
17262
|
id: selectionRowId,
|
|
17119
17263
|
header: ({ table }) => {
|
|
@@ -17156,7 +17300,7 @@ var TableWithSelectionProvider = ({
|
|
|
17156
17300
|
TableProvider,
|
|
17157
17301
|
{
|
|
17158
17302
|
...props,
|
|
17159
|
-
fillerRowCell: (0,
|
|
17303
|
+
fillerRowCell: (0, import_react85.useCallback)((columnId, table) => {
|
|
17160
17304
|
if (columnId === selectionRowId) {
|
|
17161
17305
|
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Checkbox, { value: false, disabled: true });
|
|
17162
17306
|
}
|
|
@@ -17174,7 +17318,7 @@ var TableWithSelectionProvider = ({
|
|
|
17174
17318
|
rowSelection,
|
|
17175
17319
|
...state
|
|
17176
17320
|
},
|
|
17177
|
-
onRowClick: (0,
|
|
17321
|
+
onRowClick: (0, import_react85.useCallback)((row, table) => {
|
|
17178
17322
|
if (!disableClickRowClickSelection) {
|
|
17179
17323
|
row.toggleSelected();
|
|
17180
17324
|
}
|
|
@@ -17216,7 +17360,7 @@ var TableWithSelection = ({
|
|
|
17216
17360
|
};
|
|
17217
17361
|
|
|
17218
17362
|
// src/components/layout/table/TableColumn.tsx
|
|
17219
|
-
var
|
|
17363
|
+
var import_react86 = require("react");
|
|
17220
17364
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
17221
17365
|
var TableColumnComponent = ({
|
|
17222
17366
|
filterType,
|
|
@@ -17228,11 +17372,11 @@ var TableColumnComponent = ({
|
|
|
17228
17372
|
"TableColumn: For filterType === multiTags or singleTag, filterData.tags must be set.",
|
|
17229
17373
|
(filterType === "multiTags" || filterType === "singleTag") && props.meta?.filterData?.tags === void 0
|
|
17230
17374
|
);
|
|
17231
|
-
const [column] = (0,
|
|
17375
|
+
const [column] = (0, import_react86.useState)({
|
|
17232
17376
|
...props,
|
|
17233
17377
|
filterFn
|
|
17234
17378
|
});
|
|
17235
|
-
(0,
|
|
17379
|
+
(0, import_react86.useEffect)(() => {
|
|
17236
17380
|
const unsubscribe = registerColumn(column);
|
|
17237
17381
|
return () => {
|
|
17238
17382
|
unsubscribe();
|
|
@@ -17240,34 +17384,34 @@ var TableColumnComponent = ({
|
|
|
17240
17384
|
}, [registerColumn, column]);
|
|
17241
17385
|
return null;
|
|
17242
17386
|
};
|
|
17243
|
-
var TableColumnFactory = () => (0,
|
|
17387
|
+
var TableColumnFactory = () => (0, import_react86.memo)(
|
|
17244
17388
|
TableColumnComponent,
|
|
17245
17389
|
(prevProps, nextProps) => {
|
|
17246
17390
|
return prevProps.filterType === nextProps.filterType && prevProps.id === nextProps.id && prevProps["accessorKey"] === nextProps["accessorKey"] && prevProps.enableColumnFilter === nextProps.enableColumnFilter && prevProps.enableGlobalFilter === nextProps.enableGlobalFilter && prevProps.enableGrouping === nextProps.enableGrouping && prevProps.enableHiding === nextProps.enableHiding && prevProps.enablePinning === nextProps.enablePinning && prevProps.enableResizing === nextProps.enableResizing && prevProps.enableSorting === nextProps.enableSorting && prevProps.meta === nextProps.meta, prevProps.cell === nextProps.cell;
|
|
17247
17391
|
}
|
|
17248
17392
|
);
|
|
17249
17393
|
var TableColumn = (props) => {
|
|
17250
|
-
const TableColumnComponent2 = (0,
|
|
17394
|
+
const TableColumnComponent2 = (0, import_react86.useMemo)(() => TableColumnFactory(), []);
|
|
17251
17395
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TableColumnComponent2, { ...props });
|
|
17252
17396
|
};
|
|
17253
17397
|
|
|
17254
17398
|
// src/components/layout/table/TableColumnSwitcher.tsx
|
|
17255
|
-
var
|
|
17399
|
+
var import_react87 = require("react");
|
|
17256
17400
|
var import_lucide_react20 = require("lucide-react");
|
|
17257
17401
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
17258
17402
|
var TableColumnSwitcherPopUp = ({ ...props }) => {
|
|
17259
17403
|
const { table } = useTableStateWithoutSizingContext();
|
|
17260
17404
|
const translation = useHightideTranslation();
|
|
17261
|
-
const containerRef = (0,
|
|
17262
|
-
const generatedId = (0,
|
|
17263
|
-
const ids = (0,
|
|
17405
|
+
const containerRef = (0, import_react87.useRef)(null);
|
|
17406
|
+
const generatedId = (0, import_react87.useId)();
|
|
17407
|
+
const ids = (0, import_react87.useMemo)(() => ({
|
|
17264
17408
|
popup: props.id ?? `table-column-picker-popup-${generatedId}`,
|
|
17265
17409
|
label: `table-column-picker-label-${generatedId}`
|
|
17266
17410
|
}), [generatedId, props.id]);
|
|
17267
17411
|
const tableState = table.getState();
|
|
17268
17412
|
const columnOrder = tableState.columnOrder;
|
|
17269
17413
|
const columnPinning = tableState.columnPinning;
|
|
17270
|
-
const columns = (0,
|
|
17414
|
+
const columns = (0, import_react87.useMemo)(() => {
|
|
17271
17415
|
const allColumns = table.getAllColumns();
|
|
17272
17416
|
const leftPinned = [];
|
|
17273
17417
|
const unpinned = [];
|
|
@@ -17525,7 +17669,7 @@ var TableColumnSwitcher = ({ buttonProps, ...props }) => {
|
|
|
17525
17669
|
};
|
|
17526
17670
|
|
|
17527
17671
|
// src/components/user-interaction/CopyToClipboardWrapper.tsx
|
|
17528
|
-
var
|
|
17672
|
+
var import_react88 = require("react");
|
|
17529
17673
|
var import_clsx28 = require("clsx");
|
|
17530
17674
|
|
|
17531
17675
|
// src/utils/writeToClipboard.ts
|
|
@@ -17548,7 +17692,7 @@ var CopyToClipboardWrapper = ({
|
|
|
17548
17692
|
...props
|
|
17549
17693
|
}) => {
|
|
17550
17694
|
const translation = useHightideTranslation();
|
|
17551
|
-
const [isShowingConfirmation, setIsShowingConfirmation] = (0,
|
|
17695
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react88.useState)(false);
|
|
17552
17696
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
17553
17697
|
TooltipRoot,
|
|
17554
17698
|
{
|
|
@@ -17597,7 +17741,7 @@ var CopyToClipboardWrapper = ({
|
|
|
17597
17741
|
};
|
|
17598
17742
|
|
|
17599
17743
|
// src/components/user-interaction/Menu.tsx
|
|
17600
|
-
var
|
|
17744
|
+
var import_react89 = require("react");
|
|
17601
17745
|
var import_clsx29 = __toESM(require("clsx"));
|
|
17602
17746
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
17603
17747
|
var MenuItem = ({
|
|
@@ -17623,8 +17767,8 @@ var Menu = ({
|
|
|
17623
17767
|
disabled = false,
|
|
17624
17768
|
...props
|
|
17625
17769
|
}) => {
|
|
17626
|
-
const triggerRef = (0,
|
|
17627
|
-
const [isOpen, setIsOpen] = (0,
|
|
17770
|
+
const triggerRef = (0, import_react89.useRef)(null);
|
|
17771
|
+
const [isOpen, setIsOpen] = (0, import_react89.useState)(false);
|
|
17628
17772
|
const bag = {
|
|
17629
17773
|
isOpen,
|
|
17630
17774
|
close: () => setIsOpen(false),
|
|
@@ -17632,7 +17776,7 @@ var Menu = ({
|
|
|
17632
17776
|
disabled
|
|
17633
17777
|
};
|
|
17634
17778
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
17635
|
-
trigger(bag, (0,
|
|
17779
|
+
trigger(bag, (0, import_react89.useCallback)((el) => triggerRef.current = el, [])),
|
|
17636
17780
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17637
17781
|
PopUp,
|
|
17638
17782
|
{
|
|
@@ -17654,7 +17798,7 @@ var Menu = ({
|
|
|
17654
17798
|
};
|
|
17655
17799
|
|
|
17656
17800
|
// src/components/user-interaction/ScrollPicker.tsx
|
|
17657
|
-
var
|
|
17801
|
+
var import_react90 = require("react");
|
|
17658
17802
|
var import_clsx30 = __toESM(require("clsx"));
|
|
17659
17803
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
17660
17804
|
var up = 1;
|
|
@@ -17675,7 +17819,7 @@ var ScrollPicker = ({
|
|
|
17675
17819
|
transition,
|
|
17676
17820
|
items,
|
|
17677
17821
|
lastTimeStamp
|
|
17678
|
-
}, setAnimation] = (0,
|
|
17822
|
+
}, setAnimation] = (0, import_react90.useState)({
|
|
17679
17823
|
targetIndex: selectedIndex,
|
|
17680
17824
|
currentIndex: disabled ? selectedIndex : 0,
|
|
17681
17825
|
velocity: 0,
|
|
@@ -17691,7 +17835,7 @@ var ScrollPicker = ({
|
|
|
17691
17835
|
const itemHeight = 40;
|
|
17692
17836
|
const distance = 8;
|
|
17693
17837
|
const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
|
|
17694
|
-
const getDirection = (0,
|
|
17838
|
+
const getDirection = (0, import_react90.useCallback)((targetIndex, currentIndex2, transition2, length) => {
|
|
17695
17839
|
if (targetIndex === currentIndex2) {
|
|
17696
17840
|
return transition2 > 0 ? up : down;
|
|
17697
17841
|
}
|
|
@@ -17701,7 +17845,7 @@ var ScrollPicker = ({
|
|
|
17701
17845
|
}
|
|
17702
17846
|
return distanceForward >= length / 2 ? down : up;
|
|
17703
17847
|
}, []);
|
|
17704
|
-
const animate = (0,
|
|
17848
|
+
const animate = (0, import_react90.useCallback)((timestamp, startTime) => {
|
|
17705
17849
|
setAnimation((prevState) => {
|
|
17706
17850
|
const {
|
|
17707
17851
|
targetIndex,
|
|
@@ -17774,7 +17918,7 @@ var ScrollPicker = ({
|
|
|
17774
17918
|
};
|
|
17775
17919
|
});
|
|
17776
17920
|
}, [disabled, getDirection, onChange]);
|
|
17777
|
-
(0,
|
|
17921
|
+
(0, import_react90.useEffect)(() => {
|
|
17778
17922
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
17779
17923
|
});
|
|
17780
17924
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -17852,7 +17996,7 @@ var ScrollPicker = ({
|
|
|
17852
17996
|
};
|
|
17853
17997
|
|
|
17854
17998
|
// src/components/user-interaction/Switch.tsx
|
|
17855
|
-
var
|
|
17999
|
+
var import_react91 = require("react");
|
|
17856
18000
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
17857
18001
|
var Switch = ({
|
|
17858
18002
|
value: controlledValue,
|
|
@@ -17867,7 +18011,7 @@ var Switch = ({
|
|
|
17867
18011
|
}) => {
|
|
17868
18012
|
const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
|
|
17869
18013
|
const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
|
|
17870
|
-
const onChangeWrapper = (0,
|
|
18014
|
+
const onChangeWrapper = (0, import_react91.useCallback)((value2) => {
|
|
17871
18015
|
onValueChangeStable(!value2);
|
|
17872
18016
|
onEditCompleteStable(!value2);
|
|
17873
18017
|
}, [onValueChangeStable, onEditCompleteStable]);
|
|
@@ -17907,10 +18051,10 @@ var Switch = ({
|
|
|
17907
18051
|
};
|
|
17908
18052
|
|
|
17909
18053
|
// src/components/user-interaction/Textarea.tsx
|
|
17910
|
-
var
|
|
18054
|
+
var import_react92 = require("react");
|
|
17911
18055
|
var import_clsx31 = __toESM(require("clsx"));
|
|
17912
18056
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
17913
|
-
var Textarea = (0,
|
|
18057
|
+
var Textarea = (0, import_react92.forwardRef)(function Textarea2({
|
|
17914
18058
|
value: controlledValue,
|
|
17915
18059
|
initialValue,
|
|
17916
18060
|
invalid = false,
|
|
@@ -17926,7 +18070,7 @@ var Textarea = (0, import_react91.forwardRef)(function Textarea2({
|
|
|
17926
18070
|
});
|
|
17927
18071
|
const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
|
|
17928
18072
|
const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
|
|
17929
|
-
const onEditCompleteWrapper = (0,
|
|
18073
|
+
const onEditCompleteWrapper = (0, import_react92.useCallback)((text) => {
|
|
17930
18074
|
onEditCompleteStable(text);
|
|
17931
18075
|
clearTimer();
|
|
17932
18076
|
}, [onEditCompleteStable, clearTimer]);
|
|
@@ -17964,7 +18108,7 @@ var TextareaWithHeadline = ({
|
|
|
17964
18108
|
containerClassName,
|
|
17965
18109
|
...props
|
|
17966
18110
|
}) => {
|
|
17967
|
-
const genId = (0,
|
|
18111
|
+
const genId = (0, import_react92.useId)();
|
|
17968
18112
|
const usedId = id ?? genId;
|
|
17969
18113
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
17970
18114
|
"div",
|
|
@@ -18037,11 +18181,11 @@ var TimeDisplay = ({
|
|
|
18037
18181
|
};
|
|
18038
18182
|
|
|
18039
18183
|
// src/components/user-interaction/input/InsideLabelInput.tsx
|
|
18040
|
-
var import_react92 = require("react");
|
|
18041
18184
|
var import_react93 = require("react");
|
|
18185
|
+
var import_react94 = require("react");
|
|
18042
18186
|
var import_clsx32 = __toESM(require("clsx"));
|
|
18043
18187
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
18044
|
-
var InsideLabelInput = (0,
|
|
18188
|
+
var InsideLabelInput = (0, import_react94.forwardRef)(function InsideLabelInput2({
|
|
18045
18189
|
id: customId,
|
|
18046
18190
|
value: controlledValue,
|
|
18047
18191
|
initialValue,
|
|
@@ -18054,8 +18198,8 @@ var InsideLabelInput = (0, import_react93.forwardRef)(function InsideLabelInput2
|
|
|
18054
18198
|
onValueChange,
|
|
18055
18199
|
defaultValue: initialValue
|
|
18056
18200
|
});
|
|
18057
|
-
const [isFocused, setIsFocused] = (0,
|
|
18058
|
-
const generatedId = (0,
|
|
18201
|
+
const [isFocused, setIsFocused] = (0, import_react94.useState)(false);
|
|
18202
|
+
const generatedId = (0, import_react93.useId)();
|
|
18059
18203
|
const id = customId ?? generatedId;
|
|
18060
18204
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: (0, import_clsx32.default)("relative"), children: [
|
|
18061
18205
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
@@ -18144,11 +18288,11 @@ var SearchBar = ({
|
|
|
18144
18288
|
};
|
|
18145
18289
|
|
|
18146
18290
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
18147
|
-
var
|
|
18291
|
+
var import_react95 = require("react");
|
|
18148
18292
|
var import_lucide_react23 = require("lucide-react");
|
|
18149
18293
|
var import_clsx34 = __toESM(require("clsx"));
|
|
18150
18294
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
18151
|
-
var ToggleableInput = (0,
|
|
18295
|
+
var ToggleableInput = (0, import_react95.forwardRef)(function ToggleableInput2({
|
|
18152
18296
|
value: controlledValue,
|
|
18153
18297
|
initialValue,
|
|
18154
18298
|
onValueChange,
|
|
@@ -18161,10 +18305,10 @@ var ToggleableInput = (0, import_react94.forwardRef)(function ToggleableInput2({
|
|
|
18161
18305
|
onValueChange,
|
|
18162
18306
|
defaultValue: initialValue
|
|
18163
18307
|
});
|
|
18164
|
-
const [isEditing, setIsEditing] = (0,
|
|
18165
|
-
const innerRef = (0,
|
|
18166
|
-
(0,
|
|
18167
|
-
(0,
|
|
18308
|
+
const [isEditing, setIsEditing] = (0, import_react95.useState)(initialState !== "display");
|
|
18309
|
+
const innerRef = (0, import_react95.useRef)(null);
|
|
18310
|
+
(0, import_react95.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
18311
|
+
(0, import_react95.useEffect)(() => {
|
|
18168
18312
|
if (isEditing) {
|
|
18169
18313
|
innerRef.current?.focus();
|
|
18170
18314
|
}
|
|
@@ -18374,17 +18518,17 @@ var DateProperty = ({
|
|
|
18374
18518
|
var import_lucide_react28 = require("lucide-react");
|
|
18375
18519
|
|
|
18376
18520
|
// src/components/user-interaction/select/MultiSelectChipDisplay.tsx
|
|
18377
|
-
var
|
|
18521
|
+
var import_react96 = require("react");
|
|
18378
18522
|
var import_lucide_react27 = require("lucide-react");
|
|
18379
18523
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
18380
|
-
var MultiSelectChipDisplayButton = (0,
|
|
18524
|
+
var MultiSelectChipDisplayButton = (0, import_react96.forwardRef)(function MultiSelectChipDisplayButton2({
|
|
18381
18525
|
id,
|
|
18382
18526
|
...props
|
|
18383
18527
|
}, ref) {
|
|
18384
18528
|
const translation = useHightideTranslation();
|
|
18385
18529
|
const { state, trigger, item, ids, setIds } = useSelectContext();
|
|
18386
18530
|
const { register, unregister, toggleOpen } = trigger;
|
|
18387
|
-
(0,
|
|
18531
|
+
(0, import_react96.useEffect)(() => {
|
|
18388
18532
|
if (id) {
|
|
18389
18533
|
setIds((prev) => ({
|
|
18390
18534
|
...prev,
|
|
@@ -18392,9 +18536,9 @@ var MultiSelectChipDisplayButton = (0, import_react95.forwardRef)(function Multi
|
|
|
18392
18536
|
}));
|
|
18393
18537
|
}
|
|
18394
18538
|
}, [id, setIds]);
|
|
18395
|
-
const innerRef = (0,
|
|
18396
|
-
(0,
|
|
18397
|
-
(0,
|
|
18539
|
+
const innerRef = (0, import_react96.useRef)(null);
|
|
18540
|
+
(0, import_react96.useImperativeHandle)(ref, () => innerRef.current);
|
|
18541
|
+
(0, import_react96.useEffect)(() => {
|
|
18398
18542
|
register(innerRef);
|
|
18399
18543
|
return () => unregister();
|
|
18400
18544
|
}, [register, unregister]);
|
|
@@ -18466,7 +18610,7 @@ var MultiSelectChipDisplayButton = (0, import_react95.forwardRef)(function Multi
|
|
|
18466
18610
|
}
|
|
18467
18611
|
);
|
|
18468
18612
|
});
|
|
18469
|
-
var MultiSelectChipDisplay = (0,
|
|
18613
|
+
var MultiSelectChipDisplay = (0, import_react96.forwardRef)(function MultiSelectChipDisplay2({
|
|
18470
18614
|
children,
|
|
18471
18615
|
contentPanelProps,
|
|
18472
18616
|
chipDisplayProps,
|
|
@@ -18680,16 +18824,16 @@ var TextProperty = ({
|
|
|
18680
18824
|
};
|
|
18681
18825
|
|
|
18682
18826
|
// src/components/utils/Transition.tsx
|
|
18683
|
-
var
|
|
18827
|
+
var import_react97 = require("react");
|
|
18684
18828
|
function Transition({
|
|
18685
18829
|
children,
|
|
18686
18830
|
show,
|
|
18687
18831
|
includeAnimation = true
|
|
18688
18832
|
}) {
|
|
18689
|
-
const [isOpen, setIsOpen] = (0,
|
|
18690
|
-
const [isTransitioning, setIsTransitioning] = (0,
|
|
18833
|
+
const [isOpen, setIsOpen] = (0, import_react97.useState)(show);
|
|
18834
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react97.useState)(!isOpen);
|
|
18691
18835
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
18692
|
-
(0,
|
|
18836
|
+
(0, import_react97.useEffect)(() => {
|
|
18693
18837
|
setIsOpen(show);
|
|
18694
18838
|
setIsTransitioning(true);
|
|
18695
18839
|
}, [show]);
|