@underverse-ui/underverse 2.0.40 → 2.0.42
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/api-reference.json +1 -1
- package/dist/{DatePicker-3IHOADO5.js → DatePicker-VRS4SBIH.js} +4 -4
- package/dist/{EmojiPicker-5MEENOF7.js → EmojiPicker-NKY2LOGI.js} +5 -5
- package/dist/{chunk-ZCW2WBNT.js → chunk-7YU3O5JK.js} +9 -9
- package/dist/{chunk-GY6P6WZB.js → chunk-CJ6RPCJN.js} +3 -3
- package/dist/{chunk-THBABGVM.js → chunk-IW6FSDIT.js} +2 -2
- package/dist/{chunk-AKV7ZQJL.js → chunk-PNUDVGMI.js} +2 -2
- package/dist/{chunk-4MX7S6TM.js → chunk-PSWS64LA.js} +13 -5
- package/dist/chunk-PSWS64LA.js.map +1 -0
- package/dist/{chunk-LBOTY2AI.js → chunk-TVCZXO6G.js} +4 -4
- package/dist/{chunk-KBCOCHKM.js → chunk-VYTIGF3V.js} +4 -4
- package/dist/{chunk-BSN2YFRJ.js → chunk-WZH3Y3BL.js} +2 -2
- package/dist/{chunk-2K443MQP.js → chunk-YNALZEN6.js} +13 -7
- package/dist/chunk-YNALZEN6.js.map +1 -0
- package/dist/index.cjs +139 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +126 -104
- package/dist/index.js.map +1 -1
- package/dist/{menu-bar-F6FGQVWO.js → menu-bar-67LDC7IR.js} +6 -6
- package/dist/ueditor.cjs +22 -8
- package/dist/ueditor.cjs.map +1 -1
- package/dist/ueditor.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-2K443MQP.js.map +0 -1
- package/dist/chunk-4MX7S6TM.js.map +0 -1
- /package/dist/{DatePicker-3IHOADO5.js.map → DatePicker-VRS4SBIH.js.map} +0 -0
- /package/dist/{EmojiPicker-5MEENOF7.js.map → EmojiPicker-NKY2LOGI.js.map} +0 -0
- /package/dist/{chunk-ZCW2WBNT.js.map → chunk-7YU3O5JK.js.map} +0 -0
- /package/dist/{chunk-GY6P6WZB.js.map → chunk-CJ6RPCJN.js.map} +0 -0
- /package/dist/{chunk-THBABGVM.js.map → chunk-IW6FSDIT.js.map} +0 -0
- /package/dist/{chunk-AKV7ZQJL.js.map → chunk-PNUDVGMI.js.map} +0 -0
- /package/dist/{chunk-LBOTY2AI.js.map → chunk-TVCZXO6G.js.map} +0 -0
- /package/dist/{chunk-KBCOCHKM.js.map → chunk-VYTIGF3V.js.map} +0 -0
- /package/dist/{chunk-BSN2YFRJ.js.map → chunk-WZH3Y3BL.js.map} +0 -0
- /package/dist/{menu-bar-F6FGQVWO.js.map → menu-bar-67LDC7IR.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -202,7 +202,9 @@ var init_en = __esm({
|
|
|
202
202
|
headerAlign: "Header alignment",
|
|
203
203
|
alignLeft: "Align left",
|
|
204
204
|
alignCenter: "Align center",
|
|
205
|
-
alignRight: "Align right"
|
|
205
|
+
alignRight: "Align right",
|
|
206
|
+
sortBy: "Sort by",
|
|
207
|
+
filterBy: "Filter by"
|
|
206
208
|
},
|
|
207
209
|
ValidationInput: {
|
|
208
210
|
required: "This field is required",
|
|
@@ -681,7 +683,9 @@ var init_vi = __esm({
|
|
|
681
683
|
headerAlign: "C\u0103n ch\u1EC9nh ti\xEAu \u0111\u1EC1",
|
|
682
684
|
alignLeft: "C\u0103n tr\xE1i",
|
|
683
685
|
alignCenter: "C\u0103n gi\u1EEFa",
|
|
684
|
-
alignRight: "C\u0103n ph\u1EA3i"
|
|
686
|
+
alignRight: "C\u0103n ph\u1EA3i",
|
|
687
|
+
sortBy: "S\u1EAFp x\u1EBFp theo",
|
|
688
|
+
filterBy: "L\u1ECDc theo"
|
|
685
689
|
},
|
|
686
690
|
ValidationInput: {
|
|
687
691
|
required: "Tr\u01B0\u1EDDng n\xE0y l\xE0 b\u1EAFt bu\u1ED9c.",
|
|
@@ -1160,7 +1164,9 @@ var init_ko = __esm({
|
|
|
1160
1164
|
headerAlign: "\uD5E4\uB354 \uC815\uB82C",
|
|
1161
1165
|
alignLeft: "\uC67C\uCABD \uC815\uB82C",
|
|
1162
1166
|
alignCenter: "\uAC00\uC6B4\uB370 \uC815\uB82C",
|
|
1163
|
-
alignRight: "\uC624\uB978\uCABD \uC815\uB82C"
|
|
1167
|
+
alignRight: "\uC624\uB978\uCABD \uC815\uB82C",
|
|
1168
|
+
sortBy: "\uC815\uB82C \uAE30\uC900",
|
|
1169
|
+
filterBy: "\uD544\uD130:"
|
|
1164
1170
|
},
|
|
1165
1171
|
ValidationInput: {
|
|
1166
1172
|
required: "\uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4",
|
|
@@ -1639,7 +1645,9 @@ var init_ja = __esm({
|
|
|
1639
1645
|
headerAlign: "\u30D8\u30C3\u30C0\u30FC\u914D\u7F6E",
|
|
1640
1646
|
alignLeft: "\u5DE6\u63C3\u3048",
|
|
1641
1647
|
alignCenter: "\u4E2D\u592E\u63C3\u3048",
|
|
1642
|
-
alignRight: "\u53F3\u63C3\u3048"
|
|
1648
|
+
alignRight: "\u53F3\u63C3\u3048",
|
|
1649
|
+
sortBy: "\u4E26\u3073\u66FF\u3048",
|
|
1650
|
+
filterBy: "\u7D5E\u308A\u8FBC\u307F:"
|
|
1643
1651
|
},
|
|
1644
1652
|
ValidationInput: {
|
|
1645
1653
|
required: "\u3053\u306E\u9805\u76EE\u306F\u5FC5\u9808\u3067\u3059",
|
|
@@ -5505,6 +5513,7 @@ var init_DatePicker = __esm({
|
|
|
5505
5513
|
id,
|
|
5506
5514
|
value,
|
|
5507
5515
|
onChange,
|
|
5516
|
+
formatDate: formatDate2,
|
|
5508
5517
|
placeholder,
|
|
5509
5518
|
className,
|
|
5510
5519
|
disabled = false,
|
|
@@ -5713,6 +5722,9 @@ var init_DatePicker = __esm({
|
|
|
5713
5722
|
setIsOpen(false);
|
|
5714
5723
|
};
|
|
5715
5724
|
const formatDateDisplay = (date) => {
|
|
5725
|
+
if (formatDate2) {
|
|
5726
|
+
return formatDate2(date);
|
|
5727
|
+
}
|
|
5716
5728
|
return date.toLocaleDateString(locale === "vi" ? "vi-VN" : "en-US", {
|
|
5717
5729
|
day: "numeric",
|
|
5718
5730
|
month: "long",
|
|
@@ -6172,6 +6184,7 @@ var init_DatePicker = __esm({
|
|
|
6172
6184
|
startDate,
|
|
6173
6185
|
endDate,
|
|
6174
6186
|
onChange,
|
|
6187
|
+
formatDate: formatDate2,
|
|
6175
6188
|
placeholder = "Select date range...",
|
|
6176
6189
|
className,
|
|
6177
6190
|
label,
|
|
@@ -6204,10 +6217,11 @@ var init_DatePicker = __esm({
|
|
|
6204
6217
|
}, []);
|
|
6205
6218
|
const getRangeString = React35.useCallback((s, e) => {
|
|
6206
6219
|
if (!s) return "";
|
|
6207
|
-
const startStr = formatDateShort(s, locale);
|
|
6220
|
+
const startStr = formatDate2 ? formatDate2(s) : formatDateShort(s, locale);
|
|
6208
6221
|
if (!e) return `${startStr} - `;
|
|
6209
|
-
|
|
6210
|
-
|
|
6222
|
+
const endStr = formatDate2 ? formatDate2(e) : formatDateShort(e, locale);
|
|
6223
|
+
return `${startStr} - ${endStr}`;
|
|
6224
|
+
}, [locale, formatDate2]);
|
|
6211
6225
|
React35.useEffect(() => {
|
|
6212
6226
|
setInputValue((currentInput) => {
|
|
6213
6227
|
if (startDate) {
|
|
@@ -6751,7 +6765,7 @@ var init_DatePicker = __esm({
|
|
|
6751
6765
|
)
|
|
6752
6766
|
] })
|
|
6753
6767
|
] });
|
|
6754
|
-
const displayFormat = (date) => formatDateShort(date);
|
|
6768
|
+
const displayFormat = (date) => formatDate2 ? formatDate2(date) : formatDateShort(date);
|
|
6755
6769
|
const displayLabel = tempStart && tempEnd ? `${displayFormat(tempStart)} - ${displayFormat(tempEnd)}` : tempStart ? `${displayFormat(tempStart)} - ...` : placeholder;
|
|
6756
6770
|
const effectiveError = localRequiredError;
|
|
6757
6771
|
const autoId = (0, import_react22.useId)();
|
|
@@ -24565,6 +24579,7 @@ var LunarDatePicker = ({
|
|
|
24565
24579
|
id,
|
|
24566
24580
|
value,
|
|
24567
24581
|
onChange,
|
|
24582
|
+
formatDate: formatDate2,
|
|
24568
24583
|
placeholder,
|
|
24569
24584
|
className,
|
|
24570
24585
|
disabled = false,
|
|
@@ -24778,6 +24793,9 @@ var LunarDatePicker = ({
|
|
|
24778
24793
|
};
|
|
24779
24794
|
const formatDateDisplay = (date) => {
|
|
24780
24795
|
if (!date) return "";
|
|
24796
|
+
if (formatDate2) {
|
|
24797
|
+
return formatDate2(date);
|
|
24798
|
+
}
|
|
24781
24799
|
const formatStr = date.is_leap_month ? t("lunarLeapFormat") : t("lunarFormat");
|
|
24782
24800
|
return formatStr.replace("{day}", String(date.day)).replace("{month}", String(date.month)).replace("{year}", String(date.year));
|
|
24783
24801
|
};
|
|
@@ -25247,6 +25265,7 @@ var LunarDateRangePicker = ({
|
|
|
25247
25265
|
startDate,
|
|
25248
25266
|
endDate,
|
|
25249
25267
|
onChange,
|
|
25268
|
+
formatDate: formatDate2,
|
|
25250
25269
|
placeholder = "Select lunar date range...",
|
|
25251
25270
|
className,
|
|
25252
25271
|
label,
|
|
@@ -25690,6 +25709,9 @@ var LunarDateRangePicker = ({
|
|
|
25690
25709
|
] })
|
|
25691
25710
|
] });
|
|
25692
25711
|
const displayFormat = (date) => {
|
|
25712
|
+
if (formatDate2) {
|
|
25713
|
+
return formatDate2(date);
|
|
25714
|
+
}
|
|
25693
25715
|
const formatStr = date.is_leap_month ? t("lunarLeapFormat") : t("lunarFormat");
|
|
25694
25716
|
return formatStr.replace("{day}", String(date.day)).replace("{month}", String(date.month)).replace("{year}", String(date.year));
|
|
25695
25717
|
};
|
|
@@ -38869,9 +38891,55 @@ function DataTableHeader({
|
|
|
38869
38891
|
const isRightAlign = resolvedHeaderAlign === "right";
|
|
38870
38892
|
const isCenterAlign = resolvedHeaderAlign === "center";
|
|
38871
38893
|
const columnLabel = getColumnLabel(col.title) || col.key;
|
|
38872
|
-
const sortByText = sortByLabel ?? gi18n.sortBy ?? "
|
|
38873
|
-
const sortLabel = `${sortByText} ${columnLabel}
|
|
38894
|
+
const sortByText = sortByLabel ?? gi18n.sortBy ?? (t("sortBy") !== "sortBy" ? t("sortBy") : void 0);
|
|
38895
|
+
const sortLabel = sortByText ? `${sortByText} ${columnLabel}` : columnLabel;
|
|
38896
|
+
const hasSortTooltip = Boolean(sortByText);
|
|
38874
38897
|
const useEndIcon = (col.iconPosition ?? "end") === "end";
|
|
38898
|
+
const sortButton = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38899
|
+
"button",
|
|
38900
|
+
{
|
|
38901
|
+
type: "button",
|
|
38902
|
+
className: cn(
|
|
38903
|
+
"p-1 rounded-lg transition-all duration-200 hover:bg-foreground/10",
|
|
38904
|
+
useEndIcon && isCenterAlign && "col-start-3 justify-self-end",
|
|
38905
|
+
sort?.key === col.key ? "opacity-100 bg-foreground/10" : "opacity-60 hover:opacity-100"
|
|
38906
|
+
),
|
|
38907
|
+
onClick: () => {
|
|
38908
|
+
setCurPage(1);
|
|
38909
|
+
setSort((current) => {
|
|
38910
|
+
if (!current || current.key !== col.key) return { key: col.key, order: "asc" };
|
|
38911
|
+
if (current.order === "asc") return { key: col.key, order: "desc" };
|
|
38912
|
+
return null;
|
|
38913
|
+
});
|
|
38914
|
+
},
|
|
38915
|
+
"aria-label": sortLabel,
|
|
38916
|
+
title: hasSortTooltip ? sortLabel : void 0,
|
|
38917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("svg", { viewBox: "0 0 20 20", fill: "none", className: cn("inline-block", sortIconClass), children: [
|
|
38918
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38919
|
+
"path",
|
|
38920
|
+
{
|
|
38921
|
+
d: "M5 7.5l5-5 5 5",
|
|
38922
|
+
stroke: "currentColor",
|
|
38923
|
+
strokeWidth: "1.5",
|
|
38924
|
+
strokeLinecap: "round",
|
|
38925
|
+
strokeLinejoin: "round",
|
|
38926
|
+
opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
|
|
38927
|
+
}
|
|
38928
|
+
),
|
|
38929
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38930
|
+
"path",
|
|
38931
|
+
{
|
|
38932
|
+
d: "M5 12.5l5 5 5-5",
|
|
38933
|
+
stroke: "currentColor",
|
|
38934
|
+
strokeWidth: "1.5",
|
|
38935
|
+
strokeLinecap: "round",
|
|
38936
|
+
strokeLinejoin: "round",
|
|
38937
|
+
opacity: sort?.key === col.key && sort.order === "desc" ? 1 : 0.4
|
|
38938
|
+
}
|
|
38939
|
+
)
|
|
38940
|
+
] })
|
|
38941
|
+
}
|
|
38942
|
+
);
|
|
38875
38943
|
const titleContent = /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
38876
38944
|
"div",
|
|
38877
38945
|
{
|
|
@@ -38893,85 +38961,46 @@ function DataTableHeader({
|
|
|
38893
38961
|
children: col.title
|
|
38894
38962
|
}
|
|
38895
38963
|
),
|
|
38896
|
-
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38964
|
+
col.sortable && (hasSortTooltip ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38897
38965
|
Tooltip,
|
|
38898
38966
|
{
|
|
38899
38967
|
placement: "top",
|
|
38900
38968
|
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs font-medium", children: sortLabel }),
|
|
38901
|
-
children:
|
|
38902
|
-
"button",
|
|
38903
|
-
{
|
|
38904
|
-
type: "button",
|
|
38905
|
-
className: cn(
|
|
38906
|
-
"p-1 rounded-lg transition-all duration-200 hover:bg-foreground/10",
|
|
38907
|
-
useEndIcon && isCenterAlign && "col-start-3 justify-self-end",
|
|
38908
|
-
sort?.key === col.key ? "opacity-100 bg-foreground/10" : "opacity-60 hover:opacity-100"
|
|
38909
|
-
),
|
|
38910
|
-
onClick: () => {
|
|
38911
|
-
setCurPage(1);
|
|
38912
|
-
setSort((current) => {
|
|
38913
|
-
if (!current || current.key !== col.key) return { key: col.key, order: "asc" };
|
|
38914
|
-
if (current.order === "asc") return { key: col.key, order: "desc" };
|
|
38915
|
-
return null;
|
|
38916
|
-
});
|
|
38917
|
-
},
|
|
38918
|
-
"aria-label": sortLabel,
|
|
38919
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("svg", { viewBox: "0 0 20 20", fill: "none", className: cn("inline-block", sortIconClass), children: [
|
|
38920
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38921
|
-
"path",
|
|
38922
|
-
{
|
|
38923
|
-
d: "M5 7.5l5-5 5 5",
|
|
38924
|
-
stroke: "currentColor",
|
|
38925
|
-
strokeWidth: "1.5",
|
|
38926
|
-
strokeLinecap: "round",
|
|
38927
|
-
strokeLinejoin: "round",
|
|
38928
|
-
opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
|
|
38929
|
-
}
|
|
38930
|
-
),
|
|
38931
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38932
|
-
"path",
|
|
38933
|
-
{
|
|
38934
|
-
d: "M5 12.5l5 5 5-5",
|
|
38935
|
-
stroke: "currentColor",
|
|
38936
|
-
strokeWidth: "1.5",
|
|
38937
|
-
strokeLinecap: "round",
|
|
38938
|
-
strokeLinejoin: "round",
|
|
38939
|
-
opacity: sort?.key === col.key && sort.order === "desc" ? 1 : 0.4
|
|
38940
|
-
}
|
|
38941
|
-
)
|
|
38942
|
-
] })
|
|
38943
|
-
}
|
|
38944
|
-
)
|
|
38969
|
+
children: sortButton
|
|
38945
38970
|
}
|
|
38946
|
-
)
|
|
38971
|
+
) : sortButton)
|
|
38947
38972
|
]
|
|
38948
38973
|
}
|
|
38949
38974
|
);
|
|
38975
|
+
const filterText = gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : t("filterByColumn") !== "filterByColumn" ? t("filterByColumn").replace("{column}", columnLabel) : t("filterBy") !== "filterBy" ? `${t("filterBy")} ${columnLabel}` : void 0;
|
|
38976
|
+
const filterLabel = filterText ?? columnLabel;
|
|
38977
|
+
const hasFilterTooltip = Boolean(filterText);
|
|
38978
|
+
const filterButton = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38979
|
+
"button",
|
|
38980
|
+
{
|
|
38981
|
+
type: "button",
|
|
38982
|
+
title: hasFilterTooltip ? filterLabel : void 0,
|
|
38983
|
+
className: cn(
|
|
38984
|
+
"p-1.5 rounded-lg transition-all duration-200 hover:bg-foreground/10",
|
|
38985
|
+
filters[col.key] ? "bg-foreground/10 opacity-100" : "opacity-60 hover:opacity-100"
|
|
38986
|
+
),
|
|
38987
|
+
"aria-label": filterLabel,
|
|
38988
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react38.Filter, { className: "w-4 h-4" })
|
|
38989
|
+
}
|
|
38990
|
+
);
|
|
38950
38991
|
const filterContent = col.filter ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38951
38992
|
Popover,
|
|
38952
38993
|
{
|
|
38953
38994
|
getPortalContainer,
|
|
38954
38995
|
placement: "bottom-start",
|
|
38955
|
-
trigger: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38996
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "inline-flex", children: hasFilterTooltip ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
38956
38997
|
Tooltip,
|
|
38957
38998
|
{
|
|
38958
38999
|
placement: "top",
|
|
38959
|
-
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs font-medium", children:
|
|
38960
|
-
children:
|
|
38961
|
-
"button",
|
|
38962
|
-
{
|
|
38963
|
-
type: "button",
|
|
38964
|
-
title: gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
38965
|
-
className: cn(
|
|
38966
|
-
"p-1.5 rounded-lg transition-all duration-200 hover:bg-foreground/10",
|
|
38967
|
-
filters[col.key] ? "bg-foreground/10 opacity-100" : "opacity-60 hover:opacity-100"
|
|
38968
|
-
),
|
|
38969
|
-
"aria-label": gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
38970
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react38.Filter, { className: "w-4 h-4" })
|
|
38971
|
-
}
|
|
38972
|
-
)
|
|
39000
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs font-medium", children: filterLabel }),
|
|
39001
|
+
children: filterButton
|
|
38973
39002
|
}
|
|
38974
|
-
) }),
|
|
39003
|
+
) : filterButton }),
|
|
38975
39004
|
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "p-3 w-64 space-y-3", children: [
|
|
38976
39005
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
38977
39006
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "text-sm font-medium", children: col.title }),
|
|
@@ -39060,36 +39089,42 @@ function DataTableHeader({
|
|
|
39060
39089
|
),
|
|
39061
39090
|
children: [
|
|
39062
39091
|
renderHeaderContent(col, isLeaf),
|
|
39063
|
-
isLeaf && enableHeaderAutoFit &&
|
|
39064
|
-
|
|
39065
|
-
{
|
|
39066
|
-
|
|
39067
|
-
|
|
39068
|
-
|
|
39069
|
-
"button",
|
|
39070
|
-
|
|
39071
|
-
|
|
39072
|
-
|
|
39073
|
-
|
|
39074
|
-
|
|
39075
|
-
|
|
39076
|
-
|
|
39077
|
-
|
|
39078
|
-
|
|
39079
|
-
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
|
|
39083
|
-
|
|
39084
|
-
|
|
39085
|
-
|
|
39086
|
-
|
|
39087
|
-
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39092
|
+
isLeaf && enableHeaderAutoFit && (() => {
|
|
39093
|
+
const autoFitTooltipText = t("doubleClickToAutoFit") !== "doubleClickToAutoFit" ? t("doubleClickToAutoFit") : void 0;
|
|
39094
|
+
const autoFitAriaLabel = gi18n.autoFitColumn ? gi18n.autoFitColumn(String(col.title)) : t("autoFitColumn") !== "autoFitColumn" ? t("autoFitColumn").replace("{column}", String(col.title)) : autoFitTooltipText ? `${autoFitTooltipText} ${String(col.title)}` : `Auto fit ${String(col.title)}`;
|
|
39095
|
+
const autoFitButton = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
39096
|
+
"button",
|
|
39097
|
+
{
|
|
39098
|
+
type: "button",
|
|
39099
|
+
"aria-label": autoFitAriaLabel,
|
|
39100
|
+
title: autoFitTooltipText,
|
|
39101
|
+
onClick: (event) => {
|
|
39102
|
+
event.preventDefault();
|
|
39103
|
+
event.stopPropagation();
|
|
39104
|
+
},
|
|
39105
|
+
onDoubleClick: (event) => {
|
|
39106
|
+
event.preventDefault();
|
|
39107
|
+
event.stopPropagation();
|
|
39108
|
+
onAutoFitColumn?.(col.key);
|
|
39109
|
+
},
|
|
39110
|
+
className: cn(
|
|
39111
|
+
"absolute inset-y-0 right-0 z-10 w-3",
|
|
39112
|
+
!isLastCell && "-mr-1",
|
|
39113
|
+
"cursor-col-resize select-none bg-transparent",
|
|
39114
|
+
"after:absolute after:inset-y-2 after:right-0.8 after:w-px after:bg-border/0 after:transition-colors",
|
|
39115
|
+
"hover:after:bg-primary/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary"
|
|
39116
|
+
)
|
|
39117
|
+
}
|
|
39118
|
+
);
|
|
39119
|
+
return autoFitTooltipText ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
39120
|
+
Tooltip,
|
|
39121
|
+
{
|
|
39122
|
+
placement: "top",
|
|
39123
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs font-medium", children: autoFitTooltipText }),
|
|
39124
|
+
children: autoFitButton
|
|
39125
|
+
}
|
|
39126
|
+
) : autoFitButton;
|
|
39127
|
+
})()
|
|
39093
39128
|
]
|
|
39094
39129
|
},
|
|
39095
39130
|
col.key
|
|
@@ -39964,6 +39999,7 @@ function DataTable({
|
|
|
39964
39999
|
paginationRange,
|
|
39965
40000
|
enableHeaderAutoFit = true,
|
|
39966
40001
|
labels,
|
|
40002
|
+
sortByLabel,
|
|
39967
40003
|
columnColorGroups,
|
|
39968
40004
|
borderMode,
|
|
39969
40005
|
getPortalContainer,
|
|
@@ -40173,7 +40209,7 @@ function DataTable({
|
|
|
40173
40209
|
enableHeaderAutoFit,
|
|
40174
40210
|
getStickyHeaderClass,
|
|
40175
40211
|
getStickyHeaderCellStyle,
|
|
40176
|
-
sortByLabel: labels?.sortBy,
|
|
40212
|
+
sortByLabel: sortByLabel ?? labels?.sortBy,
|
|
40177
40213
|
t,
|
|
40178
40214
|
columnColorGroups,
|
|
40179
40215
|
getPortalContainer
|