@apexcura/ui-components 0.0.12-Beta44 → 0.0.12-Beta45

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
@@ -477,20 +477,20 @@ var AddMoreTable = (props) => {
477
477
  }
478
478
  };
479
479
  const dataSource = rows.map((eachRow, rowIndex) => {
480
- let rowData = {
480
+ const rowData = {
481
481
  key: eachRow.id,
482
482
  "#": rowIndex + 1,
483
- Medicine: renderInputElement({
483
+ "Medicine": renderInputElement({
484
484
  element: eachRow.element,
485
485
  label: eachRow.label
486
486
  })
487
487
  };
488
- eachRow.variable_data.forEach((subRow, subRowIndex) => {
489
- Object.entries(subRow).forEach(([key, value]) => {
488
+ eachRow.variable_data.map((variable, subIndex) => {
489
+ Object.keys(variable).forEach((key) => {
490
490
  if (key === "SubRows") {
491
- rowData[`${key}${subRowIndex}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subRowIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subRowIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), subRowIndex === 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)));
491
+ rowData[`${key}${subIndex}`] = /* @__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)));
492
492
  } else {
493
- rowData[`${key}${subRowIndex}`] = renderInputElement(value);
493
+ rowData[`${key}${subIndex}`] = renderInputElement(variable[key]);
494
494
  }
495
495
  });
496
496
  });
package/dist/index.mjs CHANGED
@@ -430,20 +430,20 @@ var AddMoreTable = (props) => {
430
430
  }
431
431
  };
432
432
  const dataSource = rows.map((eachRow, rowIndex) => {
433
- let rowData = {
433
+ const rowData = {
434
434
  key: eachRow.id,
435
435
  "#": rowIndex + 1,
436
- Medicine: renderInputElement({
436
+ "Medicine": renderInputElement({
437
437
  element: eachRow.element,
438
438
  label: eachRow.label
439
439
  })
440
440
  };
441
- eachRow.variable_data.forEach((subRow, subRowIndex) => {
442
- Object.entries(subRow).forEach(([key, value]) => {
441
+ eachRow.variable_data.map((variable, subIndex) => {
442
+ Object.keys(variable).forEach((key) => {
443
443
  if (key === "SubRows") {
444
- rowData[`${key}${subRowIndex}`] = /* @__PURE__ */ React12.createElement("div", { key: subRowIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsDelete(rowIndex, subRowIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subRowIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
444
+ rowData[`${key}${subIndex}`] = /* @__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)));
445
445
  } else {
446
- rowData[`${key}${subRowIndex}`] = renderInputElement(value);
446
+ rowData[`${key}${subIndex}`] = renderInputElement(variable[key]);
447
447
  }
448
448
  });
449
449
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.12-Beta44",
3
+ "version": "0.0.12-Beta45",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",