@apexcura/ui-components 0.0.11-Beta86 → 0.0.11-Beta87

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
@@ -453,15 +453,17 @@ var AddMoreTable = (props) => {
453
453
  ...eachRow.variable_data.reduce((acc, variable, subIndex) => {
454
454
  Object.keys(variable).forEach((key) => {
455
455
  if (key === "SubRows") {
456
- acc[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsDelete(index, subIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsAdd(index) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
457
- } else {
458
- acc[`${key}`] = renderInputElement(variable[key]);
456
+ return;
459
457
  }
458
+ acc[`${key}_${subIndex}`] = renderInputElement(variable[key]);
460
459
  });
461
460
  return acc;
462
461
  }, {}),
463
462
  actions: /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)))
464
463
  };
464
+ if (eachRow.variable_data.length > 1) {
465
+ rowData[`SubRows`] = /* @__PURE__ */ import_react13.default.createElement("div", null, eachRow.variable_data.map((variable, subIndex) => /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsDelete(index, subIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)))), /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsAdd(index) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
466
+ }
465
467
  return rowData;
466
468
  });
467
469
  const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
package/dist/index.mjs CHANGED
@@ -406,15 +406,17 @@ var AddMoreTable = (props) => {
406
406
  ...eachRow.variable_data.reduce((acc, variable, subIndex) => {
407
407
  Object.keys(variable).forEach((key) => {
408
408
  if (key === "SubRows") {
409
- acc[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsDelete(index, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsAdd(index) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
410
- } else {
411
- acc[`${key}`] = renderInputElement(variable[key]);
409
+ return;
412
410
  }
411
+ acc[`${key}_${subIndex}`] = renderInputElement(variable[key]);
413
412
  });
414
413
  return acc;
415
414
  }, {}),
416
415
  actions: /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)))
417
416
  };
417
+ if (eachRow.variable_data.length > 1) {
418
+ rowData[`SubRows`] = /* @__PURE__ */ React12.createElement("div", null, eachRow.variable_data.map((variable, subIndex) => /* @__PURE__ */ React12.createElement("div", { key: subIndex }, /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsDelete(index, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)))), /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsAdd(index) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
419
+ }
418
420
  return rowData;
419
421
  });
420
422
  const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta86",
3
+ "version": "0.0.11-Beta87",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",