@cwellt_software/cwellt-reactjs-lib 1.4.7 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1621,48 +1621,6 @@ const CwModalHover = ({ children, hovereable, onFirstOpened, ...dialogProps }) =
1621
1621
  }, children: children })] }));
1622
1622
  };
1623
1623
 
1624
- class CwDialogManager {
1625
- static openDialogs = new Map();
1626
- static OpenDialog(id, props) {
1627
- if (!CwDialogManager.openDialogs.has(id)) {
1628
- const container = document.createElement("div");
1629
- document.body.appendChild(container);
1630
- const root = createRoot(container);
1631
- root.render(jsx(CwDialog, { ...props }));
1632
- CwDialogManager.openDialogs.set(id, { props, container });
1633
- }
1634
- }
1635
- static CloseDialog(id) {
1636
- const dialog = CwDialogManager.openDialogs.get(id);
1637
- if (dialog) {
1638
- const root = createRoot(dialog.container);
1639
- root.unmount();
1640
- dialog.container.remove();
1641
- CwDialogManager.openDialogs.delete(id);
1642
- }
1643
- }
1644
- static CloseAllDialogs() {
1645
- CwDialogManager.openDialogs.forEach((_dialog, id) => {
1646
- CwDialogManager.CloseDialog(id);
1647
- });
1648
- }
1649
- static CloseLastDialog() {
1650
- const lastDialogId = Array.from(CwDialogManager.openDialogs.keys()).pop();
1651
- if (lastDialogId) {
1652
- CwDialogManager.CloseDialog(lastDialogId);
1653
- }
1654
- }
1655
- static CloseFirstDialog() {
1656
- const firstDialogId = Array.from(CwDialogManager.openDialogs.keys())[0];
1657
- if (firstDialogId) {
1658
- CwDialogManager.CloseDialog(firstDialogId);
1659
- }
1660
- }
1661
- static GetOpenDialogCount() {
1662
- return CwDialogManager.openDialogs.size;
1663
- }
1664
- }
1665
-
1666
1624
  /**
1667
1625
  * General purpose aligner flex container, useful for column or row view.
1668
1626
  * @remarks
@@ -1818,14 +1776,16 @@ function CwOption(props) {
1818
1776
  * </CwSelect>
1819
1777
  */
1820
1778
  function CwSelect(props) {
1821
- const { alignProps, labelProps, buttonProps, iconProps, placeholder, feedback, children, style, className, ...selectProps } = props;
1779
+ const { alignProps, labelProps, buttonProps, iconProps, placeholder, feedback, handleChange, children, style, className, ...selectProps } = props;
1822
1780
  const feedbackMessages = feedback
1823
1781
  ? Array.isArray(feedback) ? feedback : [feedback]
1824
1782
  : [];
1825
1783
  const flexDirection = alignProps?.flexDirection ?? "row";
1826
1784
  const dataDirection = { 'data-direction': flexDirection };
1827
1785
  const { backgroundColor, color: textColor, ...wrapperStyle } = style ?? {};
1828
- return (jsxs("div", { className: `cw-select${className ? ` ${className}` : ''}`, ...dataDirection, style: wrapperStyle, children: [jsxs(CwAlign, { ...alignProps, itemProp: selectProps.required === true ? "required" : "", children: [labelProps && (jsxs(CwLabel, { ...labelProps, children: [iconProps && jsx(CwIcon, { ...iconProps }), labelProps.text] })), jsxs("div", { className: "cw-flex-row cw-gap-small cw-flex-grow", children: [jsxs("select", { ...selectProps, style: backgroundColor ? { backgroundColor, color: textColor } : undefined, children: [placeholder && jsx(CwOption, { value: "", children: placeholder }), children] }), buttonProps && jsx(CwButton, { ...buttonProps })] })] }), feedbackMessages.map((feedbackItem, index) => (jsx("p", { className: "cw-input-info", "data-color": feedbackItem.type, children: feedbackItem.message }, index)))] }));
1786
+ return (jsxs("div", { className: `cw-select${className ? ` ${className}` : ''}`, ...dataDirection, style: wrapperStyle, children: [jsxs(CwAlign, { ...alignProps, itemProp: selectProps.required === true ? "required" : "", children: [labelProps && (jsxs(CwLabel, { ...labelProps, children: [iconProps && jsx(CwIcon, { ...iconProps }), labelProps.text] })), jsxs("div", { className: "cw-flex-row cw-gap-small cw-flex-grow", children: [jsxs("select", { ...selectProps, style: backgroundColor ? { backgroundColor, color: textColor } : undefined, onChange: handleChange
1787
+ ? (e) => { handleChange(e.currentTarget.value); selectProps.onChange?.(e); }
1788
+ : selectProps.onChange, children: [placeholder && jsx(CwOption, { value: "", children: placeholder }), children] }), buttonProps && jsx(CwButton, { ...buttonProps })] })] }), feedbackMessages.map((feedbackItem, index) => (jsx("p", { className: "cw-input-info", "data-color": feedbackItem.type, children: feedbackItem.message }, index)))] }));
1829
1789
  }
1830
1790
 
