@apexcura/ui-components 0.0.13-Beta59 → 0.0.13-Beta6
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 +0 -4
- package/dist/index.d.mts +27 -17
- package/dist/index.d.ts +27 -17
- package/dist/index.js +163 -312
- package/dist/index.mjs +118 -264
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -36,8 +36,6 @@ __export(src_exports, {
|
|
|
36
36
|
CkEditor: () => CkEditor,
|
|
37
37
|
DatePickerElement: () => DatePickerElement,
|
|
38
38
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
39
|
-
Image: () => Image,
|
|
40
|
-
MultiSelect: () => MultiSelect,
|
|
41
39
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
42
40
|
Navbar: () => Navbar,
|
|
43
41
|
NumberElement: () => NumberElement,
|
|
@@ -45,7 +43,6 @@ __export(src_exports, {
|
|
|
45
43
|
RadioElement: () => RadioElement,
|
|
46
44
|
SelectElement: () => SelectElement,
|
|
47
45
|
Sidebar: () => Sidebar,
|
|
48
|
-
SingleCheckbox: () => SingleCheckbox,
|
|
49
46
|
SingleSelectElement: () => SingleSelectElement,
|
|
50
47
|
TableElement: () => TableElement,
|
|
51
48
|
TextElement: () => TextElement,
|
|
@@ -58,12 +55,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
58
55
|
var import_react = __toESM(require("react"));
|
|
59
56
|
var import_antd = require("antd");
|
|
60
57
|
var TextElement = (props) => {
|
|
61
|
-
|
|
62
|
-
if (props.onChange) {
|
|
63
|
-
props.onChange(e.target.value);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
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(
|
|
58
|
+
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(
|
|
67
59
|
import_antd.Input,
|
|
68
60
|
{
|
|
69
61
|
placeholder: props.placeholder,
|
|
@@ -79,9 +71,7 @@ var TextElement = (props) => {
|
|
|
79
71
|
className: props.className,
|
|
80
72
|
variant: props.variant,
|
|
81
73
|
name: props.name,
|
|
82
|
-
onChange: (e) =>
|
|
83
|
-
handleChange(e);
|
|
84
|
-
}
|
|
74
|
+
onChange: (e) => props.onChange(e.target.value)
|
|
85
75
|
}
|
|
86
76
|
));
|
|
87
77
|
};
|
|
@@ -90,46 +80,36 @@ var TextElement = (props) => {
|
|
|
90
80
|
var import_react2 = __toESM(require("react"));
|
|
91
81
|
var import_icons = require("@ant-design/icons");
|
|
92
82
|
var import_antd2 = require("antd");
|
|
93
|
-
var PasswordElement = (
|
|
83
|
+
var PasswordElement = ({ inputData }) => {
|
|
94
84
|
const [passwordVisible, setPasswordVisible] = (0, import_react2.useState)(false);
|
|
95
85
|
const handleVisibilityToggle = () => {
|
|
96
86
|
setPasswordVisible((prev) => !prev);
|
|
97
87
|
};
|
|
98
|
-
const handleChange = (e) => {
|
|
99
|
-
if (props.onChange) {
|
|
100
|
-
props.onChange(e.target.value);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
88
|
const renderVisibilityIcon = (visible) => visible ? /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeTwoTone, null) : /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeInvisibleOutlined, null);
|
|
104
|
-
|
|
89
|
+
const renderPasswordInput = () => /* @__PURE__ */ import_react2.default.createElement(
|
|
105
90
|
import_antd2.Input.Password,
|
|
106
91
|
{
|
|
107
|
-
placeholder:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
92
|
+
placeholder: inputData.placeholder,
|
|
93
|
+
id: inputData.id,
|
|
94
|
+
prefix: inputData.prefix,
|
|
95
|
+
addonBefore: inputData.addonBefore,
|
|
96
|
+
type: inputData.type,
|
|
113
97
|
iconRender: renderVisibilityIcon,
|
|
114
|
-
visibilityToggle: {
|
|
115
|
-
visible: passwordVisible,
|
|
116
|
-
onVisibleChange: handleVisibilityToggle
|
|
117
|
-
}
|
|
98
|
+
visibilityToggle: { visible: passwordVisible, onVisibleChange: handleVisibilityToggle }
|
|
118
99
|
}
|
|
119
|
-
)
|
|
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")));
|
|
120
102
|
};
|
|
121
103
|
|
|
122
104
|
// src/Components/NumberElement.tsx
|
|
123
105
|
var import_react3 = __toESM(require("react"));
|
|
124
106
|
var import_antd3 = require("antd");
|
|
125
107
|
var NumberElement = (props) => {
|
|
126
|
-
const
|
|
108
|
+
const handleInputChange = (e) => {
|
|
127
109
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
128
|
-
|
|
129
|
-
props.onChange(newValue);
|
|
130
|
-
}
|
|
110
|
+
props.onChange(newValue);
|
|
131
111
|
};
|
|
132
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
112
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
133
113
|
import_antd3.Input,
|
|
134
114
|
{
|
|
135
115
|
placeholder: props.placeholder,
|
|
@@ -144,11 +124,9 @@ var NumberElement = (props) => {
|
|
|
144
124
|
className: props.className,
|
|
145
125
|
variant: props.variant,
|
|
146
126
|
name: props.name,
|
|
147
|
-
onChange:
|
|
148
|
-
handleChange(e);
|
|
149
|
-
}
|
|
127
|
+
onChange: handleInputChange
|
|
150
128
|
}
|
|
151
|
-
)
|
|
129
|
+
);
|
|
152
130
|
};
|
|
153
131
|
|
|
154
132
|
// src/Components/TextareaElement.tsx
|
|
@@ -156,12 +134,7 @@ var import_react4 = __toESM(require("react"));
|
|
|
156
134
|
var import_antd4 = require("antd");
|
|
157
135
|
var { TextArea } = import_antd4.Input;
|
|
158
136
|
var TextareaElement = (props) => {
|
|
159
|
-
|
|
160
|
-
if (props.onChange) {
|
|
161
|
-
props.onChange(e.target.value);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
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(
|
|
137
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_antd4.Flex, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
165
138
|
TextArea,
|
|
166
139
|
{
|
|
167
140
|
placeholder: props.placeholder,
|
|
@@ -175,9 +148,7 @@ var TextareaElement = (props) => {
|
|
|
175
148
|
name: props.name,
|
|
176
149
|
showCount: true,
|
|
177
150
|
maxLength: props.maxLength,
|
|
178
|
-
onChange: (e) =>
|
|
179
|
-
handleChange(e);
|
|
180
|
-
}
|
|
151
|
+
onChange: (e) => props.onChange(e.target.value)
|
|
181
152
|
}
|
|
182
153
|
));
|
|
183
154
|
};
|
|
@@ -185,18 +156,24 @@ var TextareaElement = (props) => {
|
|
|
185
156
|
// src/Components/SelectElement.tsx
|
|
186
157
|
var import_react5 = __toESM(require("react"));
|
|
187
158
|
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
|
+
};
|
|
188
166
|
var SelectElement = (props) => {
|
|
189
167
|
const handleChange = (value) => {
|
|
190
|
-
console.log("sigleselectvalue----", value);
|
|
191
168
|
if (props.onChange) {
|
|
192
|
-
|
|
193
|
-
props.onChange(filterOption2);
|
|
169
|
+
props.onChange(value);
|
|
194
170
|
}
|
|
195
171
|
};
|
|
196
|
-
return /* @__PURE__ */ import_react5.default.createElement(
|
|
172
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
197
173
|
import_antd5.Select,
|
|
198
174
|
{
|
|
199
|
-
|
|
175
|
+
labelRender,
|
|
176
|
+
options: props.fieldNames,
|
|
200
177
|
placeholder: props.placeholder,
|
|
201
178
|
allowClear: true,
|
|
202
179
|
defaultValue: props.defaultValue,
|
|
@@ -208,7 +185,7 @@ var SelectElement = (props) => {
|
|
|
208
185
|
variant: props.variant,
|
|
209
186
|
onChange: handleChange
|
|
210
187
|
}
|
|
211
|
-
)
|
|
188
|
+
);
|
|
212
189
|
};
|
|
213
190
|
|
|
214
191
|
// src/Components/RadioElement.tsx
|
|
@@ -261,19 +238,22 @@ var RadioElement = (props) => {
|
|
|
261
238
|
var import_react7 = __toESM(require("react"));
|
|
262
239
|
var import_antd7 = require("antd");
|
|
263
240
|
var CheckboxGroup = import_antd7.Checkbox.Group;
|
|
241
|
+
var plainOptions = ["Apple", "Pear", "Orange"];
|
|
264
242
|
var defaultCheckedList = [];
|
|
265
243
|
var CheckboxElement = (props) => {
|
|
266
244
|
const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
|
|
267
|
-
const checkAll =
|
|
245
|
+
const checkAll = plainOptions.length === checkedList.length;
|
|
268
246
|
const handleChange = (list) => {
|
|
269
247
|
setCheckedList(list);
|
|
270
248
|
if (props.onChange) {
|
|
271
|
-
const selectedOptions =
|
|
249
|
+
const selectedOptions = list.map((value) => {
|
|
250
|
+
return { id: list.indexOf(value), value };
|
|
251
|
+
});
|
|
272
252
|
props.onChange(selectedOptions);
|
|
273
253
|
}
|
|
274
254
|
};
|
|
275
255
|
const onHandleAllChanges = (e) => {
|
|
276
|
-
const newList = e.target.checked ?
|
|
256
|
+
const newList = e.target.checked ? plainOptions : [];
|
|
277
257
|
setCheckedList(newList);
|
|
278
258
|
if (props.onChange) {
|
|
279
259
|
props.onChange(newList);
|
|
@@ -290,13 +270,13 @@ var CheckboxElement = (props) => {
|
|
|
290
270
|
checked: checkAll
|
|
291
271
|
},
|
|
292
272
|
"Check all"
|
|
293
|
-
), /* @__PURE__ */ import_react7.default.createElement(
|
|
273
|
+
), /* @__PURE__ */ import_react7.default.createElement(import_antd7.Divider, null), /* @__PURE__ */ import_react7.default.createElement(
|
|
294
274
|
CheckboxGroup,
|
|
295
275
|
{
|
|
296
276
|
disabled: props.disabled,
|
|
297
277
|
style: props.styles,
|
|
298
278
|
className: props.className,
|
|
299
|
-
options:
|
|
279
|
+
options: plainOptions,
|
|
300
280
|
value: checkedList,
|
|
301
281
|
onChange: handleChange
|
|
302
282
|
}
|
|
@@ -304,13 +284,59 @@ var CheckboxElement = (props) => {
|
|
|
304
284
|
};
|
|
305
285
|
|
|
306
286
|
// src/Components/CkEditor.tsx
|
|
307
|
-
var import_react8 =
|
|
287
|
+
var import_react8 = require("react");
|
|
288
|
+
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
289
|
+
var import_react9 = __toESM(require("react"));
|
|
308
290
|
var CkEditor = (props) => {
|
|
309
|
-
|
|
291
|
+
const editorRef = (0, import_react8.useRef)(null);
|
|
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"));
|
|
310
336
|
};
|
|
311
337
|
|
|
312
338
|
// src/Components/Select/SingleSelectElement.tsx
|
|
313
|
-
var
|
|
339
|
+
var import_react10 = __toESM(require("react"));
|
|
314
340
|
var import_antd8 = require("antd");
|
|
315
341
|
var onSearch = (value) => {
|
|
316
342
|
console.log("search:", value);
|
|
@@ -319,14 +345,12 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
319
345
|
var SingleSelectElement = (props) => {
|
|
320
346
|
const handleChange = (values) => {
|
|
321
347
|
if (props.onChange) {
|
|
322
|
-
const option = props.dropDownOptions?.find(
|
|
323
|
-
(option2) => String(option2.title) === values
|
|
324
|
-
);
|
|
348
|
+
const option = props.dropDownOptions?.find((option2) => String(option2.title) === values);
|
|
325
349
|
const selectedOption = { id: option?.id, value: values };
|
|
326
350
|
props.onChange([selectedOption]);
|
|
327
351
|
}
|
|
328
352
|
};
|
|
329
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
330
354
|
import_antd8.Select,
|
|
331
355
|
{
|
|
332
356
|
showSearch: true,
|
|
@@ -335,17 +359,13 @@ var SingleSelectElement = (props) => {
|
|
|
335
359
|
onChange: handleChange,
|
|
336
360
|
onSearch,
|
|
337
361
|
filterOption,
|
|
338
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
339
|
-
label: String(eachOption.title),
|
|
340
|
-
value: String(eachOption.title),
|
|
341
|
-
id: String(eachOption.id)
|
|
342
|
-
}))
|
|
362
|
+
options: props.dropDownOptions?.map((eachOption) => ({ label: String(eachOption.title), value: String(eachOption.title), id: String(eachOption.id) }))
|
|
343
363
|
}
|
|
344
364
|
);
|
|
345
365
|
};
|
|
346
366
|
|
|
347
367
|
// src/Components/Select/MultipleSelectElement.tsx
|
|
348
|
-
var
|
|
368
|
+
var import_react11 = __toESM(require("react"));
|
|
349
369
|
var import_antd9 = require("antd");
|
|
350
370
|
var MultipleSelectElement = (props) => {
|
|
351
371
|
const handleChange = (values) => {
|
|
@@ -357,7 +377,7 @@ var MultipleSelectElement = (props) => {
|
|
|
357
377
|
props.onChange(selectedOptions);
|
|
358
378
|
}
|
|
359
379
|
};
|
|
360
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
361
381
|
import_antd9.Select,
|
|
362
382
|
{
|
|
363
383
|
mode: "multiple",
|
|
@@ -369,26 +389,26 @@ var MultipleSelectElement = (props) => {
|
|
|
369
389
|
};
|
|
370
390
|
|
|
371
391
|
// src/Components/Button.tsx
|
|
372
|
-
var
|
|
392
|
+
var import_react12 = __toESM(require("react"));
|
|
373
393
|
var ButtonElement = (props) => {
|
|
374
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
375
395
|
"button",
|
|
376
396
|
{
|
|
377
397
|
onClick: () => props.onClick && props.onClick(),
|
|
378
398
|
className: `${props.className ? props.className : ""}`
|
|
379
399
|
},
|
|
380
|
-
props.icon && /* @__PURE__ */
|
|
400
|
+
props.icon && /* @__PURE__ */ import_react12.default.createElement("img", { src: props.icon }),
|
|
381
401
|
props.label
|
|
382
402
|
);
|
|
383
403
|
};
|
|
384
404
|
|
|
385
405
|
// src/Components/AddMoreTable.tsx
|
|
386
|
-
var
|
|
406
|
+
var import_react13 = __toESM(require("react"));
|
|
387
407
|
var import_antd10 = require("antd");
|
|
388
408
|
var import_icons2 = require("@ant-design/icons");
|
|
389
409
|
var AddMoreTable = (props) => {
|
|
390
410
|
const { thead, tbody } = props;
|
|
391
|
-
const [rows, setRows] = (0,
|
|
411
|
+
const [rows, setRows] = (0, import_react13.useState)(tbody || []);
|
|
392
412
|
const onHandleRows = () => {
|
|
393
413
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
394
414
|
let newRow = {
|
|
@@ -453,16 +473,16 @@ var AddMoreTable = (props) => {
|
|
|
453
473
|
});
|
|
454
474
|
});
|
|
455
475
|
};
|
|
456
|
-
(0,
|
|
476
|
+
(0, import_react13.useEffect)(() => {
|
|
457
477
|
console.log(rows);
|
|
458
478
|
}, [rows]);
|
|
459
479
|
const renderInputElement = (element, value) => {
|
|
460
480
|
if (!element) return null;
|
|
461
481
|
const { element: type, label } = element;
|
|
462
482
|
if (type === "single-select") {
|
|
463
|
-
return /* @__PURE__ */
|
|
483
|
+
return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
464
484
|
} else if (type === "textarea") {
|
|
465
|
-
return /* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
466
486
|
} else {
|
|
467
487
|
return null;
|
|
468
488
|
}
|
|
@@ -479,13 +499,13 @@ var AddMoreTable = (props) => {
|
|
|
479
499
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
480
500
|
Object.keys(variable).forEach((key) => {
|
|
481
501
|
if (key === "SubRows") {
|
|
482
|
-
rowData[`${key}`] = /* @__PURE__ */
|
|
502
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
483
503
|
} else {
|
|
484
504
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
485
505
|
}
|
|
486
506
|
});
|
|
487
507
|
});
|
|
488
|
-
rowData.actions = /* @__PURE__ */
|
|
508
|
+
rowData.actions = /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
489
509
|
console.log("=====rowdata", rowData);
|
|
490
510
|
return rowData;
|
|
491
511
|
});
|
|
@@ -501,7 +521,7 @@ var AddMoreTable = (props) => {
|
|
|
501
521
|
key: "actions"
|
|
502
522
|
});
|
|
503
523
|
}
|
|
504
|
-
return /* @__PURE__ */
|
|
524
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
505
525
|
import_antd10.Table,
|
|
506
526
|
{
|
|
507
527
|
columns,
|
|
@@ -513,44 +533,44 @@ var AddMoreTable = (props) => {
|
|
|
513
533
|
};
|
|
514
534
|
|
|
515
535
|
// src/Components/Sidebar.tsx
|
|
516
|
-
var
|
|
536
|
+
var import_react14 = __toESM(require("react"));
|
|
517
537
|
var Sidebar = (props) => {
|
|
518
538
|
const handleChange = (item) => {
|
|
519
539
|
if (props.onChange) {
|
|
520
540
|
props.onChange(item);
|
|
521
541
|
}
|
|
522
542
|
};
|
|
523
|
-
return /* @__PURE__ */
|
|
524
|
-
return /* @__PURE__ */
|
|
543
|
+
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) => {
|
|
544
|
+
return /* @__PURE__ */ import_react14.default.createElement("li", { onClick: () => {
|
|
525
545
|
handleChange(item);
|
|
526
|
-
}, key: item.label, className: `${props.listItemClassName} ${item.active && props.activeClassName}` }, /* @__PURE__ */
|
|
546
|
+
}, 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));
|
|
527
547
|
})));
|
|
528
548
|
};
|
|
529
549
|
|
|
530
550
|
// src/Components/Navbar.tsx
|
|
531
|
-
var
|
|
551
|
+
var import_react18 = __toESM(require("react"));
|
|
532
552
|
|
|
533
553
|
// src/Components/Notification.tsx
|
|
534
|
-
var
|
|
554
|
+
var import_react15 = __toESM(require("react"));
|
|
535
555
|
var import_antd11 = require("antd");
|
|
536
556
|
var import_io = require("react-icons/io");
|
|
537
557
|
var popoverContentStyle = {
|
|
538
558
|
minWidth: "300px",
|
|
539
559
|
maxWidth: "100%"
|
|
540
560
|
};
|
|
541
|
-
var Notification = (props) => /* @__PURE__ */
|
|
561
|
+
var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
|
|
542
562
|
import_antd11.Popover,
|
|
543
563
|
{
|
|
544
564
|
className: props.className,
|
|
545
|
-
content: /* @__PURE__ */
|
|
565
|
+
content: /* @__PURE__ */ import_react15.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react15.default.createElement(
|
|
546
566
|
import_antd11.List,
|
|
547
567
|
{
|
|
548
568
|
itemLayout: "horizontal",
|
|
549
569
|
dataSource: props.items,
|
|
550
|
-
renderItem: (item, index) => /* @__PURE__ */
|
|
570
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react15.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react15.default.createElement(
|
|
551
571
|
import_antd11.List.Item.Meta,
|
|
552
572
|
{
|
|
553
|
-
avatar: /* @__PURE__ */
|
|
573
|
+
avatar: /* @__PURE__ */ import_react15.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
554
574
|
title: item.text,
|
|
555
575
|
description: item.time
|
|
556
576
|
}
|
|
@@ -560,51 +580,51 @@ var Notification = (props) => /* @__PURE__ */ import_react14.default.createEleme
|
|
|
560
580
|
trigger: "focus",
|
|
561
581
|
placement: "bottomRight"
|
|
562
582
|
},
|
|
563
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ import_react15.default.createElement(import_antd11.Button, { className: props.buttonClassName }, /* @__PURE__ */ import_react15.default.createElement(import_antd11.Badge, { size: "small", count: props.count }, /* @__PURE__ */ import_react15.default.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ import_react15.default.createElement(import_io.IoIosNotifications, null))))
|
|
564
584
|
);
|
|
565
585
|
|
|
566
586
|
// src/Components/SpanElement.tsx
|
|
567
|
-
var
|
|
568
|
-
var SpanElement = (props) => /* @__PURE__ */
|
|
587
|
+
var import_react16 = __toESM(require("react"));
|
|
588
|
+
var SpanElement = (props) => /* @__PURE__ */ import_react16.default.createElement("span", { className: props.className }, props.label);
|
|
569
589
|
|
|
570
590
|
// src/Components/Profile.tsx
|
|
571
|
-
var
|
|
591
|
+
var import_react17 = __toESM(require("react"));
|
|
572
592
|
var import_antd12 = require("antd");
|
|
573
593
|
var import_icons3 = require("@ant-design/icons");
|
|
574
|
-
var Profile = (props) => /* @__PURE__ */
|
|
594
|
+
var Profile = (props) => /* @__PURE__ */ import_react17.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react17.default.createElement(import_antd12.Avatar, { style: { backgroundColor: "#87d068", marginRight: "10px" }, icon: /* @__PURE__ */ import_react17.default.createElement(import_icons3.UserOutlined, null) }), /* @__PURE__ */ import_react17.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react17.default.createElement("p", null, props.primaryText), /* @__PURE__ */ import_react17.default.createElement("p", { className: props.secondTextClassName }, " ", props.secondaryText)));
|
|
575
595
|
|
|
576
596
|
// src/Components/Navbar.tsx
|
|
577
597
|
var Navbar = (props) => {
|
|
578
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: `${props.className}`, key: props.name }, props.items && props.items.map((item) => {
|
|
579
599
|
if (item.element === "span") {
|
|
580
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ import_react18.default.createElement(SpanElement, { ...item });
|
|
581
601
|
} else if (item.element === "notifications") {
|
|
582
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ import_react18.default.createElement(Notification, { ...item });
|
|
583
603
|
} else if (item.name === "profile") {
|
|
584
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ import_react18.default.createElement(Profile, { ...item });
|
|
585
605
|
}
|
|
586
606
|
return null;
|
|
587
607
|
}));
|
|
588
608
|
};
|
|
589
609
|
|
|
590
610
|
// src/Components/TableElement.tsx
|
|
591
|
-
var
|
|
611
|
+
var import_react21 = __toESM(require("react"));
|
|
592
612
|
var import_antd14 = require("antd");
|
|
593
613
|
|
|
594
614
|
// src/Components/Model.tsx
|
|
595
|
-
var
|
|
615
|
+
var import_react20 = __toESM(require("react"));
|
|
596
616
|
var import_antd13 = require("antd");
|
|
597
617
|
|
|
598
618
|
// src/Components/ModelBody.tsx
|
|
599
|
-
var
|
|
619
|
+
var import_react19 = __toESM(require("react"));
|
|
600
620
|
var ModelBody = (props) => {
|
|
601
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: props.modalContent && props.modalContent.className }, props.modalContent && props.modalContent.fields.map((eachField) => {
|
|
602
622
|
if (eachField.element === "div") {
|
|
603
|
-
return /* @__PURE__ */
|
|
623
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: eachField.className }, eachField.label);
|
|
604
624
|
} else if (eachField.element === "input-radio") {
|
|
605
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react19.default.createElement(RadioElement, { ...eachField }));
|
|
606
626
|
} else if (eachField.element === "button") {
|
|
607
|
-
return /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react19.default.createElement(ButtonElement, { ...eachField }));
|
|
608
628
|
} else {
|
|
609
629
|
return null;
|
|
610
630
|
}
|
|
@@ -614,7 +634,7 @@ var ModelBody = (props) => {
|
|
|
614
634
|
// src/Components/Model.tsx
|
|
615
635
|
var ModelElement = (props) => {
|
|
616
636
|
const { model, onCancel, selectedRecord, columns } = props;
|
|
617
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
618
638
|
import_antd13.Modal,
|
|
619
639
|
{
|
|
620
640
|
centered: true,
|
|
@@ -622,7 +642,7 @@ var ModelElement = (props) => {
|
|
|
622
642
|
onCancel,
|
|
623
643
|
footer: null,
|
|
624
644
|
width: 850,
|
|
625
|
-
title: /* @__PURE__ */
|
|
645
|
+
title: /* @__PURE__ */ import_react20.default.createElement(
|
|
626
646
|
"div",
|
|
627
647
|
{
|
|
628
648
|
style: {
|
|
@@ -635,19 +655,19 @@ var ModelElement = (props) => {
|
|
|
635
655
|
},
|
|
636
656
|
Object.entries(selectedRecord).map(([key, value]) => {
|
|
637
657
|
const record = columns.filter((eachColumn) => eachColumn.key === key);
|
|
638
|
-
return record.length > 0 ? /* @__PURE__ */
|
|
658
|
+
return record.length > 0 ? /* @__PURE__ */ import_react20.default.createElement("p", { style: { fontWeight: "500", padding: "10px" }, key }, /* @__PURE__ */ import_react20.default.createElement("span", { style: { fontWeight: "200", color: "gray", paddingRight: "10px" } }, record[0].title), String(value)) : "";
|
|
639
659
|
})
|
|
640
660
|
)
|
|
641
661
|
},
|
|
642
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ import_react20.default.createElement(ModelBody, { ...props })
|
|
643
663
|
);
|
|
644
664
|
};
|
|
645
665
|
|
|
646
666
|
// src/Components/TableElement.tsx
|
|
647
667
|
var TableElement = (props) => {
|
|
648
668
|
const { thead, tbody } = props;
|
|
649
|
-
const [selectedRecord, setSelectedRecord] = (0,
|
|
650
|
-
const [model, setModel] = (0,
|
|
669
|
+
const [selectedRecord, setSelectedRecord] = (0, import_react21.useState)({});
|
|
670
|
+
const [model, setModel] = (0, import_react21.useState)(false);
|
|
651
671
|
const handleChange = (record) => {
|
|
652
672
|
if (props.onChange) {
|
|
653
673
|
props.onChange(record);
|
|
@@ -682,7 +702,7 @@ var TableElement = (props) => {
|
|
|
682
702
|
[columns[0].key]: index + 1
|
|
683
703
|
}));
|
|
684
704
|
const count = dataSource ? dataSource.length : 0;
|
|
685
|
-
return /* @__PURE__ */
|
|
705
|
+
return /* @__PURE__ */ import_react21.default.createElement(import_react21.default.Fragment, null, /* @__PURE__ */ import_react21.default.createElement(
|
|
686
706
|
import_antd14.Table,
|
|
687
707
|
{
|
|
688
708
|
pagination: {
|
|
@@ -705,16 +725,16 @@ var TableElement = (props) => {
|
|
|
705
725
|
};
|
|
706
726
|
}
|
|
707
727
|
}
|
|
708
|
-
), model && /* @__PURE__ */
|
|
728
|
+
), model && /* @__PURE__ */ import_react21.default.createElement(ModelElement, { selectedRecord, ...props, columns, model, onCancel: () => setModel(false) }));
|
|
709
729
|
};
|
|
710
730
|
|
|
711
731
|
// src/Components/DatePicker.tsx
|
|
712
|
-
var
|
|
732
|
+
var import_react22 = __toESM(require("react"));
|
|
713
733
|
var import_antd15 = require("antd");
|
|
714
734
|
var import_icons4 = require("@ant-design/icons");
|
|
715
735
|
var import_moment = __toESM(require("moment"));
|
|
716
736
|
var DatePickerElement = (props) => {
|
|
717
|
-
const [date, setDate] = (0,
|
|
737
|
+
const [date, setDate] = (0, import_react22.useState)(null);
|
|
718
738
|
const handleChange = (date2, dateString) => {
|
|
719
739
|
console.log("date---------", date2);
|
|
720
740
|
console.log("datestring", dateString);
|
|
@@ -749,7 +769,7 @@ var DatePickerElement = (props) => {
|
|
|
749
769
|
props.onChange(newDate.format("lll"));
|
|
750
770
|
}
|
|
751
771
|
};
|
|
752
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", null, /* @__PURE__ */ import_react22.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react22.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react22.default.createElement(
|
|
753
773
|
import_antd15.DatePicker,
|
|
754
774
|
{
|
|
755
775
|
placeholder: props.placeholder,
|
|
@@ -757,11 +777,11 @@ var DatePickerElement = (props) => {
|
|
|
757
777
|
variant: "borderless",
|
|
758
778
|
onChange: handleChange
|
|
759
779
|
}
|
|
760
|
-
), /* @__PURE__ */
|
|
780
|
+
), /* @__PURE__ */ import_react22.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react22.default.createElement(import_icons4.RightOutlined, null)));
|
|
761
781
|
};
|
|
762
782
|
|
|
763
783
|
// src/Components/DateRangePickerElement.tsx
|
|
764
|
-
var
|
|
784
|
+
var import_react23 = __toESM(require("react"));
|
|
765
785
|
var import_antd16 = require("antd");
|
|
766
786
|
var import_dayjs = __toESM(require("dayjs"));
|
|
767
787
|
var DateRangePickerElement = (props) => {
|
|
@@ -779,199 +799,33 @@ var DateRangePickerElement = (props) => {
|
|
|
779
799
|
{ label: "Last 30 Days", value: [(0, import_dayjs.default)().add(-30, "d"), (0, import_dayjs.default)()] },
|
|
780
800
|
{ label: "Last 90 Days", value: [(0, import_dayjs.default)().add(-90, "d"), (0, import_dayjs.default)()] }
|
|
781
801
|
];
|
|
782
|
-
return /* @__PURE__ */
|
|
802
|
+
return /* @__PURE__ */ import_react23.default.createElement(import_antd16.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react23.default.createElement(RangePicker, { presets: rangePresets, onChange: handleChange }));
|
|
783
803
|
};
|
|
784
804
|
|
|
785
805
|
// src/Components/UploadElement.tsx
|
|
786
|
-
var
|
|
787
|
-
var import_antd17 = require("antd");
|
|
806
|
+
var import_react24 = __toESM(require("react"));
|
|
788
807
|
var import_icons5 = require("@ant-design/icons");
|
|
789
|
-
var
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
selectedFile.type
|
|
801
|
-
);
|
|
802
|
-
if (!isCorrectFile) {
|
|
803
|
-
import_antd17.Modal.error({
|
|
804
|
-
title: `(${selectedFile.name}) is an invalid file.`,
|
|
805
|
-
content: `Please upload files with the following extensions only (.png/.jpg/.jpeg)`,
|
|
806
|
-
zIndex: 1022
|
|
807
|
-
});
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
const newFile = {
|
|
811
|
-
uid: `id${Math.random().toString(16).slice(2)}`,
|
|
812
|
-
name: selectedFile.name,
|
|
813
|
-
status: "done",
|
|
814
|
-
type: selectedFile.type,
|
|
815
|
-
size: selectedFile.size,
|
|
816
|
-
url: URL.createObjectURL(selectedFile),
|
|
817
|
-
originFileObj: selectedFile
|
|
818
|
-
};
|
|
819
|
-
const reader = new FileReader();
|
|
820
|
-
reader.onload = (e) => {
|
|
821
|
-
if (e.target?.result) {
|
|
822
|
-
newFile.thumbUrl = e.target.result.toString();
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
reader.readAsDataURL(selectedFile);
|
|
826
|
-
newFileList.push(newFile);
|
|
827
|
-
}
|
|
828
|
-
props.onChange && props.onChange({
|
|
829
|
-
name: props.name,
|
|
830
|
-
value: newFileList
|
|
831
|
-
});
|
|
832
|
-
};
|
|
833
|
-
const uploadChange2 = ({ file, fileList }) => {
|
|
834
|
-
const newFileList = fileList.filter((f) => f.name !== file.name);
|
|
835
|
-
props.onChange && props.onChange({
|
|
836
|
-
name: props.name,
|
|
837
|
-
value: newFileList
|
|
838
|
-
});
|
|
839
|
-
};
|
|
840
|
-
const handlePreview = async (file) => {
|
|
841
|
-
if (!file.url && !file.preview) {
|
|
842
|
-
file.preview = await URL.createObjectURL(file.originFileObj);
|
|
808
|
+
var import_antd17 = require("antd");
|
|
809
|
+
var uploadProps = {
|
|
810
|
+
name: "file",
|
|
811
|
+
multiple: true,
|
|
812
|
+
action: "https://660d2bd96ddfa2943b33731c.mockapi.io/api/upload",
|
|
813
|
+
headers: {
|
|
814
|
+
authorization: "authorization-text"
|
|
815
|
+
},
|
|
816
|
+
onChange(info) {
|
|
817
|
+
if (info.file.status !== "uploading") {
|
|
818
|
+
console.log(info.file, info.fileList);
|
|
843
819
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
setPreviewTitle(
|
|
849
|
-
file.name || (file.url || "").substring((file.url || "").lastIndexOf("/") + 1)
|
|
850
|
-
);
|
|
851
|
-
setPreviewOpen(true);
|
|
852
|
-
};
|
|
853
|
-
const handleCancel = () => {
|
|
854
|
-
setPreviewImage(null);
|
|
855
|
-
setPreviewType(null);
|
|
856
|
-
setPreviewOpen(false);
|
|
857
|
-
setPreviewTitle(null);
|
|
858
|
-
};
|
|
859
|
-
return /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement("span", { className: "native-camera-lib" }, /* @__PURE__ */ import_react23.default.createElement("p", { className: "flat-label text-capitalize" }, props.label), /* @__PURE__ */ import_react23.default.createElement("label", { className: "native-camera-button" }, /* @__PURE__ */ import_react23.default.createElement("div", { className: "ant-btn" }, /* @__PURE__ */ import_react23.default.createElement(import_icons5.UploadOutlined, null), " ", props.max_count ? `Upload (Max:${props.max_count})` : "Upload"), /* @__PURE__ */ import_react23.default.createElement(
|
|
860
|
-
"input",
|
|
861
|
-
{
|
|
862
|
-
id: "upload",
|
|
863
|
-
type: "file",
|
|
864
|
-
accept: "image/*;capture=camera",
|
|
865
|
-
multiple: true,
|
|
866
|
-
onChange: (e) => uploadChange(e.target.files)
|
|
820
|
+
if (info.file.status === "done") {
|
|
821
|
+
import_antd17.message.success(`${info.file.name} file uploaded successfully`);
|
|
822
|
+
} else if (info.file.status === "error") {
|
|
823
|
+
import_antd17.message.error(`${info.file.name} file upload failed.`);
|
|
867
824
|
}
|
|
868
|
-
|
|
869
|
-
import_antd17.Upload,
|
|
870
|
-
{
|
|
871
|
-
accept: props.accept,
|
|
872
|
-
listType: props.list_type,
|
|
873
|
-
maxCount: props.max_count,
|
|
874
|
-
multiple: true,
|
|
875
|
-
onChange: uploadChange2,
|
|
876
|
-
onPreview: handlePreview,
|
|
877
|
-
showUploadList: true
|
|
878
|
-
},
|
|
879
|
-
props.list_type === "picture-card" && /* @__PURE__ */ import_react23.default.createElement("div", null, /* @__PURE__ */ import_react23.default.createElement(import_icons5.PlusOutlined, null), /* @__PURE__ */ import_react23.default.createElement("div", { style: { marginTop: 8 } }, "Upload ", /* @__PURE__ */ import_react23.default.createElement("small", { className: "d-flex" }, "(Max:", props.max_count, ")"))),
|
|
880
|
-
props.list_type === "picture" && /* @__PURE__ */ import_react23.default.createElement(import_antd17.Button, { icon: /* @__PURE__ */ import_react23.default.createElement(import_icons5.UploadOutlined, null) }, props.feildData.max_count ? `Upload (Max:${props.max_count})` : "Upload")
|
|
881
|
-
), props.errors && props.errors.length > 0 && props.errors.map(
|
|
882
|
-
(error, eKey) => /* @__PURE__ */ import_react23.default.createElement("small", { key: eKey, className: "text-danger animated flash" }, error.message)
|
|
883
|
-
), /* @__PURE__ */ import_react23.default.createElement(
|
|
884
|
-
import_antd17.Modal,
|
|
885
|
-
{
|
|
886
|
-
open: previewOpen,
|
|
887
|
-
width: "100%",
|
|
888
|
-
zIndex: 1025,
|
|
889
|
-
centered: true,
|
|
890
|
-
maskClosable: false,
|
|
891
|
-
title: previewTitle,
|
|
892
|
-
footer: null,
|
|
893
|
-
onCancel: handleCancel,
|
|
894
|
-
destroyOnClose: true
|
|
895
|
-
},
|
|
896
|
-
/* @__PURE__ */ import_react23.default.createElement(import_antd17.Tooltip, { title: "Close", placement: "bottom" }, /* @__PURE__ */ import_react23.default.createElement(
|
|
897
|
-
import_icons5.CloseOutlined,
|
|
898
|
-
{
|
|
899
|
-
className: "border popup-close",
|
|
900
|
-
onClick: handleCancel
|
|
901
|
-
}
|
|
902
|
-
)),
|
|
903
|
-
previewType === "application/pdf" || previewType === "pdf" ? /* @__PURE__ */ import_react23.default.createElement(
|
|
904
|
-
"iframe",
|
|
905
|
-
{
|
|
906
|
-
title: "document",
|
|
907
|
-
style: { width: "95vw", height: "40vw" },
|
|
908
|
-
src: `${previewImage}#toolbar=0`
|
|
909
|
-
}
|
|
910
|
-
) : /* @__PURE__ */ import_react23.default.createElement(
|
|
911
|
-
"img",
|
|
912
|
-
{
|
|
913
|
-
alt: "image",
|
|
914
|
-
src: previewImage || void 0,
|
|
915
|
-
className: "d-flex mx-auto w-100"
|
|
916
|
-
}
|
|
917
|
-
)
|
|
918
|
-
)));
|
|
919
|
-
};
|
|
920
|
-
|
|
921
|
-
// src/Components/Image.tsx
|
|
922
|
-
var import_react24 = __toESM(require("react"));
|
|
923
|
-
var Image = (props) => {
|
|
924
|
-
return /* @__PURE__ */ import_react24.default.createElement("div", null, /* @__PURE__ */ import_react24.default.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
925
|
-
};
|
|
926
|
-
|
|
927
|
-
// src/Components/SingleCheckbox.tsx
|
|
928
|
-
var import_react25 = __toESM(require("react"));
|
|
929
|
-
var import_antd18 = require("antd");
|
|
930
|
-
var SingleCheckbox = (props) => {
|
|
931
|
-
const handleChange = (e) => {
|
|
932
|
-
if (props.onChange) {
|
|
933
|
-
props.onChange(e.target.checked);
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
return /* @__PURE__ */ import_react25.default.createElement(import_antd18.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
825
|
+
}
|
|
937
826
|
};
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
var import_react26 = __toESM(require("react"));
|
|
941
|
-
var import_antd19 = require("antd");
|
|
942
|
-
var MultiSelect = (props) => {
|
|
943
|
-
const [selectedValue, setSelectedValue] = (0, import_react26.useState)({ firstValue: {}, secondValue: {} });
|
|
944
|
-
const handleFirstChange = (value) => {
|
|
945
|
-
if (props.onChange) {
|
|
946
|
-
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
947
|
-
console.log("filterOption1--------", filterOption2);
|
|
948
|
-
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 && filterOption2 }));
|
|
949
|
-
props.onChange(selectedValue.firstValue && selectedValue);
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
const handleSecondChange = (value) => {
|
|
953
|
-
if (props.onChange) {
|
|
954
|
-
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
955
|
-
console.log("filterOption2--------", filterOption2);
|
|
956
|
-
setSelectedValue((prev) => ({ ...prev, secondValue: filterOption2 && filterOption2 }));
|
|
957
|
-
props.onChange(selectedValue.secondValue && selectedValue);
|
|
958
|
-
}
|
|
959
|
-
};
|
|
960
|
-
return /* @__PURE__ */ import_react26.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "100px" } }, /* @__PURE__ */ import_react26.default.createElement(
|
|
961
|
-
import_antd19.Select,
|
|
962
|
-
{
|
|
963
|
-
onChange: handleFirstChange,
|
|
964
|
-
variant: props.variant,
|
|
965
|
-
options: props.options
|
|
966
|
-
}
|
|
967
|
-
), /* @__PURE__ */ import_react26.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react26.default.createElement(
|
|
968
|
-
import_antd19.Select,
|
|
969
|
-
{
|
|
970
|
-
onChange: handleSecondChange,
|
|
971
|
-
variant: props.variant,
|
|
972
|
-
options: props.options
|
|
973
|
-
}
|
|
974
|
-
));
|
|
827
|
+
var UploadElement = (props) => {
|
|
828
|
+
return /* @__PURE__ */ import_react24.default.createElement(import_antd17.Upload, { ...uploadProps }, /* @__PURE__ */ import_react24.default.createElement(import_antd17.Button, { icon: /* @__PURE__ */ import_react24.default.createElement(import_icons5.UploadOutlined, null) }, "Click to Upload"));
|
|
975
829
|
};
|
|
976
830
|
// Annotate the CommonJS export names for ESM import in node:
|
|
977
831
|
0 && (module.exports = {
|
|
@@ -981,8 +835,6 @@ var MultiSelect = (props) => {
|
|
|
981
835
|
CkEditor,
|
|
982
836
|
DatePickerElement,
|
|
983
837
|
DateRangePickerElement,
|
|
984
|
-
Image,
|
|
985
|
-
MultiSelect,
|
|
986
838
|
MultipleSelectElement,
|
|
987
839
|
Navbar,
|
|
988
840
|
NumberElement,
|
|
@@ -990,7 +842,6 @@ var MultiSelect = (props) => {
|
|
|
990
842
|
RadioElement,
|
|
991
843
|
SelectElement,
|
|
992
844
|
Sidebar,
|
|
993
|
-
SingleCheckbox,
|
|
994
845
|
SingleSelectElement,
|
|
995
846
|
TableElement,
|
|
996
847
|
TextElement,
|