@apexcura/ui-components 0.0.11-Beta15 → 0.0.11-Beta17

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
@@ -408,24 +408,21 @@ var AddMoreTable = (props) => {
408
408
  if (eachRow.element && eachRow.label) {
409
409
  rowElements[eachRow.label] = renderInputElement(eachRow);
410
410
  }
411
- const variableData = eachRow.variable_data && Array.isArray(eachRow.variable_data) ? eachRow.variable_data.reduce((acc, curr) => {
412
- for (let i = 0; i < curr.length; i++) {
413
- Object.keys(curr[i].forEach((key) => {
414
- if (curr[i][key] && curr[i][key].element) {
415
- rowElements[eachRow.label] = renderInputElement(curr[i][key] && curr[i][key].element);
416
- console.log(curr[i][key] && curr[i][key].element);
411
+ if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
412
+ eachRow.variable_data.forEach((variable) => {
413
+ Object.entries(variable).forEach(([key, value]) => {
414
+ if (value && value.element && value.label) {
415
+ rowElements[value.label] = renderInputElement(value);
417
416
  }
418
- }));
419
- }
420
- return acc;
421
- }, {}) : {};
417
+ });
418
+ });
419
+ }
422
420
  console.log("-----------");
423
421
  return {
424
422
  key: index.toString(),
425
423
  "#": index + 1,
426
424
  ...eachRow,
427
425
  ...rowElements,
428
- ...variableData,
429
426
  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
427
  };
431
428
  });
package/dist/index.mjs CHANGED
@@ -361,24 +361,21 @@ var AddMoreTable = (props) => {
361
361
  if (eachRow.element && eachRow.label) {
362
362
  rowElements[eachRow.label] = renderInputElement(eachRow);
363
363
  }
364
- const variableData = eachRow.variable_data && Array.isArray(eachRow.variable_data) ? eachRow.variable_data.reduce((acc, curr) => {
365
- for (let i = 0; i < curr.length; i++) {
366
- Object.keys(curr[i].forEach((key) => {
367
- if (curr[i][key] && curr[i][key].element) {
368
- rowElements[eachRow.label] = renderInputElement(curr[i][key] && curr[i][key].element);
369
- console.log(curr[i][key] && curr[i][key].element);
364
+ if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
365
+ eachRow.variable_data.forEach((variable) => {
366
+ Object.entries(variable).forEach(([key, value]) => {
367
+ if (value && value.element && value.label) {
368
+ rowElements[value.label] = renderInputElement(value);
370
369
  }
371
- }));
372
- }
373
- return acc;
374
- }, {}) : {};
370
+ });
371
+ });
372
+ }
375
373
  console.log("-----------");
376
374
  return {
377
375
  key: index.toString(),
378
376
  "#": index + 1,
379
377
  ...eachRow,
380
378
  ...rowElements,
381
- ...variableData,
382
379
  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
380
  };
384
381
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta15",
3
+ "version": "0.0.11-Beta17",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",