@apexcura/ui-components 0.0.11-Beta91 → 0.0.11-Beta92

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
@@ -440,22 +440,21 @@ var AddMoreTable = (props) => {
440
440
  return null;
441
441
  }
442
442
  };
443
- const dataSource = rows.map((eachRow, index) => {
443
+ const dataSource = rows.map((eachRow, rowIndex) => {
444
444
  const rowData = {
445
445
  key: eachRow.id,
446
- "#": index + 1,
447
- ...eachRow.variable_data.reduce((acc, variable, subIndex) => {
448
- Object.keys(variable).forEach((key) => {
449
- if (key === "SubRows") {
450
- 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)));
451
- } else {
452
- acc[`${key}`] = renderInputElement(variable[key]);
453
- }
454
- });
455
- return acc;
456
- }, {}),
457
- 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)))
446
+ "#": rowIndex + 1
458
447
  };
448
+ eachRow.variable_data.forEach((variable, subIndex) => {
449
+ Object.keys(variable).forEach((key) => {
450
+ if (key === "SubRows") {
451
+ rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, 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(rowIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
452
+ } else {
453
+ rowData[`${key}`] = renderInputElement(variable[key]);
454
+ }
455
+ });
456
+ });
457
+ rowData.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)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
459
458
  return rowData;
460
459
  });
461
460
  const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
package/dist/index.mjs CHANGED
@@ -393,22 +393,21 @@ var AddMoreTable = (props) => {
393
393
  return null;
394
394
  }
395
395
  };
396
- const dataSource = rows.map((eachRow, index) => {
396
+ const dataSource = rows.map((eachRow, rowIndex) => {
397
397
  const rowData = {
398
398
  key: eachRow.id,
399
- "#": index + 1,
400
- ...eachRow.variable_data.reduce((acc, variable, subIndex) => {
401
- Object.keys(variable).forEach((key) => {
402
- if (key === "SubRows") {
403
- 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)));
404
- } else {
405
- acc[`${key}`] = renderInputElement(variable[key]);
406
- }
407
- });
408
- return acc;
409
- }, {}),
410
- 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)))
399
+ "#": rowIndex + 1
411
400
  };
401
+ eachRow.variable_data.forEach((variable, subIndex) => {
402
+ Object.keys(variable).forEach((key) => {
403
+ if (key === "SubRows") {
404
+ rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
405
+ } else {
406
+ rowData[`${key}`] = renderInputElement(variable[key]);
407
+ }
408
+ });
409
+ });
410
+ rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
412
411
  return rowData;
413
412
  });
414
413
  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-Beta91",
3
+ "version": "0.0.11-Beta92",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",