cecomponent 2.0.101 → 2.0.102
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.
|
@@ -40674,11 +40674,34 @@ const CESkeletonTable = ({ columns: e, rows: t }) => /* @__PURE__ */ jsxRuntimeE
|
|
|
40674
40674
|
document.removeEventListener("keydown", t);
|
|
40675
40675
|
};
|
|
40676
40676
|
}, [e]);
|
|
40677
|
+
}, extractTextFromValue = (e) => {
|
|
40678
|
+
if (e == null) return "";
|
|
40679
|
+
if (typeof e == "string" || typeof e == "number")
|
|
40680
|
+
return String(e);
|
|
40681
|
+
if (Array.isArray(e))
|
|
40682
|
+
return e.map((t) => extractTextFromValue(t)).join(" ");
|
|
40683
|
+
if (React__default.isValidElement(e)) {
|
|
40684
|
+
const t = e.props ?? { children: void 0 }, n = extractTextFromValue(t.children);
|
|
40685
|
+
if (n.trim()) return n;
|
|
40686
|
+
const i = [
|
|
40687
|
+
t["data-value"],
|
|
40688
|
+
t["data-sort"],
|
|
40689
|
+
t.label,
|
|
40690
|
+
t.text,
|
|
40691
|
+
t.title
|
|
40692
|
+
];
|
|
40693
|
+
for (const o of i) {
|
|
40694
|
+
const l = extractTextFromValue(o).trim();
|
|
40695
|
+
if (l) return l;
|
|
40696
|
+
}
|
|
40697
|
+
return "";
|
|
40698
|
+
}
|
|
40699
|
+
return String(e);
|
|
40677
40700
|
}, getColumnValue = (e) => {
|
|
40678
40701
|
if (e == null) return "";
|
|
40679
40702
|
if (React__default.isValidElement(e)) {
|
|
40680
40703
|
const t = e;
|
|
40681
|
-
return t.props["data-value"] || t.props["data-sort"] ||
|
|
40704
|
+
return t.props["data-value"] || t.props["data-sort"] || extractTextFromValue(t);
|
|
40682
40705
|
}
|
|
40683
40706
|
return typeof e == "string" || typeof e == "number" ? e : String(e);
|
|
40684
40707
|
}, stripReactElements = (e) => {
|
|
@@ -41864,7 +41887,7 @@ const viewManager = new ViewManager(), useViewPersistence = (e, t = !0) => {
|
|
|
41864
41887
|
if (le && le.trim()) {
|
|
41865
41888
|
const xe = le.toLowerCase();
|
|
41866
41889
|
he = he.filter(
|
|
41867
|
-
(Ae) => Object.entries(Ae).some(([De, Ee]) => et.has(De) ?
|
|
41890
|
+
(Ae) => Object.entries(Ae).some(([De, Ee]) => et.has(De) ? extractTextFromValue(Ee).toLowerCase().includes(xe) : !1)
|
|
41868
41891
|
);
|
|
41869
41892
|
}
|
|
41870
41893
|
return Object.entries(ne || {}).forEach(([xe, Ae]) => {
|
package/dist/shared/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cecomponent",
|
|
3
3
|
"description": "A React component library for building modern UIs for Cleanearth",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.102",
|
|
5
5
|
"main": "dist/ce-component-lib.js",
|
|
6
6
|
"module": "dist/ce-component-lib.mjs",
|
|
7
7
|
"types": "dist/idex.d.ts",
|