next-recomponents 1.7.45 → 1.7.46

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
@@ -11240,7 +11240,7 @@ function TD(_a) {
11240
11240
  ));
11241
11241
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
11242
11242
  "td",
11243
- {
11243
+ __spreadProps(__spreadValues({}, props), {
11244
11244
  onDoubleClick: (e) => setIsHidded(!isHidded),
11245
11245
  className: [
11246
11246
  isHidded && color2,
@@ -11264,7 +11264,7 @@ function TD(_a) {
11264
11264
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: item == null ? void 0 : item.content })
11265
11265
  }
11266
11266
  )
11267
- }
11267
+ })
11268
11268
  );
11269
11269
  }
11270
11270
 
@@ -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;
43415
+ var _a2, _b2, _c, _d;
43416
43416
  const obj = {};
43417
43417
  for (let key in d) {
43418
43418
  const item = {};
@@ -43424,8 +43424,8 @@ 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 = (_b2 = mapedData[trkey][key]) == null ? void 0 : _b2.content;
43428
- 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]);
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 != "" ? 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];
43429
43429
  const handler = import_react25.default.isValidElement(d[key]) ? d[key] : null;
43430
43430
  obj[key] = {
43431
43431
  index: trkey,
@@ -43562,6 +43562,7 @@ function HTable(_a) {
43562
43562
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
43563
43563
  TD,
43564
43564
  {
43565
+ "data-key": id3,
43565
43566
  index: trKey,
43566
43567
  symbols,
43567
43568
  item,
package/dist/index.mjs CHANGED
@@ -11222,7 +11222,7 @@ function TD(_a) {
11222
11222
  ));
11223
11223
  return /* @__PURE__ */ jsx8(
11224
11224
  "td",
11225
- {
11225
+ __spreadProps(__spreadValues({}, props), {
11226
11226
  onDoubleClick: (e) => setIsHidded(!isHidded),
11227
11227
  className: [
11228
11228
  isHidded && color2,
@@ -11246,7 +11246,7 @@ function TD(_a) {
11246
11246
  ] }) : /* @__PURE__ */ jsx8("div", { children: item == null ? void 0 : item.content })
11247
11247
  }
11248
11248
  )
11249
- }
11249
+ })
11250
11250
  );
11251
11251
  }
11252
11252
 
@@ -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;
43397
+ var _a2, _b2, _c, _d;
43398
43398
  const obj = {};
43399
43399
  for (let key in d) {
43400
43400
  const item = {};
@@ -43406,8 +43406,8 @@ 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 = (_b2 = mapedData[trkey][key]) == null ? void 0 : _b2.content;
43410
- 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]);
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 != "" ? 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];
43411
43411
  const handler = React4.isValidElement(d[key]) ? d[key] : null;
43412
43412
  obj[key] = {
43413
43413
  index: trkey,
@@ -43544,6 +43544,7 @@ function HTable(_a) {
43544
43544
  return /* @__PURE__ */ jsx12(
43545
43545
  TD,
43546
43546
  {
43547
+ "data-key": id3,
43547
43548
  index: trKey,
43548
43549
  symbols,
43549
43550
  item,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.7.45",
3
+ "version": "1.7.46",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/table/h.tsx CHANGED
@@ -67,17 +67,18 @@ 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 mapedContent = (mapedData?.[trkey]?.[key] as any)?.content;
71
71
 
72
72
  const content =
73
- mapedContent ||
74
- (cellTypeOf == "date"
73
+ mapedContent != ""
74
+ ? mapedContent
75
+ : cellTypeOf == "date"
75
76
  ? d[key].split("T").join(" ").split(".")[0]
76
77
  : cellTypeOf == "object"
77
78
  ? React.isValidElement(d[key])
78
79
  ? (d[key]?.props as any).value
79
80
  : JSON.stringify(d[key])
80
- : d[key]);
81
+ : d[key];
81
82
  const handler = React.isValidElement(d[key]) ? d[key] : null;
82
83
  obj[key] = {
83
84
  index: trkey,
@@ -213,6 +214,7 @@ export default function HTable({
213
214
  const id = trKey + "-" + (md?.id?.content || tdKey) + "-" + h;
214
215
  return (
215
216
  <TD
217
+ data-key={id}
216
218
  key={id}
217
219
  index={trKey}
218
220
  symbols={symbols}
package/src/table/td.tsx CHANGED
@@ -86,6 +86,7 @@ export default function TD({
86
86
 
87
87
  return (
88
88
  <td
89
+ {...props}
89
90
  onDoubleClick={(e) => setIsHidded(!isHidded)}
90
91
  // title={item?.title}
91
92
  className={[