@apexcura/ui-components 0.0.11-Beta16 → 0.0.11-Beta18
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 +11 -12
- package/dist/index.mjs +11 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -403,29 +403,28 @@ var AddMoreTable = (props) => {
|
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
405
|
const dataSource = rows.map((eachRow, index) => {
|
|
406
|
-
console.log("eachRow=======", eachRow);
|
|
407
406
|
const rowElements = {};
|
|
408
407
|
if (eachRow.element && eachRow.label) {
|
|
409
408
|
rowElements[eachRow.label] = renderInputElement(eachRow);
|
|
410
409
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
Object.
|
|
414
|
-
if (
|
|
415
|
-
rowElements[
|
|
416
|
-
console.log("++++++++++", curr[i][key] && curr[i][key]);
|
|
410
|
+
if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
|
|
411
|
+
eachRow.variable_data.forEach((variable) => {
|
|
412
|
+
Object.entries(variable).forEach(([key, value]) => {
|
|
413
|
+
if (value && value.element && value.label) {
|
|
414
|
+
rowElements[value.label] = renderInputElement(value);
|
|
417
415
|
}
|
|
418
|
-
})
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
if (eachRow.variable_data.length > 0) {
|
|
419
|
+
const addSubRow = /* @__PURE__ */ import_react13.default.createElement("button", null, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null));
|
|
420
|
+
rowElements[""] = addSubRow;
|
|
419
421
|
}
|
|
420
|
-
|
|
421
|
-
}, {}) : {};
|
|
422
|
-
console.log("-----------");
|
|
422
|
+
}
|
|
423
423
|
return {
|
|
424
424
|
key: index.toString(),
|
|
425
425
|
"#": index + 1,
|
|
426
426
|
...eachRow,
|
|
427
427
|
...rowElements,
|
|
428
|
-
...variableData,
|
|
429
428
|
actions: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("button", { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement("button", { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)))
|
|
430
429
|
};
|
|
431
430
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -356,29 +356,28 @@ var AddMoreTable = (props) => {
|
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
const dataSource = rows.map((eachRow, index) => {
|
|
359
|
-
console.log("eachRow=======", eachRow);
|
|
360
359
|
const rowElements = {};
|
|
361
360
|
if (eachRow.element && eachRow.label) {
|
|
362
361
|
rowElements[eachRow.label] = renderInputElement(eachRow);
|
|
363
362
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
Object.
|
|
367
|
-
if (
|
|
368
|
-
rowElements[
|
|
369
|
-
console.log("++++++++++", curr[i][key] && curr[i][key]);
|
|
363
|
+
if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
|
|
364
|
+
eachRow.variable_data.forEach((variable) => {
|
|
365
|
+
Object.entries(variable).forEach(([key, value]) => {
|
|
366
|
+
if (value && value.element && value.label) {
|
|
367
|
+
rowElements[value.label] = renderInputElement(value);
|
|
370
368
|
}
|
|
371
|
-
})
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
if (eachRow.variable_data.length > 0) {
|
|
372
|
+
const addSubRow = /* @__PURE__ */ React12.createElement("button", null, /* @__PURE__ */ React12.createElement(PlusOutlined, null));
|
|
373
|
+
rowElements[""] = addSubRow;
|
|
372
374
|
}
|
|
373
|
-
|
|
374
|
-
}, {}) : {};
|
|
375
|
-
console.log("-----------");
|
|
375
|
+
}
|
|
376
376
|
return {
|
|
377
377
|
key: index.toString(),
|
|
378
378
|
"#": index + 1,
|
|
379
379
|
...eachRow,
|
|
380
380
|
...rowElements,
|
|
381
|
-
...variableData,
|
|
382
381
|
actions: /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("button", { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ React12.createElement("button", { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)))
|
|
383
382
|
};
|
|
384
383
|
});
|