@apexcura/ui-components 0.0.14-Beta167 → 0.0.14-Beta169

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
@@ -70,6 +70,7 @@ type ElementType = {
70
70
  labels?: any[];
71
71
  data?: any[];
72
72
  pagination?: boolean;
73
+ is_detail?: boolean;
73
74
  };
74
75
 
75
76
  declare const TextElement: (props: ElementType) => React$1.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -70,6 +70,7 @@ type ElementType = {
70
70
  labels?: any[];
71
71
  data?: any[];
72
72
  pagination?: boolean;
73
+ is_detail?: boolean;
73
74
  };
74
75
 
75
76
  declare const TextElement: (props: ElementType) => React$1.JSX.Element;
package/dist/index.js CHANGED
@@ -700,8 +700,6 @@ var ModelBody = (props) => {
700
700
  // src/Components/Model.tsx
701
701
  var ModelElement = (props) => {
702
702
  const { model, onCancel, selectedRecord, columns } = props;
703
- console.log("selectedRecord", selectedRecord);
704
- console.log("columns", columns);
705
703
  return /* @__PURE__ */ import_react19.default.createElement(
706
704
  import_antd13.Modal,
707
705
  {
@@ -721,10 +719,22 @@ var ModelElement = (props) => {
721
719
  margin: "-10px"
722
720
  }
723
721
  },
724
- Object.entries(selectedRecord).map(([key, value]) => {
725
- const record = columns.slice(1).filter((eachColumn) => eachColumn.key === key);
726
- console.log("value----", value);
727
- return record.length > 0 ? /* @__PURE__ */ import_react19.default.createElement("p", { style: { fontWeight: "500", padding: "10px" }, key }, /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontWeight: "200", color: "gray", paddingRight: "10px" } }, record[0].title), String(value) !== "" ? String(value) : "--") : "";
722
+ columns.map((eachColumn) => {
723
+ if (!["#"].includes(eachColumn.key) && eachColumn?.["is_detail"] !== false) {
724
+ return /* @__PURE__ */ import_react19.default.createElement("p", { style: { fontWeight: "500", padding: "10px" } }, /* @__PURE__ */ import_react19.default.createElement(
725
+ "span",
726
+ {
727
+ style: {
728
+ fontWeight: "200",
729
+ color: "gray",
730
+ paddingRight: "10px"
731
+ }
732
+ },
733
+ eachColumn.label
734
+ ), selectedRecord[eachColumn.key] !== "" ? selectedRecord[eachColumn.key] : "--");
735
+ } else {
736
+ return null;
737
+ }
728
738
  })
729
739
  )
730
740
  },
@@ -838,6 +848,16 @@ var TableElement = (props) => {
838
848
  showSizeChanger: count > 10,
839
849
  onChange: onChangePage
840
850
  },
851
+ onRow: (record) => {
852
+ return {
853
+ onClick: () => {
854
+ setSelectedRecord(record);
855
+ handleChange(record);
856
+ setModel(true);
857
+ },
858
+ style: { cursor: "pointer" }
859
+ };
860
+ },
841
861
  rowSelection: rowSelectionConfig,
842
862
  dataSource,
843
863
  columns,
package/dist/index.mjs CHANGED
@@ -634,8 +634,6 @@ var ModelBody = (props) => {
634
634
  // src/Components/Model.tsx
635
635
  var ModelElement = (props) => {
636
636
  const { model, onCancel, selectedRecord, columns } = props;
637
- console.log("selectedRecord", selectedRecord);
638
- console.log("columns", columns);
639
637
  return /* @__PURE__ */ React19.createElement(
640
638
  Modal,
641
639
  {
@@ -655,10 +653,22 @@ var ModelElement = (props) => {
655
653
  margin: "-10px"
656
654
  }
657
655
  },
658
- Object.entries(selectedRecord).map(([key, value]) => {
659
- const record = columns.slice(1).filter((eachColumn) => eachColumn.key === key);
660
- console.log("value----", value);
661
- return record.length > 0 ? /* @__PURE__ */ React19.createElement("p", { style: { fontWeight: "500", padding: "10px" }, key }, /* @__PURE__ */ React19.createElement("span", { style: { fontWeight: "200", color: "gray", paddingRight: "10px" } }, record[0].title), String(value) !== "" ? String(value) : "--") : "";
656
+ columns.map((eachColumn) => {
657
+ if (!["#"].includes(eachColumn.key) && eachColumn?.["is_detail"] !== false) {
658
+ return /* @__PURE__ */ React19.createElement("p", { style: { fontWeight: "500", padding: "10px" } }, /* @__PURE__ */ React19.createElement(
659
+ "span",
660
+ {
661
+ style: {
662
+ fontWeight: "200",
663
+ color: "gray",
664
+ paddingRight: "10px"
665
+ }
666
+ },
667
+ eachColumn.label
668
+ ), selectedRecord[eachColumn.key] !== "" ? selectedRecord[eachColumn.key] : "--");
669
+ } else {
670
+ return null;
671
+ }
662
672
  })
663
673
  )
664
674
  },
@@ -772,6 +782,16 @@ var TableElement = (props) => {
772
782
  showSizeChanger: count > 10,
773
783
  onChange: onChangePage
774
784
  },
785
+ onRow: (record) => {
786
+ return {
787
+ onClick: () => {
788
+ setSelectedRecord(record);
789
+ handleChange(record);
790
+ setModel(true);
791
+ },
792
+ style: { cursor: "pointer" }
793
+ };
794
+ },
775
795
  rowSelection: rowSelectionConfig,
776
796
  dataSource,
777
797
  columns,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta167",
3
+ "version": "0.0.14-Beta169",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",