@apexcura/ui-components 0.0.11-Beta191 → 0.0.11-Beta192
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 +5 -3
- package/dist/index.mjs +8 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -619,6 +619,7 @@ var ModelElement = (props) => /* @__PURE__ */ import_react19.default.createEleme
|
|
|
619
619
|
// src/Components/TableElement.tsx
|
|
620
620
|
var TableElement = (props) => {
|
|
621
621
|
const { thead, tbody } = props;
|
|
622
|
+
const [selectedRecord, setSelectedRecord] = (0, import_react20.useState)({});
|
|
622
623
|
let columns = [];
|
|
623
624
|
if (thead) {
|
|
624
625
|
columns = [
|
|
@@ -631,6 +632,7 @@ var TableElement = (props) => {
|
|
|
631
632
|
title: col.label,
|
|
632
633
|
dataIndex: col.name,
|
|
633
634
|
key: col.key
|
|
635
|
+
// sorter: (a,b) => a[col]
|
|
634
636
|
}))
|
|
635
637
|
];
|
|
636
638
|
}
|
|
@@ -638,7 +640,7 @@ var TableElement = (props) => {
|
|
|
638
640
|
...row,
|
|
639
641
|
[columns[0].key]: index + 1
|
|
640
642
|
}));
|
|
641
|
-
return /* @__PURE__ */ import_react20.default.createElement(
|
|
643
|
+
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
642
644
|
import_antd14.Table,
|
|
643
645
|
{
|
|
644
646
|
dataSource,
|
|
@@ -648,12 +650,12 @@ var TableElement = (props) => {
|
|
|
648
650
|
onRow: (record, rowIndex) => {
|
|
649
651
|
return {
|
|
650
652
|
onClick: () => {
|
|
651
|
-
|
|
653
|
+
setSelectedRecord(record);
|
|
652
654
|
}
|
|
653
655
|
};
|
|
654
656
|
}
|
|
655
657
|
}
|
|
656
|
-
);
|
|
658
|
+
), selectedRecord && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedStyle: false, style: false, className: void 0, ...selectedRecord, onClose: () => setSelectedRecord({}) }));
|
|
657
659
|
};
|
|
658
660
|
|
|
659
661
|
// src/Components/DatePicker.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -557,7 +557,7 @@ var Navbar = (props) => {
|
|
|
557
557
|
};
|
|
558
558
|
|
|
559
559
|
// src/Components/TableElement.tsx
|
|
560
|
-
import React19 from "react";
|
|
560
|
+
import React19, { useState as useState5 } from "react";
|
|
561
561
|
import { Table as Table2 } from "antd";
|
|
562
562
|
|
|
563
563
|
// src/Components/Model.tsx
|
|
@@ -568,6 +568,7 @@ var ModelElement = (props) => /* @__PURE__ */ React18.createElement(Modal, null,
|
|
|
568
568
|
// src/Components/TableElement.tsx
|
|
569
569
|
var TableElement = (props) => {
|
|
570
570
|
const { thead, tbody } = props;
|
|
571
|
+
const [selectedRecord, setSelectedRecord] = useState5({});
|
|
571
572
|
let columns = [];
|
|
572
573
|
if (thead) {
|
|
573
574
|
columns = [
|
|
@@ -580,6 +581,7 @@ var TableElement = (props) => {
|
|
|
580
581
|
title: col.label,
|
|
581
582
|
dataIndex: col.name,
|
|
582
583
|
key: col.key
|
|
584
|
+
// sorter: (a,b) => a[col]
|
|
583
585
|
}))
|
|
584
586
|
];
|
|
585
587
|
}
|
|
@@ -587,7 +589,7 @@ var TableElement = (props) => {
|
|
|
587
589
|
...row,
|
|
588
590
|
[columns[0].key]: index + 1
|
|
589
591
|
}));
|
|
590
|
-
return /* @__PURE__ */ React19.createElement(
|
|
592
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
591
593
|
Table2,
|
|
592
594
|
{
|
|
593
595
|
dataSource,
|
|
@@ -597,21 +599,21 @@ var TableElement = (props) => {
|
|
|
597
599
|
onRow: (record, rowIndex) => {
|
|
598
600
|
return {
|
|
599
601
|
onClick: () => {
|
|
600
|
-
|
|
602
|
+
setSelectedRecord(record);
|
|
601
603
|
}
|
|
602
604
|
};
|
|
603
605
|
}
|
|
604
606
|
}
|
|
605
|
-
);
|
|
607
|
+
), selectedRecord && /* @__PURE__ */ React19.createElement(ModelElement, { selectedStyle: false, style: false, className: void 0, ...selectedRecord, onClose: () => setSelectedRecord({}) }));
|
|
606
608
|
};
|
|
607
609
|
|
|
608
610
|
// src/Components/DatePicker.tsx
|
|
609
|
-
import React20, { useState as
|
|
611
|
+
import React20, { useState as useState6 } from "react";
|
|
610
612
|
import { DatePicker } from "antd";
|
|
611
613
|
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
612
614
|
import moment from "moment";
|
|
613
615
|
var DatePickerElement = (props) => {
|
|
614
|
-
const [date, setDate] =
|
|
616
|
+
const [date, setDate] = useState6(null);
|
|
615
617
|
const handleChange = (date2, dateString) => {
|
|
616
618
|
console.log("date---------", date2);
|
|
617
619
|
console.log("datestring", dateString);
|