@apexcura/ui-components 0.0.11-Beta90 → 0.0.11-Beta91
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 +4 -12
- package/dist/index.mjs +4 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -429,30 +429,22 @@ var AddMoreTable = (props) => {
|
|
|
429
429
|
console.log(rows);
|
|
430
430
|
}, [rows]);
|
|
431
431
|
const renderInputElement = (element, value) => {
|
|
432
|
+
if (!element)
|
|
433
|
+
return null;
|
|
432
434
|
const { element: type, label } = element;
|
|
433
435
|
if (type === "single-select") {
|
|
434
|
-
|
|
435
|
-
throw new Error("Function not implemented.");
|
|
436
|
-
};
|
|
437
|
-
var onHandleChange = onHandleChange2;
|
|
438
|
-
return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value2) => onHandleChange2(label, value2) });
|
|
436
|
+
return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2) });
|
|
439
437
|
} else if (type === "textarea") {
|
|
440
|
-
|
|
441
|
-
throw new Error("Function not implemented.");
|
|
442
|
-
};
|
|
443
|
-
var onHandleChange = onHandleChange2;
|
|
444
|
-
return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (value2) => onHandleChange2(label, value2) });
|
|
438
|
+
return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2) });
|
|
445
439
|
} else {
|
|
446
440
|
return null;
|
|
447
441
|
}
|
|
448
442
|
};
|
|
449
443
|
const dataSource = rows.map((eachRow, index) => {
|
|
450
|
-
console.log(...eachRow);
|
|
451
444
|
const rowData = {
|
|
452
445
|
key: eachRow.id,
|
|
453
446
|
"#": index + 1,
|
|
454
447
|
...eachRow.variable_data.reduce((acc, variable, subIndex) => {
|
|
455
|
-
console.log("variable", variable);
|
|
456
448
|
Object.keys(variable).forEach((key) => {
|
|
457
449
|
if (key === "SubRows") {
|
|
458
450
|
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)));
|
package/dist/index.mjs
CHANGED
|
@@ -382,30 +382,22 @@ var AddMoreTable = (props) => {
|
|
|
382
382
|
console.log(rows);
|
|
383
383
|
}, [rows]);
|
|
384
384
|
const renderInputElement = (element, value) => {
|
|
385
|
+
if (!element)
|
|
386
|
+
return null;
|
|
385
387
|
const { element: type, label } = element;
|
|
386
388
|
if (type === "single-select") {
|
|
387
|
-
|
|
388
|
-
throw new Error("Function not implemented.");
|
|
389
|
-
};
|
|
390
|
-
var onHandleChange = onHandleChange2;
|
|
391
|
-
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => onHandleChange2(label, value2) });
|
|
389
|
+
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2) });
|
|
392
390
|
} else if (type === "textarea") {
|
|
393
|
-
|
|
394
|
-
throw new Error("Function not implemented.");
|
|
395
|
-
};
|
|
396
|
-
var onHandleChange = onHandleChange2;
|
|
397
|
-
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => onHandleChange2(label, value2) });
|
|
391
|
+
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2) });
|
|
398
392
|
} else {
|
|
399
393
|
return null;
|
|
400
394
|
}
|
|
401
395
|
};
|
|
402
396
|
const dataSource = rows.map((eachRow, index) => {
|
|
403
|
-
console.log(...eachRow);
|
|
404
397
|
const rowData = {
|
|
405
398
|
key: eachRow.id,
|
|
406
399
|
"#": index + 1,
|
|
407
400
|
...eachRow.variable_data.reduce((acc, variable, subIndex) => {
|
|
408
|
-
console.log("variable", variable);
|
|
409
401
|
Object.keys(variable).forEach((key) => {
|
|
410
402
|
if (key === "SubRows") {
|
|
411
403
|
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)));
|