@apexcura/ui-components 0.0.13-Beta21 → 0.0.13-Beta23
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 +10 -13
- package/dist/index.d.ts +10 -13
- package/dist/index.js +76 -11
- package/dist/index.mjs +82 -19
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -54,24 +54,17 @@ type ElementType = {
|
|
|
54
54
|
iconsClassName?: string;
|
|
55
55
|
labelClassName?: string;
|
|
56
56
|
containerClassName?: string;
|
|
57
|
+
selectBefore?: any[];
|
|
58
|
+
selectAfter?: any[];
|
|
57
59
|
};
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
onChange: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
61
|
-
}
|
|
62
|
-
declare const TextElement: (props: ElementExecuterProps$3) => React$1.JSX.Element;
|
|
61
|
+
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
63
62
|
|
|
64
63
|
declare const PasswordElement: (props: ElementType) => React$1.JSX.Element;
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
onChange: (value: string | number | object | boolean | any[] | undefined) => void;
|
|
68
|
-
}
|
|
69
|
-
declare const NumberElement: (props: ElementExecuterProps$2) => React$1.JSX.Element;
|
|
65
|
+
declare const NumberElement: (props: ElementType) => React$1.JSX.Element;
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
onChange: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
73
|
-
}
|
|
74
|
-
declare const TextareaElement: (props: ElementExecuterProps$1) => React$1.JSX.Element;
|
|
67
|
+
declare const TextareaElement: (props: ElementType) => React$1.JSX.Element;
|
|
75
68
|
|
|
76
69
|
declare const SelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
77
70
|
|
|
@@ -106,4 +99,8 @@ declare const UploadElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
106
99
|
|
|
107
100
|
declare const Image: (props: ElementType) => React$1.JSX.Element;
|
|
108
101
|
|
|
109
|
-
|
|
102
|
+
declare const SingleCheckbox: (props: ElementType) => React$1.JSX.Element;
|
|
103
|
+
|
|
104
|
+
declare const MultiSelect: (props: ElementType) => React$1.JSX.Element;
|
|
105
|
+
|
|
106
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Image, MultiSelect, MultipleSelectElement, Navbar, NumberElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, TableElement, TextElement, TextareaElement, UploadElement };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,24 +54,17 @@ type ElementType = {
|
|
|
54
54
|
iconsClassName?: string;
|
|
55
55
|
labelClassName?: string;
|
|
56
56
|
containerClassName?: string;
|
|
57
|
+
selectBefore?: any[];
|
|
58
|
+
selectAfter?: any[];
|
|
57
59
|
};
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
onChange: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
61
|
-
}
|
|
62
|
-
declare const TextElement: (props: ElementExecuterProps$3) => React$1.JSX.Element;
|
|
61
|
+
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
63
62
|
|
|
64
63
|
declare const PasswordElement: (props: ElementType) => React$1.JSX.Element;
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
onChange: (value: string | number | object | boolean | any[] | undefined) => void;
|
|
68
|
-
}
|
|
69
|
-
declare const NumberElement: (props: ElementExecuterProps$2) => React$1.JSX.Element;
|
|
65
|
+
declare const NumberElement: (props: ElementType) => React$1.JSX.Element;
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
onChange: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
73
|
-
}
|
|
74
|
-
declare const TextareaElement: (props: ElementExecuterProps$1) => React$1.JSX.Element;
|
|
67
|
+
declare const TextareaElement: (props: ElementType) => React$1.JSX.Element;
|
|
75
68
|
|
|
76
69
|
declare const SelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
77
70
|
|
|
@@ -106,4 +99,8 @@ declare const UploadElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
106
99
|
|
|
107
100
|
declare const Image: (props: ElementType) => React$1.JSX.Element;
|
|
108
101
|
|
|
109
|
-
|
|
102
|
+
declare const SingleCheckbox: (props: ElementType) => React$1.JSX.Element;
|
|
103
|
+
|
|
104
|
+
declare const MultiSelect: (props: ElementType) => React$1.JSX.Element;
|
|
105
|
+
|
|
106
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Image, MultiSelect, MultipleSelectElement, Navbar, NumberElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, TableElement, TextElement, TextareaElement, UploadElement };
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(src_exports, {
|
|
|
37
37
|
DatePickerElement: () => DatePickerElement,
|
|
38
38
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
39
39
|
Image: () => Image,
|
|
40
|
+
MultiSelect: () => MultiSelect,
|
|
40
41
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
41
42
|
Navbar: () => Navbar,
|
|
42
43
|
NumberElement: () => NumberElement,
|
|
@@ -44,6 +45,7 @@ __export(src_exports, {
|
|
|
44
45
|
RadioElement: () => RadioElement,
|
|
45
46
|
SelectElement: () => SelectElement,
|
|
46
47
|
Sidebar: () => Sidebar,
|
|
48
|
+
SingleCheckbox: () => SingleCheckbox,
|
|
47
49
|
SingleSelectElement: () => SingleSelectElement,
|
|
48
50
|
TableElement: () => TableElement,
|
|
49
51
|
TextElement: () => TextElement,
|
|
@@ -56,7 +58,12 @@ module.exports = __toCommonJS(src_exports);
|
|
|
56
58
|
var import_react = __toESM(require("react"));
|
|
57
59
|
var import_antd = require("antd");
|
|
58
60
|
var TextElement = (props) => {
|
|
59
|
-
|
|
61
|
+
const handleChange = (e) => {
|
|
62
|
+
if (props.onChange) {
|
|
63
|
+
props.onChange(e.target.value);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, props.label && /* @__PURE__ */ import_react.default.createElement("label", { htmlFor: props.name }, props.label), /* @__PURE__ */ import_react.default.createElement(
|
|
60
67
|
import_antd.Input,
|
|
61
68
|
{
|
|
62
69
|
placeholder: props.placeholder,
|
|
@@ -72,7 +79,9 @@ var TextElement = (props) => {
|
|
|
72
79
|
className: props.className,
|
|
73
80
|
variant: props.variant,
|
|
74
81
|
name: props.name,
|
|
75
|
-
onChange: (e) =>
|
|
82
|
+
onChange: (e) => {
|
|
83
|
+
handleChange(e);
|
|
84
|
+
}
|
|
76
85
|
}
|
|
77
86
|
));
|
|
78
87
|
};
|
|
@@ -86,6 +95,11 @@ var PasswordElement = (props) => {
|
|
|
86
95
|
const handleVisibilityToggle = () => {
|
|
87
96
|
setPasswordVisible((prev) => !prev);
|
|
88
97
|
};
|
|
98
|
+
const handleChange = (e) => {
|
|
99
|
+
if (props.onChange) {
|
|
100
|
+
props.onChange(e.target.value);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
89
103
|
const renderVisibilityIcon = (visible) => visible ? /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeTwoTone, null) : /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeInvisibleOutlined, null);
|
|
90
104
|
const renderPasswordInput = () => /* @__PURE__ */ import_react2.default.createElement(
|
|
91
105
|
import_antd2.Input.Password,
|
|
@@ -93,21 +107,30 @@ var PasswordElement = (props) => {
|
|
|
93
107
|
placeholder: props.placeholder,
|
|
94
108
|
prefix: props.prefix,
|
|
95
109
|
addonBefore: props.addonBefore,
|
|
110
|
+
className: props.className,
|
|
96
111
|
type: props.type,
|
|
112
|
+
onChange: (e) => {
|
|
113
|
+
handleChange(e);
|
|
114
|
+
},
|
|
97
115
|
iconRender: renderVisibilityIcon,
|
|
98
|
-
visibilityToggle: {
|
|
116
|
+
visibilityToggle: {
|
|
117
|
+
visible: passwordVisible,
|
|
118
|
+
onVisibleChange: handleVisibilityToggle
|
|
119
|
+
}
|
|
99
120
|
}
|
|
100
121
|
);
|
|
101
|
-
return /* @__PURE__ */ import_react2.default.createElement(
|
|
122
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("label", null, props.label), /* @__PURE__ */ import_react2.default.createElement(import_antd2.Space, null, renderPasswordInput()));
|
|
102
123
|
};
|
|
103
124
|
|
|
104
125
|
// src/Components/NumberElement.tsx
|
|
105
126
|
var import_react3 = __toESM(require("react"));
|
|
106
127
|
var import_antd3 = require("antd");
|
|
107
128
|
var NumberElement = (props) => {
|
|
108
|
-
const
|
|
129
|
+
const handleChange = (e) => {
|
|
109
130
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
110
|
-
props.onChange
|
|
131
|
+
if (props.onChange) {
|
|
132
|
+
props.onChange(newValue);
|
|
133
|
+
}
|
|
111
134
|
};
|
|
112
135
|
return /* @__PURE__ */ import_react3.default.createElement(
|
|
113
136
|
import_antd3.Input,
|
|
@@ -124,7 +147,9 @@ var NumberElement = (props) => {
|
|
|
124
147
|
className: props.className,
|
|
125
148
|
variant: props.variant,
|
|
126
149
|
name: props.name,
|
|
127
|
-
onChange:
|
|
150
|
+
onChange: (e) => {
|
|
151
|
+
handleChange(e);
|
|
152
|
+
}
|
|
128
153
|
}
|
|
129
154
|
);
|
|
130
155
|
};
|
|
@@ -134,6 +159,11 @@ var import_react4 = __toESM(require("react"));
|
|
|
134
159
|
var import_antd4 = require("antd");
|
|
135
160
|
var { TextArea } = import_antd4.Input;
|
|
136
161
|
var TextareaElement = (props) => {
|
|
162
|
+
const handleChange = (e) => {
|
|
163
|
+
if (props.onChange) {
|
|
164
|
+
props.onChange(e.target.value);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
137
167
|
return /* @__PURE__ */ import_react4.default.createElement(import_antd4.Flex, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
138
168
|
TextArea,
|
|
139
169
|
{
|
|
@@ -148,7 +178,9 @@ var TextareaElement = (props) => {
|
|
|
148
178
|
name: props.name,
|
|
149
179
|
showCount: true,
|
|
150
180
|
maxLength: props.maxLength,
|
|
151
|
-
onChange: (e) =>
|
|
181
|
+
onChange: (e) => {
|
|
182
|
+
handleChange(e);
|
|
183
|
+
}
|
|
152
184
|
}
|
|
153
185
|
));
|
|
154
186
|
};
|
|
@@ -173,7 +205,7 @@ var SelectElement = (props) => {
|
|
|
173
205
|
import_antd5.Select,
|
|
174
206
|
{
|
|
175
207
|
labelRender,
|
|
176
|
-
options: props.
|
|
208
|
+
options: props.options,
|
|
177
209
|
placeholder: props.placeholder,
|
|
178
210
|
allowClear: true,
|
|
179
211
|
defaultValue: props.defaultValue,
|
|
@@ -342,7 +374,9 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
342
374
|
var SingleSelectElement = (props) => {
|
|
343
375
|
const handleChange = (values) => {
|
|
344
376
|
if (props.onChange) {
|
|
345
|
-
const option = props.dropDownOptions?.find(
|
|
377
|
+
const option = props.dropDownOptions?.find(
|
|
378
|
+
(option2) => String(option2.title) === values
|
|
379
|
+
);
|
|
346
380
|
const selectedOption = { id: option?.id, value: values };
|
|
347
381
|
props.onChange([selectedOption]);
|
|
348
382
|
}
|
|
@@ -356,7 +390,11 @@ var SingleSelectElement = (props) => {
|
|
|
356
390
|
onChange: handleChange,
|
|
357
391
|
onSearch,
|
|
358
392
|
filterOption,
|
|
359
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
393
|
+
options: props.dropDownOptions?.map((eachOption) => ({
|
|
394
|
+
label: String(eachOption.title),
|
|
395
|
+
value: String(eachOption.title),
|
|
396
|
+
id: String(eachOption.id)
|
|
397
|
+
}))
|
|
360
398
|
}
|
|
361
399
|
);
|
|
362
400
|
};
|
|
@@ -830,6 +868,31 @@ var import_react25 = __toESM(require("react"));
|
|
|
830
868
|
var Image = (props) => {
|
|
831
869
|
return /* @__PURE__ */ import_react25.default.createElement("div", null, /* @__PURE__ */ import_react25.default.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
832
870
|
};
|
|
871
|
+
|
|
872
|
+
// src/Components/SingleCheckbox.tsx
|
|
873
|
+
var import_react26 = __toESM(require("react"));
|
|
874
|
+
var import_antd18 = require("antd");
|
|
875
|
+
var SingleCheckbox = (props) => {
|
|
876
|
+
const handleChange = (e) => {
|
|
877
|
+
if (props.onChange) {
|
|
878
|
+
props.onChange(e.target.checked);
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
return /* @__PURE__ */ import_react26.default.createElement(import_antd18.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
// src/Components/MultiSelect.tsx
|
|
885
|
+
var import_react27 = __toESM(require("react"));
|
|
886
|
+
var import_antd19 = require("antd");
|
|
887
|
+
var MultiSelect = (props) => {
|
|
888
|
+
const handleChange = (e) => {
|
|
889
|
+
console.log(e.target.value);
|
|
890
|
+
console.log(e);
|
|
891
|
+
};
|
|
892
|
+
const selectAfter = /* @__PURE__ */ import_react27.default.createElement(import_antd19.Select, { options: props.selectAfter, onChange: handleChange });
|
|
893
|
+
const selectBefore = /* @__PURE__ */ import_react27.default.createElement(import_antd19.Select, { options: props.selectAfter });
|
|
894
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_antd19.Space, null, /* @__PURE__ */ import_react27.default.createElement(import_antd19.Input, { addonBefore: selectBefore, addonAfter: selectAfter }));
|
|
895
|
+
};
|
|
833
896
|
// Annotate the CommonJS export names for ESM import in node:
|
|
834
897
|
0 && (module.exports = {
|
|
835
898
|
AddMoreTable,
|
|
@@ -839,6 +902,7 @@ var Image = (props) => {
|
|
|
839
902
|
DatePickerElement,
|
|
840
903
|
DateRangePickerElement,
|
|
841
904
|
Image,
|
|
905
|
+
MultiSelect,
|
|
842
906
|
MultipleSelectElement,
|
|
843
907
|
Navbar,
|
|
844
908
|
NumberElement,
|
|
@@ -846,6 +910,7 @@ var Image = (props) => {
|
|
|
846
910
|
RadioElement,
|
|
847
911
|
SelectElement,
|
|
848
912
|
Sidebar,
|
|
913
|
+
SingleCheckbox,
|
|
849
914
|
SingleSelectElement,
|
|
850
915
|
TableElement,
|
|
851
916
|
TextElement,
|
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(React.Fragment, null, props.label && /* @__PURE__ */ React.createElement("label", { htmlFor: props.name }, 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,12 +33,17 @@ 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 {
|
|
36
|
+
import { Input, Space } from "antd";
|
|
30
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
|
const renderPasswordInput = () => /* @__PURE__ */ React2.createElement(
|
|
37
49
|
Input.Password,
|
|
@@ -39,21 +51,30 @@ var PasswordElement = (props) => {
|
|
|
39
51
|
placeholder: props.placeholder,
|
|
40
52
|
prefix: props.prefix,
|
|
41
53
|
addonBefore: props.addonBefore,
|
|
54
|
+
className: props.className,
|
|
42
55
|
type: props.type,
|
|
56
|
+
onChange: (e) => {
|
|
57
|
+
handleChange(e);
|
|
58
|
+
},
|
|
43
59
|
iconRender: renderVisibilityIcon,
|
|
44
|
-
visibilityToggle: {
|
|
60
|
+
visibilityToggle: {
|
|
61
|
+
visible: passwordVisible,
|
|
62
|
+
onVisibleChange: handleVisibilityToggle
|
|
63
|
+
}
|
|
45
64
|
}
|
|
46
65
|
);
|
|
47
|
-
return /* @__PURE__ */ React2.createElement(
|
|
66
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("label", null, props.label), /* @__PURE__ */ React2.createElement(Space, null, renderPasswordInput()));
|
|
48
67
|
};
|
|
49
68
|
|
|
50
69
|
// src/Components/NumberElement.tsx
|
|
51
70
|
import React3 from "react";
|
|
52
71
|
import { Input as AntInput2 } from "antd";
|
|
53
72
|
var NumberElement = (props) => {
|
|
54
|
-
const
|
|
73
|
+
const handleChange = (e) => {
|
|
55
74
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
56
|
-
props.onChange
|
|
75
|
+
if (props.onChange) {
|
|
76
|
+
props.onChange(newValue);
|
|
77
|
+
}
|
|
57
78
|
};
|
|
58
79
|
return /* @__PURE__ */ React3.createElement(
|
|
59
80
|
AntInput2,
|
|
@@ -70,7 +91,9 @@ var NumberElement = (props) => {
|
|
|
70
91
|
className: props.className,
|
|
71
92
|
variant: props.variant,
|
|
72
93
|
name: props.name,
|
|
73
|
-
onChange:
|
|
94
|
+
onChange: (e) => {
|
|
95
|
+
handleChange(e);
|
|
96
|
+
}
|
|
74
97
|
}
|
|
75
98
|
);
|
|
76
99
|
};
|
|
@@ -80,6 +103,11 @@ import React4 from "react";
|
|
|
80
103
|
import { Flex, Input as Input2 } from "antd";
|
|
81
104
|
var { TextArea } = Input2;
|
|
82
105
|
var TextareaElement = (props) => {
|
|
106
|
+
const handleChange = (e) => {
|
|
107
|
+
if (props.onChange) {
|
|
108
|
+
props.onChange(e.target.value);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
83
111
|
return /* @__PURE__ */ React4.createElement(Flex, null, /* @__PURE__ */ React4.createElement(
|
|
84
112
|
TextArea,
|
|
85
113
|
{
|
|
@@ -94,7 +122,9 @@ var TextareaElement = (props) => {
|
|
|
94
122
|
name: props.name,
|
|
95
123
|
showCount: true,
|
|
96
124
|
maxLength: props.maxLength,
|
|
97
|
-
onChange: (e) =>
|
|
125
|
+
onChange: (e) => {
|
|
126
|
+
handleChange(e);
|
|
127
|
+
}
|
|
98
128
|
}
|
|
99
129
|
));
|
|
100
130
|
};
|
|
@@ -119,7 +149,7 @@ var SelectElement = (props) => {
|
|
|
119
149
|
Select,
|
|
120
150
|
{
|
|
121
151
|
labelRender,
|
|
122
|
-
options: props.
|
|
152
|
+
options: props.options,
|
|
123
153
|
placeholder: props.placeholder,
|
|
124
154
|
allowClear: true,
|
|
125
155
|
defaultValue: props.defaultValue,
|
|
@@ -288,7 +318,9 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
288
318
|
var SingleSelectElement = (props) => {
|
|
289
319
|
const handleChange = (values) => {
|
|
290
320
|
if (props.onChange) {
|
|
291
|
-
const option = props.dropDownOptions?.find(
|
|
321
|
+
const option = props.dropDownOptions?.find(
|
|
322
|
+
(option2) => String(option2.title) === values
|
|
323
|
+
);
|
|
292
324
|
const selectedOption = { id: option?.id, value: values };
|
|
293
325
|
props.onChange([selectedOption]);
|
|
294
326
|
}
|
|
@@ -302,7 +334,11 @@ var SingleSelectElement = (props) => {
|
|
|
302
334
|
onChange: handleChange,
|
|
303
335
|
onSearch,
|
|
304
336
|
filterOption,
|
|
305
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
337
|
+
options: props.dropDownOptions?.map((eachOption) => ({
|
|
338
|
+
label: String(eachOption.title),
|
|
339
|
+
value: String(eachOption.title),
|
|
340
|
+
id: String(eachOption.id)
|
|
341
|
+
}))
|
|
306
342
|
}
|
|
307
343
|
);
|
|
308
344
|
};
|
|
@@ -347,7 +383,7 @@ var ButtonElement = (props) => {
|
|
|
347
383
|
|
|
348
384
|
// src/Components/AddMoreTable.tsx
|
|
349
385
|
import React12, { useEffect, useState as useState4 } from "react";
|
|
350
|
-
import { Table, Button
|
|
386
|
+
import { Table, Button } from "antd";
|
|
351
387
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
352
388
|
var AddMoreTable = (props) => {
|
|
353
389
|
const { thead, tbody } = props;
|
|
@@ -442,13 +478,13 @@ var AddMoreTable = (props) => {
|
|
|
442
478
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
443
479
|
Object.keys(variable).forEach((key) => {
|
|
444
480
|
if (key === "SubRows") {
|
|
445
|
-
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(
|
|
481
|
+
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)));
|
|
446
482
|
} else {
|
|
447
483
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
448
484
|
}
|
|
449
485
|
});
|
|
450
486
|
});
|
|
451
|
-
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(
|
|
487
|
+
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)));
|
|
452
488
|
console.log("=====rowdata", rowData);
|
|
453
489
|
return rowData;
|
|
454
490
|
});
|
|
@@ -495,7 +531,7 @@ import React17 from "react";
|
|
|
495
531
|
|
|
496
532
|
// src/Components/Notification.tsx
|
|
497
533
|
import React14 from "react";
|
|
498
|
-
import { Popover, Badge, Button as
|
|
534
|
+
import { Popover, Badge, Button as Button2, Avatar, List } from "antd";
|
|
499
535
|
import { IoIosNotifications } from "react-icons/io";
|
|
500
536
|
var popoverContentStyle = {
|
|
501
537
|
minWidth: "300px",
|
|
@@ -523,7 +559,7 @@ var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
|
523
559
|
trigger: "focus",
|
|
524
560
|
placement: "bottomRight"
|
|
525
561
|
},
|
|
526
|
-
/* @__PURE__ */ React14.createElement(
|
|
562
|
+
/* @__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))))
|
|
527
563
|
);
|
|
528
564
|
|
|
529
565
|
// src/Components/SpanElement.tsx
|
|
@@ -748,7 +784,7 @@ var DateRangePickerElement = (props) => {
|
|
|
748
784
|
// src/Components/UploadElement.tsx
|
|
749
785
|
import React23 from "react";
|
|
750
786
|
import { UploadOutlined } from "@ant-design/icons";
|
|
751
|
-
import { Button as
|
|
787
|
+
import { Button as Button3, message, Upload } from "antd";
|
|
752
788
|
var uploadProps = {
|
|
753
789
|
name: "file",
|
|
754
790
|
multiple: true,
|
|
@@ -768,7 +804,7 @@ var uploadProps = {
|
|
|
768
804
|
}
|
|
769
805
|
};
|
|
770
806
|
var UploadElement = (props) => {
|
|
771
|
-
return /* @__PURE__ */ React23.createElement(Upload, { ...uploadProps }, /* @__PURE__ */ React23.createElement(
|
|
807
|
+
return /* @__PURE__ */ React23.createElement(Upload, { ...uploadProps }, /* @__PURE__ */ React23.createElement(Button3, { icon: /* @__PURE__ */ React23.createElement(UploadOutlined, null) }, "Click to Upload"));
|
|
772
808
|
};
|
|
773
809
|
|
|
774
810
|
// src/Components/Image.tsx
|
|
@@ -776,6 +812,31 @@ import React24 from "react";
|
|
|
776
812
|
var Image = (props) => {
|
|
777
813
|
return /* @__PURE__ */ React24.createElement("div", null, /* @__PURE__ */ React24.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
778
814
|
};
|
|
815
|
+
|
|
816
|
+
// src/Components/SingleCheckbox.tsx
|
|
817
|
+
import React25 from "react";
|
|
818
|
+
import { Checkbox as Checkbox2 } from "antd";
|
|
819
|
+
var SingleCheckbox = (props) => {
|
|
820
|
+
const handleChange = (e) => {
|
|
821
|
+
if (props.onChange) {
|
|
822
|
+
props.onChange(e.target.checked);
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
return /* @__PURE__ */ React25.createElement(Checkbox2, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
// src/Components/MultiSelect.tsx
|
|
829
|
+
import React26 from "react";
|
|
830
|
+
import { Input as Input3, Select as Select4, Space as Space3 } from "antd";
|
|
831
|
+
var MultiSelect = (props) => {
|
|
832
|
+
const handleChange = (e) => {
|
|
833
|
+
console.log(e.target.value);
|
|
834
|
+
console.log(e);
|
|
835
|
+
};
|
|
836
|
+
const selectAfter = /* @__PURE__ */ React26.createElement(Select4, { options: props.selectAfter, onChange: handleChange });
|
|
837
|
+
const selectBefore = /* @__PURE__ */ React26.createElement(Select4, { options: props.selectAfter });
|
|
838
|
+
return /* @__PURE__ */ React26.createElement(Space3, null, /* @__PURE__ */ React26.createElement(Input3, { addonBefore: selectBefore, addonAfter: selectAfter }));
|
|
839
|
+
};
|
|
779
840
|
export {
|
|
780
841
|
AddMoreTable,
|
|
781
842
|
ButtonElement,
|
|
@@ -784,6 +845,7 @@ export {
|
|
|
784
845
|
DatePickerElement,
|
|
785
846
|
DateRangePickerElement,
|
|
786
847
|
Image,
|
|
848
|
+
MultiSelect,
|
|
787
849
|
MultipleSelectElement,
|
|
788
850
|
Navbar,
|
|
789
851
|
NumberElement,
|
|
@@ -791,6 +853,7 @@ export {
|
|
|
791
853
|
RadioElement,
|
|
792
854
|
SelectElement,
|
|
793
855
|
Sidebar,
|
|
856
|
+
SingleCheckbox,
|
|
794
857
|
SingleSelectElement,
|
|
795
858
|
TableElement,
|
|
796
859
|
TextElement,
|