@apexcura/ui-components 0.0.11-Beta27 → 0.0.11-Beta29

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
@@ -380,18 +380,7 @@ var AddMoreTable = (props) => {
380
380
  ...lastRow,
381
381
  id: newId
382
382
  };
383
- if (newRow.variable_data && newRow.variable_data.length > 0) {
384
- const updatedVariableData = newRow.variable_data.map((item, index) => {
385
- const { icons, ...rest } = item;
386
- return {
387
- ...rest,
388
- icons: { delete: "", plus: index === newRow.variable_data.length - 1 ? "" : void 0 }
389
- };
390
- });
391
- newRow.variable_data = updatedVariableData;
392
- }
393
383
  setRows((prevData) => [...prevData, newRow]);
394
- console.log("rows----------", rows);
395
384
  };
396
385
  const onHandleDelete = (index) => {
397
386
  if (rows.length > 1) {
@@ -420,16 +409,14 @@ var AddMoreTable = (props) => {
420
409
  rowElements[eachRow.label] = renderInputElement(eachRow);
421
410
  }
422
411
  if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
423
- eachRow.variable_data.forEach((variable, varIndex) => {
412
+ eachRow.variable_data.forEach((variable) => {
424
413
  Object.entries(variable).forEach(([key, value]) => {
425
414
  if (value && value.element && value.label) {
426
415
  rowElements[value.label] = renderInputElement(value);
427
416
  }
428
- if (key === "icons") {
429
- console.log("-----------key", key);
430
- }
431
417
  });
432
418
  });
419
+ rowElements[""] = /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement("button", null, "delete"), eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react13.default.createElement("button", null, "Add"));
433
420
  }
434
421
  return {
435
422
  key: index.toString(),
package/dist/index.mjs CHANGED
@@ -333,18 +333,7 @@ var AddMoreTable = (props) => {
333
333
  ...lastRow,
334
334
  id: newId
335
335
  };
336
- if (newRow.variable_data && newRow.variable_data.length > 0) {
337
- const updatedVariableData = newRow.variable_data.map((item, index) => {
338
- const { icons, ...rest } = item;
339
- return {
340
- ...rest,
341
- icons: { delete: "", plus: index === newRow.variable_data.length - 1 ? "" : void 0 }
342
- };
343
- });
344
- newRow.variable_data = updatedVariableData;
345
- }
346
336
  setRows((prevData) => [...prevData, newRow]);
347
- console.log("rows----------", rows);
348
337
  };
349
338
  const onHandleDelete = (index) => {
350
339
  if (rows.length > 1) {
@@ -373,16 +362,14 @@ var AddMoreTable = (props) => {
373
362
  rowElements[eachRow.label] = renderInputElement(eachRow);
374
363
  }
375
364
  if (eachRow.variable_data && Array.isArray(eachRow.variable_data)) {
376
- eachRow.variable_data.forEach((variable, varIndex) => {
365
+ eachRow.variable_data.forEach((variable) => {
377
366
  Object.entries(variable).forEach(([key, value]) => {
378
367
  if (value && value.element && value.label) {
379
368
  rowElements[value.label] = renderInputElement(value);
380
369
  }
381
- if (key === "icons") {
382
- console.log("-----------key", key);
383
- }
384
370
  });
385
371
  });
372
+ rowElements[""] = /* @__PURE__ */ React12.createElement(React12.Fragment, null, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement("button", null, "delete"), eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement("button", null, "Add"));
386
373
  }
387
374
  return {
388
375
  key: index.toString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta27",
3
+ "version": "0.0.11-Beta29",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",