@apexcura/ui-components 0.0.14-Beta99 → 0.0.15-Beta
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 +26 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -44
- package/dist/index.mjs +18 -14
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -335,15 +335,35 @@ video {
|
|
|
335
335
|
.visible {
|
|
336
336
|
visibility: visible;
|
|
337
337
|
}
|
|
338
|
+
.fixed {
|
|
339
|
+
position: fixed;
|
|
340
|
+
}
|
|
338
341
|
.m-\[10px\] {
|
|
339
342
|
margin: 10px;
|
|
340
343
|
}
|
|
344
|
+
.mr-3 {
|
|
345
|
+
margin-right: 0.75rem;
|
|
346
|
+
}
|
|
341
347
|
.flex {
|
|
342
348
|
display: flex;
|
|
343
349
|
}
|
|
344
350
|
.table {
|
|
345
351
|
display: table;
|
|
346
352
|
}
|
|
353
|
+
.h-5 {
|
|
354
|
+
height: 1.25rem;
|
|
355
|
+
}
|
|
356
|
+
.w-5 {
|
|
357
|
+
width: 1.25rem;
|
|
358
|
+
}
|
|
359
|
+
@keyframes spin {
|
|
360
|
+
to {
|
|
361
|
+
transform: rotate(360deg);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
.animate-spin {
|
|
365
|
+
animation: spin 1s linear infinite;
|
|
366
|
+
}
|
|
347
367
|
.rounded-\[8px\] {
|
|
348
368
|
border-radius: 8px;
|
|
349
369
|
}
|
|
@@ -382,6 +402,12 @@ video {
|
|
|
382
402
|
--tw-text-opacity: 1;
|
|
383
403
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
384
404
|
}
|
|
405
|
+
.opacity-25 {
|
|
406
|
+
opacity: 0.25;
|
|
407
|
+
}
|
|
408
|
+
.opacity-75 {
|
|
409
|
+
opacity: 0.75;
|
|
410
|
+
}
|
|
385
411
|
.shadow-\[0px_0px_1px_1px_\#919191\] {
|
|
386
412
|
--tw-shadow: 0px 0px 1px 1px #919191;
|
|
387
413
|
--tw-shadow-colored: 0px 0px 1px 1px var(--tw-shadow-color);
|
package/dist/index.d.mts
CHANGED
|
@@ -120,6 +120,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
|
120
120
|
|
|
121
121
|
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
122
122
|
|
|
123
|
-
declare const Donut: (props:
|
|
123
|
+
declare const Donut: (props: ElementType) => React$1.JSX.Element;
|
|
124
124
|
|
|
125
125
|
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.d.ts
CHANGED
|
@@ -120,6 +120,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
|
120
120
|
|
|
121
121
|
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
122
122
|
|
|
123
|
-
declare const Donut: (props:
|
|
123
|
+
declare const Donut: (props: ElementType) => React$1.JSX.Element;
|
|
124
124
|
|
|
125
125
|
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -378,7 +378,6 @@ var MultipleSelectElement = (props) => {
|
|
|
378
378
|
|
|
379
379
|
// src/Components/Button.tsx
|
|
380
380
|
var import_react11 = __toESM(require("react"));
|
|
381
|
-
var import_antd10 = require("antd");
|
|
382
381
|
var ButtonElement = (props) => {
|
|
383
382
|
const [svgContent, setSvgContent] = (0, import_react11.useState)(null);
|
|
384
383
|
const [originalSvgContent, setOriginalSvgContent] = (0, import_react11.useState)(null);
|
|
@@ -418,7 +417,7 @@ var ButtonElement = (props) => {
|
|
|
418
417
|
}
|
|
419
418
|
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
420
419
|
}
|
|
421
|
-
}, [
|
|
420
|
+
}, []);
|
|
422
421
|
const handleMouseEnter = () => {
|
|
423
422
|
if (hoverColor && originalSvgContent) {
|
|
424
423
|
const tempDiv = document.createElement("div");
|
|
@@ -435,27 +434,26 @@ var ButtonElement = (props) => {
|
|
|
435
434
|
}
|
|
436
435
|
};
|
|
437
436
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
438
|
-
|
|
437
|
+
"button",
|
|
439
438
|
{
|
|
440
439
|
onClick: props.onClick,
|
|
441
440
|
className: `${props.className ? props.className : ""}`,
|
|
442
441
|
onMouseEnter: handleMouseEnter,
|
|
443
442
|
onMouseLeave: handleMouseLeave,
|
|
444
|
-
|
|
443
|
+
disabled: props.loading
|
|
445
444
|
},
|
|
446
|
-
props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
445
|
+
props.loading ? /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("svg", { className: "animate-spin h-5 w-5 mr-3", viewBox: "0 0 24 24" }, /* @__PURE__ */ import_react11.default.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ import_react11.default.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8H4z" })), props.label) : /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
447
446
|
"span",
|
|
448
447
|
{
|
|
449
448
|
dangerouslySetInnerHTML: { __html: svgContent }
|
|
450
449
|
}
|
|
451
|
-
),
|
|
452
|
-
props.label
|
|
450
|
+
), props.label)
|
|
453
451
|
);
|
|
454
452
|
};
|
|
455
453
|
|
|
456
454
|
// src/Components/AddMoreTable.tsx
|
|
457
455
|
var import_react12 = __toESM(require("react"));
|
|
458
|
-
var
|
|
456
|
+
var import_antd10 = require("antd");
|
|
459
457
|
var import_icons2 = require("@ant-design/icons");
|
|
460
458
|
var AddMoreTable = (props) => {
|
|
461
459
|
const { thead, tbody } = props;
|
|
@@ -550,13 +548,13 @@ var AddMoreTable = (props) => {
|
|
|
550
548
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
551
549
|
Object.keys(variable).forEach((key) => {
|
|
552
550
|
if (key === "SubRows") {
|
|
553
|
-
rowData[`${key}`] = /* @__PURE__ */ import_react12.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react12.default.createElement(
|
|
551
|
+
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)));
|
|
554
552
|
} else {
|
|
555
553
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
556
554
|
}
|
|
557
555
|
});
|
|
558
556
|
});
|
|
559
|
-
rowData.actions = /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement(
|
|
557
|
+
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)));
|
|
560
558
|
console.log("=====rowdata", rowData);
|
|
561
559
|
return rowData;
|
|
562
560
|
});
|
|
@@ -573,7 +571,7 @@ var AddMoreTable = (props) => {
|
|
|
573
571
|
});
|
|
574
572
|
}
|
|
575
573
|
return /* @__PURE__ */ import_react12.default.createElement(
|
|
576
|
-
|
|
574
|
+
import_antd10.Table,
|
|
577
575
|
{
|
|
578
576
|
columns,
|
|
579
577
|
dataSource,
|
|
@@ -612,25 +610,25 @@ var import_react17 = __toESM(require("react"));
|
|
|
612
610
|
|
|
613
611
|
// src/Components/Notification.tsx
|
|
614
612
|
var import_react14 = __toESM(require("react"));
|
|
615
|
-
var
|
|
613
|
+
var import_antd11 = require("antd");
|
|
616
614
|
var import_io = require("react-icons/io");
|
|
617
615
|
var popoverContentStyle = {
|
|
618
616
|
minWidth: "300px",
|
|
619
617
|
maxWidth: "100%"
|
|
620
618
|
};
|
|
621
619
|
var Notification = (props) => /* @__PURE__ */ import_react14.default.createElement(
|
|
622
|
-
|
|
620
|
+
import_antd11.Popover,
|
|
623
621
|
{
|
|
624
622
|
className: props.className,
|
|
625
623
|
content: /* @__PURE__ */ import_react14.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react14.default.createElement(
|
|
626
|
-
|
|
624
|
+
import_antd11.List,
|
|
627
625
|
{
|
|
628
626
|
itemLayout: "horizontal",
|
|
629
627
|
dataSource: props.items,
|
|
630
|
-
renderItem: (item, index) => /* @__PURE__ */ import_react14.default.createElement(
|
|
631
|
-
|
|
628
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react14.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react14.default.createElement(
|
|
629
|
+
import_antd11.List.Item.Meta,
|
|
632
630
|
{
|
|
633
|
-
avatar: /* @__PURE__ */ import_react14.default.createElement(
|
|
631
|
+
avatar: /* @__PURE__ */ import_react14.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
634
632
|
title: item.text,
|
|
635
633
|
description: item.time
|
|
636
634
|
}
|
|
@@ -640,7 +638,7 @@ var Notification = (props) => /* @__PURE__ */ import_react14.default.createEleme
|
|
|
640
638
|
trigger: "focus",
|
|
641
639
|
placement: "bottomRight"
|
|
642
640
|
},
|
|
643
|
-
/* @__PURE__ */ import_react14.default.createElement(
|
|
641
|
+
/* @__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))))
|
|
644
642
|
);
|
|
645
643
|
|
|
646
644
|
// src/Components/SpanElement.tsx
|
|
@@ -649,9 +647,9 @@ var SpanElement = (props) => /* @__PURE__ */ import_react15.default.createElemen
|
|
|
649
647
|
|
|
650
648
|
// src/Components/Profile.tsx
|
|
651
649
|
var import_react16 = __toESM(require("react"));
|
|
652
|
-
var
|
|
650
|
+
var import_antd12 = require("antd");
|
|
653
651
|
var import_icons3 = require("@ant-design/icons");
|
|
654
|
-
var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react16.default.createElement(
|
|
652
|
+
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)));
|
|
655
653
|
|
|
656
654
|
// src/Components/Navbar.tsx
|
|
657
655
|
var Navbar = (props) => {
|
|
@@ -669,11 +667,11 @@ var Navbar = (props) => {
|
|
|
669
667
|
|
|
670
668
|
// src/Components/TableElement.tsx
|
|
671
669
|
var import_react20 = __toESM(require("react"));
|
|
672
|
-
var
|
|
670
|
+
var import_antd14 = require("antd");
|
|
673
671
|
|
|
674
672
|
// src/Components/Model.tsx
|
|
675
673
|
var import_react19 = __toESM(require("react"));
|
|
676
|
-
var
|
|
674
|
+
var import_antd13 = require("antd");
|
|
677
675
|
|
|
678
676
|
// src/Components/ModelBody.tsx
|
|
679
677
|
var import_react18 = __toESM(require("react"));
|
|
@@ -695,7 +693,7 @@ var ModelBody = (props) => {
|
|
|
695
693
|
var ModelElement = (props) => {
|
|
696
694
|
const { model, onCancel, selectedRecord, columns } = props;
|
|
697
695
|
return /* @__PURE__ */ import_react19.default.createElement(
|
|
698
|
-
|
|
696
|
+
import_antd13.Modal,
|
|
699
697
|
{
|
|
700
698
|
centered: true,
|
|
701
699
|
open: model,
|
|
@@ -740,7 +738,8 @@ var TableElement = (props) => {
|
|
|
740
738
|
{
|
|
741
739
|
title: "#",
|
|
742
740
|
dataIndex: "#",
|
|
743
|
-
key: "#"
|
|
741
|
+
key: "#",
|
|
742
|
+
fixed: "left"
|
|
744
743
|
},
|
|
745
744
|
...thead.map((col, ind) => ({
|
|
746
745
|
title: col.label,
|
|
@@ -798,7 +797,7 @@ var TableElement = (props) => {
|
|
|
798
797
|
}
|
|
799
798
|
} : void 0;
|
|
800
799
|
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
801
|
-
|
|
800
|
+
import_antd14.Table,
|
|
802
801
|
{
|
|
803
802
|
className: props.className,
|
|
804
803
|
pagination: {
|
|
@@ -811,14 +810,15 @@ var TableElement = (props) => {
|
|
|
811
810
|
dataSource,
|
|
812
811
|
columns,
|
|
813
812
|
size: props.size,
|
|
814
|
-
bordered: true
|
|
813
|
+
bordered: true,
|
|
814
|
+
scroll: { x: 1300 }
|
|
815
815
|
}
|
|
816
816
|
), model && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
817
817
|
};
|
|
818
818
|
|
|
819
819
|
// src/Components/DatePicker.tsx
|
|
820
820
|
var import_react21 = __toESM(require("react"));
|
|
821
|
-
var
|
|
821
|
+
var import_antd15 = require("antd");
|
|
822
822
|
var import_dayjs = __toESM(require("dayjs"));
|
|
823
823
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
824
824
|
import_dayjs.default.extend(import_customParseFormat.default);
|
|
@@ -839,7 +839,7 @@ var DatePickerElement = (props) => {
|
|
|
839
839
|
}
|
|
840
840
|
};
|
|
841
841
|
return /* @__PURE__ */ import_react21.default.createElement("div", null, /* @__PURE__ */ import_react21.default.createElement(
|
|
842
|
-
|
|
842
|
+
import_antd15.DatePicker,
|
|
843
843
|
{
|
|
844
844
|
placeholder: props.placeholder,
|
|
845
845
|
value: dateState,
|
|
@@ -851,10 +851,10 @@ var DatePickerElement = (props) => {
|
|
|
851
851
|
|
|
852
852
|
// src/Components/DateRangePickerElement.tsx
|
|
853
853
|
var import_react22 = __toESM(require("react"));
|
|
854
|
-
var
|
|
854
|
+
var import_antd16 = require("antd");
|
|
855
855
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
856
856
|
var DateRangePickerElement = (props) => {
|
|
857
|
-
const { RangePicker } =
|
|
857
|
+
const { RangePicker } = import_antd16.DatePicker;
|
|
858
858
|
const handleChange = (dates, dateStrings) => {
|
|
859
859
|
if (dates && props.onChange) {
|
|
860
860
|
props.onChange(dateStrings);
|
|
@@ -868,7 +868,7 @@ var DateRangePickerElement = (props) => {
|
|
|
868
868
|
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().add(-30, "d"), (0, import_dayjs2.default)()] },
|
|
869
869
|
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().add(-90, "d"), (0, import_dayjs2.default)()] }
|
|
870
870
|
];
|
|
871
|
-
return /* @__PURE__ */ import_react22.default.createElement(
|
|
871
|
+
return /* @__PURE__ */ import_react22.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react22.default.createElement(RangePicker, { presets: rangePresets, onChange: handleChange }));
|
|
872
872
|
};
|
|
873
873
|
|
|
874
874
|
// src/Components/Image.tsx
|
|
@@ -879,19 +879,19 @@ var Image = (props) => {
|
|
|
879
879
|
|
|
880
880
|
// src/Components/SingleCheckbox.tsx
|
|
881
881
|
var import_react24 = __toESM(require("react"));
|
|
882
|
-
var
|
|
882
|
+
var import_antd17 = require("antd");
|
|
883
883
|
var SingleCheckbox = (props) => {
|
|
884
884
|
const handleChange = (e) => {
|
|
885
885
|
if (props.onChange) {
|
|
886
886
|
props.onChange(e.target.checked);
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
|
-
return /* @__PURE__ */ import_react24.default.createElement(
|
|
889
|
+
return /* @__PURE__ */ import_react24.default.createElement(import_antd17.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
890
890
|
};
|
|
891
891
|
|
|
892
892
|
// src/Components/DropDownGroup.tsx
|
|
893
893
|
var import_react25 = __toESM(require("react"));
|
|
894
|
-
var
|
|
894
|
+
var import_antd18 = require("antd");
|
|
895
895
|
var DropDownGroup = (props) => {
|
|
896
896
|
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
897
897
|
firstValue: {},
|
|
@@ -926,7 +926,7 @@ var DropDownGroup = (props) => {
|
|
|
926
926
|
});
|
|
927
927
|
};
|
|
928
928
|
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(
|
|
929
|
-
|
|
929
|
+
import_antd18.Select,
|
|
930
930
|
{
|
|
931
931
|
onChange: handleFirstChange,
|
|
932
932
|
variant: props.variant,
|
|
@@ -934,7 +934,7 @@ var DropDownGroup = (props) => {
|
|
|
934
934
|
className: props.className
|
|
935
935
|
}
|
|
936
936
|
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
937
|
-
|
|
937
|
+
import_antd18.Select,
|
|
938
938
|
{
|
|
939
939
|
onChange: handleSecondChange,
|
|
940
940
|
variant: props.variant,
|
|
@@ -946,10 +946,10 @@ var DropDownGroup = (props) => {
|
|
|
946
946
|
|
|
947
947
|
// src/Components/FilesUpload.tsx
|
|
948
948
|
var import_react26 = __toESM(require("react"));
|
|
949
|
-
var
|
|
949
|
+
var import_antd19 = require("antd");
|
|
950
950
|
var import_icons4 = require("@ant-design/icons");
|
|
951
951
|
var FileUpload = (props) => {
|
|
952
|
-
const { Dragger } =
|
|
952
|
+
const { Dragger } = import_antd19.Upload;
|
|
953
953
|
const [files, setFiles] = (0, import_react26.useState)([]);
|
|
954
954
|
const handleChange = ({ fileList }) => {
|
|
955
955
|
setFiles(fileList);
|
|
@@ -985,23 +985,23 @@ var FileUpload = (props) => {
|
|
|
985
985
|
|
|
986
986
|
// src/Components/TabsElement.tsx
|
|
987
987
|
var import_react27 = __toESM(require("react"));
|
|
988
|
-
var
|
|
988
|
+
var import_antd20 = require("antd");
|
|
989
989
|
var TabsElement = (props) => {
|
|
990
990
|
const handleChange = (key) => {
|
|
991
991
|
if (props.onChange) {
|
|
992
992
|
props.onChange(props.options?.find((eachOption) => eachOption.key === key));
|
|
993
993
|
}
|
|
994
994
|
};
|
|
995
|
-
return /* @__PURE__ */ import_react27.default.createElement(
|
|
995
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_antd20.Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
996
996
|
};
|
|
997
997
|
|
|
998
998
|
// src/Components/SwitchElement.tsx
|
|
999
999
|
var import_react28 = __toESM(require("react"));
|
|
1000
|
-
var
|
|
1000
|
+
var import_antd21 = require("antd");
|
|
1001
1001
|
var onChange = (checked) => {
|
|
1002
1002
|
console.log(`switch to ${checked}`);
|
|
1003
1003
|
};
|
|
1004
|
-
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(
|
|
1004
|
+
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(import_antd21.Switch, { defaultChecked: true, onChange });
|
|
1005
1005
|
|
|
1006
1006
|
// src/Components/Upload.tsx
|
|
1007
1007
|
var import_react29 = __toESM(require("react"));
|
|
@@ -1033,7 +1033,7 @@ var Upload2 = (props) => {
|
|
|
1033
1033
|
|
|
1034
1034
|
// src/Components/OtpElement.tsx
|
|
1035
1035
|
var import_react30 = __toESM(require("react"));
|
|
1036
|
-
var
|
|
1036
|
+
var import_antd22 = require("antd");
|
|
1037
1037
|
var OtpElement = (props) => {
|
|
1038
1038
|
const length = props.length;
|
|
1039
1039
|
const [otp, setOtp] = (0, import_react30.useState)(Array(length).fill(""));
|
|
@@ -1073,7 +1073,7 @@ var OtpElement = (props) => {
|
|
|
1073
1073
|
inputRefs.current[0]?.focus();
|
|
1074
1074
|
}, []);
|
|
1075
1075
|
return /* @__PURE__ */ import_react30.default.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ import_react30.default.createElement(
|
|
1076
|
-
|
|
1076
|
+
import_antd22.Input,
|
|
1077
1077
|
{
|
|
1078
1078
|
key: index,
|
|
1079
1079
|
className: props.className,
|
|
@@ -1091,6 +1091,10 @@ var OtpElement = (props) => {
|
|
|
1091
1091
|
var import_react31 = __toESM(require("react"));
|
|
1092
1092
|
var import_highcharts = __toESM(require("highcharts"));
|
|
1093
1093
|
var import_highcharts_react_official = __toESM(require("highcharts-react-official"));
|
|
1094
|
+
var import_exporting = __toESM(require("highcharts/modules/exporting"));
|
|
1095
|
+
if (typeof import_highcharts.default === "object") {
|
|
1096
|
+
(0, import_exporting.default)(import_highcharts.default);
|
|
1097
|
+
}
|
|
1094
1098
|
var HighchartsChart = ({ options }) => {
|
|
1095
1099
|
return /* @__PURE__ */ import_react31.default.createElement(import_highcharts_react_official.default, { highcharts: import_highcharts.default, options });
|
|
1096
1100
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -317,7 +317,6 @@ var MultipleSelectElement = (props) => {
|
|
|
317
317
|
|
|
318
318
|
// src/Components/Button.tsx
|
|
319
319
|
import React11, { useEffect, useState as useState4 } from "react";
|
|
320
|
-
import { Button } from "antd";
|
|
321
320
|
var ButtonElement = (props) => {
|
|
322
321
|
const [svgContent, setSvgContent] = useState4(null);
|
|
323
322
|
const [originalSvgContent, setOriginalSvgContent] = useState4(null);
|
|
@@ -357,7 +356,7 @@ var ButtonElement = (props) => {
|
|
|
357
356
|
}
|
|
358
357
|
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
359
358
|
}
|
|
360
|
-
}, [
|
|
359
|
+
}, []);
|
|
361
360
|
const handleMouseEnter = () => {
|
|
362
361
|
if (hoverColor && originalSvgContent) {
|
|
363
362
|
const tempDiv = document.createElement("div");
|
|
@@ -374,27 +373,26 @@ var ButtonElement = (props) => {
|
|
|
374
373
|
}
|
|
375
374
|
};
|
|
376
375
|
return /* @__PURE__ */ React11.createElement(
|
|
377
|
-
|
|
376
|
+
"button",
|
|
378
377
|
{
|
|
379
378
|
onClick: props.onClick,
|
|
380
379
|
className: `${props.className ? props.className : ""}`,
|
|
381
380
|
onMouseEnter: handleMouseEnter,
|
|
382
381
|
onMouseLeave: handleMouseLeave,
|
|
383
|
-
|
|
382
|
+
disabled: props.loading
|
|
384
383
|
},
|
|
385
|
-
props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ React11.createElement(
|
|
384
|
+
props.loading ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("svg", { className: "animate-spin h-5 w-5 mr-3", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React11.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8H4z" })), props.label) : /* @__PURE__ */ React11.createElement(React11.Fragment, null, props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ React11.createElement(
|
|
386
385
|
"span",
|
|
387
386
|
{
|
|
388
387
|
dangerouslySetInnerHTML: { __html: svgContent }
|
|
389
388
|
}
|
|
390
|
-
),
|
|
391
|
-
props.label
|
|
389
|
+
), props.label)
|
|
392
390
|
);
|
|
393
391
|
};
|
|
394
392
|
|
|
395
393
|
// src/Components/AddMoreTable.tsx
|
|
396
394
|
import React12, { useEffect as useEffect2, useState as useState5 } from "react";
|
|
397
|
-
import { Table, Button
|
|
395
|
+
import { Table, Button } from "antd";
|
|
398
396
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
399
397
|
var AddMoreTable = (props) => {
|
|
400
398
|
const { thead, tbody } = props;
|
|
@@ -489,13 +487,13 @@ var AddMoreTable = (props) => {
|
|
|
489
487
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
490
488
|
Object.keys(variable).forEach((key) => {
|
|
491
489
|
if (key === "SubRows") {
|
|
492
|
-
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(
|
|
490
|
+
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)));
|
|
493
491
|
} else {
|
|
494
492
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
495
493
|
}
|
|
496
494
|
});
|
|
497
495
|
});
|
|
498
|
-
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(
|
|
496
|
+
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)));
|
|
499
497
|
console.log("=====rowdata", rowData);
|
|
500
498
|
return rowData;
|
|
501
499
|
});
|
|
@@ -551,7 +549,7 @@ import React17 from "react";
|
|
|
551
549
|
|
|
552
550
|
// src/Components/Notification.tsx
|
|
553
551
|
import React14 from "react";
|
|
554
|
-
import { Popover, Badge, Button as
|
|
552
|
+
import { Popover, Badge, Button as Button2, Avatar, List } from "antd";
|
|
555
553
|
import { IoIosNotifications } from "react-icons/io";
|
|
556
554
|
var popoverContentStyle = {
|
|
557
555
|
minWidth: "300px",
|
|
@@ -579,7 +577,7 @@ var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
|
579
577
|
trigger: "focus",
|
|
580
578
|
placement: "bottomRight"
|
|
581
579
|
},
|
|
582
|
-
/* @__PURE__ */ React14.createElement(
|
|
580
|
+
/* @__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))))
|
|
583
581
|
);
|
|
584
582
|
|
|
585
583
|
// src/Components/SpanElement.tsx
|
|
@@ -679,7 +677,8 @@ var TableElement = (props) => {
|
|
|
679
677
|
{
|
|
680
678
|
title: "#",
|
|
681
679
|
dataIndex: "#",
|
|
682
|
-
key: "#"
|
|
680
|
+
key: "#",
|
|
681
|
+
fixed: "left"
|
|
683
682
|
},
|
|
684
683
|
...thead.map((col, ind) => ({
|
|
685
684
|
title: col.label,
|
|
@@ -750,7 +749,8 @@ var TableElement = (props) => {
|
|
|
750
749
|
dataSource,
|
|
751
750
|
columns,
|
|
752
751
|
size: props.size,
|
|
753
|
-
bordered: true
|
|
752
|
+
bordered: true,
|
|
753
|
+
scroll: { x: 1300 }
|
|
754
754
|
}
|
|
755
755
|
), model && /* @__PURE__ */ React20.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
756
756
|
};
|
|
@@ -1030,6 +1030,10 @@ var OtpElement = (props) => {
|
|
|
1030
1030
|
import React31 from "react";
|
|
1031
1031
|
import Highcharts from "highcharts";
|
|
1032
1032
|
import HighchartsReact from "highcharts-react-official";
|
|
1033
|
+
import HighchartsExporting from "highcharts/modules/exporting";
|
|
1034
|
+
if (typeof Highcharts === "object") {
|
|
1035
|
+
HighchartsExporting(Highcharts);
|
|
1036
|
+
}
|
|
1033
1037
|
var HighchartsChart = ({ options }) => {
|
|
1034
1038
|
return /* @__PURE__ */ React31.createElement(HighchartsReact, { highcharts: Highcharts, options });
|
|
1035
1039
|
};
|