@apexcura/ui-components 0.0.11-Beta8 → 0.0.12-Beta0

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 CHANGED
@@ -22,6 +22,7 @@ type ElementType = {
22
22
  id?: number;
23
23
  thead?: any[];
24
24
  tbody?: any[];
25
+ variable_data?: any[];
25
26
  };
26
27
 
27
28
  interface ElementExecuterProps$3 extends ElementType {
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ type ElementType = {
22
22
  id?: number;
23
23
  thead?: any[];
24
24
  tbody?: any[];
25
+ variable_data?: any[];
25
26
  };
26
27
 
27
28
  interface ElementExecuterProps$3 extends ElementType {
package/dist/index.js CHANGED
@@ -364,6 +364,7 @@ var import_antd11 = require("antd");
364
364
  var AddMoreTable = (props) => {
365
365
  const { thead, tbody } = props;
366
366
  const [tableData, setTableData] = (0, import_react13.useState)({});
367
+ console.log("working");
367
368
  const onHandleChange = (name, value) => {
368
369
  setTableData((prev) => ({ ...prev, [name]: value }));
369
370
  console.log(tableData);
@@ -374,7 +375,8 @@ var AddMoreTable = (props) => {
374
375
  key: eachHeadEl.id
375
376
  })) : [];
376
377
  const renderInputElement = (element) => {
377
- const { type, label } = element;
378
+ const { element: type, label } = element;
379
+ console.log("type....", type);
378
380
  if (type === "single-select") {
379
381
  return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value) => onHandleChange(label, value) });
380
382
  } else if (type === "textarea") {
@@ -385,7 +387,9 @@ var AddMoreTable = (props) => {
385
387
  };
386
388
  const dataSource = tbody && tbody.length > 0 ? tbody.map((eachRow, index) => {
387
389
  const variableData = eachRow.variable_data.reduce((acc, curr) => {
390
+ console.log("curr", curr);
388
391
  acc[curr.label] = renderInputElement(curr);
392
+ console.log("....acc", acc);
389
393
  return acc;
390
394
  }, {});
391
395
  return {
package/dist/index.mjs CHANGED
@@ -317,6 +317,7 @@ import { Table } from "antd";
317
317
  var AddMoreTable = (props) => {
318
318
  const { thead, tbody } = props;
319
319
  const [tableData, setTableData] = useState3({});
320
+ console.log("working");
320
321
  const onHandleChange = (name, value) => {
321
322
  setTableData((prev) => ({ ...prev, [name]: value }));
322
323
  console.log(tableData);
@@ -327,7 +328,8 @@ var AddMoreTable = (props) => {
327
328
  key: eachHeadEl.id
328
329
  })) : [];
329
330
  const renderInputElement = (element) => {
330
- const { type, label } = element;
331
+ const { element: type, label } = element;
332
+ console.log("type....", type);
331
333
  if (type === "single-select") {
332
334
  return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value) => onHandleChange(label, value) });
333
335
  } else if (type === "textarea") {
@@ -338,7 +340,9 @@ var AddMoreTable = (props) => {
338
340
  };
339
341
  const dataSource = tbody && tbody.length > 0 ? tbody.map((eachRow, index) => {
340
342
  const variableData = eachRow.variable_data.reduce((acc, curr) => {
343
+ console.log("curr", curr);
341
344
  acc[curr.label] = renderInputElement(curr);
345
+ console.log("....acc", acc);
342
346
  return acc;
343
347
  }, {});
344
348
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta8",
3
+ "version": "0.0.12-Beta0",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",