@apexcura/ui-components 0.0.13-Beta7 → 0.0.13-Beta70
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 +4 -0
- package/dist/index.d.mts +107 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +235 -159
- package/dist/index.mjs +187 -114
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Input as AntInput } from "antd";
|
|
4
4
|
var TextElement = (props) => {
|
|
5
|
-
|
|
5
|
+
const handleChange = (e) => {
|
|
6
|
+
if (props.onChange) {
|
|
7
|
+
props.onChange(e.target.value);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ React.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React.createElement(
|
|
6
11
|
AntInput,
|
|
7
12
|
{
|
|
8
13
|
placeholder: props.placeholder,
|
|
@@ -18,7 +23,9 @@ var TextElement = (props) => {
|
|
|
18
23
|
className: props.className,
|
|
19
24
|
variant: props.variant,
|
|
20
25
|
name: props.name,
|
|
21
|
-
onChange: (e) =>
|
|
26
|
+
onChange: (e) => {
|
|
27
|
+
handleChange(e);
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
));
|
|
24
31
|
};
|
|
@@ -26,37 +33,47 @@ var TextElement = (props) => {
|
|
|
26
33
|
// src/Components/PasswordElement.tsx
|
|
27
34
|
import React2, { useState } from "react";
|
|
28
35
|
import { EyeInvisibleOutlined, EyeTwoTone } from "@ant-design/icons";
|
|
29
|
-
import {
|
|
30
|
-
var PasswordElement = (
|
|
36
|
+
import { Input } from "antd";
|
|
37
|
+
var PasswordElement = (props) => {
|
|
31
38
|
const [passwordVisible, setPasswordVisible] = useState(false);
|
|
32
39
|
const handleVisibilityToggle = () => {
|
|
33
40
|
setPasswordVisible((prev) => !prev);
|
|
34
41
|
};
|
|
42
|
+
const handleChange = (e) => {
|
|
43
|
+
if (props.onChange) {
|
|
44
|
+
props.onChange(e.target.value);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
35
47
|
const renderVisibilityIcon = (visible) => visible ? /* @__PURE__ */ React2.createElement(EyeTwoTone, null) : /* @__PURE__ */ React2.createElement(EyeInvisibleOutlined, null);
|
|
36
|
-
|
|
48
|
+
return /* @__PURE__ */ React2.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ React2.createElement("label", { className: props.labelClassName }, props.label), /* @__PURE__ */ React2.createElement(
|
|
37
49
|
Input.Password,
|
|
38
50
|
{
|
|
39
|
-
placeholder:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
placeholder: props.placeholder,
|
|
52
|
+
className: props.className,
|
|
53
|
+
type: props.type,
|
|
54
|
+
onChange: (e) => {
|
|
55
|
+
handleChange(e);
|
|
56
|
+
},
|
|
44
57
|
iconRender: renderVisibilityIcon,
|
|
45
|
-
visibilityToggle: {
|
|
58
|
+
visibilityToggle: {
|
|
59
|
+
visible: passwordVisible,
|
|
60
|
+
onVisibleChange: handleVisibilityToggle
|
|
61
|
+
}
|
|
46
62
|
}
|
|
47
|
-
);
|
|
48
|
-
return /* @__PURE__ */ React2.createElement(Space, { direction: "vertical" }, renderPasswordInput(), /* @__PURE__ */ React2.createElement(Space, { direction: "horizontal" }, renderPasswordInput(), /* @__PURE__ */ React2.createElement(Button, { style: { width: 80 }, onClick: handleVisibilityToggle }, passwordVisible ? "Hide" : "Show")));
|
|
63
|
+
));
|
|
49
64
|
};
|
|
50
65
|
|
|
51
66
|
// src/Components/NumberElement.tsx
|
|
52
67
|
import React3 from "react";
|
|
53
68
|
import { Input as AntInput2 } from "antd";
|
|
54
69
|
var NumberElement = (props) => {
|
|
55
|
-
const
|
|
70
|
+
const handleChange = (e) => {
|
|
56
71
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
57
|
-
props.onChange
|
|
72
|
+
if (props.onChange) {
|
|
73
|
+
props.onChange(newValue);
|
|
74
|
+
}
|
|
58
75
|
};
|
|
59
|
-
return /* @__PURE__ */ React3.createElement(
|
|
76
|
+
return /* @__PURE__ */ React3.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React3.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React3.createElement(
|
|
60
77
|
AntInput2,
|
|
61
78
|
{
|
|
62
79
|
placeholder: props.placeholder,
|
|
@@ -71,17 +88,24 @@ var NumberElement = (props) => {
|
|
|
71
88
|
className: props.className,
|
|
72
89
|
variant: props.variant,
|
|
73
90
|
name: props.name,
|
|
74
|
-
onChange:
|
|
91
|
+
onChange: (e) => {
|
|
92
|
+
handleChange(e);
|
|
93
|
+
}
|
|
75
94
|
}
|
|
76
|
-
);
|
|
95
|
+
));
|
|
77
96
|
};
|
|
78
97
|
|
|
79
98
|
// src/Components/TextareaElement.tsx
|
|
80
99
|
import React4 from "react";
|
|
81
|
-
import {
|
|
100
|
+
import { Input as Input2 } from "antd";
|
|
82
101
|
var { TextArea } = Input2;
|
|
83
102
|
var TextareaElement = (props) => {
|
|
84
|
-
|
|
103
|
+
const handleChange = (e) => {
|
|
104
|
+
if (props.onChange) {
|
|
105
|
+
props.onChange(e.target.value);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
return /* @__PURE__ */ React4.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React4.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React4.createElement(
|
|
85
109
|
TextArea,
|
|
86
110
|
{
|
|
87
111
|
placeholder: props.placeholder,
|
|
@@ -95,7 +119,9 @@ var TextareaElement = (props) => {
|
|
|
95
119
|
name: props.name,
|
|
96
120
|
showCount: true,
|
|
97
121
|
maxLength: props.maxLength,
|
|
98
|
-
onChange: (e) =>
|
|
122
|
+
onChange: (e) => {
|
|
123
|
+
handleChange(e);
|
|
124
|
+
}
|
|
99
125
|
}
|
|
100
126
|
));
|
|
101
127
|
};
|
|
@@ -103,24 +129,18 @@ var TextareaElement = (props) => {
|
|
|
103
129
|
// src/Components/SelectElement.tsx
|
|
104
130
|
import React5 from "react";
|
|
105
131
|
import { Select } from "antd";
|
|
106
|
-
var labelRender = (props) => {
|
|
107
|
-
const { label, value } = props;
|
|
108
|
-
if (label) {
|
|
109
|
-
return value;
|
|
110
|
-
}
|
|
111
|
-
return /* @__PURE__ */ React5.createElement("span", null, "select gender");
|
|
112
|
-
};
|
|
113
132
|
var SelectElement = (props) => {
|
|
114
133
|
const handleChange = (value) => {
|
|
134
|
+
console.log("sigleselectvalue----", value);
|
|
115
135
|
if (props.onChange) {
|
|
116
|
-
props.
|
|
136
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
137
|
+
props.onChange(filterOption2);
|
|
117
138
|
}
|
|
118
139
|
};
|
|
119
|
-
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(
|
|
120
141
|
Select,
|
|
121
142
|
{
|
|
122
|
-
|
|
123
|
-
options: props.fieldNames,
|
|
143
|
+
options: props.options,
|
|
124
144
|
placeholder: props.placeholder,
|
|
125
145
|
allowClear: true,
|
|
126
146
|
defaultValue: props.defaultValue,
|
|
@@ -132,7 +152,7 @@ var SelectElement = (props) => {
|
|
|
132
152
|
variant: props.variant,
|
|
133
153
|
onChange: handleChange
|
|
134
154
|
}
|
|
135
|
-
);
|
|
155
|
+
));
|
|
136
156
|
};
|
|
137
157
|
|
|
138
158
|
// src/Components/RadioElement.tsx
|
|
@@ -183,7 +203,7 @@ var RadioElement = (props) => {
|
|
|
183
203
|
|
|
184
204
|
// src/Components/Checkbox.tsx
|
|
185
205
|
import React7, { useState as useState3 } from "react";
|
|
186
|
-
import { Checkbox
|
|
206
|
+
import { Checkbox } from "antd";
|
|
187
207
|
var CheckboxGroup = Checkbox.Group;
|
|
188
208
|
var defaultCheckedList = [];
|
|
189
209
|
var CheckboxElement = (props) => {
|
|
@@ -192,9 +212,7 @@ var CheckboxElement = (props) => {
|
|
|
192
212
|
const handleChange = (list) => {
|
|
193
213
|
setCheckedList(list);
|
|
194
214
|
if (props.onChange) {
|
|
195
|
-
const selectedOptions =
|
|
196
|
-
return { id: list.indexOf(value), value };
|
|
197
|
-
});
|
|
215
|
+
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
198
216
|
props.onChange(selectedOptions);
|
|
199
217
|
}
|
|
200
218
|
};
|
|
@@ -216,7 +234,7 @@ var CheckboxElement = (props) => {
|
|
|
216
234
|
checked: checkAll
|
|
217
235
|
},
|
|
218
236
|
"Check all"
|
|
219
|
-
), /* @__PURE__ */ React7.createElement(
|
|
237
|
+
), /* @__PURE__ */ React7.createElement(
|
|
220
238
|
CheckboxGroup,
|
|
221
239
|
{
|
|
222
240
|
disabled: props.disabled,
|
|
@@ -230,55 +248,9 @@ var CheckboxElement = (props) => {
|
|
|
230
248
|
};
|
|
231
249
|
|
|
232
250
|
// src/Components/CkEditor.tsx
|
|
233
|
-
import { useRef } from "react";
|
|
234
|
-
import { Editor } from "@tinymce/tinymce-react";
|
|
235
251
|
import React8 from "react";
|
|
236
252
|
var CkEditor = (props) => {
|
|
237
|
-
|
|
238
|
-
const log = () => {
|
|
239
|
-
if (editorRef.current) {
|
|
240
|
-
let content = editorRef.current.getContent();
|
|
241
|
-
if (props.onChange) {
|
|
242
|
-
props.onChange(content);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement(
|
|
247
|
-
Editor,
|
|
248
|
-
{
|
|
249
|
-
apiKey: "rwpgt7maa54n0pe5mglhkl686p7h57sg6z636n6gf2mio1b9",
|
|
250
|
-
onInit: (_evt, editor) => {
|
|
251
|
-
if (editor) editorRef.current = editor;
|
|
252
|
-
},
|
|
253
|
-
initialValue: "<p>This is the initial content of the editor.</p>",
|
|
254
|
-
init: {
|
|
255
|
-
height: 500,
|
|
256
|
-
menubar: false,
|
|
257
|
-
plugins: [
|
|
258
|
-
"advlist",
|
|
259
|
-
"autolink",
|
|
260
|
-
"lists",
|
|
261
|
-
"link",
|
|
262
|
-
"image",
|
|
263
|
-
"charmap",
|
|
264
|
-
"preview",
|
|
265
|
-
"anchor",
|
|
266
|
-
"searchreplace",
|
|
267
|
-
"visualblocks",
|
|
268
|
-
"code",
|
|
269
|
-
"fullscreen",
|
|
270
|
-
"insertdatetime",
|
|
271
|
-
"media",
|
|
272
|
-
"table",
|
|
273
|
-
"code",
|
|
274
|
-
"help",
|
|
275
|
-
"wordcount"
|
|
276
|
-
],
|
|
277
|
-
toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
|
|
278
|
-
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
), /* @__PURE__ */ React8.createElement("button", { onClick: log }, "Log editor content"));
|
|
253
|
+
return /* @__PURE__ */ React8.createElement("div", null);
|
|
282
254
|
};
|
|
283
255
|
|
|
284
256
|
// src/Components/Select/SingleSelectElement.tsx
|
|
@@ -291,7 +263,9 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
291
263
|
var SingleSelectElement = (props) => {
|
|
292
264
|
const handleChange = (values) => {
|
|
293
265
|
if (props.onChange) {
|
|
294
|
-
const option = props.dropDownOptions?.find(
|
|
266
|
+
const option = props.dropDownOptions?.find(
|
|
267
|
+
(option2) => String(option2.title) === values
|
|
268
|
+
);
|
|
295
269
|
const selectedOption = { id: option?.id, value: values };
|
|
296
270
|
props.onChange([selectedOption]);
|
|
297
271
|
}
|
|
@@ -305,7 +279,11 @@ var SingleSelectElement = (props) => {
|
|
|
305
279
|
onChange: handleChange,
|
|
306
280
|
onSearch,
|
|
307
281
|
filterOption,
|
|
308
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
282
|
+
options: props.dropDownOptions?.map((eachOption) => ({
|
|
283
|
+
label: String(eachOption.title),
|
|
284
|
+
value: String(eachOption.title),
|
|
285
|
+
id: String(eachOption.id)
|
|
286
|
+
}))
|
|
309
287
|
}
|
|
310
288
|
);
|
|
311
289
|
};
|
|
@@ -350,7 +328,7 @@ var ButtonElement = (props) => {
|
|
|
350
328
|
|
|
351
329
|
// src/Components/AddMoreTable.tsx
|
|
352
330
|
import React12, { useEffect, useState as useState4 } from "react";
|
|
353
|
-
import { Table, Button
|
|
331
|
+
import { Table, Button } from "antd";
|
|
354
332
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
355
333
|
var AddMoreTable = (props) => {
|
|
356
334
|
const { thead, tbody } = props;
|
|
@@ -445,13 +423,13 @@ var AddMoreTable = (props) => {
|
|
|
445
423
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
446
424
|
Object.keys(variable).forEach((key) => {
|
|
447
425
|
if (key === "SubRows") {
|
|
448
|
-
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(
|
|
426
|
+
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
449
427
|
} else {
|
|
450
428
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
451
429
|
}
|
|
452
430
|
});
|
|
453
431
|
});
|
|
454
|
-
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(
|
|
432
|
+
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ React12.createElement(Button, { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
455
433
|
console.log("=====rowdata", rowData);
|
|
456
434
|
return rowData;
|
|
457
435
|
});
|
|
@@ -498,7 +476,7 @@ import React17 from "react";
|
|
|
498
476
|
|
|
499
477
|
// src/Components/Notification.tsx
|
|
500
478
|
import React14 from "react";
|
|
501
|
-
import { Popover, Badge, Button as
|
|
479
|
+
import { Popover, Badge, Button as Button2, Avatar, List } from "antd";
|
|
502
480
|
import { IoIosNotifications } from "react-icons/io";
|
|
503
481
|
var popoverContentStyle = {
|
|
504
482
|
minWidth: "300px",
|
|
@@ -526,7 +504,7 @@ var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
|
526
504
|
trigger: "focus",
|
|
527
505
|
placement: "bottomRight"
|
|
528
506
|
},
|
|
529
|
-
/* @__PURE__ */ React14.createElement(
|
|
507
|
+
/* @__PURE__ */ React14.createElement(Button2, { className: props.buttonClassName }, /* @__PURE__ */ React14.createElement(Badge, { size: "small", count: props.count }, /* @__PURE__ */ React14.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ React14.createElement(IoIosNotifications, null))))
|
|
530
508
|
);
|
|
531
509
|
|
|
532
510
|
// src/Components/SpanElement.tsx
|
|
@@ -728,7 +706,7 @@ var DatePickerElement = (props) => {
|
|
|
728
706
|
|
|
729
707
|
// src/Components/DateRangePickerElement.tsx
|
|
730
708
|
import React22 from "react";
|
|
731
|
-
import { DatePicker as DatePicker2, Space
|
|
709
|
+
import { DatePicker as DatePicker2, Space } from "antd";
|
|
732
710
|
import dayjs from "dayjs";
|
|
733
711
|
var DateRangePickerElement = (props) => {
|
|
734
712
|
const { RangePicker } = DatePicker2;
|
|
@@ -745,33 +723,125 @@ var DateRangePickerElement = (props) => {
|
|
|
745
723
|
{ label: "Last 30 Days", value: [dayjs().add(-30, "d"), dayjs()] },
|
|
746
724
|
{ label: "Last 90 Days", value: [dayjs().add(-90, "d"), dayjs()] }
|
|
747
725
|
];
|
|
748
|
-
return /* @__PURE__ */ React22.createElement(
|
|
726
|
+
return /* @__PURE__ */ React22.createElement(Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ React22.createElement(RangePicker, { presets: rangePresets, onChange: handleChange }));
|
|
749
727
|
};
|
|
750
728
|
|
|
751
729
|
// src/Components/UploadElement.tsx
|
|
752
|
-
import React23 from "react";
|
|
753
|
-
import {
|
|
754
|
-
import {
|
|
755
|
-
var
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
730
|
+
import React23, { useState as useState7 } from "react";
|
|
731
|
+
import { Upload, Modal as Modal2 } from "antd";
|
|
732
|
+
import { PlusOutlined as PlusOutlined2 } from "@ant-design/icons";
|
|
733
|
+
var UploadElement = (props) => {
|
|
734
|
+
const [files, setFiles] = useState7([]);
|
|
735
|
+
const uploadChange = (fileList) => {
|
|
736
|
+
if (!fileList || fileList.length === 0) return;
|
|
737
|
+
const newFileList = [...files];
|
|
738
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
739
|
+
const selectedFile = fileList[i];
|
|
740
|
+
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
|
|
741
|
+
selectedFile.type
|
|
742
|
+
);
|
|
743
|
+
if (!isCorrectFile) {
|
|
744
|
+
Modal2.error({
|
|
745
|
+
title: `(${selectedFile.name}) is an invalid file.`,
|
|
746
|
+
content: `Please upload files with the following extensions only (.png/.jpg/.jpeg)`,
|
|
747
|
+
zIndex: 1022
|
|
748
|
+
});
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
const newFile = {
|
|
752
|
+
uid: `id${Math.random().toString(16).slice(2)}`,
|
|
753
|
+
name: selectedFile.name,
|
|
754
|
+
status: "done",
|
|
755
|
+
type: selectedFile.type,
|
|
756
|
+
size: selectedFile.size,
|
|
757
|
+
url: URL.createObjectURL(selectedFile),
|
|
758
|
+
originFileObj: selectedFile
|
|
759
|
+
};
|
|
760
|
+
const reader = new FileReader();
|
|
761
|
+
reader.onload = (e) => {
|
|
762
|
+
if (e.target?.result) {
|
|
763
|
+
newFile.thumbUrl = e.target.result.toString();
|
|
764
|
+
}
|
|
765
|
+
};
|
|
766
|
+
reader.readAsDataURL(selectedFile);
|
|
767
|
+
newFileList.push(newFile);
|
|
765
768
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
769
|
+
setFiles(newFileList);
|
|
770
|
+
props.onChange && props.onChange({
|
|
771
|
+
name: props.name,
|
|
772
|
+
value: newFileList
|
|
773
|
+
});
|
|
774
|
+
};
|
|
775
|
+
return /* @__PURE__ */ React23.createElement("div", null, /* @__PURE__ */ React23.createElement(
|
|
776
|
+
Upload,
|
|
777
|
+
{
|
|
778
|
+
accept: props.accept,
|
|
779
|
+
listType: props.list_type,
|
|
780
|
+
maxCount: props.max_count,
|
|
781
|
+
multiple: true,
|
|
782
|
+
fileList: props.value ? props.value : [],
|
|
783
|
+
onChange: (e) => uploadChange(e.target.files),
|
|
784
|
+
showUploadList: true
|
|
785
|
+
},
|
|
786
|
+
/* @__PURE__ */ React23.createElement(PlusOutlined2, null),
|
|
787
|
+
/* @__PURE__ */ React23.createElement("div", { style: { marginTop: 8 } }, "Upload")
|
|
788
|
+
));
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
// src/Components/Image.tsx
|
|
792
|
+
import React24 from "react";
|
|
793
|
+
var Image = (props) => {
|
|
794
|
+
return /* @__PURE__ */ React24.createElement("div", null, /* @__PURE__ */ React24.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
// src/Components/SingleCheckbox.tsx
|
|
798
|
+
import React25 from "react";
|
|
799
|
+
import { Checkbox as Checkbox2 } from "antd";
|
|
800
|
+
var SingleCheckbox = (props) => {
|
|
801
|
+
const handleChange = (e) => {
|
|
802
|
+
if (props.onChange) {
|
|
803
|
+
props.onChange(e.target.checked);
|
|
770
804
|
}
|
|
771
|
-
}
|
|
805
|
+
};
|
|
806
|
+
return /* @__PURE__ */ React25.createElement(Checkbox2, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
772
807
|
};
|
|
773
|
-
|
|
774
|
-
|
|
808
|
+
|
|
809
|
+
// src/Components/MultiSelect.tsx
|
|
810
|
+
import React26, { useState as useState8 } from "react";
|
|
811
|
+
import { Select as Select4 } from "antd";
|
|
812
|
+
var MultiSelect = (props) => {
|
|
813
|
+
const [selectedValue, setSelectedValue] = useState8({ firstValue: {}, secondValue: {} });
|
|
814
|
+
const handleFirstChange = (value) => {
|
|
815
|
+
if (props.onChange) {
|
|
816
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
817
|
+
console.log("filterOption1--------", filterOption2);
|
|
818
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 && filterOption2 }));
|
|
819
|
+
props.onChange(selectedValue.firstValue && selectedValue);
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
const handleSecondChange = (value) => {
|
|
823
|
+
if (props.onChange) {
|
|
824
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
825
|
+
console.log("filterOption2--------", filterOption2);
|
|
826
|
+
setSelectedValue((prev) => ({ ...prev, secondValue: filterOption2 && filterOption2 }));
|
|
827
|
+
props.onChange(selectedValue.secondValue && selectedValue);
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
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(
|
|
831
|
+
Select4,
|
|
832
|
+
{
|
|
833
|
+
onChange: handleFirstChange,
|
|
834
|
+
variant: props.variant,
|
|
835
|
+
options: props.options
|
|
836
|
+
}
|
|
837
|
+
), /* @__PURE__ */ React26.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React26.createElement(
|
|
838
|
+
Select4,
|
|
839
|
+
{
|
|
840
|
+
onChange: handleSecondChange,
|
|
841
|
+
variant: props.variant,
|
|
842
|
+
options: props.options
|
|
843
|
+
}
|
|
844
|
+
));
|
|
775
845
|
};
|
|
776
846
|
export {
|
|
777
847
|
AddMoreTable,
|
|
@@ -780,6 +850,8 @@ export {
|
|
|
780
850
|
CkEditor,
|
|
781
851
|
DatePickerElement,
|
|
782
852
|
DateRangePickerElement,
|
|
853
|
+
Image,
|
|
854
|
+
MultiSelect,
|
|
783
855
|
MultipleSelectElement,
|
|
784
856
|
Navbar,
|
|
785
857
|
NumberElement,
|
|
@@ -787,6 +859,7 @@ export {
|
|
|
787
859
|
RadioElement,
|
|
788
860
|
SelectElement,
|
|
789
861
|
Sidebar,
|
|
862
|
+
SingleCheckbox,
|
|
790
863
|
SingleSelectElement,
|
|
791
864
|
TableElement,
|
|
792
865
|
TextElement,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/ui-components",
|
|
3
|
-
"version": "0.0.13-
|
|
3
|
+
"version": "0.0.13-Beta70",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
+
"@apexcura/core": "^0.0.15-Beta34",
|
|
51
52
|
"@apexcura/ui-components": "^0.0.11-Beta256",
|
|
52
53
|
"@tinymce/tinymce-react": "^5.0.1",
|
|
53
54
|
"autoprefixer": "^10.4.19",
|