@apexcura/ui-components 0.0.14-Beta7 → 0.0.14-Beta71
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 +3 -0
- package/dist/index.d.mts +17 -7
- package/dist/index.d.ts +17 -7
- package/dist/index.js +241 -97
- package/dist/index.mjs +248 -107
- package/package.json +3 -3
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -4,9 +4,9 @@ import { UploadFile } from 'antd/lib/upload/interface';
|
|
|
4
4
|
|
|
5
5
|
type ElementType = {
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
selectedStyle
|
|
8
|
-
style
|
|
9
|
-
className
|
|
7
|
+
selectedStyle?: boolean;
|
|
8
|
+
style?: boolean;
|
|
9
|
+
className?: string | undefined;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
addonBefore?: React.ReactNode;
|
|
12
12
|
defaultValue?: string;
|
|
@@ -26,8 +26,9 @@ type ElementType = {
|
|
|
26
26
|
fields?: any[];
|
|
27
27
|
schema?: any[];
|
|
28
28
|
options?: any[];
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
firstOptions?: any[];
|
|
30
|
+
secondOptions?: any[];
|
|
31
|
+
view?: boolean;
|
|
31
32
|
onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
32
33
|
onClick?: () => void;
|
|
33
34
|
dropDownOptions?: any[];
|
|
@@ -59,6 +60,9 @@ type ElementType = {
|
|
|
59
60
|
containerClassName?: string;
|
|
60
61
|
selectBefore?: any[];
|
|
61
62
|
selectAfter?: any[];
|
|
63
|
+
isSVGStylesOverride?: boolean;
|
|
64
|
+
rowSelection?: string;
|
|
65
|
+
length?: number;
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
@@ -84,7 +88,7 @@ declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
84
88
|
|
|
85
89
|
declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
86
90
|
|
|
87
|
-
declare const ButtonElement: React$1.
|
|
91
|
+
declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
|
|
88
92
|
|
|
89
93
|
declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
|
|
90
94
|
|
|
@@ -108,4 +112,10 @@ declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
|
|
|
108
112
|
|
|
109
113
|
declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
declare const SwitchElement: () => React$1.JSX.Element;
|
|
116
|
+
|
|
117
|
+
declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
118
|
+
|
|
119
|
+
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
120
|
+
|
|
121
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, 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
|
@@ -4,9 +4,9 @@ import { UploadFile } from 'antd/lib/upload/interface';
|
|
|
4
4
|
|
|
5
5
|
type ElementType = {
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
selectedStyle
|
|
8
|
-
style
|
|
9
|
-
className
|
|
7
|
+
selectedStyle?: boolean;
|
|
8
|
+
style?: boolean;
|
|
9
|
+
className?: string | undefined;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
addonBefore?: React.ReactNode;
|
|
12
12
|
defaultValue?: string;
|
|
@@ -26,8 +26,9 @@ type ElementType = {
|
|
|
26
26
|
fields?: any[];
|
|
27
27
|
schema?: any[];
|
|
28
28
|
options?: any[];
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
firstOptions?: any[];
|
|
30
|
+
secondOptions?: any[];
|
|
31
|
+
view?: boolean;
|
|
31
32
|
onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
32
33
|
onClick?: () => void;
|
|
33
34
|
dropDownOptions?: any[];
|
|
@@ -59,6 +60,9 @@ type ElementType = {
|
|
|
59
60
|
containerClassName?: string;
|
|
60
61
|
selectBefore?: any[];
|
|
61
62
|
selectAfter?: any[];
|
|
63
|
+
isSVGStylesOverride?: boolean;
|
|
64
|
+
rowSelection?: string;
|
|
65
|
+
length?: number;
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
@@ -84,7 +88,7 @@ declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
84
88
|
|
|
85
89
|
declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
86
90
|
|
|
87
|
-
declare const ButtonElement: React$1.
|
|
91
|
+
declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
|
|
88
92
|
|
|
89
93
|
declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
|
|
90
94
|
|
|
@@ -108,4 +112,10 @@ declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
|
|
|
108
112
|
|
|
109
113
|
declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
declare const SwitchElement: () => React$1.JSX.Element;
|
|
116
|
+
|
|
117
|
+
declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
118
|
+
|
|
119
|
+
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
120
|
+
|
|
121
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -42,16 +42,19 @@ __export(src_exports, {
|
|
|
42
42
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
43
43
|
Navbar: () => Navbar,
|
|
44
44
|
NumberElement: () => NumberElement,
|
|
45
|
+
OtpElement: () => OtpElement,
|
|
45
46
|
PasswordElement: () => PasswordElement,
|
|
46
47
|
RadioElement: () => RadioElement,
|
|
47
48
|
SelectElement: () => SelectElement,
|
|
48
49
|
Sidebar: () => Sidebar,
|
|
49
50
|
SingleCheckbox: () => SingleCheckbox,
|
|
50
51
|
SingleSelectElement: () => SingleSelectElement,
|
|
52
|
+
SwitchElement: () => SwitchElement,
|
|
51
53
|
TableElement: () => TableElement,
|
|
52
54
|
TabsElement: () => TabsElement,
|
|
53
55
|
TextElement: () => TextElement,
|
|
54
|
-
TextareaElement: () => TextareaElement
|
|
56
|
+
TextareaElement: () => TextareaElement,
|
|
57
|
+
Upload: () => Upload2
|
|
55
58
|
});
|
|
56
59
|
module.exports = __toCommonJS(src_exports);
|
|
57
60
|
|
|
@@ -70,6 +73,7 @@ var TextElement = (props) => {
|
|
|
70
73
|
placeholder: props.placeholder,
|
|
71
74
|
allowClear: true,
|
|
72
75
|
id: props.name,
|
|
76
|
+
value: props.value,
|
|
73
77
|
prefix: props.prefix,
|
|
74
78
|
type: props.type,
|
|
75
79
|
status: props.status,
|
|
@@ -129,8 +133,7 @@ var NumberElement = (props) => {
|
|
|
129
133
|
{
|
|
130
134
|
placeholder: props.placeholder,
|
|
131
135
|
addonBefore: props.addonBefore,
|
|
132
|
-
|
|
133
|
-
defaultValue: props.defaultValue,
|
|
136
|
+
value: props.value,
|
|
134
137
|
disabled: props.disabled,
|
|
135
138
|
id: props.name,
|
|
136
139
|
prefix: props.prefix,
|
|
@@ -375,13 +378,74 @@ var MultipleSelectElement = (props) => {
|
|
|
375
378
|
// src/Components/Button.tsx
|
|
376
379
|
var import_react11 = __toESM(require("react"));
|
|
377
380
|
var ButtonElement = (props) => {
|
|
381
|
+
const [svgContent, setSvgContent] = (0, import_react11.useState)(null);
|
|
382
|
+
const [originalSvgContent, setOriginalSvgContent] = (0, import_react11.useState)(null);
|
|
383
|
+
const [hoverColor, setHoverColor] = (0, import_react11.useState)(null);
|
|
384
|
+
(0, import_react11.useEffect)(() => {
|
|
385
|
+
if (props.icon) {
|
|
386
|
+
fetch(props.icon).then((response) => response.text()).then((data) => {
|
|
387
|
+
const tempDiv = document.createElement("div");
|
|
388
|
+
tempDiv.innerHTML = data;
|
|
389
|
+
const svgElement = tempDiv.querySelector("svg");
|
|
390
|
+
if (svgElement) {
|
|
391
|
+
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
392
|
+
const hoverColorClass = props.className?.match(/hover:text-[\w-]+/g)?.[0];
|
|
393
|
+
if (textColorClass) {
|
|
394
|
+
const tempSpan = document.createElement("span");
|
|
395
|
+
tempSpan.className = textColorClass;
|
|
396
|
+
document.body.appendChild(tempSpan);
|
|
397
|
+
const computedColor = getComputedStyle(tempSpan).color;
|
|
398
|
+
document.body.removeChild(tempSpan);
|
|
399
|
+
const paths = svgElement.querySelectorAll("path");
|
|
400
|
+
paths.forEach((path) => path.setAttribute("fill", computedColor));
|
|
401
|
+
}
|
|
402
|
+
if (hoverColorClass) {
|
|
403
|
+
const tempSpan = document.createElement("span");
|
|
404
|
+
tempSpan.className = hoverColorClass.replace("hover:", "");
|
|
405
|
+
document.body.appendChild(tempSpan);
|
|
406
|
+
const computedHoverColor = getComputedStyle(tempSpan).color;
|
|
407
|
+
document.body.removeChild(tempSpan);
|
|
408
|
+
setHoverColor(computedHoverColor);
|
|
409
|
+
}
|
|
410
|
+
svgElement.setAttribute(
|
|
411
|
+
"class",
|
|
412
|
+
`${props.iconsClassName ? props.iconsClassName : ""}`
|
|
413
|
+
);
|
|
414
|
+
setSvgContent(tempDiv.innerHTML);
|
|
415
|
+
setOriginalSvgContent(tempDiv.innerHTML);
|
|
416
|
+
}
|
|
417
|
+
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
418
|
+
}
|
|
419
|
+
}, [props.icon, props.className]);
|
|
420
|
+
const handleMouseEnter = () => {
|
|
421
|
+
if (hoverColor && originalSvgContent) {
|
|
422
|
+
const tempDiv = document.createElement("div");
|
|
423
|
+
tempDiv.innerHTML = originalSvgContent;
|
|
424
|
+
const svgElement = tempDiv.querySelector("svg");
|
|
425
|
+
const paths = svgElement?.querySelectorAll("path");
|
|
426
|
+
paths?.forEach((path) => path.setAttribute("fill", hoverColor));
|
|
427
|
+
setSvgContent(tempDiv.innerHTML);
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
const handleMouseLeave = () => {
|
|
431
|
+
if (originalSvgContent) {
|
|
432
|
+
setSvgContent(originalSvgContent);
|
|
433
|
+
}
|
|
434
|
+
};
|
|
378
435
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
379
436
|
"button",
|
|
380
437
|
{
|
|
381
|
-
onClick:
|
|
382
|
-
className: `${props.className ? props.className : ""}
|
|
438
|
+
onClick: props.onClick,
|
|
439
|
+
className: `${props.className ? props.className : ""}`,
|
|
440
|
+
onMouseEnter: handleMouseEnter,
|
|
441
|
+
onMouseLeave: handleMouseLeave
|
|
383
442
|
},
|
|
384
|
-
props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon })
|
|
443
|
+
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(
|
|
444
|
+
"span",
|
|
445
|
+
{
|
|
446
|
+
dangerouslySetInnerHTML: { __html: svgContent }
|
|
447
|
+
}
|
|
448
|
+
),
|
|
385
449
|
props.label
|
|
386
450
|
);
|
|
387
451
|
};
|
|
@@ -464,9 +528,9 @@ var AddMoreTable = (props) => {
|
|
|
464
528
|
if (!element) return null;
|
|
465
529
|
const { element: type, label } = element;
|
|
466
530
|
if (type === "single-select") {
|
|
467
|
-
return /* @__PURE__ */ import_react12.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
531
|
+
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: [] });
|
|
468
532
|
} else if (type === "textarea") {
|
|
469
|
-
return /* @__PURE__ */ import_react12.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
533
|
+
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: [] });
|
|
470
534
|
} else {
|
|
471
535
|
return null;
|
|
472
536
|
}
|
|
@@ -524,10 +588,18 @@ var Sidebar = (props) => {
|
|
|
524
588
|
props.onChange(item);
|
|
525
589
|
}
|
|
526
590
|
};
|
|
527
|
-
return /* @__PURE__ */ import_react13.default.createElement("div", {
|
|
591
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { key: props.name }, /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ import_react13.default.createElement("ul", { className: props.listClassName }, props.items?.map((item) => {
|
|
528
592
|
return /* @__PURE__ */ import_react13.default.createElement("li", { onClick: () => {
|
|
529
593
|
handleChange(item);
|
|
530
|
-
}, key: item.label, className: `${props.listItemClassName}
|
|
594
|
+
}, key: item.label, className: `${props.listItemClassName}
|
|
595
|
+
}` }, /* @__PURE__ */ import_react13.default.createElement(
|
|
596
|
+
ButtonElement,
|
|
597
|
+
{
|
|
598
|
+
...item,
|
|
599
|
+
className: item.active ? props.activeClassName : props.className,
|
|
600
|
+
iconsClassName: props.iconsClassName
|
|
601
|
+
}
|
|
602
|
+
));
|
|
531
603
|
})));
|
|
532
604
|
};
|
|
533
605
|
|
|
@@ -652,7 +724,6 @@ var TableElement = (props) => {
|
|
|
652
724
|
const { thead, tbody } = props;
|
|
653
725
|
const [selectedRecord, setSelectedRecord] = (0, import_react20.useState)({});
|
|
654
726
|
const [model, setModel] = (0, import_react20.useState)(false);
|
|
655
|
-
const [selectedRowKeys, setSelectedRowKeys] = (0, import_react20.useState)([]);
|
|
656
727
|
const handleChange = (record) => {
|
|
657
728
|
console.log("record", record);
|
|
658
729
|
if (props.onChange) {
|
|
@@ -667,14 +738,6 @@ var TableElement = (props) => {
|
|
|
667
738
|
dataIndex: "#",
|
|
668
739
|
key: "#"
|
|
669
740
|
},
|
|
670
|
-
// {
|
|
671
|
-
// title: "View",
|
|
672
|
-
// dataIndex: "View",
|
|
673
|
-
// key: "View",
|
|
674
|
-
// render: (_: any, record: any) => (
|
|
675
|
-
// <Button>View</Button>
|
|
676
|
-
// ),
|
|
677
|
-
// },
|
|
678
741
|
...thead.map((col, ind) => ({
|
|
679
742
|
title: col.label,
|
|
680
743
|
dataIndex: col.name,
|
|
@@ -691,9 +754,28 @@ var TableElement = (props) => {
|
|
|
691
754
|
}
|
|
692
755
|
}))
|
|
693
756
|
];
|
|
757
|
+
if (props.view) {
|
|
758
|
+
columns.push({
|
|
759
|
+
title: "View",
|
|
760
|
+
dataIndex: "View",
|
|
761
|
+
key: "View",
|
|
762
|
+
render: (_, record) => /* @__PURE__ */ import_react20.default.createElement(
|
|
763
|
+
"a",
|
|
764
|
+
{
|
|
765
|
+
onClick: () => {
|
|
766
|
+
setSelectedRecord(record);
|
|
767
|
+
handleChange(record);
|
|
768
|
+
setModel(true);
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
"View"
|
|
772
|
+
)
|
|
773
|
+
});
|
|
774
|
+
}
|
|
694
775
|
}
|
|
695
776
|
const dataSource = tbody && tbody.map((row, index) => ({
|
|
696
777
|
...row,
|
|
778
|
+
key: index + 1,
|
|
697
779
|
[columns[0].key]: index + 1
|
|
698
780
|
}));
|
|
699
781
|
const count = dataSource ? dataSource.length : 0;
|
|
@@ -702,38 +784,29 @@ var TableElement = (props) => {
|
|
|
702
784
|
props.onChange({ name: "pagination", page, pageSize });
|
|
703
785
|
}
|
|
704
786
|
};
|
|
705
|
-
const onSelectChange = (newSelectedRowKeys) => {
|
|
706
|
-
console.log("selectedRowKeys changed: ", newSelectedRowKeys);
|
|
707
|
-
setSelectedRowKeys(newSelectedRowKeys);
|
|
708
|
-
};
|
|
709
787
|
const rowSelectionConfig = props.rowSelection ? {
|
|
710
|
-
selectedRowKeys,
|
|
711
|
-
|
|
788
|
+
onChange: (selectedRowKeys, selectedRows) => {
|
|
789
|
+
console.log(`selectedRowKeys: ${selectedRowKeys}`, "selectedRows: ", selectedRows);
|
|
790
|
+
if (props.onChange) {
|
|
791
|
+
props.onChange(selectedRows);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
712
794
|
} : void 0;
|
|
713
795
|
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
714
796
|
import_antd14.Table,
|
|
715
797
|
{
|
|
798
|
+
className: props.className,
|
|
716
799
|
pagination: {
|
|
717
800
|
showTotal: (total) => `Total: ${total} items`,
|
|
718
801
|
total: count,
|
|
719
802
|
showSizeChanger: count > 10,
|
|
720
803
|
onChange: onChangePage
|
|
721
804
|
},
|
|
805
|
+
rowSelection: rowSelectionConfig,
|
|
722
806
|
dataSource,
|
|
723
807
|
columns,
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
size: props.size && props.size,
|
|
727
|
-
onRow: (record) => {
|
|
728
|
-
return {
|
|
729
|
-
onClick: () => {
|
|
730
|
-
setSelectedRecord(record);
|
|
731
|
-
handleChange(record);
|
|
732
|
-
setModel(true);
|
|
733
|
-
},
|
|
734
|
-
style: { cursor: "pointer" }
|
|
735
|
-
};
|
|
736
|
-
}
|
|
808
|
+
size: props.size,
|
|
809
|
+
bordered: true
|
|
737
810
|
}
|
|
738
811
|
), model && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
739
812
|
};
|
|
@@ -741,59 +814,40 @@ var TableElement = (props) => {
|
|
|
741
814
|
// src/Components/DatePicker.tsx
|
|
742
815
|
var import_react21 = __toESM(require("react"));
|
|
743
816
|
var import_antd15 = require("antd");
|
|
744
|
-
var
|
|
745
|
-
var
|
|
817
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
818
|
+
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
819
|
+
import_dayjs.default.extend(import_customParseFormat.default);
|
|
746
820
|
var DatePickerElement = (props) => {
|
|
747
|
-
const [
|
|
748
|
-
const handleChange = (
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
const formattedDate = dateString;
|
|
753
|
-
console.log("formattedDate-----------------", formattedDate);
|
|
754
|
-
setDate(date2);
|
|
755
|
-
console.log("changedDate------------", date2);
|
|
821
|
+
const [dateState, setDateState] = (0, import_react21.useState)("");
|
|
822
|
+
const handleChange = (date, dateString) => {
|
|
823
|
+
if (date) {
|
|
824
|
+
const formattedDate = date;
|
|
825
|
+
setDateState(date);
|
|
756
826
|
if (props.onChange) {
|
|
757
827
|
props.onChange(formattedDate);
|
|
758
828
|
}
|
|
759
829
|
} else {
|
|
760
|
-
|
|
830
|
+
setDateState("");
|
|
761
831
|
if (props.onChange) {
|
|
762
832
|
props.onChange("");
|
|
763
833
|
}
|
|
764
834
|
}
|
|
765
835
|
};
|
|
766
|
-
|
|
767
|
-
const currentDate = date || (0, import_moment.default)();
|
|
768
|
-
const newDate = (0, import_moment.default)(currentDate).subtract(1, "days");
|
|
769
|
-
setDate(newDate);
|
|
770
|
-
if (props.onChange) {
|
|
771
|
-
props.onChange(newDate.format("lll"));
|
|
772
|
-
}
|
|
773
|
-
};
|
|
774
|
-
const onHandleIncrement = () => {
|
|
775
|
-
const currentDate = date || (0, import_moment.default)();
|
|
776
|
-
const newDate = (0, import_moment.default)(currentDate).add(1, "days");
|
|
777
|
-
setDate(newDate);
|
|
778
|
-
if (props.onChange) {
|
|
779
|
-
props.onChange(newDate.format("lll"));
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
return /* @__PURE__ */ import_react21.default.createElement("div", null, /* @__PURE__ */ import_react21.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react21.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react21.default.createElement(
|
|
836
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", null, /* @__PURE__ */ import_react21.default.createElement(
|
|
783
837
|
import_antd15.DatePicker,
|
|
784
838
|
{
|
|
785
839
|
placeholder: props.placeholder,
|
|
786
|
-
value:
|
|
787
|
-
|
|
840
|
+
value: dateState,
|
|
841
|
+
format: { format: "DD-MM-YYYY" },
|
|
788
842
|
onChange: handleChange
|
|
789
843
|
}
|
|
790
|
-
)
|
|
844
|
+
));
|
|
791
845
|
};
|
|
792
846
|
|
|
793
847
|
// src/Components/DateRangePickerElement.tsx
|
|
794
848
|
var import_react22 = __toESM(require("react"));
|
|
795
849
|
var import_antd16 = require("antd");
|
|
796
|
-
var
|
|
850
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
797
851
|
var DateRangePickerElement = (props) => {
|
|
798
852
|
const { RangePicker } = import_antd16.DatePicker;
|
|
799
853
|
const handleChange = (dates, dateStrings) => {
|
|
@@ -804,10 +858,10 @@ var DateRangePickerElement = (props) => {
|
|
|
804
858
|
}
|
|
805
859
|
};
|
|
806
860
|
const rangePresets = [
|
|
807
|
-
{ label: "Last 7 Days", value: [(0,
|
|
808
|
-
{ label: "Last 14 Days", value: [(0,
|
|
809
|
-
{ label: "Last 30 Days", value: [(0,
|
|
810
|
-
{ label: "Last 90 Days", value: [(0,
|
|
861
|
+
{ label: "Last 7 Days", value: [(0, import_dayjs2.default)().add(-7, "d"), (0, import_dayjs2.default)()] },
|
|
862
|
+
{ label: "Last 14 Days", value: [(0, import_dayjs2.default)().add(-14, "d"), (0, import_dayjs2.default)()] },
|
|
863
|
+
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().add(-30, "d"), (0, import_dayjs2.default)()] },
|
|
864
|
+
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().add(-90, "d"), (0, import_dayjs2.default)()] }
|
|
811
865
|
];
|
|
812
866
|
return /* @__PURE__ */ import_react22.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react22.default.createElement(RangePicker, { presets: rangePresets, onChange: handleChange }));
|
|
813
867
|
};
|
|
@@ -815,7 +869,7 @@ var DateRangePickerElement = (props) => {
|
|
|
815
869
|
// src/Components/Image.tsx
|
|
816
870
|
var import_react23 = __toESM(require("react"));
|
|
817
871
|
var Image = (props) => {
|
|
818
|
-
return /* @__PURE__ */ import_react23.default.createElement("
|
|
872
|
+
return /* @__PURE__ */ import_react23.default.createElement("img", { className: props.className, src: props.img, alt: "image" });
|
|
819
873
|
};
|
|
820
874
|
|
|
821
875
|
// src/Components/SingleCheckbox.tsx
|
|
@@ -836,30 +890,34 @@ var import_antd18 = require("antd");
|
|
|
836
890
|
var DropDownGroup = (props) => {
|
|
837
891
|
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
838
892
|
firstValue: {},
|
|
839
|
-
secondValue: {}
|
|
893
|
+
secondValue: {},
|
|
894
|
+
temp: ""
|
|
840
895
|
});
|
|
841
896
|
const handleFirstChange = (value) => {
|
|
842
|
-
|
|
897
|
+
console.log(selectedValue.temp);
|
|
898
|
+
const filterOption2 = props.firstOptions?.find(
|
|
843
899
|
(eachOption) => eachOption.value === value
|
|
844
900
|
);
|
|
845
901
|
setSelectedValue((prev) => {
|
|
846
902
|
const newValue = { ...prev, firstValue: filterOption2 };
|
|
903
|
+
const { temp, ...rest } = newValue;
|
|
847
904
|
if (newValue.firstValue) {
|
|
848
|
-
props.onChange?.(
|
|
905
|
+
props.onChange?.(rest);
|
|
849
906
|
}
|
|
850
|
-
return
|
|
907
|
+
return newValue;
|
|
851
908
|
});
|
|
852
909
|
};
|
|
853
910
|
const handleSecondChange = (value) => {
|
|
854
|
-
const filterOption2 = props.
|
|
911
|
+
const filterOption2 = props.secondOptions?.find(
|
|
855
912
|
(eachOption) => eachOption.value === value
|
|
856
913
|
);
|
|
857
914
|
setSelectedValue((prev) => {
|
|
858
915
|
const newValue = { ...prev, secondValue: filterOption2 };
|
|
916
|
+
const { temp, ...rest } = newValue;
|
|
859
917
|
if (newValue.secondValue) {
|
|
860
|
-
props.onChange?.(
|
|
918
|
+
props.onChange?.(rest);
|
|
861
919
|
}
|
|
862
|
-
return
|
|
920
|
+
return newValue;
|
|
863
921
|
});
|
|
864
922
|
};
|
|
865
923
|
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(
|
|
@@ -867,7 +925,7 @@ var DropDownGroup = (props) => {
|
|
|
867
925
|
{
|
|
868
926
|
onChange: handleFirstChange,
|
|
869
927
|
variant: props.variant,
|
|
870
|
-
options: props.
|
|
928
|
+
options: props.firstOptions,
|
|
871
929
|
className: props.className
|
|
872
930
|
}
|
|
873
931
|
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
@@ -875,7 +933,7 @@ var DropDownGroup = (props) => {
|
|
|
875
933
|
{
|
|
876
934
|
onChange: handleSecondChange,
|
|
877
935
|
variant: props.variant,
|
|
878
|
-
options: props.
|
|
936
|
+
options: props.secondOptions,
|
|
879
937
|
className: props.className
|
|
880
938
|
}
|
|
881
939
|
)));
|
|
@@ -884,18 +942,10 @@ var DropDownGroup = (props) => {
|
|
|
884
942
|
// src/Components/FilesUpload.tsx
|
|
885
943
|
var import_react26 = __toESM(require("react"));
|
|
886
944
|
var import_antd19 = require("antd");
|
|
887
|
-
var
|
|
945
|
+
var import_icons4 = require("@ant-design/icons");
|
|
888
946
|
var FileUpload = (props) => {
|
|
889
947
|
const { Dragger } = import_antd19.Upload;
|
|
890
948
|
const [files, setFiles] = (0, import_react26.useState)([]);
|
|
891
|
-
const beforeUpload = (file) => {
|
|
892
|
-
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "application/pdf"].includes(file.type);
|
|
893
|
-
if (!isCorrectFile) {
|
|
894
|
-
import_antd19.message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg/.pdf)`);
|
|
895
|
-
return import_antd19.Upload.LIST_IGNORE;
|
|
896
|
-
}
|
|
897
|
-
return true;
|
|
898
|
-
};
|
|
899
949
|
const handleChange = ({ fileList }) => {
|
|
900
950
|
setFiles(fileList);
|
|
901
951
|
if (props.onChange) {
|
|
@@ -919,12 +969,11 @@ var FileUpload = (props) => {
|
|
|
919
969
|
maxCount: props.max_count,
|
|
920
970
|
multiple: props.multiple,
|
|
921
971
|
fileList: files,
|
|
922
|
-
beforeUpload,
|
|
923
972
|
onChange: handleChange,
|
|
924
973
|
showUploadList: true,
|
|
925
974
|
customRequest
|
|
926
975
|
},
|
|
927
|
-
/* @__PURE__ */ import_react26.default.createElement("p", null, /* @__PURE__ */ import_react26.default.createElement(
|
|
976
|
+
/* @__PURE__ */ import_react26.default.createElement("p", null, /* @__PURE__ */ import_react26.default.createElement(import_icons4.InboxOutlined, null)),
|
|
928
977
|
/* @__PURE__ */ import_react26.default.createElement("p", null, "Click or drag file to upload")
|
|
929
978
|
));
|
|
930
979
|
};
|
|
@@ -940,6 +989,98 @@ var TabsElement = (props) => {
|
|
|
940
989
|
};
|
|
941
990
|
return /* @__PURE__ */ import_react27.default.createElement(import_antd20.Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
942
991
|
};
|
|
992
|
+
|
|
993
|
+
// src/Components/SwitchElement.tsx
|
|
994
|
+
var import_react28 = __toESM(require("react"));
|
|
995
|
+
var import_antd21 = require("antd");
|
|
996
|
+
var onChange = (checked) => {
|
|
997
|
+
console.log(`switch to ${checked}`);
|
|
998
|
+
};
|
|
999
|
+
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(import_antd21.Switch, { defaultChecked: true, onChange });
|
|
1000
|
+
|
|
1001
|
+
// src/Components/Upload.tsx
|
|
1002
|
+
var import_react29 = __toESM(require("react"));
|
|
1003
|
+
var Upload2 = (props) => {
|
|
1004
|
+
const [file, setFile] = (0, import_react29.useState)();
|
|
1005
|
+
const handleFileChange = (e) => {
|
|
1006
|
+
setFile(e.target.files[0]);
|
|
1007
|
+
if (props.onChange) {
|
|
1008
|
+
props.onChange(e.target.files[0]);
|
|
1009
|
+
}
|
|
1010
|
+
};
|
|
1011
|
+
const handleUpload = async () => {
|
|
1012
|
+
if (!file) {
|
|
1013
|
+
console.error("No file selected");
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
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(
|
|
1018
|
+
"button",
|
|
1019
|
+
{
|
|
1020
|
+
type: "button",
|
|
1021
|
+
onClick: handleUpload,
|
|
1022
|
+
disabled: !file,
|
|
1023
|
+
style: { marginTop: 16 }
|
|
1024
|
+
},
|
|
1025
|
+
"Upload"
|
|
1026
|
+
));
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
// src/Components/OtpElement.tsx
|
|
1030
|
+
var import_react30 = __toESM(require("react"));
|
|
1031
|
+
var import_antd22 = require("antd");
|
|
1032
|
+
var OtpElement = (props) => {
|
|
1033
|
+
const length = props.length;
|
|
1034
|
+
const [otp, setOtp] = (0, import_react30.useState)(Array(length).fill(""));
|
|
1035
|
+
const inputRefs = (0, import_react30.useRef)([]);
|
|
1036
|
+
const handleChange = (e, index) => {
|
|
1037
|
+
const value = e.target.value;
|
|
1038
|
+
if (/^[0-9]$/.test(value) || value === "") {
|
|
1039
|
+
const newOtp = [...otp];
|
|
1040
|
+
newOtp[index] = value;
|
|
1041
|
+
setOtp(newOtp);
|
|
1042
|
+
props.onChange && props.onChange(newOtp.join(""));
|
|
1043
|
+
if (value && index < length - 1) {
|
|
1044
|
+
inputRefs.current[index + 1]?.focus();
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
const handleKeyDown = (e, index) => {
|
|
1049
|
+
if (e.key === "Backspace" && !otp[index] && index > 0) {
|
|
1050
|
+
inputRefs.current[index - 1]?.focus();
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
const handlePaste = (e) => {
|
|
1054
|
+
e.preventDefault();
|
|
1055
|
+
const pasteData = e.clipboardData.getData("text");
|
|
1056
|
+
if (/^\d+$/.test(pasteData)) {
|
|
1057
|
+
const newOtp = pasteData.split("").slice(0, length);
|
|
1058
|
+
setOtp(newOtp.concat(Array(length - newOtp.length).fill("")));
|
|
1059
|
+
props.onChange && props.onChange(newOtp.join(""));
|
|
1060
|
+
newOtp.forEach((_, idx) => {
|
|
1061
|
+
if (inputRefs.current[idx]) {
|
|
1062
|
+
inputRefs.current[idx]?.focus();
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
1067
|
+
(0, import_react30.useEffect)(() => {
|
|
1068
|
+
inputRefs.current[0]?.focus();
|
|
1069
|
+
}, []);
|
|
1070
|
+
return /* @__PURE__ */ import_react30.default.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ import_react30.default.createElement(
|
|
1071
|
+
import_antd22.Input,
|
|
1072
|
+
{
|
|
1073
|
+
key: index,
|
|
1074
|
+
className: props.className,
|
|
1075
|
+
maxLength: 1,
|
|
1076
|
+
value: otp[index],
|
|
1077
|
+
onChange: (e) => handleChange(e, index),
|
|
1078
|
+
onKeyDown: (e) => handleKeyDown(e, index),
|
|
1079
|
+
onPaste: handlePaste,
|
|
1080
|
+
ref: (el) => inputRefs.current[index] = el
|
|
1081
|
+
}
|
|
1082
|
+
)));
|
|
1083
|
+
};
|
|
943
1084
|
// Annotate the CommonJS export names for ESM import in node:
|
|
944
1085
|
0 && (module.exports = {
|
|
945
1086
|
AddMoreTable,
|
|
@@ -954,14 +1095,17 @@ var TabsElement = (props) => {
|
|
|
954
1095
|
MultipleSelectElement,
|
|
955
1096
|
Navbar,
|
|
956
1097
|
NumberElement,
|
|
1098
|
+
OtpElement,
|
|
957
1099
|
PasswordElement,
|
|
958
1100
|
RadioElement,
|
|
959
1101
|
SelectElement,
|
|
960
1102
|
Sidebar,
|
|
961
1103
|
SingleCheckbox,
|
|
962
1104
|
SingleSelectElement,
|
|
1105
|
+
SwitchElement,
|
|
963
1106
|
TableElement,
|
|
964
1107
|
TabsElement,
|
|
965
1108
|
TextElement,
|
|
966
|
-
TextareaElement
|
|
1109
|
+
TextareaElement,
|
|
1110
|
+
Upload
|
|
967
1111
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,7 @@ var TextElement = (props) => {
|
|
|
13
13
|
placeholder: props.placeholder,
|
|
14
14
|
allowClear: true,
|
|
15
15
|
id: props.name,
|
|
16
|
+
value: props.value,
|
|
16
17
|
prefix: props.prefix,
|
|
17
18
|
type: props.type,
|
|
18
19
|
status: props.status,
|
|
@@ -72,8 +73,7 @@ var NumberElement = (props) => {
|
|
|
72
73
|
{
|
|
73
74
|
placeholder: props.placeholder,
|
|
74
75
|
addonBefore: props.addonBefore,
|
|
75
|
-
|
|
76
|
-
defaultValue: props.defaultValue,
|
|
76
|
+
value: props.value,
|
|
77
77
|
disabled: props.disabled,
|
|
78
78
|
id: props.name,
|
|
79
79
|
prefix: props.prefix,
|
|
@@ -316,26 +316,87 @@ var MultipleSelectElement = (props) => {
|
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
// src/Components/Button.tsx
|
|
319
|
-
import React11 from "react";
|
|
319
|
+
import React11, { useEffect, useState as useState4 } from "react";
|
|
320
320
|
var ButtonElement = (props) => {
|
|
321
|
+
const [svgContent, setSvgContent] = useState4(null);
|
|
322
|
+
const [originalSvgContent, setOriginalSvgContent] = useState4(null);
|
|
323
|
+
const [hoverColor, setHoverColor] = useState4(null);
|
|
324
|
+
useEffect(() => {
|
|
325
|
+
if (props.icon) {
|
|
326
|
+
fetch(props.icon).then((response) => response.text()).then((data) => {
|
|
327
|
+
const tempDiv = document.createElement("div");
|
|
328
|
+
tempDiv.innerHTML = data;
|
|
329
|
+
const svgElement = tempDiv.querySelector("svg");
|
|
330
|
+
if (svgElement) {
|
|
331
|
+
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
332
|
+
const hoverColorClass = props.className?.match(/hover:text-[\w-]+/g)?.[0];
|
|
333
|
+
if (textColorClass) {
|
|
334
|
+
const tempSpan = document.createElement("span");
|
|
335
|
+
tempSpan.className = textColorClass;
|
|
336
|
+
document.body.appendChild(tempSpan);
|
|
337
|
+
const computedColor = getComputedStyle(tempSpan).color;
|
|
338
|
+
document.body.removeChild(tempSpan);
|
|
339
|
+
const paths = svgElement.querySelectorAll("path");
|
|
340
|
+
paths.forEach((path) => path.setAttribute("fill", computedColor));
|
|
341
|
+
}
|
|
342
|
+
if (hoverColorClass) {
|
|
343
|
+
const tempSpan = document.createElement("span");
|
|
344
|
+
tempSpan.className = hoverColorClass.replace("hover:", "");
|
|
345
|
+
document.body.appendChild(tempSpan);
|
|
346
|
+
const computedHoverColor = getComputedStyle(tempSpan).color;
|
|
347
|
+
document.body.removeChild(tempSpan);
|
|
348
|
+
setHoverColor(computedHoverColor);
|
|
349
|
+
}
|
|
350
|
+
svgElement.setAttribute(
|
|
351
|
+
"class",
|
|
352
|
+
`${props.iconsClassName ? props.iconsClassName : ""}`
|
|
353
|
+
);
|
|
354
|
+
setSvgContent(tempDiv.innerHTML);
|
|
355
|
+
setOriginalSvgContent(tempDiv.innerHTML);
|
|
356
|
+
}
|
|
357
|
+
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
358
|
+
}
|
|
359
|
+
}, [props.icon, props.className]);
|
|
360
|
+
const handleMouseEnter = () => {
|
|
361
|
+
if (hoverColor && originalSvgContent) {
|
|
362
|
+
const tempDiv = document.createElement("div");
|
|
363
|
+
tempDiv.innerHTML = originalSvgContent;
|
|
364
|
+
const svgElement = tempDiv.querySelector("svg");
|
|
365
|
+
const paths = svgElement?.querySelectorAll("path");
|
|
366
|
+
paths?.forEach((path) => path.setAttribute("fill", hoverColor));
|
|
367
|
+
setSvgContent(tempDiv.innerHTML);
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const handleMouseLeave = () => {
|
|
371
|
+
if (originalSvgContent) {
|
|
372
|
+
setSvgContent(originalSvgContent);
|
|
373
|
+
}
|
|
374
|
+
};
|
|
321
375
|
return /* @__PURE__ */ React11.createElement(
|
|
322
376
|
"button",
|
|
323
377
|
{
|
|
324
|
-
onClick:
|
|
325
|
-
className: `${props.className ? props.className : ""}
|
|
378
|
+
onClick: props.onClick,
|
|
379
|
+
className: `${props.className ? props.className : ""}`,
|
|
380
|
+
onMouseEnter: handleMouseEnter,
|
|
381
|
+
onMouseLeave: handleMouseLeave
|
|
326
382
|
},
|
|
327
|
-
props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon })
|
|
383
|
+
props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ React11.createElement(
|
|
384
|
+
"span",
|
|
385
|
+
{
|
|
386
|
+
dangerouslySetInnerHTML: { __html: svgContent }
|
|
387
|
+
}
|
|
388
|
+
),
|
|
328
389
|
props.label
|
|
329
390
|
);
|
|
330
391
|
};
|
|
331
392
|
|
|
332
393
|
// src/Components/AddMoreTable.tsx
|
|
333
|
-
import React12, { useEffect, useState as
|
|
394
|
+
import React12, { useEffect as useEffect2, useState as useState5 } from "react";
|
|
334
395
|
import { Table, Button } from "antd";
|
|
335
396
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
336
397
|
var AddMoreTable = (props) => {
|
|
337
398
|
const { thead, tbody } = props;
|
|
338
|
-
const [rows, setRows] =
|
|
399
|
+
const [rows, setRows] = useState5(tbody || []);
|
|
339
400
|
const onHandleRows = () => {
|
|
340
401
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
341
402
|
let newRow = {
|
|
@@ -400,16 +461,16 @@ var AddMoreTable = (props) => {
|
|
|
400
461
|
});
|
|
401
462
|
});
|
|
402
463
|
};
|
|
403
|
-
|
|
464
|
+
useEffect2(() => {
|
|
404
465
|
console.log(rows);
|
|
405
466
|
}, [rows]);
|
|
406
467
|
const renderInputElement = (element, value) => {
|
|
407
468
|
if (!element) return null;
|
|
408
469
|
const { element: type, label } = element;
|
|
409
470
|
if (type === "single-select") {
|
|
410
|
-
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
471
|
+
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
411
472
|
} else if (type === "textarea") {
|
|
412
|
-
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
473
|
+
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
413
474
|
} else {
|
|
414
475
|
return null;
|
|
415
476
|
}
|
|
@@ -467,10 +528,18 @@ var Sidebar = (props) => {
|
|
|
467
528
|
props.onChange(item);
|
|
468
529
|
}
|
|
469
530
|
};
|
|
470
|
-
return /* @__PURE__ */ React13.createElement("div", {
|
|
531
|
+
return /* @__PURE__ */ React13.createElement("div", { key: props.name }, /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ React13.createElement("ul", { className: props.listClassName }, props.items?.map((item) => {
|
|
471
532
|
return /* @__PURE__ */ React13.createElement("li", { onClick: () => {
|
|
472
533
|
handleChange(item);
|
|
473
|
-
}, key: item.label, className: `${props.listItemClassName}
|
|
534
|
+
}, key: item.label, className: `${props.listItemClassName}
|
|
535
|
+
}` }, /* @__PURE__ */ React13.createElement(
|
|
536
|
+
ButtonElement,
|
|
537
|
+
{
|
|
538
|
+
...item,
|
|
539
|
+
className: item.active ? props.activeClassName : props.className,
|
|
540
|
+
iconsClassName: props.iconsClassName
|
|
541
|
+
}
|
|
542
|
+
));
|
|
474
543
|
})));
|
|
475
544
|
};
|
|
476
545
|
|
|
@@ -535,7 +604,7 @@ var Navbar = (props) => {
|
|
|
535
604
|
};
|
|
536
605
|
|
|
537
606
|
// src/Components/TableElement.tsx
|
|
538
|
-
import React20, { useState as
|
|
607
|
+
import React20, { useState as useState6 } from "react";
|
|
539
608
|
import { Table as Table2 } from "antd";
|
|
540
609
|
|
|
541
610
|
// src/Components/Model.tsx
|
|
@@ -593,9 +662,8 @@ var ModelElement = (props) => {
|
|
|
593
662
|
// src/Components/TableElement.tsx
|
|
594
663
|
var TableElement = (props) => {
|
|
595
664
|
const { thead, tbody } = props;
|
|
596
|
-
const [selectedRecord, setSelectedRecord] =
|
|
597
|
-
const [model, setModel] =
|
|
598
|
-
const [selectedRowKeys, setSelectedRowKeys] = useState5([]);
|
|
665
|
+
const [selectedRecord, setSelectedRecord] = useState6({});
|
|
666
|
+
const [model, setModel] = useState6(false);
|
|
599
667
|
const handleChange = (record) => {
|
|
600
668
|
console.log("record", record);
|
|
601
669
|
if (props.onChange) {
|
|
@@ -610,14 +678,6 @@ var TableElement = (props) => {
|
|
|
610
678
|
dataIndex: "#",
|
|
611
679
|
key: "#"
|
|
612
680
|
},
|
|
613
|
-
// {
|
|
614
|
-
// title: "View",
|
|
615
|
-
// dataIndex: "View",
|
|
616
|
-
// key: "View",
|
|
617
|
-
// render: (_: any, record: any) => (
|
|
618
|
-
// <Button>View</Button>
|
|
619
|
-
// ),
|
|
620
|
-
// },
|
|
621
681
|
...thead.map((col, ind) => ({
|
|
622
682
|
title: col.label,
|
|
623
683
|
dataIndex: col.name,
|
|
@@ -634,9 +694,28 @@ var TableElement = (props) => {
|
|
|
634
694
|
}
|
|
635
695
|
}))
|
|
636
696
|
];
|
|
697
|
+
if (props.view) {
|
|
698
|
+
columns.push({
|
|
699
|
+
title: "View",
|
|
700
|
+
dataIndex: "View",
|
|
701
|
+
key: "View",
|
|
702
|
+
render: (_, record) => /* @__PURE__ */ React20.createElement(
|
|
703
|
+
"a",
|
|
704
|
+
{
|
|
705
|
+
onClick: () => {
|
|
706
|
+
setSelectedRecord(record);
|
|
707
|
+
handleChange(record);
|
|
708
|
+
setModel(true);
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"View"
|
|
712
|
+
)
|
|
713
|
+
});
|
|
714
|
+
}
|
|
637
715
|
}
|
|
638
716
|
const dataSource = tbody && tbody.map((row, index) => ({
|
|
639
717
|
...row,
|
|
718
|
+
key: index + 1,
|
|
640
719
|
[columns[0].key]: index + 1
|
|
641
720
|
}));
|
|
642
721
|
const count = dataSource ? dataSource.length : 0;
|
|
@@ -645,98 +724,70 @@ var TableElement = (props) => {
|
|
|
645
724
|
props.onChange({ name: "pagination", page, pageSize });
|
|
646
725
|
}
|
|
647
726
|
};
|
|
648
|
-
const onSelectChange = (newSelectedRowKeys) => {
|
|
649
|
-
console.log("selectedRowKeys changed: ", newSelectedRowKeys);
|
|
650
|
-
setSelectedRowKeys(newSelectedRowKeys);
|
|
651
|
-
};
|
|
652
727
|
const rowSelectionConfig = props.rowSelection ? {
|
|
653
|
-
selectedRowKeys,
|
|
654
|
-
|
|
728
|
+
onChange: (selectedRowKeys, selectedRows) => {
|
|
729
|
+
console.log(`selectedRowKeys: ${selectedRowKeys}`, "selectedRows: ", selectedRows);
|
|
730
|
+
if (props.onChange) {
|
|
731
|
+
props.onChange(selectedRows);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
655
734
|
} : void 0;
|
|
656
735
|
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
|
|
657
736
|
Table2,
|
|
658
737
|
{
|
|
738
|
+
className: props.className,
|
|
659
739
|
pagination: {
|
|
660
740
|
showTotal: (total) => `Total: ${total} items`,
|
|
661
741
|
total: count,
|
|
662
742
|
showSizeChanger: count > 10,
|
|
663
743
|
onChange: onChangePage
|
|
664
744
|
},
|
|
745
|
+
rowSelection: rowSelectionConfig,
|
|
665
746
|
dataSource,
|
|
666
747
|
columns,
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
size: props.size && props.size,
|
|
670
|
-
onRow: (record) => {
|
|
671
|
-
return {
|
|
672
|
-
onClick: () => {
|
|
673
|
-
setSelectedRecord(record);
|
|
674
|
-
handleChange(record);
|
|
675
|
-
setModel(true);
|
|
676
|
-
},
|
|
677
|
-
style: { cursor: "pointer" }
|
|
678
|
-
};
|
|
679
|
-
}
|
|
748
|
+
size: props.size,
|
|
749
|
+
bordered: true
|
|
680
750
|
}
|
|
681
751
|
), model && /* @__PURE__ */ React20.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
682
752
|
};
|
|
683
753
|
|
|
684
754
|
// src/Components/DatePicker.tsx
|
|
685
|
-
import React21, { useState as
|
|
755
|
+
import React21, { useState as useState7 } from "react";
|
|
686
756
|
import { DatePicker } from "antd";
|
|
687
|
-
import
|
|
688
|
-
import
|
|
757
|
+
import dayjs from "dayjs";
|
|
758
|
+
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
759
|
+
dayjs.extend(customParseFormat);
|
|
689
760
|
var DatePickerElement = (props) => {
|
|
690
|
-
const [
|
|
691
|
-
const handleChange = (
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
const formattedDate = dateString;
|
|
696
|
-
console.log("formattedDate-----------------", formattedDate);
|
|
697
|
-
setDate(date2);
|
|
698
|
-
console.log("changedDate------------", date2);
|
|
761
|
+
const [dateState, setDateState] = useState7("");
|
|
762
|
+
const handleChange = (date, dateString) => {
|
|
763
|
+
if (date) {
|
|
764
|
+
const formattedDate = date;
|
|
765
|
+
setDateState(date);
|
|
699
766
|
if (props.onChange) {
|
|
700
767
|
props.onChange(formattedDate);
|
|
701
768
|
}
|
|
702
769
|
} else {
|
|
703
|
-
|
|
770
|
+
setDateState("");
|
|
704
771
|
if (props.onChange) {
|
|
705
772
|
props.onChange("");
|
|
706
773
|
}
|
|
707
774
|
}
|
|
708
775
|
};
|
|
709
|
-
|
|
710
|
-
const currentDate = date || moment();
|
|
711
|
-
const newDate = moment(currentDate).subtract(1, "days");
|
|
712
|
-
setDate(newDate);
|
|
713
|
-
if (props.onChange) {
|
|
714
|
-
props.onChange(newDate.format("lll"));
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
const onHandleIncrement = () => {
|
|
718
|
-
const currentDate = date || moment();
|
|
719
|
-
const newDate = moment(currentDate).add(1, "days");
|
|
720
|
-
setDate(newDate);
|
|
721
|
-
if (props.onChange) {
|
|
722
|
-
props.onChange(newDate.format("lll"));
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
return /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ React21.createElement(LeftOutlined, null)), /* @__PURE__ */ React21.createElement(
|
|
776
|
+
return /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement(
|
|
726
777
|
DatePicker,
|
|
727
778
|
{
|
|
728
779
|
placeholder: props.placeholder,
|
|
729
|
-
value:
|
|
730
|
-
|
|
780
|
+
value: dateState,
|
|
781
|
+
format: { format: "DD-MM-YYYY" },
|
|
731
782
|
onChange: handleChange
|
|
732
783
|
}
|
|
733
|
-
)
|
|
784
|
+
));
|
|
734
785
|
};
|
|
735
786
|
|
|
736
787
|
// src/Components/DateRangePickerElement.tsx
|
|
737
788
|
import React22 from "react";
|
|
738
789
|
import { DatePicker as DatePicker2, Space } from "antd";
|
|
739
|
-
import
|
|
790
|
+
import dayjs2 from "dayjs";
|
|
740
791
|
var DateRangePickerElement = (props) => {
|
|
741
792
|
const { RangePicker } = DatePicker2;
|
|
742
793
|
const handleChange = (dates, dateStrings) => {
|
|
@@ -747,10 +798,10 @@ var DateRangePickerElement = (props) => {
|
|
|
747
798
|
}
|
|
748
799
|
};
|
|
749
800
|
const rangePresets = [
|
|
750
|
-
{ label: "Last 7 Days", value: [
|
|
751
|
-
{ label: "Last 14 Days", value: [
|
|
752
|
-
{ label: "Last 30 Days", value: [
|
|
753
|
-
{ label: "Last 90 Days", value: [
|
|
801
|
+
{ label: "Last 7 Days", value: [dayjs2().add(-7, "d"), dayjs2()] },
|
|
802
|
+
{ label: "Last 14 Days", value: [dayjs2().add(-14, "d"), dayjs2()] },
|
|
803
|
+
{ label: "Last 30 Days", value: [dayjs2().add(-30, "d"), dayjs2()] },
|
|
804
|
+
{ label: "Last 90 Days", value: [dayjs2().add(-90, "d"), dayjs2()] }
|
|
754
805
|
];
|
|
755
806
|
return /* @__PURE__ */ React22.createElement(Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ React22.createElement(RangePicker, { presets: rangePresets, onChange: handleChange }));
|
|
756
807
|
};
|
|
@@ -758,7 +809,7 @@ var DateRangePickerElement = (props) => {
|
|
|
758
809
|
// src/Components/Image.tsx
|
|
759
810
|
import React23 from "react";
|
|
760
811
|
var Image = (props) => {
|
|
761
|
-
return /* @__PURE__ */ React23.createElement("
|
|
812
|
+
return /* @__PURE__ */ React23.createElement("img", { className: props.className, src: props.img, alt: "image" });
|
|
762
813
|
};
|
|
763
814
|
|
|
764
815
|
// src/Components/SingleCheckbox.tsx
|
|
@@ -774,35 +825,39 @@ var SingleCheckbox = (props) => {
|
|
|
774
825
|
};
|
|
775
826
|
|
|
776
827
|
// src/Components/DropDownGroup.tsx
|
|
777
|
-
import React25, { useState as
|
|
828
|
+
import React25, { useState as useState8 } from "react";
|
|
778
829
|
import { Select as Select4 } from "antd";
|
|
779
830
|
var DropDownGroup = (props) => {
|
|
780
|
-
const [selectedValue, setSelectedValue] =
|
|
831
|
+
const [selectedValue, setSelectedValue] = useState8({
|
|
781
832
|
firstValue: {},
|
|
782
|
-
secondValue: {}
|
|
833
|
+
secondValue: {},
|
|
834
|
+
temp: ""
|
|
783
835
|
});
|
|
784
836
|
const handleFirstChange = (value) => {
|
|
785
|
-
|
|
837
|
+
console.log(selectedValue.temp);
|
|
838
|
+
const filterOption2 = props.firstOptions?.find(
|
|
786
839
|
(eachOption) => eachOption.value === value
|
|
787
840
|
);
|
|
788
841
|
setSelectedValue((prev) => {
|
|
789
842
|
const newValue = { ...prev, firstValue: filterOption2 };
|
|
843
|
+
const { temp, ...rest } = newValue;
|
|
790
844
|
if (newValue.firstValue) {
|
|
791
|
-
props.onChange?.(
|
|
845
|
+
props.onChange?.(rest);
|
|
792
846
|
}
|
|
793
|
-
return
|
|
847
|
+
return newValue;
|
|
794
848
|
});
|
|
795
849
|
};
|
|
796
850
|
const handleSecondChange = (value) => {
|
|
797
|
-
const filterOption2 = props.
|
|
851
|
+
const filterOption2 = props.secondOptions?.find(
|
|
798
852
|
(eachOption) => eachOption.value === value
|
|
799
853
|
);
|
|
800
854
|
setSelectedValue((prev) => {
|
|
801
855
|
const newValue = { ...prev, secondValue: filterOption2 };
|
|
856
|
+
const { temp, ...rest } = newValue;
|
|
802
857
|
if (newValue.secondValue) {
|
|
803
|
-
props.onChange?.(
|
|
858
|
+
props.onChange?.(rest);
|
|
804
859
|
}
|
|
805
|
-
return
|
|
860
|
+
return newValue;
|
|
806
861
|
});
|
|
807
862
|
};
|
|
808
863
|
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(
|
|
@@ -810,7 +865,7 @@ var DropDownGroup = (props) => {
|
|
|
810
865
|
{
|
|
811
866
|
onChange: handleFirstChange,
|
|
812
867
|
variant: props.variant,
|
|
813
|
-
options: props.
|
|
868
|
+
options: props.firstOptions,
|
|
814
869
|
className: props.className
|
|
815
870
|
}
|
|
816
871
|
), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React25.createElement(
|
|
@@ -818,27 +873,19 @@ var DropDownGroup = (props) => {
|
|
|
818
873
|
{
|
|
819
874
|
onChange: handleSecondChange,
|
|
820
875
|
variant: props.variant,
|
|
821
|
-
options: props.
|
|
876
|
+
options: props.secondOptions,
|
|
822
877
|
className: props.className
|
|
823
878
|
}
|
|
824
879
|
)));
|
|
825
880
|
};
|
|
826
881
|
|
|
827
882
|
// src/Components/FilesUpload.tsx
|
|
828
|
-
import React26, { useState as
|
|
829
|
-
import { Upload
|
|
883
|
+
import React26, { useState as useState9 } from "react";
|
|
884
|
+
import { Upload } from "antd";
|
|
830
885
|
import { InboxOutlined } from "@ant-design/icons";
|
|
831
886
|
var FileUpload = (props) => {
|
|
832
887
|
const { Dragger } = Upload;
|
|
833
|
-
const [files, setFiles] =
|
|
834
|
-
const beforeUpload = (file) => {
|
|
835
|
-
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "application/pdf"].includes(file.type);
|
|
836
|
-
if (!isCorrectFile) {
|
|
837
|
-
message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg/.pdf)`);
|
|
838
|
-
return Upload.LIST_IGNORE;
|
|
839
|
-
}
|
|
840
|
-
return true;
|
|
841
|
-
};
|
|
888
|
+
const [files, setFiles] = useState9([]);
|
|
842
889
|
const handleChange = ({ fileList }) => {
|
|
843
890
|
setFiles(fileList);
|
|
844
891
|
if (props.onChange) {
|
|
@@ -862,7 +909,6 @@ var FileUpload = (props) => {
|
|
|
862
909
|
maxCount: props.max_count,
|
|
863
910
|
multiple: props.multiple,
|
|
864
911
|
fileList: files,
|
|
865
|
-
beforeUpload,
|
|
866
912
|
onChange: handleChange,
|
|
867
913
|
showUploadList: true,
|
|
868
914
|
customRequest
|
|
@@ -883,6 +929,98 @@ var TabsElement = (props) => {
|
|
|
883
929
|
};
|
|
884
930
|
return /* @__PURE__ */ React27.createElement(Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
885
931
|
};
|
|
932
|
+
|
|
933
|
+
// src/Components/SwitchElement.tsx
|
|
934
|
+
import React28 from "react";
|
|
935
|
+
import { Switch } from "antd";
|
|
936
|
+
var onChange = (checked) => {
|
|
937
|
+
console.log(`switch to ${checked}`);
|
|
938
|
+
};
|
|
939
|
+
var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
|
|
940
|
+
|
|
941
|
+
// src/Components/Upload.tsx
|
|
942
|
+
import React29, { useState as useState10 } from "react";
|
|
943
|
+
var Upload2 = (props) => {
|
|
944
|
+
const [file, setFile] = useState10();
|
|
945
|
+
const handleFileChange = (e) => {
|
|
946
|
+
setFile(e.target.files[0]);
|
|
947
|
+
if (props.onChange) {
|
|
948
|
+
props.onChange(e.target.files[0]);
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
const handleUpload = async () => {
|
|
952
|
+
if (!file) {
|
|
953
|
+
console.error("No file selected");
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
return /* @__PURE__ */ React29.createElement("div", { style: { marginTop: 16 } }, /* @__PURE__ */ React29.createElement("input", { type: "file", onChange: handleFileChange }), /* @__PURE__ */ React29.createElement(
|
|
958
|
+
"button",
|
|
959
|
+
{
|
|
960
|
+
type: "button",
|
|
961
|
+
onClick: handleUpload,
|
|
962
|
+
disabled: !file,
|
|
963
|
+
style: { marginTop: 16 }
|
|
964
|
+
},
|
|
965
|
+
"Upload"
|
|
966
|
+
));
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
// src/Components/OtpElement.tsx
|
|
970
|
+
import React30, { useState as useState11, useRef, useEffect as useEffect3 } from "react";
|
|
971
|
+
import { Input as Input3 } from "antd";
|
|
972
|
+
var OtpElement = (props) => {
|
|
973
|
+
const length = props.length;
|
|
974
|
+
const [otp, setOtp] = useState11(Array(length).fill(""));
|
|
975
|
+
const inputRefs = useRef([]);
|
|
976
|
+
const handleChange = (e, index) => {
|
|
977
|
+
const value = e.target.value;
|
|
978
|
+
if (/^[0-9]$/.test(value) || value === "") {
|
|
979
|
+
const newOtp = [...otp];
|
|
980
|
+
newOtp[index] = value;
|
|
981
|
+
setOtp(newOtp);
|
|
982
|
+
props.onChange && props.onChange(newOtp.join(""));
|
|
983
|
+
if (value && index < length - 1) {
|
|
984
|
+
inputRefs.current[index + 1]?.focus();
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
const handleKeyDown = (e, index) => {
|
|
989
|
+
if (e.key === "Backspace" && !otp[index] && index > 0) {
|
|
990
|
+
inputRefs.current[index - 1]?.focus();
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
const handlePaste = (e) => {
|
|
994
|
+
e.preventDefault();
|
|
995
|
+
const pasteData = e.clipboardData.getData("text");
|
|
996
|
+
if (/^\d+$/.test(pasteData)) {
|
|
997
|
+
const newOtp = pasteData.split("").slice(0, length);
|
|
998
|
+
setOtp(newOtp.concat(Array(length - newOtp.length).fill("")));
|
|
999
|
+
props.onChange && props.onChange(newOtp.join(""));
|
|
1000
|
+
newOtp.forEach((_, idx) => {
|
|
1001
|
+
if (inputRefs.current[idx]) {
|
|
1002
|
+
inputRefs.current[idx]?.focus();
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
useEffect3(() => {
|
|
1008
|
+
inputRefs.current[0]?.focus();
|
|
1009
|
+
}, []);
|
|
1010
|
+
return /* @__PURE__ */ React30.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ React30.createElement(
|
|
1011
|
+
Input3,
|
|
1012
|
+
{
|
|
1013
|
+
key: index,
|
|
1014
|
+
className: props.className,
|
|
1015
|
+
maxLength: 1,
|
|
1016
|
+
value: otp[index],
|
|
1017
|
+
onChange: (e) => handleChange(e, index),
|
|
1018
|
+
onKeyDown: (e) => handleKeyDown(e, index),
|
|
1019
|
+
onPaste: handlePaste,
|
|
1020
|
+
ref: (el) => inputRefs.current[index] = el
|
|
1021
|
+
}
|
|
1022
|
+
)));
|
|
1023
|
+
};
|
|
886
1024
|
export {
|
|
887
1025
|
AddMoreTable,
|
|
888
1026
|
ButtonElement,
|
|
@@ -896,14 +1034,17 @@ export {
|
|
|
896
1034
|
MultipleSelectElement,
|
|
897
1035
|
Navbar,
|
|
898
1036
|
NumberElement,
|
|
1037
|
+
OtpElement,
|
|
899
1038
|
PasswordElement,
|
|
900
1039
|
RadioElement,
|
|
901
1040
|
SelectElement,
|
|
902
1041
|
Sidebar,
|
|
903
1042
|
SingleCheckbox,
|
|
904
1043
|
SingleSelectElement,
|
|
1044
|
+
SwitchElement,
|
|
905
1045
|
TableElement,
|
|
906
1046
|
TabsElement,
|
|
907
1047
|
TextElement,
|
|
908
|
-
TextareaElement
|
|
1048
|
+
TextareaElement,
|
|
1049
|
+
Upload2 as Upload
|
|
909
1050
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/ui-components",
|
|
3
|
-
"version": "0.0.14-
|
|
3
|
+
"version": "0.0.14-Beta71",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@apexcura/core": "^0.0.15-Beta34",
|
|
52
|
-
"@apexcura/ui-components": "^0.0.11-Beta256",
|
|
53
51
|
"@tinymce/tinymce-react": "^5.0.1",
|
|
54
52
|
"autoprefixer": "^10.4.19",
|
|
55
53
|
"date-fns": "^3.6.0",
|
|
56
54
|
"esbuild": "^0.21.4",
|
|
55
|
+
"highcharts": "^11.4.3",
|
|
56
|
+
"highcharts-react-official": "^3.2.1",
|
|
57
57
|
"moment": "^2.30.1",
|
|
58
58
|
"postcss": "^8.4.38",
|
|
59
59
|
"postcss-import": "^16.1.0",
|