@apexcura/ui-components 0.0.11-Beta204 → 0.0.11-Beta206
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 +18 -7
- package/dist/index.mjs +18 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -615,8 +615,21 @@ var import_antd14 = require("antd");
|
|
|
615
615
|
var import_react19 = __toESM(require("react"));
|
|
616
616
|
var import_antd13 = require("antd");
|
|
617
617
|
var ModelElement = (props) => {
|
|
618
|
-
const { onCancel, model } = props;
|
|
619
|
-
return /* @__PURE__ */ import_react19.default.createElement(
|
|
618
|
+
const { onCancel, model, selectedRecord } = props;
|
|
619
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
620
|
+
import_antd13.Modal,
|
|
621
|
+
{
|
|
622
|
+
open: model,
|
|
623
|
+
onCancel,
|
|
624
|
+
footer: null,
|
|
625
|
+
title: /* @__PURE__ */ import_react19.default.createElement("div", null, selectedRecord.map(
|
|
626
|
+
(eachRecord) => {
|
|
627
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("p", null, eachRecord));
|
|
628
|
+
}
|
|
629
|
+
))
|
|
630
|
+
},
|
|
631
|
+
/* @__PURE__ */ import_react19.default.createElement("p", null, "Model opened")
|
|
632
|
+
);
|
|
620
633
|
};
|
|
621
634
|
|
|
622
635
|
// src/Components/TableElement.tsx
|
|
@@ -630,10 +643,7 @@ var TableElement = (props) => {
|
|
|
630
643
|
{
|
|
631
644
|
title: "#",
|
|
632
645
|
dataIndex: "#",
|
|
633
|
-
key: "#"
|
|
634
|
-
sorter: {
|
|
635
|
-
compare: (a, b) => a["#"] - b["#"]
|
|
636
|
-
}
|
|
646
|
+
key: "#"
|
|
637
647
|
},
|
|
638
648
|
...thead.map((col, ind) => ({
|
|
639
649
|
title: col.label,
|
|
@@ -644,7 +654,7 @@ var TableElement = (props) => {
|
|
|
644
654
|
if (typeof a[col.key] === "number" && typeof a[col.key] === "number") {
|
|
645
655
|
return a[col.key] - b[col.key];
|
|
646
656
|
} else if (typeof a[col.key] === "string" && typeof a[col.key] === "string") {
|
|
647
|
-
return a[col.key].
|
|
657
|
+
return a[col.key].localeCompare(b[col.key]);
|
|
648
658
|
}
|
|
649
659
|
}
|
|
650
660
|
}
|
|
@@ -666,6 +676,7 @@ var TableElement = (props) => {
|
|
|
666
676
|
return {
|
|
667
677
|
onClick: () => {
|
|
668
678
|
setSelectedRecord(record);
|
|
679
|
+
console.log(selectedRecord);
|
|
669
680
|
setModel(true);
|
|
670
681
|
}
|
|
671
682
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -564,8 +564,21 @@ import { Table as Table2 } from "antd";
|
|
|
564
564
|
import React18 from "react";
|
|
565
565
|
import { Modal } from "antd";
|
|
566
566
|
var ModelElement = (props) => {
|
|
567
|
-
const { onCancel, model } = props;
|
|
568
|
-
return /* @__PURE__ */ React18.createElement(
|
|
567
|
+
const { onCancel, model, selectedRecord } = props;
|
|
568
|
+
return /* @__PURE__ */ React18.createElement(
|
|
569
|
+
Modal,
|
|
570
|
+
{
|
|
571
|
+
open: model,
|
|
572
|
+
onCancel,
|
|
573
|
+
footer: null,
|
|
574
|
+
title: /* @__PURE__ */ React18.createElement("div", null, selectedRecord.map(
|
|
575
|
+
(eachRecord) => {
|
|
576
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("p", null, eachRecord));
|
|
577
|
+
}
|
|
578
|
+
))
|
|
579
|
+
},
|
|
580
|
+
/* @__PURE__ */ React18.createElement("p", null, "Model opened")
|
|
581
|
+
);
|
|
569
582
|
};
|
|
570
583
|
|
|
571
584
|
// src/Components/TableElement.tsx
|
|
@@ -579,10 +592,7 @@ var TableElement = (props) => {
|
|
|
579
592
|
{
|
|
580
593
|
title: "#",
|
|
581
594
|
dataIndex: "#",
|
|
582
|
-
key: "#"
|
|
583
|
-
sorter: {
|
|
584
|
-
compare: (a, b) => a["#"] - b["#"]
|
|
585
|
-
}
|
|
595
|
+
key: "#"
|
|
586
596
|
},
|
|
587
597
|
...thead.map((col, ind) => ({
|
|
588
598
|
title: col.label,
|
|
@@ -593,7 +603,7 @@ var TableElement = (props) => {
|
|
|
593
603
|
if (typeof a[col.key] === "number" && typeof a[col.key] === "number") {
|
|
594
604
|
return a[col.key] - b[col.key];
|
|
595
605
|
} else if (typeof a[col.key] === "string" && typeof a[col.key] === "string") {
|
|
596
|
-
return a[col.key].
|
|
606
|
+
return a[col.key].localeCompare(b[col.key]);
|
|
597
607
|
}
|
|
598
608
|
}
|
|
599
609
|
}
|
|
@@ -615,6 +625,7 @@ var TableElement = (props) => {
|
|
|
615
625
|
return {
|
|
616
626
|
onClick: () => {
|
|
617
627
|
setSelectedRecord(record);
|
|
628
|
+
console.log(selectedRecord);
|
|
618
629
|
setModel(true);
|
|
619
630
|
}
|
|
620
631
|
};
|