@apexcura/ui-components 0.0.11-Beta67 → 0.0.11-Beta68

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
@@ -454,19 +454,20 @@ var AddMoreTable = (props) => {
454
454
  element: eachRow.element,
455
455
  label: eachRow.label
456
456
  }),
457
- subrow: eachRow.variable_data.map((variable, subIndex) => ({
458
- key: `${eachRow.id}-${subIndex}`,
459
- ...Object.fromEntries(Object.entries(variable).map(([key, value]) => {
460
- if (key === "icons") {
461
- return ["sub rows", /* @__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)))];
462
- } else {
463
- return [key, renderInputElement(value)];
464
- }
465
- }))
466
- })),
457
+ subRows: "",
467
458
  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)))
468
459
  };
469
- return [rowData];
460
+ const subRows = eachRow.variable_data.map((variable, subIndex) => ({
461
+ key: `${eachRow.id}-${subIndex}`,
462
+ ...Object.fromEntries(Object.entries(variable).map(([key, value]) => {
463
+ if (key === "icons") {
464
+ return ["sub rows", /* @__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)))];
465
+ } else {
466
+ return [key, renderInputElement(value)];
467
+ }
468
+ }))
469
+ }));
470
+ return [rowData, ...subRows.map((subRow) => ({ ...subRow, "#": "", "Medicine": "", "actions": "" })), rowData];
470
471
  }).flat();
471
472
  if (!columns.some((col) => col.dataIndex === "actions")) {
472
473
  columns.push({
package/dist/index.mjs CHANGED
@@ -407,19 +407,20 @@ var AddMoreTable = (props) => {
407
407
  element: eachRow.element,
408
408
  label: eachRow.label
409
409
  }),
410
- subrow: eachRow.variable_data.map((variable, subIndex) => ({
411
- key: `${eachRow.id}-${subIndex}`,
412
- ...Object.fromEntries(Object.entries(variable).map(([key, value]) => {
413
- if (key === "icons") {
414
- return ["sub rows", /* @__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)))];
415
- } else {
416
- return [key, renderInputElement(value)];
417
- }
418
- }))
419
- })),
410
+ subRows: "",
420
411
  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)))
421
412
  };
422
- return [rowData];
413
+ const subRows = eachRow.variable_data.map((variable, subIndex) => ({
414
+ key: `${eachRow.id}-${subIndex}`,
415
+ ...Object.fromEntries(Object.entries(variable).map(([key, value]) => {
416
+ if (key === "icons") {
417
+ return ["sub rows", /* @__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)))];
418
+ } else {
419
+ return [key, renderInputElement(value)];
420
+ }
421
+ }))
422
+ }));
423
+ return [rowData, ...subRows.map((subRow) => ({ ...subRow, "#": "", "Medicine": "", "actions": "" })), rowData];
423
424
  }).flat();
424
425
  if (!columns.some((col) => col.dataIndex === "actions")) {
425
426
  columns.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta67",
3
+ "version": "0.0.11-Beta68",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",