@drivenets/design-system 0.17.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/index.cjs +1797 -805
- package/dist/index.d.cts +117 -53
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +117 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1799 -809
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/package.json +3 -3
- package/src/components/ds-alert-banner/ds-alert-banner-global.figma.ts +49 -0
- package/src/components/ds-alert-banner/ds-alert-banner.figma.ts +51 -0
- package/src/components/ds-autocomplete/ds-autocomplete.module.scss +15 -4
- package/src/components/ds-autocomplete/ds-autocomplete.tsx +10 -3
- package/src/components/ds-autocomplete/ds-autocomplete.types.ts +8 -0
- package/src/components/ds-button-v3/ds-button-v3.figma.ts +5 -3
- package/src/components/ds-button-v3/ds-button-v3.module.scss +84 -17
- package/src/components/ds-button-v3/ds-button-v3.tsx +2 -0
- package/src/components/ds-button-v3/ds-button-v3.types.ts +11 -2
- package/src/components/ds-button-v3/ds-button-v4.figma.ts +121 -0
- package/src/components/ds-comment-bubble/ds-comment-bubble.figma.ts +52 -0
- package/src/components/ds-comment-card/ds-comment-card.figma.ts +36 -0
- package/src/components/ds-comment-indicator/ds-comment-indicator.figma.ts +32 -0
- package/src/components/ds-comments-drawer/ds-comments-drawer.figma.ts +19 -0
- package/src/components/ds-select/ds-select.figma.ts +2 -1
- package/src/components/ds-select/ds-select.tsx +6 -1
- package/src/components/ds-select/ds-select.types.ts +2 -1
- package/src/components/ds-slider/ds-slider.figma.ts +29 -0
- package/src/components/ds-slider/ds-slider.module.scss +104 -0
- package/src/components/ds-slider/ds-slider.tsx +118 -0
- package/src/components/ds-slider/ds-slider.types.ts +102 -0
- package/src/components/ds-slider/ds-slider.utils.ts +14 -0
- package/src/components/ds-slider/index.ts +11 -0
- package/src/components/ds-smart-tabs/figma/ds-smart-tabs-tab.figma.ts +83 -0
- package/src/components/ds-smart-tabs/figma/ds-smart-tabs.figma.ts +23 -0
- package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss +5 -1
- package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx +15 -3
- package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +15 -1
- package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +29 -6
- package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.module.scss +23 -0
- package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.tsx +218 -0
- package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.types.ts +14 -0
- package/src/components/ds-table/components/ds-table-resize-handle/index.ts +1 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.module.scss +18 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.tsx +16 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.types.ts +13 -0
- package/src/components/ds-table/components/ds-table-resize-overlay/index.ts +1 -0
- package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +1 -1
- package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +9 -2
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +2 -1
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +9 -2
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx +2 -2
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx +2 -1
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx +2 -1
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx +2 -1
- package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx +2 -1
- package/src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx +12 -3
- package/src/components/ds-table/context/ds-table-context.tsx +208 -0
- package/src/components/ds-table/ds-table-defaults.ts +42 -0
- package/src/components/ds-table/ds-table.module.scss +4 -1
- package/src/components/ds-table/ds-table.tsx +139 -214
- package/src/components/ds-table/ds-table.types.ts +53 -47
- package/src/components/ds-table/grouping/utils/column-group.ts +7 -5
- package/src/components/ds-table/hooks/use-cell-editor.ts +5 -1
- package/src/components/ds-table/hooks/use-column-resize.ts +385 -0
- package/src/components/ds-table/hooks/use-editing-state.ts +190 -0
- package/src/components/ds-table/index.ts +1 -0
- package/src/components/ds-table/styles/_variables.scss +2 -1
- package/src/components/ds-table/utils/column-size-meta.augmentation.ts +16 -0
- package/src/components/ds-table/utils/column-size.ts +213 -10
- package/src/components/ds-table/utils/column-size.unit.test.ts +213 -0
- package/src/components/ds-table/utils/constants.ts +28 -0
- package/src/components/ds-table/utils/frozen-body.ts +33 -0
- package/src/components/ds-table/utils/frozen-body.unit.test.ts +44 -0
- package/src/components/ds-table/utils/table-api.ts +42 -0
- package/src/components/ds-table/utils/table-api.unit.test.ts +82 -0
- package/src/components/ds-table/utils/table-columns.tsx +119 -0
- package/src/components/ds-table/utils/table-columns.unit.test.ts +199 -0
- package/src/components/ds-tag/ds-tag.figma.ts +51 -0
- package/src/components/ds-tag-filter/ds-tag-filter.figma.ts +16 -0
- package/src/components/ds-tag-filter/ds-tag-filter.module.scss +7 -35
- package/src/components/ds-tag-filter/ds-tag-filter.tsx +34 -57
- package/src/components/ds-tag-filter/ds-tag-filter.types.ts +2 -1
- package/src/components/ds-tag-filter/hooks/use-tag-overflow-calculation.ts +13 -18
- package/src/components/ds-text-input/ds-input-field-v02.figma.ts +29 -4
- package/src/components/ds-text-input/ds-text-input.figma.ts +3 -2
- package/src/components/ds-text-input/ds-text-input.tsx +1 -0
- package/src/components/ds-text-input/ds-text-input.types.ts +1 -1
- package/src/components/ds-tree/ds-tree.figma.ts +54 -0
- package/src/components/ds-workspace-layout/ds-workspace-layout.figma.ts +99 -0
- package/src/components/ds-workspace-layout/ds-workspace-layout.module.scss +1 -8
- package/src/index.ts +1 -0
- package/src/styles/_gradients.scss +19 -0
- package/src/styles/_root.scss +39 -15
- package/src/styles/_typography.scss +1 -0
- package/src/styles/shared/_input.scss +10 -0
- package/src/styles/styles.scss +1 -0
- package/src/components/ds-table/context/ds-table-context.ts +0 -112
package/dist/index.js
CHANGED
|
@@ -26,11 +26,12 @@ import { Select, createListCollection as createListCollection$1, useSelect, useS
|
|
|
26
26
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
27
27
|
import { RadioGroup } from "@ark-ui/react/radio-group";
|
|
28
28
|
import { SegmentGroup } from "@ark-ui/react/segment-group";
|
|
29
|
+
import { Slider } from "@ark-ui/react/slider";
|
|
29
30
|
import * as steps from "@zag-js/steps";
|
|
30
31
|
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
31
|
-
import { createColumnHelper,
|
|
32
|
+
import { createColumnHelper, flexRender, getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
32
33
|
import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
33
|
-
import { CSS } from "@dnd-kit/utilities";
|
|
34
|
+
import { CSS as CSS$1 } from "@dnd-kit/utilities";
|
|
34
35
|
import { DndContext, KeyboardSensor, MouseSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
35
36
|
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
36
37
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -3555,110 +3556,122 @@ var ds_autocomplete_module_default = {
|
|
|
3555
3556
|
"itemGroup": "pgg73q_itemGroup",
|
|
3556
3557
|
"itemIcon": "pgg73q_itemIcon",
|
|
3557
3558
|
"itemText": "pgg73q_itemText",
|
|
3559
|
+
"large": "pgg73q_large",
|
|
3558
3560
|
"loading": "pgg73q_loading",
|
|
3559
3561
|
"noMatches": "pgg73q_noMatches",
|
|
3560
3562
|
"positioner": "pgg73q_positioner",
|
|
3561
3563
|
"root": "pgg73q_root",
|
|
3564
|
+
"small": "pgg73q_small",
|
|
3562
3565
|
"startAdornment": "pgg73q_startAdornment",
|
|
3563
3566
|
"trigger": "pgg73q_trigger"
|
|
3564
3567
|
};
|
|
3565
3568
|
//#endregion
|
|
3566
3569
|
//#region src/components/ds-autocomplete/ds-autocomplete.tsx
|
|
3567
3570
|
const DsAutocomplete = (t0) => {
|
|
3568
|
-
const $ = c(
|
|
3569
|
-
const { id, options: t1, loading: t2, style, className, placeholder:
|
|
3571
|
+
const $ = c(58);
|
|
3572
|
+
const { id, options: t1, loading: t2, size: t3, style, className, placeholder: t4, disabled: t5, invalid: t6, onValueChange, onInputValueChange, onOpenChange, locale: t7, highlightMatch: t8, showTrigger: t9, startAdornment } = t0;
|
|
3570
3573
|
const options = t1 === void 0 ? [] : t1;
|
|
3571
3574
|
const loading = t2 === void 0 ? false : t2;
|
|
3572
|
-
const
|
|
3573
|
-
const
|
|
3574
|
-
const
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
$[
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
const
|
|
3583
|
-
const
|
|
3584
|
-
const
|
|
3585
|
-
const
|
|
3575
|
+
const size = t3 === void 0 ? "default" : t3;
|
|
3576
|
+
const placeholder = t4 === void 0 ? "Start typing to search..." : t4;
|
|
3577
|
+
const disabled = t5 === void 0 ? false : t5;
|
|
3578
|
+
const invalid = t6 === void 0 ? false : t6;
|
|
3579
|
+
let t10;
|
|
3580
|
+
if ($[0] !== t7) {
|
|
3581
|
+
t10 = t7 === void 0 ? {} : t7;
|
|
3582
|
+
$[0] = t7;
|
|
3583
|
+
$[1] = t10;
|
|
3584
|
+
} else t10 = $[1];
|
|
3585
|
+
const { loading: t11, noMatches: t12 } = t10;
|
|
3586
|
+
const loadingMessage = t11 === void 0 ? "Loading..." : t11;
|
|
3587
|
+
const noMatchesMessage = t12 === void 0 ? "No matches found" : t12;
|
|
3588
|
+
const highlightMatch = t8 === void 0 ? true : t8;
|
|
3589
|
+
const showTrigger = t9 === void 0 ? true : t9;
|
|
3586
3590
|
const [filterText, setFilterText] = useState("");
|
|
3587
|
-
let
|
|
3591
|
+
let t13;
|
|
3588
3592
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3589
|
-
|
|
3590
|
-
$[2] =
|
|
3591
|
-
} else
|
|
3592
|
-
const filterUtils = useFilter(
|
|
3593
|
+
t13 = { sensitivity: "base" };
|
|
3594
|
+
$[2] = t13;
|
|
3595
|
+
} else t13 = $[2];
|
|
3596
|
+
const filterUtils = useFilter(t13);
|
|
3593
3597
|
const collection = createListCollection({
|
|
3594
3598
|
items: filterText ? options.filter((opt) => filterUtils.contains(opt.label, filterText)) : options,
|
|
3595
|
-
itemToString: _temp$
|
|
3599
|
+
itemToString: _temp$18,
|
|
3596
3600
|
itemToValue: _temp2$9
|
|
3597
3601
|
});
|
|
3598
|
-
let
|
|
3602
|
+
let t14;
|
|
3599
3603
|
if ($[3] !== onInputValueChange) {
|
|
3600
|
-
|
|
3604
|
+
t14 = (details) => {
|
|
3601
3605
|
setFilterText(details.inputValue);
|
|
3602
3606
|
onInputValueChange?.(details.inputValue);
|
|
3603
3607
|
};
|
|
3604
3608
|
$[3] = onInputValueChange;
|
|
3605
|
-
$[4] =
|
|
3606
|
-
} else
|
|
3607
|
-
const handleInputValueChange =
|
|
3608
|
-
let
|
|
3609
|
+
$[4] = t14;
|
|
3610
|
+
} else t14 = $[4];
|
|
3611
|
+
const handleInputValueChange = t14;
|
|
3612
|
+
let t15;
|
|
3609
3613
|
if ($[5] !== onValueChange) {
|
|
3610
|
-
|
|
3614
|
+
t15 = (details_0) => {
|
|
3611
3615
|
const selectedItem = details_0.items[0];
|
|
3612
3616
|
onValueChange?.(selectedItem?.value ?? "");
|
|
3613
3617
|
};
|
|
3614
3618
|
$[5] = onValueChange;
|
|
3615
|
-
$[6] =
|
|
3616
|
-
} else
|
|
3617
|
-
const handleValueChange =
|
|
3618
|
-
let
|
|
3619
|
+
$[6] = t15;
|
|
3620
|
+
} else t15 = $[6];
|
|
3621
|
+
const handleValueChange = t15;
|
|
3622
|
+
let t16;
|
|
3619
3623
|
if ($[7] !== onOpenChange) {
|
|
3620
|
-
|
|
3624
|
+
t16 = (details_1) => {
|
|
3621
3625
|
onOpenChange?.(details_1.open);
|
|
3622
3626
|
};
|
|
3623
3627
|
$[7] = onOpenChange;
|
|
3624
|
-
$[8] =
|
|
3625
|
-
} else
|
|
3626
|
-
const handleOpenChange =
|
|
3627
|
-
let
|
|
3628
|
+
$[8] = t16;
|
|
3629
|
+
} else t16 = $[8];
|
|
3630
|
+
const handleOpenChange = t16;
|
|
3631
|
+
let t17;
|
|
3628
3632
|
if ($[9] !== className || $[10] !== disabled || $[11] !== invalid) {
|
|
3629
|
-
|
|
3633
|
+
t17 = classNames(ds_autocomplete_module_default.root, {
|
|
3630
3634
|
[ds_autocomplete_module_default.disabled]: disabled,
|
|
3631
3635
|
[ds_autocomplete_module_default.invalid]: invalid
|
|
3632
3636
|
}, className);
|
|
3633
3637
|
$[9] = className;
|
|
3634
3638
|
$[10] = disabled;
|
|
3635
3639
|
$[11] = invalid;
|
|
3636
|
-
$[12] =
|
|
3637
|
-
} else
|
|
3638
|
-
const rootClass =
|
|
3639
|
-
const
|
|
3640
|
-
const
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3640
|
+
$[12] = t17;
|
|
3641
|
+
} else t17 = $[12];
|
|
3642
|
+
const rootClass = t17;
|
|
3643
|
+
const t18 = Combobox;
|
|
3644
|
+
const t19 = true;
|
|
3645
|
+
const t20 = size === "small" && ds_autocomplete_module_default.small;
|
|
3646
|
+
const t21 = size === "large" && ds_autocomplete_module_default.large;
|
|
3647
|
+
let t22;
|
|
3648
|
+
if ($[13] !== t20 || $[14] !== t21) {
|
|
3649
|
+
t22 = classNames(ds_autocomplete_module_default.control, t20, t21);
|
|
3650
|
+
$[13] = t20;
|
|
3651
|
+
$[14] = t21;
|
|
3652
|
+
$[15] = t22;
|
|
3653
|
+
} else t22 = $[15];
|
|
3654
|
+
let t23;
|
|
3655
|
+
if ($[16] !== startAdornment) {
|
|
3656
|
+
t23 = startAdornment && /* @__PURE__ */ jsx("span", {
|
|
3644
3657
|
className: ds_autocomplete_module_default.startAdornment,
|
|
3645
3658
|
children: startAdornment
|
|
3646
3659
|
});
|
|
3647
|
-
$[
|
|
3648
|
-
$[
|
|
3649
|
-
} else
|
|
3650
|
-
let
|
|
3651
|
-
if ($[
|
|
3652
|
-
|
|
3660
|
+
$[16] = startAdornment;
|
|
3661
|
+
$[17] = t23;
|
|
3662
|
+
} else t23 = $[17];
|
|
3663
|
+
let t24;
|
|
3664
|
+
if ($[18] !== placeholder) {
|
|
3665
|
+
t24 = /* @__PURE__ */ jsx(Combobox.Input, {
|
|
3653
3666
|
className: ds_autocomplete_module_default.input,
|
|
3654
3667
|
placeholder
|
|
3655
3668
|
});
|
|
3656
|
-
$[
|
|
3657
|
-
$[
|
|
3658
|
-
} else
|
|
3659
|
-
let
|
|
3660
|
-
if ($[
|
|
3661
|
-
|
|
3669
|
+
$[18] = placeholder;
|
|
3670
|
+
$[19] = t24;
|
|
3671
|
+
} else t24 = $[19];
|
|
3672
|
+
let t25;
|
|
3673
|
+
if ($[20] !== disabled || $[21] !== showTrigger || $[22] !== size) {
|
|
3674
|
+
t25 = /* @__PURE__ */ jsx(Combobox.Context, { children: (combobox) => /* @__PURE__ */ jsxs("div", {
|
|
3662
3675
|
className: ds_autocomplete_module_default.iconContainer,
|
|
3663
3676
|
children: [combobox.inputValue && !disabled && /* @__PURE__ */ jsx("button", {
|
|
3664
3677
|
type: "button",
|
|
@@ -3670,56 +3683,58 @@ const DsAutocomplete = (t0) => {
|
|
|
3670
3683
|
},
|
|
3671
3684
|
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
3672
3685
|
icon: "close",
|
|
3673
|
-
size: "medium"
|
|
3686
|
+
size: size === "small" ? "small" : "medium"
|
|
3674
3687
|
})
|
|
3675
3688
|
}), showTrigger && /* @__PURE__ */ jsx(Combobox.Trigger, {
|
|
3676
3689
|
className: ds_autocomplete_module_default.trigger,
|
|
3677
3690
|
"aria-label": "Toggle dropdown",
|
|
3678
3691
|
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
3679
3692
|
icon: "keyboard_arrow_down",
|
|
3680
|
-
size: "medium"
|
|
3693
|
+
size: size === "small" ? "small" : "medium"
|
|
3681
3694
|
})
|
|
3682
3695
|
})]
|
|
3683
3696
|
}) });
|
|
3684
|
-
$[
|
|
3685
|
-
$[
|
|
3686
|
-
$[
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3697
|
+
$[20] = disabled;
|
|
3698
|
+
$[21] = showTrigger;
|
|
3699
|
+
$[22] = size;
|
|
3700
|
+
$[23] = t25;
|
|
3701
|
+
} else t25 = $[23];
|
|
3702
|
+
let t26;
|
|
3703
|
+
if ($[24] !== t22 || $[25] !== t23 || $[26] !== t24 || $[27] !== t25) {
|
|
3704
|
+
t26 = /* @__PURE__ */ jsxs(Combobox.Control, {
|
|
3705
|
+
className: t22,
|
|
3692
3706
|
children: [
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3707
|
+
t23,
|
|
3708
|
+
t24,
|
|
3709
|
+
t25
|
|
3696
3710
|
]
|
|
3697
3711
|
});
|
|
3698
|
-
$[
|
|
3699
|
-
$[
|
|
3700
|
-
$[
|
|
3701
|
-
$[
|
|
3702
|
-
|
|
3712
|
+
$[24] = t22;
|
|
3713
|
+
$[25] = t23;
|
|
3714
|
+
$[26] = t24;
|
|
3715
|
+
$[27] = t25;
|
|
3716
|
+
$[28] = t26;
|
|
3717
|
+
} else t26 = $[28];
|
|
3703
3718
|
const T0 = Portal;
|
|
3704
|
-
const
|
|
3705
|
-
const
|
|
3706
|
-
const
|
|
3707
|
-
const
|
|
3708
|
-
let
|
|
3709
|
-
if ($[
|
|
3710
|
-
|
|
3719
|
+
const t27 = Combobox;
|
|
3720
|
+
const t28 = ds_autocomplete_module_default;
|
|
3721
|
+
const t29 = Combobox;
|
|
3722
|
+
const t30 = ds_autocomplete_module_default;
|
|
3723
|
+
let t31;
|
|
3724
|
+
if ($[29] !== loading || $[30] !== loadingMessage) {
|
|
3725
|
+
t31 = loading && /* @__PURE__ */ jsx("div", {
|
|
3711
3726
|
className: ds_autocomplete_module_default.loading,
|
|
3712
3727
|
children: loadingMessage
|
|
3713
3728
|
});
|
|
3714
|
-
$[
|
|
3715
|
-
$[
|
|
3716
|
-
$[
|
|
3717
|
-
} else
|
|
3718
|
-
const
|
|
3729
|
+
$[29] = loading;
|
|
3730
|
+
$[30] = loadingMessage;
|
|
3731
|
+
$[31] = t31;
|
|
3732
|
+
} else t31 = $[31];
|
|
3733
|
+
const t32 = !loading && collection.items.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
3719
3734
|
className: ds_autocomplete_module_default.noMatches,
|
|
3720
3735
|
children: noMatchesMessage
|
|
3721
3736
|
});
|
|
3722
|
-
const
|
|
3737
|
+
const t33 = !loading && collection.items.length > 0 && /* @__PURE__ */ jsx(Combobox.ItemGroup, {
|
|
3723
3738
|
className: ds_autocomplete_module_default.itemGroup,
|
|
3724
3739
|
children: collection.items.map((option) => /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
3725
3740
|
item: option,
|
|
@@ -3738,44 +3753,44 @@ const DsAutocomplete = (t0) => {
|
|
|
3738
3753
|
})]
|
|
3739
3754
|
}, option.value))
|
|
3740
3755
|
});
|
|
3741
|
-
let
|
|
3742
|
-
if ($[
|
|
3743
|
-
|
|
3744
|
-
className:
|
|
3756
|
+
let t34;
|
|
3757
|
+
if ($[32] !== t29.Content || $[33] !== t30.content || $[34] !== t31 || $[35] !== t32 || $[36] !== t33) {
|
|
3758
|
+
t34 = /* @__PURE__ */ jsxs(t29.Content, {
|
|
3759
|
+
className: t30.content,
|
|
3745
3760
|
children: [
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3761
|
+
t31,
|
|
3762
|
+
t32,
|
|
3763
|
+
t33
|
|
3749
3764
|
]
|
|
3750
3765
|
});
|
|
3751
|
-
$[
|
|
3752
|
-
$[
|
|
3753
|
-
$[
|
|
3754
|
-
$[
|
|
3755
|
-
$[
|
|
3756
|
-
$[
|
|
3757
|
-
} else
|
|
3758
|
-
let
|
|
3759
|
-
if ($[
|
|
3760
|
-
|
|
3761
|
-
className:
|
|
3762
|
-
children:
|
|
3763
|
-
});
|
|
3764
|
-
$[
|
|
3765
|
-
$[
|
|
3766
|
-
$[
|
|
3767
|
-
$[
|
|
3768
|
-
} else
|
|
3769
|
-
let
|
|
3770
|
-
if ($[
|
|
3771
|
-
|
|
3772
|
-
$[
|
|
3773
|
-
$[
|
|
3774
|
-
$[
|
|
3775
|
-
} else
|
|
3776
|
-
let
|
|
3777
|
-
if ($[
|
|
3778
|
-
|
|
3766
|
+
$[32] = t29.Content;
|
|
3767
|
+
$[33] = t30.content;
|
|
3768
|
+
$[34] = t31;
|
|
3769
|
+
$[35] = t32;
|
|
3770
|
+
$[36] = t33;
|
|
3771
|
+
$[37] = t34;
|
|
3772
|
+
} else t34 = $[37];
|
|
3773
|
+
let t35;
|
|
3774
|
+
if ($[38] !== t27.Positioner || $[39] !== t28.positioner || $[40] !== t34) {
|
|
3775
|
+
t35 = /* @__PURE__ */ jsx(t27.Positioner, {
|
|
3776
|
+
className: t28.positioner,
|
|
3777
|
+
children: t34
|
|
3778
|
+
});
|
|
3779
|
+
$[38] = t27.Positioner;
|
|
3780
|
+
$[39] = t28.positioner;
|
|
3781
|
+
$[40] = t34;
|
|
3782
|
+
$[41] = t35;
|
|
3783
|
+
} else t35 = $[41];
|
|
3784
|
+
let t36;
|
|
3785
|
+
if ($[42] !== T0 || $[43] !== t35) {
|
|
3786
|
+
t36 = /* @__PURE__ */ jsx(T0, { children: t35 });
|
|
3787
|
+
$[42] = T0;
|
|
3788
|
+
$[43] = t35;
|
|
3789
|
+
$[44] = t36;
|
|
3790
|
+
} else t36 = $[44];
|
|
3791
|
+
let t37;
|
|
3792
|
+
if ($[45] !== collection || $[46] !== disabled || $[47] !== handleInputValueChange || $[48] !== handleOpenChange || $[49] !== handleValueChange || $[50] !== id || $[51] !== invalid || $[52] !== rootClass || $[53] !== style || $[54] !== t18.Root || $[55] !== t26 || $[56] !== t36) {
|
|
3793
|
+
t37 = /* @__PURE__ */ jsxs(t18.Root, {
|
|
3779
3794
|
id,
|
|
3780
3795
|
collection,
|
|
3781
3796
|
className: rootClass,
|
|
@@ -3785,33 +3800,40 @@ const DsAutocomplete = (t0) => {
|
|
|
3785
3800
|
onInputValueChange: handleInputValueChange,
|
|
3786
3801
|
onValueChange: handleValueChange,
|
|
3787
3802
|
onOpenChange: handleOpenChange,
|
|
3788
|
-
closeOnSelect:
|
|
3789
|
-
children: [
|
|
3790
|
-
});
|
|
3791
|
-
$[
|
|
3792
|
-
$[
|
|
3793
|
-
$[
|
|
3794
|
-
$[
|
|
3795
|
-
$[
|
|
3796
|
-
$[
|
|
3797
|
-
$[
|
|
3798
|
-
$[
|
|
3799
|
-
$[
|
|
3800
|
-
$[
|
|
3801
|
-
$[
|
|
3802
|
-
$[
|
|
3803
|
-
$[
|
|
3804
|
-
} else
|
|
3805
|
-
return
|
|
3803
|
+
closeOnSelect: t19,
|
|
3804
|
+
children: [t26, t36]
|
|
3805
|
+
});
|
|
3806
|
+
$[45] = collection;
|
|
3807
|
+
$[46] = disabled;
|
|
3808
|
+
$[47] = handleInputValueChange;
|
|
3809
|
+
$[48] = handleOpenChange;
|
|
3810
|
+
$[49] = handleValueChange;
|
|
3811
|
+
$[50] = id;
|
|
3812
|
+
$[51] = invalid;
|
|
3813
|
+
$[52] = rootClass;
|
|
3814
|
+
$[53] = style;
|
|
3815
|
+
$[54] = t18.Root;
|
|
3816
|
+
$[55] = t26;
|
|
3817
|
+
$[56] = t36;
|
|
3818
|
+
$[57] = t37;
|
|
3819
|
+
} else t37 = $[57];
|
|
3820
|
+
return t37;
|
|
3806
3821
|
};
|
|
3807
3822
|
DsAutocomplete.displayName = "DsAutocomplete";
|
|
3808
|
-
function _temp$
|
|
3823
|
+
function _temp$18(item) {
|
|
3809
3824
|
return item.label;
|
|
3810
3825
|
}
|
|
3811
3826
|
function _temp2$9(item_0) {
|
|
3812
3827
|
return item_0.value;
|
|
3813
3828
|
}
|
|
3814
3829
|
//#endregion
|
|
3830
|
+
//#region src/components/ds-autocomplete/ds-autocomplete.types.ts
|
|
3831
|
+
const autocompleteSizes = [
|
|
3832
|
+
"small",
|
|
3833
|
+
"default",
|
|
3834
|
+
"large"
|
|
3835
|
+
];
|
|
3836
|
+
//#endregion
|
|
3815
3837
|
//#region src/components/ds-avatar/ds-avatar.module.scss
|
|
3816
3838
|
var ds_avatar_module_default = {
|
|
3817
3839
|
"avatar": "VcKEMW_avatar",
|
|
@@ -3910,11 +3932,11 @@ const DsAvatar = (t0) => {
|
|
|
3910
3932
|
return t11;
|
|
3911
3933
|
};
|
|
3912
3934
|
DsAvatar.displayName = "DsAvatar";
|
|
3913
|
-
function _temp$
|
|
3935
|
+
function _temp$17(w) {
|
|
3914
3936
|
return w[0];
|
|
3915
3937
|
}
|
|
3916
3938
|
function _temp2$8(name_0) {
|
|
3917
|
-
return name_0.trim().split(" ").map(_temp$
|
|
3939
|
+
return name_0.trim().split(" ").map(_temp$17).join("");
|
|
3918
3940
|
}
|
|
3919
3941
|
//#endregion
|
|
3920
3942
|
//#region src/components/ds-avatar/ds-avatar.types.ts
|
|
@@ -3986,7 +4008,7 @@ const DsAvatarGroup = (t0) => {
|
|
|
3986
4008
|
t6 = remainingCount > 0 && /* @__PURE__ */ jsx(DsTooltip, {
|
|
3987
4009
|
content: /* @__PURE__ */ jsx("div", {
|
|
3988
4010
|
className: ds_avatar_group_module_default.tooltipList,
|
|
3989
|
-
children: hiddenAvatars.map(_temp$
|
|
4011
|
+
children: hiddenAvatars.map(_temp$16)
|
|
3990
4012
|
}),
|
|
3991
4013
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3992
4014
|
className: classNames(ds_avatar_group_module_default.moreAvatar, ds_avatar_group_module_default[size], ds_avatar_group_module_default[type]),
|
|
@@ -4020,7 +4042,7 @@ const DsAvatarGroup = (t0) => {
|
|
|
4020
4042
|
return t7;
|
|
4021
4043
|
};
|
|
4022
4044
|
DsAvatarGroup.displayName = "DsAvatarGroup";
|
|
4023
|
-
function _temp$
|
|
4045
|
+
function _temp$16(avatar_0, index_0) {
|
|
4024
4046
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(DsTypography, {
|
|
4025
4047
|
variant: "body-xs-reg",
|
|
4026
4048
|
children: avatar_0.name
|
|
@@ -4074,6 +4096,7 @@ var ds_text_input_module_default = {
|
|
|
4074
4096
|
"iconButton": "zbxt3W_iconButton",
|
|
4075
4097
|
"indicator": "zbxt3W_indicator",
|
|
4076
4098
|
"input": "zbxt3W_input",
|
|
4099
|
+
"large": "zbxt3W_large",
|
|
4077
4100
|
"small": "zbxt3W_small",
|
|
4078
4101
|
"textInputContainer": "zbxt3W_textInputContainer",
|
|
4079
4102
|
"trigger": "zbxt3W_trigger"
|
|
@@ -4081,7 +4104,7 @@ var ds_text_input_module_default = {
|
|
|
4081
4104
|
//#endregion
|
|
4082
4105
|
//#region src/components/ds-text-input/ds-text-input.tsx
|
|
4083
4106
|
const DsTextInput = (t0) => {
|
|
4084
|
-
const $ = c(
|
|
4107
|
+
const $ = c(43);
|
|
4085
4108
|
const { id, ref, name, size: t1, type: t2, onFocus, onBlur, onKeyDown, onChange, onValueChange, className, style: t3, value, defaultValue, min, max, minLength, maxLength, placeholder, disabled: t4, readOnly: t5, tabIndex, slots } = t0;
|
|
4086
4109
|
const size = t1 === void 0 ? "default" : t1;
|
|
4087
4110
|
const type = t2 === void 0 ? "text" : t2;
|
|
@@ -4097,51 +4120,54 @@ const DsTextInput = (t0) => {
|
|
|
4097
4120
|
const InputWrapper = slots?.inputWrapper ?? Fragment$1;
|
|
4098
4121
|
const t7 = size === "small";
|
|
4099
4122
|
const t8 = size === "default";
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4123
|
+
const t9 = size === "large";
|
|
4124
|
+
let t10;
|
|
4125
|
+
if ($[2] !== className || $[3] !== t7 || $[4] !== t8 || $[5] !== t9) {
|
|
4126
|
+
t10 = classNames(ds_text_input_module_default.textInputContainer, {
|
|
4103
4127
|
[ds_text_input_module_default.small]: t7,
|
|
4104
|
-
[ds_text_input_module_default.default]: t8
|
|
4128
|
+
[ds_text_input_module_default.default]: t8,
|
|
4129
|
+
[ds_text_input_module_default.large]: t9
|
|
4105
4130
|
}, className);
|
|
4106
4131
|
$[2] = className;
|
|
4107
4132
|
$[3] = t7;
|
|
4108
4133
|
$[4] = t8;
|
|
4109
4134
|
$[5] = t9;
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4135
|
+
$[6] = t10;
|
|
4136
|
+
} else t10 = $[6];
|
|
4137
|
+
const containerClass = t10;
|
|
4138
|
+
let t11;
|
|
4139
|
+
if ($[7] !== onChange || $[8] !== onValueChange) {
|
|
4140
|
+
t11 = (event) => {
|
|
4115
4141
|
const newValue = event.target.value;
|
|
4116
4142
|
onChange?.(event);
|
|
4117
4143
|
onValueChange?.(newValue);
|
|
4118
4144
|
};
|
|
4119
|
-
$[
|
|
4120
|
-
$[
|
|
4121
|
-
$[
|
|
4122
|
-
} else
|
|
4123
|
-
const handleChange =
|
|
4124
|
-
let
|
|
4125
|
-
if ($[
|
|
4126
|
-
|
|
4145
|
+
$[7] = onChange;
|
|
4146
|
+
$[8] = onValueChange;
|
|
4147
|
+
$[9] = t11;
|
|
4148
|
+
} else t11 = $[9];
|
|
4149
|
+
const handleChange = t11;
|
|
4150
|
+
let t12;
|
|
4151
|
+
if ($[10] !== slots) {
|
|
4152
|
+
t12 = slots?.startAdornment && /* @__PURE__ */ jsx("div", {
|
|
4127
4153
|
className: ds_text_input_module_default.adornment,
|
|
4128
4154
|
children: slots.startAdornment
|
|
4129
4155
|
});
|
|
4130
|
-
$[
|
|
4131
|
-
$[10] = t11;
|
|
4132
|
-
} else t11 = $[10];
|
|
4133
|
-
let t12;
|
|
4134
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4135
|
-
t12 = classNames(ds_text_input_module_default.input);
|
|
4156
|
+
$[10] = slots;
|
|
4136
4157
|
$[11] = t12;
|
|
4137
4158
|
} else t12 = $[11];
|
|
4138
4159
|
let t13;
|
|
4139
|
-
if ($[12]
|
|
4140
|
-
t13 =
|
|
4160
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4161
|
+
t13 = classNames(ds_text_input_module_default.input);
|
|
4162
|
+
$[12] = t13;
|
|
4163
|
+
} else t13 = $[12];
|
|
4164
|
+
let t14;
|
|
4165
|
+
if ($[13] !== defaultValue || $[14] !== disabled || $[15] !== handleChange || $[16] !== id || $[17] !== max || $[18] !== maxLength || $[19] !== min || $[20] !== minLength || $[21] !== name || $[22] !== onBlur || $[23] !== onFocus || $[24] !== onKeyDown || $[25] !== placeholder || $[26] !== readOnly || $[27] !== ref || $[28] !== tabIndex || $[29] !== type || $[30] !== value) {
|
|
4166
|
+
t14 = /* @__PURE__ */ jsx("input", {
|
|
4141
4167
|
id,
|
|
4142
4168
|
ref,
|
|
4143
4169
|
name,
|
|
4144
|
-
className:
|
|
4170
|
+
className: t13,
|
|
4145
4171
|
type,
|
|
4146
4172
|
value,
|
|
4147
4173
|
defaultValue,
|
|
@@ -4158,66 +4184,70 @@ const DsTextInput = (t0) => {
|
|
|
4158
4184
|
onChange: handleChange,
|
|
4159
4185
|
tabIndex
|
|
4160
4186
|
});
|
|
4161
|
-
$[
|
|
4162
|
-
$[
|
|
4163
|
-
$[
|
|
4164
|
-
$[
|
|
4165
|
-
$[
|
|
4166
|
-
$[
|
|
4167
|
-
$[
|
|
4168
|
-
$[
|
|
4169
|
-
$[
|
|
4170
|
-
$[
|
|
4171
|
-
$[
|
|
4172
|
-
$[
|
|
4173
|
-
$[
|
|
4174
|
-
$[
|
|
4175
|
-
$[
|
|
4176
|
-
$[
|
|
4177
|
-
$[
|
|
4178
|
-
$[
|
|
4179
|
-
$[
|
|
4180
|
-
} else
|
|
4181
|
-
let t14;
|
|
4182
|
-
if ($[31] !== InputWrapper || $[32] !== t13) {
|
|
4183
|
-
t14 = /* @__PURE__ */ jsx(InputWrapper, { children: t13 });
|
|
4184
|
-
$[31] = InputWrapper;
|
|
4185
|
-
$[32] = t13;
|
|
4186
|
-
$[33] = t14;
|
|
4187
|
-
} else t14 = $[33];
|
|
4187
|
+
$[13] = defaultValue;
|
|
4188
|
+
$[14] = disabled;
|
|
4189
|
+
$[15] = handleChange;
|
|
4190
|
+
$[16] = id;
|
|
4191
|
+
$[17] = max;
|
|
4192
|
+
$[18] = maxLength;
|
|
4193
|
+
$[19] = min;
|
|
4194
|
+
$[20] = minLength;
|
|
4195
|
+
$[21] = name;
|
|
4196
|
+
$[22] = onBlur;
|
|
4197
|
+
$[23] = onFocus;
|
|
4198
|
+
$[24] = onKeyDown;
|
|
4199
|
+
$[25] = placeholder;
|
|
4200
|
+
$[26] = readOnly;
|
|
4201
|
+
$[27] = ref;
|
|
4202
|
+
$[28] = tabIndex;
|
|
4203
|
+
$[29] = type;
|
|
4204
|
+
$[30] = value;
|
|
4205
|
+
$[31] = t14;
|
|
4206
|
+
} else t14 = $[31];
|
|
4188
4207
|
let t15;
|
|
4189
|
-
if ($[
|
|
4190
|
-
t15 =
|
|
4208
|
+
if ($[32] !== InputWrapper || $[33] !== t14) {
|
|
4209
|
+
t15 = /* @__PURE__ */ jsx(InputWrapper, { children: t14 });
|
|
4210
|
+
$[32] = InputWrapper;
|
|
4211
|
+
$[33] = t14;
|
|
4212
|
+
$[34] = t15;
|
|
4213
|
+
} else t15 = $[34];
|
|
4214
|
+
let t16;
|
|
4215
|
+
if ($[35] !== slots) {
|
|
4216
|
+
t16 = slots?.endAdornment && /* @__PURE__ */ jsx("div", {
|
|
4191
4217
|
className: ds_text_input_module_default.adornment,
|
|
4192
4218
|
children: slots.endAdornment
|
|
4193
4219
|
});
|
|
4194
|
-
$[
|
|
4195
|
-
$[
|
|
4196
|
-
} else
|
|
4197
|
-
let
|
|
4198
|
-
if ($[
|
|
4199
|
-
|
|
4220
|
+
$[35] = slots;
|
|
4221
|
+
$[36] = t16;
|
|
4222
|
+
} else t16 = $[36];
|
|
4223
|
+
let t17;
|
|
4224
|
+
if ($[37] !== containerClass || $[38] !== style || $[39] !== t12 || $[40] !== t15 || $[41] !== t16) {
|
|
4225
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
4200
4226
|
className: containerClass,
|
|
4201
4227
|
style,
|
|
4202
4228
|
children: [
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4229
|
+
t12,
|
|
4230
|
+
t15,
|
|
4231
|
+
t16
|
|
4206
4232
|
]
|
|
4207
4233
|
});
|
|
4208
|
-
$[
|
|
4209
|
-
$[
|
|
4210
|
-
$[
|
|
4211
|
-
$[39] = t14;
|
|
4234
|
+
$[37] = containerClass;
|
|
4235
|
+
$[38] = style;
|
|
4236
|
+
$[39] = t12;
|
|
4212
4237
|
$[40] = t15;
|
|
4213
4238
|
$[41] = t16;
|
|
4214
|
-
|
|
4215
|
-
|
|
4239
|
+
$[42] = t17;
|
|
4240
|
+
} else t17 = $[42];
|
|
4241
|
+
return t17;
|
|
4216
4242
|
};
|
|
4217
4243
|
DsTextInput.displayName = "DsTextInput";
|
|
4218
4244
|
//#endregion
|
|
4219
4245
|
//#region src/components/ds-text-input/ds-text-input.types.ts
|
|
4220
|
-
const textInputSizes = [
|
|
4246
|
+
const textInputSizes = [
|
|
4247
|
+
"small",
|
|
4248
|
+
"default",
|
|
4249
|
+
"large"
|
|
4250
|
+
];
|
|
4221
4251
|
//#endregion
|
|
4222
4252
|
//#region src/components/ds-dropdown-menu/ds-dropdown-menu.tsx
|
|
4223
4253
|
const GroupContext = createContext(null);
|
|
@@ -4581,7 +4611,7 @@ const ItemGroupLabel = (t0) => {
|
|
|
4581
4611
|
className: t1,
|
|
4582
4612
|
style,
|
|
4583
4613
|
onClick: toggle,
|
|
4584
|
-
onKeyDown: _temp$
|
|
4614
|
+
onKeyDown: _temp$15,
|
|
4585
4615
|
children: [t2, t5]
|
|
4586
4616
|
})
|
|
4587
4617
|
});
|
|
@@ -4896,7 +4926,7 @@ DsDropdownMenu.ItemGroupLabel.displayName = "DsDropdownMenu.ItemGroupLabel";
|
|
|
4896
4926
|
DsDropdownMenu.ItemGroupContent.displayName = "DsDropdownMenu.ItemGroupContent";
|
|
4897
4927
|
DsDropdownMenu.Separator.displayName = "DsDropdownMenu.Separator";
|
|
4898
4928
|
DsDropdownMenuLegacy.displayName = "DsDropdownMenuLegacy";
|
|
4899
|
-
function _temp$
|
|
4929
|
+
function _temp$15(e) {
|
|
4900
4930
|
return e.stopPropagation();
|
|
4901
4931
|
}
|
|
4902
4932
|
function _temp2$7(e) {
|
|
@@ -4962,7 +4992,7 @@ const DsBreadcrumb = (t0) => {
|
|
|
4962
4992
|
placeholder: "Search",
|
|
4963
4993
|
value: search,
|
|
4964
4994
|
onValueChange: setSearch,
|
|
4965
|
-
onKeyDown: _temp$
|
|
4995
|
+
onKeyDown: _temp$14,
|
|
4966
4996
|
slots: { startAdornment: /* @__PURE__ */ jsx(DsIcon, {
|
|
4967
4997
|
icon: "search",
|
|
4968
4998
|
size: "tiny"
|
|
@@ -5019,7 +5049,7 @@ const DsBreadcrumb = (t0) => {
|
|
|
5019
5049
|
return t4;
|
|
5020
5050
|
};
|
|
5021
5051
|
DsBreadcrumb.displayName = "DsBreadcrumb";
|
|
5022
|
-
function _temp$
|
|
5052
|
+
function _temp$14(e) {
|
|
5023
5053
|
return e.stopPropagation();
|
|
5024
5054
|
}
|
|
5025
5055
|
//#endregion
|
|
@@ -5475,7 +5505,7 @@ const iconSizeMap = Object.freeze({
|
|
|
5475
5505
|
* @summary action button with color/variant/size, icon-only, loading and selected states
|
|
5476
5506
|
*/
|
|
5477
5507
|
const DsButtonV3$1 = (t0) => {
|
|
5478
|
-
const $ = c(
|
|
5508
|
+
const $ = c(39);
|
|
5479
5509
|
let children;
|
|
5480
5510
|
let className;
|
|
5481
5511
|
let disabled;
|
|
@@ -5489,8 +5519,9 @@ const DsButtonV3$1 = (t0) => {
|
|
|
5489
5519
|
let t4;
|
|
5490
5520
|
let t5;
|
|
5491
5521
|
let t6;
|
|
5522
|
+
let t7;
|
|
5492
5523
|
if ($[0] !== t0) {
|
|
5493
|
-
({ref, className, style, children, icon, disabled, loading: t1, color: t2, variant: t3, size: t4, selected: t5,
|
|
5524
|
+
({ref, className, style, children, icon, disabled, loading: t1, color: t2, variant: t3, size: t4, selected: t5, highEmphasis: t6, type: t7, ...rest} = t0);
|
|
5494
5525
|
$[0] = t0;
|
|
5495
5526
|
$[1] = children;
|
|
5496
5527
|
$[2] = className;
|
|
@@ -5505,6 +5536,7 @@ const DsButtonV3$1 = (t0) => {
|
|
|
5505
5536
|
$[11] = t4;
|
|
5506
5537
|
$[12] = t5;
|
|
5507
5538
|
$[13] = t6;
|
|
5539
|
+
$[14] = t7;
|
|
5508
5540
|
} else {
|
|
5509
5541
|
children = $[1];
|
|
5510
5542
|
className = $[2];
|
|
@@ -5519,80 +5551,86 @@ const DsButtonV3$1 = (t0) => {
|
|
|
5519
5551
|
t4 = $[11];
|
|
5520
5552
|
t5 = $[12];
|
|
5521
5553
|
t6 = $[13];
|
|
5554
|
+
t7 = $[14];
|
|
5522
5555
|
}
|
|
5523
5556
|
const loading = t1 === void 0 ? false : t1;
|
|
5524
5557
|
const color = t2 === void 0 ? "default" : t2;
|
|
5525
5558
|
const variant = t3 === void 0 ? "primary" : t3;
|
|
5526
5559
|
const size = t4 === void 0 ? "medium" : t4;
|
|
5527
5560
|
const selected = t5 === void 0 ? false : t5;
|
|
5528
|
-
const
|
|
5561
|
+
const highEmphasis = t6 === void 0 ? false : t6;
|
|
5562
|
+
const type = t7 === void 0 ? "button" : t7;
|
|
5529
5563
|
const isIconOnly = icon !== void 0 && !children;
|
|
5530
|
-
const
|
|
5531
|
-
const
|
|
5532
|
-
let
|
|
5533
|
-
if ($[
|
|
5534
|
-
|
|
5535
|
-
$[
|
|
5536
|
-
$[
|
|
5537
|
-
} else
|
|
5538
|
-
const
|
|
5539
|
-
const
|
|
5540
|
-
const
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5564
|
+
const t8 = disabled || loading;
|
|
5565
|
+
const t9 = loading || void 0;
|
|
5566
|
+
let t10;
|
|
5567
|
+
if ($[15] !== className) {
|
|
5568
|
+
t10 = classNames(ds_button_v3_module_default.root, className);
|
|
5569
|
+
$[15] = className;
|
|
5570
|
+
$[16] = t10;
|
|
5571
|
+
} else t10 = $[16];
|
|
5572
|
+
const t11 = selected ? "true" : void 0;
|
|
5573
|
+
const t12 = highEmphasis ? "true" : void 0;
|
|
5574
|
+
const t13 = isIconOnly || void 0;
|
|
5575
|
+
const t14 = loading && !disabled ? "" : void 0;
|
|
5576
|
+
let t15;
|
|
5577
|
+
if ($[17] !== icon || $[18] !== loading || $[19] !== size) {
|
|
5578
|
+
t15 = loading ? /* @__PURE__ */ jsx(DsSpinner, {}) : icon && /* @__PURE__ */ jsx(DsIcon, {
|
|
5544
5579
|
icon,
|
|
5545
5580
|
size: iconSizeMap[size],
|
|
5546
5581
|
"aria-hidden": true
|
|
5547
5582
|
});
|
|
5548
|
-
$[
|
|
5549
|
-
$[
|
|
5550
|
-
$[
|
|
5551
|
-
$[
|
|
5552
|
-
} else
|
|
5553
|
-
let
|
|
5554
|
-
if ($[
|
|
5555
|
-
|
|
5583
|
+
$[17] = icon;
|
|
5584
|
+
$[18] = loading;
|
|
5585
|
+
$[19] = size;
|
|
5586
|
+
$[20] = t15;
|
|
5587
|
+
} else t15 = $[20];
|
|
5588
|
+
let t16;
|
|
5589
|
+
if ($[21] !== children || $[22] !== color || $[23] !== ref || $[24] !== rest || $[25] !== selected || $[26] !== size || $[27] !== style || $[28] !== t10 || $[29] !== t11 || $[30] !== t12 || $[31] !== t13 || $[32] !== t14 || $[33] !== t15 || $[34] !== t8 || $[35] !== t9 || $[36] !== type || $[37] !== variant) {
|
|
5590
|
+
t16 = /* @__PURE__ */ jsxs("button", {
|
|
5556
5591
|
ref,
|
|
5557
5592
|
type,
|
|
5558
|
-
disabled:
|
|
5559
|
-
"aria-busy":
|
|
5593
|
+
disabled: t8,
|
|
5594
|
+
"aria-busy": t9,
|
|
5560
5595
|
"aria-pressed": selected,
|
|
5561
|
-
className:
|
|
5596
|
+
className: t10,
|
|
5562
5597
|
style,
|
|
5563
5598
|
"data-color": color,
|
|
5564
5599
|
"data-variant": variant,
|
|
5565
5600
|
"data-size": size,
|
|
5566
|
-
"data-selected":
|
|
5567
|
-
"data-
|
|
5568
|
-
"data-
|
|
5601
|
+
"data-selected": t11,
|
|
5602
|
+
"data-high-emphasis": t12,
|
|
5603
|
+
"data-icon-only": t13,
|
|
5604
|
+
"data-loading": t14,
|
|
5569
5605
|
...rest,
|
|
5570
|
-
children: [
|
|
5571
|
-
});
|
|
5572
|
-
$[
|
|
5573
|
-
$[
|
|
5574
|
-
$[
|
|
5575
|
-
$[
|
|
5576
|
-
$[
|
|
5577
|
-
$[
|
|
5578
|
-
$[
|
|
5579
|
-
$[
|
|
5580
|
-
$[
|
|
5581
|
-
$[
|
|
5582
|
-
$[
|
|
5583
|
-
$[
|
|
5584
|
-
$[
|
|
5585
|
-
$[
|
|
5586
|
-
$[
|
|
5587
|
-
$[
|
|
5588
|
-
$[
|
|
5589
|
-
|
|
5590
|
-
|
|
5606
|
+
children: [t15, children]
|
|
5607
|
+
});
|
|
5608
|
+
$[21] = children;
|
|
5609
|
+
$[22] = color;
|
|
5610
|
+
$[23] = ref;
|
|
5611
|
+
$[24] = rest;
|
|
5612
|
+
$[25] = selected;
|
|
5613
|
+
$[26] = size;
|
|
5614
|
+
$[27] = style;
|
|
5615
|
+
$[28] = t10;
|
|
5616
|
+
$[29] = t11;
|
|
5617
|
+
$[30] = t12;
|
|
5618
|
+
$[31] = t13;
|
|
5619
|
+
$[32] = t14;
|
|
5620
|
+
$[33] = t15;
|
|
5621
|
+
$[34] = t8;
|
|
5622
|
+
$[35] = t9;
|
|
5623
|
+
$[36] = type;
|
|
5624
|
+
$[37] = variant;
|
|
5625
|
+
$[38] = t16;
|
|
5626
|
+
} else t16 = $[38];
|
|
5627
|
+
return t16;
|
|
5591
5628
|
};
|
|
5592
5629
|
//#endregion
|
|
5593
5630
|
//#region src/components/ds-button-v3/ds-button-v3.types.ts
|
|
5594
5631
|
const buttonV3Variants = [
|
|
5595
5632
|
"primary",
|
|
5633
|
+
"primary-subtle",
|
|
5596
5634
|
"secondary",
|
|
5597
5635
|
"tertiary"
|
|
5598
5636
|
];
|
|
@@ -7289,7 +7327,7 @@ const DsCommentThread = (t0) => {
|
|
|
7289
7327
|
const bottomRef = useRef(null);
|
|
7290
7328
|
let t1;
|
|
7291
7329
|
if ($[0] !== messages) {
|
|
7292
|
-
t1 = messages.find(_temp$
|
|
7330
|
+
t1 = messages.find(_temp$13) || messages[0];
|
|
7293
7331
|
$[0] = messages;
|
|
7294
7332
|
$[1] = t1;
|
|
7295
7333
|
} else t1 = $[1];
|
|
@@ -7430,7 +7468,7 @@ const DsCommentThread = (t0) => {
|
|
|
7430
7468
|
return t22;
|
|
7431
7469
|
};
|
|
7432
7470
|
DsCommentThread.displayName = "DsCommentThread";
|
|
7433
|
-
function _temp$
|
|
7471
|
+
function _temp$13(m) {
|
|
7434
7472
|
return m.isInitialMessage;
|
|
7435
7473
|
}
|
|
7436
7474
|
//#endregion
|
|
@@ -8154,7 +8192,7 @@ const DsCommentCard = (t0) => {
|
|
|
8154
8192
|
const { numericId, author, createdAt, messages, referenceTag, isActionRequired } = comment;
|
|
8155
8193
|
let t4;
|
|
8156
8194
|
if ($[0] !== messages) {
|
|
8157
|
-
t4 = messages.find(_temp$
|
|
8195
|
+
t4 = messages.find(_temp$12) || messages[0];
|
|
8158
8196
|
$[0] = messages;
|
|
8159
8197
|
$[1] = t4;
|
|
8160
8198
|
} else t4 = $[1];
|
|
@@ -8479,7 +8517,7 @@ const DsCommentCard = (t0) => {
|
|
|
8479
8517
|
return t34;
|
|
8480
8518
|
};
|
|
8481
8519
|
DsCommentCard.displayName = "DsCommentCard";
|
|
8482
|
-
function _temp$
|
|
8520
|
+
function _temp$12(m) {
|
|
8483
8521
|
return m.isInitialMessage;
|
|
8484
8522
|
}
|
|
8485
8523
|
function _temp2$6(m_0) {
|
|
@@ -8992,13 +9030,8 @@ const DsDrawer = Object.assign(DsDrawerRoot, {
|
|
|
8992
9030
|
//#region src/components/ds-tag-filter/ds-tag-filter.module.scss
|
|
8993
9031
|
var ds_tag_filter_module_default = {
|
|
8994
9032
|
"actionButton": "pHs_ea_actionButton",
|
|
9033
|
+
"actions": "pHs_ea_actions",
|
|
8995
9034
|
"container": "pHs_ea_container",
|
|
8996
|
-
"expanded": "pHs_ea_expanded",
|
|
8997
|
-
"ghostButtonContent": "pHs_ea_ghostButtonContent",
|
|
8998
|
-
"header": "pHs_ea_header",
|
|
8999
|
-
"headerActions": "pHs_ea_headerActions",
|
|
9000
|
-
"itemCheckbox": "pHs_ea_itemCheckbox",
|
|
9001
|
-
"label": "pHs_ea_label",
|
|
9002
9035
|
"measurementContainer": "pHs_ea_measurementContainer",
|
|
9003
9036
|
"tagsArea": "pHs_ea_tagsArea"
|
|
9004
9037
|
};
|
|
@@ -9048,14 +9081,11 @@ function getElementMeasurements(measurementContainer) {
|
|
|
9048
9081
|
//#endregion
|
|
9049
9082
|
//#region src/components/ds-tag-filter/hooks/use-tag-overflow-calculation.ts
|
|
9050
9083
|
/**
|
|
9051
|
-
* Custom hook to calculate how many tags fit
|
|
9052
|
-
*
|
|
9053
|
-
* Tags occupy the full container width. Non-tag elements (label, clear button,
|
|
9054
|
-
* expand control) live in a separate header row and don't affect the calculation.
|
|
9084
|
+
* Custom hook to calculate how many tags fit on the first row of the tags-area.
|
|
9055
9085
|
*/
|
|
9056
9086
|
const useTagOverflowCalculation = (t0) => {
|
|
9057
9087
|
const $ = c(15);
|
|
9058
|
-
const {
|
|
9088
|
+
const { tagsAreaRef, measurementRef, totalItems, expanded } = t0;
|
|
9059
9089
|
let t1;
|
|
9060
9090
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9061
9091
|
t1 = {
|
|
@@ -9066,10 +9096,10 @@ const useTagOverflowCalculation = (t0) => {
|
|
|
9066
9096
|
} else t1 = $[0];
|
|
9067
9097
|
const [state, setState] = useState(t1);
|
|
9068
9098
|
let t2;
|
|
9069
|
-
if ($[1] !==
|
|
9099
|
+
if ($[1] !== measurementRef || $[2] !== tagsAreaRef) {
|
|
9070
9100
|
t2 = () => {
|
|
9071
|
-
if (!
|
|
9072
|
-
const
|
|
9101
|
+
if (!tagsAreaRef.current || !measurementRef.current) return;
|
|
9102
|
+
const tagsArea = tagsAreaRef.current;
|
|
9073
9103
|
const measurementContainer = measurementRef.current;
|
|
9074
9104
|
const { tagWidths, gap } = getElementMeasurements(measurementContainer);
|
|
9075
9105
|
if (tagWidths.length === 0) {
|
|
@@ -9079,20 +9109,20 @@ const useTagOverflowCalculation = (t0) => {
|
|
|
9079
9109
|
});
|
|
9080
9110
|
return;
|
|
9081
9111
|
}
|
|
9082
|
-
const { count } = fitTagsInRow(tagWidths, getContainerAvailableWidth(
|
|
9112
|
+
const { count } = fitTagsInRow(tagWidths, getContainerAvailableWidth(tagsArea), gap);
|
|
9083
9113
|
const hasOverflow = count < tagWidths.length;
|
|
9084
9114
|
setState({
|
|
9085
9115
|
visibleTagCount: count,
|
|
9086
9116
|
hasOverflow
|
|
9087
9117
|
});
|
|
9088
9118
|
};
|
|
9089
|
-
$[1] =
|
|
9090
|
-
$[2] =
|
|
9119
|
+
$[1] = measurementRef;
|
|
9120
|
+
$[2] = tagsAreaRef;
|
|
9091
9121
|
$[3] = t2;
|
|
9092
9122
|
} else t2 = $[3];
|
|
9093
9123
|
const calculateLayout = t2;
|
|
9094
9124
|
let t3;
|
|
9095
|
-
if ($[4] !== calculateLayout || $[5] !==
|
|
9125
|
+
if ($[4] !== calculateLayout || $[5] !== tagsAreaRef) {
|
|
9096
9126
|
t3 = () => {
|
|
9097
9127
|
const rafId = requestAnimationFrame(() => {
|
|
9098
9128
|
calculateLayout();
|
|
@@ -9102,41 +9132,41 @@ const useTagOverflowCalculation = (t0) => {
|
|
|
9102
9132
|
calculateLayout();
|
|
9103
9133
|
});
|
|
9104
9134
|
});
|
|
9105
|
-
if (
|
|
9135
|
+
if (tagsAreaRef.current) resizeObserver.observe(tagsAreaRef.current);
|
|
9106
9136
|
return () => {
|
|
9107
9137
|
cancelAnimationFrame(rafId);
|
|
9108
9138
|
resizeObserver.disconnect();
|
|
9109
9139
|
};
|
|
9110
9140
|
};
|
|
9111
9141
|
$[4] = calculateLayout;
|
|
9112
|
-
$[5] =
|
|
9142
|
+
$[5] = tagsAreaRef;
|
|
9113
9143
|
$[6] = t3;
|
|
9114
9144
|
} else t3 = $[6];
|
|
9115
9145
|
let t4;
|
|
9116
|
-
if ($[7] !== calculateLayout || $[8] !==
|
|
9146
|
+
if ($[7] !== calculateLayout || $[8] !== expanded || $[9] !== measurementRef || $[10] !== tagsAreaRef || $[11] !== totalItems) {
|
|
9117
9147
|
t4 = [
|
|
9118
|
-
|
|
9148
|
+
tagsAreaRef,
|
|
9119
9149
|
measurementRef,
|
|
9120
9150
|
totalItems,
|
|
9121
9151
|
expanded,
|
|
9122
9152
|
calculateLayout
|
|
9123
9153
|
];
|
|
9124
9154
|
$[7] = calculateLayout;
|
|
9125
|
-
$[8] =
|
|
9126
|
-
$[9] =
|
|
9127
|
-
$[10] =
|
|
9155
|
+
$[8] = expanded;
|
|
9156
|
+
$[9] = measurementRef;
|
|
9157
|
+
$[10] = tagsAreaRef;
|
|
9128
9158
|
$[11] = totalItems;
|
|
9129
9159
|
$[12] = t4;
|
|
9130
9160
|
} else t4 = $[12];
|
|
9131
9161
|
useLayoutEffect(t3, t4);
|
|
9132
9162
|
if (expanded) {
|
|
9133
9163
|
let t5;
|
|
9134
|
-
if ($[13] !==
|
|
9164
|
+
if ($[13] !== state) {
|
|
9135
9165
|
t5 = {
|
|
9136
|
-
|
|
9166
|
+
...state,
|
|
9137
9167
|
hasOverflow: true
|
|
9138
9168
|
};
|
|
9139
|
-
$[13] =
|
|
9169
|
+
$[13] = state;
|
|
9140
9170
|
$[14] = t5;
|
|
9141
9171
|
} else t5 = $[14];
|
|
9142
9172
|
return t5;
|
|
@@ -9147,13 +9177,9 @@ const useTagOverflowCalculation = (t0) => {
|
|
|
9147
9177
|
//#region src/components/ds-tag-filter/ds-tag-filter.tsx
|
|
9148
9178
|
/**
|
|
9149
9179
|
* Design system TagFilter component
|
|
9150
|
-
*
|
|
9151
|
-
* A component for displaying active filters as tags with overflow handling.
|
|
9152
|
-
* Non-tag elements (label, expand/collapse, clear) sit in a header row.
|
|
9153
|
-
* Tags occupy the full width below, wrapping as needed.
|
|
9154
9180
|
*/
|
|
9155
9181
|
const DsTagFilter = (t0) => {
|
|
9156
|
-
const $ = c(
|
|
9182
|
+
const $ = c(55);
|
|
9157
9183
|
const { items, locale: t1, className, style, onClearAll, onItemDelete, onItemSelect, onExpand } = t0;
|
|
9158
9184
|
let t2;
|
|
9159
9185
|
if ($[0] !== t1) {
|
|
@@ -9163,12 +9189,12 @@ const DsTagFilter = (t0) => {
|
|
|
9163
9189
|
} else t2 = $[1];
|
|
9164
9190
|
const locale = t2;
|
|
9165
9191
|
const [expanded, setExpanded] = useState(false);
|
|
9166
|
-
const
|
|
9192
|
+
const tagsAreaRef = useRef(null);
|
|
9167
9193
|
const measurementRef = useRef(null);
|
|
9168
9194
|
let t3;
|
|
9169
9195
|
if ($[2] !== expanded || $[3] !== items.length) {
|
|
9170
9196
|
t3 = {
|
|
9171
|
-
|
|
9197
|
+
tagsAreaRef,
|
|
9172
9198
|
measurementRef,
|
|
9173
9199
|
totalItems: items.length,
|
|
9174
9200
|
expanded
|
|
@@ -9178,25 +9204,24 @@ const DsTagFilter = (t0) => {
|
|
|
9178
9204
|
$[4] = t3;
|
|
9179
9205
|
} else t3 = $[4];
|
|
9180
9206
|
const { visibleTagCount, hasOverflow } = useTagOverflowCalculation(t3);
|
|
9181
|
-
const {
|
|
9182
|
-
const
|
|
9183
|
-
const
|
|
9184
|
-
const
|
|
9185
|
-
|
|
9186
|
-
let t8;
|
|
9207
|
+
const { clearButton: t4, showMore: t5, showLess: t6 } = locale;
|
|
9208
|
+
const clearButton = t4 === void 0 ? "Clear all filters" : t4;
|
|
9209
|
+
const showMore = t5 === void 0 ? "Show more" : t5;
|
|
9210
|
+
const showLess = t6 === void 0 ? "Show less" : t6;
|
|
9211
|
+
let t7;
|
|
9187
9212
|
if ($[5] !== expanded || $[6] !== items || $[7] !== visibleTagCount) {
|
|
9188
|
-
|
|
9213
|
+
t7 = expanded ? items : items.slice(0, visibleTagCount);
|
|
9189
9214
|
$[5] = expanded;
|
|
9190
9215
|
$[6] = items;
|
|
9191
9216
|
$[7] = visibleTagCount;
|
|
9192
|
-
$[8] =
|
|
9193
|
-
} else
|
|
9194
|
-
const visibleTags =
|
|
9217
|
+
$[8] = t7;
|
|
9218
|
+
} else t7 = $[8];
|
|
9219
|
+
const visibleTags = t7;
|
|
9195
9220
|
const hiddenCount = items.length - visibleTagCount;
|
|
9196
9221
|
if (items.length === 0) return null;
|
|
9197
|
-
let
|
|
9222
|
+
let t8;
|
|
9198
9223
|
if ($[9] !== onItemDelete || $[10] !== onItemSelect) {
|
|
9199
|
-
|
|
9224
|
+
t8 = (item) => ({
|
|
9200
9225
|
...item.slotProps?.tag,
|
|
9201
9226
|
label: item.label,
|
|
9202
9227
|
selected: item.selected,
|
|
@@ -9205,180 +9230,159 @@ const DsTagFilter = (t0) => {
|
|
|
9205
9230
|
});
|
|
9206
9231
|
$[9] = onItemDelete;
|
|
9207
9232
|
$[10] = onItemSelect;
|
|
9208
|
-
$[11] =
|
|
9209
|
-
} else
|
|
9210
|
-
const buildTagProps =
|
|
9211
|
-
let
|
|
9233
|
+
$[11] = t8;
|
|
9234
|
+
} else t8 = $[11];
|
|
9235
|
+
const buildTagProps = t8;
|
|
9236
|
+
let t9;
|
|
9212
9237
|
if ($[12] !== buildTagProps) {
|
|
9213
|
-
|
|
9238
|
+
t9 = (item_0) => /* @__PURE__ */ jsx(DsTag, { ...buildTagProps(item_0) }, item_0.id);
|
|
9214
9239
|
$[12] = buildTagProps;
|
|
9215
|
-
$[13] =
|
|
9216
|
-
} else
|
|
9217
|
-
const renderTag =
|
|
9218
|
-
let
|
|
9240
|
+
$[13] = t9;
|
|
9241
|
+
} else t9 = $[13];
|
|
9242
|
+
const renderTag = t9;
|
|
9243
|
+
let t10;
|
|
9219
9244
|
if ($[14] !== expanded || $[15] !== onExpand) {
|
|
9220
|
-
|
|
9245
|
+
t10 = () => {
|
|
9221
9246
|
const newExpanded = !expanded;
|
|
9222
9247
|
setExpanded(newExpanded);
|
|
9223
9248
|
onExpand?.(newExpanded);
|
|
9224
9249
|
};
|
|
9225
9250
|
$[14] = expanded;
|
|
9226
9251
|
$[15] = onExpand;
|
|
9227
|
-
$[16] =
|
|
9228
|
-
} else
|
|
9229
|
-
const handleExpandToggle =
|
|
9230
|
-
let
|
|
9252
|
+
$[16] = t10;
|
|
9253
|
+
} else t10 = $[16];
|
|
9254
|
+
const handleExpandToggle = t10;
|
|
9255
|
+
let t11;
|
|
9231
9256
|
if ($[17] !== buildTagProps || $[18] !== items) {
|
|
9232
|
-
let
|
|
9257
|
+
let t12;
|
|
9233
9258
|
if ($[20] !== buildTagProps) {
|
|
9234
|
-
|
|
9259
|
+
t12 = (item_1) => /* @__PURE__ */ jsx(DsTag, {
|
|
9235
9260
|
"data-measure-tag": "",
|
|
9236
9261
|
...buildTagProps(item_1)
|
|
9237
9262
|
}, item_1.id);
|
|
9238
9263
|
$[20] = buildTagProps;
|
|
9239
|
-
$[21] =
|
|
9240
|
-
} else
|
|
9241
|
-
|
|
9264
|
+
$[21] = t12;
|
|
9265
|
+
} else t12 = $[21];
|
|
9266
|
+
t11 = items.map(t12);
|
|
9242
9267
|
$[17] = buildTagProps;
|
|
9243
9268
|
$[18] = items;
|
|
9244
|
-
$[19] =
|
|
9245
|
-
} else
|
|
9246
|
-
let
|
|
9247
|
-
if ($[22] !==
|
|
9248
|
-
|
|
9269
|
+
$[19] = t11;
|
|
9270
|
+
} else t11 = $[19];
|
|
9271
|
+
let t12;
|
|
9272
|
+
if ($[22] !== t11) {
|
|
9273
|
+
t12 = /* @__PURE__ */ jsx("div", {
|
|
9249
9274
|
ref: measurementRef,
|
|
9250
9275
|
className: ds_tag_filter_module_default.measurementContainer,
|
|
9251
9276
|
"aria-hidden": "true",
|
|
9252
|
-
children:
|
|
9277
|
+
children: t11
|
|
9253
9278
|
});
|
|
9254
|
-
$[22] =
|
|
9255
|
-
$[23] =
|
|
9256
|
-
} else
|
|
9257
|
-
const measurementContainer =
|
|
9258
|
-
const
|
|
9259
|
-
let
|
|
9260
|
-
if ($[24] !== className
|
|
9261
|
-
|
|
9279
|
+
$[22] = t11;
|
|
9280
|
+
$[23] = t12;
|
|
9281
|
+
} else t12 = $[23];
|
|
9282
|
+
const measurementContainer = t12;
|
|
9283
|
+
const toggleLabel = expanded ? showLess : showMore;
|
|
9284
|
+
let t13;
|
|
9285
|
+
if ($[24] !== className) {
|
|
9286
|
+
t13 = classNames(ds_tag_filter_module_default.container, className);
|
|
9262
9287
|
$[24] = className;
|
|
9263
|
-
$[25] =
|
|
9264
|
-
|
|
9265
|
-
|
|
9288
|
+
$[25] = t13;
|
|
9289
|
+
} else t13 = $[25];
|
|
9290
|
+
let t14;
|
|
9291
|
+
if ($[26] !== renderTag || $[27] !== visibleTags) {
|
|
9292
|
+
let t15;
|
|
9293
|
+
if ($[29] !== renderTag) {
|
|
9294
|
+
t15 = (item_2) => renderTag(item_2);
|
|
9295
|
+
$[29] = renderTag;
|
|
9296
|
+
$[30] = t15;
|
|
9297
|
+
} else t15 = $[30];
|
|
9298
|
+
t14 = visibleTags.map(t15);
|
|
9299
|
+
$[26] = renderTag;
|
|
9300
|
+
$[27] = visibleTags;
|
|
9301
|
+
$[28] = t14;
|
|
9302
|
+
} else t14 = $[28];
|
|
9303
|
+
let t15;
|
|
9304
|
+
if ($[31] !== t14) {
|
|
9305
|
+
t15 = /* @__PURE__ */ jsx("div", {
|
|
9306
|
+
ref: tagsAreaRef,
|
|
9307
|
+
className: ds_tag_filter_module_default.tagsArea,
|
|
9308
|
+
"aria-live": "polite",
|
|
9309
|
+
children: t14
|
|
9310
|
+
});
|
|
9311
|
+
$[31] = t14;
|
|
9312
|
+
$[32] = t15;
|
|
9313
|
+
} else t15 = $[32];
|
|
9266
9314
|
let t16;
|
|
9267
|
-
if ($[
|
|
9268
|
-
t16 =
|
|
9269
|
-
variant: "
|
|
9270
|
-
|
|
9271
|
-
|
|
9315
|
+
if ($[33] !== expanded || $[34] !== handleExpandToggle || $[35] !== hasOverflow || $[36] !== hiddenCount || $[37] !== toggleLabel) {
|
|
9316
|
+
t16 = hasOverflow && /* @__PURE__ */ jsxs(DsButtonV3, {
|
|
9317
|
+
variant: "tertiary",
|
|
9318
|
+
size: "small",
|
|
9319
|
+
className: ds_tag_filter_module_default.actionButton,
|
|
9320
|
+
"aria-expanded": expanded,
|
|
9321
|
+
onClick: handleExpandToggle,
|
|
9322
|
+
children: [`${toggleLabel} (${String(hiddenCount)})`, /* @__PURE__ */ jsx(DsIcon, {
|
|
9323
|
+
icon: expanded ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
9324
|
+
size: "tiny",
|
|
9325
|
+
"aria-hidden": true
|
|
9326
|
+
})]
|
|
9272
9327
|
});
|
|
9273
|
-
$[
|
|
9274
|
-
$[
|
|
9275
|
-
|
|
9328
|
+
$[33] = expanded;
|
|
9329
|
+
$[34] = handleExpandToggle;
|
|
9330
|
+
$[35] = hasOverflow;
|
|
9331
|
+
$[36] = hiddenCount;
|
|
9332
|
+
$[37] = toggleLabel;
|
|
9333
|
+
$[38] = t16;
|
|
9334
|
+
} else t16 = $[38];
|
|
9276
9335
|
let t17;
|
|
9277
|
-
if ($[
|
|
9278
|
-
t17 =
|
|
9279
|
-
|
|
9280
|
-
buttonType: "tertiary",
|
|
9281
|
-
variant: "ghost",
|
|
9282
|
-
className: ds_tag_filter_module_default.actionButton,
|
|
9283
|
-
contentClassName: ds_tag_filter_module_default.ghostButtonContent,
|
|
9336
|
+
if ($[39] !== clearButton || $[40] !== onClearAll) {
|
|
9337
|
+
t17 = onClearAll && /* @__PURE__ */ jsx(DsButtonV3, {
|
|
9338
|
+
variant: "tertiary",
|
|
9284
9339
|
size: "small",
|
|
9285
|
-
|
|
9286
|
-
children: [/* @__PURE__ */ jsx(DsIcon, { icon: expanded ? "keyboard_arrow_up" : "keyboard_arrow_down" }), expanded ? showLess : `${showMore} (${String(hiddenCount)})`]
|
|
9287
|
-
});
|
|
9288
|
-
$[29] = expanded;
|
|
9289
|
-
$[30] = handleExpandToggle;
|
|
9290
|
-
$[31] = hasOverflow;
|
|
9291
|
-
$[32] = hiddenCount;
|
|
9292
|
-
$[33] = showLess;
|
|
9293
|
-
$[34] = showMore;
|
|
9294
|
-
$[35] = t17;
|
|
9295
|
-
} else t17 = $[35];
|
|
9296
|
-
let t18;
|
|
9297
|
-
if ($[36] !== clearButton || $[37] !== onClearAll) {
|
|
9298
|
-
t18 = onClearAll && /* @__PURE__ */ jsxs(DsButton, {
|
|
9299
|
-
design: "v1.2",
|
|
9300
|
-
buttonType: "tertiary",
|
|
9301
|
-
variant: "ghost",
|
|
9340
|
+
icon: "close",
|
|
9302
9341
|
className: ds_tag_filter_module_default.actionButton,
|
|
9303
|
-
contentClassName: ds_tag_filter_module_default.ghostButtonContent,
|
|
9304
|
-
size: "small",
|
|
9305
9342
|
onClick: onClearAll,
|
|
9306
|
-
children:
|
|
9343
|
+
children: clearButton
|
|
9344
|
+
});
|
|
9345
|
+
$[39] = clearButton;
|
|
9346
|
+
$[40] = onClearAll;
|
|
9347
|
+
$[41] = t17;
|
|
9348
|
+
} else t17 = $[41];
|
|
9349
|
+
let t18;
|
|
9350
|
+
if ($[42] !== t16 || $[43] !== t17) {
|
|
9351
|
+
t18 = /* @__PURE__ */ jsxs("div", {
|
|
9352
|
+
className: ds_tag_filter_module_default.actions,
|
|
9353
|
+
children: [t16, t17]
|
|
9307
9354
|
});
|
|
9308
|
-
$[
|
|
9309
|
-
$[
|
|
9310
|
-
$[
|
|
9311
|
-
} else t18 = $[
|
|
9355
|
+
$[42] = t16;
|
|
9356
|
+
$[43] = t17;
|
|
9357
|
+
$[44] = t18;
|
|
9358
|
+
} else t18 = $[44];
|
|
9312
9359
|
let t19;
|
|
9313
|
-
if ($[
|
|
9360
|
+
if ($[45] !== style || $[46] !== t13 || $[47] !== t15 || $[48] !== t18) {
|
|
9314
9361
|
t19 = /* @__PURE__ */ jsxs("div", {
|
|
9315
|
-
className:
|
|
9316
|
-
|
|
9362
|
+
className: t13,
|
|
9363
|
+
style,
|
|
9364
|
+
children: [t15, t18]
|
|
9317
9365
|
});
|
|
9318
|
-
$[
|
|
9319
|
-
$[
|
|
9320
|
-
$[
|
|
9321
|
-
|
|
9366
|
+
$[45] = style;
|
|
9367
|
+
$[46] = t13;
|
|
9368
|
+
$[47] = t15;
|
|
9369
|
+
$[48] = t18;
|
|
9370
|
+
$[49] = t19;
|
|
9371
|
+
} else t19 = $[49];
|
|
9322
9372
|
let t20;
|
|
9323
|
-
if ($[
|
|
9324
|
-
t20 =
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
$[42] = t16;
|
|
9329
|
-
$[43] = t19;
|
|
9330
|
-
$[44] = t20;
|
|
9331
|
-
} else t20 = $[44];
|
|
9373
|
+
if ($[50] !== measurementContainer) {
|
|
9374
|
+
t20 = createPortal(measurementContainer, document.body);
|
|
9375
|
+
$[50] = measurementContainer;
|
|
9376
|
+
$[51] = t20;
|
|
9377
|
+
} else t20 = $[51];
|
|
9332
9378
|
let t21;
|
|
9333
|
-
if ($[
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
t21 = visibleTags.map(t22);
|
|
9341
|
-
$[45] = renderTag;
|
|
9342
|
-
$[46] = visibleTags;
|
|
9343
|
-
$[47] = t21;
|
|
9344
|
-
} else t21 = $[47];
|
|
9345
|
-
let t22;
|
|
9346
|
-
if ($[50] !== t21) {
|
|
9347
|
-
t22 = /* @__PURE__ */ jsx("div", {
|
|
9348
|
-
className: ds_tag_filter_module_default.tagsArea,
|
|
9349
|
-
children: t21
|
|
9350
|
-
});
|
|
9351
|
-
$[50] = t21;
|
|
9352
|
-
$[51] = t22;
|
|
9353
|
-
} else t22 = $[51];
|
|
9354
|
-
let t23;
|
|
9355
|
-
if ($[52] !== style || $[53] !== t15 || $[54] !== t20 || $[55] !== t22) {
|
|
9356
|
-
t23 = /* @__PURE__ */ jsxs("div", {
|
|
9357
|
-
ref: containerRef,
|
|
9358
|
-
className: t15,
|
|
9359
|
-
style,
|
|
9360
|
-
children: [t20, t22]
|
|
9361
|
-
});
|
|
9362
|
-
$[52] = style;
|
|
9363
|
-
$[53] = t15;
|
|
9364
|
-
$[54] = t20;
|
|
9365
|
-
$[55] = t22;
|
|
9366
|
-
$[56] = t23;
|
|
9367
|
-
} else t23 = $[56];
|
|
9368
|
-
let t24;
|
|
9369
|
-
if ($[57] !== measurementContainer) {
|
|
9370
|
-
t24 = createPortal(measurementContainer, document.body);
|
|
9371
|
-
$[57] = measurementContainer;
|
|
9372
|
-
$[58] = t24;
|
|
9373
|
-
} else t24 = $[58];
|
|
9374
|
-
let t25;
|
|
9375
|
-
if ($[59] !== t23 || $[60] !== t24) {
|
|
9376
|
-
t25 = /* @__PURE__ */ jsxs(Fragment, { children: [t23, t24] });
|
|
9377
|
-
$[59] = t23;
|
|
9378
|
-
$[60] = t24;
|
|
9379
|
-
$[61] = t25;
|
|
9380
|
-
} else t25 = $[61];
|
|
9381
|
-
return t25;
|
|
9379
|
+
if ($[52] !== t19 || $[53] !== t20) {
|
|
9380
|
+
t21 = /* @__PURE__ */ jsxs(Fragment, { children: [t19, t20] });
|
|
9381
|
+
$[52] = t19;
|
|
9382
|
+
$[53] = t20;
|
|
9383
|
+
$[54] = t21;
|
|
9384
|
+
} else t21 = $[54];
|
|
9385
|
+
return t21;
|
|
9382
9386
|
};
|
|
9383
9387
|
DsTagFilter.displayName = "DsTagFilter";
|
|
9384
9388
|
//#endregion
|
|
@@ -9927,7 +9931,7 @@ const DsTabsTab = (t0) => {
|
|
|
9927
9931
|
})
|
|
9928
9932
|
}), /* @__PURE__ */ jsx(DsDropdownMenu.Content, {
|
|
9929
9933
|
className: ds_tabs_tab_module_default.menuContent,
|
|
9930
|
-
children: menuActionItems.map(_temp$
|
|
9934
|
+
children: menuActionItems.map(_temp$11)
|
|
9931
9935
|
})]
|
|
9932
9936
|
});
|
|
9933
9937
|
$[17] = handleMenuActionSelect;
|
|
@@ -9966,7 +9970,7 @@ const DsTabsTab = (t0) => {
|
|
|
9966
9970
|
return t6;
|
|
9967
9971
|
};
|
|
9968
9972
|
DsTabsTab.displayName = "DsTabs.Tab";
|
|
9969
|
-
function _temp$
|
|
9973
|
+
function _temp$11(item) {
|
|
9970
9974
|
return /* @__PURE__ */ jsx(DsDropdownMenu.Item, {
|
|
9971
9975
|
value: item.value,
|
|
9972
9976
|
disabled: item.disabled,
|
|
@@ -10493,7 +10497,7 @@ const YearView$1 = () => {
|
|
|
10493
10497
|
return t0;
|
|
10494
10498
|
};
|
|
10495
10499
|
DsDateInput.displayName = "DsDateInput";
|
|
10496
|
-
function _temp$
|
|
10500
|
+
function _temp$10(weekDay, id) {
|
|
10497
10501
|
return /* @__PURE__ */ jsx(DatePicker.TableHeader, {
|
|
10498
10502
|
className: ds_date_input_module_default.tableHeader,
|
|
10499
10503
|
children: /* @__PURE__ */ jsx(DsTypography, {
|
|
@@ -10528,7 +10532,7 @@ function _temp4$2(datePicker) {
|
|
|
10528
10532
|
className: ds_date_input_module_default.tableHead,
|
|
10529
10533
|
children: /* @__PURE__ */ jsx(DatePicker.TableRow, {
|
|
10530
10534
|
className: ds_date_input_module_default.tableRow,
|
|
10531
|
-
children: datePicker.weekDays.map(_temp$
|
|
10535
|
+
children: datePicker.weekDays.map(_temp$10)
|
|
10532
10536
|
})
|
|
10533
10537
|
}), /* @__PURE__ */ jsx(DatePicker.TableBody, {
|
|
10534
10538
|
className: ds_date_input_module_default.tableBody,
|
|
@@ -11171,7 +11175,7 @@ const DsCommentsDrawer = (t0) => {
|
|
|
11171
11175
|
authorsMap.set(comment.author.id, comment.author.name);
|
|
11172
11176
|
comment.labels?.forEach((label) => labelsSet.add(label));
|
|
11173
11177
|
});
|
|
11174
|
-
availableAuthors = Array.from(authorsMap.entries()).map(_temp$
|
|
11178
|
+
availableAuthors = Array.from(authorsMap.entries()).map(_temp$9);
|
|
11175
11179
|
availableLabels = Array.from(labelsSet);
|
|
11176
11180
|
let filteredComments = comments;
|
|
11177
11181
|
if (!showResolved) filteredComments = filteredComments.filter(_temp2$4);
|
|
@@ -11524,7 +11528,7 @@ const DsCommentsDrawer = (t0) => {
|
|
|
11524
11528
|
return t18;
|
|
11525
11529
|
};
|
|
11526
11530
|
DsCommentsDrawer.displayName = "DsCommentsDrawer";
|
|
11527
|
-
function _temp$
|
|
11531
|
+
function _temp$9(t0) {
|
|
11528
11532
|
const [id, name] = t0;
|
|
11529
11533
|
return {
|
|
11530
11534
|
id,
|
|
@@ -12328,7 +12332,7 @@ const DayView = (t0) => {
|
|
|
12328
12332
|
className: calendar_table_module_default.table,
|
|
12329
12333
|
children: [/* @__PURE__ */ jsx(DatePicker.TableHead, { children: /* @__PURE__ */ jsx(DatePicker.TableRow, {
|
|
12330
12334
|
className: calendar_table_module_default.tableRow,
|
|
12331
|
-
children: datePicker.weekDays.map(_temp$
|
|
12335
|
+
children: datePicker.weekDays.map(_temp$8)
|
|
12332
12336
|
}) }), /* @__PURE__ */ jsx(DatePicker.TableBody, {
|
|
12333
12337
|
className: calendar_table_module_default.tableBody,
|
|
12334
12338
|
children: datePicker.weeks.map(_temp3$3)
|
|
@@ -12343,7 +12347,7 @@ const DayView = (t0) => {
|
|
|
12343
12347
|
} else t1 = $[1];
|
|
12344
12348
|
return t1;
|
|
12345
12349
|
};
|
|
12346
|
-
function _temp$
|
|
12350
|
+
function _temp$8(weekDay, idx) {
|
|
12347
12351
|
return /* @__PURE__ */ jsx(DatePicker.TableHeader, {
|
|
12348
12352
|
className: calendar_table_module_default.tableHeader,
|
|
12349
12353
|
children: /* @__PURE__ */ jsx(DsTypography, {
|
|
@@ -12387,7 +12391,7 @@ const MonthView = () => {
|
|
|
12387
12391
|
} else t0 = $[0];
|
|
12388
12392
|
return t0;
|
|
12389
12393
|
};
|
|
12390
|
-
function _temp$
|
|
12394
|
+
function _temp$7(month, monthIdx) {
|
|
12391
12395
|
return /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
12392
12396
|
value: month.value,
|
|
12393
12397
|
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, {
|
|
@@ -12402,7 +12406,7 @@ function _temp$6(month, monthIdx) {
|
|
|
12402
12406
|
function _temp2$2(months, rowIdx) {
|
|
12403
12407
|
return /* @__PURE__ */ jsx(DatePicker.TableRow, {
|
|
12404
12408
|
className: calendar_table_module_default.tableRow,
|
|
12405
|
-
children: months.map(_temp$
|
|
12409
|
+
children: months.map(_temp$7)
|
|
12406
12410
|
}, rowIdx);
|
|
12407
12411
|
}
|
|
12408
12412
|
function _temp3$2(datePicker) {
|
|
@@ -12434,7 +12438,7 @@ const YearView = () => {
|
|
|
12434
12438
|
} else t0 = $[0];
|
|
12435
12439
|
return t0;
|
|
12436
12440
|
};
|
|
12437
|
-
function _temp$
|
|
12441
|
+
function _temp$6(year, yearIdx) {
|
|
12438
12442
|
return /* @__PURE__ */ jsx(DatePicker.TableCell, {
|
|
12439
12443
|
value: year.value,
|
|
12440
12444
|
children: /* @__PURE__ */ jsx(DatePicker.TableCellTrigger, {
|
|
@@ -12449,7 +12453,7 @@ function _temp$5(year, yearIdx) {
|
|
|
12449
12453
|
function _temp2$1(years, rowIdx) {
|
|
12450
12454
|
return /* @__PURE__ */ jsx(DatePicker.TableRow, {
|
|
12451
12455
|
className: calendar_table_module_default.tableRow,
|
|
12452
|
-
children: years.map(_temp$
|
|
12456
|
+
children: years.map(_temp$6)
|
|
12453
12457
|
}, rowIdx);
|
|
12454
12458
|
}
|
|
12455
12459
|
function _temp3$1(datePicker) {
|
|
@@ -12925,6 +12929,7 @@ var ds_select_module_default = {
|
|
|
12925
12929
|
"item": "KdTZ_G_item",
|
|
12926
12930
|
"itemIcon": "KdTZ_G_itemIcon",
|
|
12927
12931
|
"itemValue": "KdTZ_G_itemValue",
|
|
12932
|
+
"large": "KdTZ_G_large",
|
|
12928
12933
|
"multiSelectItemsContainer": "KdTZ_G_multiSelectItemsContainer",
|
|
12929
12934
|
"searchIcon": "KdTZ_G_searchIcon",
|
|
12930
12935
|
"searchInput": "KdTZ_G_searchInput",
|
|
@@ -13036,7 +13041,7 @@ const SELECT_ALL_OPTION = {
|
|
|
13036
13041
|
value: SELECT_ALL_VALUE
|
|
13037
13042
|
};
|
|
13038
13043
|
const DsSelect = (t0) => {
|
|
13039
|
-
const $ = c(
|
|
13044
|
+
const $ = c(30);
|
|
13040
13045
|
const { id, options: userOptions, value, style, size, clearable, onClear, onBlur, className, placeholder: t1, disabled, renderOption, ...multiselectProps } = t0;
|
|
13041
13046
|
const placeholder = t1 === void 0 ? "Click to select a value" : t1;
|
|
13042
13047
|
const [searchTerm, setSearchTerm] = useState("");
|
|
@@ -13044,7 +13049,7 @@ const DsSelect = (t0) => {
|
|
|
13044
13049
|
const internalOptions = multiselectProps.multiple ? [SELECT_ALL_OPTION, ...userOptions] : userOptions;
|
|
13045
13050
|
const collection = createListCollection$1({
|
|
13046
13051
|
items: internalOptions,
|
|
13047
|
-
itemToValue: _temp$
|
|
13052
|
+
itemToValue: _temp$5
|
|
13048
13053
|
});
|
|
13049
13054
|
let t2;
|
|
13050
13055
|
if ($[0] !== searchTerm) {
|
|
@@ -13106,29 +13111,31 @@ const DsSelect = (t0) => {
|
|
|
13106
13111
|
});
|
|
13107
13112
|
};
|
|
13108
13113
|
const t4 = size === "small" && ds_select_module_default.small;
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13114
|
+
const t5 = size === "large" && ds_select_module_default.large;
|
|
13115
|
+
let t6;
|
|
13116
|
+
if ($[3] !== className || $[4] !== t4 || $[5] !== t5) {
|
|
13117
|
+
t6 = classNames(ds_select_module_default.control, t4, t5, className);
|
|
13112
13118
|
$[3] = className;
|
|
13113
13119
|
$[4] = t4;
|
|
13114
13120
|
$[5] = t5;
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13121
|
+
$[6] = t6;
|
|
13122
|
+
} else t6 = $[6];
|
|
13123
|
+
const t7 = size === "small" ? "small" : "medium";
|
|
13124
|
+
let t8;
|
|
13125
|
+
if ($[7] !== t7) {
|
|
13126
|
+
t8 = /* @__PURE__ */ jsx(Select.Indicator, {
|
|
13120
13127
|
className: ds_select_module_default.triggerIcon,
|
|
13121
13128
|
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
13122
13129
|
icon: "keyboard_arrow_down",
|
|
13123
|
-
size:
|
|
13130
|
+
size: t7
|
|
13124
13131
|
})
|
|
13125
13132
|
});
|
|
13126
|
-
$[6] = t6;
|
|
13127
13133
|
$[7] = t7;
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13134
|
+
$[8] = t8;
|
|
13135
|
+
} else t8 = $[8];
|
|
13136
|
+
let t9;
|
|
13137
|
+
if ($[9] !== clearable || $[10] !== onClear || $[11] !== size) {
|
|
13138
|
+
t9 = clearable && /* @__PURE__ */ jsx(Select.ClearTrigger, {
|
|
13132
13139
|
className: ds_select_module_default.clearIcon,
|
|
13133
13140
|
onClick: onClear,
|
|
13134
13141
|
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
@@ -13136,19 +13143,19 @@ const DsSelect = (t0) => {
|
|
|
13136
13143
|
size: size === "small" ? "small" : "medium"
|
|
13137
13144
|
})
|
|
13138
13145
|
});
|
|
13139
|
-
$[
|
|
13140
|
-
$[
|
|
13141
|
-
$[
|
|
13142
|
-
$[
|
|
13143
|
-
} else
|
|
13146
|
+
$[9] = clearable;
|
|
13147
|
+
$[10] = onClear;
|
|
13148
|
+
$[11] = size;
|
|
13149
|
+
$[12] = t9;
|
|
13150
|
+
} else t9 = $[12];
|
|
13144
13151
|
const T0 = Portal;
|
|
13145
|
-
const
|
|
13146
|
-
const
|
|
13147
|
-
const
|
|
13148
|
-
const
|
|
13149
|
-
let
|
|
13150
|
-
if ($[
|
|
13151
|
-
|
|
13152
|
+
const t10 = Select;
|
|
13153
|
+
const t11 = ds_select_module_default;
|
|
13154
|
+
const t12 = Select;
|
|
13155
|
+
const t13 = ds_select_module_default;
|
|
13156
|
+
let t14;
|
|
13157
|
+
if ($[13] !== searchTerm || $[14] !== userOptions.length) {
|
|
13158
|
+
t14 = userOptions.length > SEARCH_THRESHOLD && /* @__PURE__ */ jsx("div", {
|
|
13152
13159
|
className: ds_select_module_default.searchInput,
|
|
13153
13160
|
children: /* @__PURE__ */ jsx(DsTextInput, {
|
|
13154
13161
|
placeholder: "Search",
|
|
@@ -13161,17 +13168,17 @@ const DsSelect = (t0) => {
|
|
|
13161
13168
|
}) }
|
|
13162
13169
|
})
|
|
13163
13170
|
});
|
|
13164
|
-
$[
|
|
13165
|
-
$[
|
|
13166
|
-
$[
|
|
13167
|
-
} else
|
|
13168
|
-
const
|
|
13171
|
+
$[13] = searchTerm;
|
|
13172
|
+
$[14] = userOptions.length;
|
|
13173
|
+
$[15] = t14;
|
|
13174
|
+
} else t14 = $[15];
|
|
13175
|
+
const t15 = multiselectProps.multiple && /* @__PURE__ */ jsx(SelectItemsChips, {
|
|
13169
13176
|
onValueChange: multiselectProps.onValueChange,
|
|
13170
13177
|
showAll: showAllItems,
|
|
13171
13178
|
onShowAll: () => setShowAllItems(true),
|
|
13172
13179
|
count: 6
|
|
13173
13180
|
});
|
|
13174
|
-
const
|
|
13181
|
+
const t16 = filteredOptions.map((item_0) => {
|
|
13175
13182
|
const checked = getItemCheckedState({
|
|
13176
13183
|
item: item_0,
|
|
13177
13184
|
select,
|
|
@@ -13195,52 +13202,52 @@ const DsSelect = (t0) => {
|
|
|
13195
13202
|
})
|
|
13196
13203
|
}, collection.getItemValue(item_0));
|
|
13197
13204
|
});
|
|
13198
|
-
let
|
|
13199
|
-
if ($[
|
|
13200
|
-
|
|
13201
|
-
className:
|
|
13205
|
+
let t17;
|
|
13206
|
+
if ($[16] !== t12.Content || $[17] !== t13.content || $[18] !== t14 || $[19] !== t15 || $[20] !== t16) {
|
|
13207
|
+
t17 = /* @__PURE__ */ jsxs(t12.Content, {
|
|
13208
|
+
className: t13.content,
|
|
13202
13209
|
children: [
|
|
13203
|
-
t13,
|
|
13204
13210
|
t14,
|
|
13205
|
-
t15
|
|
13211
|
+
t15,
|
|
13212
|
+
t16
|
|
13206
13213
|
]
|
|
13207
13214
|
});
|
|
13208
|
-
$[
|
|
13209
|
-
$[
|
|
13210
|
-
$[17] = t13;
|
|
13215
|
+
$[16] = t12.Content;
|
|
13216
|
+
$[17] = t13.content;
|
|
13211
13217
|
$[18] = t14;
|
|
13212
13218
|
$[19] = t15;
|
|
13213
13219
|
$[20] = t16;
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
+
$[21] = t17;
|
|
13221
|
+
} else t17 = $[21];
|
|
13222
|
+
let t18;
|
|
13223
|
+
if ($[22] !== t10.Positioner || $[23] !== t11.viewport || $[24] !== t17) {
|
|
13224
|
+
t18 = /* @__PURE__ */ jsx(t10.Positioner, {
|
|
13225
|
+
className: t11.viewport,
|
|
13226
|
+
children: t17
|
|
13220
13227
|
});
|
|
13221
|
-
$[
|
|
13222
|
-
$[
|
|
13223
|
-
$[23] = t9.Positioner;
|
|
13228
|
+
$[22] = t10.Positioner;
|
|
13229
|
+
$[23] = t11.viewport;
|
|
13224
13230
|
$[24] = t17;
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
if ($[25] !== T0 || $[26] !== t17) {
|
|
13228
|
-
t18 = /* @__PURE__ */ jsx(T0, { children: t17 });
|
|
13229
|
-
$[25] = T0;
|
|
13230
|
-
$[26] = t17;
|
|
13231
|
-
$[27] = t18;
|
|
13232
|
-
} else t18 = $[27];
|
|
13231
|
+
$[25] = t18;
|
|
13232
|
+
} else t18 = $[25];
|
|
13233
13233
|
let t19;
|
|
13234
|
-
if ($[
|
|
13235
|
-
t19 = /* @__PURE__ */ jsx(
|
|
13234
|
+
if ($[26] !== T0 || $[27] !== t18) {
|
|
13235
|
+
t19 = /* @__PURE__ */ jsx(T0, { children: t18 });
|
|
13236
|
+
$[26] = T0;
|
|
13237
|
+
$[27] = t18;
|
|
13236
13238
|
$[28] = t19;
|
|
13237
13239
|
} else t19 = $[28];
|
|
13240
|
+
let t20;
|
|
13241
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13242
|
+
t20 = /* @__PURE__ */ jsx(Select.HiddenSelect, { style: { display: "none" } });
|
|
13243
|
+
$[29] = t20;
|
|
13244
|
+
} else t20 = $[29];
|
|
13238
13245
|
return /* @__PURE__ */ jsxs(Select.RootProvider, {
|
|
13239
13246
|
value: select,
|
|
13240
13247
|
lazyMount: true,
|
|
13241
13248
|
children: [
|
|
13242
13249
|
/* @__PURE__ */ jsxs(Select.Control, {
|
|
13243
|
-
className:
|
|
13250
|
+
className: t6,
|
|
13244
13251
|
style,
|
|
13245
13252
|
onBlur,
|
|
13246
13253
|
onKeyDown: (e) => {
|
|
@@ -13256,11 +13263,11 @@ const DsSelect = (t0) => {
|
|
|
13256
13263
|
id,
|
|
13257
13264
|
className: ds_select_module_default.trigger,
|
|
13258
13265
|
"aria-labelledby": null,
|
|
13259
|
-
children: [renderTriggerValue(),
|
|
13260
|
-
}),
|
|
13266
|
+
children: [renderTriggerValue(), t8]
|
|
13267
|
+
}), t9]
|
|
13261
13268
|
}),
|
|
13262
|
-
|
|
13263
|
-
|
|
13269
|
+
t19,
|
|
13270
|
+
t20
|
|
13264
13271
|
]
|
|
13265
13272
|
});
|
|
13266
13273
|
};
|
|
@@ -13270,7 +13277,7 @@ function getItemCheckedState({ item, select, options }) {
|
|
|
13270
13277
|
return select.hasSelectedItems ? "indeterminate" : false;
|
|
13271
13278
|
}
|
|
13272
13279
|
DsSelect.displayName = "DsSelect";
|
|
13273
|
-
function _temp$
|
|
13280
|
+
function _temp$5(item) {
|
|
13274
13281
|
return item.value;
|
|
13275
13282
|
}
|
|
13276
13283
|
function _temp2(value_0) {
|
|
@@ -13292,6 +13299,7 @@ var ds_number_input_module_default = {
|
|
|
13292
13299
|
"iconButton": "XMQUTG_iconButton",
|
|
13293
13300
|
"indicator": "XMQUTG_indicator",
|
|
13294
13301
|
"input": "XMQUTG_input",
|
|
13302
|
+
"large": "XMQUTG_large",
|
|
13295
13303
|
"small": "XMQUTG_small",
|
|
13296
13304
|
"textInputContainer": "XMQUTG_textInputContainer",
|
|
13297
13305
|
"trigger": "XMQUTG_trigger"
|
|
@@ -13457,6 +13465,7 @@ var ds_password_input_module_default = {
|
|
|
13457
13465
|
"iconButton": "v5YZUq_iconButton",
|
|
13458
13466
|
"indicator": "v5YZUq_indicator",
|
|
13459
13467
|
"input": "v5YZUq_input",
|
|
13468
|
+
"large": "v5YZUq_large",
|
|
13460
13469
|
"small": "v5YZUq_small",
|
|
13461
13470
|
"textInputContainer": "v5YZUq_textInputContainer",
|
|
13462
13471
|
"trigger": "v5YZUq_trigger"
|
|
@@ -14526,7 +14535,7 @@ const FileUploadItem = (t0) => {
|
|
|
14526
14535
|
} else t20 = $[46];
|
|
14527
14536
|
let t21;
|
|
14528
14537
|
if ($[47] !== errors || $[48] !== status) {
|
|
14529
|
-
t21 = status === "error" && errors?.length && errors.map(_temp$
|
|
14538
|
+
t21 = status === "error" && errors?.length && errors.map(_temp$4);
|
|
14530
14539
|
$[47] = errors;
|
|
14531
14540
|
$[48] = status;
|
|
14532
14541
|
$[49] = t21;
|
|
@@ -14569,7 +14578,7 @@ const FileUploadItem = (t0) => {
|
|
|
14569
14578
|
} else t23 = $[60];
|
|
14570
14579
|
return t23;
|
|
14571
14580
|
};
|
|
14572
|
-
function _temp$
|
|
14581
|
+
function _temp$4(error) {
|
|
14573
14582
|
return /* @__PURE__ */ jsxs("div", {
|
|
14574
14583
|
className: file_upload_item_module_default.errorMessage,
|
|
14575
14584
|
children: [/* @__PURE__ */ jsx(DsIcon, {
|
|
@@ -17346,7 +17355,7 @@ const DsRadioGroupLegacy = (t0) => {
|
|
|
17346
17355
|
} else t3 = $[3];
|
|
17347
17356
|
let t4;
|
|
17348
17357
|
if ($[4] !== options) {
|
|
17349
|
-
t4 = options.map(_temp$
|
|
17358
|
+
t4 = options.map(_temp$3);
|
|
17350
17359
|
$[4] = options;
|
|
17351
17360
|
$[5] = t4;
|
|
17352
17361
|
} else t4 = $[5];
|
|
@@ -17389,7 +17398,7 @@ const DsRadioGroup = {
|
|
|
17389
17398
|
DsRadioGroup.Root.displayName = "DsRadioGroup.Root";
|
|
17390
17399
|
DsRadioGroup.Item.displayName = "DsRadioGroup.Item";
|
|
17391
17400
|
DsRadioGroupLegacy.displayName = "DsRadioGroupLegacy";
|
|
17392
|
-
function _temp$
|
|
17401
|
+
function _temp$3(option) {
|
|
17393
17402
|
return /* @__PURE__ */ jsxs(RadioGroup.Item, {
|
|
17394
17403
|
value: option.value,
|
|
17395
17404
|
disabled: option.disabled,
|
|
@@ -17649,7 +17658,7 @@ const useIsOverflowing = (text) => {
|
|
|
17649
17658
|
const observer = new ResizeObserver(measure);
|
|
17650
17659
|
observer.observe(element);
|
|
17651
17660
|
const frame = requestAnimationFrame(measure);
|
|
17652
|
-
document.fonts.ready.then(measure).catch(_temp$
|
|
17661
|
+
document.fonts.ready.then(measure).catch(_temp$2);
|
|
17653
17662
|
document.fonts.addEventListener("loadingdone", measure);
|
|
17654
17663
|
return () => {
|
|
17655
17664
|
cancelAnimationFrame(frame);
|
|
@@ -17677,7 +17686,7 @@ const useIsOverflowing = (text) => {
|
|
|
17677
17686
|
} else t2 = $[4];
|
|
17678
17687
|
return t2;
|
|
17679
17688
|
};
|
|
17680
|
-
function _temp$
|
|
17689
|
+
function _temp$2() {}
|
|
17681
17690
|
//#endregion
|
|
17682
17691
|
//#region src/components/ds-site-node/ds-site-node.module.scss
|
|
17683
17692
|
var ds_site_node_module_default = {
|
|
@@ -18039,6 +18048,254 @@ DsSkeleton.Text.displayName = "DsSkeleton.Text";
|
|
|
18039
18048
|
DsSkeleton.Circle.displayName = "DsSkeleton.Circle";
|
|
18040
18049
|
DsSkeleton.Rect.displayName = "DsSkeleton.Rect";
|
|
18041
18050
|
//#endregion
|
|
18051
|
+
//#region src/components/ds-slider/ds-slider.utils.ts
|
|
18052
|
+
/**
|
|
18053
|
+
* Normalizes the public value (a number or a `[min, max]` tuple) into the
|
|
18054
|
+
* `number[]` shape Ark's slider works with. Returns `undefined` when no value
|
|
18055
|
+
* is provided so controlled/uncontrolled detection stays intact.
|
|
18056
|
+
*/
|
|
18057
|
+
const toArray = (value) => {
|
|
18058
|
+
if (value === void 0) return;
|
|
18059
|
+
return Array.isArray(value) ? value : [value];
|
|
18060
|
+
};
|
|
18061
|
+
//#endregion
|
|
18062
|
+
//#region src/components/ds-slider/ds-slider.module.scss
|
|
18063
|
+
var ds_slider_module_default = {
|
|
18064
|
+
"control": "_7ZtIQW_control",
|
|
18065
|
+
"header": "_7ZtIQW_header",
|
|
18066
|
+
"large": "_7ZtIQW_large",
|
|
18067
|
+
"range": "_7ZtIQW_range",
|
|
18068
|
+
"root": "_7ZtIQW_root",
|
|
18069
|
+
"small": "_7ZtIQW_small",
|
|
18070
|
+
"thumb": "_7ZtIQW_thumb",
|
|
18071
|
+
"track": "_7ZtIQW_track",
|
|
18072
|
+
"valueText": "_7ZtIQW_valueText"
|
|
18073
|
+
};
|
|
18074
|
+
//#endregion
|
|
18075
|
+
//#region src/components/ds-slider/ds-slider.tsx
|
|
18076
|
+
/**
|
|
18077
|
+
* @summary Selects a numeric value or a numeric interval by dragging thumbs along a track.
|
|
18078
|
+
*
|
|
18079
|
+
* Use for picking a number or interval from a known continuous range where visual
|
|
18080
|
+
* adjustment beats typing (filter ranges, thresholds, capacity limits). For exact
|
|
18081
|
+
* numeric entry use DsNumberInput; for a few discrete options use DsSegmentGroup.
|
|
18082
|
+
*/
|
|
18083
|
+
const DsSlider$1 = (t0) => {
|
|
18084
|
+
const $ = c(69);
|
|
18085
|
+
const { ref, className, style, label, type: t1, size: t2, min: t3, max: t4, step: t5, value, defaultValue, name, disabled: t6, thumbLabels, formatValue: t7, onValueChange, onValueChangeEnd } = t0;
|
|
18086
|
+
const type = t1 === void 0 ? "value" : t1;
|
|
18087
|
+
const size = t2 === void 0 ? "medium" : t2;
|
|
18088
|
+
const min = t3 === void 0 ? 0 : t3;
|
|
18089
|
+
const max = t4 === void 0 ? 100 : t4;
|
|
18090
|
+
const step = t5 === void 0 ? 1 : t5;
|
|
18091
|
+
const disabled = t6 === void 0 ? false : t6;
|
|
18092
|
+
const formatValue = t7 === void 0 ? String : t7;
|
|
18093
|
+
const isRange = type === "range";
|
|
18094
|
+
let t8;
|
|
18095
|
+
if ($[0] !== value) {
|
|
18096
|
+
t8 = toArray(value);
|
|
18097
|
+
$[0] = value;
|
|
18098
|
+
$[1] = t8;
|
|
18099
|
+
} else t8 = $[1];
|
|
18100
|
+
const controlledValue = t8;
|
|
18101
|
+
let t9;
|
|
18102
|
+
if ($[2] !== isRange || $[3] !== max || $[4] !== min) {
|
|
18103
|
+
t9 = isRange ? [min, max] : [min];
|
|
18104
|
+
$[2] = isRange;
|
|
18105
|
+
$[3] = max;
|
|
18106
|
+
$[4] = min;
|
|
18107
|
+
$[5] = t9;
|
|
18108
|
+
} else t9 = $[5];
|
|
18109
|
+
const fallbackValue = t9;
|
|
18110
|
+
let t10;
|
|
18111
|
+
if ($[6] !== isRange || $[7] !== max || $[8] !== min) {
|
|
18112
|
+
t10 = (next) => isRange ? [next[0] ?? min, next[1] ?? max] : next[0] ?? min;
|
|
18113
|
+
$[6] = isRange;
|
|
18114
|
+
$[7] = max;
|
|
18115
|
+
$[8] = min;
|
|
18116
|
+
$[9] = t10;
|
|
18117
|
+
} else t10 = $[9];
|
|
18118
|
+
const toPublicValue = t10;
|
|
18119
|
+
let t11;
|
|
18120
|
+
if ($[10] !== controlledValue || $[11] !== onValueChange || $[12] !== toPublicValue) {
|
|
18121
|
+
t11 = controlledValue !== void 0 ? (next_0) => onValueChange?.(toPublicValue(next_0)) : void 0;
|
|
18122
|
+
$[10] = controlledValue;
|
|
18123
|
+
$[11] = onValueChange;
|
|
18124
|
+
$[12] = toPublicValue;
|
|
18125
|
+
$[13] = t11;
|
|
18126
|
+
} else t11 = $[13];
|
|
18127
|
+
let t12;
|
|
18128
|
+
if ($[14] !== defaultValue || $[15] !== fallbackValue) {
|
|
18129
|
+
t12 = toArray(defaultValue) ?? fallbackValue;
|
|
18130
|
+
$[14] = defaultValue;
|
|
18131
|
+
$[15] = fallbackValue;
|
|
18132
|
+
$[16] = t12;
|
|
18133
|
+
} else t12 = $[16];
|
|
18134
|
+
const [values, setValues] = useControlled(controlledValue, t11, t12);
|
|
18135
|
+
let t13;
|
|
18136
|
+
if ($[17] !== controlledValue || $[18] !== onValueChange || $[19] !== setValues || $[20] !== toPublicValue) {
|
|
18137
|
+
t13 = (details) => {
|
|
18138
|
+
setValues(details.value);
|
|
18139
|
+
if (controlledValue === void 0) onValueChange?.(toPublicValue(details.value));
|
|
18140
|
+
};
|
|
18141
|
+
$[17] = controlledValue;
|
|
18142
|
+
$[18] = onValueChange;
|
|
18143
|
+
$[19] = setValues;
|
|
18144
|
+
$[20] = toPublicValue;
|
|
18145
|
+
$[21] = t13;
|
|
18146
|
+
} else t13 = $[21];
|
|
18147
|
+
const handleValueChange = t13;
|
|
18148
|
+
let t14;
|
|
18149
|
+
if ($[22] !== formatValue || $[23] !== isRange || $[24] !== max || $[25] !== min || $[26] !== values[0] || $[27] !== values[1]) {
|
|
18150
|
+
t14 = isRange ? `${formatValue(values[0] ?? min)}-${formatValue(values[1] ?? max)}` : formatValue(values[0] ?? min);
|
|
18151
|
+
$[22] = formatValue;
|
|
18152
|
+
$[23] = isRange;
|
|
18153
|
+
$[24] = max;
|
|
18154
|
+
$[25] = min;
|
|
18155
|
+
$[26] = values[0];
|
|
18156
|
+
$[27] = values[1];
|
|
18157
|
+
$[28] = t14;
|
|
18158
|
+
} else t14 = $[28];
|
|
18159
|
+
const valueText = t14;
|
|
18160
|
+
const textColor = disabled ? "disabled" : "main";
|
|
18161
|
+
let t15;
|
|
18162
|
+
if ($[29] !== isRange || $[30] !== label || $[31] !== thumbLabels) {
|
|
18163
|
+
t15 = isRange ? thumbLabels : label ? [label] : thumbLabels;
|
|
18164
|
+
$[29] = isRange;
|
|
18165
|
+
$[30] = label;
|
|
18166
|
+
$[31] = thumbLabels;
|
|
18167
|
+
$[32] = t15;
|
|
18168
|
+
} else t15 = $[32];
|
|
18169
|
+
const thumbAriaLabels = t15;
|
|
18170
|
+
const t16 = size === "small";
|
|
18171
|
+
const t17 = size === "large";
|
|
18172
|
+
let t18;
|
|
18173
|
+
if ($[33] !== className || $[34] !== t16 || $[35] !== t17) {
|
|
18174
|
+
t18 = classNames(ds_slider_module_default.root, {
|
|
18175
|
+
[ds_slider_module_default.small]: t16,
|
|
18176
|
+
[ds_slider_module_default.large]: t17
|
|
18177
|
+
}, className);
|
|
18178
|
+
$[33] = className;
|
|
18179
|
+
$[34] = t16;
|
|
18180
|
+
$[35] = t17;
|
|
18181
|
+
$[36] = t18;
|
|
18182
|
+
} else t18 = $[36];
|
|
18183
|
+
const rootClass = t18;
|
|
18184
|
+
let t19;
|
|
18185
|
+
if ($[37] !== onValueChangeEnd || $[38] !== toPublicValue) {
|
|
18186
|
+
t19 = (details_0) => onValueChangeEnd?.(toPublicValue(details_0.value));
|
|
18187
|
+
$[37] = onValueChangeEnd;
|
|
18188
|
+
$[38] = toPublicValue;
|
|
18189
|
+
$[39] = t19;
|
|
18190
|
+
} else t19 = $[39];
|
|
18191
|
+
let t20;
|
|
18192
|
+
if ($[40] !== label || $[41] !== textColor) {
|
|
18193
|
+
t20 = label && /* @__PURE__ */ jsx(DsTypography, {
|
|
18194
|
+
variant: "body-sm-md",
|
|
18195
|
+
color: textColor,
|
|
18196
|
+
children: label
|
|
18197
|
+
});
|
|
18198
|
+
$[40] = label;
|
|
18199
|
+
$[41] = textColor;
|
|
18200
|
+
$[42] = t20;
|
|
18201
|
+
} else t20 = $[42];
|
|
18202
|
+
let t21;
|
|
18203
|
+
if ($[43] !== textColor || $[44] !== valueText) {
|
|
18204
|
+
t21 = /* @__PURE__ */ jsx(DsTypography, {
|
|
18205
|
+
variant: "body-sm-md",
|
|
18206
|
+
color: textColor,
|
|
18207
|
+
className: ds_slider_module_default.valueText,
|
|
18208
|
+
children: valueText
|
|
18209
|
+
});
|
|
18210
|
+
$[43] = textColor;
|
|
18211
|
+
$[44] = valueText;
|
|
18212
|
+
$[45] = t21;
|
|
18213
|
+
} else t21 = $[45];
|
|
18214
|
+
let t22;
|
|
18215
|
+
if ($[46] !== t20 || $[47] !== t21) {
|
|
18216
|
+
t22 = /* @__PURE__ */ jsxs("div", {
|
|
18217
|
+
className: ds_slider_module_default.header,
|
|
18218
|
+
children: [t20, t21]
|
|
18219
|
+
});
|
|
18220
|
+
$[46] = t20;
|
|
18221
|
+
$[47] = t21;
|
|
18222
|
+
$[48] = t22;
|
|
18223
|
+
} else t22 = $[48];
|
|
18224
|
+
let t23;
|
|
18225
|
+
if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18226
|
+
t23 = /* @__PURE__ */ jsx(Slider.Track, {
|
|
18227
|
+
className: ds_slider_module_default.track,
|
|
18228
|
+
children: /* @__PURE__ */ jsx(Slider.Range, { className: ds_slider_module_default.range })
|
|
18229
|
+
});
|
|
18230
|
+
$[49] = t23;
|
|
18231
|
+
} else t23 = $[49];
|
|
18232
|
+
let t24;
|
|
18233
|
+
if ($[50] !== values) {
|
|
18234
|
+
t24 = values.map(_temp$1);
|
|
18235
|
+
$[50] = values;
|
|
18236
|
+
$[51] = t24;
|
|
18237
|
+
} else t24 = $[51];
|
|
18238
|
+
let t25;
|
|
18239
|
+
if ($[52] !== t24) {
|
|
18240
|
+
t25 = /* @__PURE__ */ jsxs(Slider.Control, {
|
|
18241
|
+
className: ds_slider_module_default.control,
|
|
18242
|
+
children: [t23, t24]
|
|
18243
|
+
});
|
|
18244
|
+
$[52] = t24;
|
|
18245
|
+
$[53] = t25;
|
|
18246
|
+
} else t25 = $[53];
|
|
18247
|
+
let t26;
|
|
18248
|
+
if ($[54] !== disabled || $[55] !== handleValueChange || $[56] !== max || $[57] !== min || $[58] !== name || $[59] !== ref || $[60] !== rootClass || $[61] !== step || $[62] !== style || $[63] !== t19 || $[64] !== t22 || $[65] !== t25 || $[66] !== thumbAriaLabels || $[67] !== values) {
|
|
18249
|
+
t26 = /* @__PURE__ */ jsxs(Slider.Root, {
|
|
18250
|
+
ref,
|
|
18251
|
+
className: rootClass,
|
|
18252
|
+
style,
|
|
18253
|
+
value: values,
|
|
18254
|
+
min,
|
|
18255
|
+
max,
|
|
18256
|
+
step,
|
|
18257
|
+
name,
|
|
18258
|
+
disabled,
|
|
18259
|
+
"aria-label": thumbAriaLabels,
|
|
18260
|
+
onValueChange: handleValueChange,
|
|
18261
|
+
onValueChangeEnd: t19,
|
|
18262
|
+
children: [t22, t25]
|
|
18263
|
+
});
|
|
18264
|
+
$[54] = disabled;
|
|
18265
|
+
$[55] = handleValueChange;
|
|
18266
|
+
$[56] = max;
|
|
18267
|
+
$[57] = min;
|
|
18268
|
+
$[58] = name;
|
|
18269
|
+
$[59] = ref;
|
|
18270
|
+
$[60] = rootClass;
|
|
18271
|
+
$[61] = step;
|
|
18272
|
+
$[62] = style;
|
|
18273
|
+
$[63] = t19;
|
|
18274
|
+
$[64] = t22;
|
|
18275
|
+
$[65] = t25;
|
|
18276
|
+
$[66] = thumbAriaLabels;
|
|
18277
|
+
$[67] = values;
|
|
18278
|
+
$[68] = t26;
|
|
18279
|
+
} else t26 = $[68];
|
|
18280
|
+
return t26;
|
|
18281
|
+
};
|
|
18282
|
+
DsSlider$1.displayName = "DsSlider";
|
|
18283
|
+
function _temp$1(_, index) {
|
|
18284
|
+
return /* @__PURE__ */ jsx(Slider.Thumb, {
|
|
18285
|
+
index,
|
|
18286
|
+
className: ds_slider_module_default.thumb,
|
|
18287
|
+
children: /* @__PURE__ */ jsx(Slider.HiddenInput, {})
|
|
18288
|
+
}, index);
|
|
18289
|
+
}
|
|
18290
|
+
//#endregion
|
|
18291
|
+
//#region src/components/ds-slider/index.ts
|
|
18292
|
+
const DsSlider = withResponsiveProps(DsSlider$1, [
|
|
18293
|
+
"size",
|
|
18294
|
+
"step",
|
|
18295
|
+
"thumbLabels"
|
|
18296
|
+
]);
|
|
18297
|
+
DsSlider.displayName = "DsSlider";
|
|
18298
|
+
//#endregion
|
|
18042
18299
|
//#region src/components/ds-smart-tabs/ds-smart-tabs.module.scss
|
|
18043
18300
|
var ds_smart_tabs_module_default = {
|
|
18044
18301
|
"active": "yjt8Lq_active",
|
|
@@ -19943,6 +20200,8 @@ var ds_table_header_module_default = {
|
|
|
19943
20200
|
"groupStart": "-2rCNG_groupStart",
|
|
19944
20201
|
"header": "-2rCNG_header",
|
|
19945
20202
|
"headerCell": "-2rCNG_headerCell",
|
|
20203
|
+
"headerLabel": "-2rCNG_headerLabel",
|
|
20204
|
+
"headerLabelStack": "-2rCNG_headerLabelStack",
|
|
19946
20205
|
"headerRow": "-2rCNG_headerRow",
|
|
19947
20206
|
"headerRowNoBorder": "-2rCNG_headerRowNoBorder",
|
|
19948
20207
|
"headerRowVirtualized": "-2rCNG_headerRowVirtualized",
|
|
@@ -19968,16 +20227,15 @@ var ds_table_shared_module_default = {
|
|
|
19968
20227
|
"rotate-90": "WQ6Axa_rotate-90"
|
|
19969
20228
|
};
|
|
19970
20229
|
//#endregion
|
|
19971
|
-
//#region src/components/ds-table/
|
|
19972
|
-
|
|
19973
|
-
const
|
|
19974
|
-
|
|
19975
|
-
|
|
19976
|
-
|
|
19977
|
-
};
|
|
20230
|
+
//#region src/components/ds-table/hooks/use-editing-state.ts
|
|
20231
|
+
/** Shown when an async `onCellEdit` commit rejects with a non-`Error` reason. */
|
|
20232
|
+
const EDIT_FALLBACK_ERROR = "Save failed";
|
|
20233
|
+
const isThenable = (value) => typeof value === "object" && value !== null && typeof value.then === "function";
|
|
20234
|
+
/** Prefer a thrown `Error`'s message; fall back to a generic string otherwise. */
|
|
20235
|
+
const extractErrorMessage = (reason, fallback) => reason instanceof Error && reason.message ? reason.message : fallback;
|
|
19978
20236
|
/**
|
|
19979
20237
|
* Hoisted editing state for single-cell-at-a-time inline editing.
|
|
19980
|
-
*
|
|
20238
|
+
* Surfaced on DsTableContext so cell renderers and editors share one provider.
|
|
19981
20239
|
*/
|
|
19982
20240
|
const useEditingState = (onCellEdit, onCellValidate) => {
|
|
19983
20241
|
const [editing, setEditing] = useState(null);
|
|
@@ -19987,6 +20245,12 @@ const useEditingState = (onCellEdit, onCellValidate) => {
|
|
|
19987
20245
|
onCellValidateRef.current = onCellValidate;
|
|
19988
20246
|
const editingRef = useRef(editing);
|
|
19989
20247
|
editingRef.current = editing;
|
|
20248
|
+
const generationRef = useRef(0);
|
|
20249
|
+
const abortRef = useRef(null);
|
|
20250
|
+
const abortPending = useCallback(() => {
|
|
20251
|
+
abortRef.current?.abort();
|
|
20252
|
+
abortRef.current = null;
|
|
20253
|
+
}, []);
|
|
19990
20254
|
return {
|
|
19991
20255
|
editing,
|
|
19992
20256
|
beginEdit: useCallback((cell) => {
|
|
@@ -19994,56 +20258,230 @@ const useEditingState = (onCellEdit, onCellValidate) => {
|
|
|
19994
20258
|
if (current) {
|
|
19995
20259
|
if (current.cell.row.id === cell.row.id && current.cell.column.id === cell.column.id) return;
|
|
19996
20260
|
}
|
|
20261
|
+
abortPending();
|
|
20262
|
+
generationRef.current += 1;
|
|
19997
20263
|
setEditing({
|
|
19998
20264
|
cell,
|
|
19999
20265
|
draftValue: cell.getValue(),
|
|
20000
|
-
error: null
|
|
20266
|
+
error: null,
|
|
20267
|
+
pending: false
|
|
20001
20268
|
});
|
|
20002
|
-
}, []),
|
|
20269
|
+
}, [abortPending]),
|
|
20003
20270
|
setDraft: useCallback((value) => {
|
|
20004
20271
|
const current = editingRef.current;
|
|
20005
20272
|
if (!current) return;
|
|
20273
|
+
const error = onCellValidateRef.current?.(current.cell.row.original, current.cell.column.id, value) ?? null;
|
|
20006
20274
|
setEditing({
|
|
20007
20275
|
...current,
|
|
20008
20276
|
draftValue: value,
|
|
20009
|
-
error
|
|
20277
|
+
error
|
|
20010
20278
|
});
|
|
20011
20279
|
}, []),
|
|
20012
20280
|
commit: useCallback((overrideValue) => {
|
|
20013
20281
|
const current = editingRef.current;
|
|
20014
|
-
if (!current) return;
|
|
20282
|
+
if (!current || current.pending) return;
|
|
20015
20283
|
const valueToCommit = overrideValue !== void 0 ? overrideValue : current.draftValue;
|
|
20016
|
-
const
|
|
20017
|
-
if (
|
|
20284
|
+
const validationError = onCellValidateRef.current?.(current.cell.row.original, current.cell.column.id, valueToCommit) ?? null;
|
|
20285
|
+
if (validationError !== null) {
|
|
20018
20286
|
setEditing({
|
|
20019
20287
|
...current,
|
|
20020
20288
|
draftValue: valueToCommit,
|
|
20021
|
-
error
|
|
20289
|
+
error: validationError,
|
|
20290
|
+
pending: false
|
|
20022
20291
|
});
|
|
20023
20292
|
return;
|
|
20024
20293
|
}
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20294
|
+
generationRef.current += 1;
|
|
20295
|
+
const token = generationRef.current;
|
|
20296
|
+
abortPending();
|
|
20297
|
+
const controller = new AbortController();
|
|
20298
|
+
abortRef.current = controller;
|
|
20299
|
+
const { signal } = controller;
|
|
20300
|
+
const isStale = () => generationRef.current !== token;
|
|
20301
|
+
const settle = () => {
|
|
20302
|
+
if (abortRef.current === controller) abortRef.current = null;
|
|
20303
|
+
};
|
|
20304
|
+
const showError = (error) => {
|
|
20305
|
+
settle();
|
|
20306
|
+
if (isStale()) return;
|
|
20307
|
+
const live = editingRef.current;
|
|
20308
|
+
setEditing(live ? {
|
|
20309
|
+
...live,
|
|
20310
|
+
draftValue: valueToCommit,
|
|
20311
|
+
error,
|
|
20312
|
+
pending: false
|
|
20313
|
+
} : null);
|
|
20314
|
+
};
|
|
20315
|
+
const editResult = onCellEditRef.current?.(current.cell.row.original, current.cell.column.id, valueToCommit, signal);
|
|
20316
|
+
const applyEditResult = (error) => {
|
|
20317
|
+
if (error !== null) {
|
|
20318
|
+
showError(error);
|
|
20319
|
+
return;
|
|
20320
|
+
}
|
|
20321
|
+
settle();
|
|
20322
|
+
if (isStale()) return;
|
|
20323
|
+
setEditing(null);
|
|
20324
|
+
};
|
|
20325
|
+
if (!isThenable(editResult)) {
|
|
20326
|
+
applyEditResult(editResult ?? null);
|
|
20327
|
+
return;
|
|
20328
|
+
}
|
|
20329
|
+
setEditing({
|
|
20330
|
+
...current,
|
|
20331
|
+
draftValue: valueToCommit,
|
|
20332
|
+
error: null,
|
|
20333
|
+
pending: true
|
|
20334
|
+
});
|
|
20335
|
+
editResult.then((value) => {
|
|
20336
|
+
applyEditResult(value ?? null);
|
|
20337
|
+
}, (reason) => {
|
|
20338
|
+
applyEditResult(extractErrorMessage(reason, EDIT_FALLBACK_ERROR));
|
|
20339
|
+
});
|
|
20340
|
+
}, [abortPending]),
|
|
20028
20341
|
cancel: useCallback(() => {
|
|
20342
|
+
abortPending();
|
|
20343
|
+
generationRef.current += 1;
|
|
20029
20344
|
setEditing(null);
|
|
20030
|
-
}, [])
|
|
20345
|
+
}, [abortPending])
|
|
20031
20346
|
};
|
|
20032
20347
|
};
|
|
20033
20348
|
//#endregion
|
|
20349
|
+
//#region src/components/ds-table/context/ds-table-context.tsx
|
|
20350
|
+
const DsTableContext = createContext(null);
|
|
20351
|
+
const useDsTableContext = () => {
|
|
20352
|
+
const context = useContext(DsTableContext);
|
|
20353
|
+
if (!context) throw new Error("useDsTableContext must be used within DsTable");
|
|
20354
|
+
return context;
|
|
20355
|
+
};
|
|
20356
|
+
/**
|
|
20357
|
+
* Assembles {@link DsTableContext} from public table props plus derived grouping
|
|
20358
|
+
* and resize slices. Owns inline-edit state. Picks context fields from
|
|
20359
|
+
* `tableProps` and ignores the rest (`columns`, `data`, etc.).
|
|
20360
|
+
*/
|
|
20361
|
+
const DsTableContextProvider = ({ tableProps, derived, children }) => {
|
|
20362
|
+
const { stickyHeader, bordered, fullWidth, rowSize, expandable, selectable, reorderable, showSelectAllCheckbox, loading, onRowClick, onRowDoubleClick, primaryRowActions, secondaryRowActions, renderExpandedRow, virtualized, activeRowId, locale, onCellEdit, onCellValidate } = tableProps;
|
|
20363
|
+
const { collapsedColumnGroups, onToggleColumnGroup } = derived.grouping;
|
|
20364
|
+
const { resizableColumns, resizeSizingReady, resizeContainerRef, onResizeHover, onResizeDragStart, onResizeReset, onResizeKeyboardNudge } = derived.resize;
|
|
20365
|
+
const { editing, beginEdit, setDraft, commit, cancel } = useEditingState(onCellEdit, onCellValidate);
|
|
20366
|
+
const contextValue = useMemo(() => ({
|
|
20367
|
+
stickyHeader,
|
|
20368
|
+
bordered,
|
|
20369
|
+
fullWidth,
|
|
20370
|
+
rowSize,
|
|
20371
|
+
expandable,
|
|
20372
|
+
selectable,
|
|
20373
|
+
reorderable,
|
|
20374
|
+
showSelectAllCheckbox,
|
|
20375
|
+
loading,
|
|
20376
|
+
onRowClick: loading ? void 0 : onRowClick,
|
|
20377
|
+
onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
|
|
20378
|
+
primaryRowActions,
|
|
20379
|
+
secondaryRowActions,
|
|
20380
|
+
renderExpandedRow,
|
|
20381
|
+
virtualized,
|
|
20382
|
+
activeRowId,
|
|
20383
|
+
collapsedColumnGroups,
|
|
20384
|
+
onToggleColumnGroup,
|
|
20385
|
+
locale,
|
|
20386
|
+
onCellEdit,
|
|
20387
|
+
resizableColumns,
|
|
20388
|
+
resizeSizingReady,
|
|
20389
|
+
resizeContainerRef,
|
|
20390
|
+
onResizeHover,
|
|
20391
|
+
onResizeDragStart,
|
|
20392
|
+
onResizeReset,
|
|
20393
|
+
onResizeKeyboardNudge,
|
|
20394
|
+
editing,
|
|
20395
|
+
beginEdit,
|
|
20396
|
+
setDraft,
|
|
20397
|
+
commit,
|
|
20398
|
+
cancel
|
|
20399
|
+
}), [
|
|
20400
|
+
stickyHeader,
|
|
20401
|
+
bordered,
|
|
20402
|
+
fullWidth,
|
|
20403
|
+
rowSize,
|
|
20404
|
+
expandable,
|
|
20405
|
+
selectable,
|
|
20406
|
+
reorderable,
|
|
20407
|
+
showSelectAllCheckbox,
|
|
20408
|
+
loading,
|
|
20409
|
+
onRowClick,
|
|
20410
|
+
onRowDoubleClick,
|
|
20411
|
+
primaryRowActions,
|
|
20412
|
+
secondaryRowActions,
|
|
20413
|
+
renderExpandedRow,
|
|
20414
|
+
virtualized,
|
|
20415
|
+
activeRowId,
|
|
20416
|
+
collapsedColumnGroups,
|
|
20417
|
+
onToggleColumnGroup,
|
|
20418
|
+
locale,
|
|
20419
|
+
onCellEdit,
|
|
20420
|
+
resizableColumns,
|
|
20421
|
+
resizeSizingReady,
|
|
20422
|
+
resizeContainerRef,
|
|
20423
|
+
onResizeHover,
|
|
20424
|
+
onResizeDragStart,
|
|
20425
|
+
onResizeReset,
|
|
20426
|
+
onResizeKeyboardNudge,
|
|
20427
|
+
editing,
|
|
20428
|
+
beginEdit,
|
|
20429
|
+
setDraft,
|
|
20430
|
+
commit,
|
|
20431
|
+
cancel
|
|
20432
|
+
]);
|
|
20433
|
+
return /* @__PURE__ */ jsx(DsTableContext.Provider, {
|
|
20434
|
+
value: contextValue,
|
|
20435
|
+
children
|
|
20436
|
+
});
|
|
20437
|
+
};
|
|
20438
|
+
DsTableContextProvider.displayName = "DsTableContextProvider";
|
|
20439
|
+
/**
|
|
20440
|
+
* Column id used for the synthetic expander column injected when `expandable` is set.
|
|
20441
|
+
*/
|
|
20442
|
+
const EXPANDER_COLUMN_ID = "expander";
|
|
20443
|
+
/**
|
|
20444
|
+
* Column id used for the synthetic selection column injected when `selectable` is set.
|
|
20445
|
+
*/
|
|
20446
|
+
const SELECT_COLUMN_ID = "select";
|
|
20447
|
+
/**
|
|
20448
|
+
* Column id used for the synthetic reorder column injected when `reorderable` is set
|
|
20449
|
+
* (non-virtualized tables only).
|
|
20450
|
+
*/
|
|
20451
|
+
const REORDER_COLUMN_ID = "reorder";
|
|
20452
|
+
/**
|
|
20453
|
+
* Injected utility leaf ids (`select`, `expander`, `reorder`). Present in internal
|
|
20454
|
+
* sizing for layout; omitted from the public `onColumnSizingChange` payload.
|
|
20455
|
+
*/
|
|
20456
|
+
const BUILTIN_COLUMN_IDS = Object.freeze(/* @__PURE__ */ new Set([
|
|
20457
|
+
SELECT_COLUMN_ID,
|
|
20458
|
+
EXPANDER_COLUMN_ID,
|
|
20459
|
+
REORDER_COLUMN_ID
|
|
20460
|
+
]));
|
|
20461
|
+
//#endregion
|
|
20034
20462
|
//#region src/components/ds-table/utils/column-size.ts
|
|
20463
|
+
const DEFAULT_MAX_COLUMN_SIZE = Number.MAX_SAFE_INTEGER;
|
|
20035
20464
|
/**
|
|
20036
|
-
*
|
|
20465
|
+
* Whether a column should use a fixed width rather than fill (`flex: 1`).
|
|
20037
20466
|
*
|
|
20038
|
-
*
|
|
20039
|
-
*
|
|
20040
|
-
*
|
|
20467
|
+
* True when the user has resized it (`columnSizing` entry), or when the raw
|
|
20468
|
+
* column def authored `size` (`meta.hasExplicitSize`). TanStack merges a
|
|
20469
|
+
* default size of 150 onto every column, so `columnDef.size` alone cannot
|
|
20470
|
+
* tell authored 150px from an unsized fill column.
|
|
20471
|
+
*/
|
|
20472
|
+
const isExplicitColumnWidth = (column, columnSizing) => {
|
|
20473
|
+
if (columnSizing[column.id] !== void 0) return true;
|
|
20474
|
+
return column.columnDef.meta?.hasExplicitSize === true;
|
|
20475
|
+
};
|
|
20476
|
+
/**
|
|
20477
|
+
* Style for a table column/cell based on its size and whether that size is explicit.
|
|
20041
20478
|
*
|
|
20042
|
-
*
|
|
20043
|
-
*
|
|
20479
|
+
* Explicit columns get a fixed `width` plus `minWidth` and `flexShrink: 0` so they
|
|
20480
|
+
* enforce horizontal overflow on the table container. Fill columns grow evenly via
|
|
20481
|
+
* `flex: 1`.
|
|
20044
20482
|
*/
|
|
20045
|
-
const getColumnSizeStyle = (columnSize) => {
|
|
20046
|
-
if (
|
|
20483
|
+
const getColumnSizeStyle = (columnSize, isExplicit) => {
|
|
20484
|
+
if (isExplicit) return {
|
|
20047
20485
|
width: columnSize,
|
|
20048
20486
|
minWidth: columnSize,
|
|
20049
20487
|
flexShrink: 0
|
|
@@ -20053,35 +20491,116 @@ const getColumnSizeStyle = (columnSize) => {
|
|
|
20053
20491
|
minWidth: 0
|
|
20054
20492
|
};
|
|
20055
20493
|
};
|
|
20494
|
+
const getHeaderSizeCssVar = (headerId) => `--header-${headerId}-size`;
|
|
20495
|
+
const getColumnSizeCssVar = (columnId) => `--col-${columnId}-size`;
|
|
20056
20496
|
/**
|
|
20057
|
-
*
|
|
20497
|
+
* Pixel width via a CSS variable on an ancestor, so frozen (memoized) cells still
|
|
20498
|
+
* track live resize without React reconciling each row.
|
|
20058
20499
|
*/
|
|
20059
|
-
const
|
|
20500
|
+
const getResizableHeaderStyle = (headerId) => ({
|
|
20501
|
+
width: `calc(var(${getHeaderSizeCssVar(headerId)}) * 1px)`,
|
|
20502
|
+
minWidth: `calc(var(${getHeaderSizeCssVar(headerId)}) * 1px)`,
|
|
20503
|
+
flexShrink: 0
|
|
20504
|
+
});
|
|
20505
|
+
const getResizableColumnStyle = (columnId) => ({
|
|
20506
|
+
width: `calc(var(${getColumnSizeCssVar(columnId)}) * 1px)`,
|
|
20507
|
+
minWidth: `calc(var(${getColumnSizeCssVar(columnId)}) * 1px)`,
|
|
20508
|
+
flexShrink: 0
|
|
20509
|
+
});
|
|
20510
|
+
const getHeaderCellSizeStyle = (headerId, columnSize, isExplicit, resizeSizingReady) => {
|
|
20511
|
+
if (resizeSizingReady) return getResizableHeaderStyle(headerId);
|
|
20512
|
+
return getColumnSizeStyle(columnSize, isExplicit);
|
|
20513
|
+
};
|
|
20514
|
+
const getBodyCellSizeStyle = (columnId, columnSize, isExplicit, resizeSizingReady) => {
|
|
20515
|
+
if (resizeSizingReady) return getResizableColumnStyle(columnId);
|
|
20516
|
+
return getColumnSizeStyle(columnSize, isExplicit);
|
|
20517
|
+
};
|
|
20060
20518
|
/**
|
|
20061
|
-
*
|
|
20519
|
+
* TanStack v8 performant-resize map: header ids for header cells, column ids for
|
|
20520
|
+
* body cells. Values are unitless px; consumers use `calc(var(...) * 1px)`.
|
|
20062
20521
|
*/
|
|
20063
|
-
const
|
|
20522
|
+
const getColumnSizeCssVars = (headers) => {
|
|
20523
|
+
const colSizes = {};
|
|
20524
|
+
for (const header of headers) {
|
|
20525
|
+
colSizes[getHeaderSizeCssVar(header.id)] = header.getSize();
|
|
20526
|
+
colSizes[getColumnSizeCssVar(header.column.id)] = header.column.getSize();
|
|
20527
|
+
}
|
|
20528
|
+
return colSizes;
|
|
20529
|
+
};
|
|
20064
20530
|
/**
|
|
20065
|
-
*
|
|
20066
|
-
* (
|
|
20531
|
+
* TanStack `getSize()` formula: `min(max(minSize, width), maxSize)`. Defaults
|
|
20532
|
+
* match DsTable (`RESIZE_MIN_COLUMN_WIDTH`, unlimited max).
|
|
20067
20533
|
*/
|
|
20068
|
-
const
|
|
20534
|
+
const clampColumnSize = (width, minSize = 52, maxSize = DEFAULT_MAX_COLUMN_SIZE) => Math.min(Math.max(minSize, width), maxSize);
|
|
20535
|
+
/**
|
|
20536
|
+
* Clamps every finite entry in `sizing` to that leaf's `minSize` / `maxSize`.
|
|
20537
|
+
* Non-finite widths are omitted so they do not poison state. Ids missing from
|
|
20538
|
+
* `columns` use the table defaults.
|
|
20539
|
+
*/
|
|
20540
|
+
const clampColumnSizing = (sizing, columns) => {
|
|
20541
|
+
const boundsById = new Map(columns.map((column) => [column.id, column.columnDef]));
|
|
20542
|
+
const next = {};
|
|
20543
|
+
for (const [id, width] of Object.entries(sizing)) {
|
|
20544
|
+
if (!Number.isFinite(width)) continue;
|
|
20545
|
+
const bounds = boundsById.get(id);
|
|
20546
|
+
next[id] = clampColumnSize(width, bounds?.minSize ?? 52, bounds?.maxSize ?? DEFAULT_MAX_COLUMN_SIZE);
|
|
20547
|
+
}
|
|
20548
|
+
return next;
|
|
20549
|
+
};
|
|
20550
|
+
/**
|
|
20551
|
+
* Width to restore on double-click: explicit `columnDef.size`, otherwise the
|
|
20552
|
+
* snapshotted measured width.
|
|
20553
|
+
*/
|
|
20554
|
+
const getResizeOriginSize = (column, measuredWidth) => {
|
|
20555
|
+
if (isExplicitColumnWidth(column, {})) return column.columnDef.size;
|
|
20556
|
+
return measuredWidth;
|
|
20557
|
+
};
|
|
20558
|
+
/**
|
|
20559
|
+
* Measured leaf header widths keyed by column id. Group header cells share
|
|
20560
|
+
* `data-column-id` with a different id, so only `leafColumnIds` are read.
|
|
20561
|
+
*/
|
|
20562
|
+
const measureLeafHeaderWidths = (tableEl, leafColumnIds) => {
|
|
20563
|
+
const widths = {};
|
|
20564
|
+
for (const id of leafColumnIds) {
|
|
20565
|
+
const cell = tableEl.querySelector(`thead th[data-column-id="${CSS.escape(id)}"]`);
|
|
20566
|
+
if (cell instanceof HTMLElement) widths[id] = cell.getBoundingClientRect().width;
|
|
20567
|
+
}
|
|
20568
|
+
return widths;
|
|
20569
|
+
};
|
|
20570
|
+
/**
|
|
20571
|
+
* Sizing entries for leaves that are not yet in `existing`. Does not overwrite
|
|
20572
|
+
* user-resized (or previously snapshotted) ids.
|
|
20573
|
+
*/
|
|
20574
|
+
const collectMissingLeafSizing = (measured, existing) => {
|
|
20575
|
+
const next = {};
|
|
20576
|
+
for (const [id, width] of Object.entries(measured)) if (existing[id] === void 0) next[id] = Math.round(width);
|
|
20577
|
+
return next;
|
|
20578
|
+
};
|
|
20579
|
+
/**
|
|
20580
|
+
* Copy of `columnSizing` without injected utility leaves. Use at the public
|
|
20581
|
+
* `onColumnSizingChange` boundary so consumers persist only their own columns.
|
|
20582
|
+
*/
|
|
20583
|
+
const omitBuiltinColumnSizing = (columnSizing) => {
|
|
20584
|
+
const next = {};
|
|
20585
|
+
for (const [id, size] of Object.entries(columnSizing)) if (!BUILTIN_COLUMN_IDS.has(id)) next[id] = size;
|
|
20586
|
+
return next;
|
|
20587
|
+
};
|
|
20069
20588
|
//#endregion
|
|
20070
20589
|
//#region src/components/ds-table/grouping/utils/column-group.ts
|
|
20071
20590
|
/**
|
|
20072
20591
|
* Builds the flex style for a group header cell so it lines up with the combined
|
|
20073
20592
|
* width of its visible leaf columns.
|
|
20074
20593
|
*
|
|
20075
|
-
* Fixed-width leaves contribute to `flexBasis`;
|
|
20076
|
-
*
|
|
20077
|
-
*
|
|
20594
|
+
* Fixed-width leaves contribute to `flexBasis`; fill leaves each add one unit of
|
|
20595
|
+
* `flexGrow`, mirroring how {@link getColumnSizeStyle} sizes leaf cells so both
|
|
20596
|
+
* header rows distribute free space identically.
|
|
20078
20597
|
*/
|
|
20079
|
-
const getGroupColumnSizeStyle = (leafColumns) => {
|
|
20598
|
+
const getGroupColumnSizeStyle = (leafColumns, columnSizing) => {
|
|
20080
20599
|
let fixedWidth = 0;
|
|
20081
20600
|
let flexCount = 0;
|
|
20082
20601
|
for (const leaf of leafColumns) {
|
|
20083
20602
|
const size = leaf.getSize();
|
|
20084
|
-
if (
|
|
20603
|
+
if (isExplicitColumnWidth(leaf, columnSizing)) fixedWidth += size;
|
|
20085
20604
|
else flexCount += 1;
|
|
20086
20605
|
}
|
|
20087
20606
|
if (flexCount === 0) return {
|
|
@@ -20169,12 +20688,156 @@ const useColumnGroups = ({ columns, collapsedColumnGroups, onCollapsedColumnGrou
|
|
|
20169
20688
|
*/
|
|
20170
20689
|
const defaultDsTableLocale = Object.freeze({
|
|
20171
20690
|
collapseColumnGroup: "Collapse column group",
|
|
20172
|
-
expandColumnGroup: "Expand column group"
|
|
20691
|
+
expandColumnGroup: "Expand column group",
|
|
20692
|
+
resizeColumn: "Resize column"
|
|
20173
20693
|
});
|
|
20174
20694
|
//#endregion
|
|
20175
|
-
//#region src/components/ds-table/components/ds-table-
|
|
20176
|
-
var
|
|
20177
|
-
|
|
20695
|
+
//#region src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.module.scss
|
|
20696
|
+
var ds_table_resize_handle_module_default = { "resizeHandle": "vDdhQW_resizeHandle" };
|
|
20697
|
+
//#endregion
|
|
20698
|
+
//#region src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.tsx
|
|
20699
|
+
const clientPointFromEvent = (event) => {
|
|
20700
|
+
if (event instanceof MouseEvent) return {
|
|
20701
|
+
x: event.clientX,
|
|
20702
|
+
y: event.clientY
|
|
20703
|
+
};
|
|
20704
|
+
if (typeof TouchEvent !== "undefined" && event instanceof TouchEvent) {
|
|
20705
|
+
const touch = event.changedTouches[0];
|
|
20706
|
+
return touch ? {
|
|
20707
|
+
x: touch.clientX,
|
|
20708
|
+
y: touch.clientY
|
|
20709
|
+
} : null;
|
|
20710
|
+
}
|
|
20711
|
+
return null;
|
|
20712
|
+
};
|
|
20713
|
+
/**
|
|
20714
|
+
* Handle straddling the right edge of a resizable header cell.
|
|
20715
|
+
*
|
|
20716
|
+
* Drag is TanStack v8 `header.getResizeHandler()`. Hover drives the full-height
|
|
20717
|
+
* overlay; double-click restores snapshot origin widths for this header's
|
|
20718
|
+
* leaves. As a focusable `separator`, Arrow keys nudge the width (Shift for a
|
|
20719
|
+
* larger step) for keyboard operability (WCAG 2.1.1).
|
|
20720
|
+
*/
|
|
20721
|
+
const DsTableResizeHandle = ({ header }) => {
|
|
20722
|
+
const { resizeContainerRef, onResizeHover, onResizeDragStart, onResizeReset, onResizeKeyboardNudge, locale } = useDsTableContext();
|
|
20723
|
+
const handleRef = useRef(null);
|
|
20724
|
+
const isPointerOverRef = useRef(false);
|
|
20725
|
+
const detachDragEndRef = useRef(null);
|
|
20726
|
+
useEffect(() => () => {
|
|
20727
|
+
detachDragEndRef.current?.();
|
|
20728
|
+
}, []);
|
|
20729
|
+
const label = {
|
|
20730
|
+
...defaultDsTableLocale,
|
|
20731
|
+
...locale
|
|
20732
|
+
}.resizeColumn;
|
|
20733
|
+
const measureCellRightOffset = () => {
|
|
20734
|
+
const containerEl = resizeContainerRef?.current;
|
|
20735
|
+
const cellEl = handleRef.current?.closest("th");
|
|
20736
|
+
if (!containerEl || !cellEl) return null;
|
|
20737
|
+
return cellEl.getBoundingClientRect().right - containerEl.getBoundingClientRect().left + containerEl.scrollLeft;
|
|
20738
|
+
};
|
|
20739
|
+
const reportHover = () => {
|
|
20740
|
+
const offset = measureCellRightOffset();
|
|
20741
|
+
if (offset === null) return;
|
|
20742
|
+
onResizeHover?.(header.column.id, offset);
|
|
20743
|
+
};
|
|
20744
|
+
const clearHover = () => {
|
|
20745
|
+
isPointerOverRef.current = false;
|
|
20746
|
+
onResizeHover?.(null, null);
|
|
20747
|
+
};
|
|
20748
|
+
const syncHoverAtPoint = (clientX, clientY) => {
|
|
20749
|
+
const handleEl = handleRef.current;
|
|
20750
|
+
const hit = (handleEl?.ownerDocument ?? document).elementFromPoint(clientX, clientY);
|
|
20751
|
+
if (handleEl && hit && (hit === handleEl || handleEl.contains(hit))) {
|
|
20752
|
+
isPointerOverRef.current = true;
|
|
20753
|
+
reportHover();
|
|
20754
|
+
return;
|
|
20755
|
+
}
|
|
20756
|
+
clearHover();
|
|
20757
|
+
};
|
|
20758
|
+
const attachDragEndListeners = () => {
|
|
20759
|
+
detachDragEndRef.current?.();
|
|
20760
|
+
const doc = handleRef.current?.ownerDocument ?? document;
|
|
20761
|
+
const onDragEnd = (event) => {
|
|
20762
|
+
detachDragEndRef.current?.();
|
|
20763
|
+
detachDragEndRef.current = null;
|
|
20764
|
+
const point = clientPointFromEvent(event);
|
|
20765
|
+
clearHover();
|
|
20766
|
+
(handleRef.current?.ownerDocument.defaultView ?? window).requestAnimationFrame(() => {
|
|
20767
|
+
if (!point) return;
|
|
20768
|
+
syncHoverAtPoint(point.x, point.y);
|
|
20769
|
+
});
|
|
20770
|
+
};
|
|
20771
|
+
doc.addEventListener("mouseup", onDragEnd);
|
|
20772
|
+
doc.addEventListener("touchend", onDragEnd);
|
|
20773
|
+
detachDragEndRef.current = () => {
|
|
20774
|
+
doc.removeEventListener("mouseup", onDragEnd);
|
|
20775
|
+
doc.removeEventListener("touchend", onDragEnd);
|
|
20776
|
+
};
|
|
20777
|
+
};
|
|
20778
|
+
const handlePointerEnter = () => {
|
|
20779
|
+
isPointerOverRef.current = true;
|
|
20780
|
+
reportHover();
|
|
20781
|
+
};
|
|
20782
|
+
const handlePointerLeave = () => {
|
|
20783
|
+
clearHover();
|
|
20784
|
+
};
|
|
20785
|
+
const startDrag = () => {
|
|
20786
|
+
const offset = measureCellRightOffset();
|
|
20787
|
+
if (offset !== null) onResizeDragStart?.(offset);
|
|
20788
|
+
};
|
|
20789
|
+
const handlePointerDown = (event) => {
|
|
20790
|
+
if (event.pointerType === "touch") return;
|
|
20791
|
+
event.stopPropagation();
|
|
20792
|
+
startDrag();
|
|
20793
|
+
header.getResizeHandler(handleRef.current?.ownerDocument ?? document)(event);
|
|
20794
|
+
attachDragEndListeners();
|
|
20795
|
+
};
|
|
20796
|
+
const handleTouchStart = (event) => {
|
|
20797
|
+
event.stopPropagation();
|
|
20798
|
+
startDrag();
|
|
20799
|
+
header.getResizeHandler(handleRef.current?.ownerDocument ?? document)(event);
|
|
20800
|
+
attachDragEndListeners();
|
|
20801
|
+
};
|
|
20802
|
+
const handleReset = (event) => {
|
|
20803
|
+
event.preventDefault();
|
|
20804
|
+
event.stopPropagation();
|
|
20805
|
+
const leafIds = header.column.getLeafColumns().map((column) => column.id);
|
|
20806
|
+
onResizeReset?.(leafIds);
|
|
20807
|
+
if (isPointerOverRef.current) reportHover();
|
|
20808
|
+
else clearHover();
|
|
20809
|
+
};
|
|
20810
|
+
const handleKeyDown = (event) => {
|
|
20811
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
20812
|
+
event.preventDefault();
|
|
20813
|
+
event.stopPropagation();
|
|
20814
|
+
const step = event.shiftKey ? 40 : 10;
|
|
20815
|
+
const delta = event.key === "ArrowRight" ? step : -step;
|
|
20816
|
+
onResizeKeyboardNudge?.(header.column.id, delta);
|
|
20817
|
+
};
|
|
20818
|
+
const isLeaf = header.subHeaders.length === 0;
|
|
20819
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20820
|
+
ref: handleRef,
|
|
20821
|
+
role: "separator",
|
|
20822
|
+
"aria-orientation": "vertical",
|
|
20823
|
+
"aria-label": label,
|
|
20824
|
+
tabIndex: 0,
|
|
20825
|
+
"aria-valuenow": Math.round(header.getSize()),
|
|
20826
|
+
"aria-valuemin": isLeaf ? header.column.columnDef.minSize ?? 52 : void 0,
|
|
20827
|
+
className: ds_table_resize_handle_module_default.resizeHandle,
|
|
20828
|
+
onPointerDown: handlePointerDown,
|
|
20829
|
+
onPointerEnter: handlePointerEnter,
|
|
20830
|
+
onPointerLeave: handlePointerLeave,
|
|
20831
|
+
onTouchStart: handleTouchStart,
|
|
20832
|
+
onClick: (event) => event.stopPropagation(),
|
|
20833
|
+
onDoubleClick: handleReset,
|
|
20834
|
+
onKeyDown: handleKeyDown
|
|
20835
|
+
});
|
|
20836
|
+
};
|
|
20837
|
+
//#endregion
|
|
20838
|
+
//#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss
|
|
20839
|
+
var ds_table_group_header_cell_module_default = {
|
|
20840
|
+
"collapseToggle": "HuJ4KG_collapseToggle",
|
|
20178
20841
|
"groupHeaderCell": "HuJ4KG_groupHeaderCell",
|
|
20179
20842
|
"groupHeaderContent": "HuJ4KG_groupHeaderContent",
|
|
20180
20843
|
"groupLabel": "HuJ4KG_groupLabel"
|
|
@@ -20182,22 +20845,25 @@ var ds_table_group_header_cell_module_default = {
|
|
|
20182
20845
|
//#endregion
|
|
20183
20846
|
//#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx
|
|
20184
20847
|
const DsTableGroupHeaderCell = ({ header }) => {
|
|
20185
|
-
const { collapsedColumnGroups, onToggleColumnGroup, locale } = useDsTableContext();
|
|
20848
|
+
const { collapsedColumnGroups, onToggleColumnGroup, locale, resizableColumns, resizeSizingReady } = useDsTableContext();
|
|
20186
20849
|
const groupId = header.column.id;
|
|
20187
|
-
const
|
|
20850
|
+
const visibleLeafColumns = header.column.getLeafColumns().filter((leaf) => leaf.getIsVisible());
|
|
20851
|
+
const groupStyle = resizeSizingReady ? getResizableHeaderStyle(header.id) : getGroupColumnSizeStyle(visibleLeafColumns, {});
|
|
20188
20852
|
const isCollapsible = header.column.columnDef.meta?.group?.collapsible ?? false;
|
|
20189
20853
|
const isCollapsed = collapsedColumnGroups?.includes(groupId) ?? false;
|
|
20854
|
+
const canResize = resizableColumns && !isCollapsed && header.column.getCanResize();
|
|
20190
20855
|
const mergedLocale = {
|
|
20191
20856
|
...defaultDsTableLocale,
|
|
20192
20857
|
...locale
|
|
20193
20858
|
};
|
|
20194
20859
|
const toggleLabel = isCollapsed ? mergedLocale.expandColumnGroup : mergedLocale.collapseColumnGroup;
|
|
20195
20860
|
const handleToggle = () => onToggleColumnGroup?.(groupId);
|
|
20196
|
-
return /* @__PURE__ */
|
|
20861
|
+
return /* @__PURE__ */ jsxs(TableHead, {
|
|
20862
|
+
"data-column-id": groupId,
|
|
20197
20863
|
className: ds_table_group_header_cell_module_default.groupHeaderCell,
|
|
20198
20864
|
style: groupStyle,
|
|
20199
20865
|
colSpan: header.colSpan,
|
|
20200
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
20866
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
20201
20867
|
className: ds_table_group_header_cell_module_default.groupHeaderContent,
|
|
20202
20868
|
children: [/* @__PURE__ */ jsx("span", {
|
|
20203
20869
|
className: ds_table_group_header_cell_module_default.groupLabel,
|
|
@@ -20212,42 +20878,49 @@ const DsTableGroupHeaderCell = ({ header }) => {
|
|
|
20212
20878
|
title: toggleLabel,
|
|
20213
20879
|
onClick: handleToggle
|
|
20214
20880
|
})]
|
|
20215
|
-
})
|
|
20881
|
+
}), canResize && /* @__PURE__ */ jsx(DsTableResizeHandle, { header })]
|
|
20216
20882
|
});
|
|
20217
20883
|
};
|
|
20218
20884
|
//#endregion
|
|
20219
20885
|
//#region src/components/ds-table/components/ds-table-header/ds-table-header.tsx
|
|
20220
20886
|
const DsTableHeader = ({ table }) => {
|
|
20221
|
-
const { bordered, virtualized } = useDsTableContext();
|
|
20887
|
+
const { bordered, virtualized, resizableColumns, resizeSizingReady } = useDsTableContext();
|
|
20222
20888
|
return /* @__PURE__ */ jsx(TableHeader, {
|
|
20223
20889
|
className: classNames(ds_table_header_module_default.header, virtualized && ds_table_header_module_default.virtualizedHeader),
|
|
20224
20890
|
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, {
|
|
20225
20891
|
className: classNames(ds_table_header_module_default.headerRow, !bordered && ds_table_header_module_default.headerRowNoBorder, virtualized && ds_table_header_module_default.headerRowVirtualized),
|
|
20226
20892
|
children: headerGroup.headers.map((header) => {
|
|
20893
|
+
const columnSizing = table.getState().columnSizing;
|
|
20227
20894
|
if (header.isPlaceholder) return /* @__PURE__ */ jsx(TableHead, {
|
|
20228
20895
|
className: ds_table_header_module_default.headerCell,
|
|
20229
|
-
style:
|
|
20896
|
+
style: getHeaderCellSizeStyle(header.id, header.getSize(), isExplicitColumnWidth(header.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady)
|
|
20230
20897
|
}, header.id);
|
|
20231
20898
|
if (header.subHeaders.length > 0) return /* @__PURE__ */ jsx(DsTableGroupHeaderCell, { header }, header.id);
|
|
20232
|
-
const headerStyle =
|
|
20899
|
+
const headerStyle = getHeaderCellSizeStyle(header.id, header.column.getSize(), isExplicitColumnWidth(header.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady);
|
|
20233
20900
|
const canSort = header.column.getCanSort();
|
|
20901
|
+
const canResize = resizableColumns && header.column.getCanResize();
|
|
20234
20902
|
const isSelectColumn = header.column.id === SELECT_COLUMN_ID;
|
|
20235
20903
|
const isGroupStart = isFirstLeafColumnOfGroup(header.column);
|
|
20236
20904
|
const metaFilter = header.column.columnDef.meta?.filter;
|
|
20237
20905
|
const resolvedFilter = metaFilter && "render" in metaFilter ? metaFilter : void 0;
|
|
20238
20906
|
const hasActiveColumnFilter = resolvedFilter?.hasActiveFilter ?? false;
|
|
20239
|
-
return /* @__PURE__ */
|
|
20907
|
+
return /* @__PURE__ */ jsxs(TableHead, {
|
|
20908
|
+
"data-column-id": header.column.id,
|
|
20240
20909
|
className: classNames(ds_table_header_module_default.headerCell, canSort && ds_table_header_module_default.sortableHeader, isSelectColumn && ds_table_header_module_default.selectHeaderCell, resolvedFilter && ds_table_header_module_default.filterableHeader, hasActiveColumnFilter && ds_table_header_module_default.filterActive, isGroupStart && ds_table_header_module_default.groupStart),
|
|
20241
20910
|
onClick: header.column.getToggleSortingHandler(),
|
|
20242
20911
|
style: headerStyle,
|
|
20243
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
20912
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
20244
20913
|
className: ds_table_header_module_default.headerSortContainer,
|
|
20245
20914
|
children: [
|
|
20246
20915
|
/* @__PURE__ */ jsx(DsStack, {
|
|
20247
20916
|
direction: "column",
|
|
20248
20917
|
justifyContent: "center",
|
|
20249
20918
|
width: "100%",
|
|
20250
|
-
|
|
20919
|
+
className: ds_table_header_module_default.headerLabelStack,
|
|
20920
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
20921
|
+
className: ds_table_header_module_default.headerLabel,
|
|
20922
|
+
children: flexRender(header.column.columnDef.header, header.getContext())
|
|
20923
|
+
})
|
|
20251
20924
|
}),
|
|
20252
20925
|
canSort && /* @__PURE__ */ jsx("div", {
|
|
20253
20926
|
className: ds_table_header_module_default.pageButtonIconContainer,
|
|
@@ -20273,13 +20946,29 @@ const DsTableHeader = ({ table }) => {
|
|
|
20273
20946
|
})
|
|
20274
20947
|
})
|
|
20275
20948
|
]
|
|
20276
|
-
})
|
|
20949
|
+
}), canResize && /* @__PURE__ */ jsx(DsTableResizeHandle, { header })]
|
|
20277
20950
|
}, header.id);
|
|
20278
20951
|
})
|
|
20279
20952
|
}, headerGroup.id))
|
|
20280
20953
|
});
|
|
20281
20954
|
};
|
|
20282
20955
|
//#endregion
|
|
20956
|
+
//#region src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.module.scss
|
|
20957
|
+
var ds_table_resize_overlay_module_default = { "resizeOverlay": "DO-LLa_resizeOverlay" };
|
|
20958
|
+
//#endregion
|
|
20959
|
+
//#region src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.tsx
|
|
20960
|
+
/**
|
|
20961
|
+
* Full-height divider that tracks the active column's right edge during hover
|
|
20962
|
+
* and drag resize.
|
|
20963
|
+
*/
|
|
20964
|
+
const DsTableResizeOverlay = ({ offset, phase }) => /* @__PURE__ */ jsx("div", {
|
|
20965
|
+
className: ds_table_resize_overlay_module_default.resizeOverlay,
|
|
20966
|
+
style: { left: offset },
|
|
20967
|
+
"data-resize-overlay": true,
|
|
20968
|
+
"data-resize-phase": phase,
|
|
20969
|
+
"aria-hidden": true
|
|
20970
|
+
});
|
|
20971
|
+
//#endregion
|
|
20283
20972
|
//#region src/components/ds-table/ds-table.module.scss
|
|
20284
20973
|
var ds_table_module_default = {
|
|
20285
20974
|
"bulkActionsVisible": "iL9mtW_bulkActionsVisible",
|
|
@@ -20294,6 +20983,28 @@ var ds_table_module_default = {
|
|
|
20294
20983
|
"virtualizedContainer": "iL9mtW_virtualizedContainer"
|
|
20295
20984
|
};
|
|
20296
20985
|
//#endregion
|
|
20986
|
+
//#region src/components/ds-table/ds-table-defaults.ts
|
|
20987
|
+
/**
|
|
20988
|
+
* Applies the documented `DsTable` prop defaults. Call once at the table
|
|
20989
|
+
* boundary so orchestration and context see the same resolved values.
|
|
20990
|
+
*/
|
|
20991
|
+
const applyDsTableDefaults = (props) => ({
|
|
20992
|
+
...props,
|
|
20993
|
+
virtualized: props.virtualized ?? false,
|
|
20994
|
+
stickyHeader: props.stickyHeader ?? true,
|
|
20995
|
+
bordered: props.bordered ?? true,
|
|
20996
|
+
fullWidth: props.fullWidth ?? true,
|
|
20997
|
+
rowSize: props.rowSize ?? "medium",
|
|
20998
|
+
loading: props.loading ?? false,
|
|
20999
|
+
expandable: props.expandable ?? false,
|
|
21000
|
+
selectable: props.selectable ?? false,
|
|
21001
|
+
showSelectAllCheckbox: props.showSelectAllCheckbox ?? true,
|
|
21002
|
+
primaryRowActions: props.primaryRowActions ?? [],
|
|
21003
|
+
actions: props.actions ?? [],
|
|
21004
|
+
reorderable: props.reorderable ?? false,
|
|
21005
|
+
resizableColumns: props.resizableColumns ?? false
|
|
21006
|
+
});
|
|
21007
|
+
//#endregion
|
|
20297
21008
|
//#region src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss
|
|
20298
21009
|
var ds_table_editable_cell_module_default = {
|
|
20299
21010
|
"editButton": "g5FEoW_editButton",
|
|
@@ -20359,12 +21070,16 @@ var ds_table_editing_cell_module_default = {
|
|
|
20359
21070
|
//#endregion
|
|
20360
21071
|
//#region src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx
|
|
20361
21072
|
const DsTableEditingCell = ({ cell }) => {
|
|
20362
|
-
const { commit, cancel } = useDsTableContext();
|
|
21073
|
+
const { commit, cancel, editing } = useDsTableContext();
|
|
20363
21074
|
const columnDef = cell.column.columnDef;
|
|
20364
21075
|
const editAnchorRef = useRef(null);
|
|
21076
|
+
const isActiveCell = editing?.cell.id === cell.id;
|
|
21077
|
+
const isPending = isActiveCell && editing.pending;
|
|
21078
|
+
const hasError = isActiveCell && editing.error !== null;
|
|
20365
21079
|
const handleSubmit = (event) => {
|
|
20366
21080
|
event.preventDefault();
|
|
20367
21081
|
event.stopPropagation();
|
|
21082
|
+
if (isPending || hasError) return;
|
|
20368
21083
|
commit();
|
|
20369
21084
|
};
|
|
20370
21085
|
useEffect(() => {
|
|
@@ -20416,6 +21131,8 @@ const DsTableEditingCell = ({ cell }) => {
|
|
|
20416
21131
|
variant: "tertiary",
|
|
20417
21132
|
size: "small",
|
|
20418
21133
|
icon: "check",
|
|
21134
|
+
loading: isPending,
|
|
21135
|
+
disabled: hasError,
|
|
20419
21136
|
"aria-label": "Confirm edit",
|
|
20420
21137
|
onClick: (event) => {
|
|
20421
21138
|
event.stopPropagation();
|
|
@@ -20561,7 +21278,7 @@ const DsRowDragHandle = ({ isDragging, attributes, listeners, style }) => {
|
|
|
20561
21278
|
});
|
|
20562
21279
|
};
|
|
20563
21280
|
const DsTableRow = ({ ref, row, isSelected }) => {
|
|
20564
|
-
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading } = useDsTableContext();
|
|
21281
|
+
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading, resizeSizingReady } = useDsTableContext();
|
|
20565
21282
|
const isExpanded = row.getIsExpanded();
|
|
20566
21283
|
const isActive = activeRowId === row.id;
|
|
20567
21284
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
|
@@ -20569,7 +21286,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
20569
21286
|
disabled: !reorderable
|
|
20570
21287
|
});
|
|
20571
21288
|
const rowStyle = reorderable ? {
|
|
20572
|
-
transform: CSS.Transform.toString(transform),
|
|
21289
|
+
transform: CSS$1.Transform.toString(transform),
|
|
20573
21290
|
transition,
|
|
20574
21291
|
...isDragging ? {
|
|
20575
21292
|
background: "var(--color-dap-purple-200)",
|
|
@@ -20590,7 +21307,8 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
20590
21307
|
onClick: () => onRowClick?.(row.original),
|
|
20591
21308
|
onDoubleClick: () => onRowDoubleClick?.(row.original),
|
|
20592
21309
|
children: row.getVisibleCells().map((cell, idx) => {
|
|
20593
|
-
const
|
|
21310
|
+
const columnSizing = cell.getContext().table.getState().columnSizing;
|
|
21311
|
+
const cellStyle = getBodyCellSizeStyle(cell.column.id, cell.column.getSize(), isExplicitColumnWidth(cell.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady);
|
|
20594
21312
|
if (cell.column.id === "reorder") return /* @__PURE__ */ jsx(DsRowDragHandle, {
|
|
20595
21313
|
isDragging,
|
|
20596
21314
|
attributes,
|
|
@@ -20622,56 +21340,6 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
20622
21340
|
})] });
|
|
20623
21341
|
};
|
|
20624
21342
|
//#endregion
|
|
20625
|
-
//#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.module.scss
|
|
20626
|
-
var ds_table_row_expandable_cell_module_default = { "button": "enUIjW_button" };
|
|
20627
|
-
//#endregion
|
|
20628
|
-
//#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.tsx
|
|
20629
|
-
const DsTableRowExpandableCell = ({ row, buttonClassName }) => {
|
|
20630
|
-
const isExpanded = row.getIsExpanded();
|
|
20631
|
-
return /* @__PURE__ */ jsx(DsButton, {
|
|
20632
|
-
design: "v1.2",
|
|
20633
|
-
buttonType: "tertiary",
|
|
20634
|
-
size: "small",
|
|
20635
|
-
className: classNames(ds_table_row_expandable_cell_module_default.button, buttonClassName),
|
|
20636
|
-
onClick: (e) => {
|
|
20637
|
-
e.stopPropagation();
|
|
20638
|
-
row.toggleExpanded();
|
|
20639
|
-
},
|
|
20640
|
-
onDoubleClick: (e) => {
|
|
20641
|
-
e.stopPropagation();
|
|
20642
|
-
},
|
|
20643
|
-
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
20644
|
-
icon: "chevron_right",
|
|
20645
|
-
size: "small",
|
|
20646
|
-
className: classNames(ds_table_shared_module_default.pageButtonIcon, isExpanded && "rotate-90")
|
|
20647
|
-
})
|
|
20648
|
-
});
|
|
20649
|
-
};
|
|
20650
|
-
//#endregion
|
|
20651
|
-
//#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
|
|
20652
|
-
const DsTableRowSelectableCell = ({ row }) => {
|
|
20653
|
-
return /* @__PURE__ */ jsx(DsCheckbox, {
|
|
20654
|
-
className: ds_table_shared_module_default.checkboxContainer,
|
|
20655
|
-
checked: row.getIsSelected(),
|
|
20656
|
-
disabled: !row.getCanSelect(),
|
|
20657
|
-
onCheckedChange: (checked) => row.toggleSelected(!!checked),
|
|
20658
|
-
onClick: (e) => e.stopPropagation(),
|
|
20659
|
-
onDoubleClick: (e) => e.stopPropagation()
|
|
20660
|
-
});
|
|
20661
|
-
};
|
|
20662
|
-
//#endregion
|
|
20663
|
-
//#region src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.tsx
|
|
20664
|
-
const DsTableHeaderSelectableCell = ({ table }) => {
|
|
20665
|
-
const checked = table.getIsAllRowsSelected() ? true : table.getIsSomeRowsSelected() ? "indeterminate" : false;
|
|
20666
|
-
return /* @__PURE__ */ jsx(DsCheckbox, {
|
|
20667
|
-
className: ds_table_shared_module_default.checkboxContainer,
|
|
20668
|
-
checked,
|
|
20669
|
-
onCheckedChange: (nextChecked) => table.toggleAllRowsSelected(!!nextChecked),
|
|
20670
|
-
onClick: (e) => e.stopPropagation(),
|
|
20671
|
-
onDoubleClick: (e) => e.stopPropagation()
|
|
20672
|
-
});
|
|
20673
|
-
};
|
|
20674
|
-
//#endregion
|
|
20675
21343
|
//#region src/components/ds-table/hooks/use-drag-and-drop.tsx
|
|
20676
21344
|
const DragWrapper = ({ children, onDragEnd, sensors }) => /* @__PURE__ */ jsx(DndContext, {
|
|
20677
21345
|
collisionDetection: closestCenter,
|
|
@@ -20716,6 +21384,201 @@ function useDragAndDrop({ isDragEnabled, onOrderChange, items }) {
|
|
|
20716
21384
|
};
|
|
20717
21385
|
}
|
|
20718
21386
|
//#endregion
|
|
21387
|
+
//#region src/components/ds-table/hooks/use-column-resize.ts
|
|
21388
|
+
const INITIAL_COLUMN_SIZING_INFO = {
|
|
21389
|
+
startOffset: null,
|
|
21390
|
+
startSize: null,
|
|
21391
|
+
deltaOffset: null,
|
|
21392
|
+
deltaPercentage: null,
|
|
21393
|
+
isResizingColumn: false,
|
|
21394
|
+
columnSizingStart: []
|
|
21395
|
+
};
|
|
21396
|
+
/**
|
|
21397
|
+
* Owns column-resize state, TanStack sizing handlers, origin snapshots, seed
|
|
21398
|
+
* measurement, hover/drag overlay model, and the context slice consumed by
|
|
21399
|
+
* resize handles.
|
|
21400
|
+
*
|
|
21401
|
+
* Call before `useReactTable`, spread `tableOptions` / `state` into it, then
|
|
21402
|
+
* `bind(table)` during render for CSS vars, overlay, and context.
|
|
21403
|
+
*/
|
|
21404
|
+
const useColumnResize = ({ enabled, columnSizing: columnSizingProp, onColumnSizingChange, columns, columnVisibility }) => {
|
|
21405
|
+
const [columnResizeState, setColumnResizeState] = useState({
|
|
21406
|
+
columnSizing: {},
|
|
21407
|
+
columnSizingInfo: INITIAL_COLUMN_SIZING_INFO
|
|
21408
|
+
});
|
|
21409
|
+
const { columnSizing: internalColumnSizing, columnSizingInfo } = columnResizeState;
|
|
21410
|
+
const columnSizing = useMemo(() => columnSizingProp ? {
|
|
21411
|
+
...columnSizingProp,
|
|
21412
|
+
...internalColumnSizing
|
|
21413
|
+
} : internalColumnSizing, [columnSizingProp, internalColumnSizing]);
|
|
21414
|
+
const [resizeHover, setResizeHover] = useState(null);
|
|
21415
|
+
const dragStartOffsetRef = useRef(null);
|
|
21416
|
+
const resizeOriginSizingRef = useRef({});
|
|
21417
|
+
const containerRef = useRef(null);
|
|
21418
|
+
const tableRef = useRef(null);
|
|
21419
|
+
const columnSizingRef = useRef(columnSizing);
|
|
21420
|
+
columnSizingRef.current = columnSizing;
|
|
21421
|
+
const columnSizingInfoRef = useRef(columnSizingInfo);
|
|
21422
|
+
columnSizingInfoRef.current = columnSizingInfo;
|
|
21423
|
+
const onColumnSizingChangeRef = useRef(onColumnSizingChange);
|
|
21424
|
+
onColumnSizingChangeRef.current = onColumnSizingChange;
|
|
21425
|
+
const leafSizeBoundsRef = useRef([]);
|
|
21426
|
+
const handleColumnSizingChange = useCallback((updaterOrValue) => {
|
|
21427
|
+
const clamped = clampColumnSizing(typeof updaterOrValue === "function" ? updaterOrValue(columnSizingRef.current) : updaterOrValue, leafSizeBoundsRef.current);
|
|
21428
|
+
columnSizingRef.current = clamped;
|
|
21429
|
+
setColumnResizeState((prev) => ({
|
|
21430
|
+
...prev,
|
|
21431
|
+
columnSizing: clamped
|
|
21432
|
+
}));
|
|
21433
|
+
}, []);
|
|
21434
|
+
const handleColumnSizingInfoChange = useCallback((updaterOrValue) => {
|
|
21435
|
+
const prevInfo = columnSizingInfoRef.current;
|
|
21436
|
+
const nextInfo = typeof updaterOrValue === "function" ? updaterOrValue(prevInfo) : updaterOrValue;
|
|
21437
|
+
const ended = Boolean(prevInfo.isResizingColumn) && nextInfo.isResizingColumn === false;
|
|
21438
|
+
columnSizingInfoRef.current = nextInfo;
|
|
21439
|
+
setColumnResizeState((prev) => ({
|
|
21440
|
+
...prev,
|
|
21441
|
+
columnSizingInfo: nextInfo
|
|
21442
|
+
}));
|
|
21443
|
+
if (ended) onColumnSizingChangeRef.current?.(omitBuiltinColumnSizing(columnSizingRef.current));
|
|
21444
|
+
}, []);
|
|
21445
|
+
const handleResizeHover = useCallback((columnId, offset) => {
|
|
21446
|
+
setResizeHover(columnId === null || offset === null ? null : {
|
|
21447
|
+
columnId,
|
|
21448
|
+
offset
|
|
21449
|
+
});
|
|
21450
|
+
}, []);
|
|
21451
|
+
const handleResizeDragStart = useCallback((offset) => {
|
|
21452
|
+
dragStartOffsetRef.current = offset;
|
|
21453
|
+
}, []);
|
|
21454
|
+
const handleResizeReset = useCallback((columnIds) => {
|
|
21455
|
+
const next = { ...columnSizingRef.current };
|
|
21456
|
+
for (const id of columnIds) {
|
|
21457
|
+
const origin = resizeOriginSizingRef.current[id];
|
|
21458
|
+
if (origin !== void 0) next[id] = origin;
|
|
21459
|
+
}
|
|
21460
|
+
const clamped = clampColumnSizing(next, leafSizeBoundsRef.current);
|
|
21461
|
+
handleColumnSizingChange(clamped);
|
|
21462
|
+
onColumnSizingChangeRef.current?.(omitBuiltinColumnSizing(clamped));
|
|
21463
|
+
}, [handleColumnSizingChange]);
|
|
21464
|
+
const handleResizeKeyboardNudge = useCallback((columnId, delta) => {
|
|
21465
|
+
const table = tableRef.current;
|
|
21466
|
+
const column = table?.getColumn(columnId);
|
|
21467
|
+
if (!table || !column) return;
|
|
21468
|
+
const leaves = column.getLeafColumns().filter((leaf) => leaf.getIsVisible() && leaf.getCanResize());
|
|
21469
|
+
const totalSize = leaves.reduce((sum, leaf) => sum + leaf.getSize(), 0);
|
|
21470
|
+
if (leaves.length === 0 || totalSize <= 0) return;
|
|
21471
|
+
const next = { ...columnSizingRef.current };
|
|
21472
|
+
for (const leaf of leaves) {
|
|
21473
|
+
const size = leaf.getSize();
|
|
21474
|
+
next[leaf.id] = Math.round(size + delta * (size / totalSize));
|
|
21475
|
+
}
|
|
21476
|
+
const clamped = clampColumnSizing(next, leafSizeBoundsRef.current);
|
|
21477
|
+
handleColumnSizingChange(clamped);
|
|
21478
|
+
onColumnSizingChangeRef.current?.(omitBuiltinColumnSizing(clamped));
|
|
21479
|
+
}, [handleColumnSizingChange]);
|
|
21480
|
+
useLayoutEffect(() => {
|
|
21481
|
+
if (!enabled) return;
|
|
21482
|
+
const container = containerRef.current;
|
|
21483
|
+
const table = tableRef.current;
|
|
21484
|
+
if (!container || !table) return;
|
|
21485
|
+
const seedMissingLeaves = () => {
|
|
21486
|
+
if (container.getBoundingClientRect().width === 0) return false;
|
|
21487
|
+
const tableEl = container.querySelector("table");
|
|
21488
|
+
if (!(tableEl instanceof HTMLElement)) return false;
|
|
21489
|
+
const leaves = table.getVisibleLeafColumns();
|
|
21490
|
+
const measured = measureLeafHeaderWidths(tableEl, leaves.map((column) => column.id));
|
|
21491
|
+
for (const column of leaves) {
|
|
21492
|
+
const measuredWidth = measured[column.id];
|
|
21493
|
+
if (measuredWidth === void 0 || resizeOriginSizingRef.current[column.id] !== void 0) continue;
|
|
21494
|
+
resizeOriginSizingRef.current[column.id] = getResizeOriginSize(column, Math.round(measuredWidth));
|
|
21495
|
+
}
|
|
21496
|
+
const missing = collectMissingLeafSizing(measured, columnSizingRef.current);
|
|
21497
|
+
if (Object.keys(missing).length > 0) handleColumnSizingChange((prev) => ({
|
|
21498
|
+
...clampColumnSizing(missing, leafSizeBoundsRef.current),
|
|
21499
|
+
...prev
|
|
21500
|
+
}));
|
|
21501
|
+
return true;
|
|
21502
|
+
};
|
|
21503
|
+
if (seedMissingLeaves()) return;
|
|
21504
|
+
const observer = new ResizeObserver(() => {
|
|
21505
|
+
if (seedMissingLeaves()) observer.disconnect();
|
|
21506
|
+
});
|
|
21507
|
+
observer.observe(container);
|
|
21508
|
+
return () => observer.disconnect();
|
|
21509
|
+
}, [
|
|
21510
|
+
enabled,
|
|
21511
|
+
columns,
|
|
21512
|
+
columnVisibility,
|
|
21513
|
+
handleColumnSizingChange
|
|
21514
|
+
]);
|
|
21515
|
+
const tableOptions = useMemo(() => ({
|
|
21516
|
+
enableColumnResizing: enabled,
|
|
21517
|
+
columnResizeMode: "onChange",
|
|
21518
|
+
...enabled ? { defaultColumn: { minSize: 52 } } : {},
|
|
21519
|
+
onColumnSizingChange: handleColumnSizingChange,
|
|
21520
|
+
onColumnSizingInfoChange: handleColumnSizingInfoChange
|
|
21521
|
+
}), [
|
|
21522
|
+
enabled,
|
|
21523
|
+
handleColumnSizingChange,
|
|
21524
|
+
handleColumnSizingInfoChange
|
|
21525
|
+
]);
|
|
21526
|
+
const bind = (table) => {
|
|
21527
|
+
tableRef.current = table;
|
|
21528
|
+
leafSizeBoundsRef.current = table.getAllLeafColumns();
|
|
21529
|
+
const visibleLeafIds = table.getVisibleLeafColumns().map((column) => column.id);
|
|
21530
|
+
const resizeSizingReady = enabled && visibleLeafIds.length > 0 && visibleLeafIds.every((id) => columnSizing[id] !== void 0);
|
|
21531
|
+
const columnSizeVars = resizeSizingReady ? {
|
|
21532
|
+
...getColumnSizeCssVars(table.getFlatHeaders()),
|
|
21533
|
+
width: table.getTotalSize()
|
|
21534
|
+
} : void 0;
|
|
21535
|
+
if (!enabled) return {
|
|
21536
|
+
columnSizeVars: void 0,
|
|
21537
|
+
activeResize: null,
|
|
21538
|
+
context: {
|
|
21539
|
+
resizableColumns: false,
|
|
21540
|
+
resizeSizingReady: false,
|
|
21541
|
+
resizeContainerRef: containerRef,
|
|
21542
|
+
onResizeHover: handleResizeHover,
|
|
21543
|
+
onResizeDragStart: handleResizeDragStart,
|
|
21544
|
+
onResizeReset: handleResizeReset,
|
|
21545
|
+
onResizeKeyboardNudge: handleResizeKeyboardNudge
|
|
21546
|
+
}
|
|
21547
|
+
};
|
|
21548
|
+
const isResizingColumn = columnSizingInfo.isResizingColumn;
|
|
21549
|
+
const resizingHeader = typeof isResizingColumn === "string" ? table.getFlatHeaders().find((header) => header.column.id === isResizingColumn) : void 0;
|
|
21550
|
+
const startSize = columnSizingInfo.startSize;
|
|
21551
|
+
const clampedResizeDelta = resizingHeader && startSize !== null ? resizingHeader.getSize() - startSize : columnSizingInfo.deltaOffset ?? 0;
|
|
21552
|
+
return {
|
|
21553
|
+
columnSizeVars,
|
|
21554
|
+
activeResize: isResizingColumn && dragStartOffsetRef.current !== null ? {
|
|
21555
|
+
offset: dragStartOffsetRef.current + clampedResizeDelta,
|
|
21556
|
+
phase: "dragging"
|
|
21557
|
+
} : resizeHover ? {
|
|
21558
|
+
offset: resizeHover.offset,
|
|
21559
|
+
phase: "hover"
|
|
21560
|
+
} : null,
|
|
21561
|
+
context: {
|
|
21562
|
+
resizableColumns: enabled,
|
|
21563
|
+
resizeSizingReady,
|
|
21564
|
+
resizeContainerRef: containerRef,
|
|
21565
|
+
onResizeHover: handleResizeHover,
|
|
21566
|
+
onResizeDragStart: handleResizeDragStart,
|
|
21567
|
+
onResizeReset: handleResizeReset,
|
|
21568
|
+
onResizeKeyboardNudge: handleResizeKeyboardNudge
|
|
21569
|
+
}
|
|
21570
|
+
};
|
|
21571
|
+
};
|
|
21572
|
+
return {
|
|
21573
|
+
tableOptions,
|
|
21574
|
+
state: {
|
|
21575
|
+
columnSizing,
|
|
21576
|
+
columnSizingInfo
|
|
21577
|
+
},
|
|
21578
|
+
bind
|
|
21579
|
+
};
|
|
21580
|
+
};
|
|
21581
|
+
//#endregion
|
|
20719
21582
|
//#region src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.module.scss
|
|
20720
21583
|
var ds_table_body_virtualized_module_default = {
|
|
20721
21584
|
"body": "vRRk8q_body",
|
|
@@ -20745,7 +21608,7 @@ var ds_table_row_virtualized_module_default = {
|
|
|
20745
21608
|
//#endregion
|
|
20746
21609
|
//#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
|
|
20747
21610
|
const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent }) => {
|
|
20748
|
-
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading } = useDsTableContext();
|
|
21611
|
+
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading, resizeSizingReady } = useDsTableContext();
|
|
20749
21612
|
const isExpanded = row.getIsExpanded();
|
|
20750
21613
|
const isActive = activeRowId === row.id;
|
|
20751
21614
|
return /* @__PURE__ */ jsx(TableRow, {
|
|
@@ -20769,8 +21632,9 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
|
|
|
20769
21632
|
onDoubleClick: isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original),
|
|
20770
21633
|
children: isExpandedRowContent ? /* @__PURE__ */ jsx(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ jsx(Fragment, { children: row.getVisibleCells().map((cell, idx) => {
|
|
20771
21634
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
21635
|
+
const columnSizing = cell.getContext().table.getState().columnSizing;
|
|
20772
21636
|
return /* @__PURE__ */ jsx(TableCell, {
|
|
20773
|
-
style:
|
|
21637
|
+
style: getBodyCellSizeStyle(cell.column.id, cell.column.getSize(), isExplicitColumnWidth(cell.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady),
|
|
20774
21638
|
className: classNames(ds_table_row_virtualized_module_default.cell, cell.column.id === "expander" && ds_table_row_virtualized_module_default.expandableCell, cell.column.id === "select" && ds_table_row_virtualized_module_default.selectableCell, isFirstLeafColumnOfGroup(cell.column) && ds_table_row_virtualized_module_default.groupStart, typeof cell.column.columnDef.editCell === "function" && ds_table_row_virtualized_module_default.editableCell),
|
|
20775
21639
|
children: isLastColumn ? /* @__PURE__ */ jsx(DsTableCell, {
|
|
20776
21640
|
row,
|
|
@@ -20909,6 +21773,194 @@ function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAn
|
|
|
20909
21773
|
});
|
|
20910
21774
|
}
|
|
20911
21775
|
//#endregion
|
|
21776
|
+
//#region src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.tsx
|
|
21777
|
+
const DsTableHeaderSelectableCell = ({ table }) => {
|
|
21778
|
+
const checked = table.getIsAllRowsSelected() ? true : table.getIsSomeRowsSelected() ? "indeterminate" : false;
|
|
21779
|
+
return /* @__PURE__ */ jsx(DsCheckbox, {
|
|
21780
|
+
className: ds_table_shared_module_default.checkboxContainer,
|
|
21781
|
+
checked,
|
|
21782
|
+
onCheckedChange: (nextChecked) => table.toggleAllRowsSelected(!!nextChecked),
|
|
21783
|
+
onClick: (e) => e.stopPropagation(),
|
|
21784
|
+
onDoubleClick: (e) => e.stopPropagation()
|
|
21785
|
+
});
|
|
21786
|
+
};
|
|
21787
|
+
//#endregion
|
|
21788
|
+
//#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.module.scss
|
|
21789
|
+
var ds_table_row_expandable_cell_module_default = { "button": "enUIjW_button" };
|
|
21790
|
+
//#endregion
|
|
21791
|
+
//#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.tsx
|
|
21792
|
+
const DsTableRowExpandableCell = ({ row, buttonClassName }) => {
|
|
21793
|
+
const isExpanded = row.getIsExpanded();
|
|
21794
|
+
return /* @__PURE__ */ jsx(DsButton, {
|
|
21795
|
+
design: "v1.2",
|
|
21796
|
+
buttonType: "tertiary",
|
|
21797
|
+
size: "small",
|
|
21798
|
+
className: classNames(ds_table_row_expandable_cell_module_default.button, buttonClassName),
|
|
21799
|
+
onClick: (e) => {
|
|
21800
|
+
e.stopPropagation();
|
|
21801
|
+
row.toggleExpanded();
|
|
21802
|
+
},
|
|
21803
|
+
onDoubleClick: (e) => {
|
|
21804
|
+
e.stopPropagation();
|
|
21805
|
+
},
|
|
21806
|
+
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
21807
|
+
icon: "chevron_right",
|
|
21808
|
+
size: "small",
|
|
21809
|
+
className: classNames(ds_table_shared_module_default.pageButtonIcon, isExpanded && "rotate-90")
|
|
21810
|
+
})
|
|
21811
|
+
});
|
|
21812
|
+
};
|
|
21813
|
+
//#endregion
|
|
21814
|
+
//#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
|
|
21815
|
+
const DsTableRowSelectableCell = ({ row }) => {
|
|
21816
|
+
return /* @__PURE__ */ jsx(DsCheckbox, {
|
|
21817
|
+
className: ds_table_shared_module_default.checkboxContainer,
|
|
21818
|
+
checked: row.getIsSelected(),
|
|
21819
|
+
disabled: !row.getCanSelect(),
|
|
21820
|
+
onCheckedChange: (checked) => row.toggleSelected(!!checked),
|
|
21821
|
+
onClick: (e) => e.stopPropagation(),
|
|
21822
|
+
onDoubleClick: (e) => e.stopPropagation()
|
|
21823
|
+
});
|
|
21824
|
+
};
|
|
21825
|
+
//#endregion
|
|
21826
|
+
//#region src/components/ds-table/utils/table-columns.tsx
|
|
21827
|
+
const EXPLICIT_SIZE_META = { hasExplicitSize: true };
|
|
21828
|
+
/**
|
|
21829
|
+
* Clones leaf defs that authored `size` so `meta.hasExplicitSize` survives
|
|
21830
|
+
* TanStack’s default-size merge. Group defs are cloned only to recurse;
|
|
21831
|
+
* unsized leaves are returned as-is.
|
|
21832
|
+
*/
|
|
21833
|
+
const stampExplicitSize = (columns) => columns.map((column) => {
|
|
21834
|
+
if ("columns" in column && column.columns) return {
|
|
21835
|
+
...column,
|
|
21836
|
+
columns: stampExplicitSize(column.columns)
|
|
21837
|
+
};
|
|
21838
|
+
if (column.size === void 0) return column;
|
|
21839
|
+
return {
|
|
21840
|
+
...column,
|
|
21841
|
+
meta: {
|
|
21842
|
+
...column.meta,
|
|
21843
|
+
...EXPLICIT_SIZE_META
|
|
21844
|
+
}
|
|
21845
|
+
};
|
|
21846
|
+
});
|
|
21847
|
+
/**
|
|
21848
|
+
* Prepends the builtin select / expander / reorder columns when those features
|
|
21849
|
+
* are on. Reorder is omitted for virtualized tables. Unshift order yields
|
|
21850
|
+
* visual order: reorder, expander, select, then consumer columns.
|
|
21851
|
+
*/
|
|
21852
|
+
const getAugmentedColumns = (columns, { selectable, expandable, reorderable, virtualized, showSelectAllCheckbox }) => {
|
|
21853
|
+
const augmentedColumns = stampExplicitSize(columns);
|
|
21854
|
+
if (selectable) augmentedColumns.unshift({
|
|
21855
|
+
id: SELECT_COLUMN_ID,
|
|
21856
|
+
size: 36,
|
|
21857
|
+
minSize: 36,
|
|
21858
|
+
maxSize: 36,
|
|
21859
|
+
enableSorting: false,
|
|
21860
|
+
enableResizing: false,
|
|
21861
|
+
meta: EXPLICIT_SIZE_META,
|
|
21862
|
+
header: ({ table }) => showSelectAllCheckbox ? /* @__PURE__ */ jsx(DsTableHeaderSelectableCell, { table }) : null,
|
|
21863
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(DsTableRowSelectableCell, { row })
|
|
21864
|
+
});
|
|
21865
|
+
if (expandable) augmentedColumns.unshift({
|
|
21866
|
+
id: EXPANDER_COLUMN_ID,
|
|
21867
|
+
size: 36,
|
|
21868
|
+
minSize: 36,
|
|
21869
|
+
maxSize: 36,
|
|
21870
|
+
enableSorting: false,
|
|
21871
|
+
enableResizing: false,
|
|
21872
|
+
meta: EXPLICIT_SIZE_META,
|
|
21873
|
+
header: () => null,
|
|
21874
|
+
cell: ({ row }) => row.getCanExpand() ? /* @__PURE__ */ jsx(DsTableRowExpandableCell, { row }) : null
|
|
21875
|
+
});
|
|
21876
|
+
if (reorderable && !virtualized) augmentedColumns.unshift({
|
|
21877
|
+
id: REORDER_COLUMN_ID,
|
|
21878
|
+
size: 60,
|
|
21879
|
+
minSize: 60,
|
|
21880
|
+
maxSize: 60,
|
|
21881
|
+
enableSorting: false,
|
|
21882
|
+
enableResizing: false,
|
|
21883
|
+
meta: EXPLICIT_SIZE_META,
|
|
21884
|
+
header: "Order",
|
|
21885
|
+
cell: () => null
|
|
21886
|
+
});
|
|
21887
|
+
return augmentedColumns;
|
|
21888
|
+
};
|
|
21889
|
+
/**
|
|
21890
|
+
* Replaces each leaf `cell` with `loadingCell` (or a default text skeleton).
|
|
21891
|
+
* Group columns are cloned with the same transform applied to their children.
|
|
21892
|
+
*/
|
|
21893
|
+
const toSkeletonColumns = (columns) => columns.map((column) => "columns" in column && column.columns ? {
|
|
21894
|
+
...column,
|
|
21895
|
+
columns: toSkeletonColumns(column.columns)
|
|
21896
|
+
} : {
|
|
21897
|
+
...column,
|
|
21898
|
+
cell: column.loadingCell ?? (() => /* @__PURE__ */ jsx(DsSkeletonText, { width: "60%" }))
|
|
21899
|
+
});
|
|
21900
|
+
const createSkeletonRows = () => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` }));
|
|
21901
|
+
//#endregion
|
|
21902
|
+
//#region src/components/ds-table/utils/table-api.ts
|
|
21903
|
+
const createTableApi = (table) => ({
|
|
21904
|
+
selectRow: (rowId) => {
|
|
21905
|
+
table.getRow(rowId).toggleSelected(true);
|
|
21906
|
+
},
|
|
21907
|
+
deselectRow: (rowId) => {
|
|
21908
|
+
table.getRow(rowId).toggleSelected(false);
|
|
21909
|
+
},
|
|
21910
|
+
selectAllRows: () => {
|
|
21911
|
+
table.toggleAllRowsSelected(true);
|
|
21912
|
+
},
|
|
21913
|
+
deselectAllRows: () => {
|
|
21914
|
+
table.toggleAllRowsSelected(false);
|
|
21915
|
+
},
|
|
21916
|
+
selectRows: (rowIds) => {
|
|
21917
|
+
const selection = {};
|
|
21918
|
+
rowIds.forEach((id) => selection[id] = true);
|
|
21919
|
+
table.setRowSelection(selection);
|
|
21920
|
+
},
|
|
21921
|
+
getSelectedRows: () => {
|
|
21922
|
+
return table.getFilteredSelectedRowModel().rows.map((r) => r.original);
|
|
21923
|
+
},
|
|
21924
|
+
expandRow: (rowId) => {
|
|
21925
|
+
table.getRow(rowId).toggleExpanded(true);
|
|
21926
|
+
},
|
|
21927
|
+
collapseRow: (rowId) => {
|
|
21928
|
+
table.getRow(rowId).toggleExpanded(false);
|
|
21929
|
+
},
|
|
21930
|
+
expandAllRows: () => {
|
|
21931
|
+
table.toggleAllRowsExpanded(true);
|
|
21932
|
+
},
|
|
21933
|
+
collapseAllRows: () => {
|
|
21934
|
+
table.toggleAllRowsExpanded(false);
|
|
21935
|
+
},
|
|
21936
|
+
expandRows: (rowIds) => {
|
|
21937
|
+
const expansion = {};
|
|
21938
|
+
rowIds.forEach((id) => expansion[id] = true);
|
|
21939
|
+
table.setExpanded(expansion);
|
|
21940
|
+
}
|
|
21941
|
+
});
|
|
21942
|
+
//#endregion
|
|
21943
|
+
//#region src/components/ds-table/utils/frozen-body.ts
|
|
21944
|
+
/**
|
|
21945
|
+
* `React.memo` comparator for the table body during a column-resize drag.
|
|
21946
|
+
*
|
|
21947
|
+
* While a column is being resized, sizing is applied through CSS variables on
|
|
21948
|
+
* the table element, so body rows do not need to re-render — freezing them keeps
|
|
21949
|
+
* dragging smooth. `table` is a stable mutable instance (ref-equal across
|
|
21950
|
+
* renders), so comparing it is meaningless and it is skipped; every other prop
|
|
21951
|
+
* must be referentially unchanged to freeze. That way parent-driven updates mid-
|
|
21952
|
+
* drag (`rowSelection`, `emptyState`, `onScroll`, `infiniteScroll`, ...) are not
|
|
21953
|
+
* dropped.
|
|
21954
|
+
*/
|
|
21955
|
+
const areBodiesFrozen = (prev, next) => {
|
|
21956
|
+
if (!next.table.getState().columnSizingInfo.isResizingColumn) return false;
|
|
21957
|
+
const prevProps = prev;
|
|
21958
|
+
const nextProps = next;
|
|
21959
|
+
const keys = /* @__PURE__ */ new Set([...Object.keys(prevProps), ...Object.keys(nextProps)]);
|
|
21960
|
+
for (const key of keys) if (key !== "table" && prevProps[key] !== nextProps[key]) return false;
|
|
21961
|
+
return true;
|
|
21962
|
+
};
|
|
21963
|
+
//#endregion
|
|
20912
21964
|
//#region src/components/ds-table/ds-table.tsx
|
|
20913
21965
|
const ROW_SIZE_HEIGHT_MAP = {
|
|
20914
21966
|
small: 36,
|
|
@@ -20918,7 +21970,9 @@ const ROW_SIZE_HEIGHT_MAP = {
|
|
|
20918
21970
|
/**
|
|
20919
21971
|
* Design system Table component
|
|
20920
21972
|
*/
|
|
20921
|
-
const DsTable = (
|
|
21973
|
+
const DsTable = (props) => {
|
|
21974
|
+
const tableProps = applyDsTableDefaults(props);
|
|
21975
|
+
const { ref, columns: columnsProp, data: tableData, controls, virtualized, virtualizedOptions, className, emptyState, bordered, fullWidth, rowSize, loading, expandable, selectable, showSelectAllCheckbox, onSelectionChange, onSortingChange, onScroll, actions, reorderable, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, collapsedColumnGroups: externalCollapsedColumnGroups, onCollapsedColumnGroupsChange, infiniteScroll, resizableColumns, columnSizing, onColumnSizingChange } = tableProps;
|
|
20922
21976
|
const [data, setData] = React$1.useState(tableData);
|
|
20923
21977
|
const [sorting, setSorting] = React$1.useState([]);
|
|
20924
21978
|
const [internalColumnFilters, setInternalColumnFilters] = React$1.useState([]);
|
|
@@ -20932,7 +21986,6 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
|
|
|
20932
21986
|
},
|
|
20933
21987
|
items: data
|
|
20934
21988
|
});
|
|
20935
|
-
const tableContainerRef = React$1.useRef(null);
|
|
20936
21989
|
const columnFilters = externalColumnFilters ?? internalColumnFilters;
|
|
20937
21990
|
const handleColumnFiltersChange = (updaterOrValue) => {
|
|
20938
21991
|
const newFilters = typeof updaterOrValue === "function" ? updaterOrValue(columnFilters) : updaterOrValue;
|
|
@@ -20964,63 +22017,31 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
|
|
|
20964
22017
|
setRowSelection(newRowSelection);
|
|
20965
22018
|
onSelectionChange?.(newRowSelection);
|
|
20966
22019
|
};
|
|
20967
|
-
const
|
|
20968
|
-
const
|
|
20969
|
-
const
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
enableSorting: false,
|
|
20977
|
-
enableResizing: false,
|
|
20978
|
-
header: ({ table }) => showSelectAllCheckbox ? /* @__PURE__ */ jsx(DsTableHeaderSelectableCell, { table }) : null,
|
|
20979
|
-
cell: ({ row }) => /* @__PURE__ */ jsx(DsTableRowSelectableCell, { row })
|
|
20980
|
-
};
|
|
20981
|
-
augmentedColumns.unshift(selectColumn);
|
|
20982
|
-
}
|
|
20983
|
-
if (hasExpanderColumn) {
|
|
20984
|
-
const expanderColumn = {
|
|
20985
|
-
id: EXPANDER_COLUMN_ID,
|
|
20986
|
-
size: 36,
|
|
20987
|
-
enableSorting: false,
|
|
20988
|
-
enableResizing: false,
|
|
20989
|
-
header: () => null,
|
|
20990
|
-
cell: ({ row }) => row.getCanExpand() ? /* @__PURE__ */ jsx(DsTableRowExpandableCell, { row }) : null
|
|
20991
|
-
};
|
|
20992
|
-
augmentedColumns.unshift(expanderColumn);
|
|
20993
|
-
}
|
|
20994
|
-
if (hasReorderColumn) {
|
|
20995
|
-
const reorderColumn = {
|
|
20996
|
-
id: REORDER_COLUMN_ID,
|
|
20997
|
-
size: 60,
|
|
20998
|
-
enableSorting: false,
|
|
20999
|
-
enableResizing: false,
|
|
21000
|
-
header: "Order",
|
|
21001
|
-
cell: () => null
|
|
21002
|
-
};
|
|
21003
|
-
augmentedColumns.unshift(reorderColumn);
|
|
21004
|
-
}
|
|
21005
|
-
return augmentedColumns;
|
|
21006
|
-
}, [
|
|
22020
|
+
const hasSelectColumn = Boolean(selectable);
|
|
22021
|
+
const hasExpanderColumn = Boolean(expandable);
|
|
22022
|
+
const columns = useMemo(() => getAugmentedColumns(columnsProp, {
|
|
22023
|
+
selectable: hasSelectColumn,
|
|
22024
|
+
expandable: hasExpanderColumn,
|
|
22025
|
+
reorderable,
|
|
22026
|
+
virtualized,
|
|
22027
|
+
showSelectAllCheckbox
|
|
22028
|
+
}), [
|
|
21007
22029
|
columnsProp,
|
|
21008
|
-
hasExpanderColumn,
|
|
21009
|
-
hasReorderColumn,
|
|
21010
22030
|
hasSelectColumn,
|
|
22031
|
+
hasExpanderColumn,
|
|
22032
|
+
reorderable,
|
|
22033
|
+
virtualized,
|
|
21011
22034
|
showSelectAllCheckbox
|
|
21012
22035
|
]);
|
|
21013
|
-
const skeletonColumns = useMemo(() =>
|
|
21014
|
-
|
|
21015
|
-
|
|
21016
|
-
|
|
21017
|
-
|
|
21018
|
-
|
|
21019
|
-
|
|
21020
|
-
|
|
21021
|
-
|
|
21022
|
-
}, [columns]);
|
|
21023
|
-
const skeletonData = useMemo(() => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` })), []);
|
|
22036
|
+
const skeletonColumns = useMemo(() => toSkeletonColumns(columns), [columns]);
|
|
22037
|
+
const skeletonData = useMemo(() => createSkeletonRows(), []);
|
|
22038
|
+
const resize = useColumnResize({
|
|
22039
|
+
enabled: resizableColumns,
|
|
22040
|
+
columnSizing,
|
|
22041
|
+
onColumnSizingChange,
|
|
22042
|
+
columns,
|
|
22043
|
+
columnVisibility
|
|
22044
|
+
});
|
|
21024
22045
|
const table = useReactTable({
|
|
21025
22046
|
data: loading ? skeletonData : reorderable ? data : tableData,
|
|
21026
22047
|
columns: loading ? skeletonColumns : columns,
|
|
@@ -21034,87 +22055,30 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
|
|
|
21034
22055
|
getRowId: (row) => row.id,
|
|
21035
22056
|
getExpandedRowModel: getExpandedRowModel(),
|
|
21036
22057
|
getRowCanExpand: typeof expandable === "function" ? (row) => expandable(row.original) : () => expandable,
|
|
22058
|
+
...resize.tableOptions,
|
|
21037
22059
|
state: {
|
|
21038
22060
|
sorting,
|
|
21039
22061
|
columnFilters,
|
|
21040
22062
|
columnVisibility,
|
|
21041
|
-
rowSelection
|
|
22063
|
+
rowSelection,
|
|
22064
|
+
...resize.state
|
|
21042
22065
|
},
|
|
21043
22066
|
enableRowSelection: typeof selectable === "function" ? (row) => selectable(row.original) : selectable
|
|
21044
22067
|
});
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
},
|
|
21049
|
-
deselectRow: (rowId) => {
|
|
21050
|
-
table.getRow(rowId).toggleSelected(false);
|
|
21051
|
-
},
|
|
21052
|
-
selectAllRows: () => {
|
|
21053
|
-
table.toggleAllRowsSelected(true);
|
|
21054
|
-
},
|
|
21055
|
-
deselectAllRows: () => {
|
|
21056
|
-
table.toggleAllRowsSelected(false);
|
|
21057
|
-
},
|
|
21058
|
-
selectRows: (rowIds) => {
|
|
21059
|
-
const selection = {};
|
|
21060
|
-
rowIds.forEach((id) => selection[id] = true);
|
|
21061
|
-
table.setRowSelection(selection);
|
|
21062
|
-
},
|
|
21063
|
-
getSelectedRows: () => {
|
|
21064
|
-
return table.getFilteredSelectedRowModel().rows.map((r) => r.original);
|
|
21065
|
-
},
|
|
21066
|
-
expandRow: (rowId) => {
|
|
21067
|
-
table.getRow(rowId).toggleExpanded(true);
|
|
21068
|
-
},
|
|
21069
|
-
collapseRow: (rowId) => {
|
|
21070
|
-
table.getRow(rowId).toggleExpanded(false);
|
|
21071
|
-
},
|
|
21072
|
-
expandAllRows: () => {
|
|
21073
|
-
table.toggleAllRowsExpanded(true);
|
|
21074
|
-
},
|
|
21075
|
-
collapseAllRows: () => {
|
|
21076
|
-
table.toggleAllRowsExpanded(false);
|
|
21077
|
-
},
|
|
21078
|
-
expandRows: (rowIds) => {
|
|
21079
|
-
const expansion = {};
|
|
21080
|
-
rowIds.forEach((id) => expansion[id] = true);
|
|
21081
|
-
table.setExpanded(expansion);
|
|
21082
|
-
}
|
|
21083
|
-
}), [table]);
|
|
21084
|
-
const { rows, rowsById } = table.getRowModel();
|
|
21085
|
-
const renderEmptyState = () => /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
21086
|
-
colSpan: columns.length,
|
|
21087
|
-
className: ds_table_module_default.emptyState,
|
|
21088
|
-
children: emptyState || "No results."
|
|
21089
|
-
}) });
|
|
22068
|
+
const { columnSizeVars, activeResize, context: resizeContext } = resize.bind(table);
|
|
22069
|
+
useImperativeHandle(ref, () => createTableApi(table), [table]);
|
|
22070
|
+
const { rowsById } = table.getRowModel();
|
|
21090
22071
|
const selectedRows = Object.entries(rowSelection).filter(([, selected]) => selected).map(([key]) => rowsById[key]?.original).filter((v) => !!v);
|
|
21091
22072
|
const isBulkActionsVisible = selectable && actions.length > 0 && selectedRows.length > 0;
|
|
21092
|
-
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
showSelectAllCheckbox,
|
|
21102
|
-
loading,
|
|
21103
|
-
onRowClick: loading ? void 0 : onRowClick,
|
|
21104
|
-
onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
|
|
21105
|
-
primaryRowActions,
|
|
21106
|
-
secondaryRowActions,
|
|
21107
|
-
renderExpandedRow,
|
|
21108
|
-
virtualized,
|
|
21109
|
-
activeRowId,
|
|
21110
|
-
collapsedColumnGroups,
|
|
21111
|
-
onToggleColumnGroup: toggleColumnGroup,
|
|
21112
|
-
locale,
|
|
21113
|
-
onCellEdit,
|
|
21114
|
-
...editingState
|
|
21115
|
-
};
|
|
21116
|
-
return /* @__PURE__ */ jsx(DsTableContext.Provider, {
|
|
21117
|
-
value: contextValue,
|
|
22073
|
+
return /* @__PURE__ */ jsx(DsTableContextProvider, {
|
|
22074
|
+
tableProps,
|
|
22075
|
+
derived: {
|
|
22076
|
+
grouping: {
|
|
22077
|
+
collapsedColumnGroups,
|
|
22078
|
+
onToggleColumnGroup: toggleColumnGroup
|
|
22079
|
+
},
|
|
22080
|
+
resize: resizeContext
|
|
22081
|
+
},
|
|
21118
22082
|
children: /* @__PURE__ */ jsxs("div", {
|
|
21119
22083
|
className: classNames(ds_table_module_default.container, isBulkActionsVisible && ds_table_module_default.bulkActionsVisible, className),
|
|
21120
22084
|
children: [
|
|
@@ -21122,12 +22086,13 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
|
|
|
21122
22086
|
className: ds_table_module_default.controls,
|
|
21123
22087
|
children: controls
|
|
21124
22088
|
}),
|
|
21125
|
-
/* @__PURE__ */
|
|
21126
|
-
ref:
|
|
22089
|
+
/* @__PURE__ */ jsxs("div", {
|
|
22090
|
+
ref: resizeContext.resizeContainerRef,
|
|
21127
22091
|
className: classNames(!virtualized && ds_table_module_default.dataTableContainer, virtualized && ds_table_module_default.virtualizedContainer),
|
|
21128
|
-
children: /* @__PURE__ */ jsx(DragWrapper, { children: /* @__PURE__ */ jsxs(Table$1, {
|
|
22092
|
+
children: [/* @__PURE__ */ jsx(DragWrapper, { children: /* @__PURE__ */ jsxs(Table$1, {
|
|
21129
22093
|
className: classNames(fullWidth && ds_table_module_default.fullWidth, !bordered && ds_table_module_default.tableNoBorder),
|
|
21130
|
-
|
|
22094
|
+
style: columnSizeVars,
|
|
22095
|
+
children: [/* @__PURE__ */ jsx(DsTableHeader, { table }), virtualized ? /* @__PURE__ */ jsx(MemoizedDsTableBodyVirtualized, {
|
|
21131
22096
|
table,
|
|
21132
22097
|
emptyState,
|
|
21133
22098
|
estimateSize: virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize],
|
|
@@ -21135,11 +22100,16 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
|
|
|
21135
22100
|
onScroll,
|
|
21136
22101
|
rowSelection,
|
|
21137
22102
|
infiniteScroll
|
|
21138
|
-
}) : /* @__PURE__ */ jsx(
|
|
21139
|
-
|
|
21140
|
-
|
|
21141
|
-
|
|
21142
|
-
|
|
22103
|
+
}) : /* @__PURE__ */ jsx(MemoizedDsTableRowsBody, {
|
|
22104
|
+
table,
|
|
22105
|
+
rowSelection,
|
|
22106
|
+
emptyState,
|
|
22107
|
+
SortableWrapper
|
|
22108
|
+
})]
|
|
22109
|
+
}) }), activeResize ? /* @__PURE__ */ jsx(DsTableResizeOverlay, {
|
|
22110
|
+
offset: activeResize.offset,
|
|
22111
|
+
phase: activeResize.phase
|
|
22112
|
+
}) : null]
|
|
21143
22113
|
}),
|
|
21144
22114
|
selectable && actions.length > 0 && /* @__PURE__ */ jsx(DsTableBulkActions, {
|
|
21145
22115
|
numSelectedRows: selectedRows.length,
|
|
@@ -21153,6 +22123,20 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
|
|
|
21153
22123
|
})
|
|
21154
22124
|
});
|
|
21155
22125
|
};
|
|
22126
|
+
const DsTableRowsBody = ({ table, rowSelection, emptyState, SortableWrapper }) => {
|
|
22127
|
+
const { rows } = table.getRowModel();
|
|
22128
|
+
const columnCount = table.getVisibleLeafColumns().length;
|
|
22129
|
+
return /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(SortableWrapper, { children: rows.length ? rows.map((row) => /* @__PURE__ */ jsx(DsTableRow, {
|
|
22130
|
+
row,
|
|
22131
|
+
isSelected: !!rowSelection[row.id]
|
|
22132
|
+
}, row.id)) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
22133
|
+
colSpan: columnCount,
|
|
22134
|
+
className: ds_table_module_default.emptyState,
|
|
22135
|
+
children: emptyState || "No results."
|
|
22136
|
+
}) }) }) });
|
|
22137
|
+
};
|
|
22138
|
+
const MemoizedDsTableRowsBody = React$1.memo(DsTableRowsBody, areBodiesFrozen);
|
|
22139
|
+
const MemoizedDsTableBodyVirtualized = React$1.memo(DsTableBodyVirtualized, areBodiesFrozen);
|
|
21156
22140
|
DsTable.displayName = "DsTable";
|
|
21157
22141
|
//#endregion
|
|
21158
22142
|
//#region src/components/ds-table/hooks/use-cell-editor.ts
|
|
@@ -21167,6 +22151,7 @@ const useCellEditor = ({ cellContext }) => {
|
|
|
21167
22151
|
const isActiveCell = ctx.editing !== null && ctx.editing.cell.row.id === row.id && ctx.editing.cell.column.id === column.id;
|
|
21168
22152
|
const value = isActiveCell && ctx.editing ? ctx.editing.draftValue : getValue();
|
|
21169
22153
|
const error = isActiveCell && ctx.editing ? ctx.editing.error : null;
|
|
22154
|
+
const isPending = isActiveCell && ctx.editing ? ctx.editing.pending : false;
|
|
21170
22155
|
const setValue = (next) => {
|
|
21171
22156
|
ctx.setDraft(next);
|
|
21172
22157
|
};
|
|
@@ -21182,6 +22167,7 @@ const useCellEditor = ({ cellContext }) => {
|
|
|
21182
22167
|
return {
|
|
21183
22168
|
value,
|
|
21184
22169
|
error,
|
|
22170
|
+
isPending,
|
|
21185
22171
|
setValue,
|
|
21186
22172
|
commit,
|
|
21187
22173
|
cancel,
|
|
@@ -21213,7 +22199,7 @@ const TableEditFormControl = ({ cellContext, error, children }) => {
|
|
|
21213
22199
|
//#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx
|
|
21214
22200
|
/** Text input editor for table cells. Render via `ColumnDef.editCell`. */
|
|
21215
22201
|
const DsTableEditCellText = ({ cellContext, placeholder, maxLength }) => {
|
|
21216
|
-
const { value, setValue, error } = useCellEditor({ cellContext });
|
|
22202
|
+
const { value, setValue, error, isPending } = useCellEditor({ cellContext });
|
|
21217
22203
|
const inputRef = useRef(null);
|
|
21218
22204
|
useEffect(() => {
|
|
21219
22205
|
const input = inputRef.current;
|
|
@@ -21230,6 +22216,7 @@ const DsTableEditCellText = ({ cellContext, placeholder, maxLength }) => {
|
|
|
21230
22216
|
value,
|
|
21231
22217
|
placeholder,
|
|
21232
22218
|
maxLength,
|
|
22219
|
+
disabled: isPending,
|
|
21233
22220
|
onValueChange: setValue,
|
|
21234
22221
|
slots: error ? { endAdornment: /* @__PURE__ */ jsx(DsIcon, {
|
|
21235
22222
|
icon: "error",
|
|
@@ -21243,7 +22230,7 @@ DsTableEditCellText.displayName = "DsTableEditCellText";
|
|
|
21243
22230
|
//#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx
|
|
21244
22231
|
/** Number input editor for table cells. Render via `ColumnDef.editCell`. */
|
|
21245
22232
|
const DsTableEditCellNumber = ({ cellContext, min, max, step }) => {
|
|
21246
|
-
const { value, setValue, error } = useCellEditor({ cellContext });
|
|
22233
|
+
const { value, setValue, error, isPending } = useCellEditor({ cellContext });
|
|
21247
22234
|
const inputRef = useRef(null);
|
|
21248
22235
|
useEffect(() => {
|
|
21249
22236
|
const input = inputRef.current;
|
|
@@ -21261,6 +22248,7 @@ const DsTableEditCellNumber = ({ cellContext, min, max, step }) => {
|
|
|
21261
22248
|
min,
|
|
21262
22249
|
max,
|
|
21263
22250
|
step,
|
|
22251
|
+
disabled: isPending,
|
|
21264
22252
|
onValueChange: setValue
|
|
21265
22253
|
})
|
|
21266
22254
|
});
|
|
@@ -21270,7 +22258,7 @@ DsTableEditCellNumber.displayName = "DsTableEditCellNumber";
|
|
|
21270
22258
|
//#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx
|
|
21271
22259
|
/** Select editor for table cells. Render via `ColumnDef.editCell`. */
|
|
21272
22260
|
const DsTableEditCellSelect = ({ cellContext, options, placeholder }) => {
|
|
21273
|
-
const { value, setValue, error } = useCellEditor({ cellContext });
|
|
22261
|
+
const { value, setValue, error, isPending } = useCellEditor({ cellContext });
|
|
21274
22262
|
return /* @__PURE__ */ jsx(TableEditFormControl, {
|
|
21275
22263
|
cellContext,
|
|
21276
22264
|
error,
|
|
@@ -21279,6 +22267,7 @@ const DsTableEditCellSelect = ({ cellContext, options, placeholder }) => {
|
|
|
21279
22267
|
value,
|
|
21280
22268
|
options,
|
|
21281
22269
|
placeholder,
|
|
22270
|
+
disabled: isPending,
|
|
21282
22271
|
onValueChange: setValue
|
|
21283
22272
|
})
|
|
21284
22273
|
});
|
|
@@ -21288,7 +22277,7 @@ DsTableEditCellSelect.displayName = "DsTableEditCellSelect";
|
|
|
21288
22277
|
//#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx
|
|
21289
22278
|
/** Date picker editor for table cells. Render via `ColumnDef.editCell`. */
|
|
21290
22279
|
const DsTableEditCellDate = ({ cellContext, min, max, placeholder }) => {
|
|
21291
|
-
const { value, setValue, error } = useCellEditor({ cellContext });
|
|
22280
|
+
const { value, setValue, error, isPending } = useCellEditor({ cellContext });
|
|
21292
22281
|
return /* @__PURE__ */ jsx(TableEditFormControl, {
|
|
21293
22282
|
cellContext,
|
|
21294
22283
|
error,
|
|
@@ -21298,6 +22287,7 @@ const DsTableEditCellDate = ({ cellContext, min, max, placeholder }) => {
|
|
|
21298
22287
|
min,
|
|
21299
22288
|
max,
|
|
21300
22289
|
placeholder,
|
|
22290
|
+
disabled: isPending,
|
|
21301
22291
|
onChange: setValue,
|
|
21302
22292
|
slotProps: error ? { input: { slots: { endAdornment: /* @__PURE__ */ jsx(DsIcon, {
|
|
21303
22293
|
icon: "error",
|
|
@@ -21311,10 +22301,10 @@ DsTableEditCellDate.displayName = "DsTableEditCellDate";
|
|
|
21311
22301
|
//#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx
|
|
21312
22302
|
/** Checkbox editor for table cells. Render via `ColumnDef.editCell`. */
|
|
21313
22303
|
const DsTableEditCellCheckbox = ({ cellContext, disabled }) => {
|
|
21314
|
-
const { value, setValue } = useCellEditor({ cellContext });
|
|
22304
|
+
const { value, setValue, isPending } = useCellEditor({ cellContext });
|
|
21315
22305
|
return /* @__PURE__ */ jsx(DsCheckbox, {
|
|
21316
22306
|
checked: value,
|
|
21317
|
-
disabled,
|
|
22307
|
+
disabled: disabled || isPending,
|
|
21318
22308
|
onCheckedChange: (checked) => setValue(checked === true)
|
|
21319
22309
|
});
|
|
21320
22310
|
};
|
|
@@ -22827,6 +23817,6 @@ const DsWorkspaceLayout = Object.assign(DsWorkspaceLayoutRoot, {
|
|
|
22827
23817
|
LeftPanel
|
|
22828
23818
|
});
|
|
22829
23819
|
//#endregion
|
|
22830
|
-
export { BREAKPOINT_LG, DsAlertBanner, DsAutocomplete, DsAvatar, DsAvatarGroup, DsBreadcrumb, DsButton, DsButtonV3, DsCard, DsCatalogLayout, DsCheckbox, DsCheckboxGroup, DsChip, DsChipGroup, DsCommentBubble, DsCommentCard, DsCommentIndicator, DsCommentThread, DsCommentsDrawer, DsConfirmation, DsDateInput, DsDatePicker, DsDateRangePicker, DsDialog, DsDivider, DsDrawer, DsDropdownMenu, DsDropdownMenuLegacy, DsExpandableTextInput, DsFileUpload, DsFilterStatusIcon, DsFormControl, DsGrid, DsGridItem, DsIcon, DsKeyValuePair, DsLoader, DsModal, DsNextStepButton, DsNumberInput, DsPanel, DsPasswordInput, DsPopover, DsProgressArc, DsProgressDonut, DsProgressLinear, DsProgressTaskBar, DsRadioGroup, DsRadioGroupLegacy, DsSegmentGroup, DsSelect, DsSiteNode, DsSkeleton, DsSkeletonCircle, DsSkeletonRect, DsSkeletonText, DsSmartTabs, DsSpinner, DsSplitButton, DsStack, DsStatusBadge, DsStatusBadgeV2, DsStep, DsStepContent, DsStepper, DsSystemStatus, DsTable, DsTableColumnFilterPopover, DsTableEditCellCheckbox, DsTableEditCellDate, DsTableEditCellNumber, DsTableEditCellSelect, DsTableEditCellText, DsTableEditableCell, DsTableEditingCell, DsTabs, DsTag, DsTagFilter, DsTextInput, DsTextarea, DsThreadItem, DsTimePicker, DsToastProvider, DsToggle, DsTooltip, DsTree, DsTypography, DsUserCard, DsVerticalTabs, DsWorkspaceLayout, FatalFileUploadError, FileUpload, FileUploadError, RetryableFileUploadError, alertBannerVariants, breakpoints, buttonV3Colors, buttonV3Sizes, buttonV3Variants, cardSizes, checkboxVariants, colors, controlStatuses, createCheckboxFilterAdapter, createColumnHelper, createDsTreeCollection, createDualRangeFilterAdapter, createFilterAdapter, customIcons, defaultDsTableLocale, dropdownMenuActionsAlignments, dropdownMenuItemVariants, dsAvatarSizes, dsAvatarTypes, dsKeyValuePairOrientations, filterStatuses, formatTime, iconColors, iconSizes, iconVariants, isCustomIcon, isResponsiveValue, loaderVariants, popoverAligns, popoverSides, progressArcSizes, progressArcVariants, progressDonutSizes, progressDonutVariants, progressLinearSizes, progressLinearVariants, resolveResponsiveValue, siteNodeStates, skeletonColorVariants, skeletonRadiusVariants, spinnerSizes, splitButtonSizes, statusBadgeV2Phases, statusBadgeV2Sizes, statusBadgeV2Variants, systemStatuses, tagSizes, tagVariants, taskBarStatuses, textInputSizes, tooltipPlacements, useBreakpoint, useCellEditor, useCheckboxSelectAll, useFileUpload, useResponsiveValue, useTableFilters, useToaster, withResponsiveProps };
|
|
23820
|
+
export { BREAKPOINT_LG, DsAlertBanner, DsAutocomplete, DsAvatar, DsAvatarGroup, DsBreadcrumb, DsButton, DsButtonV3, DsCard, DsCatalogLayout, DsCheckbox, DsCheckboxGroup, DsChip, DsChipGroup, DsCommentBubble, DsCommentCard, DsCommentIndicator, DsCommentThread, DsCommentsDrawer, DsConfirmation, DsDateInput, DsDatePicker, DsDateRangePicker, DsDialog, DsDivider, DsDrawer, DsDropdownMenu, DsDropdownMenuLegacy, DsExpandableTextInput, DsFileUpload, DsFilterStatusIcon, DsFormControl, DsGrid, DsGridItem, DsIcon, DsKeyValuePair, DsLoader, DsModal, DsNextStepButton, DsNumberInput, DsPanel, DsPasswordInput, DsPopover, DsProgressArc, DsProgressDonut, DsProgressLinear, DsProgressTaskBar, DsRadioGroup, DsRadioGroupLegacy, DsSegmentGroup, DsSelect, DsSiteNode, DsSkeleton, DsSkeletonCircle, DsSkeletonRect, DsSkeletonText, DsSlider, DsSmartTabs, DsSpinner, DsSplitButton, DsStack, DsStatusBadge, DsStatusBadgeV2, DsStep, DsStepContent, DsStepper, DsSystemStatus, DsTable, DsTableColumnFilterPopover, DsTableEditCellCheckbox, DsTableEditCellDate, DsTableEditCellNumber, DsTableEditCellSelect, DsTableEditCellText, DsTableEditableCell, DsTableEditingCell, DsTabs, DsTag, DsTagFilter, DsTextInput, DsTextarea, DsThreadItem, DsTimePicker, DsToastProvider, DsToggle, DsTooltip, DsTree, DsTypography, DsUserCard, DsVerticalTabs, DsWorkspaceLayout, FatalFileUploadError, FileUpload, FileUploadError, RetryableFileUploadError, alertBannerVariants, autocompleteSizes, breakpoints, buttonV3Colors, buttonV3Sizes, buttonV3Variants, cardSizes, checkboxVariants, colors, controlStatuses, createCheckboxFilterAdapter, createColumnHelper, createDsTreeCollection, createDualRangeFilterAdapter, createFilterAdapter, customIcons, defaultDsTableLocale, dropdownMenuActionsAlignments, dropdownMenuItemVariants, dsAvatarSizes, dsAvatarTypes, dsKeyValuePairOrientations, filterStatuses, formatTime, iconColors, iconSizes, iconVariants, isCustomIcon, isResponsiveValue, loaderVariants, popoverAligns, popoverSides, progressArcSizes, progressArcVariants, progressDonutSizes, progressDonutVariants, progressLinearSizes, progressLinearVariants, resolveResponsiveValue, siteNodeStates, skeletonColorVariants, skeletonRadiusVariants, spinnerSizes, splitButtonSizes, statusBadgeV2Phases, statusBadgeV2Sizes, statusBadgeV2Variants, systemStatuses, tagSizes, tagVariants, taskBarStatuses, textInputSizes, tooltipPlacements, useBreakpoint, useCellEditor, useCheckboxSelectAll, useFileUpload, useResponsiveValue, useTableFilters, useToaster, withResponsiveProps };
|
|
22831
23821
|
|
|
22832
23822
|
//# sourceMappingURL=index.js.map
|