@apexcura/ui-components 0.0.11-Beta190 → 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 +19 -10
- package/dist/index.mjs +17 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -608,10 +608,18 @@ var Navbar = (props) => {
|
|
|
608
608
|
};
|
|
609
609
|
|
|
610
610
|
// src/Components/TableElement.tsx
|
|
611
|
+
var import_react20 = __toESM(require("react"));
|
|
612
|
+
var import_antd14 = require("antd");
|
|
613
|
+
|
|
614
|
+
// src/Components/Model.tsx
|
|
611
615
|
var import_react19 = __toESM(require("react"));
|
|
612
616
|
var import_antd13 = require("antd");
|
|
617
|
+
var ModelElement = (props) => /* @__PURE__ */ import_react19.default.createElement(import_antd13.Modal, null, /* @__PURE__ */ import_react19.default.createElement("p", null, "Model opened"));
|
|
618
|
+
|
|
619
|
+
// src/Components/TableElement.tsx
|
|
613
620
|
var TableElement = (props) => {
|
|
614
621
|
const { thead, tbody } = props;
|
|
622
|
+
const [selectedRecord, setSelectedRecord] = (0, import_react20.useState)({});
|
|
615
623
|
let columns = [];
|
|
616
624
|
if (thead) {
|
|
617
625
|
columns = [
|
|
@@ -624,6 +632,7 @@ var TableElement = (props) => {
|
|
|
624
632
|
title: col.label,
|
|
625
633
|
dataIndex: col.name,
|
|
626
634
|
key: col.key
|
|
635
|
+
// sorter: (a,b) => a[col]
|
|
627
636
|
}))
|
|
628
637
|
];
|
|
629
638
|
}
|
|
@@ -631,8 +640,8 @@ var TableElement = (props) => {
|
|
|
631
640
|
...row,
|
|
632
641
|
[columns[0].key]: index + 1
|
|
633
642
|
}));
|
|
634
|
-
return /* @__PURE__ */
|
|
635
|
-
|
|
643
|
+
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
644
|
+
import_antd14.Table,
|
|
636
645
|
{
|
|
637
646
|
dataSource,
|
|
638
647
|
columns,
|
|
@@ -641,21 +650,21 @@ var TableElement = (props) => {
|
|
|
641
650
|
onRow: (record, rowIndex) => {
|
|
642
651
|
return {
|
|
643
652
|
onClick: () => {
|
|
644
|
-
|
|
653
|
+
setSelectedRecord(record);
|
|
645
654
|
}
|
|
646
655
|
};
|
|
647
656
|
}
|
|
648
657
|
}
|
|
649
|
-
);
|
|
658
|
+
), selectedRecord && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedStyle: false, style: false, className: void 0, ...selectedRecord, onClose: () => setSelectedRecord({}) }));
|
|
650
659
|
};
|
|
651
660
|
|
|
652
661
|
// src/Components/DatePicker.tsx
|
|
653
|
-
var
|
|
654
|
-
var
|
|
662
|
+
var import_react21 = __toESM(require("react"));
|
|
663
|
+
var import_antd15 = require("antd");
|
|
655
664
|
var import_icons4 = require("@ant-design/icons");
|
|
656
665
|
var import_moment = __toESM(require("moment"));
|
|
657
666
|
var DatePickerElement = (props) => {
|
|
658
|
-
const [date, setDate] = (0,
|
|
667
|
+
const [date, setDate] = (0, import_react21.useState)(null);
|
|
659
668
|
const handleChange = (date2, dateString) => {
|
|
660
669
|
console.log("date---------", date2);
|
|
661
670
|
console.log("datestring", dateString);
|
|
@@ -690,15 +699,15 @@ var DatePickerElement = (props) => {
|
|
|
690
699
|
props.onChange(newDate.format("lll"));
|
|
691
700
|
}
|
|
692
701
|
};
|
|
693
|
-
return /* @__PURE__ */
|
|
694
|
-
|
|
702
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", null, /* @__PURE__ */ import_react21.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react21.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react21.default.createElement(
|
|
703
|
+
import_antd15.DatePicker,
|
|
695
704
|
{
|
|
696
705
|
placeholder: props.placeholder,
|
|
697
706
|
value: date,
|
|
698
707
|
variant: "borderless",
|
|
699
708
|
onChange: handleChange
|
|
700
709
|
}
|
|
701
|
-
), /* @__PURE__ */
|
|
710
|
+
), /* @__PURE__ */ import_react21.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react21.default.createElement(import_icons4.RightOutlined, null)));
|
|
702
711
|
};
|
|
703
712
|
// Annotate the CommonJS export names for ESM import in node:
|
|
704
713
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -557,10 +557,18 @@ var Navbar = (props) => {
|
|
|
557
557
|
};
|
|
558
558
|
|
|
559
559
|
// src/Components/TableElement.tsx
|
|
560
|
-
import
|
|
560
|
+
import React19, { useState as useState5 } from "react";
|
|
561
561
|
import { Table as Table2 } from "antd";
|
|
562
|
+
|
|
563
|
+
// src/Components/Model.tsx
|
|
564
|
+
import React18 from "react";
|
|
565
|
+
import { Modal } from "antd";
|
|
566
|
+
var ModelElement = (props) => /* @__PURE__ */ React18.createElement(Modal, null, /* @__PURE__ */ React18.createElement("p", null, "Model opened"));
|
|
567
|
+
|
|
568
|
+
// src/Components/TableElement.tsx
|
|
562
569
|
var TableElement = (props) => {
|
|
563
570
|
const { thead, tbody } = props;
|
|
571
|
+
const [selectedRecord, setSelectedRecord] = useState5({});
|
|
564
572
|
let columns = [];
|
|
565
573
|
if (thead) {
|
|
566
574
|
columns = [
|
|
@@ -573,6 +581,7 @@ var TableElement = (props) => {
|
|
|
573
581
|
title: col.label,
|
|
574
582
|
dataIndex: col.name,
|
|
575
583
|
key: col.key
|
|
584
|
+
// sorter: (a,b) => a[col]
|
|
576
585
|
}))
|
|
577
586
|
];
|
|
578
587
|
}
|
|
@@ -580,7 +589,7 @@ var TableElement = (props) => {
|
|
|
580
589
|
...row,
|
|
581
590
|
[columns[0].key]: index + 1
|
|
582
591
|
}));
|
|
583
|
-
return /* @__PURE__ */
|
|
592
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
584
593
|
Table2,
|
|
585
594
|
{
|
|
586
595
|
dataSource,
|
|
@@ -590,21 +599,21 @@ var TableElement = (props) => {
|
|
|
590
599
|
onRow: (record, rowIndex) => {
|
|
591
600
|
return {
|
|
592
601
|
onClick: () => {
|
|
593
|
-
|
|
602
|
+
setSelectedRecord(record);
|
|
594
603
|
}
|
|
595
604
|
};
|
|
596
605
|
}
|
|
597
606
|
}
|
|
598
|
-
);
|
|
607
|
+
), selectedRecord && /* @__PURE__ */ React19.createElement(ModelElement, { selectedStyle: false, style: false, className: void 0, ...selectedRecord, onClose: () => setSelectedRecord({}) }));
|
|
599
608
|
};
|
|
600
609
|
|
|
601
610
|
// src/Components/DatePicker.tsx
|
|
602
|
-
import
|
|
611
|
+
import React20, { useState as useState6 } from "react";
|
|
603
612
|
import { DatePicker } from "antd";
|
|
604
613
|
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
605
614
|
import moment from "moment";
|
|
606
615
|
var DatePickerElement = (props) => {
|
|
607
|
-
const [date, setDate] =
|
|
616
|
+
const [date, setDate] = useState6(null);
|
|
608
617
|
const handleChange = (date2, dateString) => {
|
|
609
618
|
console.log("date---------", date2);
|
|
610
619
|
console.log("datestring", dateString);
|
|
@@ -639,7 +648,7 @@ var DatePickerElement = (props) => {
|
|
|
639
648
|
props.onChange(newDate.format("lll"));
|
|
640
649
|
}
|
|
641
650
|
};
|
|
642
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ React20.createElement(LeftOutlined, null)), /* @__PURE__ */ React20.createElement(
|
|
643
652
|
DatePicker,
|
|
644
653
|
{
|
|
645
654
|
placeholder: props.placeholder,
|
|
@@ -647,7 +656,7 @@ var DatePickerElement = (props) => {
|
|
|
647
656
|
variant: "borderless",
|
|
648
657
|
onChange: handleChange
|
|
649
658
|
}
|
|
650
|
-
), /* @__PURE__ */
|
|
659
|
+
), /* @__PURE__ */ React20.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ React20.createElement(RightOutlined, null)));
|
|
651
660
|
};
|
|
652
661
|
export {
|
|
653
662
|
AddMoreTable,
|