@apexcura/ui-components 0.0.13-Beta34 → 0.0.13-Beta37
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -24
- package/dist/index.mjs +18 -25
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ type ElementType = {
|
|
|
13
13
|
prefix?: React.ReactNode;
|
|
14
14
|
type?: string;
|
|
15
15
|
size?: SizeType;
|
|
16
|
-
value?: string | number | boolean | any[] | null | undefined;
|
|
16
|
+
value?: string | number | boolean | any[] | null | object | undefined;
|
|
17
17
|
status?: "error" | "warning";
|
|
18
18
|
styles?: React.CSSProperties;
|
|
19
19
|
variant?: "outlined" | "borderless" | "filled";
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type ElementType = {
|
|
|
13
13
|
prefix?: React.ReactNode;
|
|
14
14
|
type?: string;
|
|
15
15
|
size?: SizeType;
|
|
16
|
-
value?: string | number | boolean | any[] | null | undefined;
|
|
16
|
+
value?: string | number | boolean | any[] | null | object | undefined;
|
|
17
17
|
status?: "error" | "warning";
|
|
18
18
|
styles?: React.CSSProperties;
|
|
19
19
|
variant?: "outlined" | "borderless" | "filled";
|
package/dist/index.js
CHANGED
|
@@ -876,41 +876,34 @@ var SingleCheckbox = (props) => {
|
|
|
876
876
|
var import_react27 = __toESM(require("react"));
|
|
877
877
|
var import_antd19 = require("antd");
|
|
878
878
|
var MultiSelect = (props) => {
|
|
879
|
-
const [
|
|
880
|
-
const
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
value: i,
|
|
886
|
-
label: i
|
|
887
|
-
});
|
|
879
|
+
const [selectedValue, setSelectedValue] = (0, import_react27.useState)({ firstValue: {}, secondValue: {} });
|
|
880
|
+
const handleFirstChange = (value) => {
|
|
881
|
+
if (props.onChange) {
|
|
882
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
883
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
884
|
+
props.onChange(selectedValue);
|
|
888
885
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
if (filterOption2) {
|
|
896
|
-
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
897
|
-
console.log(selectedOptions);
|
|
886
|
+
};
|
|
887
|
+
const handleSecondChange = (value) => {
|
|
888
|
+
if (props.onChange) {
|
|
889
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
890
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
891
|
+
props.onChange({ secondValue: filterOption2 });
|
|
898
892
|
}
|
|
899
893
|
};
|
|
900
|
-
|
|
901
|
-
return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
894
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "100px" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
902
895
|
import_antd19.Select,
|
|
903
896
|
{
|
|
904
|
-
onChange:
|
|
897
|
+
onChange: handleFirstChange,
|
|
905
898
|
variant: props.variant,
|
|
906
|
-
options
|
|
899
|
+
options: props.options
|
|
907
900
|
}
|
|
908
901
|
), /* @__PURE__ */ import_react27.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react27.default.createElement(
|
|
909
902
|
import_antd19.Select,
|
|
910
903
|
{
|
|
911
|
-
onChange:
|
|
904
|
+
onChange: handleSecondChange,
|
|
912
905
|
variant: props.variant,
|
|
913
|
-
options
|
|
906
|
+
options: props.options
|
|
914
907
|
}
|
|
915
908
|
));
|
|
916
909
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -817,44 +817,37 @@ var SingleCheckbox = (props) => {
|
|
|
817
817
|
};
|
|
818
818
|
|
|
819
819
|
// src/Components/MultiSelect.tsx
|
|
820
|
-
import React26, { useState as useState7
|
|
820
|
+
import React26, { useState as useState7 } from "react";
|
|
821
821
|
import { Select as Select4 } from "antd";
|
|
822
822
|
var MultiSelect = (props) => {
|
|
823
|
-
const [
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
value: i,
|
|
830
|
-
label: i
|
|
831
|
-
});
|
|
823
|
+
const [selectedValue, setSelectedValue] = useState7({ firstValue: {}, secondValue: {} });
|
|
824
|
+
const handleFirstChange = (value) => {
|
|
825
|
+
if (props.onChange) {
|
|
826
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
827
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
828
|
+
props.onChange(selectedValue);
|
|
832
829
|
}
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
if (filterOption2) {
|
|
840
|
-
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
841
|
-
console.log(selectedOptions);
|
|
830
|
+
};
|
|
831
|
+
const handleSecondChange = (value) => {
|
|
832
|
+
if (props.onChange) {
|
|
833
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
834
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
835
|
+
props.onChange({ secondValue: filterOption2 });
|
|
842
836
|
}
|
|
843
837
|
};
|
|
844
|
-
|
|
845
|
-
return /* @__PURE__ */ React26.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ React26.createElement(
|
|
838
|
+
return /* @__PURE__ */ React26.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "100px" } }, /* @__PURE__ */ React26.createElement(
|
|
846
839
|
Select4,
|
|
847
840
|
{
|
|
848
|
-
onChange:
|
|
841
|
+
onChange: handleFirstChange,
|
|
849
842
|
variant: props.variant,
|
|
850
|
-
options
|
|
843
|
+
options: props.options
|
|
851
844
|
}
|
|
852
845
|
), /* @__PURE__ */ React26.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React26.createElement(
|
|
853
846
|
Select4,
|
|
854
847
|
{
|
|
855
|
-
onChange:
|
|
848
|
+
onChange: handleSecondChange,
|
|
856
849
|
variant: props.variant,
|
|
857
|
-
options
|
|
850
|
+
options: props.options
|
|
858
851
|
}
|
|
859
852
|
));
|
|
860
853
|
};
|