@apexcura/ui-components 0.0.13-Beta31 → 0.0.13-Beta33
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.js +25 -27
- package/dist/index.mjs +26 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -185,23 +185,17 @@ var TextareaElement = (props) => {
|
|
|
185
185
|
// src/Components/SelectElement.tsx
|
|
186
186
|
var import_react5 = __toESM(require("react"));
|
|
187
187
|
var import_antd5 = require("antd");
|
|
188
|
-
var labelRender = (props) => {
|
|
189
|
-
const { label, value } = props;
|
|
190
|
-
if (label) {
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
return /* @__PURE__ */ import_react5.default.createElement("span", null, "select gender");
|
|
194
|
-
};
|
|
195
188
|
var SelectElement = (props) => {
|
|
196
189
|
const handleChange = (value) => {
|
|
190
|
+
console.log("sigleselectvalue----", value);
|
|
197
191
|
if (props.onChange) {
|
|
198
|
-
props.
|
|
192
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
193
|
+
props.onChange(filterOption2);
|
|
199
194
|
}
|
|
200
195
|
};
|
|
201
|
-
return /* @__PURE__ */ import_react5.default.createElement(
|
|
196
|
+
return /* @__PURE__ */ import_react5.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react5.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react5.default.createElement(
|
|
202
197
|
import_antd5.Select,
|
|
203
198
|
{
|
|
204
|
-
labelRender,
|
|
205
199
|
options: props.options,
|
|
206
200
|
placeholder: props.placeholder,
|
|
207
201
|
allowClear: true,
|
|
@@ -214,7 +208,7 @@ var SelectElement = (props) => {
|
|
|
214
208
|
variant: props.variant,
|
|
215
209
|
onChange: handleChange
|
|
216
210
|
}
|
|
217
|
-
);
|
|
211
|
+
));
|
|
218
212
|
};
|
|
219
213
|
|
|
220
214
|
// src/Components/RadioElement.tsx
|
|
@@ -882,23 +876,27 @@ var SingleCheckbox = (props) => {
|
|
|
882
876
|
var import_react27 = __toESM(require("react"));
|
|
883
877
|
var import_antd19 = require("antd");
|
|
884
878
|
var MultiSelect = (props) => {
|
|
885
|
-
const options =
|
|
886
|
-
const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)(
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
879
|
+
const [options, setOptions] = (0, import_react27.useState)([]);
|
|
880
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)({});
|
|
881
|
+
(0, import_react27.useEffect)(() => {
|
|
882
|
+
const newOptions = [];
|
|
883
|
+
for (let i = 1; i < 100; i++) {
|
|
884
|
+
newOptions.push({
|
|
885
|
+
value: i,
|
|
886
|
+
label: i
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
setOptions(newOptions);
|
|
890
|
+
console.log("options========", options);
|
|
891
|
+
}, []);
|
|
892
|
+
const handleChange = (value) => {
|
|
893
|
+
const filterOption2 = options.find((eachOption) => eachOption.value === value);
|
|
894
|
+
console.log(filterOption2);
|
|
895
|
+
if (filterOption2) {
|
|
896
|
+
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
897
|
+
}
|
|
900
898
|
};
|
|
901
|
-
console.log(selectedOptions);
|
|
899
|
+
console.log("selectedOptions", selectedOptions);
|
|
902
900
|
return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.className, style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
903
901
|
import_antd19.Select,
|
|
904
902
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -129,23 +129,17 @@ var TextareaElement = (props) => {
|
|
|
129
129
|
// src/Components/SelectElement.tsx
|
|
130
130
|
import React5 from "react";
|
|
131
131
|
import { Select } from "antd";
|
|
132
|
-
var labelRender = (props) => {
|
|
133
|
-
const { label, value } = props;
|
|
134
|
-
if (label) {
|
|
135
|
-
return value;
|
|
136
|
-
}
|
|
137
|
-
return /* @__PURE__ */ React5.createElement("span", null, "select gender");
|
|
138
|
-
};
|
|
139
132
|
var SelectElement = (props) => {
|
|
140
133
|
const handleChange = (value) => {
|
|
134
|
+
console.log("sigleselectvalue----", value);
|
|
141
135
|
if (props.onChange) {
|
|
142
|
-
props.
|
|
136
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
137
|
+
props.onChange(filterOption2);
|
|
143
138
|
}
|
|
144
139
|
};
|
|
145
|
-
return /* @__PURE__ */ React5.createElement(
|
|
140
|
+
return /* @__PURE__ */ React5.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React5.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React5.createElement(
|
|
146
141
|
Select,
|
|
147
142
|
{
|
|
148
|
-
labelRender,
|
|
149
143
|
options: props.options,
|
|
150
144
|
placeholder: props.placeholder,
|
|
151
145
|
allowClear: true,
|
|
@@ -158,7 +152,7 @@ var SelectElement = (props) => {
|
|
|
158
152
|
variant: props.variant,
|
|
159
153
|
onChange: handleChange
|
|
160
154
|
}
|
|
161
|
-
);
|
|
155
|
+
));
|
|
162
156
|
};
|
|
163
157
|
|
|
164
158
|
// src/Components/RadioElement.tsx
|
|
@@ -823,26 +817,30 @@ var SingleCheckbox = (props) => {
|
|
|
823
817
|
};
|
|
824
818
|
|
|
825
819
|
// src/Components/MultiSelect.tsx
|
|
826
|
-
import React26, { useState as useState7 } from "react";
|
|
820
|
+
import React26, { useState as useState7, useEffect as useEffect2 } from "react";
|
|
827
821
|
import { Select as Select4 } from "antd";
|
|
828
822
|
var MultiSelect = (props) => {
|
|
829
|
-
const options =
|
|
830
|
-
const [selectedOptions, setSelectedOptions] = useState7(
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
823
|
+
const [options, setOptions] = useState7([]);
|
|
824
|
+
const [selectedOptions, setSelectedOptions] = useState7({});
|
|
825
|
+
useEffect2(() => {
|
|
826
|
+
const newOptions = [];
|
|
827
|
+
for (let i = 1; i < 100; i++) {
|
|
828
|
+
newOptions.push({
|
|
829
|
+
value: i,
|
|
830
|
+
label: i
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
setOptions(newOptions);
|
|
834
|
+
console.log("options========", options);
|
|
835
|
+
}, []);
|
|
836
|
+
const handleChange = (value) => {
|
|
837
|
+
const filterOption2 = options.find((eachOption) => eachOption.value === value);
|
|
838
|
+
console.log(filterOption2);
|
|
839
|
+
if (filterOption2) {
|
|
840
|
+
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
841
|
+
}
|
|
844
842
|
};
|
|
845
|
-
console.log(selectedOptions);
|
|
843
|
+
console.log("selectedOptions", selectedOptions);
|
|
846
844
|
return /* @__PURE__ */ React26.createElement("div", { className: props.className, style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ React26.createElement(
|
|
847
845
|
Select4,
|
|
848
846
|
{
|