1831
1791
  function CwCardList({ items, renderCard, pageSize = 10, layout = 'grid', defaultCardWidth = 320, cardGap = 16, isLoading = false, emptyState, sortOptions = [], defaultSortKey, keyExtractor, ...htmlProps }) {
@@ -3522,237 +3482,6 @@ function CwTextArea(props) {
3522
3482
  return (jsxs("div", { className: "cw-text-area", ...dataDirection, style: style, children: [jsxs(CwAlign, { ...alignProps, children: [labelProps && (jsxs(CwLabel, { ...labelProps, children: [iconProps && jsx(CwIcon, { ...iconProps }), labelProps.text] })), jsx("textarea", { ...textareaProps, itemProp: textareaProps.required === true ? "required" : "", style: { resize: resize } }), buttonProps && jsx(CwButton, { ...buttonProps })] }), feedbackMessages.map((feedbackItem, index) => (jsx("p", { className: "cw-input-info", "data-color": feedbackItem.type, children: feedbackItem.message }, index)))] }));
3523
3483
  }
3524
3484
 
3525
- /**
3526
- * Input for entering a string of text.
3527
- * @remarks
3528
- * ```txt
3529
- * CwIcon CwLabel input type=date CwButton
3530
- * ↑ ↑ ↑ ↑
3531
- * ╭────────────────────╮╭════╮
3532
- * ⌂ Birthdate │ 0000 / 00 / 00 │║ Ok ║
3533
- * ╰────────────────────╯╰════╯
3534
- * ```
3535
- * @example
3536
- * ```tsx
3537
- * <CwInputDate
3538
- * iconProps={{ iconId: "Birthdate" }}
3539
- * labelProps={{ children: "Name", width: "100px" }}
3540
- * buttonProps={{ children: "Ok", onClick:()=>{alert("happy happy joy joy")} }}
3541
- * />
3542
- * ```
3543
- */
3544
- function CwInputDate(props) {
3545
- const { alignProps, buttonProps, iconProps, labelProps, ...inputProps } = props;
3546
- inputProps.max = inputProps.max ?? "9999-01-01";
3547
- return (jsx("div", { className: "cw-input-date", children: jsxs(CwAlign, { ...alignProps, itemProp: inputProps.required === true ? "required" : "", children: [labelProps && (jsxs(CwLabel, { ...labelProps, children: [iconProps && jsx(CwIcon, { ...iconProps }), labelProps.text] })), jsx("input", { type: "date", ...inputProps }), buttonProps && jsx(CwButton, { ...buttonProps })] }) }));
3548
- }
3549
-
3550
- var classes = {"datePicker":"cw-input-date-picker-module__datePicker__jogOq","input":"cw-input-date-picker-module__input__uQshH","calendar":"cw-input-date-picker-module__calendar__q39ic","calendarHeader":"cw-input-date-picker-module__calendarHeader__1btPK","arrowButton":"cw-input-date-picker-module__arrowButton__23tNc","calendarTitle":"cw-input-date-picker-module__calendarTitle__oOODw","calendarBody":"cw-input-date-picker-module__calendarBody__-711a","calendarDay":"cw-input-date-picker-module__calendarDay__z-Mmv","selected":"cw-input-date-picker-module__selected__XQgR7","todayButton":"cw-input-date-picker-module__todayButton__oYamC","emptyDay":"cw-input-date-picker-module__emptyDay__lbI5B"};
3551
-
3552
- /**
3553
- * Converts a Date or ISO string to a Temporal.PlainDate.
3554
- */
3555
- function toPlainDate$1(dateString) {
3556
- if (dateString instanceof Date) {
3557
- return Temporal.PlainDate.from({
3558
- year: dateString.getFullYear(),
3559
- month: dateString.getMonth() + 1,
3560
- day: dateString.getDate(),
3561
- });
3562
- }
3563
- // ISO "YYYY-MM-DD" → direct parse
3564
- return Temporal.PlainDate.from(dateString);
3565
- }
3566
- /**
3567
- * Formats a date as DD.MM.YYYY (German locale).
3568
- */
3569
- function toGermanDate(dateString) {
3570
- const pd = toPlainDate$1(dateString);
3571
- const day = String(pd.day).padStart(2, "0");
3572
- const month = String(pd.month).padStart(2, "0");
3573
- return `${day}.${month}.${pd.year}`;
3574
- }
3575
- /**
3576
- * Formats a date as YYYY-MM-DD (ISO).
3577
- */
3578
- function toISODate(dateString) {
3579
- return toPlainDate$1(dateString).toString();
3580
- }
3581
- /**
3582
- * Validates whether a string is a valid DD.MM.YYYY date.
3583
- */
3584
- function isValidGermanDate(textDate) {
3585
- return parseGermanDate(textDate) !== null;
3586
- }
3587
- /**
3588
- * Converts a DD.MM.YYYY string to YYYY-MM-DD, or null if invalid.
3589
- */
3590
- function germanDateToISO(textDate) {
3591
- const pd = parseGermanDate(textDate);
3592
- return pd ? pd.toString() : null;
3593
- }
3594
- /**
3595
- * Converts a DD.MM.YYYY string to a Date object, or null if invalid.
3596
- */
3597
- function germanDateToDate(textDate) {
3598
- const pd = parseGermanDate(textDate);
3599
- if (!pd)
3600
- return null;
3601
- return new Date(pd.year, pd.month - 1, pd.day);
3602
- }
3603
- /**
3604
- * Returns the number of days in the month and the Monday-based
3605
- * weekday offset (0 = Monday) for the 1st of the month.
3606
- */
3607
- function computeCalendarGrid(internalDate) {
3608
- const pd = Temporal.PlainDate.from({
3609
- year: internalDate.getFullYear(),
3610
- month: internalDate.getMonth() + 1,
3611
- day: 1,
3612
- });
3613
- const daysInMonth = pd.daysInMonth;
3614
- const startDay = pd.dayOfWeek - 1; // Temporal: 1=Mon … 7=Sun → 0-based Mon
3615
- return { daysInMonth, startDay };
3616
- }
3617
- /**
3618
- * Returns true when the given day in the internalDate's month/year
3619
- * matches the selected ISO value string.
3620
- */
3621
- function isSelectedDay(internalDate, day, value) {
3622
- const pd = Temporal.PlainDate.from({
3623
- year: internalDate.getFullYear(),
3624
- month: internalDate.getMonth() + 1,
3625
- day,
3626
- });
3627
- return pd.toString() === value;
3628
- }
3629
- /**
3630
- * Returns a new Date set to the 1st of the month offset by `direction` months.
3631
- */
3632
- function computeNextMonthDate(currentDate, direction) {
3633
- const pd = Temporal.PlainDate.from({
3634
- year: currentDate.getFullYear(),
3635
- month: currentDate.getMonth() + 1,
3636
- day: 1,
3637
- });
3638
- const moved = pd.add({ months: direction });
3639
- return new Date(moved.year, moved.month - 1, moved.day);
3640
- }
3641
- // ── internal helper ────────────────────────────────────────────────────
3642
- /**
3643
- * Strictly parses a DD.MM.YYYY string into a Temporal.PlainDate, or null.
3644
- */
3645
- function parseGermanDate(text) {
3646
- const match = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(text);
3647
- if (!match)
3648
- return null;
3649
- const day = Number(match[1]);
3650
- const month = Number(match[2]);
3651
- const year = Number(match[3]);
3652
- try {
3653
- return Temporal.PlainDate.from({ year, month, day }, { overflow: "reject" });
3654
- }
3655
- catch {
3656
- return null;
3657
- }
3658
- }
3659
-
3660
- const CwInputDatePicker = ({ value, onChange }) => {
3661
- const [isCalendarOpen, setIsCalendarOpen] = useState(false);
3662
- const [internalDate, setInternalDate] = useState(new Date(value || new Date().toISOString()));
3663
- const [textDate, setTextDate] = useState(toGermanDate(value));
3664
- const inputRef = useRef(null);
3665
- const calendarRef = useRef(null);
3666
- useEffect(() => {
3667
- const handleClickOutside = (event) => {
3668
- if (calendarRef.current &&
3669
- !calendarRef.current.contains(event.target) &&
3670
- inputRef.current &&
3671
- !inputRef.current.contains(event.target)) {
3672
- setIsCalendarOpen(false);
3673
- }
3674
- };
3675
- document.addEventListener("mousedown", handleClickOutside);
3676
- return () => {
3677
- document.removeEventListener("mousedown", handleClickOutside);
3678
- };
3679
- }, []);
3680
- useEffect(() => {
3681
- setTextDate(toGermanDate(value));
3682
- }, [value]);
3683
- const submitInput = () => {
3684
- if (isValidGermanDate(textDate)) {
3685
- const newDateString = germanDateToISO(textDate);
3686
- const newDate = germanDateToDate(textDate);
3687
- if (newDateString && newDate) {
3688
- if (newDateString !== value) {
3689
- setInternalDate(newDate);
3690
- onChange?.(newDateString);
3691
- }
3692
- setIsCalendarOpen(false);
3693
- return true;
3694
- }
3695
- else {
3696
- console.error("Invalid date format");
3697
- return false;
3698
- }
3699
- }
3700
- else {
3701
- setTextDate(toGermanDate(new Date(value)));
3702
- return false;
3703
- }
3704
- };
3705
- const handleClickToday = () => {
3706
- const today = toISODate(new Date());
3707
- const currentDate = value;
3708
- if (currentDate != today) {
3709
- setTextDate(toGermanDate(today));
3710
- setInternalDate(new Date(today));
3711
- onChange?.(today);
3712
- }
3713
- setIsCalendarOpen(false);
3714
- };
3715
- const handleClickDay = (day) => {
3716
- const newDate = new Date(internalDate.getFullYear(), internalDate.getMonth(), day);
3717
- const newDateString = toISODate(newDate);
3718
- if (newDateString !== value) {
3719
- setTextDate(toGermanDate(newDate));
3720
- setInternalDate(newDate);
3721
- onChange?.(newDateString);
3722
- }
3723
- setIsCalendarOpen(false);
3724
- };
3725
- const handleClickMonthArrow = (direction) => {
3726
- setInternalDate(prevDate => computeNextMonthDate(prevDate, direction));
3727
- };
3728
- const handlePressEnter = (event) => {
3729
- if (event.key === "Enter" && submitInput()) {
3730
- event.currentTarget.blur();
3731
- }
3732
- };
3733
- const handleBlurInput = (event) => {
3734
- if (value != toISODate(internalDate) && submitInput()) {
3735
- event.currentTarget?.blur();
3736
- }
3737
- };
3738
- const generateCalendarDays = () => {
3739
- const { daysInMonth, startDay } = computeCalendarGrid(internalDate);
3740
- const calendarDays = new Array;
3741
- for (let i = 0; i < startDay; i++) {
3742
- calendarDays.push(jsx("div", { className: classes.emptyDay }, `empty-${i}`));
3743
- }
3744
- for (let day = 1; day <= daysInMonth; day++) {
3745
- const selected = isSelectedDay(internalDate, day, value);
3746
- calendarDays.push(jsx("div", { className: `${classes.calendarDay}${selected ? ` ${classes.selected}` : ""}`, onClick: () => handleClickDay(day), children: day }, day));
3747
- }
3748
- return calendarDays;
3749
- };
3750
- return (jsxs("div", { className: classes.datePicker, children: [jsx("input", { type: "text", value: textDate, onChange: e => setTextDate(e.currentTarget.value), onFocus: () => {
3751
- setInternalDate(new Date(value));
3752
- setIsCalendarOpen(true);
3753
- }, onBlur: handleBlurInput, onKeyDown: handlePressEnter, "data-valid": isValidGermanDate(textDate), ref: inputRef, className: classes.input }), isCalendarOpen && (jsxs("div", { className: classes.calendar, ref: calendarRef, children: [jsxs("div", { className: classes.calendarHeader, children: [jsx("button", { className: classes.arrowButton, onClick: () => handleClickMonthArrow(-1), children: "<" }), jsxs("span", { className: classes.calendarTitle, children: [internalDate.toLocaleString("default", { month: "long" }), " ", internalDate.getFullYear()] }), jsx("button", { className: classes.arrowButton, onClick: () => handleClickMonthArrow(1), children: ">" })] }), jsx("div", { className: classes.calendarBody, children: generateCalendarDays() }), jsx("button", { className: classes.todayButton, onClick: handleClickToday, children: "Today" })] }))] }));
3754
- };
3755
-
3756
3485
  /**
3757
3486
  * Input for entering a string of text.
3758
3487
  * @remarks
@@ -4356,8 +4085,9 @@ function useDropdownPortal({ anchorRef, isOpen, onClose, positionStrategy = defa
4356
4085
  zIndex: 1000,
4357
4086
  right: "auto",
4358
4087
  marginLeft: 0,
4088
+ visibility: "hidden",
4359
4089
  });
4360
- const reposition = useCallback(() => {
4090
+ const reposition = useCallback((visibility = "visible") => {
4361
4091
  const anchor = anchorRef.current;
4362
4092
  if (!anchor)
4363
4093
  return;
@@ -4372,15 +4102,18 @@ function useDropdownPortal({ anchorRef, isOpen, onClose, positionStrategy = defa
4372
4102
  zIndex: 1000,
4373
4103
  right: "auto",
4374
4104
  marginLeft: 0,
4105
+ visibility,
4375
4106
  });
4376
4107
  }, [anchorRef, positionStrategy]);
4377
- // Reposition when opened; re-measure after first paint to get real panel size
4108
+ // Reposition when opened. First pass is hidden (panel not yet measured), second
4109
+ // pass fires in a RAF with the real panel size and reveals the panel — preventing
4110
+ // the one-frame flicker at top:0/left:0 or at the wrong position.
4378
4111
  useEffect(() => {
4379
4112
  if (!isOpen)
4380
4113
  return;
4381
- reposition();
4382
- const raf = requestAnimationFrame(reposition);
4383
- const handleUpdate = () => reposition();
4114
+ reposition("hidden");
4115
+ const raf = requestAnimationFrame(() => reposition("visible"));
4116
+ const handleUpdate = () => reposition("visible");
4384
4117
  window.addEventListener("resize", handleUpdate);
4385
4118
  // Capture phase catches scroll on all scrollable ancestors
4386
4119
  window.addEventListener("scroll", handleUpdate, true);
@@ -4574,18 +4307,50 @@ var styles$a = {"container":"cw-popover-button-module__container__YSWQU","panel"
4574
4307
  function CwPopoverButton({ children, panelWidth = "auto", placement = "bottom-start", panelClassName, ...buttonProps }) {
4575
4308
  const containerRef = useRef(null);
4576
4309
  const panelRef = useRef(null);
4310
+ const isOpenRef = useRef(false);
4311
+ const lastToggleClosedAtRef = useRef(0);
4312
+ const RECENT_CLOSE_MS = 200;
4577
4313
  const panelCallbackRef = useCallback((node) => {
4578
4314
  panelRef.current = node;
4579
4315
  node?.setAttribute("popover", "auto");
4580
4316
  }, []);
4317
+ // Sync isOpenRef with the native popover toggle event so we know the real
4318
+ // open state at the moment handleClick fires (light-dismiss closes on pointerdown,
4319
+ // before the click event, so we can't rely on a React state for this).
4320
+ useEffect(() => {
4321
+ const panel = panelRef.current;
4322
+ if (!panel)
4323
+ return;
4324
+ const handler = (e) => {
4325
+ const newState = e.newState;
4326
+ isOpenRef.current = newState === "open";
4327
+ if (newState === "closed") {
4328
+ lastToggleClosedAtRef.current = Date.now();
4329
+ }
4330
+ };
4331
+ panel.addEventListener("toggle", handler);
4332
+ return () => panel.removeEventListener("toggle", handler);
4333
+ }, []);
4581
4334
  const handleClick = useCallback(() => {
4582
4335
  const panel = panelRef.current;
4583
4336
  const container = containerRef.current;
4584
4337
  if (!panel || !container)
4585
4338
  return;
4339
+ // Light-dismiss already closed the panel on pointerdown — don't reopen.
4340
+ if (isOpenRef.current)
4341
+ return;
4342
+ if (Date.now() - lastToggleClosedAtRef.current < RECENT_CLOSE_MS)
4343
+ return;
4586
4344
  const rect = container.getBoundingClientRect();
4587
4345
  panel.style.top = `${rect.bottom + 4}px`;
4588
- if (placement === "bottom-start") {
4346
+ // Prefer the requested placement, but flip if the panel would overflow the viewport.
4347
+ const panelWidth = panel.offsetWidth || 240;
4348
+ const spaceOnRight = window.innerWidth - rect.left;
4349
+ const spaceOnLeft = rect.right;
4350
+ const effectivePlacement = placement === "bottom-end" && spaceOnLeft < panelWidth ? "bottom-start" :
4351
+ placement === "bottom-start" && spaceOnRight < panelWidth ? "bottom-end" :
4352
+ placement;
4353
+ if (effectivePlacement === "bottom-start") {
4589
4354
  panel.style.left = `${rect.left}px`;
4590
4355
  panel.style.right = "auto";
4591
4356
  }
@@ -4593,7 +4358,7 @@ function CwPopoverButton({ children, panelWidth = "auto", placement = "bottom-st
4593
4358
  panel.style.right = `${window.innerWidth - rect.right}px`;
4594
4359
  panel.style.left = "auto";
4595
4360
  }
4596
- panel.togglePopover();
4361
+ panel.showPopover();
4597
4362
  }, [placement]);
4598
4363
  return (jsxs("div", { ref: containerRef, className: styles$a.container, children: [jsx(CwButton, { ...buttonProps, onClick: handleClick }), jsx("div", { ref: panelCallbackRef, className: `${styles$a.panel}${panelClassName ? ` ${panelClassName}` : ""}`, style: { width: panelWidth }, children: children })] }));
4599
4364
  }
@@ -5480,25 +5245,41 @@ const CwContextMenu = ({ children, options, offset = DEFAULT_OFFSET, onSelect })
5480
5245
  };
5481
5246
 
5482
5247
  /**
5483
- * Save button wrapper
5248
+ * Save button wrapper (6 uses pending delete)
5484
5249
  * @deprecated Use <CwButton variant="icon" icon="save" onClick={...} /> instead
5485
5250
  */
5486
5251
  function CwBtnSave({ cw_btnOnclick, cw_btn_disabled, onClick, disabled, ...rest }) {
5487
- return (jsx(CwButton, { ...rest, variant: "icon", icon: "save", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled }));
5252
+ return (jsx(CwButton, { ...rest, variant: "icon", icon: "save", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled, title: "Save" }));
5488
5253
  }
5489
5254
  /**
5490
- * Edit button wrapper
5255
+ * Edit button wrapper (5 uses pending delete)
5491
5256
  * @deprecated Use <CwButton variant="icon" icon="edit" onClick={...} /> instead
5492
5257
  */
5493
5258
  function CwBtnEdit({ cw_btnOnclick, cw_btn_disabled, onClick, disabled, ...rest }) {
5494
- return (jsx(CwButton, { ...rest, variant: "icon", icon: "edit", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled }));
5259
+ return (jsx(CwButton, { ...rest, variant: "icon", icon: "edit", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled, title: "Edit" }));
5495
5260
  }
5496
5261
  /**
5497
- * Delete button wrapper
5262
+ * Delete button wrapper (4 uses pending delete)
5498
5263
  * @deprecated Use <CwButton variant="icon" icon="delete" color="danger" onClick={...} /> instead
5499
5264
  */
5500
5265
  function CwBtnDelete({ cw_btnOnclick, cw_btn_disabled, onClick, disabled, ...rest }) {
5501
- return (jsx(CwButton, { ...rest, variant: "icon", icon: "delete", color: "danger", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled }));
5266
+ return (jsx(CwButton, { ...rest, variant: "icon", icon: "delete", color: "danger", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled, title: "Delete" }));
5267
+ }
5268
+ /**
5269
+ * Approve button wrapper.
5270
+ * DO NOT DELETE — used by Operon (lib pinned at ^1.0.9, currently dormant).
5271
+ * @deprecated Use <CwButton variant="icon" icon="check-circle" onClick={...} /> instead
5272
+ */
5273
+ function CwBtnApprove({ cw_btnOnclick, cw_btn_disabled, onClick, disabled, ...rest }) {
5274
+ return (jsx(CwButton, { ...rest, variant: "icon", icon: "check-circle", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled, title: "Approve" }));
5275
+ }
5276
+ /**
5277
+ * Cancel button wrapper.
5278
+ * DO NOT DELETE — used by Operon (lib pinned at ^1.0.9, currently dormant).
5279
+ * @deprecated Use <CwButton variant="icon" icon="cancel" color="danger" onClick={...} /> instead
5280
+ */
5281
+ function CwBtnCancel({ cw_btnOnclick, cw_btn_disabled, onClick, disabled, ...rest }) {
5282
+ return (jsx(CwButton, { ...rest, variant: "icon", icon: "cancel", color: "danger", onClick: onClick ?? cw_btnOnclick, disabled: disabled ?? cw_btn_disabled, title: "Cancel" }));
5502
5283
  }
5503
5284
 
5504
5285
  var styles$4 = {"pickerWrapper":"cw-pickers-base-module__pickerWrapper__Fb9Zo","pickerIcons":"cw-pickers-base-module__pickerIcons__dyd2-","pickerPopup":"cw-pickers-base-module__pickerPopup__dkxJo"};
@@ -5745,7 +5526,7 @@ function CwDatePicker({ value, onChange, minDate, maxDate, disabledDates, disabl
5745
5526
  } }), showTodayButton && (jsx("footer", { className: "cw-flex-row cw-align-right-center", children: jsx(CwButton, { type: "button", variant: "outline", onClick: handleTodayClick, text: todayLabel }) }))] }))] })] }), feedbackMessages.map((feedbackItem, index) => (jsx("p", { className: "cw-input-info", "data-color": feedbackItem.type, children: feedbackItem.message }, index)))] }));
