next-recomponents 1.9.56 → 1.9.57

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
@@ -45988,12 +45988,23 @@ function TR({
45988
45988
  return null;
45989
45989
  } else if (handlers == null ? void 0 : handlers[h]) {
45990
45990
  const original = handlers[h];
45991
- const cloned = import_react34.default.cloneElement(original, __spreadValues({
45991
+ const cloned = import_react34.default.cloneElement(original, __spreadValues(__spreadValues({
45992
45992
  // si es controlado por value → actualiza con row[h]
45993
45993
  value: ((_a = original.props) == null ? void 0 : _a.value) !== void 0 ? row[h] : void 0,
45994
45994
  // si usa children → actualiza con row[h] también
45995
45995
  children: ((_b = original.props) == null ? void 0 : _b.children) ? typeof original.props.children == "object" ? (_c = original.props) == null ? void 0 : _c.children : row == null ? void 0 : row[h] : null
45996
- }, Object.keys(__spreadProps(__spreadValues({}, original.props), {
45996
+ }, original.props.hasOwnProperty("row") ? {
45997
+ row,
45998
+ updateRow: (finalResponse) => setObjectData(__spreadValues(__spreadValues({}, (row == null ? void 0 : row._id) ? {
45999
+ _id: row == null ? void 0 : row._id,
46000
+ _updated: true,
46001
+ _visible: true
46002
+ } : {
46003
+ id: (row == null ? void 0 : row.id) || null,
46004
+ _updated: true,
46005
+ _visible: true
46006
+ }), finalResponse))
46007
+ } : {}), Object.keys(__spreadProps(__spreadValues({}, original.props), {
45997
46008
  onChange: (_d = original.props) == null ? void 0 : _d.onChange
45998
46009
  })).filter((action) => action.startsWith("on")).reduce((acc, action) => {
45999
46010
  acc[action] = (e) => {
package/dist/index.mjs CHANGED
@@ -45985,12 +45985,23 @@ function TR({
45985
45985
  return null;
45986
45986
  } else if (handlers == null ? void 0 : handlers[h]) {
45987
45987
  const original = handlers[h];
45988
- const cloned = React9.cloneElement(original, __spreadValues({
45988
+ const cloned = React9.cloneElement(original, __spreadValues(__spreadValues({
45989
45989
  // si es controlado por value → actualiza con row[h]
45990
45990
  value: ((_a = original.props) == null ? void 0 : _a.value) !== void 0 ? row[h] : void 0,
45991
45991
  // si usa children → actualiza con row[h] también
45992
45992
  children: ((_b = original.props) == null ? void 0 : _b.children) ? typeof original.props.children == "object" ? (_c = original.props) == null ? void 0 : _c.children : row == null ? void 0 : row[h] : null
45993
- }, Object.keys(__spreadProps(__spreadValues({}, original.props), {
45993
+ }, original.props.hasOwnProperty("row") ? {
45994
+ row,
45995
+ updateRow: (finalResponse) => setObjectData(__spreadValues(__spreadValues({}, (row == null ? void 0 : row._id) ? {
45996
+ _id: row == null ? void 0 : row._id,
45997
+ _updated: true,
45998
+ _visible: true
45999
+ } : {
46000
+ id: (row == null ? void 0 : row.id) || null,
46001
+ _updated: true,
46002
+ _visible: true
46003
+ }), finalResponse))
46004
+ } : {}), Object.keys(__spreadProps(__spreadValues({}, original.props), {
45994
46005
  onChange: (_d = original.props) == null ? void 0 : _d.onChange
45995
46006
  })).filter((action) => action.startsWith("on")).reduce((acc, action) => {
45996
46007
  acc[action] = (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.9.56",
3
+ "version": "1.9.57",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/table3/tr.tsx CHANGED
@@ -96,6 +96,27 @@ export default function TR({
96
96
  : row?.[h]
97
97
  : null,
98
98
 
99
+ ...(original.props.hasOwnProperty("row")
100
+ ? {
101
+ row,
102
+ updateRow: (finalResponse: any) =>
103
+ setObjectData({
104
+ ...(row?._id
105
+ ? {
106
+ _id: row?._id,
107
+ _updated: true,
108
+ _visible: true,
109
+ }
110
+ : {
111
+ id: row?.id || null,
112
+ _updated: true,
113
+ _visible: true,
114
+ }),
115
+ ...finalResponse,
116
+ }),
117
+ }
118
+ : {}),
119
+
99
120
  ...Object.keys({
100
121
  ...original.props,
101
122
  onChange: original.props?.onChange,