@apexcura/ui-components 0.0.11-Beta84 → 0.0.11-Beta85
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 +22 -15
- package/dist/index.mjs +22 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -452,26 +452,17 @@ var AddMoreTable = (props) => {
|
|
|
452
452
|
const rowData = {
|
|
453
453
|
key: eachRow.id,
|
|
454
454
|
"#": index + 1,
|
|
455
|
-
|
|
455
|
+
Medicine: renderInputElement({
|
|
456
456
|
element: eachRow.element,
|
|
457
457
|
label: eachRow.label
|
|
458
458
|
}),
|
|
459
459
|
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)))
|
|
460
460
|
};
|
|
461
|
-
|
|
462
|
-
key:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
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)));
|
|
467
|
-
} else {
|
|
468
|
-
acc[`${key}`] = renderInputElement(variable[key]);
|
|
469
|
-
}
|
|
470
|
-
return acc;
|
|
471
|
-
}, {})
|
|
472
|
-
}));
|
|
473
|
-
return [rowData, ...subRowData];
|
|
474
|
-
}).flat();
|
|
461
|
+
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
462
|
+
rowData[`subRow-${subIndex}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex, style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Route)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Dose)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Frequency)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.When)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Duration)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Instructions)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { flex: 1 } }, 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
|
+
});
|
|
464
|
+
return rowData;
|
|
465
|
+
});
|
|
475
466
|
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
476
467
|
columns.push({
|
|
477
468
|
title: "Actions",
|
|
@@ -479,6 +470,22 @@ var AddMoreTable = (props) => {
|
|
|
479
470
|
key: "actions"
|
|
480
471
|
});
|
|
481
472
|
}
|
|
473
|
+
const subRowColumns = [
|
|
474
|
+
{ title: "Route", dataIndex: "Route", key: "Route" },
|
|
475
|
+
{ title: "Dose", dataIndex: "Dose", key: "Dose" },
|
|
476
|
+
{ title: "Frequency", dataIndex: "Frequency", key: "Frequency" },
|
|
477
|
+
{ title: "When", dataIndex: "When", key: "When" },
|
|
478
|
+
{ title: "Duration", dataIndex: "Duration", key: "Duration" },
|
|
479
|
+
{ title: "Instructions", dataIndex: "Instructions", key: "Instructions" },
|
|
480
|
+
{ title: "SubRows", dataIndex: "SubRows", key: "SubRows" }
|
|
481
|
+
];
|
|
482
|
+
subRowColumns.forEach((col, index) => {
|
|
483
|
+
columns.push({
|
|
484
|
+
title: col.title,
|
|
485
|
+
dataIndex: `subRow-${index}`,
|
|
486
|
+
key: `subRow-${index}`
|
|
487
|
+
});
|
|
488
|
+
});
|
|
482
489
|
return /* @__PURE__ */ import_react13.default.createElement(
|
|
483
490
|
import_antd11.Table,
|
|
484
491
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -405,26 +405,17 @@ var AddMoreTable = (props) => {
|
|
|
405
405
|
const rowData = {
|
|
406
406
|
key: eachRow.id,
|
|
407
407
|
"#": index + 1,
|
|
408
|
-
|
|
408
|
+
Medicine: renderInputElement({
|
|
409
409
|
element: eachRow.element,
|
|
410
410
|
label: eachRow.label
|
|
411
411
|
}),
|
|
412
412
|
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)))
|
|
413
413
|
};
|
|
414
|
-
|
|
415
|
-
key:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
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)));
|
|
420
|
-
} else {
|
|
421
|
-
acc[`${key}`] = renderInputElement(variable[key]);
|
|
422
|
-
}
|
|
423
|
-
return acc;
|
|
424
|
-
}, {})
|
|
425
|
-
}));
|
|
426
|
-
return [rowData, ...subRowData];
|
|
427
|
-
}).flat();
|
|
414
|
+
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
415
|
+
rowData[`subRow-${subIndex}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex, style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Route)), /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Dose)), /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Frequency)), /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.When)), /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Duration)), /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, renderInputElement(variable.Instructions)), /* @__PURE__ */ React12.createElement("div", { style: { flex: 1 } }, 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
|
+
});
|
|
417
|
+
return rowData;
|
|
418
|
+
});
|
|
428
419
|
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
429
420
|
columns.push({
|
|
430
421
|
title: "Actions",
|
|
@@ -432,6 +423,22 @@ var AddMoreTable = (props) => {
|
|
|
432
423
|
key: "actions"
|
|
433
424
|
});
|
|
434
425
|
}
|
|
426
|
+
const subRowColumns = [
|
|
427
|
+
{ title: "Route", dataIndex: "Route", key: "Route" },
|
|
428
|
+
{ title: "Dose", dataIndex: "Dose", key: "Dose" },
|
|
429
|
+
{ title: "Frequency", dataIndex: "Frequency", key: "Frequency" },
|
|
430
|
+
{ title: "When", dataIndex: "When", key: "When" },
|
|
431
|
+
{ title: "Duration", dataIndex: "Duration", key: "Duration" },
|
|
432
|
+
{ title: "Instructions", dataIndex: "Instructions", key: "Instructions" },
|
|
433
|
+
{ title: "SubRows", dataIndex: "SubRows", key: "SubRows" }
|
|
434
|
+
];
|
|
435
|
+
subRowColumns.forEach((col, index) => {
|
|
436
|
+
columns.push({
|
|
437
|
+
title: col.title,
|
|
438
|
+
dataIndex: `subRow-${index}`,
|
|
439
|
+
key: `subRow-${index}`
|
|
440
|
+
});
|
|
441
|
+
});
|
|
435
442
|
return /* @__PURE__ */ React12.createElement(
|
|
436
443
|
Table,
|
|
437
444
|
{
|