@apexcura/ui-components 0.0.14-Beta223 → 0.0.14-Beta225
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.css +4 -3
- package/dist/index.js +112 -109
- package/dist/index.mjs +89 -86
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -338,9 +338,6 @@ video {
|
|
|
338
338
|
.fixed {
|
|
339
339
|
position: fixed;
|
|
340
340
|
}
|
|
341
|
-
.relative {
|
|
342
|
-
position: relative;
|
|
343
|
-
}
|
|
344
341
|
.m-\[10px\] {
|
|
345
342
|
margin: 10px;
|
|
346
343
|
}
|
|
@@ -403,6 +400,10 @@ video {
|
|
|
403
400
|
--tw-text-opacity: 1;
|
|
404
401
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
405
402
|
}
|
|
403
|
+
.text-white {
|
|
404
|
+
--tw-text-opacity: 1;
|
|
405
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
406
|
+
}
|
|
406
407
|
.shadow-\[0px_0px_1px_1px_\#919191\] {
|
|
407
408
|
--tw-shadow: 0px 0px 1px 1px #919191;
|
|
408
409
|
--tw-shadow-colored: 0px 0px 1px 1px var(--tw-shadow-color);
|
package/dist/index.js
CHANGED
|
@@ -382,19 +382,10 @@ var MultipleSelectElement = (props) => {
|
|
|
382
382
|
};
|
|
383
383
|
|
|
384
384
|
// src/Components/Button.tsx
|
|
385
|
-
var import_react12 = __toESM(require("react"));
|
|
386
|
-
|
|
387
|
-
// src/constants/icons.tsx
|
|
388
385
|
var import_react11 = __toESM(require("react"));
|
|
389
|
-
var icons = {
|
|
390
|
-
download: /* @__PURE__ */ import_react11.default.createElement("svg", { className: "fill-current w-4 h-4 mr-2", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" }, /* @__PURE__ */ import_react11.default.createElement("path", { d: "M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z" }))
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
// src/Components/Button.tsx
|
|
394
386
|
var ButtonElement = (props) => {
|
|
395
|
-
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
396
|
-
|
|
397
|
-
return /* @__PURE__ */ import_react12.default.createElement(
|
|
387
|
+
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0] === "text-white";
|
|
388
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
398
389
|
"button",
|
|
399
390
|
{
|
|
400
391
|
onClick: props.onClick,
|
|
@@ -404,18 +395,30 @@ var ButtonElement = (props) => {
|
|
|
404
395
|
cursor: props.loading ? "no-drop" : "pointer"
|
|
405
396
|
}
|
|
406
397
|
},
|
|
407
|
-
|
|
398
|
+
props.icon && JSON.parse(props.icon),
|
|
399
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
400
|
+
"span",
|
|
401
|
+
{
|
|
402
|
+
className: props.iconsClassName,
|
|
403
|
+
dangerouslySetInnerHTML: { __html: props.icon || "" }
|
|
404
|
+
}
|
|
405
|
+
),
|
|
406
|
+
/* @__PURE__ */ import_react11.default.createElement("style", null, textColorClass && `.${props.iconsClassName} path {
|
|
407
|
+
filter: brightness(0) invert(1);
|
|
408
|
+
}`, `.${props.iconsClassName}:hover path {
|
|
409
|
+
filter: brightness(0) invert(1);
|
|
410
|
+
}`),
|
|
408
411
|
props.label
|
|
409
412
|
);
|
|
410
413
|
};
|
|
411
414
|
|
|
412
415
|
// src/Components/AddMoreTable.tsx
|
|
413
|
-
var
|
|
416
|
+
var import_react12 = __toESM(require("react"));
|
|
414
417
|
var import_antd10 = require("antd");
|
|
415
|
-
var
|
|
418
|
+
var import_icons2 = require("@ant-design/icons");
|
|
416
419
|
var AddMoreTable = (props) => {
|
|
417
420
|
const { thead, tbody } = props;
|
|
418
|
-
const [rows, setRows] = (0,
|
|
421
|
+
const [rows, setRows] = (0, import_react12.useState)(tbody || []);
|
|
419
422
|
const onHandleRows = () => {
|
|
420
423
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
421
424
|
let newRow = {
|
|
@@ -480,16 +483,16 @@ var AddMoreTable = (props) => {
|
|
|
480
483
|
});
|
|
481
484
|
});
|
|
482
485
|
};
|
|
483
|
-
(0,
|
|
486
|
+
(0, import_react12.useEffect)(() => {
|
|
484
487
|
console.log(rows);
|
|
485
488
|
}, [rows]);
|
|
486
489
|
const renderInputElement = (element, value) => {
|
|
487
490
|
if (!element) return null;
|
|
488
491
|
const { element: type, label } = element;
|
|
489
492
|
if (type === "single-select") {
|
|
490
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ import_react12.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
491
494
|
} else if (type === "textarea") {
|
|
492
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ import_react12.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
493
496
|
} else {
|
|
494
497
|
return null;
|
|
495
498
|
}
|
|
@@ -506,13 +509,13 @@ var AddMoreTable = (props) => {
|
|
|
506
509
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
507
510
|
Object.keys(variable).forEach((key) => {
|
|
508
511
|
if (key === "SubRows") {
|
|
509
|
-
rowData[`${key}`] = /* @__PURE__ */
|
|
512
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react12.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.PlusOutlined, null)));
|
|
510
513
|
} else {
|
|
511
514
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
512
515
|
}
|
|
513
516
|
});
|
|
514
517
|
});
|
|
515
|
-
rowData.actions = /* @__PURE__ */
|
|
518
|
+
rowData.actions = /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.PlusOutlined, null)));
|
|
516
519
|
console.log("=====rowdata", rowData);
|
|
517
520
|
return rowData;
|
|
518
521
|
});
|
|
@@ -528,7 +531,7 @@ var AddMoreTable = (props) => {
|
|
|
528
531
|
key: "actions"
|
|
529
532
|
});
|
|
530
533
|
}
|
|
531
|
-
return /* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
532
535
|
import_antd10.Table,
|
|
533
536
|
{
|
|
534
537
|
columns,
|
|
@@ -540,15 +543,15 @@ var AddMoreTable = (props) => {
|
|
|
540
543
|
};
|
|
541
544
|
|
|
542
545
|
// src/Components/Sidebar.tsx
|
|
543
|
-
var
|
|
546
|
+
var import_react13 = __toESM(require("react"));
|
|
544
547
|
var Sidebar = (props) => {
|
|
545
548
|
const handleChange = (item) => {
|
|
546
549
|
if (props.onChange) {
|
|
547
550
|
props.onChange(item);
|
|
548
551
|
}
|
|
549
552
|
};
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, { key: props.name }, /* @__PURE__ */ import_react13.default.createElement("div", { className: props.imgClassName }, /* @__PURE__ */ import_react13.default.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ import_react13.default.createElement("div", { className: props.listClassName }, props.items?.map((item) => {
|
|
554
|
+
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, { key: item.label }, /* @__PURE__ */ import_react13.default.createElement(
|
|
552
555
|
ButtonElement,
|
|
553
556
|
{
|
|
554
557
|
...item,
|
|
@@ -564,29 +567,29 @@ var Sidebar = (props) => {
|
|
|
564
567
|
};
|
|
565
568
|
|
|
566
569
|
// src/Components/Navbar.tsx
|
|
567
|
-
var
|
|
570
|
+
var import_react17 = __toESM(require("react"));
|
|
568
571
|
|
|
569
572
|
// src/Components/Notification.tsx
|
|
570
|
-
var
|
|
573
|
+
var import_react14 = __toESM(require("react"));
|
|
571
574
|
var import_antd11 = require("antd");
|
|
572
575
|
var import_io = require("react-icons/io");
|
|
573
576
|
var popoverContentStyle = {
|
|
574
577
|
minWidth: "300px",
|
|
575
578
|
maxWidth: "100%"
|
|
576
579
|
};
|
|
577
|
-
var Notification = (props) => /* @__PURE__ */
|
|
580
|
+
var Notification = (props) => /* @__PURE__ */ import_react14.default.createElement(
|
|
578
581
|
import_antd11.Popover,
|
|
579
582
|
{
|
|
580
583
|
className: props.className,
|
|
581
|
-
content: /* @__PURE__ */
|
|
584
|
+
content: /* @__PURE__ */ import_react14.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react14.default.createElement(
|
|
582
585
|
import_antd11.List,
|
|
583
586
|
{
|
|
584
587
|
itemLayout: "horizontal",
|
|
585
588
|
dataSource: props.items,
|
|
586
|
-
renderItem: (item, index) => /* @__PURE__ */
|
|
589
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react14.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react14.default.createElement(
|
|
587
590
|
import_antd11.List.Item.Meta,
|
|
588
591
|
{
|
|
589
|
-
avatar: /* @__PURE__ */
|
|
592
|
+
avatar: /* @__PURE__ */ import_react14.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
590
593
|
title: item.text,
|
|
591
594
|
description: item.time
|
|
592
595
|
}
|
|
@@ -596,49 +599,49 @@ var Notification = (props) => /* @__PURE__ */ import_react15.default.createEleme
|
|
|
596
599
|
trigger: "focus",
|
|
597
600
|
placement: "bottomRight"
|
|
598
601
|
},
|
|
599
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ import_react14.default.createElement(import_antd11.Button, { className: props.buttonClassName }, /* @__PURE__ */ import_react14.default.createElement(import_antd11.Badge, { size: "small", count: props.count }, /* @__PURE__ */ import_react14.default.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ import_react14.default.createElement(import_io.IoIosNotifications, null))))
|
|
600
603
|
);
|
|
601
604
|
|
|
602
605
|
// src/Components/SpanElement.tsx
|
|
603
|
-
var
|
|
604
|
-
var SpanElement = (props) => /* @__PURE__ */
|
|
606
|
+
var import_react15 = __toESM(require("react"));
|
|
607
|
+
var SpanElement = (props) => /* @__PURE__ */ import_react15.default.createElement("span", { className: props.className }, props.label);
|
|
605
608
|
|
|
606
609
|
// src/Components/Profile.tsx
|
|
607
|
-
var
|
|
610
|
+
var import_react16 = __toESM(require("react"));
|
|
608
611
|
var import_antd12 = require("antd");
|
|
609
|
-
var
|
|
610
|
-
var Profile = (props) => /* @__PURE__ */
|
|
612
|
+
var import_icons3 = require("@ant-design/icons");
|
|
613
|
+
var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react16.default.createElement(import_antd12.Avatar, { style: { backgroundColor: "#87d068", marginRight: "10px" }, icon: /* @__PURE__ */ import_react16.default.createElement(import_icons3.UserOutlined, null) }), /* @__PURE__ */ import_react16.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react16.default.createElement("p", null, props.primaryText), /* @__PURE__ */ import_react16.default.createElement("p", { className: props.secondTextClassName }, " ", props.secondaryText)));
|
|
611
614
|
|
|
612
615
|
// src/Components/Navbar.tsx
|
|
613
616
|
var Navbar = (props) => {
|
|
614
|
-
return /* @__PURE__ */
|
|
617
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: `${props.className}`, key: props.name }, props.items && props.items.map((item) => {
|
|
615
618
|
if (item.element === "span") {
|
|
616
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ import_react17.default.createElement(SpanElement, { ...item });
|
|
617
620
|
} else if (item.element === "notifications") {
|
|
618
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ import_react17.default.createElement(Notification, { ...item });
|
|
619
622
|
} else if (item.name === "profile") {
|
|
620
|
-
return /* @__PURE__ */
|
|
623
|
+
return /* @__PURE__ */ import_react17.default.createElement(Profile, { ...item });
|
|
621
624
|
}
|
|
622
625
|
return null;
|
|
623
626
|
}));
|
|
624
627
|
};
|
|
625
628
|
|
|
626
629
|
// src/Components/TableElement.tsx
|
|
627
|
-
var
|
|
630
|
+
var import_react20 = __toESM(require("react"));
|
|
628
631
|
var import_antd14 = require("antd");
|
|
629
632
|
|
|
630
633
|
// src/Components/Model.tsx
|
|
631
|
-
var
|
|
634
|
+
var import_react19 = __toESM(require("react"));
|
|
632
635
|
var import_antd13 = require("antd");
|
|
633
636
|
|
|
634
637
|
// src/Components/ModelBody.tsx
|
|
635
|
-
var
|
|
638
|
+
var import_react18 = __toESM(require("react"));
|
|
636
639
|
var import_moment = __toESM(require("moment"));
|
|
637
640
|
var ModelBody = (props) => {
|
|
638
|
-
return /* @__PURE__ */
|
|
641
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: props.modalContent && props.modalContent.className }, props.modalContent && props.modalContent.fields.map(
|
|
639
642
|
(eachField) => {
|
|
640
643
|
if (eachField.element === "div") {
|
|
641
|
-
return /* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, eachField.label), eachField.dateTime ? /* @__PURE__ */ import_react18.default.createElement(
|
|
642
645
|
"p",
|
|
643
646
|
{
|
|
644
647
|
style: {
|
|
@@ -649,7 +652,7 @@ var ModelBody = (props) => {
|
|
|
649
652
|
(0, import_moment.default)(eachField.dateTime).format("LT")
|
|
650
653
|
) : "");
|
|
651
654
|
} else if (eachField.element === "input-radio") {
|
|
652
|
-
return /* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react18.default.createElement(RadioElement, { ...eachField })), eachField.dateTime ? /* @__PURE__ */ import_react18.default.createElement(
|
|
653
656
|
"p",
|
|
654
657
|
{
|
|
655
658
|
style: {
|
|
@@ -660,7 +663,7 @@ var ModelBody = (props) => {
|
|
|
660
663
|
(0, import_moment.default)(eachField.dateTime).format("LT")
|
|
661
664
|
) : "");
|
|
662
665
|
} else if (eachField.element === "button") {
|
|
663
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react18.default.createElement(ButtonElement, { ...eachField })), eachField.dateTime ? /* @__PURE__ */ import_react18.default.createElement(
|
|
664
667
|
"p",
|
|
665
668
|
{
|
|
666
669
|
style: {
|
|
@@ -680,7 +683,7 @@ var ModelBody = (props) => {
|
|
|
680
683
|
// src/Components/Model.tsx
|
|
681
684
|
var ModelElement = (props) => {
|
|
682
685
|
const { model, onCancel, selectedRecord, columns } = props;
|
|
683
|
-
return /* @__PURE__ */
|
|
686
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
684
687
|
import_antd13.Modal,
|
|
685
688
|
{
|
|
686
689
|
centered: true,
|
|
@@ -688,7 +691,7 @@ var ModelElement = (props) => {
|
|
|
688
691
|
onCancel,
|
|
689
692
|
footer: null,
|
|
690
693
|
width: 850,
|
|
691
|
-
title: /* @__PURE__ */
|
|
694
|
+
title: /* @__PURE__ */ import_react19.default.createElement(
|
|
692
695
|
"div",
|
|
693
696
|
{
|
|
694
697
|
style: {
|
|
@@ -701,7 +704,7 @@ var ModelElement = (props) => {
|
|
|
701
704
|
},
|
|
702
705
|
columns.map((eachColumn) => {
|
|
703
706
|
if (!["index", "View"].includes(eachColumn.key) && eachColumn?.["is_detail"] !== false) {
|
|
704
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ import_react19.default.createElement("p", { style: { fontWeight: "500", padding: "10px" } }, /* @__PURE__ */ import_react19.default.createElement(
|
|
705
708
|
"span",
|
|
706
709
|
{
|
|
707
710
|
style: {
|
|
@@ -718,20 +721,20 @@ var ModelElement = (props) => {
|
|
|
718
721
|
})
|
|
719
722
|
)
|
|
720
723
|
},
|
|
721
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ import_react19.default.createElement(ModelBody, { ...props })
|
|
722
725
|
);
|
|
723
726
|
};
|
|
724
727
|
|
|
725
728
|
// src/Components/TableElement.tsx
|
|
726
|
-
var
|
|
729
|
+
var import_icons4 = require("@ant-design/icons");
|
|
727
730
|
var TableElement = (props) => {
|
|
728
731
|
const { thead, tbody } = props;
|
|
729
|
-
const [selectedRecord, setSelectedRecord] = (0,
|
|
730
|
-
const [model, setModel] = (0,
|
|
731
|
-
const [dataSource, setDataSource] = (0,
|
|
732
|
+
const [selectedRecord, setSelectedRecord] = (0, import_react20.useState)({});
|
|
733
|
+
const [model, setModel] = (0, import_react20.useState)(false);
|
|
734
|
+
const [dataSource, setDataSource] = (0, import_react20.useState)([]);
|
|
732
735
|
console.log(props.value);
|
|
733
736
|
const defaultVal = props.value;
|
|
734
|
-
(0,
|
|
737
|
+
(0, import_react20.useEffect)(() => {
|
|
735
738
|
if (tbody) {
|
|
736
739
|
setDataSource(
|
|
737
740
|
tbody.map((row, index) => ({
|
|
@@ -781,7 +784,7 @@ var TableElement = (props) => {
|
|
|
781
784
|
dataIndex: "View",
|
|
782
785
|
key: "View",
|
|
783
786
|
render: (_, record) => {
|
|
784
|
-
return /* @__PURE__ */
|
|
787
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
785
788
|
"a",
|
|
786
789
|
{
|
|
787
790
|
onClick: () => {
|
|
@@ -792,7 +795,7 @@ var TableElement = (props) => {
|
|
|
792
795
|
}
|
|
793
796
|
}
|
|
794
797
|
},
|
|
795
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ import_react20.default.createElement(import_icons4.EyeOutlined, null)
|
|
796
799
|
);
|
|
797
800
|
}
|
|
798
801
|
});
|
|
@@ -825,7 +828,7 @@ var TableElement = (props) => {
|
|
|
825
828
|
}
|
|
826
829
|
}
|
|
827
830
|
} : void 0;
|
|
828
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
829
832
|
import_antd14.Table,
|
|
830
833
|
{
|
|
831
834
|
loading: props.loading,
|
|
@@ -856,7 +859,7 @@ var TableElement = (props) => {
|
|
|
856
859
|
bordered: true,
|
|
857
860
|
onChange: onChangeTable
|
|
858
861
|
}
|
|
859
|
-
), model && /* @__PURE__ */
|
|
862
|
+
), model && /* @__PURE__ */ import_react20.default.createElement(
|
|
860
863
|
ModelElement,
|
|
861
864
|
{
|
|
862
865
|
selectedRecord,
|
|
@@ -869,14 +872,14 @@ var TableElement = (props) => {
|
|
|
869
872
|
};
|
|
870
873
|
|
|
871
874
|
// src/Components/DatePicker.tsx
|
|
872
|
-
var
|
|
875
|
+
var import_react21 = __toESM(require("react"));
|
|
873
876
|
var import_antd15 = require("antd");
|
|
874
877
|
var import_dayjs = __toESM(require("dayjs"));
|
|
875
878
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
876
879
|
var import_moment2 = __toESM(require("moment"));
|
|
877
880
|
import_dayjs.default.extend(import_customParseFormat.default);
|
|
878
881
|
var DatePickerElement = (props) => {
|
|
879
|
-
const [dateState, setDateState] = (0,
|
|
882
|
+
const [dateState, setDateState] = (0, import_react21.useState)("");
|
|
880
883
|
const handleChange = (date, dateString) => {
|
|
881
884
|
if (date) {
|
|
882
885
|
const formattedDate = dateString;
|
|
@@ -894,7 +897,7 @@ var DatePickerElement = (props) => {
|
|
|
894
897
|
const disabledDate = (current) => {
|
|
895
898
|
return current && current > (0, import_moment2.default)();
|
|
896
899
|
};
|
|
897
|
-
return /* @__PURE__ */
|
|
900
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", null, /* @__PURE__ */ import_react21.default.createElement(
|
|
898
901
|
import_antd15.DatePicker,
|
|
899
902
|
{
|
|
900
903
|
disabledDate,
|
|
@@ -907,7 +910,7 @@ var DatePickerElement = (props) => {
|
|
|
907
910
|
};
|
|
908
911
|
|
|
909
912
|
// src/Components/DateRangePickerElement.tsx
|
|
910
|
-
var
|
|
913
|
+
var import_react22 = __toESM(require("react"));
|
|
911
914
|
var import_antd16 = require("antd");
|
|
912
915
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
913
916
|
var import_moment3 = __toESM(require("moment"));
|
|
@@ -930,7 +933,7 @@ var DateRangePickerElement = (props) => {
|
|
|
930
933
|
const disabledDate = (current) => {
|
|
931
934
|
return current && current > (0, import_moment3.default)();
|
|
932
935
|
};
|
|
933
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ import_react22.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react22.default.createElement(
|
|
934
937
|
RangePicker,
|
|
935
938
|
{
|
|
936
939
|
disabledDate,
|
|
@@ -943,13 +946,13 @@ var DateRangePickerElement = (props) => {
|
|
|
943
946
|
};
|
|
944
947
|
|
|
945
948
|
// src/Components/Image.tsx
|
|
946
|
-
var
|
|
949
|
+
var import_react23 = __toESM(require("react"));
|
|
947
950
|
var Image = (props) => {
|
|
948
|
-
return /* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ import_react23.default.createElement("img", { className: props.className, src: props.img, alt: "image" });
|
|
949
952
|
};
|
|
950
953
|
|
|
951
954
|
// src/Components/SingleCheckbox.tsx
|
|
952
|
-
var
|
|
955
|
+
var import_react24 = __toESM(require("react"));
|
|
953
956
|
var import_antd17 = require("antd");
|
|
954
957
|
var SingleCheckbox = (props) => {
|
|
955
958
|
const handleChange = (e) => {
|
|
@@ -957,14 +960,14 @@ var SingleCheckbox = (props) => {
|
|
|
957
960
|
props.onChange(e.target.checked);
|
|
958
961
|
}
|
|
959
962
|
};
|
|
960
|
-
return /* @__PURE__ */
|
|
963
|
+
return /* @__PURE__ */ import_react24.default.createElement(import_antd17.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
961
964
|
};
|
|
962
965
|
|
|
963
966
|
// src/Components/DropDownGroup.tsx
|
|
964
|
-
var
|
|
967
|
+
var import_react25 = __toESM(require("react"));
|
|
965
968
|
var import_antd18 = require("antd");
|
|
966
969
|
var DropDownGroup = (props) => {
|
|
967
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
970
|
+
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
968
971
|
firstValue: {},
|
|
969
972
|
secondValue: {},
|
|
970
973
|
temp: ""
|
|
@@ -996,7 +999,7 @@ var DropDownGroup = (props) => {
|
|
|
996
999
|
return newValue;
|
|
997
1000
|
});
|
|
998
1001
|
};
|
|
999
|
-
return /* @__PURE__ */
|
|
1002
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react25.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react25.default.createElement("div", { className: props.subContainerClassName }, /* @__PURE__ */ import_react25.default.createElement(
|
|
1000
1003
|
import_antd18.Select,
|
|
1001
1004
|
{
|
|
1002
1005
|
onChange: handleFirstChange,
|
|
@@ -1004,7 +1007,7 @@ var DropDownGroup = (props) => {
|
|
|
1004
1007
|
options: props.firstOptions,
|
|
1005
1008
|
className: props.className
|
|
1006
1009
|
}
|
|
1007
|
-
), /* @__PURE__ */
|
|
1010
|
+
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
1008
1011
|
import_antd18.Select,
|
|
1009
1012
|
{
|
|
1010
1013
|
onChange: handleSecondChange,
|
|
@@ -1016,12 +1019,12 @@ var DropDownGroup = (props) => {
|
|
|
1016
1019
|
};
|
|
1017
1020
|
|
|
1018
1021
|
// src/Components/FilesUpload.tsx
|
|
1019
|
-
var
|
|
1022
|
+
var import_react26 = __toESM(require("react"));
|
|
1020
1023
|
var import_antd19 = require("antd");
|
|
1021
|
-
var
|
|
1024
|
+
var import_icons5 = require("@ant-design/icons");
|
|
1022
1025
|
var FileUpload = (props) => {
|
|
1023
1026
|
const { Dragger } = import_antd19.Upload;
|
|
1024
|
-
const [files, setFiles] = (0,
|
|
1027
|
+
const [files, setFiles] = (0, import_react26.useState)([]);
|
|
1025
1028
|
const handleChange = ({ fileList }) => {
|
|
1026
1029
|
setFiles(fileList);
|
|
1027
1030
|
if (props.onChange) {
|
|
@@ -1036,7 +1039,7 @@ var FileUpload = (props) => {
|
|
|
1036
1039
|
onSuccess("ok");
|
|
1037
1040
|
}, 0);
|
|
1038
1041
|
};
|
|
1039
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ import_react26.default.createElement("div", null, /* @__PURE__ */ import_react26.default.createElement(
|
|
1040
1043
|
Dragger,
|
|
1041
1044
|
{
|
|
1042
1045
|
action: "",
|
|
@@ -1049,13 +1052,13 @@ var FileUpload = (props) => {
|
|
|
1049
1052
|
showUploadList: true,
|
|
1050
1053
|
customRequest
|
|
1051
1054
|
},
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ import_react26.default.createElement("p", null, /* @__PURE__ */ import_react26.default.createElement(import_icons5.InboxOutlined, null)),
|
|
1056
|
+
/* @__PURE__ */ import_react26.default.createElement("p", null, "Click or drag file to upload")
|
|
1054
1057
|
));
|
|
1055
1058
|
};
|
|
1056
1059
|
|
|
1057
1060
|
// src/Components/TabsElement.tsx
|
|
1058
|
-
var
|
|
1061
|
+
var import_react27 = __toESM(require("react"));
|
|
1059
1062
|
var import_antd20 = require("antd");
|
|
1060
1063
|
var TabsElement = (props) => {
|
|
1061
1064
|
const handleChange = (key) => {
|
|
@@ -1063,21 +1066,21 @@ var TabsElement = (props) => {
|
|
|
1063
1066
|
props.onChange(props.options?.find((eachOption) => eachOption.key === key));
|
|
1064
1067
|
}
|
|
1065
1068
|
};
|
|
1066
|
-
return /* @__PURE__ */
|
|
1069
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_antd20.Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
1067
1070
|
};
|
|
1068
1071
|
|
|
1069
1072
|
// src/Components/SwitchElement.tsx
|
|
1070
|
-
var
|
|
1073
|
+
var import_react28 = __toESM(require("react"));
|
|
1071
1074
|
var import_antd21 = require("antd");
|
|
1072
1075
|
var onChange = (checked) => {
|
|
1073
1076
|
console.log(`switch to ${checked}`);
|
|
1074
1077
|
};
|
|
1075
|
-
var SwitchElement = () => /* @__PURE__ */
|
|
1078
|
+
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(import_antd21.Switch, { defaultChecked: true, onChange });
|
|
1076
1079
|
|
|
1077
1080
|
// src/Components/Upload.tsx
|
|
1078
|
-
var
|
|
1081
|
+
var import_react29 = __toESM(require("react"));
|
|
1079
1082
|
var Upload2 = (props) => {
|
|
1080
|
-
const [file, setFile] = (0,
|
|
1083
|
+
const [file, setFile] = (0, import_react29.useState)();
|
|
1081
1084
|
const handleFileChange = (e) => {
|
|
1082
1085
|
setFile(e.target.files[0]);
|
|
1083
1086
|
if (props.onChange) {
|
|
@@ -1090,7 +1093,7 @@ var Upload2 = (props) => {
|
|
|
1090
1093
|
return;
|
|
1091
1094
|
}
|
|
1092
1095
|
};
|
|
1093
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ import_react29.default.createElement("div", { style: { marginTop: 16 } }, /* @__PURE__ */ import_react29.default.createElement("input", { type: "file", onChange: handleFileChange }), /* @__PURE__ */ import_react29.default.createElement(
|
|
1094
1097
|
"button",
|
|
1095
1098
|
{
|
|
1096
1099
|
type: "button",
|
|
@@ -1103,12 +1106,12 @@ var Upload2 = (props) => {
|
|
|
1103
1106
|
};
|
|
1104
1107
|
|
|
1105
1108
|
// src/Components/OtpElement.tsx
|
|
1106
|
-
var
|
|
1109
|
+
var import_react30 = __toESM(require("react"));
|
|
1107
1110
|
var import_antd22 = require("antd");
|
|
1108
1111
|
var OtpElement = (props) => {
|
|
1109
1112
|
const length = props.length;
|
|
1110
|
-
const [otp, setOtp] = (0,
|
|
1111
|
-
const inputRefs = (0,
|
|
1113
|
+
const [otp, setOtp] = (0, import_react30.useState)(Array(length).fill(""));
|
|
1114
|
+
const inputRefs = (0, import_react30.useRef)([]);
|
|
1112
1115
|
const handleChange = (e, index) => {
|
|
1113
1116
|
const value = e.target.value;
|
|
1114
1117
|
if (/^[0-9]$/.test(value) || value === "") {
|
|
@@ -1140,10 +1143,10 @@ var OtpElement = (props) => {
|
|
|
1140
1143
|
});
|
|
1141
1144
|
}
|
|
1142
1145
|
};
|
|
1143
|
-
(0,
|
|
1146
|
+
(0, import_react30.useEffect)(() => {
|
|
1144
1147
|
inputRefs.current[0]?.focus();
|
|
1145
1148
|
}, []);
|
|
1146
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ import_react30.default.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ import_react30.default.createElement(
|
|
1147
1150
|
import_antd22.Input,
|
|
1148
1151
|
{
|
|
1149
1152
|
key: index,
|
|
@@ -1159,7 +1162,7 @@ var OtpElement = (props) => {
|
|
|
1159
1162
|
};
|
|
1160
1163
|
|
|
1161
1164
|
// src/Components/CircleDonut.tsx
|
|
1162
|
-
var
|
|
1165
|
+
var import_react31 = __toESM(require("react"));
|
|
1163
1166
|
var import_react_chartjs_2 = require("react-chartjs-2");
|
|
1164
1167
|
var import_chart = require("chart.js");
|
|
1165
1168
|
import_chart.Chart.register(import_chart.DoughnutController, import_chart.ArcElement, import_chart.Tooltip, import_chart.Legend);
|
|
@@ -1236,11 +1239,11 @@ var CircleDonut = (props) => {
|
|
|
1236
1239
|
ctx.restore();
|
|
1237
1240
|
}
|
|
1238
1241
|
};
|
|
1239
|
-
return /* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react31.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react31.default.createElement(import_react_chartjs_2.Doughnut, { data, options, plugins: [centerTextPlugin] }));
|
|
1240
1243
|
};
|
|
1241
1244
|
|
|
1242
1245
|
// src/Components/SemiCircleDonut.tsx
|
|
1243
|
-
var
|
|
1246
|
+
var import_react32 = __toESM(require("react"));
|
|
1244
1247
|
var import_react_chartjs_22 = require("react-chartjs-2");
|
|
1245
1248
|
var import_chart2 = require("chart.js");
|
|
1246
1249
|
import_chart2.Chart.register(import_chart2.DoughnutController, import_chart2.ArcElement, import_chart2.Tooltip, import_chart2.Legend);
|
|
@@ -1317,11 +1320,11 @@ var SemiCircleDonut = (props) => {
|
|
|
1317
1320
|
ctx.restore();
|
|
1318
1321
|
}
|
|
1319
1322
|
};
|
|
1320
|
-
return /* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ import_react32.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react32.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react32.default.createElement(import_react_chartjs_22.Doughnut, { data, options, plugins: [centerTextPlugin] }));
|
|
1321
1324
|
};
|
|
1322
1325
|
|
|
1323
1326
|
// src/Components/HorizontalBarChart.tsx
|
|
1324
|
-
var
|
|
1327
|
+
var import_react33 = __toESM(require("react"));
|
|
1325
1328
|
var import_react_chartjs_23 = require("react-chartjs-2");
|
|
1326
1329
|
var import_chart3 = require("chart.js");
|
|
1327
1330
|
import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip);
|
|
@@ -1370,22 +1373,22 @@ var HorizontalBarChart = (props) => {
|
|
|
1370
1373
|
}
|
|
1371
1374
|
}
|
|
1372
1375
|
};
|
|
1373
|
-
return /* @__PURE__ */
|
|
1376
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react33.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react33.default.createElement(import_react_chartjs_23.Bar, { data, options }));
|
|
1374
1377
|
};
|
|
1375
1378
|
|
|
1376
1379
|
// src/Components/LineChart.tsx
|
|
1377
|
-
var
|
|
1380
|
+
var import_react34 = __toESM(require("react"));
|
|
1378
1381
|
var import_auto = __toESM(require("chart.js/auto"));
|
|
1379
1382
|
var LineChart = (props) => {
|
|
1380
|
-
const chartRef = (0,
|
|
1381
|
-
const chartInstance = (0,
|
|
1383
|
+
const chartRef = (0, import_react34.useRef)(null);
|
|
1384
|
+
const chartInstance = (0, import_react34.useRef)(null);
|
|
1382
1385
|
const data = [
|
|
1383
1386
|
{ label: "ROI", data: [10, 13, 20, 15, 10] },
|
|
1384
1387
|
{ label: "Engagement Rate", data: [20, 23, 30, 28, 20] },
|
|
1385
1388
|
{ label: "Conversion Rate", data: [50, 100, 150, 180, 50] }
|
|
1386
1389
|
];
|
|
1387
1390
|
const labels = ["Instagram", "Whatsapp", "Messages", "Telegram", "Linkedin"];
|
|
1388
|
-
(0,
|
|
1391
|
+
(0, import_react34.useEffect)(() => {
|
|
1389
1392
|
if (chartRef.current) {
|
|
1390
1393
|
if (chartInstance.current) {
|
|
1391
1394
|
chartInstance.current.destroy();
|
|
@@ -1443,16 +1446,16 @@ var LineChart = (props) => {
|
|
|
1443
1446
|
}
|
|
1444
1447
|
};
|
|
1445
1448
|
}, [labels, data]);
|
|
1446
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react34.default.createElement("canvas", { ref: chartRef }));
|
|
1447
1450
|
};
|
|
1448
1451
|
|
|
1449
1452
|
// src/Components/DoubleBarChart.tsx
|
|
1450
|
-
var
|
|
1453
|
+
var import_react35 = __toESM(require("react"));
|
|
1451
1454
|
var import_auto2 = __toESM(require("chart.js/auto"));
|
|
1452
1455
|
var DoubleBarChart = (props) => {
|
|
1453
|
-
const chartRef = (0,
|
|
1454
|
-
const chartInstance = (0,
|
|
1455
|
-
(0,
|
|
1456
|
+
const chartRef = (0, import_react35.useRef)(null);
|
|
1457
|
+
const chartInstance = (0, import_react35.useRef)(null);
|
|
1458
|
+
(0, import_react35.useEffect)(() => {
|
|
1456
1459
|
if (chartRef.current) {
|
|
1457
1460
|
if (chartInstance.current) {
|
|
1458
1461
|
chartInstance.current.destroy();
|
|
@@ -1521,11 +1524,11 @@ var DoubleBarChart = (props) => {
|
|
|
1521
1524
|
}
|
|
1522
1525
|
};
|
|
1523
1526
|
}, []);
|
|
1524
|
-
return /* @__PURE__ */
|
|
1527
|
+
return /* @__PURE__ */ import_react35.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react35.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react35.default.createElement("canvas", { ref: chartRef }));
|
|
1525
1528
|
};
|
|
1526
1529
|
|
|
1527
1530
|
// src/Components/BarChart.tsx
|
|
1528
|
-
var
|
|
1531
|
+
var import_react36 = __toESM(require("react"));
|
|
1529
1532
|
var import_react_chartjs_24 = require("react-chartjs-2");
|
|
1530
1533
|
var import_chart4 = require("chart.js");
|
|
1531
1534
|
import_chart4.Chart.register(import_chart4.BarElement, import_chart4.CategoryScale, import_chart4.LinearScale, import_chart4.Tooltip);
|
|
@@ -1587,7 +1590,7 @@ var BarChart = (props) => {
|
|
|
1587
1590
|
}
|
|
1588
1591
|
}
|
|
1589
1592
|
};
|
|
1590
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ import_react36.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react36.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react36.default.createElement(import_react_chartjs_24.Bar, { data, options }));
|
|
1591
1594
|
};
|
|
1592
1595
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1593
1596
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -316,19 +316,10 @@ var MultipleSelectElement = (props) => {
|
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
// src/Components/Button.tsx
|
|
319
|
-
import React12 from "react";
|
|
320
|
-
|
|
321
|
-
// src/constants/icons.tsx
|
|
322
319
|
import React11 from "react";
|
|
323
|
-
var icons = {
|
|
324
|
-
download: /* @__PURE__ */ React11.createElement("svg", { className: "fill-current w-4 h-4 mr-2", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" }, /* @__PURE__ */ React11.createElement("path", { d: "M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z" }))
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
// src/Components/Button.tsx
|
|
328
320
|
var ButtonElement = (props) => {
|
|
329
|
-
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
330
|
-
|
|
331
|
-
return /* @__PURE__ */ React12.createElement(
|
|
321
|
+
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0] === "text-white";
|
|
322
|
+
return /* @__PURE__ */ React11.createElement(
|
|
332
323
|
"button",
|
|
333
324
|
{
|
|
334
325
|
onClick: props.onClick,
|
|
@@ -338,13 +329,25 @@ var ButtonElement = (props) => {
|
|
|
338
329
|
cursor: props.loading ? "no-drop" : "pointer"
|
|
339
330
|
}
|
|
340
331
|
},
|
|
341
|
-
|
|
332
|
+
props.icon && JSON.parse(props.icon),
|
|
333
|
+
/* @__PURE__ */ React11.createElement(
|
|
334
|
+
"span",
|
|
335
|
+
{
|
|
336
|
+
className: props.iconsClassName,
|
|
337
|
+
dangerouslySetInnerHTML: { __html: props.icon || "" }
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
/* @__PURE__ */ React11.createElement("style", null, textColorClass && `.${props.iconsClassName} path {
|
|
341
|
+
filter: brightness(0) invert(1);
|
|
342
|
+
}`, `.${props.iconsClassName}:hover path {
|
|
343
|
+
filter: brightness(0) invert(1);
|
|
344
|
+
}`),
|
|
342
345
|
props.label
|
|
343
346
|
);
|
|
344
347
|
};
|
|
345
348
|
|
|
346
349
|
// src/Components/AddMoreTable.tsx
|
|
347
|
-
import
|
|
350
|
+
import React12, { useEffect, useState as useState4 } from "react";
|
|
348
351
|
import { Table, Button } from "antd";
|
|
349
352
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
350
353
|
var AddMoreTable = (props) => {
|
|
@@ -421,9 +424,9 @@ var AddMoreTable = (props) => {
|
|
|
421
424
|
if (!element) return null;
|
|
422
425
|
const { element: type, label } = element;
|
|
423
426
|
if (type === "single-select") {
|
|
424
|
-
return /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
425
428
|
} else if (type === "textarea") {
|
|
426
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
427
430
|
} else {
|
|
428
431
|
return null;
|
|
429
432
|
}
|
|
@@ -440,13 +443,13 @@ var AddMoreTable = (props) => {
|
|
|
440
443
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
441
444
|
Object.keys(variable).forEach((key) => {
|
|
442
445
|
if (key === "SubRows") {
|
|
443
|
-
rowData[`${key}`] = /* @__PURE__ */
|
|
446
|
+
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
444
447
|
} else {
|
|
445
448
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
446
449
|
}
|
|
447
450
|
});
|
|
448
451
|
});
|
|
449
|
-
rowData.actions = /* @__PURE__ */
|
|
452
|
+
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ React12.createElement(Button, { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
450
453
|
console.log("=====rowdata", rowData);
|
|
451
454
|
return rowData;
|
|
452
455
|
});
|
|
@@ -462,7 +465,7 @@ var AddMoreTable = (props) => {
|
|
|
462
465
|
key: "actions"
|
|
463
466
|
});
|
|
464
467
|
}
|
|
465
|
-
return /* @__PURE__ */
|
|
468
|
+
return /* @__PURE__ */ React12.createElement(
|
|
466
469
|
Table,
|
|
467
470
|
{
|
|
468
471
|
columns,
|
|
@@ -474,15 +477,15 @@ var AddMoreTable = (props) => {
|
|
|
474
477
|
};
|
|
475
478
|
|
|
476
479
|
// src/Components/Sidebar.tsx
|
|
477
|
-
import
|
|
480
|
+
import React13 from "react";
|
|
478
481
|
var Sidebar = (props) => {
|
|
479
482
|
const handleChange = (item) => {
|
|
480
483
|
if (props.onChange) {
|
|
481
484
|
props.onChange(item);
|
|
482
485
|
}
|
|
483
486
|
};
|
|
484
|
-
return /* @__PURE__ */
|
|
485
|
-
return /* @__PURE__ */
|
|
487
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, { key: props.name }, /* @__PURE__ */ React13.createElement("div", { className: props.imgClassName }, /* @__PURE__ */ React13.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ React13.createElement("div", { className: props.listClassName }, props.items?.map((item) => {
|
|
488
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, { key: item.label }, /* @__PURE__ */ React13.createElement(
|
|
486
489
|
ButtonElement,
|
|
487
490
|
{
|
|
488
491
|
...item,
|
|
@@ -498,29 +501,29 @@ var Sidebar = (props) => {
|
|
|
498
501
|
};
|
|
499
502
|
|
|
500
503
|
// src/Components/Navbar.tsx
|
|
501
|
-
import
|
|
504
|
+
import React17 from "react";
|
|
502
505
|
|
|
503
506
|
// src/Components/Notification.tsx
|
|
504
|
-
import
|
|
507
|
+
import React14 from "react";
|
|
505
508
|
import { Popover, Badge, Button as Button2, Avatar, List } from "antd";
|
|
506
509
|
import { IoIosNotifications } from "react-icons/io";
|
|
507
510
|
var popoverContentStyle = {
|
|
508
511
|
minWidth: "300px",
|
|
509
512
|
maxWidth: "100%"
|
|
510
513
|
};
|
|
511
|
-
var Notification = (props) => /* @__PURE__ */
|
|
514
|
+
var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
512
515
|
Popover,
|
|
513
516
|
{
|
|
514
517
|
className: props.className,
|
|
515
|
-
content: /* @__PURE__ */
|
|
518
|
+
content: /* @__PURE__ */ React14.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ React14.createElement(
|
|
516
519
|
List,
|
|
517
520
|
{
|
|
518
521
|
itemLayout: "horizontal",
|
|
519
522
|
dataSource: props.items,
|
|
520
|
-
renderItem: (item, index) => /* @__PURE__ */
|
|
523
|
+
renderItem: (item, index) => /* @__PURE__ */ React14.createElement(List.Item, { key: item.text }, /* @__PURE__ */ React14.createElement(
|
|
521
524
|
List.Item.Meta,
|
|
522
525
|
{
|
|
523
|
-
avatar: /* @__PURE__ */
|
|
526
|
+
avatar: /* @__PURE__ */ React14.createElement(Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
524
527
|
title: item.text,
|
|
525
528
|
description: item.time
|
|
526
529
|
}
|
|
@@ -530,49 +533,49 @@ var Notification = (props) => /* @__PURE__ */ React15.createElement(
|
|
|
530
533
|
trigger: "focus",
|
|
531
534
|
placement: "bottomRight"
|
|
532
535
|
},
|
|
533
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ React14.createElement(Button2, { className: props.buttonClassName }, /* @__PURE__ */ React14.createElement(Badge, { size: "small", count: props.count }, /* @__PURE__ */ React14.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ React14.createElement(IoIosNotifications, null))))
|
|
534
537
|
);
|
|
535
538
|
|
|
536
539
|
// src/Components/SpanElement.tsx
|
|
537
|
-
import
|
|
538
|
-
var SpanElement = (props) => /* @__PURE__ */
|
|
540
|
+
import React15 from "react";
|
|
541
|
+
var SpanElement = (props) => /* @__PURE__ */ React15.createElement("span", { className: props.className }, props.label);
|
|
539
542
|
|
|
540
543
|
// src/Components/Profile.tsx
|
|
541
|
-
import
|
|
544
|
+
import React16 from "react";
|
|
542
545
|
import { Avatar as Avatar2 } from "antd";
|
|
543
546
|
import { UserOutlined } from "@ant-design/icons";
|
|
544
|
-
var Profile = (props) => /* @__PURE__ */
|
|
547
|
+
var Profile = (props) => /* @__PURE__ */ React16.createElement("div", { className: props.className }, /* @__PURE__ */ React16.createElement(Avatar2, { style: { backgroundColor: "#87d068", marginRight: "10px" }, icon: /* @__PURE__ */ React16.createElement(UserOutlined, null) }), /* @__PURE__ */ React16.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ React16.createElement("p", null, props.primaryText), /* @__PURE__ */ React16.createElement("p", { className: props.secondTextClassName }, " ", props.secondaryText)));
|
|
545
548
|
|
|
546
549
|
// src/Components/Navbar.tsx
|
|
547
550
|
var Navbar = (props) => {
|
|
548
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ React17.createElement("div", { className: `${props.className}`, key: props.name }, props.items && props.items.map((item) => {
|
|
549
552
|
if (item.element === "span") {
|
|
550
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ React17.createElement(SpanElement, { ...item });
|
|
551
554
|
} else if (item.element === "notifications") {
|
|
552
|
-
return /* @__PURE__ */
|
|
555
|
+
return /* @__PURE__ */ React17.createElement(Notification, { ...item });
|
|
553
556
|
} else if (item.name === "profile") {
|
|
554
|
-
return /* @__PURE__ */
|
|
557
|
+
return /* @__PURE__ */ React17.createElement(Profile, { ...item });
|
|
555
558
|
}
|
|
556
559
|
return null;
|
|
557
560
|
}));
|
|
558
561
|
};
|
|
559
562
|
|
|
560
563
|
// src/Components/TableElement.tsx
|
|
561
|
-
import
|
|
564
|
+
import React20, { useState as useState5, useEffect as useEffect2 } from "react";
|
|
562
565
|
import { Table as Table2 } from "antd";
|
|
563
566
|
|
|
564
567
|
// src/Components/Model.tsx
|
|
565
|
-
import
|
|
568
|
+
import React19 from "react";
|
|
566
569
|
import { Modal } from "antd";
|
|
567
570
|
|
|
568
571
|
// src/Components/ModelBody.tsx
|
|
569
|
-
import
|
|
572
|
+
import React18 from "react";
|
|
570
573
|
import moment from "moment";
|
|
571
574
|
var ModelBody = (props) => {
|
|
572
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ React18.createElement("div", { className: props.modalContent && props.modalContent.className }, props.modalContent && props.modalContent.fields.map(
|
|
573
576
|
(eachField) => {
|
|
574
577
|
if (eachField.element === "div") {
|
|
575
|
-
return /* @__PURE__ */
|
|
578
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: eachField.className }, eachField.label), eachField.dateTime ? /* @__PURE__ */ React18.createElement(
|
|
576
579
|
"p",
|
|
577
580
|
{
|
|
578
581
|
style: {
|
|
@@ -583,7 +586,7 @@ var ModelBody = (props) => {
|
|
|
583
586
|
moment(eachField.dateTime).format("LT")
|
|
584
587
|
) : "");
|
|
585
588
|
} else if (eachField.element === "input-radio") {
|
|
586
|
-
return /* @__PURE__ */
|
|
589
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: eachField.className }, /* @__PURE__ */ React18.createElement(RadioElement, { ...eachField })), eachField.dateTime ? /* @__PURE__ */ React18.createElement(
|
|
587
590
|
"p",
|
|
588
591
|
{
|
|
589
592
|
style: {
|
|
@@ -594,7 +597,7 @@ var ModelBody = (props) => {
|
|
|
594
597
|
moment(eachField.dateTime).format("LT")
|
|
595
598
|
) : "");
|
|
596
599
|
} else if (eachField.element === "button") {
|
|
597
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: eachField.className }, /* @__PURE__ */ React18.createElement(ButtonElement, { ...eachField })), eachField.dateTime ? /* @__PURE__ */ React18.createElement(
|
|
598
601
|
"p",
|
|
599
602
|
{
|
|
600
603
|
style: {
|
|
@@ -614,7 +617,7 @@ var ModelBody = (props) => {
|
|
|
614
617
|
// src/Components/Model.tsx
|
|
615
618
|
var ModelElement = (props) => {
|
|
616
619
|
const { model, onCancel, selectedRecord, columns } = props;
|
|
617
|
-
return /* @__PURE__ */
|
|
620
|
+
return /* @__PURE__ */ React19.createElement(
|
|
618
621
|
Modal,
|
|
619
622
|
{
|
|
620
623
|
centered: true,
|
|
@@ -622,7 +625,7 @@ var ModelElement = (props) => {
|
|
|
622
625
|
onCancel,
|
|
623
626
|
footer: null,
|
|
624
627
|
width: 850,
|
|
625
|
-
title: /* @__PURE__ */
|
|
628
|
+
title: /* @__PURE__ */ React19.createElement(
|
|
626
629
|
"div",
|
|
627
630
|
{
|
|
628
631
|
style: {
|
|
@@ -635,7 +638,7 @@ var ModelElement = (props) => {
|
|
|
635
638
|
},
|
|
636
639
|
columns.map((eachColumn) => {
|
|
637
640
|
if (!["index", "View"].includes(eachColumn.key) && eachColumn?.["is_detail"] !== false) {
|
|
638
|
-
return /* @__PURE__ */
|
|
641
|
+
return /* @__PURE__ */ React19.createElement("p", { style: { fontWeight: "500", padding: "10px" } }, /* @__PURE__ */ React19.createElement(
|
|
639
642
|
"span",
|
|
640
643
|
{
|
|
641
644
|
style: {
|
|
@@ -652,7 +655,7 @@ var ModelElement = (props) => {
|
|
|
652
655
|
})
|
|
653
656
|
)
|
|
654
657
|
},
|
|
655
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ React19.createElement(ModelBody, { ...props })
|
|
656
659
|
);
|
|
657
660
|
};
|
|
658
661
|
|
|
@@ -715,7 +718,7 @@ var TableElement = (props) => {
|
|
|
715
718
|
dataIndex: "View",
|
|
716
719
|
key: "View",
|
|
717
720
|
render: (_, record) => {
|
|
718
|
-
return /* @__PURE__ */
|
|
721
|
+
return /* @__PURE__ */ React20.createElement(
|
|
719
722
|
"a",
|
|
720
723
|
{
|
|
721
724
|
onClick: () => {
|
|
@@ -726,7 +729,7 @@ var TableElement = (props) => {
|
|
|
726
729
|
}
|
|
727
730
|
}
|
|
728
731
|
},
|
|
729
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ React20.createElement(EyeOutlined, null)
|
|
730
733
|
);
|
|
731
734
|
}
|
|
732
735
|
});
|
|
@@ -759,7 +762,7 @@ var TableElement = (props) => {
|
|
|
759
762
|
}
|
|
760
763
|
}
|
|
761
764
|
} : void 0;
|
|
762
|
-
return /* @__PURE__ */
|
|
765
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
|
|
763
766
|
Table2,
|
|
764
767
|
{
|
|
765
768
|
loading: props.loading,
|
|
@@ -790,7 +793,7 @@ var TableElement = (props) => {
|
|
|
790
793
|
bordered: true,
|
|
791
794
|
onChange: onChangeTable
|
|
792
795
|
}
|
|
793
|
-
), model && /* @__PURE__ */
|
|
796
|
+
), model && /* @__PURE__ */ React20.createElement(
|
|
794
797
|
ModelElement,
|
|
795
798
|
{
|
|
796
799
|
selectedRecord,
|
|
@@ -803,7 +806,7 @@ var TableElement = (props) => {
|
|
|
803
806
|
};
|
|
804
807
|
|
|
805
808
|
// src/Components/DatePicker.tsx
|
|
806
|
-
import
|
|
809
|
+
import React21, { useState as useState6 } from "react";
|
|
807
810
|
import { DatePicker } from "antd";
|
|
808
811
|
import dayjs from "dayjs";
|
|
809
812
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
@@ -828,7 +831,7 @@ var DatePickerElement = (props) => {
|
|
|
828
831
|
const disabledDate = (current) => {
|
|
829
832
|
return current && current > moment2();
|
|
830
833
|
};
|
|
831
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement(
|
|
832
835
|
DatePicker,
|
|
833
836
|
{
|
|
834
837
|
disabledDate,
|
|
@@ -841,7 +844,7 @@ var DatePickerElement = (props) => {
|
|
|
841
844
|
};
|
|
842
845
|
|
|
843
846
|
// src/Components/DateRangePickerElement.tsx
|
|
844
|
-
import
|
|
847
|
+
import React22 from "react";
|
|
845
848
|
import { DatePicker as DatePicker2, Space } from "antd";
|
|
846
849
|
import dayjs2 from "dayjs";
|
|
847
850
|
import moment3 from "moment";
|
|
@@ -864,7 +867,7 @@ var DateRangePickerElement = (props) => {
|
|
|
864
867
|
const disabledDate = (current) => {
|
|
865
868
|
return current && current > moment3();
|
|
866
869
|
};
|
|
867
|
-
return /* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ React22.createElement(Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ React22.createElement(
|
|
868
871
|
RangePicker,
|
|
869
872
|
{
|
|
870
873
|
disabledDate,
|
|
@@ -877,13 +880,13 @@ var DateRangePickerElement = (props) => {
|
|
|
877
880
|
};
|
|
878
881
|
|
|
879
882
|
// src/Components/Image.tsx
|
|
880
|
-
import
|
|
883
|
+
import React23 from "react";
|
|
881
884
|
var Image = (props) => {
|
|
882
|
-
return /* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ React23.createElement("img", { className: props.className, src: props.img, alt: "image" });
|
|
883
886
|
};
|
|
884
887
|
|
|
885
888
|
// src/Components/SingleCheckbox.tsx
|
|
886
|
-
import
|
|
889
|
+
import React24 from "react";
|
|
887
890
|
import { Checkbox as Checkbox2 } from "antd";
|
|
888
891
|
var SingleCheckbox = (props) => {
|
|
889
892
|
const handleChange = (e) => {
|
|
@@ -891,11 +894,11 @@ var SingleCheckbox = (props) => {
|
|
|
891
894
|
props.onChange(e.target.checked);
|
|
892
895
|
}
|
|
893
896
|
};
|
|
894
|
-
return /* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ React24.createElement(Checkbox2, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
895
898
|
};
|
|
896
899
|
|
|
897
900
|
// src/Components/DropDownGroup.tsx
|
|
898
|
-
import
|
|
901
|
+
import React25, { useState as useState7 } from "react";
|
|
899
902
|
import { Select as Select4 } from "antd";
|
|
900
903
|
var DropDownGroup = (props) => {
|
|
901
904
|
const [selectedValue, setSelectedValue] = useState7({
|
|
@@ -930,7 +933,7 @@ var DropDownGroup = (props) => {
|
|
|
930
933
|
return newValue;
|
|
931
934
|
});
|
|
932
935
|
};
|
|
933
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ React25.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React25.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React25.createElement("div", { className: props.subContainerClassName }, /* @__PURE__ */ React25.createElement(
|
|
934
937
|
Select4,
|
|
935
938
|
{
|
|
936
939
|
onChange: handleFirstChange,
|
|
@@ -938,7 +941,7 @@ var DropDownGroup = (props) => {
|
|
|
938
941
|
options: props.firstOptions,
|
|
939
942
|
className: props.className
|
|
940
943
|
}
|
|
941
|
-
), /* @__PURE__ */
|
|
944
|
+
), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React25.createElement(
|
|
942
945
|
Select4,
|
|
943
946
|
{
|
|
944
947
|
onChange: handleSecondChange,
|
|
@@ -950,7 +953,7 @@ var DropDownGroup = (props) => {
|
|
|
950
953
|
};
|
|
951
954
|
|
|
952
955
|
// src/Components/FilesUpload.tsx
|
|
953
|
-
import
|
|
956
|
+
import React26, { useState as useState8 } from "react";
|
|
954
957
|
import { Upload } from "antd";
|
|
955
958
|
import { InboxOutlined } from "@ant-design/icons";
|
|
956
959
|
var FileUpload = (props) => {
|
|
@@ -970,7 +973,7 @@ var FileUpload = (props) => {
|
|
|
970
973
|
onSuccess("ok");
|
|
971
974
|
}, 0);
|
|
972
975
|
};
|
|
973
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ React26.createElement("div", null, /* @__PURE__ */ React26.createElement(
|
|
974
977
|
Dragger,
|
|
975
978
|
{
|
|
976
979
|
action: "",
|
|
@@ -983,13 +986,13 @@ var FileUpload = (props) => {
|
|
|
983
986
|
showUploadList: true,
|
|
984
987
|
customRequest
|
|
985
988
|
},
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ React26.createElement("p", null, /* @__PURE__ */ React26.createElement(InboxOutlined, null)),
|
|
990
|
+
/* @__PURE__ */ React26.createElement("p", null, "Click or drag file to upload")
|
|
988
991
|
));
|
|
989
992
|
};
|
|
990
993
|
|
|
991
994
|
// src/Components/TabsElement.tsx
|
|
992
|
-
import
|
|
995
|
+
import React27 from "react";
|
|
993
996
|
import { Tabs } from "antd";
|
|
994
997
|
var TabsElement = (props) => {
|
|
995
998
|
const handleChange = (key) => {
|
|
@@ -997,19 +1000,19 @@ var TabsElement = (props) => {
|
|
|
997
1000
|
props.onChange(props.options?.find((eachOption) => eachOption.key === key));
|
|
998
1001
|
}
|
|
999
1002
|
};
|
|
1000
|
-
return /* @__PURE__ */
|
|
1003
|
+
return /* @__PURE__ */ React27.createElement(Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
1001
1004
|
};
|
|
1002
1005
|
|
|
1003
1006
|
// src/Components/SwitchElement.tsx
|
|
1004
|
-
import
|
|
1007
|
+
import React28 from "react";
|
|
1005
1008
|
import { Switch } from "antd";
|
|
1006
1009
|
var onChange = (checked) => {
|
|
1007
1010
|
console.log(`switch to ${checked}`);
|
|
1008
1011
|
};
|
|
1009
|
-
var SwitchElement = () => /* @__PURE__ */
|
|
1012
|
+
var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
|
|
1010
1013
|
|
|
1011
1014
|
// src/Components/Upload.tsx
|
|
1012
|
-
import
|
|
1015
|
+
import React29, { useState as useState9 } from "react";
|
|
1013
1016
|
var Upload2 = (props) => {
|
|
1014
1017
|
const [file, setFile] = useState9();
|
|
1015
1018
|
const handleFileChange = (e) => {
|
|
@@ -1024,7 +1027,7 @@ var Upload2 = (props) => {
|
|
|
1024
1027
|
return;
|
|
1025
1028
|
}
|
|
1026
1029
|
};
|
|
1027
|
-
return /* @__PURE__ */
|
|
1030
|
+
return /* @__PURE__ */ React29.createElement("div", { style: { marginTop: 16 } }, /* @__PURE__ */ React29.createElement("input", { type: "file", onChange: handleFileChange }), /* @__PURE__ */ React29.createElement(
|
|
1028
1031
|
"button",
|
|
1029
1032
|
{
|
|
1030
1033
|
type: "button",
|
|
@@ -1037,7 +1040,7 @@ var Upload2 = (props) => {
|
|
|
1037
1040
|
};
|
|
1038
1041
|
|
|
1039
1042
|
// src/Components/OtpElement.tsx
|
|
1040
|
-
import
|
|
1043
|
+
import React30, { useState as useState10, useRef, useEffect as useEffect3 } from "react";
|
|
1041
1044
|
import { Input as Input3 } from "antd";
|
|
1042
1045
|
var OtpElement = (props) => {
|
|
1043
1046
|
const length = props.length;
|
|
@@ -1077,7 +1080,7 @@ var OtpElement = (props) => {
|
|
|
1077
1080
|
useEffect3(() => {
|
|
1078
1081
|
inputRefs.current[0]?.focus();
|
|
1079
1082
|
}, []);
|
|
1080
|
-
return /* @__PURE__ */
|
|
1083
|
+
return /* @__PURE__ */ React30.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ React30.createElement(
|
|
1081
1084
|
Input3,
|
|
1082
1085
|
{
|
|
1083
1086
|
key: index,
|
|
@@ -1093,7 +1096,7 @@ var OtpElement = (props) => {
|
|
|
1093
1096
|
};
|
|
1094
1097
|
|
|
1095
1098
|
// src/Components/CircleDonut.tsx
|
|
1096
|
-
import
|
|
1099
|
+
import React31 from "react";
|
|
1097
1100
|
import { Doughnut } from "react-chartjs-2";
|
|
1098
1101
|
import {
|
|
1099
1102
|
Chart as ChartJS,
|
|
@@ -1176,11 +1179,11 @@ var CircleDonut = (props) => {
|
|
|
1176
1179
|
ctx.restore();
|
|
1177
1180
|
}
|
|
1178
1181
|
};
|
|
1179
|
-
return /* @__PURE__ */
|
|
1182
|
+
return /* @__PURE__ */ React31.createElement("div", { className: props.className }, /* @__PURE__ */ React31.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ React31.createElement(Doughnut, { data, options, plugins: [centerTextPlugin] }));
|
|
1180
1183
|
};
|
|
1181
1184
|
|
|
1182
1185
|
// src/Components/SemiCircleDonut.tsx
|
|
1183
|
-
import
|
|
1186
|
+
import React32 from "react";
|
|
1184
1187
|
import { Doughnut as Doughnut2 } from "react-chartjs-2";
|
|
1185
1188
|
import {
|
|
1186
1189
|
Chart as ChartJS2,
|
|
@@ -1263,11 +1266,11 @@ var SemiCircleDonut = (props) => {
|
|
|
1263
1266
|
ctx.restore();
|
|
1264
1267
|
}
|
|
1265
1268
|
};
|
|
1266
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ React32.createElement("div", { className: props.className }, /* @__PURE__ */ React32.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ React32.createElement(Doughnut2, { data, options, plugins: [centerTextPlugin] }));
|
|
1267
1270
|
};
|
|
1268
1271
|
|
|
1269
1272
|
// src/Components/HorizontalBarChart.tsx
|
|
1270
|
-
import
|
|
1273
|
+
import React33 from "react";
|
|
1271
1274
|
import { Bar } from "react-chartjs-2";
|
|
1272
1275
|
import {
|
|
1273
1276
|
Chart as ChartJS3,
|
|
@@ -1322,11 +1325,11 @@ var HorizontalBarChart = (props) => {
|
|
|
1322
1325
|
}
|
|
1323
1326
|
}
|
|
1324
1327
|
};
|
|
1325
|
-
return /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ React33.createElement("div", { className: props.className }, /* @__PURE__ */ React33.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ React33.createElement(Bar, { data, options }));
|
|
1326
1329
|
};
|
|
1327
1330
|
|
|
1328
1331
|
// src/Components/LineChart.tsx
|
|
1329
|
-
import
|
|
1332
|
+
import React34, { useEffect as useEffect4, useRef as useRef2 } from "react";
|
|
1330
1333
|
import Chart from "chart.js/auto";
|
|
1331
1334
|
var LineChart = (props) => {
|
|
1332
1335
|
const chartRef = useRef2(null);
|
|
@@ -1395,11 +1398,11 @@ var LineChart = (props) => {
|
|
|
1395
1398
|
}
|
|
1396
1399
|
};
|
|
1397
1400
|
}, [labels, data]);
|
|
1398
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ React34.createElement("div", { className: props.className }, /* @__PURE__ */ React34.createElement("canvas", { ref: chartRef }));
|
|
1399
1402
|
};
|
|
1400
1403
|
|
|
1401
1404
|
// src/Components/DoubleBarChart.tsx
|
|
1402
|
-
import
|
|
1405
|
+
import React35, { useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
1403
1406
|
import Chart2 from "chart.js/auto";
|
|
1404
1407
|
var DoubleBarChart = (props) => {
|
|
1405
1408
|
const chartRef = useRef3(null);
|
|
@@ -1473,11 +1476,11 @@ var DoubleBarChart = (props) => {
|
|
|
1473
1476
|
}
|
|
1474
1477
|
};
|
|
1475
1478
|
}, []);
|
|
1476
|
-
return /* @__PURE__ */
|
|
1479
|
+
return /* @__PURE__ */ React35.createElement("div", { className: props.className }, /* @__PURE__ */ React35.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ React35.createElement("canvas", { ref: chartRef }));
|
|
1477
1480
|
};
|
|
1478
1481
|
|
|
1479
1482
|
// src/Components/BarChart.tsx
|
|
1480
|
-
import
|
|
1483
|
+
import React36 from "react";
|
|
1481
1484
|
import { Bar as Bar2 } from "react-chartjs-2";
|
|
1482
1485
|
import {
|
|
1483
1486
|
Chart as ChartJS4,
|
|
@@ -1545,7 +1548,7 @@ var BarChart = (props) => {
|
|
|
1545
1548
|
}
|
|
1546
1549
|
}
|
|
1547
1550
|
};
|
|
1548
|
-
return /* @__PURE__ */
|
|
1551
|
+
return /* @__PURE__ */ React36.createElement("div", { className: props.className }, /* @__PURE__ */ React36.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ React36.createElement(Bar2, { data, options }));
|
|
1549
1552
|
};
|
|
1550
1553
|
export {
|
|
1551
1554
|
AddMoreTable,
|