next-recomponents 1.7.39 → 1.7.41

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
@@ -11188,7 +11188,7 @@ function TD(_a) {
11188
11188
  const newAcc = __spreadValues({}, acc);
11189
11189
  const hasEvent = `${i}`.startsWith("on");
11190
11190
  const name = item.name;
11191
- newAcc["value"] = item.content;
11191
+ newAcc["value"] = item == null ? void 0 : item.content;
11192
11192
  newAcc["onChange"] = (e) => __async(null, null, function* () {
11193
11193
  const value = e.target.value;
11194
11194
  const newData1 = [...mapedData];
@@ -11200,7 +11200,8 @@ function TD(_a) {
11200
11200
  var _a3, _b3;
11201
11201
  e.item = item;
11202
11202
  e.row = Object.keys(mapedData[index]).reduce((acc2, i2) => {
11203
- acc2[i2] = name == i2 ? e.target.value : mapedData[index][i2].content;
11203
+ var _a4;
11204
+ acc2[i2] = (_a4 = mapedData[index][i2]) == null ? void 0 : _a4.content;
11204
11205
  return acc2;
11205
11206
  }, {});
11206
11207
  e.updateRow = (data) => {
@@ -11214,7 +11215,8 @@ function TD(_a) {
11214
11215
  });
11215
11216
  } else if (i == "row") {
11216
11217
  const row = Object.keys(mapedData[index]).reduce((acc2, i2) => {
11217
- acc2[i2] = mapedData[index][i2].content;
11218
+ var _a3;
11219
+ acc2[i2] = (_a3 = mapedData[index][i2]) == null ? void 0 : _a3.content;
11218
11220
  return acc2;
11219
11221
  }, {});
11220
11222
  newAcc["row"] = row;
@@ -11257,7 +11259,7 @@ function TD(_a) {
11257
11259
  }
11258
11260
  return child;
11259
11261
  }) }),
11260
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: !(newProps == null ? void 0 : newProps["row"]) && item.content })
11262
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: !(newProps == null ? void 0 : newProps["row"]) && (item == null ? void 0 : item.content) })
11261
11263
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: item == null ? void 0 : item.content })
11262
11264
  }
11263
11265
  )
package/dist/index.mjs CHANGED
@@ -11170,7 +11170,7 @@ function TD(_a) {
11170
11170
  const newAcc = __spreadValues({}, acc);
11171
11171
  const hasEvent = `${i}`.startsWith("on");
11172
11172
  const name = item.name;
11173
- newAcc["value"] = item.content;
11173
+ newAcc["value"] = item == null ? void 0 : item.content;
11174
11174
  newAcc["onChange"] = (e) => __async(null, null, function* () {
11175
11175
  const value = e.target.value;
11176
11176
  const newData1 = [...mapedData];
@@ -11182,7 +11182,8 @@ function TD(_a) {
11182
11182
  var _a3, _b3;
11183
11183
  e.item = item;
11184
11184
  e.row = Object.keys(mapedData[index]).reduce((acc2, i2) => {
11185
- acc2[i2] = name == i2 ? e.target.value : mapedData[index][i2].content;
11185
+ var _a4;
11186
+ acc2[i2] = (_a4 = mapedData[index][i2]) == null ? void 0 : _a4.content;
11186
11187
  return acc2;
11187
11188
  }, {});
11188
11189
  e.updateRow = (data) => {
@@ -11196,7 +11197,8 @@ function TD(_a) {
11196
11197
  });
11197
11198
  } else if (i == "row") {
11198
11199
  const row = Object.keys(mapedData[index]).reduce((acc2, i2) => {
11199
- acc2[i2] = mapedData[index][i2].content;
11200
+ var _a3;
11201
+ acc2[i2] = (_a3 = mapedData[index][i2]) == null ? void 0 : _a3.content;
11200
11202
  return acc2;
11201
11203
  }, {});
11202
11204
  newAcc["row"] = row;
@@ -11239,7 +11241,7 @@ function TD(_a) {
11239
11241
  }
11240
11242
  return child;
11241
11243
  }) }),
11242
- /* @__PURE__ */ jsx8("div", { children: !(newProps == null ? void 0 : newProps["row"]) && item.content })
11244
+ /* @__PURE__ */ jsx8("div", { children: !(newProps == null ? void 0 : newProps["row"]) && (item == null ? void 0 : item.content) })
11243
11245
  ] }) : /* @__PURE__ */ jsx8("div", { children: item == null ? void 0 : item.content })
11244
11246
  }
11245
11247
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.7.39",
3
+ "version": "1.7.41",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/table/td.tsx CHANGED
@@ -38,7 +38,7 @@ export default function TD({
38
38
  const hasEvent = `${i}`.startsWith("on");
39
39
  const name = item.name;
40
40
 
41
- newAcc["value"] = item.content;
41
+ newAcc["value"] = item?.content;
42
42
  newAcc["onChange"] = async (e: any) => {
43
43
  const value = e.target.value;
44
44
  const newData1 = [...mapedData];
@@ -49,8 +49,7 @@ export default function TD({
49
49
  newAcc[i] = async (e: any) => {
50
50
  e.item = item;
51
51
  e.row = Object.keys(mapedData[index]).reduce((acc, i) => {
52
- acc[i] =
53
- name == i ? e.target.value : mapedData[index][i].content;
52
+ acc[i] = mapedData[index][i]?.content;
54
53
  return acc;
55
54
  }, {} as any);
56
55
  e.updateRow = (data: Record<string, any>) => {
@@ -65,7 +64,7 @@ export default function TD({
65
64
  };
66
65
  } else if (i == "row") {
67
66
  const row = Object.keys(mapedData[index]).reduce((acc, i) => {
68
- acc[i] = mapedData[index][i].content;
67
+ acc[i] = mapedData[index][i]?.content;
69
68
  return acc;
70
69
  }, {} as any);
71
70
  newAcc["row"] = row;
@@ -112,7 +111,7 @@ export default function TD({
112
111
  return child;
113
112
  })}
114
113
  </div>
115
- <div>{!newProps?.["row"] && item.content}</div>
114
+ <div>{!newProps?.["row"] && item?.content}</div>
116
115
  </div>
117
116
  ) : (
118
117
  <div>{item?.content}</div>