@apexcura/ui-components 0.0.11-Beta53 → 0.0.11-Beta55
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 +17 -15
- package/dist/index.mjs +17 -15
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -455,36 +455,38 @@ var AddMoreTable = (props) => {
|
|
|
455
455
|
};
|
|
456
456
|
const dataSource = rows.flatMap((eachRow, index) => {
|
|
457
457
|
const rowData = [];
|
|
458
|
+
console.log("rowData-------", rowData);
|
|
458
459
|
const mainRow = {
|
|
459
460
|
key: index.toString(),
|
|
460
461
|
"#": index + 1,
|
|
461
462
|
...eachRow,
|
|
462
463
|
actions: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, 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)))
|
|
463
464
|
};
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
const medicineInputElement = {
|
|
467
|
-
[eachRow.label]: renderInputElement({
|
|
468
|
-
element: eachRow.element,
|
|
469
|
-
label: eachRow.label
|
|
470
|
-
})
|
|
471
|
-
};
|
|
472
|
-
rowElements.push(medicineInputElement);
|
|
465
|
+
console.log("mainRow--------", mainRow);
|
|
466
|
+
const subRowElements = [];
|
|
473
467
|
if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
|
|
474
468
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
475
|
-
const
|
|
469
|
+
const subRowElement = {};
|
|
476
470
|
Object.entries(variable).forEach(([key, value]) => {
|
|
477
471
|
if (key === "icons" && value) {
|
|
478
|
-
|
|
472
|
+
subRowElement["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)));
|
|
479
473
|
} else if (value && value.element && value.label) {
|
|
480
|
-
|
|
474
|
+
subRowElement[value.label] = renderInputElement(value);
|
|
481
475
|
}
|
|
482
476
|
});
|
|
483
|
-
|
|
477
|
+
console.log("subRowElements", subRowElements);
|
|
478
|
+
subRowElements.push(subRowElement);
|
|
484
479
|
});
|
|
485
480
|
}
|
|
486
|
-
rowData.push(
|
|
487
|
-
|
|
481
|
+
rowData.push({
|
|
482
|
+
...mainRow,
|
|
483
|
+
"Medicine": renderInputElement({
|
|
484
|
+
element: eachRow.element,
|
|
485
|
+
label: eachRow.label
|
|
486
|
+
}),
|
|
487
|
+
"sub rows": subRowElements
|
|
488
|
+
});
|
|
489
|
+
console.log("rowData++++++++++");
|
|
488
490
|
return rowData;
|
|
489
491
|
});
|
|
490
492
|
if (!columns.some((col) => isColumnType(col) && col.dataIndex === "actions")) {
|
package/dist/index.mjs
CHANGED
|
@@ -408,36 +408,38 @@ var AddMoreTable = (props) => {
|
|
|
408
408
|
};
|
|
409
409
|
const dataSource = rows.flatMap((eachRow, index) => {
|
|
410
410
|
const rowData = [];
|
|
411
|
+
console.log("rowData-------", rowData);
|
|
411
412
|
const mainRow = {
|
|
412
413
|
key: index.toString(),
|
|
413
414
|
"#": index + 1,
|
|
414
415
|
...eachRow,
|
|
415
416
|
actions: /* @__PURE__ */ React12.createElement(React12.Fragment, 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)))
|
|
416
417
|
};
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
const medicineInputElement = {
|
|
420
|
-
[eachRow.label]: renderInputElement({
|
|
421
|
-
element: eachRow.element,
|
|
422
|
-
label: eachRow.label
|
|
423
|
-
})
|
|
424
|
-
};
|
|
425
|
-
rowElements.push(medicineInputElement);
|
|
418
|
+
console.log("mainRow--------", mainRow);
|
|
419
|
+
const subRowElements = [];
|
|
426
420
|
if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
|
|
427
421
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
428
|
-
const
|
|
422
|
+
const subRowElement = {};
|
|
429
423
|
Object.entries(variable).forEach(([key, value]) => {
|
|
430
424
|
if (key === "icons" && value) {
|
|
431
|
-
|
|
425
|
+
subRowElement["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)));
|
|
432
426
|
} else if (value && value.element && value.label) {
|
|
433
|
-
|
|
427
|
+
subRowElement[value.label] = renderInputElement(value);
|
|
434
428
|
}
|
|
435
429
|
});
|
|
436
|
-
|
|
430
|
+
console.log("subRowElements", subRowElements);
|
|
431
|
+
subRowElements.push(subRowElement);
|
|
437
432
|
});
|
|
438
433
|
}
|
|
439
|
-
rowData.push(
|
|
440
|
-
|
|
434
|
+
rowData.push({
|
|
435
|
+
...mainRow,
|
|
436
|
+
"Medicine": renderInputElement({
|
|
437
|
+
element: eachRow.element,
|
|
438
|
+
label: eachRow.label
|
|
439
|
+
}),
|
|
440
|
+
"sub rows": subRowElements
|
|
441
|
+
});
|
|
442
|
+
console.log("rowData++++++++++");
|
|
441
443
|
return rowData;
|
|
442
444
|
});
|
|
443
445
|
if (!columns.some((col) => isColumnType(col) && col.dataIndex === "actions")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/ui-components",
|
|
3
|
-
"version": "0.0.11-
|
|
3
|
+
"version": "0.0.11-Beta55",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
+
"@apexcura/ui-components": "^0.0.11-Beta53",
|
|
51
52
|
"@tinymce/tinymce-react": "^5.0.1"
|
|
52
53
|
}
|
|
53
54
|
}
|