@apexcura/ui-components 0.0.11-Beta95 → 0.0.11-Beta98
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -23
- package/dist/index.mjs +12 -23
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -195,7 +195,7 @@ var RadioElement = (props) => {
|
|
|
195
195
|
props.onChange(selectedOptions);
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
return /* @__PURE__ */ import_react6.default.createElement(import_antd6.Radio.Group, {
|
|
198
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_antd6.Radio.Group, { options: props.options, onChange: handleChange });
|
|
199
199
|
};
|
|
200
200
|
|
|
201
201
|
// src/Components/Checkbox.tsx
|
|
@@ -369,7 +369,9 @@ var AddMoreTable = (props) => {
|
|
|
369
369
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
370
370
|
let newRow = {
|
|
371
371
|
id: newId,
|
|
372
|
-
|
|
372
|
+
label: "Medicine",
|
|
373
|
+
name: "Medicine",
|
|
374
|
+
type: "text",
|
|
373
375
|
variable_data: [
|
|
374
376
|
{
|
|
375
377
|
id: 1,
|
|
@@ -442,41 +444,28 @@ var AddMoreTable = (props) => {
|
|
|
442
444
|
}
|
|
443
445
|
};
|
|
444
446
|
const dataSource = rows.map((eachRow, rowIndex) => {
|
|
445
|
-
const
|
|
447
|
+
const rowData = {
|
|
446
448
|
key: eachRow.id,
|
|
447
|
-
"#": rowIndex + 1
|
|
448
|
-
"Medicine": renderInputElement(eachRow.Medicine)
|
|
449
|
+
"#": rowIndex + 1
|
|
449
450
|
};
|
|
450
|
-
eachRow.variable_data.
|
|
451
|
+
rowData["Medicine"] = renderInputElement(eachRow.variable_data[0].Medicine);
|
|
452
|
+
eachRow.variable_data.map((variable, subIndex) => {
|
|
451
453
|
Object.keys(variable).forEach((key) => {
|
|
452
454
|
if (key === "SubRows") {
|
|
453
|
-
|
|
455
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, 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(rowIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
454
456
|
} else {
|
|
455
|
-
|
|
457
|
+
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
456
458
|
}
|
|
457
459
|
});
|
|
458
460
|
});
|
|
459
|
-
|
|
460
|
-
return
|
|
461
|
+
rowData.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)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
462
|
+
return rowData;
|
|
461
463
|
});
|
|
462
464
|
const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
|
|
463
465
|
title: eachHeadEl.label,
|
|
464
466
|
dataIndex: eachHeadEl.name,
|
|
465
467
|
key: eachHeadEl.id
|
|
466
468
|
})) : [];
|
|
467
|
-
rows.forEach((eachRow) => {
|
|
468
|
-
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
469
|
-
Object.keys(variable).forEach((key) => {
|
|
470
|
-
if (!columns.some((col) => col.dataIndex === `${key}_${subIndex}`)) {
|
|
471
|
-
columns.push({
|
|
472
|
-
title: `${key}`,
|
|
473
|
-
dataIndex: `${key}_${subIndex}`,
|
|
474
|
-
key: `${key}_${subIndex}`
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
});
|
|
479
|
-
});
|
|
480
469
|
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
481
470
|
columns.push({
|
|
482
471
|
title: "Actions",
|
package/dist/index.mjs
CHANGED
|
@@ -148,7 +148,7 @@ var RadioElement = (props) => {
|
|
|
148
148
|
props.onChange(selectedOptions);
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
return /* @__PURE__ */ React6.createElement(Radio.Group, {
|
|
151
|
+
return /* @__PURE__ */ React6.createElement(Radio.Group, { options: props.options, onChange: handleChange });
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
// src/Components/Checkbox.tsx
|
|
@@ -322,7 +322,9 @@ var AddMoreTable = (props) => {
|
|
|
322
322
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
323
323
|
let newRow = {
|
|
324
324
|
id: newId,
|
|
325
|
-
|
|
325
|
+
label: "Medicine",
|
|
326
|
+
name: "Medicine",
|
|
327
|
+
type: "text",
|
|
326
328
|
variable_data: [
|
|
327
329
|
{
|
|
328
330
|
id: 1,
|
|
@@ -395,41 +397,28 @@ var AddMoreTable = (props) => {
|
|
|
395
397
|
}
|
|
396
398
|
};
|
|
397
399
|
const dataSource = rows.map((eachRow, rowIndex) => {
|
|
398
|
-
const
|
|
400
|
+
const rowData = {
|
|
399
401
|
key: eachRow.id,
|
|
400
|
-
"#": rowIndex + 1
|
|
401
|
-
"Medicine": renderInputElement(eachRow.Medicine)
|
|
402
|
+
"#": rowIndex + 1
|
|
402
403
|
};
|
|
403
|
-
eachRow.variable_data.
|
|
404
|
+
rowData["Medicine"] = renderInputElement(eachRow.variable_data[0].Medicine);
|
|
405
|
+
eachRow.variable_data.map((variable, subIndex) => {
|
|
404
406
|
Object.keys(variable).forEach((key) => {
|
|
405
407
|
if (key === "SubRows") {
|
|
406
|
-
|
|
408
|
+
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
407
409
|
} else {
|
|
408
|
-
|
|
410
|
+
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
409
411
|
}
|
|
410
412
|
});
|
|
411
413
|
});
|
|
412
|
-
|
|
413
|
-
return
|
|
414
|
+
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(Button3, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ React12.createElement(Button3, { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
415
|
+
return rowData;
|
|
414
416
|
});
|
|
415
417
|
const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
|
|
416
418
|
title: eachHeadEl.label,
|
|
417
419
|
dataIndex: eachHeadEl.name,
|
|
418
420
|
key: eachHeadEl.id
|
|
419
421
|
})) : [];
|
|
420
|
-
rows.forEach((eachRow) => {
|
|
421
|
-
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
422
|
-
Object.keys(variable).forEach((key) => {
|
|
423
|
-
if (!columns.some((col) => col.dataIndex === `${key}_${subIndex}`)) {
|
|
424
|
-
columns.push({
|
|
425
|
-
title: `${key}`,
|
|
426
|
-
dataIndex: `${key}_${subIndex}`,
|
|
427
|
-
key: `${key}_${subIndex}`
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
});
|
|
432
|
-
});
|
|
433
422
|
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
434
423
|
columns.push({
|
|
435
424
|
title: "Actions",
|