@apexcura/ui-components 0.0.12-Beta10 → 0.0.12-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.css +465 -0
- package/dist/index.d.mts +42 -9
- package/dist/index.d.ts +42 -9
- package/dist/index.js +272 -65
- package/dist/index.mjs +275 -72
- package/package.json +10 -3
- package/postcss.config.js +6 -0
- package/tailwind.config.js +10 -0
package/dist/index.js
CHANGED
|
@@ -34,12 +34,16 @@ __export(src_exports, {
|
|
|
34
34
|
ButtonElement: () => ButtonElement,
|
|
35
35
|
CheckboxElement: () => CheckboxElement,
|
|
36
36
|
CkEditor: () => CkEditor,
|
|
37
|
+
DatePickerElement: () => DatePickerElement,
|
|
37
38
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
39
|
+
Navbar: () => Navbar,
|
|
38
40
|
NumberElement: () => NumberElement,
|
|
39
41
|
PasswordElement: () => PasswordElement,
|
|
40
42
|
RadioElement: () => RadioElement,
|
|
41
43
|
SelectElement: () => SelectElement,
|
|
44
|
+
Sidebar: () => Sidebar,
|
|
42
45
|
SingleSelectElement: () => SingleSelectElement,
|
|
46
|
+
TableElement: () => TableElement,
|
|
43
47
|
TextElement: () => TextElement,
|
|
44
48
|
TextareaElement: () => TextareaElement
|
|
45
49
|
});
|
|
@@ -62,7 +66,7 @@ var TextElement = (props) => {
|
|
|
62
66
|
type: props.type,
|
|
63
67
|
status: props.status,
|
|
64
68
|
style: props.styles,
|
|
65
|
-
className: props.
|
|
69
|
+
className: props.className,
|
|
66
70
|
variant: props.variant,
|
|
67
71
|
name: props.name,
|
|
68
72
|
onChange: (e) => props.onChange(e.target.value)
|
|
@@ -103,7 +107,7 @@ var NumberElement = (props) => {
|
|
|
103
107
|
const newValue = e.target.value.replace(/[^0-9]/g, "");
|
|
104
108
|
props.onChange(newValue);
|
|
105
109
|
};
|
|
106
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
110
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
107
111
|
import_antd3.Input,
|
|
108
112
|
{
|
|
109
113
|
placeholder: props.placeholder,
|
|
@@ -115,13 +119,12 @@ var NumberElement = (props) => {
|
|
|
115
119
|
prefix: props.prefix,
|
|
116
120
|
type: props.type,
|
|
117
121
|
status: props.status,
|
|
118
|
-
|
|
119
|
-
className: props.classNames,
|
|
122
|
+
className: props.className,
|
|
120
123
|
variant: props.variant,
|
|
121
124
|
name: props.name,
|
|
122
125
|
onChange: handleInputChange
|
|
123
126
|
}
|
|
124
|
-
)
|
|
127
|
+
);
|
|
125
128
|
};
|
|
126
129
|
|
|
127
130
|
// src/Components/TextareaElement.tsx
|
|
@@ -129,7 +132,7 @@ var import_react4 = __toESM(require("react"));
|
|
|
129
132
|
var import_antd4 = require("antd");
|
|
130
133
|
var { TextArea } = import_antd4.Input;
|
|
131
134
|
var TextareaElement = (props) => {
|
|
132
|
-
return /* @__PURE__ */ import_react4.default.createElement(import_antd4.Flex,
|
|
135
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_antd4.Flex, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
133
136
|
TextArea,
|
|
134
137
|
{
|
|
135
138
|
placeholder: props.placeholder,
|
|
@@ -138,8 +141,7 @@ var TextareaElement = (props) => {
|
|
|
138
141
|
disabled: props.disabled,
|
|
139
142
|
id: props.name,
|
|
140
143
|
status: props.status,
|
|
141
|
-
|
|
142
|
-
className: props.classNames,
|
|
144
|
+
className: props.className,
|
|
143
145
|
variant: props.variant,
|
|
144
146
|
name: props.name,
|
|
145
147
|
showCount: true,
|
|
@@ -177,7 +179,7 @@ var SelectElement = (props) => {
|
|
|
177
179
|
id: props.name,
|
|
178
180
|
status: props.status,
|
|
179
181
|
style: props.styles,
|
|
180
|
-
className: props.
|
|
182
|
+
className: props.className,
|
|
181
183
|
variant: props.variant,
|
|
182
184
|
onChange: handleChange
|
|
183
185
|
}
|
|
@@ -187,15 +189,47 @@ var SelectElement = (props) => {
|
|
|
187
189
|
// src/Components/RadioElement.tsx
|
|
188
190
|
var import_react6 = __toESM(require("react"));
|
|
189
191
|
var import_antd6 = require("antd");
|
|
192
|
+
var containerClassName = " ";
|
|
193
|
+
var radioDefaultStyle = "bg-[#F2F2F2] border border-[#919191] rounded-[8px] m-[10px] hover:bg-[#F2F2F2] text-center text-black shadow-[0px_0px_1px_1px_#919191]";
|
|
194
|
+
var radioSelectedDefaultStyle = "bg-[#E2D6F8] border border-[#B8A4DE] rounded-[8px] p-[6px] m-[10px] shadow-[0px_0px_1px_1px_#B8A4DE] text-center text-black shadow-[0px_0px_1px_1px_#919191]";
|
|
190
195
|
var RadioElement = (props) => {
|
|
196
|
+
const [isDisabled, setIsDisabled] = (0, import_react6.useState)(props.disabled);
|
|
197
|
+
const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
|
|
198
|
+
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
191
199
|
const handleChange = (e) => {
|
|
200
|
+
console.log(e);
|
|
201
|
+
const selectedVal = e.target.value;
|
|
202
|
+
const selectedLabel = props.options ? props.options.find((f) => f.value === selectedVal)?.label : "";
|
|
203
|
+
const selectedOptions = { label: selectedLabel, value: selectedVal };
|
|
204
|
+
setSelectedValue(selectedVal);
|
|
205
|
+
setIsDisabled(true);
|
|
192
206
|
if (props.onChange) {
|
|
193
|
-
const selectedVal = e.target.value;
|
|
194
|
-
const selectedOptions = [{ id: selectedVal, value: selectedVal }];
|
|
195
207
|
props.onChange(selectedOptions);
|
|
196
208
|
}
|
|
197
209
|
};
|
|
198
|
-
|
|
210
|
+
const getButtonStyle = (option) => {
|
|
211
|
+
return selectedValue === option.value ? `${radioSelectedDefaultStyle} ${option.selectedClassName}` : `${radioDefaultStyle} ${option.className}`;
|
|
212
|
+
};
|
|
213
|
+
return /* @__PURE__ */ import_react6.default.createElement("div", { className: containerClassName }, /* @__PURE__ */ import_react6.default.createElement("p", null, props.label), /* @__PURE__ */ import_react6.default.createElement(
|
|
214
|
+
import_antd6.Radio.Group,
|
|
215
|
+
{
|
|
216
|
+
onChange: handleChange,
|
|
217
|
+
optionType,
|
|
218
|
+
className: props.className,
|
|
219
|
+
value: selectedValue
|
|
220
|
+
},
|
|
221
|
+
props.options && props.options.map((option) => /* @__PURE__ */ import_react6.default.createElement(
|
|
222
|
+
import_antd6.Radio,
|
|
223
|
+
{
|
|
224
|
+
key: option.value,
|
|
225
|
+
value: option.value,
|
|
226
|
+
disabled: isDisabled && selectedValue !== option.value,
|
|
227
|
+
className: getButtonStyle(option),
|
|
228
|
+
style: { pointerEvents: isDisabled && selectedValue !== option.value ? "none" : "auto" }
|
|
229
|
+
},
|
|
230
|
+
option.label
|
|
231
|
+
))
|
|
232
|
+
));
|
|
199
233
|
};
|
|
200
234
|
|
|
201
235
|
// src/Components/Checkbox.tsx
|
|
@@ -229,7 +263,7 @@ var CheckboxElement = (props) => {
|
|
|
229
263
|
disabled: props.disabled,
|
|
230
264
|
id: props.name,
|
|
231
265
|
style: props.styles,
|
|
232
|
-
className: props.
|
|
266
|
+
className: props.className,
|
|
233
267
|
onChange: onHandleAllChanges,
|
|
234
268
|
checked: checkAll
|
|
235
269
|
},
|
|
@@ -239,7 +273,7 @@ var CheckboxElement = (props) => {
|
|
|
239
273
|
{
|
|
240
274
|
disabled: props.disabled,
|
|
241
275
|
style: props.styles,
|
|
242
|
-
className: props.
|
|
276
|
+
className: props.className,
|
|
243
277
|
options: plainOptions,
|
|
244
278
|
value: checkedList,
|
|
245
279
|
onChange: handleChange
|
|
@@ -266,8 +300,7 @@ var CkEditor = (props) => {
|
|
|
266
300
|
{
|
|
267
301
|
apiKey: "rwpgt7maa54n0pe5mglhkl686p7h57sg6z636n6gf2mio1b9",
|
|
268
302
|
onInit: (_evt, editor) => {
|
|
269
|
-
if (editor)
|
|
270
|
-
editorRef.current = editor;
|
|
303
|
+
if (editor) editorRef.current = editor;
|
|
271
304
|
},
|
|
272
305
|
initialValue: "<p>This is the initial content of the editor.</p>",
|
|
273
306
|
init: {
|
|
@@ -356,7 +389,20 @@ var MultipleSelectElement = (props) => {
|
|
|
356
389
|
// src/Components/Button.tsx
|
|
357
390
|
var import_react12 = __toESM(require("react"));
|
|
358
391
|
var import_antd10 = require("antd");
|
|
359
|
-
var
|
|
392
|
+
var defaultClassName = "w-[126px] h-[40px] bg-purple-800 text-white rounded-full shadow-lg submit border-none";
|
|
393
|
+
var ButtonElement = (props) => {
|
|
394
|
+
const handleClick = typeof props.action === "string" ? () => {
|
|
395
|
+
console.log("Performing action:", props.action);
|
|
396
|
+
} : props.action;
|
|
397
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
398
|
+
import_antd10.Button,
|
|
399
|
+
{
|
|
400
|
+
onClick: handleClick,
|
|
401
|
+
className: `${defaultClassName} ${props.className ? props.className : ""}`
|
|
402
|
+
},
|
|
403
|
+
props.label
|
|
404
|
+
);
|
|
405
|
+
};
|
|
360
406
|
|
|
361
407
|
// src/Components/AddMoreTable.tsx
|
|
362
408
|
var import_react13 = __toESM(require("react"));
|
|
@@ -364,79 +410,236 @@ var import_antd11 = require("antd");
|
|
|
364
410
|
var import_icons2 = require("@ant-design/icons");
|
|
365
411
|
var AddMoreTable = (props) => {
|
|
366
412
|
const { thead, tbody } = props;
|
|
367
|
-
const [tableData, setTableData] = (0, import_react13.useState)({});
|
|
368
413
|
const [rows, setRows] = (0, import_react13.useState)(tbody || []);
|
|
369
|
-
function isColumnType(column) {
|
|
370
|
-
return column.dataIndex !== void 0;
|
|
371
|
-
}
|
|
372
|
-
const onHandleChange = (name, value) => {
|
|
373
|
-
setTableData((prev) => ({ ...prev, [name]: value }));
|
|
374
|
-
console.log(tableData);
|
|
375
|
-
};
|
|
376
414
|
const onHandleRows = () => {
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
415
|
+
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
416
|
+
let newRow = {
|
|
417
|
+
id: newId,
|
|
418
|
+
label: "Medicine",
|
|
419
|
+
name: "Medicine",
|
|
420
|
+
type: "text",
|
|
421
|
+
element: "single-select",
|
|
422
|
+
variable_data: [
|
|
423
|
+
{
|
|
424
|
+
id: 1,
|
|
425
|
+
Route: { label: "Route", element: "single-select", type: "text" },
|
|
426
|
+
Dose: { label: "Dose", element: "single-select", type: "text" },
|
|
427
|
+
Frequency: { label: "Frequency", element: "single-select", type: "text" },
|
|
428
|
+
When: { label: "When", element: "textarea", type: "text" },
|
|
429
|
+
Duration: { label: "Duration", element: "textarea", type: "text" },
|
|
430
|
+
Instructions: { label: "Instructions", element: "textarea", type: "text" },
|
|
431
|
+
SubRows: { delete: "delete", add: "plus" }
|
|
432
|
+
}
|
|
433
|
+
]
|
|
382
434
|
};
|
|
383
435
|
setRows((prevData) => [...prevData, newRow]);
|
|
384
436
|
};
|
|
385
|
-
const onHandleDelete = (
|
|
386
|
-
|
|
387
|
-
setRows(remainingRows);
|
|
437
|
+
const onHandleDelete = (id) => {
|
|
438
|
+
setRows((prevRows) => prevRows.filter((row) => row.id !== id));
|
|
388
439
|
};
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
440
|
+
const onHandleSubRowsAdd = (rowIndex) => {
|
|
441
|
+
setRows((prevRows) => {
|
|
442
|
+
return prevRows.map((row, index) => {
|
|
443
|
+
if (index === rowIndex) {
|
|
444
|
+
const newSubRow = {
|
|
445
|
+
id: row.variable_data.length + 1,
|
|
446
|
+
Route: { label: "Route", element: "single-select", type: "text" },
|
|
447
|
+
Dose: { label: "Dose", element: "single-select", type: "text" },
|
|
448
|
+
Frequency: { label: "Frequency", element: "single-select", type: "text" },
|
|
449
|
+
When: { label: "When", element: "textarea", type: "text" },
|
|
450
|
+
Duration: { label: "Duration", element: "textarea", type: "text" },
|
|
451
|
+
Instructions: { label: "Instructions", element: "textarea", type: "text" },
|
|
452
|
+
SubRows: { delete: "delete", add: "plus" }
|
|
453
|
+
};
|
|
454
|
+
const updatedVariableData = [...row.variable_data, newSubRow];
|
|
455
|
+
return {
|
|
456
|
+
...row,
|
|
457
|
+
variable_data: updatedVariableData
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
return row;
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
};
|
|
464
|
+
const onHandleSubRowsDelete = (rowIndex, subIndex) => {
|
|
465
|
+
setRows((prevRows) => {
|
|
466
|
+
return prevRows.map((row, index) => {
|
|
467
|
+
if (index === rowIndex) {
|
|
468
|
+
const updatedVariableData = row.variable_data.filter((_, i) => i !== subIndex);
|
|
469
|
+
return {
|
|
470
|
+
...row,
|
|
471
|
+
variable_data: updatedVariableData
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
return row;
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
};
|
|
478
|
+
(0, import_react13.useEffect)(() => {
|
|
479
|
+
console.log(rows);
|
|
480
|
+
}, [rows]);
|
|
481
|
+
const renderInputElement = (element, value) => {
|
|
482
|
+
if (!element) return null;
|
|
395
483
|
const { element: type, label } = element;
|
|
396
|
-
console.log("type....", type);
|
|
397
484
|
if (type === "single-select") {
|
|
398
|
-
return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (
|
|
485
|
+
return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
399
486
|
} else if (type === "textarea") {
|
|
400
|
-
return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (
|
|
487
|
+
return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false });
|
|
401
488
|
} else {
|
|
402
489
|
return null;
|
|
403
490
|
}
|
|
404
491
|
};
|
|
405
|
-
const dataSource = rows.map((eachRow,
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
});
|
|
414
|
-
return acc;
|
|
415
|
-
}, {}) : {};
|
|
416
|
-
return {
|
|
417
|
-
key: index.toString(),
|
|
418
|
-
"#": index + 1,
|
|
419
|
-
...eachRow,
|
|
420
|
-
...rowElements,
|
|
421
|
-
...variableData,
|
|
422
|
-
actions: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("button", { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement("button", { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)))
|
|
492
|
+
const dataSource = rows.map((eachRow, rowIndex) => {
|
|
493
|
+
const rowData = {
|
|
494
|
+
key: eachRow.id,
|
|
495
|
+
"#": rowIndex + 1,
|
|
496
|
+
"Medicine": renderInputElement({
|
|
497
|
+
element: eachRow.element,
|
|
498
|
+
label: eachRow.label
|
|
499
|
+
})
|
|
423
500
|
};
|
|
501
|
+
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
502
|
+
Object.keys(variable).forEach((key) => {
|
|
503
|
+
if (key === "SubRows") {
|
|
504
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.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_antd11.Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
505
|
+
} else {
|
|
506
|
+
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
rowData.actions = /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd11.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
511
|
+
console.log("=====rowdata", rowData);
|
|
512
|
+
return rowData;
|
|
424
513
|
});
|
|
425
|
-
|
|
514
|
+
const columns = thead && thead.length > 0 ? thead.map((eachHeadEl) => ({
|
|
515
|
+
title: eachHeadEl.label,
|
|
516
|
+
dataIndex: eachHeadEl.name,
|
|
517
|
+
key: eachHeadEl.id
|
|
518
|
+
})) : [];
|
|
519
|
+
if (!columns.some((col) => col.dataIndex === "actions")) {
|
|
426
520
|
columns.push({
|
|
427
521
|
title: "Actions",
|
|
428
522
|
dataIndex: "actions",
|
|
429
523
|
key: "actions"
|
|
430
524
|
});
|
|
431
525
|
}
|
|
432
|
-
return /* @__PURE__ */ import_react13.default.createElement(
|
|
526
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
433
527
|
import_antd11.Table,
|
|
434
528
|
{
|
|
435
529
|
columns,
|
|
436
|
-
|
|
437
|
-
|
|
530
|
+
dataSource,
|
|
531
|
+
pagination: false,
|
|
532
|
+
bordered: true
|
|
438
533
|
}
|
|
439
|
-
)
|
|
534
|
+
);
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
// src/Components/Sidebar.tsx
|
|
538
|
+
var import_react14 = __toESM(require("react"));
|
|
539
|
+
var Sidebar = (props) => {
|
|
540
|
+
const handleChange = (item) => {
|
|
541
|
+
if (props.onChange) {
|
|
542
|
+
props.onChange(item);
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
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) => {
|
|
546
|
+
return /* @__PURE__ */ import_react14.default.createElement("li", { onClick: () => {
|
|
547
|
+
handleChange(item);
|
|
548
|
+
}, key: item.label, className: `${props.listItemClassName} ${item.active && props.activeClassName}` }, /* @__PURE__ */ import_react14.default.createElement("p", null, item.icon), /* @__PURE__ */ import_react14.default.createElement("p", null, item.label));
|
|
549
|
+
})));
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
// src/Components/Navbar.tsx
|
|
553
|
+
var import_react18 = __toESM(require("react"));
|
|
554
|
+
|
|
555
|
+
// src/Components/Notification.tsx
|
|
556
|
+
var import_react15 = __toESM(require("react"));
|
|
557
|
+
var import_antd12 = require("antd");
|
|
558
|
+
var import_io = require("react-icons/io");
|
|
559
|
+
var popoverContentStyle = {
|
|
560
|
+
minWidth: "300px",
|
|
561
|
+
maxWidth: "100%"
|
|
562
|
+
};
|
|
563
|
+
var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
|
|
564
|
+
import_antd12.Popover,
|
|
565
|
+
{
|
|
566
|
+
className: props.className,
|
|
567
|
+
content: /* @__PURE__ */ import_react15.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react15.default.createElement(
|
|
568
|
+
import_antd12.List,
|
|
569
|
+
{
|
|
570
|
+
itemLayout: "horizontal",
|
|
571
|
+
dataSource: props.items,
|
|
572
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react15.default.createElement(import_antd12.List.Item, { key: item.text }, /* @__PURE__ */ import_react15.default.createElement(
|
|
573
|
+
import_antd12.List.Item.Meta,
|
|
574
|
+
{
|
|
575
|
+
avatar: /* @__PURE__ */ import_react15.default.createElement(import_antd12.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
576
|
+
title: item.text,
|
|
577
|
+
description: item.time
|
|
578
|
+
}
|
|
579
|
+
))
|
|
580
|
+
}
|
|
581
|
+
)),
|
|
582
|
+
trigger: "focus",
|
|
583
|
+
placement: "bottomRight"
|
|
584
|
+
},
|
|
585
|
+
/* @__PURE__ */ import_react15.default.createElement(import_antd12.Button, { className: props.buttonClassName }, /* @__PURE__ */ import_react15.default.createElement(import_antd12.Badge, { size: "small", count: props.count }, /* @__PURE__ */ import_react15.default.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ import_react15.default.createElement(import_io.IoIosNotifications, null))))
|
|
586
|
+
);
|
|
587
|
+
|
|
588
|
+
// src/Components/SpanElement.tsx
|
|
589
|
+
var import_react16 = __toESM(require("react"));
|
|
590
|
+
var SpanElement = (props) => /* @__PURE__ */ import_react16.default.createElement("span", { className: props.className }, props.label);
|
|
591
|
+
|
|
592
|
+
// src/Components/Profile.tsx
|
|
593
|
+
var import_react17 = __toESM(require("react"));
|
|
594
|
+
var import_antd13 = require("antd");
|
|
595
|
+
var import_icons3 = require("@ant-design/icons");
|
|
596
|
+
var Profile = (props) => /* @__PURE__ */ import_react17.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react17.default.createElement(import_antd13.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)));
|
|
597
|
+
|
|
598
|
+
// src/Components/Navbar.tsx
|
|
599
|
+
var Navbar = (props) => {
|
|
600
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: `${props.className}`, key: props.name }, props.items && props.items.map((item) => {
|
|
601
|
+
if (item.element === "span") {
|
|
602
|
+
return /* @__PURE__ */ import_react18.default.createElement(SpanElement, { ...item });
|
|
603
|
+
} else if (item.element === "notifications") {
|
|
604
|
+
return /* @__PURE__ */ import_react18.default.createElement(Notification, { ...item });
|
|
605
|
+
} else if (item.name === "profile") {
|
|
606
|
+
return /* @__PURE__ */ import_react18.default.createElement(Profile, { ...item });
|
|
607
|
+
}
|
|
608
|
+
return null;
|
|
609
|
+
}));
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
// src/Components/TableElement.tsx
|
|
613
|
+
var import_react19 = __toESM(require("react"));
|
|
614
|
+
var import_antd14 = require("antd");
|
|
615
|
+
var TableElement = (props) => {
|
|
616
|
+
const { thead, tbody } = props;
|
|
617
|
+
console.log("thead-----", thead);
|
|
618
|
+
console.log("tbody------", tbody);
|
|
619
|
+
const columns = thead && thead.map((col) => ({
|
|
620
|
+
title: col.label,
|
|
621
|
+
dataIndex: col.name,
|
|
622
|
+
key: col.key
|
|
623
|
+
}));
|
|
624
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_antd14.Table, { dataSource: tbody, columns, bordered: true, pagination: false });
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
// src/Components/DatePicker.tsx
|
|
628
|
+
var import_react20 = __toESM(require("react"));
|
|
629
|
+
var import_antd15 = require("antd");
|
|
630
|
+
var import_icons4 = require("@ant-design/icons");
|
|
631
|
+
var DatePickerElement = (props) => {
|
|
632
|
+
const [date, setDate] = (0, import_react20.useState)(void 0);
|
|
633
|
+
const handleChange = (value) => {
|
|
634
|
+
setDate(value);
|
|
635
|
+
if (props.onChange) {
|
|
636
|
+
props.onChange(date);
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
const onHandleAdd = () => {
|
|
640
|
+
setDate((prev) => prev - 1);
|
|
641
|
+
};
|
|
642
|
+
return /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement(import_icons4.LeftOutlined, { onClick: onHandleAdd }), /* @__PURE__ */ import_react20.default.createElement(import_antd15.DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ import_react20.default.createElement(import_icons4.RightOutlined, null));
|
|
440
643
|
};
|
|
441
644
|
// Annotate the CommonJS export names for ESM import in node:
|
|
442
645
|
0 && (module.exports = {
|
|
@@ -444,12 +647,16 @@ var AddMoreTable = (props) => {
|
|
|
444
647
|
ButtonElement,
|
|
445
648
|
CheckboxElement,
|
|
446
649
|
CkEditor,
|
|
650
|
+
DatePickerElement,
|
|
447
651
|
MultipleSelectElement,
|
|
652
|
+
Navbar,
|
|
448
653
|
NumberElement,
|
|
449
654
|
PasswordElement,
|
|
450
655
|
RadioElement,
|
|
451
656
|
SelectElement,
|
|
657
|
+
Sidebar,
|
|
452
658
|
SingleSelectElement,
|
|
659
|
+
TableElement,
|
|
453
660
|
TextElement,
|
|
454
661
|
TextareaElement
|
|
455
662
|
});
|