5746
5527
  }
5747
5528
 
5748
- var rangeStyles = {"rangeWrapper":"cw-range-picker-module__rangeWrapper__1nIVs","rangePopup":"cw-range-picker-module__rangePopup__E5jd1","presetList":"cw-range-picker-module__presetList__INiLo"};
5529
+ var rangeStyles = {"rangeWrapper":"cw-range-picker-module__rangeWrapper__1nIVs","rangePopup":"cw-range-picker-module__rangePopup__E5jd1","rangeCalendarRow":"cw-range-picker-module__rangeCalendarRow__VTxi0","presetList":"cw-range-picker-module__presetList__INiLo","rangeError":"cw-range-picker-module__rangeError__qHMdi"};
5749
5530
 
5750
5531
  const PRESET_LIBRARY = {
5751
5532
  // === PAST DAYS ===
@@ -6020,6 +5801,7 @@ function CwDateRangePicker({ value, onChange, minDate, maxDate, disabledDates, d
6020
5801
  const [isOpen, setIsOpen] = useState(false);
6021
5802
  const [inputFromValue, setInputFromValue] = useState("");
6022
5803
  const [inputToValue, setInputToValue] = useState("");
5804
+ const [rangeErrorMessage, setRangeErrorMessage] = useState(null);
6023
5805
  const [focusedInput, setFocusedInput] = useState();
6024
5806
  const containerRef = useRef(null);
6025
5807
  const wrapperRef = useRef(null);
@@ -6144,21 +5926,27 @@ function CwDateRangePicker({ value, onChange, minDate, maxDate, disabledDates, d
6144
5926
  }
6145
5927
  }
6146
5928
  }, [value, displayFormat]);
6147
- const handleRangeSelect = useCallback((range, // El rango sugerido por react-day-picker
6148
- selectedDay) => {
5929
+ const handleRangeSelect = useCallback((range, selectedDay) => {
6149
5930
  let newRange;
6150
5931
  if (focusedInput === 'from') {
6151
5932
  newRange = { from: selectedDay, to: value?.to };
6152
5933
  if (newRange.to && selectedDay > newRange.to) {
6153
5934
  newRange.to = undefined;
6154
5935
  setFocusedInput('to');
5936
+ setRangeErrorMessage(null);
6155
5937
  }
6156
5938
  else if (newRange.to) {
5939
+ if (!validateRange(newRange.from, newRange.to)) {
5940
+ setRangeErrorMessage(maxRangeDays ? `Range cannot exceed ${maxRangeDays} days` : "Invalid date range");
5941
+ return;
5942
+ }
5943
+ setRangeErrorMessage(null);
6157
5944
  setIsOpen(false);
6158
5945
  setFocusedInput(undefined);
6159
5946
  }
6160
5947
  else {
6161
5948
  setFocusedInput('to');
5949
+ setRangeErrorMessage(null);
6162
5950
  }
6163
5951
  }
6164
5952
  else if (focusedInput === 'to') {
@@ -6166,13 +5954,20 @@ function CwDateRangePicker({ value, onChange, minDate, maxDate, disabledDates, d
6166
5954
  if (newRange.from && selectedDay < newRange.from) {
6167
5955
  newRange.from = undefined;
6168
5956
  setFocusedInput('from');
5957
+ setRangeErrorMessage(null);
6169
5958
  }
6170
5959
  else if (newRange.from) {
5960
+ if (!validateRange(newRange.from, newRange.to)) {
5961
+ setRangeErrorMessage(maxRangeDays ? `Range cannot exceed ${maxRangeDays} days` : "Invalid date range");
5962
+ return;
5963
+ }
5964
+ setRangeErrorMessage(null);
6171
5965
  setIsOpen(false);
6172
5966
  setFocusedInput(undefined);
6173
5967
  }
6174
5968
  else {
6175
5969
  setFocusedInput('from');
5970
+ setRangeErrorMessage(null);
6176
5971
  }
6177
5972
  }
6178
5973
  else {
@@ -6182,20 +5977,23 @@ function CwDateRangePicker({ value, onChange, minDate, maxDate, disabledDates, d
6182
5977
  }
6183
5978
  newRange = { from: range.from, to: range.to };
6184
5979
  if (range.from && range.to) {
5980
+ if (!validateRange(newRange.from, newRange.to)) {
5981
+ setRangeErrorMessage(maxRangeDays ? `Range cannot exceed ${maxRangeDays} days` : "Invalid date range");
5982
+ return;
5983
+ }
5984
+ setRangeErrorMessage(null);
6185
5985
  setIsOpen(false);
6186
5986
  setFocusedInput(undefined);
6187
5987
  }
6188
5988
  else if (range.from) {
6189
5989
  setFocusedInput('to');
5990
+ setRangeErrorMessage(null);
6190
5991
  }
6191
5992
  else {
6192
5993
  setFocusedInput('from');
5994
+ setRangeErrorMessage(null);
6193
5995
  }
6194
5996
  }
6195
- // Validate range before sending
6196
- if (newRange.from && newRange.to && !validateRange(newRange.from, newRange.to)) {
6197
- return;
6198
- }
6199
5997
  onChange(newRange);
6200
5998
  }, [onChange, validateRange, value, focusedInput]);
6201
5999
  const handleClearFrom = useCallback((e) => {
@@ -6364,11 +6162,11 @@ function CwDateRangePicker({ value, onChange, minDate, maxDate, disabledDates, d
6364
6162
  }
6365
6163
  return undefined;
6366
6164
  }, [value]);
6367
- return (jsx("div", { ref: containerRef, className: `cw-rangepicker ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { ref: wrapperRef, className: rangeStyles.rangeWrapper, children: [jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputFromRef, type: "text", value: inputFromValue, placeholder: placeholderFrom, onChange: handleInputFromChange, onBlur: () => handleInputBlur('from'), onClick: handleInputFromClick, onKeyDown: (e) => handleInputKeyDown(e, 'from'), disabled: disabled, required: required, "data-focused": focusedInput === 'from' }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.from && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearFrom, tabIndex: -1, "aria-label": "Clear from date" })) : (jsx(CwIcon, { iconId: "calendar" })) })] }), jsx(CwIcon, { iconId: "arrow-right", size: "medium" }), jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputToRef, type: "text", value: inputToValue, placeholder: placeholderTo, onChange: handleInputToChange, onBlur: () => handleInputBlur('to'), onClick: handleInputToClick, onKeyDown: (e) => handleInputKeyDown(e, 'to'), disabled: disabled, required: required, "data-focused": focusedInput === 'to' }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.to && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearTo, tabIndex: -1, "aria-label": "Clear to date" })) : (jsx(CwIcon, { iconId: "calendar" })) })] }), renderPopup(jsxs("div", { ref: popupRef, className: `${styles$4.pickerPopup} ${rangeStyles.rangePopup}`, style: popupStyle, children: [showPresets && presetsToRender.length > 0 && (jsx("div", { className: rangeStyles.presetList, children: presetsToRender.map((preset) => (jsx("button", { type: "button", onClick: (e) => handlePresetClick(preset, e), children: preset.label }, preset.key))) })), jsx(DayPicker, { mode: "range", selected: selectedRange, onSelect: handleRangeSelect, disabled: disabledDays, numberOfMonths: numberOfMonths, defaultMonth: defaultMonth || value?.from || undefined, modifiers: {
6368
- today: new Date(),
6369
- }, modifiersClassNames: {
6370
- today: "rdp-day-today",
6371
- } })] }))] })] }) }));
6165
+ return (jsx("div", { ref: containerRef, className: `cw-rangepicker ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { ref: wrapperRef, className: rangeStyles.rangeWrapper, children: [jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputFromRef, type: "text", value: inputFromValue, placeholder: placeholderFrom, onChange: handleInputFromChange, onBlur: () => handleInputBlur('from'), onClick: handleInputFromClick, onKeyDown: (e) => handleInputKeyDown(e, 'from'), disabled: disabled, required: required, "data-focused": focusedInput === 'from' }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.from && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearFrom, tabIndex: -1, "aria-label": "Clear from date" })) : (jsx(CwIcon, { iconId: "calendar" })) })] }), jsx(CwIcon, { iconId: "arrow-right", size: "medium" }), jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputToRef, type: "text", value: inputToValue, placeholder: placeholderTo, onChange: handleInputToChange, onBlur: () => handleInputBlur('to'), onClick: handleInputToClick, onKeyDown: (e) => handleInputKeyDown(e, 'to'), disabled: disabled, required: required, "data-focused": focusedInput === 'to' }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.to && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearTo, tabIndex: -1, "aria-label": "Clear to date" })) : (jsx(CwIcon, { iconId: "calendar" })) })] }), renderPopup(jsxs("div", { ref: popupRef, className: `${styles$4.pickerPopup} ${rangeStyles.rangePopup}`, style: popupStyle, children: [jsxs("div", { className: rangeStyles.rangeCalendarRow, children: [showPresets && presetsToRender.length > 0 && (jsx("div", { className: rangeStyles.presetList, children: presetsToRender.map((preset) => (jsx("button", { type: "button", onClick: (e) => handlePresetClick(preset, e), children: preset.label }, preset.key))) })), jsx(DayPicker, { mode: "range", selected: selectedRange, onSelect: handleRangeSelect, disabled: disabledDays, numberOfMonths: numberOfMonths, defaultMonth: defaultMonth || value?.from || undefined, modifiers: {
6166
+ today: new Date(),
6167
+ }, modifiersClassNames: {
6168
+ today: "rdp-day-today",
6169
+ } })] }), jsx("div", { role: "alert", "aria-live": "polite", className: rangeStyles.rangeError, children: rangeErrorMessage })] }))] })] }) }));
6372
6170
  }
