@apexcura/ui-components 0.0.11-Beta87 → 0.0.11-Beta88
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 +5 -6
- package/dist/index.mjs +5 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -402,9 +402,10 @@ var AddMoreTable = (props) => {
|
|
|
402
402
|
Instructions: { label: "Instructions", element: "textarea", type: "text" },
|
|
403
403
|
SubRows: { delete: "delete", add: "plus" }
|
|
404
404
|
};
|
|
405
|
+
const updatedVariableData = [...row.variable_data, newSubRow];
|
|
405
406
|
return {
|
|
406
407
|
...row,
|
|
407
|
-
variable_data:
|
|
408
|
+
variable_data: updatedVariableData
|
|
408
409
|
};
|
|
409
410
|
}
|
|
410
411
|
return row;
|
|
@@ -453,17 +454,15 @@ var AddMoreTable = (props) => {
|
|
|
453
454
|
...eachRow.variable_data.reduce((acc, variable, subIndex) => {
|
|
454
455
|
Object.keys(variable).forEach((key) => {
|
|
455
456
|
if (key === "SubRows") {
|
|
456
|
-
|
|
457
|
+
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)));
|
|
458
|
+
} else {
|
|
459
|
+
acc[`${key}`] = renderInputElement(variable[key]);
|
|
457
460
|
}
|
|
458
|
-
acc[`${key}_${subIndex}`] = renderInputElement(variable[key]);
|
|
459
461
|
});
|
|
460
462
|
return acc;
|
|
461
463
|
}, {}),
|
|
462
464
|
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)))
|
|
463
465
|
};
|
|
464
|
-
if (eachRow.variable_data.length > 1) {
|
|
465
|
-
rowData[`SubRows`] = /* @__PURE__ */ import_react13.default.createElement("div", null, eachRow.variable_data.map((variable, subIndex) => /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsDelete(index, subIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)))), /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsAdd(index) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
466
|
-
}
|
|
467
466
|
return rowData;
|
|
468
467
|
});
|
|
469
468
|
const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
|
package/dist/index.mjs
CHANGED
|
@@ -355,9 +355,10 @@ var AddMoreTable = (props) => {
|
|
|
355
355
|
Instructions: { label: "Instructions", element: "textarea", type: "text" },
|
|
356
356
|
SubRows: { delete: "delete", add: "plus" }
|
|
357
357
|
};
|
|
358
|
+
const updatedVariableData = [...row.variable_data, newSubRow];
|
|
358
359
|
return {
|
|
359
360
|
...row,
|
|
360
|
-
variable_data:
|
|
361
|
+
variable_data: updatedVariableData
|
|
361
362
|
};
|
|
362
363
|
}
|
|
363
364
|
return row;
|
|
@@ -406,17 +407,15 @@ var AddMoreTable = (props) => {
|
|
|
406
407
|
...eachRow.variable_data.reduce((acc, variable, subIndex) => {
|
|
407
408
|
Object.keys(variable).forEach((key) => {
|
|
408
409
|
if (key === "SubRows") {
|
|
409
|
-
|
|
410
|
+
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)));
|
|
411
|
+
} else {
|
|
412
|
+
acc[`${key}`] = renderInputElement(variable[key]);
|
|
410
413
|
}
|
|
411
|
-
acc[`${key}_${subIndex}`] = renderInputElement(variable[key]);
|
|
412
414
|
});
|
|
413
415
|
return acc;
|
|
414
416
|
}, {}),
|
|
415
417
|
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)))
|
|
416
418
|
};
|
|
417
|
-
if (eachRow.variable_data.length > 1) {
|
|
418
|
-
rowData[`SubRows`] = /* @__PURE__ */ React12.createElement("div", null, eachRow.variable_data.map((variable, subIndex) => /* @__PURE__ */ React12.createElement("div", { key: subIndex }, /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsDelete(index, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)))), /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsAdd(index) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
419
|
-
}
|
|
420
419
|
return rowData;
|
|
421
420
|
});
|
|
422
421
|
const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
|