@apexcura/ui-components 0.0.14-Beta5 → 0.0.14-Beta7
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +24 -15
- package/dist/index.mjs +25 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -464,9 +464,9 @@ var AddMoreTable = (props) => {
|
|
|
464
464
|
if (!element) return null;
|
|
465
465
|
const { element: type, label } = element;
|
|
466
466
|
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 });
|
|
467
|
+
return /* @__PURE__ */ import_react12.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
468
468
|
} 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 });
|
|
469
|
+
return /* @__PURE__ */ import_react12.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
470
470
|
} else {
|
|
471
471
|
return null;
|
|
472
472
|
}
|
|
@@ -667,12 +667,14 @@ var TableElement = (props) => {
|
|
|
667
667
|
dataIndex: "#",
|
|
668
668
|
key: "#"
|
|
669
669
|
},
|
|
670
|
-
{
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
670
|
+
// {
|
|
671
|
+
// title: "View",
|
|
672
|
+
// dataIndex: "View",
|
|
673
|
+
// key: "View",
|
|
674
|
+
// render: (_: any, record: any) => (
|
|
675
|
+
// <Button>View</Button>
|
|
676
|
+
// ),
|
|
677
|
+
// },
|
|
676
678
|
...thead.map((col, ind) => ({
|
|
677
679
|
title: col.label,
|
|
678
680
|
dataIndex: col.name,
|
|
@@ -832,9 +834,14 @@ var SingleCheckbox = (props) => {
|
|
|
832
834
|
var import_react25 = __toESM(require("react"));
|
|
833
835
|
var import_antd18 = require("antd");
|
|
834
836
|
var DropDownGroup = (props) => {
|
|
835
|
-
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
837
|
+
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
838
|
+
firstValue: {},
|
|
839
|
+
secondValue: {}
|
|
840
|
+
});
|
|
836
841
|
const handleFirstChange = (value) => {
|
|
837
|
-
const filterOption2 = props.options?.find(
|
|
842
|
+
const filterOption2 = props.options?.find(
|
|
843
|
+
(eachOption) => eachOption.value === value
|
|
844
|
+
);
|
|
838
845
|
setSelectedValue((prev) => {
|
|
839
846
|
const newValue = { ...prev, firstValue: filterOption2 };
|
|
840
847
|
if (newValue.firstValue) {
|
|
@@ -844,7 +851,9 @@ var DropDownGroup = (props) => {
|
|
|
844
851
|
});
|
|
845
852
|
};
|
|
846
853
|
const handleSecondChange = (value) => {
|
|
847
|
-
const filterOption2 = props.options?.find(
|
|
854
|
+
const filterOption2 = props.options?.find(
|
|
855
|
+
(eachOption) => eachOption.value === value
|
|
856
|
+
);
|
|
848
857
|
setSelectedValue((prev) => {
|
|
849
858
|
const newValue = { ...prev, secondValue: filterOption2 };
|
|
850
859
|
if (newValue.secondValue) {
|
|
@@ -853,12 +862,12 @@ var DropDownGroup = (props) => {
|
|
|
853
862
|
return selectedValue;
|
|
854
863
|
});
|
|
855
864
|
};
|
|
856
|
-
return /* @__PURE__ */ import_react25.default.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ import_react25.default.createElement(
|
|
865
|
+
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(
|
|
857
866
|
import_antd18.Select,
|
|
858
867
|
{
|
|
859
868
|
onChange: handleFirstChange,
|
|
860
869
|
variant: props.variant,
|
|
861
|
-
options: props.
|
|
870
|
+
options: props.options1,
|
|
862
871
|
className: props.className
|
|
863
872
|
}
|
|
864
873
|
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
@@ -866,10 +875,10 @@ var DropDownGroup = (props) => {
|
|
|
866
875
|
{
|
|
867
876
|
onChange: handleSecondChange,
|
|
868
877
|
variant: props.variant,
|
|
869
|
-
options: props.
|
|
878
|
+
options: props.options2,
|
|
870
879
|
className: props.className
|
|
871
880
|
}
|
|
872
|
-
));
|
|
881
|
+
)));
|
|
873
882
|
};
|
|
874
883
|
|
|
875
884
|
// src/Components/FilesUpload.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -407,9 +407,9 @@ var AddMoreTable = (props) => {
|
|
|
407
407
|
if (!element) return null;
|
|
408
408
|
const { element: type, label } = element;
|
|
409
409
|
if (type === "single-select") {
|
|
410
|
-
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
410
|
+
return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
411
411
|
} else if (type === "textarea") {
|
|
412
|
-
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
412
|
+
return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
|
|
413
413
|
} else {
|
|
414
414
|
return null;
|
|
415
415
|
}
|
|
@@ -536,7 +536,7 @@ var Navbar = (props) => {
|
|
|
536
536
|
|
|
537
537
|
// src/Components/TableElement.tsx
|
|
538
538
|
import React20, { useState as useState5 } from "react";
|
|
539
|
-
import {
|
|
539
|
+
import { Table as Table2 } from "antd";
|
|
540
540
|
|
|
541
541
|
// src/Components/Model.tsx
|
|
542
542
|
import React19 from "react";
|
|
@@ -610,12 +610,14 @@ var TableElement = (props) => {
|
|
|
610
610
|
dataIndex: "#",
|
|
611
611
|
key: "#"
|
|
612
612
|
},
|
|
613
|
-
{
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
613
|
+
// {
|
|
614
|
+
// title: "View",
|
|
615
|
+
// dataIndex: "View",
|
|
616
|
+
// key: "View",
|
|
617
|
+
// render: (_: any, record: any) => (
|
|
618
|
+
// <Button>View</Button>
|
|
619
|
+
// ),
|
|
620
|
+
// },
|
|
619
621
|
...thead.map((col, ind) => ({
|
|
620
622
|
title: col.label,
|
|
621
623
|
dataIndex: col.name,
|
|
@@ -775,9 +777,14 @@ var SingleCheckbox = (props) => {
|
|
|
775
777
|
import React25, { useState as useState7 } from "react";
|
|
776
778
|
import { Select as Select4 } from "antd";
|
|
777
779
|
var DropDownGroup = (props) => {
|
|
778
|
-
const [selectedValue, setSelectedValue] = useState7({
|
|
780
|
+
const [selectedValue, setSelectedValue] = useState7({
|
|
781
|
+
firstValue: {},
|
|
782
|
+
secondValue: {}
|
|
783
|
+
});
|
|
779
784
|
const handleFirstChange = (value) => {
|
|
780
|
-
const filterOption2 = props.options?.find(
|
|
785
|
+
const filterOption2 = props.options?.find(
|
|
786
|
+
(eachOption) => eachOption.value === value
|
|
787
|
+
);
|
|
781
788
|
setSelectedValue((prev) => {
|
|
782
789
|
const newValue = { ...prev, firstValue: filterOption2 };
|
|
783
790
|
if (newValue.firstValue) {
|
|
@@ -787,7 +794,9 @@ var DropDownGroup = (props) => {
|
|
|
787
794
|
});
|
|
788
795
|
};
|
|
789
796
|
const handleSecondChange = (value) => {
|
|
790
|
-
const filterOption2 = props.options?.find(
|
|
797
|
+
const filterOption2 = props.options?.find(
|
|
798
|
+
(eachOption) => eachOption.value === value
|
|
799
|
+
);
|
|
791
800
|
setSelectedValue((prev) => {
|
|
792
801
|
const newValue = { ...prev, secondValue: filterOption2 };
|
|
793
802
|
if (newValue.secondValue) {
|
|
@@ -796,12 +805,12 @@ var DropDownGroup = (props) => {
|
|
|
796
805
|
return selectedValue;
|
|
797
806
|
});
|
|
798
807
|
};
|
|
799
|
-
return /* @__PURE__ */ React25.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ React25.createElement(
|
|
808
|
+
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(
|
|
800
809
|
Select4,
|
|
801
810
|
{
|
|
802
811
|
onChange: handleFirstChange,
|
|
803
812
|
variant: props.variant,
|
|
804
|
-
options: props.
|
|
813
|
+
options: props.options1,
|
|
805
814
|
className: props.className
|
|
806
815
|
}
|
|
807
816
|
), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React25.createElement(
|
|
@@ -809,10 +818,10 @@ var DropDownGroup = (props) => {
|
|
|
809
818
|
{
|
|
810
819
|
onChange: handleSecondChange,
|
|
811
820
|
variant: props.variant,
|
|
812
|
-
options: props.
|
|
821
|
+
options: props.options2,
|
|
813
822
|
className: props.className
|
|
814
823
|
}
|
|
815
|
-
));
|
|
824
|
+
)));
|
|
816
825
|
};
|
|
817
826
|
|
|
818
827
|
// src/Components/FilesUpload.tsx
|