6373
6171
 
6374
6172
  var timeStyles = {"timePickerPopup":"cw-time-picker-module__timePickerPopup__BN63t","timePickerList":"cw-time-picker-module__timePickerList__E88pr","selected":"cw-time-picker-module__selected__qVnfL","hasIcons":"cw-time-picker-module__hasIcons__ZiGUf","notIcons":"cw-time-picker-module__notIcons__3icu1"};
@@ -9772,13 +9570,13 @@ const PinRowHeader = ({ value, width, onEvent }) => {
9772
9570
  jsxs("span", { className: styles["scheduler-crewmember-functions"], children: ["(", value.title3, ")"] }), value.subtitle2 && jsxs("span", { children: ["-", value.subtitle2] })] })] }), isLoading ? jsx("span", { className: "cwi-icons cwi-spinner" }) : undefined] }) }, value.rowId) }, value.rowId);
9773
9571
  };
9774
9572
 
9775
- const SuperScheduler = ({ id, state, header, rows, events, pinnedOrderCategory, unPinnedOrderCategory, backgroundEvents, indicatorRows = [], contextMenuItems, onEvent, rowHeightRem = 1.75 }) => {
9573
+ const SuperScheduler = ({ id, state, header, rows, events, headerColumnComp, pinnedOrderCategory, unPinnedOrderCategory, backgroundEvents, indicatorRows = [], contextMenuItems, onEvent, rowHeightRem = 1.75 }) => {
9776
9574
  const pinnedRows = rows.filter((it) => it.isPinned);
9777
9575
  const notPinnedRows = rows.filter((it) => !it.isPinned);
9778
9576
  const isFirstVisible = pinnedRows.length > 0;
9779
- return (jsxs(Fragment, { children: [isFirstVisible && (jsxs(Fragment, { children: [jsx(Scheduler, { id: `${id}-pinned`, state: state, header: header, rows: pinnedRows, events: events, backgroundEvents: backgroundEvents, indicatorRows: indicatorRows, contextMenuItems: contextMenuItems, orderCategories: pinnedOrderCategory, onEvent: onEvent, EventComp: SchedulerEvent, RowTitleComp: PinRowHeader, rowHeightRem: rowHeightRem }), jsx("div", { children: jsx(CwButton, { onClick: () => {
9577
+ return (jsxs(Fragment, { children: [isFirstVisible && (jsxs(Fragment, { children: [jsx(Scheduler, { id: `${id}-pinned`, state: state, header: header, rows: pinnedRows, events: events, backgroundEvents: backgroundEvents, indicatorRows: indicatorRows, contextMenuItems: contextMenuItems, orderCategories: pinnedOrderCategory, onEvent: onEvent, EventComp: SchedulerEvent, RowTitleComp: headerColumnComp, rowHeightRem: rowHeightRem }), jsx("div", { children: jsx(CwButton, { onClick: () => {
9780
9578
  onEvent(new OnClearPinned());
9781
- }, children: "Clear pinned" }) })] })), jsx(Scheduler, { id: `${id}-notPinned`, state: { ...state, isHeaderVisible: !isFirstVisible }, header: header, rows: notPinnedRows, events: events, backgroundEvents: backgroundEvents, indicatorRows: indicatorRows, contextMenuItems: contextMenuItems, orderCategories: unPinnedOrderCategory, onEvent: onEvent, EventComp: SchedulerEvent, RowTitleComp: PinRowHeader, rowHeightRem: rowHeightRem })] }));
9579
+ }, children: "Clear pinned" }) })] })), jsx(Scheduler, { id: `${id}-notPinned`, state: { ...state, isHeaderVisible: !isFirstVisible }, header: header, rows: notPinnedRows, events: events, backgroundEvents: backgroundEvents, indicatorRows: indicatorRows, contextMenuItems: contextMenuItems, orderCategories: unPinnedOrderCategory, onEvent: onEvent, EventComp: SchedulerEvent, RowTitleComp: headerColumnComp, rowHeightRem: rowHeightRem })] }));
9782
9580
  };
9783
9581
 
9784
9582
  /**
@@ -10215,4 +10013,4 @@ const CwFindCrewmember = ({ handleChange, placeHolder = "Search crew…", requir
10215
10013
  }, "data-direction": direction, children: [jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { className: "cw-search-input-wrapper", ref: wrapperRef, children: [jsx("input", { ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onFocus: handleInputFocus, placeholder: isInitialLoading ? "Loading…" : placeHolder, disabled: disabled, required: required, autoComplete: "off", "aria-expanded": showDropdown, "aria-haspopup": "listbox", role: "combobox", title: tooltipText }), (isLoading || isInitialLoading) && (jsx("div", { className: "cw-search-input-loading", children: jsx(CwIcon, { iconId: "spinner" }) })), jsx("div", { className: "cw-search-input-icons", children: inputValue && !disabled && !isInitialLoading ? (jsx(CwButton, { type: "button", onClick: handleClear, "aria-label": "Clear selected crewmember", variant: "icon", icon: "close", color: "neutral" })) : (jsx(CwIcon, { iconId: "person" })) })] })] }), renderPanel(jsx("div", { ref: panelRef, className: dropdownStyles.dropdown, style: panelStyle, role: "listbox", children: jsx("ul", { children: options.map((option, index) => (jsx("li", { className: `${dropdownStyles.option}${index === highlightedIndex ? ` ${dropdownStyles.optionFocused}` : ""}`, onClick: () => handleOptionSelect(option.value), onMouseDown: (e) => e.preventDefault(), onMouseEnter: () => setHighlightedIndex(index), role: "option", "aria-selected": index === highlightedIndex, children: option.text }, option.value))) }) }))] }));
10216
10014
  };
10217
10015
 
10218
- export { CblDragAndDrop, CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateTimePicker, CwDateTimePickerCompact, CwDialog, CwDialogManager, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDate, CwInputDatePicker, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNote, CwOption, CwPopoverButton, CwReportModal, CwScheduler, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSortableTable, CwSuperScheduler, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, TooltipConstraintContext, UiEvent, Weekdays, cblEvent, eventIsVisible, filterVisibleEvents, getDefaultDivisions, getEventSizes, itemsToMultiFilterTags, useCwMessage, useSortableList, useSortableTable, useTooltipConstraint };
10016
+ export { CblDragAndDrop, CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBtnApprove, CwBtnCancel, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateTimePicker, CwDateTimePickerCompact, CwDialog, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNote, CwOption, CwPopoverButton, CwReportModal, CwScheduler, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSortableTable, CwSuperScheduler, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, TooltipConstraintContext, UiEvent, Weekdays, cblEvent, eventIsVisible, filterVisibleEvents, getDefaultDivisions, getEventSizes, itemsToMultiFilterTags, useCwMessage, useSortableList, useSortableTable, useTooltipConstraint };
@@ -7,6 +7,7 @@ export interface DropdownPanelStyle {
7
7
  zIndex: number;
8
8
  right: "auto";
9
9
  marginLeft: 0;
10
+ visibility: "hidden" | "visible";
10
11
  }
11
12
  /**
12
13
  * Custom position calculator. Receives the anchor's bounding rect and the
@@ -1 +1 @@
1
- {"version":3,"file":"useDropdownPortal.d.ts","sourceRoot":"","sources":["../../../../src/common/hooks/useDropdownPortal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,CAAC,CAAC;CACd;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACtC,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,OAAO,GAAG,IAAI,KACrB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,UAAU,wBAAwB;IACjC,8EAA8E;IAC9E,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC/C,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC5C;AAED,UAAU,uBAAuB;IAChC,wDAAwD;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,kDAAkD;IAClD,UAAU,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;CACnE;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,SAAS,EACT,MAAM,EACN,OAAO,EACP,gBAA0C,GAC1C,EAAE,wBAAwB,GAAG,uBAAuB,CAsFpD"}
1
+ {"version":3,"file":"useDropdownPortal.d.ts","sourceRoot":"","sources":["../../../../src/common/hooks/useDropdownPortal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,CAAC,CAAC;IACd,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACtC,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,OAAO,GAAG,IAAI,KACrB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,UAAU,wBAAwB;IACjC,8EAA8E;IAC9E,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC/C,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC5C;AAED,UAAU,uBAAuB;IAChC,wDAAwD;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,kDAAkD;IAClD,UAAU,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;CACnE;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,SAAS,EACT,MAAM,EACN,OAAO,EACP,gBAA0C,GAC1C,EAAE,wBAAwB,GAAG,uBAAuB,CA0FpD"}