@apexcura/ui-components 0.0.13-Beta10 → 0.0.13-Beta101
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 +18 -26
- package/dist/index.d.ts +18 -26
- package/dist/index.js +270 -170
- package/dist/index.mjs +219 -123
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -36,6 +36,9 @@ __export(src_exports, {
|
|
|
36
36
|
CkEditor: () => CkEditor,
|
|
37
37
|
DatePickerElement: () => DatePickerElement,
|
|
38
38
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
39
|
+
DropDownGroup: () => DropDownGroup,
|
|
40
|
+
FileUpload: () => FileUpload,
|
|
41
|
+
Image: () => Image,
|
|
39
42
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
40
43
|
Navbar: () => Navbar,
|
|
41
44
|
NumberElement: () => NumberElement,
|
|
@@ -43,11 +46,12 @@ __export(src_exports, {
|
|
|
43
46
|
RadioElement: () => RadioElement,
|
|
44
47
|
SelectElement: () => SelectElement,
|
|
45
48
|
Sidebar: () => Sidebar,
|
|
49
|
+
SingleCheckbox: () => SingleCheckbox,
|
|
46
50
|
SingleSelectElement: () => SingleSelectElement,
|
|
47
51
|
TableElement: () => TableElement,
|
|
52
|
+
TabsElement: () => TabsElement,
|
|
48
53
|
TextElement: () => TextElement,
|
|
49
|
-
TextareaElement: () => TextareaElement
|
|
50
|
-
UploadElement: () => UploadElement
|
|
54
|
+
TextareaElement: () => TextareaElement
|
|
51
55
|
});
|
|
52
56
|
module.exports = __toCommonJS(src_exports);
|
|
53
57
|
|
|
@@ -55,23 +59,24 @@ module.exports = __toCommonJS(src_exports);
|
|
|
55
59
|
var import_react = __toESM(require("react"));
|
|
56
60
|
var import_antd = require("antd");
|
|
57
61
|
var TextElement = (props) => {
|
|
58
|
-
|
|
62
|
+
const handleChange = (e) => {
|
|
63
|
+
if (props.onChange) {
|
|
64
|
+
props.onChange(e.target.value);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react.default.createElement(
|
|
59
68
|
import_antd.Input,
|
|
60
69
|
{
|
|
61
70
|
placeholder: props.placeholder,
|
|
62
|
-
addonBefore: props.addonBefore,
|
|
63
71
|
allowClear: true,
|
|
64
|
-
defaultValue: props.defaultValue,
|
|
65
|
-
disabled: props.disabled,
|
|
66
72
|
id: props.name,
|
|
67
73
|
prefix: props.prefix,
|
|
68
74
|
type: props.type,
|
|
69
75
|
status: props.status,
|
|
70
|
-
style: props.styles,
|
|
71
76
|
className: props.className,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
onChange: (e) => {
|
|
78
|
+
handleChange(e);
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
));
|
|
77
82
|
};
|
|
@@ -80,36 +85,46 @@ var TextElement = (props) => {
|
|
|
80
85
|
var import_react2 = __toESM(require("react"));
|
|
81
86
|
var import_icons = require("@ant-design/icons");
|
|
82
87
|
var import_antd2 = require("antd");
|
|
83
|
-
var PasswordElement = (
|
|
88
|
+
var PasswordElement = (props) => {
|
|
84
89
|
const [passwordVisible, setPasswordVisible] = (0, import_react2.useState)(false);
|
|
85
90
|
const handleVisibilityToggle = () => {
|
|
86
91
|
setPasswordVisible((prev) => !prev);
|
|
87
92
|
};
|
|
93
|
+
const handleChange = (e) => {
|
|
94
|
+
if (props.onChange) {
|
|
95
|
+
props.onChange(e.target.value);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
88
98
|
const renderVisibilityIcon = (visible) => visible ? /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeTwoTone, null) : /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeInvisibleOutlined, null);
|
|
89
|
-
|
|
99
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ import_react2.default.createElement("label", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react2.default.createElement(
|
|
90
100
|
import_antd2.Input.Password,
|
|
91
101
|
{
|
|
92
|
-
placeholder:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
placeholder: props.placeholder,
|
|
103
|
+
className: props.className,
|
|
104
|
+
type: props.type,
|
|
105
|
+
onChange: (e) => {
|
|
106
|
+
handleChange(e);
|
|
107
|
+
},
|
|
97
108
|
iconRender: renderVisibilityIcon,
|
|
98
|
-
visibilityToggle: {
|
|
109
|
+
visibilityToggle: {
|
|
110
|
+
visible: passwordVisible,
|
|
111
|
+
onVisibleChange: handleVisibilityToggle
|
|
112
|
+
}
|
|
99
113
|
}
|
|
100
|
-
);
|
|
101
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_antd2.Space, { direction: "vertical" }, renderPasswordInput(), /* @__PURE__ */ import_react2.default.createElement(import_antd2.Space, { direction: "horizontal" }, renderPasswordInput(), /* @__PURE__ */ import_react2.default.createElement(import_antd2.Button, { style: { width: 80 }, onClick: handleVisibilityToggle }, passwordVisible ? "Hide" : "Show")));
|
|
114
|
+
));
|
|
102
115
|
};
|
|
103
116
|
|
|
104
117
|
// src/Components/NumberElement.tsx
|
|
105
118
|
var import_react3 = __toESM(require("react"));
|
|
106
119
|
var import_antd3 = require("antd");
|
|
107
120
|
var NumberElement = (props) => {
|
|
108
|
-
const
|
|
121
|
+
const handleChange = (e) => {
|
|
109
122
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
110
|
-
props.onChange
|
|
123
|
+
if (props.onChange) {
|
|
124
|
+
props.onChange(newValue);
|
|
125
|
+
}
|
|
111
126
|
};
|
|
112
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
127
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react3.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react3.default.createElement(
|
|
113
128
|
import_antd3.Input,
|
|
114
129
|
{
|
|
115
130
|
placeholder: props.placeholder,
|
|
@@ -124,9 +139,11 @@ var NumberElement = (props) => {
|
|
|
124
139
|
className: props.className,
|
|
125
140
|
variant: props.variant,
|
|
126
141
|
name: props.name,
|
|
127
|
-
onChange:
|
|
142
|
+
onChange: (e) => {
|
|
143
|
+
handleChange(e);
|
|
144
|
+
}
|
|
128
145
|
}
|
|
129
|
-
);
|
|
146
|
+
));
|
|
130
147
|
};
|
|
131
148
|
|
|
132
149
|
// src/Components/TextareaElement.tsx
|
|
@@ -134,7 +151,12 @@ var import_react4 = __toESM(require("react"));
|
|
|
134
151
|
var import_antd4 = require("antd");
|
|
135
152
|
var { TextArea } = import_antd4.Input;
|
|
136
153
|
var TextareaElement = (props) => {
|
|
137
|
-
|
|
154
|
+
const handleChange = (e) => {
|
|
155
|
+
if (props.onChange) {
|
|
156
|
+
props.onChange(e.target.value);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react4.default.createElement(
|
|
138
160
|
TextArea,
|
|
139
161
|
{
|
|
140
162
|
placeholder: props.placeholder,
|
|
@@ -148,7 +170,9 @@ var TextareaElement = (props) => {
|
|
|
148
170
|
name: props.name,
|
|
149
171
|
showCount: true,
|
|
150
172
|
maxLength: props.maxLength,
|
|
151
|
-
onChange: (e) =>
|
|
173
|
+
onChange: (e) => {
|
|
174
|
+
handleChange(e);
|
|
175
|
+
}
|
|
152
176
|
}
|
|
153
177
|
));
|
|
154
178
|
};
|
|
@@ -156,24 +180,27 @@ var TextareaElement = (props) => {
|
|
|
156
180
|
// src/Components/SelectElement.tsx
|
|
157
181
|
var import_react5 = __toESM(require("react"));
|
|
158
182
|
var import_antd5 = require("antd");
|
|
159
|
-
var labelRender = (props) => {
|
|
160
|
-
const { label, value } = props;
|
|
161
|
-
if (label) {
|
|
162
|
-
return value;
|
|
163
|
-
}
|
|
164
|
-
return /* @__PURE__ */ import_react5.default.createElement("span", null, "select gender");
|
|
165
|
-
};
|
|
166
183
|
var SelectElement = (props) => {
|
|
167
184
|
const handleChange = (value) => {
|
|
185
|
+
console.log("sigleselectvalue", typeof value);
|
|
168
186
|
if (props.onChange) {
|
|
169
|
-
|
|
187
|
+
if (typeof value === "string") {
|
|
188
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
189
|
+
console.log(filterOption2);
|
|
190
|
+
props.onChange(filterOption2);
|
|
191
|
+
} else {
|
|
192
|
+
const selectedOptions = value ? value.map((eachVal) => {
|
|
193
|
+
return props.options && props.options.find((eachOption) => eachOption.value === eachVal);
|
|
194
|
+
}) : [];
|
|
195
|
+
props.onChange(selectedOptions);
|
|
196
|
+
}
|
|
170
197
|
}
|
|
171
198
|
};
|
|
172
|
-
return /* @__PURE__ */ import_react5.default.createElement(
|
|
199
|
+
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(
|
|
173
200
|
import_antd5.Select,
|
|
174
201
|
{
|
|
175
|
-
|
|
176
|
-
options: props.
|
|
202
|
+
mode: props.mode,
|
|
203
|
+
options: props.options,
|
|
177
204
|
placeholder: props.placeholder,
|
|
178
205
|
allowClear: true,
|
|
179
206
|
defaultValue: props.defaultValue,
|
|
@@ -185,7 +212,7 @@ var SelectElement = (props) => {
|
|
|
185
212
|
variant: props.variant,
|
|
186
213
|
onChange: handleChange
|
|
187
214
|
}
|
|
188
|
-
);
|
|
215
|
+
));
|
|
189
216
|
};
|
|
190
217
|
|
|
191
218
|
// src/Components/RadioElement.tsx
|
|
@@ -243,12 +270,9 @@ var CheckboxElement = (props) => {
|
|
|
243
270
|
const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
|
|
244
271
|
const checkAll = props.options && props.options.length === checkedList.length;
|
|
245
272
|
const handleChange = (list) => {
|
|
246
|
-
console.log("list========", list);
|
|
247
273
|
setCheckedList(list);
|
|
248
274
|
if (props.onChange) {
|
|
249
|
-
const selectedOptions =
|
|
250
|
-
return { id: list.indexOf(value), value };
|
|
251
|
-
});
|
|
275
|
+
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
252
276
|
props.onChange(selectedOptions);
|
|
253
277
|
}
|
|
254
278
|
};
|
|
@@ -284,59 +308,13 @@ var CheckboxElement = (props) => {
|
|
|
284
308
|
};
|
|
285
309
|
|
|
286
310
|
// src/Components/CkEditor.tsx
|
|
287
|
-
var import_react8 = require("react");
|
|
288
|
-
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
289
|
-
var import_react9 = __toESM(require("react"));
|
|
311
|
+
var import_react8 = __toESM(require("react"));
|
|
290
312
|
var CkEditor = (props) => {
|
|
291
|
-
|
|
292
|
-
const log = () => {
|
|
293
|
-
if (editorRef.current) {
|
|
294
|
-
let content = editorRef.current.getContent();
|
|
295
|
-
if (props.onChange) {
|
|
296
|
-
props.onChange(content);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
return /* @__PURE__ */ import_react9.default.createElement("div", null, /* @__PURE__ */ import_react9.default.createElement(
|
|
301
|
-
import_tinymce_react.Editor,
|
|
302
|
-
{
|
|
303
|
-
apiKey: "rwpgt7maa54n0pe5mglhkl686p7h57sg6z636n6gf2mio1b9",
|
|
304
|
-
onInit: (_evt, editor) => {
|
|
305
|
-
if (editor) editorRef.current = editor;
|
|
306
|
-
},
|
|
307
|
-
initialValue: "<p>This is the initial content of the editor.</p>",
|
|
308
|
-
init: {
|
|
309
|
-
height: 500,
|
|
310
|
-
menubar: false,
|
|
311
|
-
plugins: [
|
|
312
|
-
"advlist",
|
|
313
|
-
"autolink",
|
|
314
|
-
"lists",
|
|
315
|
-
"link",
|
|
316
|
-
"image",
|
|
317
|
-
"charmap",
|
|
318
|
-
"preview",
|
|
319
|
-
"anchor",
|
|
320
|
-
"searchreplace",
|
|
321
|
-
"visualblocks",
|
|
322
|
-
"code",
|
|
323
|
-
"fullscreen",
|
|
324
|
-
"insertdatetime",
|
|
325
|
-
"media",
|
|
326
|
-
"table",
|
|
327
|
-
"code",
|
|
328
|
-
"help",
|
|
329
|
-
"wordcount"
|
|
330
|
-
],
|
|
331
|
-
toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
|
|
332
|
-
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
), /* @__PURE__ */ import_react9.default.createElement("button", { onClick: log }, "Log editor content"));
|
|
313
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", null);
|
|
336
314
|
};
|
|
337
315
|
|
|
338
316
|
// src/Components/Select/SingleSelectElement.tsx
|
|
339
|
-
var
|
|
317
|
+
var import_react9 = __toESM(require("react"));
|
|
340
318
|
var import_antd8 = require("antd");
|
|
341
319
|
var onSearch = (value) => {
|
|
342
320
|
console.log("search:", value);
|
|
@@ -345,12 +323,14 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
345
323
|
var SingleSelectElement = (props) => {
|
|
346
324
|
const handleChange = (values) => {
|
|
347
325
|
if (props.onChange) {
|
|
348
|
-
const option = props.dropDownOptions?.find(
|
|
326
|
+
const option = props.dropDownOptions?.find(
|
|
327
|
+
(option2) => String(option2.title) === values
|
|
328
|
+
);
|
|
349
329
|
const selectedOption = { id: option?.id, value: values };
|
|
350
330
|
props.onChange([selectedOption]);
|
|
351
331
|
}
|
|
352
332
|
};
|
|
353
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
354
334
|
import_antd8.Select,
|
|
355
335
|
{
|
|
356
336
|
showSearch: true,
|
|
@@ -359,13 +339,17 @@ var SingleSelectElement = (props) => {
|
|
|
359
339
|
onChange: handleChange,
|
|
360
340
|
onSearch,
|
|
361
341
|
filterOption,
|
|
362
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
342
|
+
options: props.dropDownOptions?.map((eachOption) => ({
|
|
343
|
+
label: String(eachOption.title),
|
|
344
|
+
value: String(eachOption.title),
|
|
345
|
+
id: String(eachOption.id)
|
|
346
|
+
}))
|
|
363
347
|
}
|
|
364
348
|
);
|
|
365
349
|
};
|
|
366
350
|
|
|
367
351
|
// src/Components/Select/MultipleSelectElement.tsx
|
|
368
|
-
var
|
|
352
|
+
var import_react10 = __toESM(require("react"));
|
|
369
353
|
var import_antd9 = require("antd");
|
|
370
354
|
var MultipleSelectElement = (props) => {
|
|
371
355
|
const handleChange = (values) => {
|
|
@@ -377,7 +361,7 @@ var MultipleSelectElement = (props) => {
|
|
|
377
361
|
props.onChange(selectedOptions);
|
|
378
362
|
}
|
|
379
363
|
};
|
|
380
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
381
365
|
import_antd9.Select,
|
|
382
366
|
{
|
|
383
367
|
mode: "multiple",
|
|
@@ -389,26 +373,26 @@ var MultipleSelectElement = (props) => {
|
|
|
389
373
|
};
|
|
390
374
|
|
|
391
375
|
// src/Components/Button.tsx
|
|
392
|
-
var
|
|
376
|
+
var import_react11 = __toESM(require("react"));
|
|
393
377
|
var ButtonElement = (props) => {
|
|
394
|
-
return /* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
395
379
|
"button",
|
|
396
380
|
{
|
|
397
381
|
onClick: () => props.onClick && props.onClick(),
|
|
398
382
|
className: `${props.className ? props.className : ""}`
|
|
399
383
|
},
|
|
400
|
-
props.icon && /* @__PURE__ */
|
|
384
|
+
props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon }),
|
|
401
385
|
props.label
|
|
402
386
|
);
|
|
403
387
|
};
|
|
404
388
|
|
|
405
389
|
// src/Components/AddMoreTable.tsx
|
|
406
|
-
var
|
|
390
|
+
var import_react12 = __toESM(require("react"));
|
|
407
391
|
var import_antd10 = require("antd");
|
|
408
392
|
var import_icons2 = require("@ant-design/icons");
|
|
409
393
|
var AddMoreTable = (props) => {
|
|
410
394
|
const { thead, tbody } = props;
|
|
411
|
-
const [rows, setRows] = (0,
|
|
395
|
+
const [rows, setRows] = (0, import_react12.useState)(tbody || []);
|
|
412
396
|
const onHandleRows = () => {
|
|
413
397
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
414
398
|
let newRow = {
|
|
@@ -473,16 +457,16 @@ var AddMoreTable = (props) => {
|
|
|
473
457
|
});
|
|
474
458
|
});
|
|
475
459
|
};
|
|
476
|
-
(0,
|
|
460
|
+
(0, import_react12.useEffect)(() => {
|
|
477
461
|
console.log(rows);
|
|
478
462
|
}, [rows]);
|
|
479
463
|
const renderInputElement = (element, value) => {
|
|
480
464
|
if (!element) return null;
|
|
481
465
|
const { element: type, label } = element;
|
|
482
466
|
if (type === "single-select") {
|
|
483
|
-
return /* @__PURE__ */
|
|
467
|
+
return /* @__PURE__ */ import_react12.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
484
468
|
} else if (type === "textarea") {
|
|
485
|
-
return /* @__PURE__ */
|
|
469
|
+
return /* @__PURE__ */ import_react12.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
486
470
|
} else {
|
|
487
471
|
return null;
|
|
488
472
|
}
|
|
@@ -499,13 +483,13 @@ var AddMoreTable = (props) => {
|
|
|
499
483
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
500
484
|
Object.keys(variable).forEach((key) => {
|
|
501
485
|
if (key === "SubRows") {
|
|
502
|
-
rowData[`${key}`] = /* @__PURE__ */
|
|
486
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react12.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.PlusOutlined, null)));
|
|
503
487
|
} else {
|
|
504
488
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
505
489
|
}
|
|
506
490
|
});
|
|
507
491
|
});
|
|
508
|
-
rowData.actions = /* @__PURE__ */
|
|
492
|
+
rowData.actions = /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react12.default.createElement(import_icons2.PlusOutlined, null)));
|
|
509
493
|
console.log("=====rowdata", rowData);
|
|
510
494
|
return rowData;
|
|
511
495
|
});
|
|
@@ -521,7 +505,7 @@ var AddMoreTable = (props) => {
|
|
|
521
505
|
key: "actions"
|
|
522
506
|
});
|
|
523
507
|
}
|
|
524
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
525
509
|
import_antd10.Table,
|
|
526
510
|
{
|
|
527
511
|
columns,
|
|
@@ -533,44 +517,44 @@ var AddMoreTable = (props) => {
|
|
|
533
517
|
};
|
|
534
518
|
|
|
535
519
|
// src/Components/Sidebar.tsx
|
|
536
|
-
var
|
|
520
|
+
var import_react13 = __toESM(require("react"));
|
|
537
521
|
var Sidebar = (props) => {
|
|
538
522
|
const handleChange = (item) => {
|
|
539
523
|
if (props.onChange) {
|
|
540
524
|
props.onChange(item);
|
|
541
525
|
}
|
|
542
526
|
};
|
|
543
|
-
return /* @__PURE__ */
|
|
544
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { className: props.className, key: props.name }, /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ import_react13.default.createElement("ul", { className: props.listClassName }, props.items?.map((item) => {
|
|
528
|
+
return /* @__PURE__ */ import_react13.default.createElement("li", { onClick: () => {
|
|
545
529
|
handleChange(item);
|
|
546
|
-
}, key: item.label, className: `${props.listItemClassName} ${item.active && props.activeClassName}` }, /* @__PURE__ */
|
|
530
|
+
}, key: item.label, className: `${props.listItemClassName} ${item.active && props.activeClassName}` }, /* @__PURE__ */ import_react13.default.createElement("img", { src: item.icon, className: props.className }), /* @__PURE__ */ import_react13.default.createElement("p", null, item.label));
|
|
547
531
|
})));
|
|
548
532
|
};
|
|
549
533
|
|
|
550
534
|
// src/Components/Navbar.tsx
|
|
551
|
-
var
|
|
535
|
+
var import_react17 = __toESM(require("react"));
|
|
552
536
|
|
|
553
537
|
// src/Components/Notification.tsx
|
|
554
|
-
var
|
|
538
|
+
var import_react14 = __toESM(require("react"));
|
|
555
539
|
var import_antd11 = require("antd");
|
|
556
540
|
var import_io = require("react-icons/io");
|
|
557
541
|
var popoverContentStyle = {
|
|
558
542
|
minWidth: "300px",
|
|
559
543
|
maxWidth: "100%"
|
|
560
544
|
};
|
|
561
|
-
var Notification = (props) => /* @__PURE__ */
|
|
545
|
+
var Notification = (props) => /* @__PURE__ */ import_react14.default.createElement(
|
|
562
546
|
import_antd11.Popover,
|
|
563
547
|
{
|
|
564
548
|
className: props.className,
|
|
565
|
-
content: /* @__PURE__ */
|
|
549
|
+
content: /* @__PURE__ */ import_react14.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react14.default.createElement(
|
|
566
550
|
import_antd11.List,
|
|
567
551
|
{
|
|
568
552
|
itemLayout: "horizontal",
|
|
569
553
|
dataSource: props.items,
|
|
570
|
-
renderItem: (item, index) => /* @__PURE__ */
|
|
554
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react14.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react14.default.createElement(
|
|
571
555
|
import_antd11.List.Item.Meta,
|
|
572
556
|
{
|
|
573
|
-
avatar: /* @__PURE__ */
|
|
557
|
+
avatar: /* @__PURE__ */ import_react14.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
574
558
|
title: item.text,
|
|
575
559
|
description: item.time
|
|
576
560
|
}
|
|
@@ -580,51 +564,51 @@ var Notification = (props) => /* @__PURE__ */ import_react15.default.createEleme
|
|
|
580
564
|
trigger: "focus",
|
|
581
565
|
placement: "bottomRight"
|
|
582
566
|
},
|
|
583
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ import_react14.default.createElement(import_antd11.Button, { className: props.buttonClassName }, /* @__PURE__ */ import_react14.default.createElement(import_antd11.Badge, { size: "small", count: props.count }, /* @__PURE__ */ import_react14.default.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ import_react14.default.createElement(import_io.IoIosNotifications, null))))
|
|
584
568
|
);
|
|
585
569
|
|
|
586
570
|
// src/Components/SpanElement.tsx
|
|
587
|
-
var
|
|
588
|
-
var SpanElement = (props) => /* @__PURE__ */
|
|
571
|
+
var import_react15 = __toESM(require("react"));
|
|
572
|
+
var SpanElement = (props) => /* @__PURE__ */ import_react15.default.createElement("span", { className: props.className }, props.label);
|
|
589
573
|
|
|
590
574
|
// src/Components/Profile.tsx
|
|
591
|
-
var
|
|
575
|
+
var import_react16 = __toESM(require("react"));
|
|
592
576
|
var import_antd12 = require("antd");
|
|
593
577
|
var import_icons3 = require("@ant-design/icons");
|
|
594
|
-
var Profile = (props) => /* @__PURE__ */
|
|
578
|
+
var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react16.default.createElement(import_antd12.Avatar, { style: { backgroundColor: "#87d068", marginRight: "10px" }, icon: /* @__PURE__ */ import_react16.default.createElement(import_icons3.UserOutlined, null) }), /* @__PURE__ */ import_react16.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react16.default.createElement("p", null, props.primaryText), /* @__PURE__ */ import_react16.default.createElement("p", { className: props.secondTextClassName }, " ", props.secondaryText)));
|
|
595
579
|
|
|
596
580
|
// src/Components/Navbar.tsx
|
|
597
581
|
var Navbar = (props) => {
|
|
598
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: `${props.className}`, key: props.name }, props.items && props.items.map((item) => {
|
|
599
583
|
if (item.element === "span") {
|
|
600
|
-
return /* @__PURE__ */
|
|
584
|
+
return /* @__PURE__ */ import_react17.default.createElement(SpanElement, { ...item });
|
|
601
585
|
} else if (item.element === "notifications") {
|
|
602
|
-
return /* @__PURE__ */
|
|
586
|
+
return /* @__PURE__ */ import_react17.default.createElement(Notification, { ...item });
|
|
603
587
|
} else if (item.name === "profile") {
|
|
604
|
-
return /* @__PURE__ */
|
|
588
|
+
return /* @__PURE__ */ import_react17.default.createElement(Profile, { ...item });
|
|
605
589
|
}
|
|
606
590
|
return null;
|
|
607
591
|
}));
|
|
608
592
|
};
|
|
609
593
|
|
|
610
594
|
// src/Components/TableElement.tsx
|
|
611
|
-
var
|
|
595
|
+
var import_react20 = __toESM(require("react"));
|
|
612
596
|
var import_antd14 = require("antd");
|
|
613
597
|
|
|
614
598
|
// src/Components/Model.tsx
|
|
615
|
-
var
|
|
599
|
+
var import_react19 = __toESM(require("react"));
|
|
616
600
|
var import_antd13 = require("antd");
|
|
617
601
|
|
|
618
602
|
// src/Components/ModelBody.tsx
|
|
619
|
-
var
|
|
603
|
+
var import_react18 = __toESM(require("react"));
|
|
620
604
|
var ModelBody = (props) => {
|
|
621
|
-
return /* @__PURE__ */
|
|
605
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: props.modalContent && props.modalContent.className }, props.modalContent && props.modalContent.fields.map((eachField) => {
|
|
622
606
|
if (eachField.element === "div") {
|
|
623
|
-
return /* @__PURE__ */
|
|
607
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, eachField.label);
|
|
624
608
|
} else if (eachField.element === "input-radio") {
|
|
625
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react18.default.createElement(RadioElement, { ...eachField }));
|
|
626
610
|
} else if (eachField.element === "button") {
|
|
627
|
-
return /* @__PURE__ */
|
|
611
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react18.default.createElement(ButtonElement, { ...eachField }));
|
|
628
612
|
} else {
|
|
629
613
|
return null;
|
|
630
614
|
}
|
|
@@ -634,7 +618,7 @@ var ModelBody = (props) => {
|
|
|
634
618
|
// src/Components/Model.tsx
|
|
635
619
|
var ModelElement = (props) => {
|
|
636
620
|
const { model, onCancel, selectedRecord, columns } = props;
|
|
637
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
638
622
|
import_antd13.Modal,
|
|
639
623
|
{
|
|
640
624
|
centered: true,
|
|
@@ -642,7 +626,7 @@ var ModelElement = (props) => {
|
|
|
642
626
|
onCancel,
|
|
643
627
|
footer: null,
|
|
644
628
|
width: 850,
|
|
645
|
-
title: /* @__PURE__ */
|
|
629
|
+
title: /* @__PURE__ */ import_react19.default.createElement(
|
|
646
630
|
"div",
|
|
647
631
|
{
|
|
648
632
|
style: {
|
|
@@ -655,20 +639,22 @@ var ModelElement = (props) => {
|
|
|
655
639
|
},
|
|
656
640
|
Object.entries(selectedRecord).map(([key, value]) => {
|
|
657
641
|
const record = columns.filter((eachColumn) => eachColumn.key === key);
|
|
658
|
-
return record.length > 0 ? /* @__PURE__ */
|
|
642
|
+
return record.length > 0 ? /* @__PURE__ */ import_react19.default.createElement("p", { style: { fontWeight: "500", padding: "10px" }, key }, /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontWeight: "200", color: "gray", paddingRight: "10px" } }, record[0].title), String(value)) : "";
|
|
659
643
|
})
|
|
660
644
|
)
|
|
661
645
|
},
|
|
662
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ import_react19.default.createElement(ModelBody, { ...props })
|
|
663
647
|
);
|
|
664
648
|
};
|
|
665
649
|
|
|
666
650
|
// src/Components/TableElement.tsx
|
|
667
651
|
var TableElement = (props) => {
|
|
668
652
|
const { thead, tbody } = props;
|
|
669
|
-
const [selectedRecord, setSelectedRecord] = (0,
|
|
670
|
-
const [model, setModel] = (0,
|
|
653
|
+
const [selectedRecord, setSelectedRecord] = (0, import_react20.useState)({});
|
|
654
|
+
const [model, setModel] = (0, import_react20.useState)(false);
|
|
655
|
+
const [selectedRowKeys, setSelectedRowKeys] = (0, import_react20.useState)([]);
|
|
671
656
|
const handleChange = (record) => {
|
|
657
|
+
console.log("record", record);
|
|
672
658
|
if (props.onChange) {
|
|
673
659
|
props.onChange(record);
|
|
674
660
|
}
|
|
@@ -685,6 +671,7 @@ var TableElement = (props) => {
|
|
|
685
671
|
title: col.label,
|
|
686
672
|
dataIndex: col.name,
|
|
687
673
|
key: col.key,
|
|
674
|
+
render: col.render,
|
|
688
675
|
sorter: {
|
|
689
676
|
compare: (a, b) => {
|
|
690
677
|
if (typeof a[col.key] === "number" && typeof a[col.key] === "number") {
|
|
@@ -702,17 +689,32 @@ var TableElement = (props) => {
|
|
|
702
689
|
[columns[0].key]: index + 1
|
|
703
690
|
}));
|
|
704
691
|
const count = dataSource ? dataSource.length : 0;
|
|
705
|
-
|
|
692
|
+
const onChangePage = (page, pageSize) => {
|
|
693
|
+
if (props.onChange) {
|
|
694
|
+
props.onChange({ name: "pagination", page, pageSize });
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
const onSelectChange = (newSelectedRowKeys) => {
|
|
698
|
+
console.log("selectedRowKeys changed: ", newSelectedRowKeys);
|
|
699
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
700
|
+
};
|
|
701
|
+
const rowSelectionConfig = props.rowSelection ? {
|
|
702
|
+
selectedRowKeys,
|
|
703
|
+
onChange: onSelectChange
|
|
704
|
+
} : void 0;
|
|
705
|
+
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
706
706
|
import_antd14.Table,
|
|
707
707
|
{
|
|
708
708
|
pagination: {
|
|
709
709
|
showTotal: (total) => `Total: ${total} items`,
|
|
710
710
|
total: count,
|
|
711
|
-
showSizeChanger: count > 10
|
|
711
|
+
showSizeChanger: count > 10,
|
|
712
|
+
onChange: onChangePage
|
|
712
713
|
},
|
|
713
714
|
dataSource,
|
|
714
715
|
columns,
|
|
715
716
|
bordered: true,
|
|
717
|
+
rowSelection: rowSelectionConfig,
|
|
716
718
|
size: props.size && props.size,
|
|
717
719
|
onRow: (record) => {
|
|
718
720
|
return {
|
|
@@ -725,16 +727,16 @@ var TableElement = (props) => {
|
|
|
725
727
|
};
|
|
726
728
|
}
|
|
727
729
|
}
|
|
728
|
-
), model && /* @__PURE__ */
|
|
730
|
+
), model && /* @__PURE__ */ import_react20.default.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
729
731
|
};
|
|
730
732
|
|
|
731
733
|
// src/Components/DatePicker.tsx
|
|
732
|
-
var
|
|
734
|
+
var import_react21 = __toESM(require("react"));
|
|
733
735
|
var import_antd15 = require("antd");
|
|
734
736
|
var import_icons4 = require("@ant-design/icons");
|
|
735
737
|
var import_moment = __toESM(require("moment"));
|
|
736
738
|
var DatePickerElement = (props) => {
|
|
737
|
-
const [date, setDate] = (0,
|
|
739
|
+
const [date, setDate] = (0, import_react21.useState)(null);
|
|
738
740
|
const handleChange = (date2, dateString) => {
|
|
739
741
|
console.log("date---------", date2);
|
|
740
742
|
console.log("datestring", dateString);
|
|
@@ -769,7 +771,7 @@ var DatePickerElement = (props) => {
|
|
|
769
771
|
props.onChange(newDate.format("lll"));
|
|
770
772
|
}
|
|
771
773
|
};
|
|
772
|
-
return /* @__PURE__ */
|
|
774
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", null, /* @__PURE__ */ import_react21.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react21.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react21.default.createElement(
|
|
773
775
|
import_antd15.DatePicker,
|
|
774
776
|
{
|
|
775
777
|
placeholder: props.placeholder,
|
|
@@ -777,11 +779,11 @@ var DatePickerElement = (props) => {
|
|
|
777
779
|
variant: "borderless",
|
|
778
780
|
onChange: handleChange
|
|
779
781
|
}
|
|
780
|
-
), /* @__PURE__ */
|
|
782
|
+
), /* @__PURE__ */ import_react21.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react21.default.createElement(import_icons4.RightOutlined, null)));
|
|
781
783
|
};
|
|
782
784
|
|
|
783
785
|
// src/Components/DateRangePickerElement.tsx
|
|
784
|
-
var
|
|
786
|
+
var import_react22 = __toESM(require("react"));
|
|
785
787
|
var import_antd16 = require("antd");
|
|
786
788
|
var import_dayjs = __toESM(require("dayjs"));
|
|
787
789
|
var DateRangePickerElement = (props) => {
|
|
@@ -799,33 +801,127 @@ var DateRangePickerElement = (props) => {
|
|
|
799
801
|
{ label: "Last 30 Days", value: [(0, import_dayjs.default)().add(-30, "d"), (0, import_dayjs.default)()] },
|
|
800
802
|
{ label: "Last 90 Days", value: [(0, import_dayjs.default)().add(-90, "d"), (0, import_dayjs.default)()] }
|
|
801
803
|
];
|
|
802
|
-
return /* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ import_react22.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react22.default.createElement(RangePicker, { presets: rangePresets, onChange: handleChange }));
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
// src/Components/Image.tsx
|
|
808
|
+
var import_react23 = __toESM(require("react"));
|
|
809
|
+
var Image = (props) => {
|
|
810
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", null, /* @__PURE__ */ import_react23.default.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
803
811
|
};
|
|
804
812
|
|
|
805
|
-
// src/Components/
|
|
813
|
+
// src/Components/SingleCheckbox.tsx
|
|
806
814
|
var import_react24 = __toESM(require("react"));
|
|
807
|
-
var import_icons5 = require("@ant-design/icons");
|
|
808
815
|
var import_antd17 = require("antd");
|
|
809
|
-
var
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
headers: {
|
|
814
|
-
authorization: "authorization-text"
|
|
815
|
-
},
|
|
816
|
-
onChange(info) {
|
|
817
|
-
if (info.file.status !== "uploading") {
|
|
818
|
-
console.log(info.file, info.fileList);
|
|
816
|
+
var SingleCheckbox = (props) => {
|
|
817
|
+
const handleChange = (e) => {
|
|
818
|
+
if (props.onChange) {
|
|
819
|
+
props.onChange(e.target.checked);
|
|
819
820
|
}
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
821
|
+
};
|
|
822
|
+
return /* @__PURE__ */ import_react24.default.createElement(import_antd17.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
// src/Components/DropDownGroup.tsx
|
|
826
|
+
var import_react25 = __toESM(require("react"));
|
|
827
|
+
var import_antd18 = require("antd");
|
|
828
|
+
var DropDownGroup = (props) => {
|
|
829
|
+
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({ firstValue: {}, secondValue: {} });
|
|
830
|
+
const handleFirstChange = (value) => {
|
|
831
|
+
const filterOption2 = props.options?.find((eachOption) => eachOption.value === value);
|
|
832
|
+
setSelectedValue((prev) => {
|
|
833
|
+
const newValue = { ...prev, firstValue: filterOption2 };
|
|
834
|
+
if (newValue.firstValue) {
|
|
835
|
+
props.onChange?.(newValue);
|
|
836
|
+
}
|
|
837
|
+
return selectedValue;
|
|
838
|
+
});
|
|
839
|
+
};
|
|
840
|
+
const handleSecondChange = (value) => {
|
|
841
|
+
const filterOption2 = props.options?.find((eachOption) => eachOption.value === value);
|
|
842
|
+
setSelectedValue((prev) => {
|
|
843
|
+
const newValue = { ...prev, secondValue: filterOption2 };
|
|
844
|
+
if (newValue.secondValue) {
|
|
845
|
+
props.onChange?.(newValue);
|
|
846
|
+
}
|
|
847
|
+
return selectedValue;
|
|
848
|
+
});
|
|
849
|
+
};
|
|
850
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ import_react25.default.createElement(
|
|
851
|
+
import_antd18.Select,
|
|
852
|
+
{
|
|
853
|
+
onChange: handleFirstChange,
|
|
854
|
+
variant: props.variant,
|
|
855
|
+
options: props.options
|
|
824
856
|
}
|
|
825
|
-
}
|
|
857
|
+
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
858
|
+
import_antd18.Select,
|
|
859
|
+
{
|
|
860
|
+
onChange: handleSecondChange,
|
|
861
|
+
variant: props.variant,
|
|
862
|
+
options: props.options
|
|
863
|
+
}
|
|
864
|
+
));
|
|
826
865
|
};
|
|
827
|
-
|
|
828
|
-
|
|
866
|
+
|
|
867
|
+
// src/Components/FilesUpload.tsx
|
|
868
|
+
var import_react26 = __toESM(require("react"));
|
|
869
|
+
var import_antd19 = require("antd");
|
|
870
|
+
var import_icons5 = require("@ant-design/icons");
|
|
871
|
+
var FileUpload = (props) => {
|
|
872
|
+
const { Dragger } = import_antd19.Upload;
|
|
873
|
+
const [files, setFiles] = (0, import_react26.useState)([]);
|
|
874
|
+
const beforeUpload = (file) => {
|
|
875
|
+
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "application/pdf"].includes(file.type);
|
|
876
|
+
if (!isCorrectFile) {
|
|
877
|
+
import_antd19.message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg/.pdf)`);
|
|
878
|
+
return import_antd19.Upload.LIST_IGNORE;
|
|
879
|
+
}
|
|
880
|
+
return true;
|
|
881
|
+
};
|
|
882
|
+
const handleChange = ({ fileList }) => {
|
|
883
|
+
setFiles(fileList);
|
|
884
|
+
if (props.onChange) {
|
|
885
|
+
props.onChange({
|
|
886
|
+
name: props.name,
|
|
887
|
+
value: fileList
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
const customRequest = ({ file, onSuccess }) => {
|
|
892
|
+
setTimeout(() => {
|
|
893
|
+
onSuccess("ok");
|
|
894
|
+
}, 0);
|
|
895
|
+
};
|
|
896
|
+
return /* @__PURE__ */ import_react26.default.createElement("div", null, /* @__PURE__ */ import_react26.default.createElement(
|
|
897
|
+
Dragger,
|
|
898
|
+
{
|
|
899
|
+
action: "",
|
|
900
|
+
accept: props.accept,
|
|
901
|
+
listType: "picture",
|
|
902
|
+
maxCount: props.max_count,
|
|
903
|
+
multiple: props.multiple,
|
|
904
|
+
fileList: files,
|
|
905
|
+
beforeUpload,
|
|
906
|
+
onChange: handleChange,
|
|
907
|
+
showUploadList: true,
|
|
908
|
+
customRequest
|
|
909
|
+
},
|
|
910
|
+
/* @__PURE__ */ import_react26.default.createElement("p", null, /* @__PURE__ */ import_react26.default.createElement(import_icons5.InboxOutlined, null)),
|
|
911
|
+
/* @__PURE__ */ import_react26.default.createElement("p", null, "Click or drag file to upload")
|
|
912
|
+
));
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
// src/Components/TabsElement.tsx
|
|
916
|
+
var import_react27 = __toESM(require("react"));
|
|
917
|
+
var import_antd20 = require("antd");
|
|
918
|
+
var TabsElement = (props) => {
|
|
919
|
+
const handleChange = (key) => {
|
|
920
|
+
if (props.onChange) {
|
|
921
|
+
props.onChange(props.options?.find((eachOption) => eachOption.key === key));
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_antd20.Tabs, { className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
829
925
|
};
|
|
830
926
|
// Annotate the CommonJS export names for ESM import in node:
|
|
831
927
|
0 && (module.exports = {
|
|
@@ -835,6 +931,9 @@ var UploadElement = (props) => {
|
|
|
835
931
|
CkEditor,
|
|
836
932
|
DatePickerElement,
|
|
837
933
|
DateRangePickerElement,
|
|
934
|
+
DropDownGroup,
|
|
935
|
+
FileUpload,
|
|
936
|
+
Image,
|
|
838
937
|
MultipleSelectElement,
|
|
839
938
|
Navbar,
|
|
840
939
|
NumberElement,
|
|
@@ -842,9 +941,10 @@ var UploadElement = (props) => {
|
|
|
842
941
|
RadioElement,
|
|
843
942
|
SelectElement,
|
|
844
943
|
Sidebar,
|
|
944
|
+
SingleCheckbox,
|
|
845
945
|
SingleSelectElement,
|
|
846
946
|
TableElement,
|
|
947
|
+
TabsElement,
|
|
847
948
|
TextElement,
|
|
848
|
-
TextareaElement
|
|
849
|
-
UploadElement
|
|
949
|
+
TextareaElement
|
|
850
950
|
});
|