@apexcura/ui-components 0.0.13-Beta27 → 0.0.13-Beta28
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 +58 -29
- package/dist/index.mjs +59 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
58
58
|
var import_react = __toESM(require("react"));
|
|
59
59
|
var import_antd = require("antd");
|
|
60
60
|
var TextElement = (props) => {
|
|
61
|
-
const
|
|
61
|
+
const handleChange2 = (e) => {
|
|
62
62
|
if (props.onChange) {
|
|
63
63
|
props.onChange(e.target.value);
|
|
64
64
|
}
|
|
@@ -80,7 +80,7 @@ var TextElement = (props) => {
|
|
|
80
80
|
variant: props.variant,
|
|
81
81
|
name: props.name,
|
|
82
82
|
onChange: (e) => {
|
|
83
|
-
|
|
83
|
+
handleChange2(e);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
));
|
|
@@ -95,7 +95,7 @@ var PasswordElement = (props) => {
|
|
|
95
95
|
const handleVisibilityToggle = () => {
|
|
96
96
|
setPasswordVisible((prev) => !prev);
|
|
97
97
|
};
|
|
98
|
-
const
|
|
98
|
+
const handleChange2 = (e) => {
|
|
99
99
|
if (props.onChange) {
|
|
100
100
|
props.onChange(e.target.value);
|
|
101
101
|
}
|
|
@@ -108,7 +108,7 @@ var PasswordElement = (props) => {
|
|
|
108
108
|
className: props.className,
|
|
109
109
|
type: props.type,
|
|
110
110
|
onChange: (e) => {
|
|
111
|
-
|
|
111
|
+
handleChange2(e);
|
|
112
112
|
},
|
|
113
113
|
iconRender: renderVisibilityIcon,
|
|
114
114
|
visibilityToggle: {
|
|
@@ -123,7 +123,7 @@ var PasswordElement = (props) => {
|
|
|
123
123
|
var import_react3 = __toESM(require("react"));
|
|
124
124
|
var import_antd3 = require("antd");
|
|
125
125
|
var NumberElement = (props) => {
|
|
126
|
-
const
|
|
126
|
+
const handleChange2 = (e) => {
|
|
127
127
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
128
128
|
if (props.onChange) {
|
|
129
129
|
props.onChange(newValue);
|
|
@@ -145,7 +145,7 @@ var NumberElement = (props) => {
|
|
|
145
145
|
variant: props.variant,
|
|
146
146
|
name: props.name,
|
|
147
147
|
onChange: (e) => {
|
|
148
|
-
|
|
148
|
+
handleChange2(e);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
));
|
|
@@ -156,7 +156,7 @@ var import_react4 = __toESM(require("react"));
|
|
|
156
156
|
var import_antd4 = require("antd");
|
|
157
157
|
var { TextArea } = import_antd4.Input;
|
|
158
158
|
var TextareaElement = (props) => {
|
|
159
|
-
const
|
|
159
|
+
const handleChange2 = (e) => {
|
|
160
160
|
if (props.onChange) {
|
|
161
161
|
props.onChange(e.target.value);
|
|
162
162
|
}
|
|
@@ -176,7 +176,7 @@ var TextareaElement = (props) => {
|
|
|
176
176
|
showCount: true,
|
|
177
177
|
maxLength: props.maxLength,
|
|
178
178
|
onChange: (e) => {
|
|
179
|
-
|
|
179
|
+
handleChange2(e);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
));
|
|
@@ -193,7 +193,7 @@ var labelRender = (props) => {
|
|
|
193
193
|
return /* @__PURE__ */ import_react5.default.createElement("span", null, "select gender");
|
|
194
194
|
};
|
|
195
195
|
var SelectElement = (props) => {
|
|
196
|
-
const
|
|
196
|
+
const handleChange2 = (value) => {
|
|
197
197
|
if (props.onChange) {
|
|
198
198
|
props.onChange(value);
|
|
199
199
|
}
|
|
@@ -212,7 +212,7 @@ var SelectElement = (props) => {
|
|
|
212
212
|
style: props.styles,
|
|
213
213
|
className: props.className,
|
|
214
214
|
variant: props.variant,
|
|
215
|
-
onChange:
|
|
215
|
+
onChange: handleChange2
|
|
216
216
|
}
|
|
217
217
|
);
|
|
218
218
|
};
|
|
@@ -226,7 +226,7 @@ var RadioElement = (props) => {
|
|
|
226
226
|
const [isDisabled, setIsDisabled] = (0, import_react6.useState)(props.disabled);
|
|
227
227
|
const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
|
|
228
228
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
229
|
-
const
|
|
229
|
+
const handleChange2 = (option) => {
|
|
230
230
|
console.log(option);
|
|
231
231
|
setSelectedValue(option);
|
|
232
232
|
setIsDisabled(true);
|
|
@@ -249,7 +249,7 @@ var RadioElement = (props) => {
|
|
|
249
249
|
import_antd6.Radio,
|
|
250
250
|
{
|
|
251
251
|
onChange: () => {
|
|
252
|
-
|
|
252
|
+
handleChange2(option);
|
|
253
253
|
},
|
|
254
254
|
key: option.value,
|
|
255
255
|
value: option.value,
|
|
@@ -271,7 +271,7 @@ var defaultCheckedList = [];
|
|
|
271
271
|
var CheckboxElement = (props) => {
|
|
272
272
|
const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
|
|
273
273
|
const checkAll = props.options && props.options.length === checkedList.length;
|
|
274
|
-
const
|
|
274
|
+
const handleChange2 = (list) => {
|
|
275
275
|
setCheckedList(list);
|
|
276
276
|
if (props.onChange) {
|
|
277
277
|
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
@@ -304,7 +304,7 @@ var CheckboxElement = (props) => {
|
|
|
304
304
|
className: props.className,
|
|
305
305
|
options: props.options,
|
|
306
306
|
value: checkedList,
|
|
307
|
-
onChange:
|
|
307
|
+
onChange: handleChange2
|
|
308
308
|
}
|
|
309
309
|
));
|
|
310
310
|
};
|
|
@@ -369,7 +369,7 @@ var onSearch = (value) => {
|
|
|
369
369
|
};
|
|
370
370
|
var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
371
371
|
var SingleSelectElement = (props) => {
|
|
372
|
-
const
|
|
372
|
+
const handleChange2 = (values) => {
|
|
373
373
|
if (props.onChange) {
|
|
374
374
|
const option = props.dropDownOptions?.find(
|
|
375
375
|
(option2) => String(option2.title) === values
|
|
@@ -384,7 +384,7 @@ var SingleSelectElement = (props) => {
|
|
|
384
384
|
showSearch: true,
|
|
385
385
|
placeholder: props.placeholder,
|
|
386
386
|
optionFilterProp: "children",
|
|
387
|
-
onChange:
|
|
387
|
+
onChange: handleChange2,
|
|
388
388
|
onSearch,
|
|
389
389
|
filterOption,
|
|
390
390
|
options: props.dropDownOptions?.map((eachOption) => ({
|
|
@@ -400,7 +400,7 @@ var SingleSelectElement = (props) => {
|
|
|
400
400
|
var import_react11 = __toESM(require("react"));
|
|
401
401
|
var import_antd9 = require("antd");
|
|
402
402
|
var MultipleSelectElement = (props) => {
|
|
403
|
-
const
|
|
403
|
+
const handleChange2 = (values) => {
|
|
404
404
|
if (props.onChange) {
|
|
405
405
|
const selectedOptions = values.map((value) => {
|
|
406
406
|
const option = props.dropDownOptions?.find((option2) => String(option2.title) === value);
|
|
@@ -414,7 +414,7 @@ var MultipleSelectElement = (props) => {
|
|
|
414
414
|
{
|
|
415
415
|
mode: "multiple",
|
|
416
416
|
placeholder: props.placeholder,
|
|
417
|
-
onChange:
|
|
417
|
+
onChange: handleChange2,
|
|
418
418
|
options: props.dropDownOptions?.map((eachOption) => ({ label: String(eachOption.title), value: String(eachOption.title), id: String(eachOption.id) }))
|
|
419
419
|
}
|
|
420
420
|
);
|
|
@@ -567,14 +567,14 @@ var AddMoreTable = (props) => {
|
|
|
567
567
|
// src/Components/Sidebar.tsx
|
|
568
568
|
var import_react14 = __toESM(require("react"));
|
|
569
569
|
var Sidebar = (props) => {
|
|
570
|
-
const
|
|
570
|
+
const handleChange2 = (item) => {
|
|
571
571
|
if (props.onChange) {
|
|
572
572
|
props.onChange(item);
|
|
573
573
|
}
|
|
574
574
|
};
|
|
575
575
|
return /* @__PURE__ */ import_react14.default.createElement("div", { className: props.className, key: props.name }, /* @__PURE__ */ import_react14.default.createElement("div", null, /* @__PURE__ */ import_react14.default.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ import_react14.default.createElement("ul", { className: props.listClassName }, props.items?.map((item) => {
|
|
576
576
|
return /* @__PURE__ */ import_react14.default.createElement("li", { onClick: () => {
|
|
577
|
-
|
|
577
|
+
handleChange2(item);
|
|
578
578
|
}, key: item.label, className: `${props.listItemClassName} ${item.active && props.activeClassName}` }, /* @__PURE__ */ import_react14.default.createElement("img", { src: item.icon, className: props.className }), /* @__PURE__ */ import_react14.default.createElement("p", null, item.label));
|
|
579
579
|
})));
|
|
580
580
|
};
|
|
@@ -700,7 +700,7 @@ var TableElement = (props) => {
|
|
|
700
700
|
const { thead, tbody } = props;
|
|
701
701
|
const [selectedRecord, setSelectedRecord] = (0, import_react21.useState)({});
|
|
702
702
|
const [model, setModel] = (0, import_react21.useState)(false);
|
|
703
|
-
const
|
|
703
|
+
const handleChange2 = (record) => {
|
|
704
704
|
if (props.onChange) {
|
|
705
705
|
props.onChange(record);
|
|
706
706
|
}
|
|
@@ -750,7 +750,7 @@ var TableElement = (props) => {
|
|
|
750
750
|
return {
|
|
751
751
|
onClick: () => {
|
|
752
752
|
setSelectedRecord(record);
|
|
753
|
-
|
|
753
|
+
handleChange2(record);
|
|
754
754
|
setModel(true);
|
|
755
755
|
},
|
|
756
756
|
style: { cursor: "pointer" }
|
|
@@ -767,7 +767,7 @@ var import_icons4 = require("@ant-design/icons");
|
|
|
767
767
|
var import_moment = __toESM(require("moment"));
|
|
768
768
|
var DatePickerElement = (props) => {
|
|
769
769
|
const [date, setDate] = (0, import_react22.useState)(null);
|
|
770
|
-
const
|
|
770
|
+
const handleChange2 = (date2, dateString) => {
|
|
771
771
|
console.log("date---------", date2);
|
|
772
772
|
console.log("datestring", dateString);
|
|
773
773
|
if (date2) {
|
|
@@ -807,7 +807,7 @@ var DatePickerElement = (props) => {
|
|
|
807
807
|
placeholder: props.placeholder,
|
|
808
808
|
value: date,
|
|
809
809
|
variant: "borderless",
|
|
810
|
-
onChange:
|
|
810
|
+
onChange: handleChange2
|
|
811
811
|
}
|
|
812
812
|
), /* @__PURE__ */ import_react22.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react22.default.createElement(import_icons4.RightOutlined, null)));
|
|
813
813
|
};
|
|
@@ -818,7 +818,7 @@ var import_antd16 = require("antd");
|
|
|
818
818
|
var import_dayjs = __toESM(require("dayjs"));
|
|
819
819
|
var DateRangePickerElement = (props) => {
|
|
820
820
|
const { RangePicker } = import_antd16.DatePicker;
|
|
821
|
-
const
|
|
821
|
+
const handleChange2 = (dates, dateStrings) => {
|
|
822
822
|
if (dates && props.onChange) {
|
|
823
823
|
props.onChange(dateStrings);
|
|
824
824
|
} else {
|
|
@@ -831,7 +831,7 @@ var DateRangePickerElement = (props) => {
|
|
|
831
831
|
{ label: "Last 30 Days", value: [(0, import_dayjs.default)().add(-30, "d"), (0, import_dayjs.default)()] },
|
|
832
832
|
{ label: "Last 90 Days", value: [(0, import_dayjs.default)().add(-90, "d"), (0, import_dayjs.default)()] }
|
|
833
833
|
];
|
|
834
|
-
return /* @__PURE__ */ import_react23.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react23.default.createElement(RangePicker, { presets: rangePresets, onChange:
|
|
834
|
+
return /* @__PURE__ */ import_react23.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react23.default.createElement(RangePicker, { presets: rangePresets, onChange: handleChange2 }));
|
|
835
835
|
};
|
|
836
836
|
|
|
837
837
|
// src/Components/UploadElement.tsx
|
|
@@ -870,19 +870,48 @@ var Image = (props) => {
|
|
|
870
870
|
var import_react26 = __toESM(require("react"));
|
|
871
871
|
var import_antd18 = require("antd");
|
|
872
872
|
var SingleCheckbox = (props) => {
|
|
873
|
-
const
|
|
873
|
+
const handleChange2 = (e) => {
|
|
874
874
|
if (props.onChange) {
|
|
875
875
|
props.onChange(e.target.checked);
|
|
876
876
|
}
|
|
877
877
|
};
|
|
878
|
-
return /* @__PURE__ */ import_react26.default.createElement(import_antd18.Checkbox, { onChange: (e) =>
|
|
878
|
+
return /* @__PURE__ */ import_react26.default.createElement(import_antd18.Checkbox, { onChange: (e) => handleChange2(e), className: props.className }, props.label);
|
|
879
879
|
};
|
|
880
880
|
|
|
881
881
|
// src/Components/MultiSelect.tsx
|
|
882
882
|
var import_react27 = __toESM(require("react"));
|
|
883
883
|
var import_antd19 = require("antd");
|
|
884
|
+
var options = [];
|
|
885
|
+
for (let i = 10; i < 36; i++) {
|
|
886
|
+
options.push({
|
|
887
|
+
value: i.toString(36) + i,
|
|
888
|
+
label: i.toString(36) + i
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
var handleChange = (value) => {
|
|
892
|
+
console.log(`Selected: ${value}`);
|
|
893
|
+
};
|
|
884
894
|
var MultiSelect = (props) => {
|
|
885
|
-
return /* @__PURE__ */ import_react27.default.createElement(
|
|
895
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", { style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
896
|
+
import_antd19.Select,
|
|
897
|
+
{
|
|
898
|
+
defaultValue: "a1",
|
|
899
|
+
onChange: handleChange,
|
|
900
|
+
style: { width: 70, border: "none", borderRadius: 0 },
|
|
901
|
+
variant: "borderless",
|
|
902
|
+
options
|
|
903
|
+
}
|
|
904
|
+
), /* @__PURE__ */ import_react27.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react27.default.createElement(
|
|
905
|
+
import_antd19.Select,
|
|
906
|
+
{
|
|
907
|
+
placeholder: "Please select",
|
|
908
|
+
defaultValue: ["a10"],
|
|
909
|
+
onChange: handleChange,
|
|
910
|
+
variant: "borderless",
|
|
911
|
+
style: { width: 70, borderRadius: 0, border: "0px none" },
|
|
912
|
+
options
|
|
913
|
+
}
|
|
914
|
+
));
|
|
886
915
|
};
|
|
887
916
|
// Annotate the CommonJS export names for ESM import in node:
|
|
888
917
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Input as AntInput } from "antd";
|
|
4
4
|
var TextElement = (props) => {
|
|
5
|
-
const
|
|
5
|
+
const handleChange2 = (e) => {
|
|
6
6
|
if (props.onChange) {
|
|
7
7
|
props.onChange(e.target.value);
|
|
8
8
|
}
|
|
@@ -24,7 +24,7 @@ var TextElement = (props) => {
|
|
|
24
24
|
variant: props.variant,
|
|
25
25
|
name: props.name,
|
|
26
26
|
onChange: (e) => {
|
|
27
|
-
|
|
27
|
+
handleChange2(e);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
));
|
|
@@ -39,7 +39,7 @@ var PasswordElement = (props) => {
|
|
|
39
39
|
const handleVisibilityToggle = () => {
|
|
40
40
|
setPasswordVisible((prev) => !prev);
|
|
41
41
|
};
|
|
42
|
-
const
|
|
42
|
+
const handleChange2 = (e) => {
|
|
43
43
|
if (props.onChange) {
|
|
44
44
|
props.onChange(e.target.value);
|
|
45
45
|
}
|
|
@@ -52,7 +52,7 @@ var PasswordElement = (props) => {
|
|
|
52
52
|
className: props.className,
|
|
53
53
|
type: props.type,
|
|
54
54
|
onChange: (e) => {
|
|
55
|
-
|
|
55
|
+
handleChange2(e);
|
|
56
56
|
},
|
|
57
57
|
iconRender: renderVisibilityIcon,
|
|
58
58
|
visibilityToggle: {
|
|
@@ -67,7 +67,7 @@ var PasswordElement = (props) => {
|
|
|
67
67
|
import React3 from "react";
|
|
68
68
|
import { Input as AntInput2 } from "antd";
|
|
69
69
|
var NumberElement = (props) => {
|
|
70
|
-
const
|
|
70
|
+
const handleChange2 = (e) => {
|
|
71
71
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
72
72
|
if (props.onChange) {
|
|
73
73
|
props.onChange(newValue);
|
|
@@ -89,7 +89,7 @@ var NumberElement = (props) => {
|
|
|
89
89
|
variant: props.variant,
|
|
90
90
|
name: props.name,
|
|
91
91
|
onChange: (e) => {
|
|
92
|
-
|
|
92
|
+
handleChange2(e);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
));
|
|
@@ -100,7 +100,7 @@ import React4 from "react";
|
|
|
100
100
|
import { Input as Input2 } from "antd";
|
|
101
101
|
var { TextArea } = Input2;
|
|
102
102
|
var TextareaElement = (props) => {
|
|
103
|
-
const
|
|
103
|
+
const handleChange2 = (e) => {
|
|
104
104
|
if (props.onChange) {
|
|
105
105
|
props.onChange(e.target.value);
|
|
106
106
|
}
|
|
@@ -120,7 +120,7 @@ var TextareaElement = (props) => {
|
|
|
120
120
|
showCount: true,
|
|
121
121
|
maxLength: props.maxLength,
|
|
122
122
|
onChange: (e) => {
|
|
123
|
-
|
|
123
|
+
handleChange2(e);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
));
|
|
@@ -137,7 +137,7 @@ var labelRender = (props) => {
|
|
|
137
137
|
return /* @__PURE__ */ React5.createElement("span", null, "select gender");
|
|
138
138
|
};
|
|
139
139
|
var SelectElement = (props) => {
|
|
140
|
-
const
|
|
140
|
+
const handleChange2 = (value) => {
|
|
141
141
|
if (props.onChange) {
|
|
142
142
|
props.onChange(value);
|
|
143
143
|
}
|
|
@@ -156,7 +156,7 @@ var SelectElement = (props) => {
|
|
|
156
156
|
style: props.styles,
|
|
157
157
|
className: props.className,
|
|
158
158
|
variant: props.variant,
|
|
159
|
-
onChange:
|
|
159
|
+
onChange: handleChange2
|
|
160
160
|
}
|
|
161
161
|
);
|
|
162
162
|
};
|
|
@@ -170,7 +170,7 @@ var RadioElement = (props) => {
|
|
|
170
170
|
const [isDisabled, setIsDisabled] = useState2(props.disabled);
|
|
171
171
|
const [selectedValue, setSelectedValue] = useState2(props.value);
|
|
172
172
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
173
|
-
const
|
|
173
|
+
const handleChange2 = (option) => {
|
|
174
174
|
console.log(option);
|
|
175
175
|
setSelectedValue(option);
|
|
176
176
|
setIsDisabled(true);
|
|
@@ -193,7 +193,7 @@ var RadioElement = (props) => {
|
|
|
193
193
|
Radio,
|
|
194
194
|
{
|
|
195
195
|
onChange: () => {
|
|
196
|
-
|
|
196
|
+
handleChange2(option);
|
|
197
197
|
},
|
|
198
198
|
key: option.value,
|
|
199
199
|
value: option.value,
|
|
@@ -215,7 +215,7 @@ var defaultCheckedList = [];
|
|
|
215
215
|
var CheckboxElement = (props) => {
|
|
216
216
|
const [checkedList, setCheckedList] = useState3(defaultCheckedList);
|
|
217
217
|
const checkAll = props.options && props.options.length === checkedList.length;
|
|
218
|
-
const
|
|
218
|
+
const handleChange2 = (list) => {
|
|
219
219
|
setCheckedList(list);
|
|
220
220
|
if (props.onChange) {
|
|
221
221
|
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
@@ -248,7 +248,7 @@ var CheckboxElement = (props) => {
|
|
|
248
248
|
className: props.className,
|
|
249
249
|
options: props.options,
|
|
250
250
|
value: checkedList,
|
|
251
|
-
onChange:
|
|
251
|
+
onChange: handleChange2
|
|
252
252
|
}
|
|
253
253
|
));
|
|
254
254
|
};
|
|
@@ -313,7 +313,7 @@ var onSearch = (value) => {
|
|
|
313
313
|
};
|
|
314
314
|
var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
315
315
|
var SingleSelectElement = (props) => {
|
|
316
|
-
const
|
|
316
|
+
const handleChange2 = (values) => {
|
|
317
317
|
if (props.onChange) {
|
|
318
318
|
const option = props.dropDownOptions?.find(
|
|
319
319
|
(option2) => String(option2.title) === values
|
|
@@ -328,7 +328,7 @@ var SingleSelectElement = (props) => {
|
|
|
328
328
|
showSearch: true,
|
|
329
329
|
placeholder: props.placeholder,
|
|
330
330
|
optionFilterProp: "children",
|
|
331
|
-
onChange:
|
|
331
|
+
onChange: handleChange2,
|
|
332
332
|
onSearch,
|
|
333
333
|
filterOption,
|
|
334
334
|
options: props.dropDownOptions?.map((eachOption) => ({
|
|
@@ -344,7 +344,7 @@ var SingleSelectElement = (props) => {
|
|
|
344
344
|
import React10 from "react";
|
|
345
345
|
import { Select as Select3 } from "antd";
|
|
346
346
|
var MultipleSelectElement = (props) => {
|
|
347
|
-
const
|
|
347
|
+
const handleChange2 = (values) => {
|
|
348
348
|
if (props.onChange) {
|
|
349
349
|
const selectedOptions = values.map((value) => {
|
|
350
350
|
const option = props.dropDownOptions?.find((option2) => String(option2.title) === value);
|
|
@@ -358,7 +358,7 @@ var MultipleSelectElement = (props) => {
|
|
|
358
358
|
{
|
|
359
359
|
mode: "multiple",
|
|
360
360
|
placeholder: props.placeholder,
|
|
361
|
-
onChange:
|
|
361
|
+
onChange: handleChange2,
|
|
362
362
|
options: props.dropDownOptions?.map((eachOption) => ({ label: String(eachOption.title), value: String(eachOption.title), id: String(eachOption.id) }))
|
|
363
363
|
}
|
|
364
364
|
);
|
|
@@ -511,14 +511,14 @@ var AddMoreTable = (props) => {
|
|
|
511
511
|
// src/Components/Sidebar.tsx
|
|
512
512
|
import React13 from "react";
|
|
513
513
|
var Sidebar = (props) => {
|
|
514
|
-
const
|
|
514
|
+
const handleChange2 = (item) => {
|
|
515
515
|
if (props.onChange) {
|
|
516
516
|
props.onChange(item);
|
|
517
517
|
}
|
|
518
518
|
};
|
|
519
519
|
return /* @__PURE__ */ React13.createElement("div", { className: props.className, 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) => {
|
|
520
520
|
return /* @__PURE__ */ React13.createElement("li", { onClick: () => {
|
|
521
|
-
|
|
521
|
+
handleChange2(item);
|
|
522
522
|
}, key: item.label, className: `${props.listItemClassName} ${item.active && props.activeClassName}` }, /* @__PURE__ */ React13.createElement("img", { src: item.icon, className: props.className }), /* @__PURE__ */ React13.createElement("p", null, item.label));
|
|
523
523
|
})));
|
|
524
524
|
};
|
|
@@ -644,7 +644,7 @@ var TableElement = (props) => {
|
|
|
644
644
|
const { thead, tbody } = props;
|
|
645
645
|
const [selectedRecord, setSelectedRecord] = useState5({});
|
|
646
646
|
const [model, setModel] = useState5(false);
|
|
647
|
-
const
|
|
647
|
+
const handleChange2 = (record) => {
|
|
648
648
|
if (props.onChange) {
|
|
649
649
|
props.onChange(record);
|
|
650
650
|
}
|
|
@@ -694,7 +694,7 @@ var TableElement = (props) => {
|
|
|
694
694
|
return {
|
|
695
695
|
onClick: () => {
|
|
696
696
|
setSelectedRecord(record);
|
|
697
|
-
|
|
697
|
+
handleChange2(record);
|
|
698
698
|
setModel(true);
|
|
699
699
|
},
|
|
700
700
|
style: { cursor: "pointer" }
|
|
@@ -711,7 +711,7 @@ import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
|
711
711
|
import moment from "moment";
|
|
712
712
|
var DatePickerElement = (props) => {
|
|
713
713
|
const [date, setDate] = useState6(null);
|
|
714
|
-
const
|
|
714
|
+
const handleChange2 = (date2, dateString) => {
|
|
715
715
|
console.log("date---------", date2);
|
|
716
716
|
console.log("datestring", dateString);
|
|
717
717
|
if (date2) {
|
|
@@ -751,7 +751,7 @@ var DatePickerElement = (props) => {
|
|
|
751
751
|
placeholder: props.placeholder,
|
|
752
752
|
value: date,
|
|
753
753
|
variant: "borderless",
|
|
754
|
-
onChange:
|
|
754
|
+
onChange: handleChange2
|
|
755
755
|
}
|
|
756
756
|
), /* @__PURE__ */ React21.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ React21.createElement(RightOutlined, null)));
|
|
757
757
|
};
|
|
@@ -762,7 +762,7 @@ import { DatePicker as DatePicker2, Space } from "antd";
|
|
|
762
762
|
import dayjs from "dayjs";
|
|
763
763
|
var DateRangePickerElement = (props) => {
|
|
764
764
|
const { RangePicker } = DatePicker2;
|
|
765
|
-
const
|
|
765
|
+
const handleChange2 = (dates, dateStrings) => {
|
|
766
766
|
if (dates && props.onChange) {
|
|
767
767
|
props.onChange(dateStrings);
|
|
768
768
|
} else {
|
|
@@ -775,7 +775,7 @@ var DateRangePickerElement = (props) => {
|
|
|
775
775
|
{ label: "Last 30 Days", value: [dayjs().add(-30, "d"), dayjs()] },
|
|
776
776
|
{ label: "Last 90 Days", value: [dayjs().add(-90, "d"), dayjs()] }
|
|
777
777
|
];
|
|
778
|
-
return /* @__PURE__ */ React22.createElement(Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ React22.createElement(RangePicker, { presets: rangePresets, onChange:
|
|
778
|
+
return /* @__PURE__ */ React22.createElement(Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ React22.createElement(RangePicker, { presets: rangePresets, onChange: handleChange2 }));
|
|
779
779
|
};
|
|
780
780
|
|
|
781
781
|
// src/Components/UploadElement.tsx
|
|
@@ -814,19 +814,48 @@ var Image = (props) => {
|
|
|
814
814
|
import React25 from "react";
|
|
815
815
|
import { Checkbox as Checkbox2 } from "antd";
|
|
816
816
|
var SingleCheckbox = (props) => {
|
|
817
|
-
const
|
|
817
|
+
const handleChange2 = (e) => {
|
|
818
818
|
if (props.onChange) {
|
|
819
819
|
props.onChange(e.target.checked);
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
|
-
return /* @__PURE__ */ React25.createElement(Checkbox2, { onChange: (e) =>
|
|
822
|
+
return /* @__PURE__ */ React25.createElement(Checkbox2, { onChange: (e) => handleChange2(e), className: props.className }, props.label);
|
|
823
823
|
};
|
|
824
824
|
|
|
825
825
|
// src/Components/MultiSelect.tsx
|
|
826
826
|
import React26 from "react";
|
|
827
|
-
import { Select as Select4
|
|
827
|
+
import { Select as Select4 } from "antd";
|
|
828
|
+
var options = [];
|
|
829
|
+
for (let i = 10; i < 36; i++) {
|
|
830
|
+
options.push({
|
|
831
|
+
value: i.toString(36) + i,
|
|
832
|
+
label: i.toString(36) + i
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
var handleChange = (value) => {
|
|
836
|
+
console.log(`Selected: ${value}`);
|
|
837
|
+
};
|
|
828
838
|
var MultiSelect = (props) => {
|
|
829
|
-
return /* @__PURE__ */ React26.createElement(
|
|
839
|
+
return /* @__PURE__ */ React26.createElement("div", { style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ React26.createElement(
|
|
840
|
+
Select4,
|
|
841
|
+
{
|
|
842
|
+
defaultValue: "a1",
|
|
843
|
+
onChange: handleChange,
|
|
844
|
+
style: { width: 70, border: "none", borderRadius: 0 },
|
|
845
|
+
variant: "borderless",
|
|
846
|
+
options
|
|
847
|
+
}
|
|
848
|
+
), /* @__PURE__ */ React26.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React26.createElement(
|
|
849
|
+
Select4,
|
|
850
|
+
{
|
|
851
|
+
placeholder: "Please select",
|
|
852
|
+
defaultValue: ["a10"],
|
|
853
|
+
onChange: handleChange,
|
|
854
|
+
variant: "borderless",
|
|
855
|
+
style: { width: 70, borderRadius: 0, border: "0px none" },
|
|
856
|
+
options
|
|
857
|
+
}
|
|
858
|
+
));
|
|
830
859
|
};
|
|
831
860
|
export {
|
|
832
861
|
AddMoreTable,
|