next-recomponents 1.7.47 → 1.7.49

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.js CHANGED
@@ -43412,7 +43412,7 @@ function HTable(_a) {
43412
43412
  }, [mapedData]);
43413
43413
  (0, import_react25.useEffect)(() => {
43414
43414
  const newData = data.map((d, trkey) => {
43415
- var _a2, _b2, _c, _d;
43415
+ var _a2, _b2, _c;
43416
43416
  const obj = {};
43417
43417
  for (let key in d) {
43418
43418
  const item = {};
@@ -43424,8 +43424,14 @@ function HTable(_a) {
43424
43424
  const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
43425
43425
  const isDate = !isObject2 && regex.test(`${d[key]}`);
43426
43426
  const cellTypeOf = isDate ? "date" : isObject2 ? "object" : typeOf;
43427
- const mapedContent = (_c = (_b2 = mapedData == null ? void 0 : mapedData[trkey]) == null ? void 0 : _b2[key]) == null ? void 0 : _c.content;
43428
- const content = mapedContent || (cellTypeOf == "date" ? d[key].split("T").join(" ").split(".")[0] : cellTypeOf == "object" ? import_react25.default.isValidElement(d[key]) ? ((_d = d[key]) == null ? void 0 : _d.props).value : JSON.stringify(d[key]) : d[key]);
43427
+ const mapedIndex = mapedData.find(
43428
+ (mpd) => {
43429
+ var _a3;
43430
+ return ((_a3 = mpd == null ? void 0 : mpd.id) == null ? void 0 : _a3.content) == d.id;
43431
+ }
43432
+ );
43433
+ const mapedContent = (_b2 = mapedIndex == null ? void 0 : mapedIndex[key]) == null ? void 0 : _b2.content;
43434
+ const content = mapedContent || (cellTypeOf == "date" ? d[key].split("T").join(" ").split(".")[0] : cellTypeOf == "object" ? import_react25.default.isValidElement(d[key]) ? ((_c = d[key]) == null ? void 0 : _c.props).value : JSON.stringify(d[key]) : d[key]);
43429
43435
  const handler = import_react25.default.isValidElement(d[key]) ? d[key] : null;
43430
43436
  obj[key] = {
43431
43437
  index: trkey,
package/dist/index.mjs CHANGED
@@ -43394,7 +43394,7 @@ function HTable(_a) {
43394
43394
  }, [mapedData]);
43395
43395
  useEffect6(() => {
43396
43396
  const newData = data.map((d, trkey) => {
43397
- var _a2, _b2, _c, _d;
43397
+ var _a2, _b2, _c;
43398
43398
  const obj = {};
43399
43399
  for (let key in d) {
43400
43400
  const item = {};
@@ -43406,8 +43406,14 @@ function HTable(_a) {
43406
43406
  const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
43407
43407
  const isDate = !isObject2 && regex.test(`${d[key]}`);
43408
43408
  const cellTypeOf = isDate ? "date" : isObject2 ? "object" : typeOf;
43409
- const mapedContent = (_c = (_b2 = mapedData == null ? void 0 : mapedData[trkey]) == null ? void 0 : _b2[key]) == null ? void 0 : _c.content;
43410
- const content = mapedContent || (cellTypeOf == "date" ? d[key].split("T").join(" ").split(".")[0] : cellTypeOf == "object" ? React4.isValidElement(d[key]) ? ((_d = d[key]) == null ? void 0 : _d.props).value : JSON.stringify(d[key]) : d[key]);
43409
+ const mapedIndex = mapedData.find(
43410
+ (mpd) => {
43411
+ var _a3;
43412
+ return ((_a3 = mpd == null ? void 0 : mpd.id) == null ? void 0 : _a3.content) == d.id;
43413
+ }
43414
+ );
43415
+ const mapedContent = (_b2 = mapedIndex == null ? void 0 : mapedIndex[key]) == null ? void 0 : _b2.content;
43416
+ const content = mapedContent || (cellTypeOf == "date" ? d[key].split("T").join(" ").split(".")[0] : cellTypeOf == "object" ? React4.isValidElement(d[key]) ? ((_c = d[key]) == null ? void 0 : _c.props).value : JSON.stringify(d[key]) : d[key]);
43411
43417
  const handler = React4.isValidElement(d[key]) ? d[key] : null;
43412
43418
  obj[key] = {
43413
43419
  index: trkey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.7.47",
3
+ "version": "1.7.49",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/table/h.tsx CHANGED
@@ -67,7 +67,11 @@ export default function HTable({
67
67
 
68
68
  const isDate = !isObject && regex.test(`${d[key]}`);
69
69
  const cellTypeOf = isDate ? "date" : isObject ? "object" : typeOf;
70
- const mapedContent = (mapedData?.[trkey]?.[key] as any)?.content;
70
+ const mapedIndex = mapedData.find(
71
+ (mpd) => (mpd?.id as any)?.content == d.id
72
+ );
73
+
74
+ const mapedContent = (mapedIndex?.[key] as any)?.content;
71
75
 
72
76
  const content =
73
77
  mapedContent ||