@apexcura/ui-components 0.0.11-Beta32 → 0.0.11-Beta33

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 CHANGED
@@ -393,7 +393,7 @@ var AddMoreTable = (props) => {
393
393
  dataIndex: eachHeadEl.name,
394
394
  key: eachHeadEl.id
395
395
  })) : [];
396
- const renderInputElement = (element, id) => {
396
+ const renderInputElement = (element) => {
397
397
  const { element: type, label } = element;
398
398
  if (type === "single-select") {
399
399
  return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value) => onHandleChange(label, value) });
@@ -409,10 +409,12 @@ var AddMoreTable = (props) => {
409
409
  rowElements[eachRow.label] = renderInputElement(eachRow);
410
410
  }
411
411
  if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
412
- eachRow.variable_data.forEach((variable, subIndex) => {
412
+ eachRow.variable_data.forEach((variable) => {
413
413
  Object.entries(variable).forEach(([key, value]) => {
414
- if (value && value.element && value.label) {
415
- rowElements[value.label] = /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", alignItems: "center" } }, renderInputElement(value, eachRow.id), /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement("button", { style: { marginLeft: 8 } }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react13.default.createElement("button", { style: { marginLeft: 8 } }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null))));
414
+ if (key === "icons" && value) {
415
+ rowElements["sub rows"] = /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("button", null, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement("button", null, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
416
+ } else if (value && value.element && value.label) {
417
+ rowElements[value.label] = renderInputElement(value);
416
418
  }
417
419
  });
418
420
  });
package/dist/index.mjs CHANGED
@@ -346,7 +346,7 @@ var AddMoreTable = (props) => {
346
346
  dataIndex: eachHeadEl.name,
347
347
  key: eachHeadEl.id
348
348
  })) : [];
349
- const renderInputElement = (element, id) => {
349
+ const renderInputElement = (element) => {
350
350
  const { element: type, label } = element;
351
351
  if (type === "single-select") {
352
352
  return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value) => onHandleChange(label, value) });
@@ -362,10 +362,12 @@ var AddMoreTable = (props) => {
362
362
  rowElements[eachRow.label] = renderInputElement(eachRow);
363
363
  }
364
364
  if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
365
- eachRow.variable_data.forEach((variable, subIndex) => {
365
+ eachRow.variable_data.forEach((variable) => {
366
366
  Object.entries(variable).forEach(([key, value]) => {
367
- if (value && value.element && value.label) {
368
- rowElements[value.label] = /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", alignItems: "center" } }, renderInputElement(value, eachRow.id), /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("button", { style: { marginLeft: 8 } }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement("button", { style: { marginLeft: 8 } }, /* @__PURE__ */ React12.createElement(PlusOutlined, null))));
367
+ if (key === "icons" && value) {
368
+ rowElements["sub rows"] = /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("button", null, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ React12.createElement("button", null, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
369
+ } else if (value && value.element && value.label) {
370
+ rowElements[value.label] = renderInputElement(value);
369
371
  }
370
372
  });
371
373
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta32",
3
+ "version": "0.0.11-Beta33",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",