@apexcura/ui-components 0.0.11-Beta66 → 0.0.11-Beta67
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 +13 -12
- package/dist/index.mjs +13 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -446,26 +446,27 @@ var AddMoreTable = (props) => {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
const dataSource = rows.map((eachRow, index) => {
|
|
449
|
+
console.log("eachrow---------", eachRow);
|
|
449
450
|
const rowData = {
|
|
450
451
|
key: eachRow.id.toString(),
|
|
451
452
|
"#": index + 1,
|
|
452
|
-
Medicine: renderInputElement({
|
|
453
|
+
"Medicine": renderInputElement({
|
|
453
454
|
element: eachRow.element,
|
|
454
455
|
label: eachRow.label
|
|
455
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
|
+
})),
|
|
456
467
|
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)))
|
|
457
468
|
};
|
|
458
|
-
|
|
459
|
-
key: `${eachRow.id}-${subIndex}`,
|
|
460
|
-
...Object.fromEntries(Object.entries(variable).map(([key, value]) => {
|
|
461
|
-
if (key === "icons") {
|
|
462
|
-
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)))];
|
|
463
|
-
} else {
|
|
464
|
-
return [key, renderInputElement(value)];
|
|
465
|
-
}
|
|
466
|
-
}))
|
|
467
|
-
}));
|
|
468
|
-
return [rowData, ...subRows];
|
|
469
|
+
return [rowData];
|
|
469
470
|
}).flat();
|
|
470
471
|
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
471
472
|
columns.push({
|
package/dist/index.mjs
CHANGED
|
@@ -399,26 +399,27 @@ var AddMoreTable = (props) => {
|
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
const dataSource = rows.map((eachRow, index) => {
|
|
402
|
+
console.log("eachrow---------", eachRow);
|
|
402
403
|
const rowData = {
|
|
403
404
|
key: eachRow.id.toString(),
|
|
404
405
|
"#": index + 1,
|
|
405
|
-
Medicine: renderInputElement({
|
|
406
|
+
"Medicine": renderInputElement({
|
|
406
407
|
element: eachRow.element,
|
|
407
408
|
label: eachRow.label
|
|
408
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
|
+
})),
|
|
409
420
|
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)))
|
|
410
421
|
};
|
|
411
|
-
|
|
412
|
-
key: `${eachRow.id}-${subIndex}`,
|
|
413
|
-
...Object.fromEntries(Object.entries(variable).map(([key, value]) => {
|
|
414
|
-
if (key === "icons") {
|
|
415
|
-
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)))];
|
|
416
|
-
} else {
|
|
417
|
-
return [key, renderInputElement(value)];
|
|
418
|
-
}
|
|
419
|
-
}))
|
|
420
|
-
}));
|
|
421
|
-
return [rowData, ...subRows];
|
|
422
|
+
return [rowData];
|
|
422
423
|
}).flat();
|
|
423
424
|
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
424
425
|
columns.push({
|