@ceed/ads 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +36 -21
- package/dist/index.js +36 -21
- package/framer/index.js +39 -39
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2989,7 +2989,41 @@ var TextEllipsis = ({ children }) => {
|
|
|
2989
2989
|
}, [children]);
|
|
2990
2990
|
const content = /* @__PURE__ */ import_react25.default.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
2991
2991
|
if (showTooltip) {
|
|
2992
|
-
return /* @__PURE__ */ import_react25.default.createElement(
|
|
2992
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
2993
|
+
Tooltip_default,
|
|
2994
|
+
{
|
|
2995
|
+
title: children,
|
|
2996
|
+
placement: "top",
|
|
2997
|
+
onClick: (e) => e.stopPropagation()
|
|
2998
|
+
},
|
|
2999
|
+
content
|
|
3000
|
+
);
|
|
3001
|
+
}
|
|
3002
|
+
return content;
|
|
3003
|
+
};
|
|
3004
|
+
var CellTextEllipsis = ({ children }) => {
|
|
3005
|
+
const textRef = (0, import_react25.useRef)(null);
|
|
3006
|
+
const [showTooltip, setShowTooltip] = (0, import_react25.useState)(false);
|
|
3007
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
3008
|
+
const element = textRef.current;
|
|
3009
|
+
if (element) {
|
|
3010
|
+
const isTextTruncated = element.scrollWidth > element.clientWidth;
|
|
3011
|
+
setShowTooltip(isTextTruncated);
|
|
3012
|
+
}
|
|
3013
|
+
}, [children]);
|
|
3014
|
+
const content = /* @__PURE__ */ import_react25.default.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
3015
|
+
if (showTooltip) {
|
|
3016
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3017
|
+
Tooltip_default,
|
|
3018
|
+
{
|
|
3019
|
+
title: children,
|
|
3020
|
+
placement: "top",
|
|
3021
|
+
enterDelay: 1500,
|
|
3022
|
+
enterNextDelay: 1500,
|
|
3023
|
+
onClick: (e) => e.stopPropagation()
|
|
3024
|
+
},
|
|
3025
|
+
content
|
|
3026
|
+
);
|
|
2993
3027
|
}
|
|
2994
3028
|
return content;
|
|
2995
3029
|
};
|
|
@@ -3483,26 +3517,7 @@ var BodyCell = (props) => {
|
|
|
3483
3517
|
className: isLastStartPinnedColumn && "is-last-left" || isLastEndPinnedColumn && "is-last-right" || ""
|
|
3484
3518
|
},
|
|
3485
3519
|
(0, import_react25.useMemo)(
|
|
3486
|
-
() => showTooltip ? /* @__PURE__ */ import_react25.default.createElement(
|
|
3487
|
-
Tooltip_default,
|
|
3488
|
-
{
|
|
3489
|
-
title: value,
|
|
3490
|
-
placement: "bottom",
|
|
3491
|
-
style: { maxWidth: "100%" },
|
|
3492
|
-
enterDelay: 1500,
|
|
3493
|
-
enterNextDelay: 1500
|
|
3494
|
-
},
|
|
3495
|
-
/* @__PURE__ */ import_react25.default.createElement(
|
|
3496
|
-
"div",
|
|
3497
|
-
{
|
|
3498
|
-
style: {
|
|
3499
|
-
overflow: "hidden",
|
|
3500
|
-
textOverflow: "ellipsis"
|
|
3501
|
-
}
|
|
3502
|
-
},
|
|
3503
|
-
CellComponent
|
|
3504
|
-
)
|
|
3505
|
-
) : CellComponent,
|
|
3520
|
+
() => showTooltip ? /* @__PURE__ */ import_react25.default.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
|
|
3506
3521
|
[CellComponent, showTooltip, value]
|
|
3507
3522
|
)
|
|
3508
3523
|
);
|
package/dist/index.js
CHANGED
|
@@ -2945,7 +2945,41 @@ var TextEllipsis = ({ children }) => {
|
|
|
2945
2945
|
}, [children]);
|
|
2946
2946
|
const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
2947
2947
|
if (showTooltip) {
|
|
2948
|
-
return /* @__PURE__ */ React23.createElement(
|
|
2948
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2949
|
+
Tooltip_default,
|
|
2950
|
+
{
|
|
2951
|
+
title: children,
|
|
2952
|
+
placement: "top",
|
|
2953
|
+
onClick: (e) => e.stopPropagation()
|
|
2954
|
+
},
|
|
2955
|
+
content
|
|
2956
|
+
);
|
|
2957
|
+
}
|
|
2958
|
+
return content;
|
|
2959
|
+
};
|
|
2960
|
+
var CellTextEllipsis = ({ children }) => {
|
|
2961
|
+
const textRef = useRef4(null);
|
|
2962
|
+
const [showTooltip, setShowTooltip] = useState6(false);
|
|
2963
|
+
useLayoutEffect(() => {
|
|
2964
|
+
const element = textRef.current;
|
|
2965
|
+
if (element) {
|
|
2966
|
+
const isTextTruncated = element.scrollWidth > element.clientWidth;
|
|
2967
|
+
setShowTooltip(isTextTruncated);
|
|
2968
|
+
}
|
|
2969
|
+
}, [children]);
|
|
2970
|
+
const content = /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
2971
|
+
if (showTooltip) {
|
|
2972
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2973
|
+
Tooltip_default,
|
|
2974
|
+
{
|
|
2975
|
+
title: children,
|
|
2976
|
+
placement: "top",
|
|
2977
|
+
enterDelay: 1500,
|
|
2978
|
+
enterNextDelay: 1500,
|
|
2979
|
+
onClick: (e) => e.stopPropagation()
|
|
2980
|
+
},
|
|
2981
|
+
content
|
|
2982
|
+
);
|
|
2949
2983
|
}
|
|
2950
2984
|
return content;
|
|
2951
2985
|
};
|
|
@@ -3439,26 +3473,7 @@ var BodyCell = (props) => {
|
|
|
3439
3473
|
className: isLastStartPinnedColumn && "is-last-left" || isLastEndPinnedColumn && "is-last-right" || ""
|
|
3440
3474
|
},
|
|
3441
3475
|
useMemo8(
|
|
3442
|
-
() => showTooltip ? /* @__PURE__ */ React23.createElement(
|
|
3443
|
-
Tooltip_default,
|
|
3444
|
-
{
|
|
3445
|
-
title: value,
|
|
3446
|
-
placement: "bottom",
|
|
3447
|
-
style: { maxWidth: "100%" },
|
|
3448
|
-
enterDelay: 1500,
|
|
3449
|
-
enterNextDelay: 1500
|
|
3450
|
-
},
|
|
3451
|
-
/* @__PURE__ */ React23.createElement(
|
|
3452
|
-
"div",
|
|
3453
|
-
{
|
|
3454
|
-
style: {
|
|
3455
|
-
overflow: "hidden",
|
|
3456
|
-
textOverflow: "ellipsis"
|
|
3457
|
-
}
|
|
3458
|
-
},
|
|
3459
|
-
CellComponent
|
|
3460
|
-
)
|
|
3461
|
-
) : CellComponent,
|
|
3476
|
+
() => showTooltip ? /* @__PURE__ */ React23.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
|
|
3462
3477
|
[CellComponent, showTooltip, value]
|
|
3463
3478
|
)
|
|
3464
3479
|
);
|