@apexcura/ui-components 0.0.15-Beta7 → 0.0.15-Beta70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +48 -9
- package/dist/index.d.ts +48 -9
- package/dist/index.js +896 -310
- package/dist/index.mjs +910 -308
- package/package.json +11 -5
- package/postcss.config.js +7 -6
- package/tailwind.config.js +9 -10
- package/dist/index.css +0 -463
package/dist/index.js
CHANGED
|
@@ -31,22 +31,30 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
AddMoreTable: () => AddMoreTable,
|
|
34
|
+
BarChart: () => BarChart,
|
|
34
35
|
ButtonElement: () => ButtonElement,
|
|
35
36
|
CheckboxElement: () => CheckboxElement,
|
|
37
|
+
CircleDonut: () => CircleDonut,
|
|
36
38
|
CkEditor: () => CkEditor,
|
|
39
|
+
ColorPickerElement: () => ColorPickerElement,
|
|
37
40
|
DatePickerElement: () => DatePickerElement,
|
|
38
41
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
39
|
-
|
|
42
|
+
DivContainer: () => DivContainer,
|
|
43
|
+
DoubleBarChart: () => DoubleBarChart,
|
|
40
44
|
DropDownGroup: () => DropDownGroup,
|
|
41
45
|
FileUpload: () => FileUpload,
|
|
46
|
+
HorizontalBarChart: () => HorizontalBarChart,
|
|
42
47
|
Image: () => Image,
|
|
48
|
+
LineChart: () => LineChart,
|
|
43
49
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
44
50
|
Navbar: () => Navbar,
|
|
51
|
+
NotificationAlert: () => NotificationAlert,
|
|
45
52
|
NumberElement: () => NumberElement,
|
|
46
53
|
OtpElement: () => OtpElement,
|
|
47
54
|
PasswordElement: () => PasswordElement,
|
|
48
55
|
RadioElement: () => RadioElement,
|
|
49
56
|
SelectElement: () => SelectElement,
|
|
57
|
+
SemiCircleDonut: () => SemiCircleDonut,
|
|
50
58
|
Sidebar: () => Sidebar,
|
|
51
59
|
SingleCheckbox: () => SingleCheckbox,
|
|
52
60
|
SingleSelectElement: () => SingleSelectElement,
|
|
@@ -79,6 +87,7 @@ var TextElement = (props) => {
|
|
|
79
87
|
type: props.type,
|
|
80
88
|
status: props.status,
|
|
81
89
|
className: props.className,
|
|
90
|
+
disabled: props.disabled,
|
|
82
91
|
onChange: (e) => {
|
|
83
92
|
handleChange(e);
|
|
84
93
|
}
|
|
@@ -112,7 +121,7 @@ var PasswordElement = (props) => {
|
|
|
112
121
|
},
|
|
113
122
|
iconRender: renderVisibilityIcon,
|
|
114
123
|
visibilityToggle: {
|
|
115
|
-
visible: passwordVisible,
|
|
124
|
+
visible: passwordVisible && passwordVisible,
|
|
116
125
|
onVisibleChange: handleVisibilityToggle
|
|
117
126
|
}
|
|
118
127
|
}
|
|
@@ -160,20 +169,20 @@ var TextareaElement = (props) => {
|
|
|
160
169
|
props.onChange(e.target.value);
|
|
161
170
|
}
|
|
162
171
|
};
|
|
172
|
+
const defaultMinRows = 2;
|
|
173
|
+
const defaultMaxRows = 6;
|
|
163
174
|
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(
|
|
164
175
|
TextArea,
|
|
165
176
|
{
|
|
166
177
|
placeholder: props.placeholder,
|
|
167
178
|
allowClear: true,
|
|
168
|
-
defaultValue: props.defaultValue,
|
|
169
179
|
disabled: props.disabled,
|
|
170
180
|
id: props.name,
|
|
171
|
-
|
|
181
|
+
autoSize: { minRows: props.minRows ? props.minRows : defaultMinRows, maxRows: props.maxRows ? props.maxRows : defaultMaxRows },
|
|
172
182
|
className: props.className,
|
|
173
|
-
variant: props.variant,
|
|
174
183
|
name: props.name,
|
|
184
|
+
value: props.value,
|
|
175
185
|
showCount: true,
|
|
176
|
-
maxLength: props.maxLength,
|
|
177
186
|
onChange: (e) => {
|
|
178
187
|
handleChange(e);
|
|
179
188
|
}
|
|
@@ -184,13 +193,14 @@ var TextareaElement = (props) => {
|
|
|
184
193
|
// src/Components/SelectElement.tsx
|
|
185
194
|
var import_react5 = __toESM(require("react"));
|
|
186
195
|
var import_antd5 = require("antd");
|
|
196
|
+
var filterOptions = (input, option) => {
|
|
197
|
+
return (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
198
|
+
};
|
|
187
199
|
var SelectElement = (props) => {
|
|
188
200
|
const handleChange = (value) => {
|
|
189
|
-
console.log("++=====", typeof value);
|
|
190
201
|
if (props.onChange) {
|
|
191
202
|
if (typeof value === "string") {
|
|
192
203
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
193
|
-
console.log(filterOption2);
|
|
194
204
|
props.onChange(filterOption2);
|
|
195
205
|
} else {
|
|
196
206
|
const selectedOptions = value ? value.map((eachVal) => {
|
|
@@ -203,18 +213,15 @@ var SelectElement = (props) => {
|
|
|
203
213
|
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(
|
|
204
214
|
import_antd5.Select,
|
|
205
215
|
{
|
|
206
|
-
mode: props.mode,
|
|
207
216
|
options: props.options,
|
|
208
217
|
placeholder: props.placeholder,
|
|
209
218
|
allowClear: true,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
id: props.name,
|
|
213
|
-
status: props.status,
|
|
214
|
-
style: props.styles,
|
|
219
|
+
filterOption: filterOptions,
|
|
220
|
+
showSearch: true,
|
|
215
221
|
className: props.className,
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
onChange: handleChange,
|
|
223
|
+
mode: props.mode,
|
|
224
|
+
value: props.value && props.value
|
|
218
225
|
}
|
|
219
226
|
));
|
|
220
227
|
};
|
|
@@ -229,7 +236,6 @@ var RadioElement = (props) => {
|
|
|
229
236
|
const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
|
|
230
237
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
231
238
|
const handleChange = (option) => {
|
|
232
|
-
console.log(option);
|
|
233
239
|
setSelectedValue(option);
|
|
234
240
|
setIsDisabled(true);
|
|
235
241
|
if (props.onChange) {
|
|
@@ -272,19 +278,23 @@ var CheckboxGroup = import_antd7.Checkbox.Group;
|
|
|
272
278
|
var defaultCheckedList = [];
|
|
273
279
|
var CheckboxElement = (props) => {
|
|
274
280
|
const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
|
|
275
|
-
const
|
|
281
|
+
const options = props.options || [];
|
|
282
|
+
const checkAll = options.length > 0 && options.length === checkedList.length;
|
|
276
283
|
const handleChange = (list) => {
|
|
277
284
|
setCheckedList(list);
|
|
278
285
|
if (props.onChange) {
|
|
279
|
-
const selectedOptions =
|
|
286
|
+
const selectedOptions = options.filter(
|
|
287
|
+
(option) => list.includes(option.value)
|
|
288
|
+
);
|
|
280
289
|
props.onChange(selectedOptions);
|
|
281
290
|
}
|
|
282
291
|
};
|
|
283
292
|
const onHandleAllChanges = (e) => {
|
|
284
|
-
const newList = e.target.checked ?
|
|
293
|
+
const newList = e.target.checked ? options.map((option) => option.value) : [];
|
|
285
294
|
setCheckedList(newList);
|
|
286
295
|
if (props.onChange) {
|
|
287
|
-
|
|
296
|
+
const selectedOptions = e.target.checked ? options : [];
|
|
297
|
+
props.onChange(selectedOptions);
|
|
288
298
|
}
|
|
289
299
|
};
|
|
290
300
|
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(
|
|
@@ -304,7 +314,7 @@ var CheckboxElement = (props) => {
|
|
|
304
314
|
disabled: props.disabled,
|
|
305
315
|
style: props.styles,
|
|
306
316
|
className: props.className,
|
|
307
|
-
options
|
|
317
|
+
options,
|
|
308
318
|
value: checkedList,
|
|
309
319
|
onChange: handleChange
|
|
310
320
|
}
|
|
@@ -312,16 +322,61 @@ var CheckboxElement = (props) => {
|
|
|
312
322
|
};
|
|
313
323
|
|
|
314
324
|
// src/Components/CkEditor.tsx
|
|
315
|
-
var import_react8 =
|
|
325
|
+
var import_react8 = require("react");
|
|
326
|
+
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
327
|
+
var import_react9 = __toESM(require("react"));
|
|
316
328
|
var CkEditor = (props) => {
|
|
317
|
-
|
|
329
|
+
const editorRef = (0, import_react8.useRef)(null);
|
|
330
|
+
const log = () => {
|
|
331
|
+
if (editorRef.current) {
|
|
332
|
+
let content = editorRef.current.getContent();
|
|
333
|
+
if (props.onChange) {
|
|
334
|
+
props.onChange(content);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", null, /* @__PURE__ */ import_react9.default.createElement(
|
|
339
|
+
import_tinymce_react.Editor,
|
|
340
|
+
{
|
|
341
|
+
apiKey: "rwpgt7maa54n0pe5mglhkl686p7h57sg6z636n6gf2mio1b9",
|
|
342
|
+
onInit: (_evt, editor) => {
|
|
343
|
+
if (editor) editorRef.current = editor;
|
|
344
|
+
},
|
|
345
|
+
initialValue: "<p>This is the initial content of the editor.</p>",
|
|
346
|
+
init: {
|
|
347
|
+
height: 500,
|
|
348
|
+
menubar: false,
|
|
349
|
+
plugins: [
|
|
350
|
+
"advlist",
|
|
351
|
+
"autolink",
|
|
352
|
+
"lists",
|
|
353
|
+
"link",
|
|
354
|
+
"image",
|
|
355
|
+
"charmap",
|
|
356
|
+
"preview",
|
|
357
|
+
"anchor",
|
|
358
|
+
"searchreplace",
|
|
359
|
+
"visualblocks",
|
|
360
|
+
"code",
|
|
361
|
+
"fullscreen",
|
|
362
|
+
"insertdatetime",
|
|
363
|
+
"media",
|
|
364
|
+
"table",
|
|
365
|
+
"code",
|
|
366
|
+
"help",
|
|
367
|
+
"wordcount"
|
|
368
|
+
],
|
|
369
|
+
toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
|
|
370
|
+
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
), /* @__PURE__ */ import_react9.default.createElement("button", { onClick: log }, "Log editor content"));
|
|
318
374
|
};
|
|
319
375
|
|
|
320
376
|
// src/Components/Select/SingleSelectElement.tsx
|
|
321
|
-
var
|
|
377
|
+
var import_react10 = __toESM(require("react"));
|
|
322
378
|
var import_antd8 = require("antd");
|
|
323
379
|
var onSearch = (value) => {
|
|
324
|
-
console.log("search:", value);
|
|
325
380
|
};
|
|
326
381
|
var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
327
382
|
var SingleSelectElement = (props) => {
|
|
@@ -334,7 +389,7 @@ var SingleSelectElement = (props) => {
|
|
|
334
389
|
props.onChange([selectedOption]);
|
|
335
390
|
}
|
|
336
391
|
};
|
|
337
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
338
393
|
import_antd8.Select,
|
|
339
394
|
{
|
|
340
395
|
showSearch: true,
|
|
@@ -353,7 +408,7 @@ var SingleSelectElement = (props) => {
|
|
|
353
408
|
};
|
|
354
409
|
|
|
355
410
|
// src/Components/Select/MultipleSelectElement.tsx
|
|
356
|
-
var
|
|
411
|
+
var import_react11 = __toESM(require("react"));
|
|
357
412
|
var import_antd9 = require("antd");
|
|
358
413
|
var MultipleSelectElement = (props) => {
|
|
359
414
|
const handleChange = (values) => {
|
|
@@ -365,7 +420,7 @@ var MultipleSelectElement = (props) => {
|
|
|
365
420
|
props.onChange(selectedOptions);
|
|
366
421
|
}
|
|
367
422
|
};
|
|
368
|
-
return /* @__PURE__ */
|
|
423
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
369
424
|
import_antd9.Select,
|
|
370
425
|
{
|
|
371
426
|
mode: "multiple",
|
|
@@ -377,87 +432,166 @@ var MultipleSelectElement = (props) => {
|
|
|
377
432
|
};
|
|
378
433
|
|
|
379
434
|
// src/Components/Button.tsx
|
|
380
|
-
var
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
(0,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
const svgElement = tempDiv.querySelector("svg");
|
|
391
|
-
if (svgElement) {
|
|
392
|
-
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
393
|
-
const hoverColorClass = props.className?.match(/hover:text-[\w-]+/g)?.[0];
|
|
394
|
-
if (textColorClass) {
|
|
395
|
-
const tempSpan = document.createElement("span");
|
|
396
|
-
tempSpan.className = textColorClass;
|
|
397
|
-
document.body.appendChild(tempSpan);
|
|
398
|
-
const computedColor = getComputedStyle(tempSpan).color;
|
|
399
|
-
document.body.removeChild(tempSpan);
|
|
400
|
-
const paths = svgElement.querySelectorAll("path");
|
|
401
|
-
paths.forEach((path) => path.setAttribute("fill", computedColor));
|
|
402
|
-
}
|
|
403
|
-
if (hoverColorClass) {
|
|
404
|
-
const tempSpan = document.createElement("span");
|
|
405
|
-
tempSpan.className = hoverColorClass.replace("hover:", "");
|
|
406
|
-
document.body.appendChild(tempSpan);
|
|
407
|
-
const computedHoverColor = getComputedStyle(tempSpan).color;
|
|
408
|
-
document.body.removeChild(tempSpan);
|
|
409
|
-
setHoverColor(computedHoverColor);
|
|
410
|
-
}
|
|
411
|
-
svgElement.setAttribute(
|
|
412
|
-
"class",
|
|
413
|
-
`${props.className ? props.className : ""}`
|
|
414
|
-
);
|
|
415
|
-
setSvgContent(tempDiv.innerHTML);
|
|
416
|
-
setOriginalSvgContent(tempDiv.innerHTML);
|
|
417
|
-
}
|
|
418
|
-
}).catch((error) => console.error("Error fetching SVG:", error));
|
|
419
|
-
}
|
|
420
|
-
}, [props.icon, props.className]);
|
|
421
|
-
const handleMouseEnter = () => {
|
|
422
|
-
if (hoverColor && originalSvgContent) {
|
|
423
|
-
const tempDiv = document.createElement("div");
|
|
424
|
-
tempDiv.innerHTML = originalSvgContent;
|
|
425
|
-
const svgElement = tempDiv.querySelector("svg");
|
|
426
|
-
const paths = svgElement?.querySelectorAll("path");
|
|
427
|
-
paths?.forEach((path) => path.setAttribute("fill", hoverColor));
|
|
428
|
-
setSvgContent(tempDiv.innerHTML);
|
|
435
|
+
var import_react13 = __toESM(require("react"));
|
|
436
|
+
|
|
437
|
+
// src/constants/icons.tsx
|
|
438
|
+
var import_react12 = __toESM(require("react"));
|
|
439
|
+
var icons = {
|
|
440
|
+
download: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
441
|
+
"path",
|
|
442
|
+
{
|
|
443
|
+
d: "M6.39023 19.49H18.9902C19.2452 19.49 19.459 19.5763 19.6315 19.7488C19.804 19.9213 19.8902 20.135 19.8902 20.39C19.8902 20.645 19.804 20.8588 19.6315 21.0313C19.459 21.2038 19.2452 21.29 18.9902 21.29H6.39023C6.13523 21.29 5.92148 21.2038 5.74898 21.0313C5.57648 20.8588 5.49023 20.645 5.49023 20.39C5.49023 20.135 5.57648 19.9213 5.74898 19.7488C5.92148 19.5763 6.13523 19.49 6.39023 19.49ZM12.6902 17.1275C12.5552 17.1275 12.424 17.0975 12.2965 17.0375C12.169 16.9775 12.0602 16.8875 11.9702 16.7675L7.51523 11.0525C7.29023 10.7525 7.26023 10.4338 7.42523 10.0963C7.59023 9.75879 7.86023 9.59004 8.23523 9.59004H9.99023V4.19004C9.99023 3.93504 10.0765 3.72129 10.249 3.54879C10.4215 3.37629 10.6352 3.29004 10.8902 3.29004H14.4902C14.7452 3.29004 14.959 3.37629 15.1315 3.54879C15.304 3.72129 15.3902 3.93504 15.3902 4.19004V9.59004H17.1452C17.5202 9.59004 17.7902 9.75879 17.9552 10.0963C18.1202 10.4338 18.0902 10.7525 17.8652 11.0525L13.4102 16.7675C13.3202 16.8875 13.2115 16.9775 13.084 17.0375C12.9565 17.0975 12.8252 17.1275 12.6902 17.1275Z",
|
|
444
|
+
fill: "#505050"
|
|
429
445
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
446
|
+
)),
|
|
447
|
+
save: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 27 27", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
448
|
+
"path",
|
|
449
|
+
{
|
|
450
|
+
d: "M18.4602 4.67108H6.6883C5.5994 4.67108 4.72632 5.55397 4.72632 6.63306V20.3669C4.72632 21.446 5.5994 22.3289 6.6883 22.3289H20.4222C21.5013 22.3289 22.3842 21.446 22.3842 20.3669V8.59505L18.4602 4.67108ZM13.5552 20.3669C11.9268 20.3669 10.6123 19.0524 10.6123 17.424C10.6123 15.7955 11.9268 14.481 13.5552 14.481C15.1837 14.481 16.4982 15.7955 16.4982 17.424C16.4982 19.0524 15.1837 20.3669 13.5552 20.3669ZM16.4982 10.557H6.6883V6.63306H16.4982V10.557Z",
|
|
451
|
+
fill: "#A3A3A3"
|
|
434
452
|
}
|
|
435
|
-
|
|
436
|
-
|
|
453
|
+
)),
|
|
454
|
+
filter: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
455
|
+
"path",
|
|
456
|
+
{
|
|
457
|
+
d: "M3.92978 5.0621C6.21468 7.99174 10.4338 13.4212 10.4338 13.4212V20.208C10.4338 20.8301 10.9428 21.3391 11.5649 21.3391H13.8272C14.4493 21.3391 14.9584 20.8301 14.9584 20.208V13.4212C14.9584 13.4212 19.1662 7.99174 21.4511 5.0621C22.028 4.31555 21.4963 3.24097 20.5575 3.24097H4.82338C3.88454 3.24097 3.3529 4.31555 3.92978 5.0621Z",
|
|
458
|
+
fill: "#505050"
|
|
459
|
+
}
|
|
460
|
+
)),
|
|
461
|
+
logout: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
462
|
+
"path",
|
|
463
|
+
{
|
|
464
|
+
d: "M4.3457 3.87939C3.79342 3.87939 3.3457 4.32711 3.3457 4.87939V20.441C3.3457 20.9933 3.79342 21.441 4.3457 21.441H13.8618C14.4141 21.441 14.8618 20.9933 14.8618 20.441V15.1346C14.8618 14.8585 14.6379 14.6346 14.3618 14.6346H8.03954C7.48725 14.6346 7.03954 14.1869 7.03954 13.6346V10.7859C7.03954 10.2336 7.48725 9.78585 8.03954 9.78585H14.3618C14.6379 9.78585 14.8618 9.562 14.8618 9.28585V4.87939C14.8618 4.32711 14.4141 3.87939 13.8618 3.87939H4.3457Z",
|
|
465
|
+
fill: "#505050"
|
|
466
|
+
}
|
|
467
|
+
), /* @__PURE__ */ import_react12.default.createElement(
|
|
468
|
+
"path",
|
|
469
|
+
{
|
|
470
|
+
d: "M16.6159 7.55579L15.2915 8.88016L17.7511 11.3397H8.10205V13.2317H17.7511L15.2915 15.6912L16.6159 17.0156L21.3458 12.2857L16.6159 7.55579Z",
|
|
471
|
+
fill: "#505050"
|
|
472
|
+
}
|
|
473
|
+
)),
|
|
474
|
+
patient: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
475
|
+
"path",
|
|
476
|
+
{
|
|
477
|
+
d: "M11.9997 15.8119C12.379 15.8119 12.7012 15.679 12.9664 15.4132C13.2322 15.148 13.3651 14.8258 13.3651 14.4465V13.5363H14.2753C14.6546 13.5363 14.9768 13.4034 15.242 13.1376C15.5078 12.8724 15.6407 12.5502 15.6407 12.1709C15.6407 11.7916 15.5078 11.4694 15.242 11.2042C14.9768 10.9384 14.6546 10.8055 14.2753 10.8055H13.3651V9.8953C13.3651 9.51604 13.2322 9.19381 12.9664 8.92863C12.7012 8.66284 12.379 8.52994 11.9997 8.52994C11.6204 8.52994 11.2982 8.66284 11.033 8.92863C10.7672 9.19381 10.6343 9.51604 10.6343 9.8953V10.8055H9.72409C9.34483 10.8055 9.0226 10.9384 8.75742 11.2042C8.49163 11.4694 8.35873 11.7916 8.35873 12.1709C8.35873 12.5502 8.49163 12.8724 8.75742 13.1376C9.0226 13.4034 9.34483 13.5363 9.72409 13.5363H10.6343V14.4465C10.6343 14.8258 10.7672 15.148 11.033 15.4132C11.2982 15.679 11.6204 15.8119 11.9997 15.8119ZM11.9997 21.6602H11.7721C11.6963 21.6602 11.628 21.645 11.5673 21.6146C9.57997 20.9926 7.94154 19.7599 6.65203 17.9163C5.36253 16.0734 4.71777 14.0369 4.71777 11.8068V7.50592C4.71777 7.12665 4.82791 6.78531 5.04819 6.4819C5.26786 6.17849 5.55216 5.95851 5.90109 5.82198L11.3625 3.77394C11.5749 3.69808 11.7873 3.66016 11.9997 3.66016C12.2121 3.66016 12.4245 3.69808 12.6369 3.77394L18.0983 5.82198C18.4472 5.95851 18.7318 6.17849 18.9521 6.4819C19.1718 6.78531 19.2816 7.12665 19.2816 7.50592V11.8068C19.2816 14.0369 18.6369 16.0734 17.3474 17.9163C16.0578 19.7599 14.4194 20.9926 12.4321 21.6146C12.3562 21.645 12.2121 21.6602 11.9997 21.6602Z",
|
|
478
|
+
fill: "#505050"
|
|
479
|
+
}
|
|
480
|
+
)),
|
|
481
|
+
refresh: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
482
|
+
"path",
|
|
483
|
+
{
|
|
484
|
+
d: "M18.346 5.64739C17.4032 4.69617 16.2589 3.96885 14.9974 3.51916C13.7359 3.06947 12.3895 2.90888 11.0577 3.04926C6.92991 3.46541 3.53322 6.81712 3.07208 10.9449C2.45347 16.3998 6.67122 21 11.9912 21C13.6897 21 15.3533 20.5181 16.7888 19.6102C18.2242 18.7023 19.3726 17.4058 20.1005 15.8712C20.4604 15.1176 19.9206 14.2516 19.0883 14.2516C18.6721 14.2516 18.2785 14.4765 18.0985 14.8477C17.4455 16.2525 16.3286 17.3896 14.9357 18.0676C13.5428 18.7456 11.9588 18.9232 10.4503 18.5706C7.95342 18.0195 5.94015 15.9837 5.41152 13.4868C5.18931 12.4996 5.19188 11.475 5.41905 10.4889C5.64622 9.50282 6.09217 8.58042 6.72392 7.78992C7.35566 6.99943 8.15704 6.36107 9.06878 5.92207C9.98052 5.48307 10.9793 5.25466 11.9912 5.25374C13.8583 5.25374 15.5229 6.0298 16.7376 7.25576L15.0392 8.95411C14.3307 9.66269 14.8255 10.8774 15.8265 10.8774H19.8643C20.4829 10.8774 20.9891 10.3713 20.9891 9.75267V5.71488C20.9891 4.71386 19.7744 4.20773 19.0658 4.91632L18.346 5.64739Z",
|
|
485
|
+
fill: "#595959"
|
|
486
|
+
}
|
|
487
|
+
)),
|
|
488
|
+
scheduler: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
489
|
+
"path",
|
|
490
|
+
{
|
|
491
|
+
d: "M19 4.58746H18V2.56927H16V4.58746H8V2.56927H6V4.58746H5C3.89 4.58746 3.01 5.49564 3.01 6.60564L3 20.7329C3 21.8429 3.89 22.7511 5 22.7511H19C20.1 22.7511 21 21.8429 21 20.7329V6.60564C21 5.49564 20.1 4.58746 19 4.58746ZM19 20.7329H5V10.642H19V20.7329ZM9 14.6784H7V12.6602H9V14.6784ZM13 14.6784H11V12.6602H13V14.6784ZM17 14.6784H15V12.6602H17V14.6784ZM9 18.7147H7V16.6965H9V18.7147ZM13 18.7147H11V16.6965H13V18.7147ZM17 18.7147H15V16.6965H17V18.7147Z",
|
|
492
|
+
fill: "#505050"
|
|
493
|
+
}
|
|
494
|
+
)),
|
|
495
|
+
add: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 26 27", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
496
|
+
"path",
|
|
497
|
+
{
|
|
498
|
+
d: "M21.4869 14.7981H13.9193V22.3657H11.3967V14.7981H3.8291V12.2755H11.3967V4.70789H13.9193V12.2755H21.4869V14.7981Z",
|
|
499
|
+
fill: "white"
|
|
500
|
+
}
|
|
501
|
+
)),
|
|
502
|
+
bot: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
503
|
+
"path",
|
|
504
|
+
{
|
|
505
|
+
d: "M5 21.6602C4.71667 21.6602 4.47917 21.5644 4.2875 21.3727C4.09583 21.181 4 20.9435 4 20.6602V16.6602C4 16.1102 4.19583 15.6394 4.5875 15.2477C4.97917 14.856 5.45 14.6602 6 14.6602H18C18.55 14.6602 19.0208 14.856 19.4125 15.2477C19.8042 15.6394 20 16.1102 20 16.6602V20.6602C20 20.9435 19.9042 21.181 19.7125 21.3727C19.5208 21.5644 19.2833 21.6602 19 21.6602H5ZM9 13.6602C7.61667 13.6602 6.4375 13.1727 5.4625 12.1977C4.4875 11.2227 4 10.0435 4 8.66019C4 7.27685 4.4875 6.09769 5.4625 5.12269C6.4375 4.14769 7.61667 3.66019 9 3.66019H15C16.3833 3.66019 17.5625 4.14769 18.5375 5.12269C19.5125 6.09769 20 7.27685 20 8.66019C20 10.0435 19.5125 11.2227 18.5375 12.1977C17.5625 13.1727 16.3833 13.6602 15 13.6602H9ZM9 9.66019C9.28333 9.66019 9.52083 9.56435 9.7125 9.37269C9.90417 9.18102 10 8.94352 10 8.66019C10 8.37685 9.90417 8.13935 9.7125 7.94769C9.52083 7.75602 9.28333 7.66019 9 7.66019C8.71667 7.66019 8.47917 7.75602 8.2875 7.94769C8.09583 8.13935 8 8.37685 8 8.66019C8 8.94352 8.09583 9.18102 8.2875 9.37269C8.47917 9.56435 8.71667 9.66019 9 9.66019ZM15 9.66019C15.2833 9.66019 15.5208 9.56435 15.7125 9.37269C15.9042 9.18102 16 8.94352 16 8.66019C16 8.37685 15.9042 8.13935 15.7125 7.94769C15.5208 7.75602 15.2833 7.66019 15 7.66019C14.7167 7.66019 14.4792 7.75602 14.2875 7.94769C14.0958 8.13935 14 8.37685 14 8.66019C14 8.94352 14.0958 9.18102 14.2875 9.37269C14.4792 9.56435 14.7167 9.66019 15 9.66019Z",
|
|
506
|
+
fill: "#505050"
|
|
507
|
+
}
|
|
508
|
+
)),
|
|
509
|
+
campaign: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
510
|
+
"path",
|
|
511
|
+
{
|
|
512
|
+
d: "M20.0152 13.5174C19.6907 13.5174 19.419 13.4074 19.1999 13.1876C18.98 12.9685 18.8701 12.6967 18.8701 12.3723C18.8701 12.0479 18.98 11.7757 19.1999 11.5559C19.419 11.3368 19.6907 11.2272 20.0152 11.2272H22.3053C22.6298 11.2272 22.9015 11.3368 23.1206 11.5559C23.3405 11.7757 23.4504 12.0479 23.4504 12.3723C23.4504 12.6967 23.3405 12.9685 23.1206 13.1876C22.9015 13.4074 22.6298 13.5174 22.3053 13.5174H20.0152ZM19.3281 20.8459L17.496 19.4718C17.2288 19.2809 17.0761 19.0328 17.038 18.7275C16.9998 18.4221 17.0761 18.1359 17.267 17.8687C17.4578 17.6015 17.7059 17.4488 18.0113 17.4106C18.3166 17.3725 18.6029 17.4488 18.8701 17.6397L20.7022 19.0138C20.9694 19.2046 21.1221 19.4527 21.1602 19.7581C21.1984 20.0634 21.1221 20.3497 20.9312 20.6169C20.7404 20.884 20.4923 21.0367 20.1869 21.0749C19.8816 21.1131 19.5953 21.0367 19.3281 20.8459ZM18.8701 7.10493C18.6029 7.29578 18.3166 7.37212 18.0113 7.33395C17.7059 7.29578 17.4578 7.1431 17.267 6.87592C17.0761 6.60873 16.9998 6.32246 17.038 6.01711C17.0761 5.71176 17.2288 5.46366 17.496 5.27281L19.3281 3.89871C19.5953 3.70787 19.8816 3.63153 20.1869 3.6697C20.4923 3.70787 20.7404 3.86055 20.9312 4.12773C21.1221 4.39492 21.1984 4.68118 21.1602 4.98654C21.1221 5.29189 20.9694 5.53999 20.7022 5.73084L18.8701 7.10493ZM3.98406 21.6602V15.8075H2.83899C2.20919 15.8075 1.67024 15.5831 1.22213 15.1342C0.773264 14.6861 0.548828 14.1472 0.548828 13.5174V11.2272C0.548828 10.5974 0.773264 10.0581 1.22213 9.60922C1.67024 9.16111 2.20919 8.93706 2.83899 8.93706H7.4193L11.3984 6.5324C11.7801 6.30338 12.1668 6.30338 12.5584 6.5324C12.9493 6.76141 13.1447 7.09539 13.1447 7.53434V17.2103C13.1447 17.6492 12.9493 17.9832 12.5584 18.2122C12.1668 18.4412 11.7801 18.4412 11.3984 18.2122L7.4193 15.8075H6.27422V21.6602H3.98406ZM14.2898 16.2083V8.53628C14.8051 8.99431 15.2203 9.55273 15.5356 10.2115C15.8501 10.8696 16.0074 11.5898 16.0074 12.3723C16.0074 13.1548 15.8501 13.875 15.5356 14.5331C15.2203 15.1919 14.8051 15.7503 14.2898 16.2083Z",
|
|
513
|
+
fill: "#505050"
|
|
514
|
+
}
|
|
515
|
+
)),
|
|
516
|
+
"chatbot-white-border": /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 33 34", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
517
|
+
"path",
|
|
518
|
+
{
|
|
519
|
+
d: "M20.7249 1.17695H21.1499V1.1766C27.1029 1.40539 31.8779 6.41961 31.8779 12.5765V22.1994C31.8779 28.3489 27.0016 33.3184 21.0054 33.3184H2.1677C1.21133 33.3184 0.425039 32.5301 0.425039 31.5332V12.296C0.425039 6.14663 5.3011 1.17695 11.306 1.17695H20.7249Z",
|
|
520
|
+
fill: "#472D7A",
|
|
521
|
+
stroke: "white",
|
|
522
|
+
"stroke-width": "0.850077"
|
|
523
|
+
}
|
|
524
|
+
), /* @__PURE__ */ import_react12.default.createElement(
|
|
525
|
+
"path",
|
|
526
|
+
{
|
|
527
|
+
d: "M9.24976 13.3416C7.92364 13.3416 6.85254 14.4382 6.85254 15.7898C6.85254 17.1414 7.92364 18.238 9.24976 18.238C10.5759 18.238 11.647 17.1414 11.647 15.7898C11.647 14.4382 10.5759 13.3416 9.24976 13.3416Z",
|
|
528
|
+
fill: "white"
|
|
529
|
+
}
|
|
530
|
+
), /* @__PURE__ */ import_react12.default.createElement(
|
|
531
|
+
"path",
|
|
532
|
+
{
|
|
533
|
+
d: "M23.2839 13.3416C21.9578 13.3416 20.8867 14.4382 20.8867 15.7898C20.8867 17.1414 21.9578 18.238 23.2839 18.238C24.6101 18.238 25.6812 17.1414 25.6812 15.7898C25.6812 14.4382 24.6101 13.3416 23.2839 13.3416Z",
|
|
534
|
+
fill: "white"
|
|
535
|
+
}
|
|
536
|
+
), /* @__PURE__ */ import_react12.default.createElement(
|
|
537
|
+
"path",
|
|
538
|
+
{
|
|
539
|
+
d: "M19.5011 23.5C18.362 23.7125 17.1634 23.8316 15.9223 23.8316C14.6811 23.8316 13.4825 23.7125 12.3434 23.5C11.7399 23.3895 11.3743 24.2566 11.8844 24.6986C13.0405 25.7017 14.4261 26.2883 15.9223 26.2883C17.4184 26.2883 18.804 25.7017 19.9601 24.6986C20.4702 24.2566 20.1046 23.381 19.5011 23.5Z",
|
|
540
|
+
fill: "white"
|
|
541
|
+
}
|
|
542
|
+
)),
|
|
543
|
+
dashboard: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
544
|
+
"path",
|
|
545
|
+
{
|
|
546
|
+
d: "M5.3457 21.6602C4.7957 21.6602 4.3247 21.4645 3.9327 21.0732C3.54137 20.6812 3.3457 20.2102 3.3457 19.6602V5.66016C3.3457 5.11016 3.54137 4.63916 3.9327 4.24716C4.3247 3.85582 4.7957 3.66016 5.3457 3.66016H9.3457C9.8957 3.66016 10.3667 3.85582 10.7587 4.24716C11.15 4.63916 11.3457 5.11016 11.3457 5.66016V19.6602C11.3457 20.2102 11.15 20.6812 10.7587 21.0732C10.3667 21.4645 9.8957 21.6602 9.3457 21.6602H5.3457ZM15.3457 10.6602C14.7957 10.6602 14.325 10.4642 13.9337 10.0722C13.5417 9.68082 13.3457 9.21016 13.3457 8.66016V5.66016C13.3457 5.11016 13.5417 4.63916 13.9337 4.24716C14.325 3.85582 14.7957 3.66016 15.3457 3.66016H19.3457C19.8957 3.66016 20.3667 3.85582 20.7587 4.24716C21.15 4.63916 21.3457 5.11016 21.3457 5.66016V8.66016C21.3457 9.21016 21.15 9.68082 20.7587 10.0722C20.3667 10.4642 19.8957 10.6602 19.3457 10.6602H15.3457ZM15.3457 21.6602C14.7957 21.6602 14.325 21.4645 13.9337 21.0732C13.5417 20.6812 13.3457 20.2102 13.3457 19.6602V14.6602C13.3457 14.1102 13.5417 13.6392 13.9337 13.2472C14.325 12.8558 14.7957 12.6602 15.3457 12.6602H19.3457C19.8957 12.6602 20.3667 12.8558 20.7587 13.2472C21.15 13.6392 21.3457 14.1102 21.3457 14.6602V19.6602C21.3457 20.2102 21.15 20.6812 20.7587 21.0732C20.3667 21.4645 19.8957 21.6602 19.3457 21.6602H15.3457Z",
|
|
547
|
+
fill: "#505050"
|
|
548
|
+
}
|
|
549
|
+
)),
|
|
550
|
+
discard: /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 26 27", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
551
|
+
"path",
|
|
552
|
+
{
|
|
553
|
+
d: "M7.75303 22.3289C7.21349 22.3289 6.75177 22.137 6.36787 21.7531C5.98332 21.3685 5.79105 20.9065 5.79105 20.3669V7.61405C5.5131 7.61405 5.27995 7.52021 5.0916 7.33251C4.90391 7.14416 4.81006 6.91101 4.81006 6.63306C4.81006 6.35512 4.90391 6.12197 5.0916 5.93362C5.27995 5.74592 5.5131 5.65207 5.79105 5.65207H9.71501C9.71501 5.37413 9.80919 5.14098 9.99754 4.95263C10.1852 4.76493 10.4181 4.67108 10.696 4.67108H14.62C14.8979 4.67108 15.1311 4.76493 15.3194 4.95263C15.5071 5.14098 15.601 5.37413 15.601 5.65207H19.5249C19.8029 5.65207 20.0357 5.74592 20.2234 5.93362C20.4117 6.12197 20.5059 6.35512 20.5059 6.63306C20.5059 6.91101 20.4117 7.14416 20.2234 7.33251C20.0357 7.52021 19.8029 7.61405 19.5249 7.61405V20.3669C19.5249 20.9065 19.333 21.3685 18.9491 21.7531C18.5645 22.137 18.1025 22.3289 17.5629 22.3289H7.75303ZM9.71501 17.424C9.71501 17.7019 9.80919 17.9347 9.99754 18.1224C10.1852 18.3108 10.4181 18.405 10.696 18.405C10.974 18.405 11.2071 18.3108 11.3955 18.1224C11.5831 17.9347 11.677 17.7019 11.677 17.424V10.557C11.677 10.2791 11.5831 10.0459 11.3955 9.85758C11.2071 9.66988 10.974 9.57604 10.696 9.57604C10.4181 9.57604 10.1852 9.66988 9.99754 9.85758C9.80919 10.0459 9.71501 10.2791 9.71501 10.557V17.424ZM13.639 17.424C13.639 17.7019 13.7332 17.9347 13.9215 18.1224C14.1092 18.3108 14.342 18.405 14.62 18.405C14.8979 18.405 15.1311 18.3108 15.3194 18.1224C15.5071 17.9347 15.601 17.7019 15.601 17.424V10.557C15.601 10.2791 15.5071 10.0459 15.3194 9.85758C15.1311 9.66988 14.8979 9.57604 14.62 9.57604C14.342 9.57604 14.1092 9.66988 13.9215 9.85758C13.7332 10.0459 13.639 10.2791 13.639 10.557V17.424Z",
|
|
554
|
+
fill: "#A3A3A3"
|
|
555
|
+
}
|
|
556
|
+
)),
|
|
557
|
+
"discard-red": /* @__PURE__ */ import_react12.default.createElement("svg", { viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
558
|
+
"path",
|
|
559
|
+
{
|
|
560
|
+
d: "M7.75254 21.4868C7.213 21.4868 6.75128 21.2948 6.36738 20.9109C5.98284 20.5264 5.79056 20.0643 5.79056 19.5248V6.77189C5.51261 6.77189 5.27947 6.67804 5.09111 6.49035C4.90342 6.302 4.80957 6.06885 4.80957 5.7909C4.80957 5.51295 4.90342 5.2798 5.09111 5.09145C5.27947 4.90376 5.51261 4.80991 5.79056 4.80991H9.71453C9.71453 4.53196 9.8087 4.29881 9.99705 4.11046C10.1847 3.92277 10.4176 3.82892 10.6955 3.82892H14.6195C14.8974 3.82892 15.1306 3.92277 15.3189 4.11046C15.5066 4.29881 15.6005 4.53196 15.6005 4.80991H19.5244C19.8024 4.80991 20.0352 4.90376 20.2229 5.09145C20.4113 5.2798 20.5054 5.51295 20.5054 5.7909C20.5054 6.06885 20.4113 6.302 20.2229 6.49035C20.0352 6.67804 19.8024 6.77189 19.5244 6.77189V19.5248C19.5244 20.0643 19.3325 20.5264 18.9486 20.9109C18.564 21.2948 18.102 21.4868 17.5625 21.4868H7.75254ZM9.71453 16.5818C9.71453 16.8597 9.8087 17.0926 9.99705 17.2803C10.1847 17.4686 10.4176 17.5628 10.6955 17.5628C10.9735 17.5628 11.2066 17.4686 11.395 17.2803C11.5827 17.0926 11.6765 16.8597 11.6765 16.5818V9.71486C11.6765 9.43692 11.5827 9.20377 11.395 9.01542C11.2066 8.82772 10.9735 8.73387 10.6955 8.73387C10.4176 8.73387 10.1847 8.82772 9.99705 9.01542C9.8087 9.20377 9.71453 9.43692 9.71453 9.71486V16.5818ZM13.6385 16.5818C13.6385 16.8597 13.7327 17.0926 13.921 17.2803C14.1087 17.4686 14.3415 17.5628 14.6195 17.5628C14.8974 17.5628 15.1306 17.4686 15.3189 17.2803C15.5066 17.0926 15.6005 16.8597 15.6005 16.5818V9.71486C15.6005 9.43692 15.5066 9.20377 15.3189 9.01542C15.1306 8.82772 14.8974 8.73387 14.6195 8.73387C14.3415 8.73387 14.1087 8.82772 13.921 9.01542C13.7327 9.20377 13.6385 9.43692 13.6385 9.71486V16.5818Z",
|
|
561
|
+
fill: "#D9363E"
|
|
562
|
+
}
|
|
563
|
+
))
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
// src/Components/Button.tsx
|
|
567
|
+
var ButtonElement = (props) => {
|
|
568
|
+
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0] === "text-white";
|
|
569
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
437
570
|
"button",
|
|
438
571
|
{
|
|
439
572
|
onClick: props.onClick,
|
|
440
|
-
className:
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
},
|
|
445
|
-
props.isLoading ? /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("svg", { className: "animate-spin h-5 w-5 mr-3", viewBox: "0 0 24 24" }), props.label) : /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, props.isSVGStylesOverride === false ? props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon, alt: props.label }) : svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
446
|
-
"span",
|
|
447
|
-
{
|
|
448
|
-
dangerouslySetInnerHTML: { __html: svgContent }
|
|
573
|
+
className: props.className ? props.className : "",
|
|
574
|
+
disabled: props.loading,
|
|
575
|
+
style: {
|
|
576
|
+
cursor: props.loading ? "no-drop" : "pointer"
|
|
449
577
|
}
|
|
450
|
-
|
|
578
|
+
},
|
|
579
|
+
props.icon ? /* @__PURE__ */ import_react13.default.createElement("span", { className: props.iconsClassName }, props.isSVGStylesOverride === false ? /* @__PURE__ */ import_react13.default.createElement("img", { src: props.icon, className: props.iconsClassName }) : icons[props.icon], /* @__PURE__ */ import_react13.default.createElement("style", null, textColorClass && `.${props.className?.match(/text-[\w-]+/g)?.[0]} path {
|
|
580
|
+
filter: brightness(0) invert(1);
|
|
581
|
+
}`, `.${props.className?.match(/text-[\w-]+/g)?.[0]}:hover path {
|
|
582
|
+
filter: brightness(0) invert(1);
|
|
583
|
+
}`)) : "",
|
|
584
|
+
props.label
|
|
451
585
|
);
|
|
452
586
|
};
|
|
453
587
|
|
|
454
588
|
// src/Components/AddMoreTable.tsx
|
|
455
|
-
var
|
|
589
|
+
var import_react14 = __toESM(require("react"));
|
|
456
590
|
var import_antd10 = require("antd");
|
|
457
|
-
var
|
|
591
|
+
var import_icons3 = require("@ant-design/icons");
|
|
458
592
|
var AddMoreTable = (props) => {
|
|
459
593
|
const { thead, tbody } = props;
|
|
460
|
-
const [rows, setRows] = (0,
|
|
594
|
+
const [rows, setRows] = (0, import_react14.useState)(tbody || []);
|
|
461
595
|
const onHandleRows = () => {
|
|
462
596
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
463
597
|
let newRow = {
|
|
@@ -522,16 +656,15 @@ var AddMoreTable = (props) => {
|
|
|
522
656
|
});
|
|
523
657
|
});
|
|
524
658
|
};
|
|
525
|
-
(0,
|
|
526
|
-
console.log(rows);
|
|
659
|
+
(0, import_react14.useEffect)(() => {
|
|
527
660
|
}, [rows]);
|
|
528
661
|
const renderInputElement = (element, value) => {
|
|
529
662
|
if (!element) return null;
|
|
530
663
|
const { element: type, label } = element;
|
|
531
664
|
if (type === "single-select") {
|
|
532
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ import_react14.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
533
666
|
} else if (type === "textarea") {
|
|
534
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ import_react14.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
|
|
535
668
|
} else {
|
|
536
669
|
return null;
|
|
537
670
|
}
|
|
@@ -548,13 +681,13 @@ var AddMoreTable = (props) => {
|
|
|
548
681
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
549
682
|
Object.keys(variable).forEach((key) => {
|
|
550
683
|
if (key === "SubRows") {
|
|
551
|
-
rowData[`${key}`] = /* @__PURE__ */
|
|
684
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react14.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react14.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ import_react14.default.createElement(import_icons3.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react14.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ import_react14.default.createElement(import_icons3.PlusOutlined, null)));
|
|
552
685
|
} else {
|
|
553
686
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
554
687
|
}
|
|
555
688
|
});
|
|
556
689
|
});
|
|
557
|
-
rowData.actions = /* @__PURE__ */
|
|
690
|
+
rowData.actions = /* @__PURE__ */ import_react14.default.createElement("div", null, /* @__PURE__ */ import_react14.default.createElement(import_antd10.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react14.default.createElement(import_icons3.DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react14.default.createElement(import_antd10.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react14.default.createElement(import_icons3.PlusOutlined, null)));
|
|
558
691
|
console.log("=====rowdata", rowData);
|
|
559
692
|
return rowData;
|
|
560
693
|
});
|
|
@@ -570,7 +703,7 @@ var AddMoreTable = (props) => {
|
|
|
570
703
|
key: "actions"
|
|
571
704
|
});
|
|
572
705
|
}
|
|
573
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
574
707
|
import_antd10.Table,
|
|
575
708
|
{
|
|
576
709
|
columns,
|
|
@@ -582,19 +715,19 @@ var AddMoreTable = (props) => {
|
|
|
582
715
|
};
|
|
583
716
|
|
|
584
717
|
// src/Components/Sidebar.tsx
|
|
585
|
-
var
|
|
718
|
+
var import_react15 = __toESM(require("react"));
|
|
586
719
|
var Sidebar = (props) => {
|
|
587
720
|
const handleChange = (item) => {
|
|
588
721
|
if (props.onChange) {
|
|
589
722
|
props.onChange(item);
|
|
590
723
|
}
|
|
591
724
|
};
|
|
592
|
-
return /* @__PURE__ */
|
|
593
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, { key: props.name }, /* @__PURE__ */ import_react15.default.createElement("div", { className: props.imgClassName }, /* @__PURE__ */ import_react15.default.createElement("img", { src: props.img, alt: "logo" })), /* @__PURE__ */ import_react15.default.createElement("div", { className: props.listClassName }, props.items?.map((item) => {
|
|
726
|
+
return /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, { key: item.label }, /* @__PURE__ */ import_react15.default.createElement(
|
|
594
727
|
ButtonElement,
|
|
595
728
|
{
|
|
596
729
|
...item,
|
|
597
|
-
className:
|
|
730
|
+
className: item.active ? props.activeClassName : props.className,
|
|
598
731
|
iconsClassName: props.iconsClassName,
|
|
599
732
|
onClick: (e) => {
|
|
600
733
|
e.preventDefault();
|
|
@@ -606,29 +739,29 @@ var Sidebar = (props) => {
|
|
|
606
739
|
};
|
|
607
740
|
|
|
608
741
|
// src/Components/Navbar.tsx
|
|
609
|
-
var
|
|
742
|
+
var import_react19 = __toESM(require("react"));
|
|
610
743
|
|
|
611
744
|
// src/Components/Notification.tsx
|
|
612
|
-
var
|
|
745
|
+
var import_react16 = __toESM(require("react"));
|
|
613
746
|
var import_antd11 = require("antd");
|
|
614
747
|
var import_io = require("react-icons/io");
|
|
615
748
|
var popoverContentStyle = {
|
|
616
749
|
minWidth: "300px",
|
|
617
750
|
maxWidth: "100%"
|
|
618
751
|
};
|
|
619
|
-
var Notification = (props) => /* @__PURE__ */
|
|
752
|
+
var Notification = (props) => /* @__PURE__ */ import_react16.default.createElement(
|
|
620
753
|
import_antd11.Popover,
|
|
621
754
|
{
|
|
622
755
|
className: props.className,
|
|
623
|
-
content: /* @__PURE__ */
|
|
756
|
+
content: /* @__PURE__ */ import_react16.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react16.default.createElement(
|
|
624
757
|
import_antd11.List,
|
|
625
758
|
{
|
|
626
759
|
itemLayout: "horizontal",
|
|
627
760
|
dataSource: props.items,
|
|
628
|
-
renderItem: (item, index) => /* @__PURE__ */
|
|
761
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react16.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react16.default.createElement(
|
|
629
762
|
import_antd11.List.Item.Meta,
|
|
630
763
|
{
|
|
631
|
-
avatar: /* @__PURE__ */
|
|
764
|
+
avatar: /* @__PURE__ */ import_react16.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
632
765
|
title: item.text,
|
|
633
766
|
description: item.time
|
|
634
767
|
}
|
|
@@ -638,28 +771,28 @@ var Notification = (props) => /* @__PURE__ */ import_react14.default.createEleme
|
|
|
638
771
|
trigger: "focus",
|
|
639
772
|
placement: "bottomRight"
|
|
640
773
|
},
|
|
641
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ import_react16.default.createElement(import_antd11.Button, { className: props.buttonClassName }, /* @__PURE__ */ import_react16.default.createElement(import_antd11.Badge, { size: "small", count: props.count }, /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ import_react16.default.createElement(import_io.IoIosNotifications, null))))
|
|
642
775
|
);
|
|
643
776
|
|
|
644
777
|
// src/Components/SpanElement.tsx
|
|
645
|
-
var
|
|
646
|
-
var SpanElement = (props) => /* @__PURE__ */
|
|
778
|
+
var import_react17 = __toESM(require("react"));
|
|
779
|
+
var SpanElement = (props) => /* @__PURE__ */ import_react17.default.createElement("span", { className: props.className }, props.label);
|
|
647
780
|
|
|
648
781
|
// src/Components/Profile.tsx
|
|
649
|
-
var
|
|
782
|
+
var import_react18 = __toESM(require("react"));
|
|
650
783
|
var import_antd12 = require("antd");
|
|
651
|
-
var
|
|
652
|
-
var Profile = (props) => /* @__PURE__ */
|
|
784
|
+
var import_icons4 = require("@ant-design/icons");
|
|
785
|
+
var Profile = (props) => /* @__PURE__ */ import_react18.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react18.default.createElement(import_antd12.Avatar, { style: { backgroundColor: "#87d068", marginRight: "10px" }, icon: /* @__PURE__ */ import_react18.default.createElement(import_icons4.UserOutlined, null) }), /* @__PURE__ */ import_react18.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react18.default.createElement("p", null, props.primaryText), /* @__PURE__ */ import_react18.default.createElement("p", { className: props.secondTextClassName }, " ", props.secondaryText)));
|
|
653
786
|
|
|
654
787
|
// src/Components/Navbar.tsx
|
|
655
788
|
var Navbar = (props) => {
|
|
656
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: `${props.className}` }, props.items && props.items.map((item) => {
|
|
657
790
|
if (item.element === "span") {
|
|
658
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ import_react19.default.createElement(SpanElement, { key: item.name, ...item });
|
|
659
792
|
} else if (item.element === "notifications") {
|
|
660
|
-
return /* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ import_react19.default.createElement(Notification, { key: item.name, ...item });
|
|
661
794
|
} else if (item.name === "profile") {
|
|
662
|
-
return /* @__PURE__ */
|
|
795
|
+
return /* @__PURE__ */ import_react19.default.createElement(Profile, { key: item.name, ...item });
|
|
663
796
|
}
|
|
664
797
|
return null;
|
|
665
798
|
}));
|
|
@@ -667,81 +800,31 @@ var Navbar = (props) => {
|
|
|
667
800
|
|
|
668
801
|
// src/Components/TableElement.tsx
|
|
669
802
|
var import_react20 = __toESM(require("react"));
|
|
670
|
-
var import_antd14 = require("antd");
|
|
671
|
-
|
|
672
|
-
// src/Components/Model.tsx
|
|
673
|
-
var import_react19 = __toESM(require("react"));
|
|
674
803
|
var import_antd13 = require("antd");
|
|
675
|
-
|
|
676
|
-
// src/Components/ModelBody.tsx
|
|
677
|
-
var import_react18 = __toESM(require("react"));
|
|
678
|
-
var ModelBody = (props) => {
|
|
679
|
-
return /* @__PURE__ */ import_react18.default.createElement("div", { className: props.modalContent && props.modalContent.className }, props.modalContent && props.modalContent.fields.map((eachField) => {
|
|
680
|
-
if (eachField.element === "div") {
|
|
681
|
-
return /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, eachField.label);
|
|
682
|
-
} else if (eachField.element === "input-radio") {
|
|
683
|
-
return /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react18.default.createElement(RadioElement, { ...eachField }));
|
|
684
|
-
} else if (eachField.element === "button") {
|
|
685
|
-
return /* @__PURE__ */ import_react18.default.createElement("div", { className: eachField.className }, /* @__PURE__ */ import_react18.default.createElement(ButtonElement, { ...eachField }));
|
|
686
|
-
} else {
|
|
687
|
-
return null;
|
|
688
|
-
}
|
|
689
|
-
}));
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
// src/Components/Model.tsx
|
|
693
|
-
var ModelElement = (props) => {
|
|
694
|
-
const { model, onCancel, selectedRecord, columns } = props;
|
|
695
|
-
return /* @__PURE__ */ import_react19.default.createElement(
|
|
696
|
-
import_antd13.Modal,
|
|
697
|
-
{
|
|
698
|
-
centered: true,
|
|
699
|
-
open: model,
|
|
700
|
-
onCancel,
|
|
701
|
-
footer: null,
|
|
702
|
-
width: 850,
|
|
703
|
-
title: /* @__PURE__ */ import_react19.default.createElement(
|
|
704
|
-
"div",
|
|
705
|
-
{
|
|
706
|
-
style: {
|
|
707
|
-
display: "flex",
|
|
708
|
-
flexWrap: "wrap",
|
|
709
|
-
padding: "20px",
|
|
710
|
-
width: "full",
|
|
711
|
-
margin: "-10px"
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
Object.entries(selectedRecord).map(([key, value]) => {
|
|
715
|
-
const record = columns.filter((eachColumn) => eachColumn.key === key);
|
|
716
|
-
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)) : "";
|
|
717
|
-
})
|
|
718
|
-
)
|
|
719
|
-
},
|
|
720
|
-
/* @__PURE__ */ import_react19.default.createElement(ModelBody, { ...props })
|
|
721
|
-
);
|
|
722
|
-
};
|
|
723
|
-
|
|
724
|
-
// src/Components/TableElement.tsx
|
|
725
804
|
var TableElement = (props) => {
|
|
726
805
|
const { thead, tbody } = props;
|
|
727
|
-
const [
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
806
|
+
const [dataSource, setDataSource] = (0, import_react20.useState)([]);
|
|
807
|
+
(0, import_react20.useEffect)(() => {
|
|
808
|
+
if (tbody) {
|
|
809
|
+
setDataSource(
|
|
810
|
+
tbody.map((row, index) => ({
|
|
811
|
+
...row,
|
|
812
|
+
key: index,
|
|
813
|
+
index: index + 1
|
|
814
|
+
}))
|
|
815
|
+
);
|
|
733
816
|
}
|
|
734
|
-
};
|
|
817
|
+
}, [tbody]);
|
|
735
818
|
let columns = [];
|
|
736
819
|
if (thead) {
|
|
737
820
|
columns = [
|
|
738
821
|
{
|
|
739
822
|
title: "#",
|
|
740
|
-
dataIndex: "
|
|
741
|
-
key: "
|
|
823
|
+
dataIndex: "index",
|
|
824
|
+
key: "index",
|
|
742
825
|
fixed: "left"
|
|
743
826
|
},
|
|
744
|
-
...thead.map((col
|
|
827
|
+
...thead.map((col) => ({
|
|
745
828
|
title: col.label,
|
|
746
829
|
dataIndex: col.name,
|
|
747
830
|
key: col.key,
|
|
@@ -749,86 +832,66 @@ var TableElement = (props) => {
|
|
|
749
832
|
render: col.render,
|
|
750
833
|
sorter: {
|
|
751
834
|
compare: (a, b) => {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
return
|
|
835
|
+
const aValue = a[col.key];
|
|
836
|
+
const bValue = b[col.key];
|
|
837
|
+
if (typeof aValue === "number" && typeof bValue === "number") {
|
|
838
|
+
return aValue - bValue;
|
|
839
|
+
} else if (typeof aValue === "string" && typeof bValue === "string") {
|
|
840
|
+
return aValue.localeCompare(bValue);
|
|
841
|
+
} else {
|
|
842
|
+
return 0;
|
|
756
843
|
}
|
|
757
844
|
}
|
|
758
845
|
}
|
|
759
846
|
}))
|
|
760
847
|
];
|
|
761
|
-
if (props.view) {
|
|
762
|
-
columns.push({
|
|
763
|
-
title: "View",
|
|
764
|
-
dataIndex: "View",
|
|
765
|
-
key: "View",
|
|
766
|
-
render: (_, record) => /* @__PURE__ */ import_react20.default.createElement(
|
|
767
|
-
"a",
|
|
768
|
-
{
|
|
769
|
-
onClick: () => {
|
|
770
|
-
setSelectedRecord(record);
|
|
771
|
-
handleChange(record);
|
|
772
|
-
setModel(true);
|
|
773
|
-
}
|
|
774
|
-
},
|
|
775
|
-
"View"
|
|
776
|
-
)
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
848
|
}
|
|
780
|
-
const dataSource = tbody && tbody.map((row, index) => ({
|
|
781
|
-
...row,
|
|
782
|
-
key: index + 1,
|
|
783
|
-
[columns[0].key]: index + 1
|
|
784
|
-
}));
|
|
785
|
-
const count = dataSource ? dataSource.length : 0;
|
|
786
849
|
const onChangePage = (page, pageSize) => {
|
|
787
850
|
if (props.onChange) {
|
|
788
851
|
props.onChange({ name: "pagination", page, pageSize });
|
|
789
852
|
}
|
|
790
853
|
};
|
|
791
854
|
const rowSelectionConfig = props.rowSelection ? {
|
|
792
|
-
onChange: (
|
|
793
|
-
console.log(`selectedRowKeys: ${selectedRowKeys}`, "selectedRows: ", selectedRows);
|
|
855
|
+
onChange: (selectedRows) => {
|
|
794
856
|
if (props.onChange) {
|
|
795
857
|
props.onChange(selectedRows);
|
|
796
858
|
}
|
|
797
859
|
}
|
|
798
860
|
} : void 0;
|
|
799
861
|
return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
800
|
-
|
|
862
|
+
import_antd13.Table,
|
|
801
863
|
{
|
|
864
|
+
loading: props.loading,
|
|
802
865
|
className: props.className,
|
|
803
|
-
pagination: {
|
|
866
|
+
pagination: props.pagination ? {
|
|
867
|
+
current: props.value?.page,
|
|
804
868
|
showTotal: (total) => `Total: ${total} items`,
|
|
805
|
-
total: count,
|
|
806
|
-
showSizeChanger: count > 10,
|
|
869
|
+
total: props.count,
|
|
870
|
+
showSizeChanger: props.count ? props.count > 10 : 0 > 10,
|
|
807
871
|
onChange: onChangePage
|
|
808
|
-
},
|
|
872
|
+
} : false,
|
|
809
873
|
rowSelection: rowSelectionConfig,
|
|
810
874
|
dataSource,
|
|
811
875
|
columns,
|
|
812
876
|
size: props.size,
|
|
813
877
|
bordered: true
|
|
814
878
|
}
|
|
815
|
-
)
|
|
879
|
+
));
|
|
816
880
|
};
|
|
817
881
|
|
|
818
882
|
// src/Components/DatePicker.tsx
|
|
819
883
|
var import_react21 = __toESM(require("react"));
|
|
820
|
-
var
|
|
884
|
+
var import_antd14 = require("antd");
|
|
821
885
|
var import_dayjs = __toESM(require("dayjs"));
|
|
822
886
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
823
887
|
import_dayjs.default.extend(import_customParseFormat.default);
|
|
824
888
|
var DatePickerElement = (props) => {
|
|
825
|
-
const [dateState, setDateState] = (0, import_react21.useState)(
|
|
889
|
+
const [dateState, setDateState] = (0, import_react21.useState)(props.value);
|
|
826
890
|
const handleChange = (date, dateString) => {
|
|
827
891
|
if (date) {
|
|
828
|
-
const formattedDate = dateString;
|
|
829
892
|
setDateState(date);
|
|
830
893
|
if (props.onChange) {
|
|
831
|
-
props.onChange(
|
|
894
|
+
props.onChange(dateString);
|
|
832
895
|
}
|
|
833
896
|
} else {
|
|
834
897
|
setDateState("");
|
|
@@ -837,37 +900,105 @@ var DatePickerElement = (props) => {
|
|
|
837
900
|
}
|
|
838
901
|
}
|
|
839
902
|
};
|
|
840
|
-
|
|
841
|
-
|
|
903
|
+
const disabledDate = (current) => {
|
|
904
|
+
if (props.enabled_dates === "from_today") {
|
|
905
|
+
return current && current < (0, import_dayjs.default)().startOf("day");
|
|
906
|
+
}
|
|
907
|
+
return current && current > (0, import_dayjs.default)().endOf("day");
|
|
908
|
+
};
|
|
909
|
+
const disabledTime = (current) => {
|
|
910
|
+
if (!current) return {};
|
|
911
|
+
if (props.enabled_dates === "from_today") {
|
|
912
|
+
if (current.isSame((0, import_dayjs.default)(), "day")) {
|
|
913
|
+
const hours = Array.from({ length: 24 }, (_, i) => i < (0, import_dayjs.default)().hour() ? i : null).filter(
|
|
914
|
+
(v) => v !== null
|
|
915
|
+
);
|
|
916
|
+
const minutes = Array.from({ length: 60 }, (_, i) => i < (0, import_dayjs.default)().minute() ? i : null).filter(
|
|
917
|
+
(v) => v !== null
|
|
918
|
+
);
|
|
919
|
+
return {
|
|
920
|
+
disabledHours: () => hours,
|
|
921
|
+
disabledMinutes: (selectedHour) => selectedHour === (0, import_dayjs.default)().hour() ? minutes : []
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
} else {
|
|
925
|
+
if (current.isSame((0, import_dayjs.default)(), "day")) {
|
|
926
|
+
const hours = Array.from({ length: 24 }, (_, i) => i > (0, import_dayjs.default)().hour() ? i : null).filter(
|
|
927
|
+
(v) => v !== null
|
|
928
|
+
);
|
|
929
|
+
const minutes = Array.from({ length: 60 }, (_, i) => i > (0, import_dayjs.default)().minute() ? i : null).filter(
|
|
930
|
+
(v) => v !== null
|
|
931
|
+
);
|
|
932
|
+
return {
|
|
933
|
+
disabledHours: () => hours,
|
|
934
|
+
disabledMinutes: (selectedHour) => selectedHour === (0, import_dayjs.default)().hour() ? minutes : []
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
return {};
|
|
939
|
+
};
|
|
940
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react21.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react21.default.createElement(
|
|
941
|
+
import_antd14.DatePicker,
|
|
842
942
|
{
|
|
943
|
+
disabledTime,
|
|
944
|
+
disabledDate,
|
|
945
|
+
showTime: true,
|
|
946
|
+
className: props.className,
|
|
843
947
|
placeholder: props.placeholder,
|
|
844
948
|
value: dateState,
|
|
845
|
-
format:
|
|
846
|
-
onChange: handleChange
|
|
949
|
+
format: "DD-MM-YYYY HH:mm",
|
|
950
|
+
onChange: handleChange,
|
|
951
|
+
picker: props.picker
|
|
847
952
|
}
|
|
848
953
|
));
|
|
849
954
|
};
|
|
850
955
|
|
|
851
956
|
// src/Components/DateRangePickerElement.tsx
|
|
852
957
|
var import_react22 = __toESM(require("react"));
|
|
853
|
-
var
|
|
958
|
+
var import_antd15 = require("antd");
|
|
854
959
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
855
960
|
var DateRangePickerElement = (props) => {
|
|
856
|
-
const {
|
|
961
|
+
const { value } = props;
|
|
962
|
+
const { RangePicker } = import_antd15.DatePicker;
|
|
963
|
+
const dateValues = value ? value.map((date) => (0, import_dayjs2.default)(date, "DD-MM-YYYY")) : null;
|
|
964
|
+
const today = (0, import_dayjs2.default)();
|
|
857
965
|
const handleChange = (dates, dateStrings) => {
|
|
858
|
-
if (dates
|
|
859
|
-
|
|
966
|
+
if (dates) {
|
|
967
|
+
let [start, end] = dates;
|
|
968
|
+
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
969
|
+
end = today;
|
|
970
|
+
}
|
|
971
|
+
const adjustedDates = [start, end].map(
|
|
972
|
+
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
973
|
+
);
|
|
974
|
+
console.log("1", adjustedDates);
|
|
975
|
+
props.onChange && props.onChange(adjustedDates);
|
|
860
976
|
} else {
|
|
861
|
-
|
|
977
|
+
props.onChange && props.onChange("");
|
|
862
978
|
}
|
|
863
979
|
};
|
|
864
|
-
|
|
865
|
-
{ label: "Last 7 Days", value: [(0, import_dayjs2.default)().
|
|
866
|
-
{ label: "Last 14 Days", value: [(0, import_dayjs2.default)().
|
|
867
|
-
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().
|
|
868
|
-
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().
|
|
980
|
+
let rangePresets = [
|
|
981
|
+
{ label: "Last 7 Days", value: [(0, import_dayjs2.default)().subtract(6, "d"), today] },
|
|
982
|
+
{ label: "Last 14 Days", value: [(0, import_dayjs2.default)().subtract(13, "d"), today] },
|
|
983
|
+
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().subtract(29, "d"), today] },
|
|
984
|
+
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().subtract(89, "d"), today] }
|
|
869
985
|
];
|
|
870
|
-
|
|
986
|
+
const disabledDate = (current) => {
|
|
987
|
+
if (props.weekrange) {
|
|
988
|
+
return current && current < today.subtract(7, "d") || current > today;
|
|
989
|
+
}
|
|
990
|
+
return current && current > today;
|
|
991
|
+
};
|
|
992
|
+
return /* @__PURE__ */ import_react22.default.createElement(import_antd15.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react22.default.createElement(
|
|
993
|
+
RangePicker,
|
|
994
|
+
{
|
|
995
|
+
disabledDate,
|
|
996
|
+
...!props.weekrange && { presets: rangePresets },
|
|
997
|
+
format: "DD-MM-YYYY",
|
|
998
|
+
onChange: handleChange,
|
|
999
|
+
value: dateValues
|
|
1000
|
+
}
|
|
1001
|
+
));
|
|
871
1002
|
};
|
|
872
1003
|
|
|
873
1004
|
// src/Components/Image.tsx
|
|
@@ -878,23 +1009,23 @@ var Image = (props) => {
|
|
|
878
1009
|
|
|
879
1010
|
// src/Components/SingleCheckbox.tsx
|
|
880
1011
|
var import_react24 = __toESM(require("react"));
|
|
881
|
-
var
|
|
1012
|
+
var import_antd16 = require("antd");
|
|
882
1013
|
var SingleCheckbox = (props) => {
|
|
883
1014
|
const handleChange = (e) => {
|
|
884
1015
|
if (props.onChange) {
|
|
885
1016
|
props.onChange(e.target.checked);
|
|
886
1017
|
}
|
|
887
1018
|
};
|
|
888
|
-
return /* @__PURE__ */ import_react24.default.createElement(
|
|
1019
|
+
return /* @__PURE__ */ import_react24.default.createElement(import_antd16.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
889
1020
|
};
|
|
890
1021
|
|
|
891
1022
|
// src/Components/DropDownGroup.tsx
|
|
892
1023
|
var import_react25 = __toESM(require("react"));
|
|
893
|
-
var
|
|
1024
|
+
var import_antd17 = require("antd");
|
|
894
1025
|
var DropDownGroup = (props) => {
|
|
895
1026
|
const [selectedValue, setSelectedValue] = (0, import_react25.useState)({
|
|
896
|
-
firstValue:
|
|
897
|
-
secondValue:
|
|
1027
|
+
firstValue: props.value.firstValue,
|
|
1028
|
+
secondValue: props.value.secondValue,
|
|
898
1029
|
temp: ""
|
|
899
1030
|
});
|
|
900
1031
|
const handleFirstChange = (value) => {
|
|
@@ -924,32 +1055,48 @@ var DropDownGroup = (props) => {
|
|
|
924
1055
|
return newValue;
|
|
925
1056
|
});
|
|
926
1057
|
};
|
|
1058
|
+
const firstFilterOptions = (input, option) => {
|
|
1059
|
+
return (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
1060
|
+
};
|
|
1061
|
+
const secondFilterOptions = (input, option) => {
|
|
1062
|
+
return (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
1063
|
+
};
|
|
927
1064
|
return /* @__PURE__ */ import_react25.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react25.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react25.default.createElement("div", { className: props.subContainerClassName }, /* @__PURE__ */ import_react25.default.createElement(
|
|
928
|
-
|
|
1065
|
+
import_antd17.Select,
|
|
929
1066
|
{
|
|
930
1067
|
onChange: handleFirstChange,
|
|
931
1068
|
variant: props.variant,
|
|
932
1069
|
options: props.firstOptions,
|
|
933
|
-
className: props.className
|
|
1070
|
+
className: props.className,
|
|
1071
|
+
filterOption: firstFilterOptions,
|
|
1072
|
+
placeholder: props.firstPlaceholder,
|
|
1073
|
+
value: props.value.firstValue,
|
|
1074
|
+
showSearch: true
|
|
934
1075
|
}
|
|
935
|
-
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "
|
|
936
|
-
|
|
1076
|
+
), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "31px" } }), /* @__PURE__ */ import_react25.default.createElement(
|
|
1077
|
+
import_antd17.Select,
|
|
937
1078
|
{
|
|
938
1079
|
onChange: handleSecondChange,
|
|
939
1080
|
variant: props.variant,
|
|
940
1081
|
options: props.secondOptions,
|
|
941
|
-
className: props.className
|
|
1082
|
+
className: props.className,
|
|
1083
|
+
filterOption: secondFilterOptions,
|
|
1084
|
+
placeholder: props.secondPlaceholder,
|
|
1085
|
+
value: props.value.secondValue,
|
|
1086
|
+
showSearch: true
|
|
942
1087
|
}
|
|
943
1088
|
)));
|
|
944
1089
|
};
|
|
945
1090
|
|
|
946
1091
|
// src/Components/FilesUpload.tsx
|
|
947
1092
|
var import_react26 = __toESM(require("react"));
|
|
948
|
-
var
|
|
949
|
-
var
|
|
1093
|
+
var import_antd18 = require("antd");
|
|
1094
|
+
var import_icons5 = require("@ant-design/icons");
|
|
950
1095
|
var FileUpload = (props) => {
|
|
951
|
-
const { Dragger } =
|
|
952
|
-
const [files, setFiles] = (0, import_react26.useState)(
|
|
1096
|
+
const { Dragger } = import_antd18.Upload;
|
|
1097
|
+
const [files, setFiles] = (0, import_react26.useState)(
|
|
1098
|
+
props.value && props.value.length > 0 ? props.value : []
|
|
1099
|
+
);
|
|
953
1100
|
const handleChange = ({ fileList }) => {
|
|
954
1101
|
setFiles(fileList);
|
|
955
1102
|
if (props.onChange) {
|
|
@@ -977,30 +1124,29 @@ var FileUpload = (props) => {
|
|
|
977
1124
|
showUploadList: true,
|
|
978
1125
|
customRequest
|
|
979
1126
|
},
|
|
980
|
-
/* @__PURE__ */ import_react26.default.createElement("p", null, /* @__PURE__ */ import_react26.default.createElement(
|
|
1127
|
+
/* @__PURE__ */ import_react26.default.createElement("p", null, /* @__PURE__ */ import_react26.default.createElement(import_icons5.InboxOutlined, null)),
|
|
981
1128
|
/* @__PURE__ */ import_react26.default.createElement("p", null, "Click or drag file to upload")
|
|
982
1129
|
));
|
|
983
1130
|
};
|
|
984
1131
|
|
|
985
1132
|
// src/Components/TabsElement.tsx
|
|
986
1133
|
var import_react27 = __toESM(require("react"));
|
|
987
|
-
var
|
|
1134
|
+
var import_antd19 = require("antd");
|
|
988
1135
|
var TabsElement = (props) => {
|
|
989
1136
|
const handleChange = (key) => {
|
|
990
1137
|
if (props.onChange) {
|
|
991
1138
|
props.onChange(props.options?.find((eachOption) => eachOption.key === key));
|
|
992
1139
|
}
|
|
993
1140
|
};
|
|
994
|
-
return /* @__PURE__ */ import_react27.default.createElement(
|
|
1141
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_antd19.Tabs, { defaultActiveKey: props.value, className: props.containerClassName, items: props.options, onChange: handleChange });
|
|
995
1142
|
};
|
|
996
1143
|
|
|
997
1144
|
// src/Components/SwitchElement.tsx
|
|
998
1145
|
var import_react28 = __toESM(require("react"));
|
|
999
|
-
var
|
|
1146
|
+
var import_antd20 = require("antd");
|
|
1000
1147
|
var onChange = (checked) => {
|
|
1001
|
-
console.log(`switch to ${checked}`);
|
|
1002
1148
|
};
|
|
1003
|
-
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(
|
|
1149
|
+
var SwitchElement = () => /* @__PURE__ */ import_react28.default.createElement(import_antd20.Switch, { defaultChecked: true, onChange });
|
|
1004
1150
|
|
|
1005
1151
|
// src/Components/Upload.tsx
|
|
1006
1152
|
var import_react29 = __toESM(require("react"));
|
|
@@ -1009,12 +1155,12 @@ var Upload2 = (props) => {
|
|
|
1009
1155
|
const handleFileChange = (e) => {
|
|
1010
1156
|
setFile(e.target.files[0]);
|
|
1011
1157
|
if (props.onChange) {
|
|
1158
|
+
console.log(e.target.files[0]);
|
|
1012
1159
|
props.onChange(e.target.files[0]);
|
|
1013
1160
|
}
|
|
1014
1161
|
};
|
|
1015
1162
|
const handleUpload = async () => {
|
|
1016
1163
|
if (!file) {
|
|
1017
|
-
console.error("No file selected");
|
|
1018
1164
|
return;
|
|
1019
1165
|
}
|
|
1020
1166
|
};
|
|
@@ -1032,7 +1178,7 @@ var Upload2 = (props) => {
|
|
|
1032
1178
|
|
|
1033
1179
|
// src/Components/OtpElement.tsx
|
|
1034
1180
|
var import_react30 = __toESM(require("react"));
|
|
1035
|
-
var
|
|
1181
|
+
var import_antd21 = require("antd");
|
|
1036
1182
|
var OtpElement = (props) => {
|
|
1037
1183
|
const length = props.length;
|
|
1038
1184
|
const [otp, setOtp] = (0, import_react30.useState)(Array(length).fill(""));
|
|
@@ -1072,7 +1218,7 @@ var OtpElement = (props) => {
|
|
|
1072
1218
|
inputRefs.current[0]?.focus();
|
|
1073
1219
|
}, []);
|
|
1074
1220
|
return /* @__PURE__ */ import_react30.default.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ import_react30.default.createElement(
|
|
1075
|
-
|
|
1221
|
+
import_antd21.Input,
|
|
1076
1222
|
{
|
|
1077
1223
|
key: index,
|
|
1078
1224
|
className: props.className,
|
|
@@ -1086,79 +1232,519 @@ var OtpElement = (props) => {
|
|
|
1086
1232
|
)));
|
|
1087
1233
|
};
|
|
1088
1234
|
|
|
1089
|
-
// src/Components/
|
|
1235
|
+
// src/Components/CircleDonut.tsx
|
|
1090
1236
|
var import_react31 = __toESM(require("react"));
|
|
1091
|
-
var
|
|
1092
|
-
var
|
|
1093
|
-
|
|
1094
|
-
|
|
1237
|
+
var import_react_chartjs_2 = require("react-chartjs-2");
|
|
1238
|
+
var import_chart = require("chart.js");
|
|
1239
|
+
import_chart.Chart.register(import_chart.DoughnutController, import_chart.ArcElement, import_chart.Tooltip, import_chart.Legend);
|
|
1240
|
+
var CircleDonut = (props) => {
|
|
1241
|
+
const data = {
|
|
1242
|
+
labels: props.labels,
|
|
1243
|
+
datasets: [
|
|
1244
|
+
{
|
|
1245
|
+
label: "Bot Conversation",
|
|
1246
|
+
data: props.data,
|
|
1247
|
+
backgroundColor: [
|
|
1248
|
+
"#FFCB8A",
|
|
1249
|
+
"#CADBBF",
|
|
1250
|
+
"#8AC1BB",
|
|
1251
|
+
"#FCB0CB",
|
|
1252
|
+
"#CEB0FA"
|
|
1253
|
+
],
|
|
1254
|
+
borderWidth: 0
|
|
1255
|
+
}
|
|
1256
|
+
]
|
|
1257
|
+
};
|
|
1258
|
+
const options = {
|
|
1259
|
+
responsive: true,
|
|
1260
|
+
cutout: "80%",
|
|
1261
|
+
plugins: {
|
|
1262
|
+
legend: {
|
|
1263
|
+
position: "left",
|
|
1264
|
+
labels: {
|
|
1265
|
+
font: {
|
|
1266
|
+
size: 10
|
|
1267
|
+
},
|
|
1268
|
+
boxWidth: 15,
|
|
1269
|
+
generateLabels: (chart) => {
|
|
1270
|
+
const dataset = chart.data.datasets[0];
|
|
1271
|
+
return chart.data.labels.map((label, index) => {
|
|
1272
|
+
const value = dataset.data[index];
|
|
1273
|
+
return {
|
|
1274
|
+
text: `${label}: ${value}`,
|
|
1275
|
+
fillStyle: dataset.backgroundColor[index]
|
|
1276
|
+
};
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
tooltip: {
|
|
1282
|
+
enabled: true,
|
|
1283
|
+
callbacks: {
|
|
1284
|
+
label: function(context) {
|
|
1285
|
+
const label = context.label || "";
|
|
1286
|
+
const value = context.raw || 0;
|
|
1287
|
+
return `${label}: ${value}`;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
const centerTextPlugin = {
|
|
1294
|
+
id: "centerText",
|
|
1295
|
+
beforeDraw: (chart) => {
|
|
1296
|
+
const { ctx, chartArea: { left, right, top, bottom } } = chart;
|
|
1297
|
+
const width = right - left;
|
|
1298
|
+
const height = bottom - top;
|
|
1299
|
+
const centerX = left + width / 2;
|
|
1300
|
+
const centerY = top + height / 2;
|
|
1301
|
+
ctx.save();
|
|
1302
|
+
ctx.font = "7px Arial";
|
|
1303
|
+
ctx.fillStyle = "blue";
|
|
1304
|
+
ctx.textAlign = "center";
|
|
1305
|
+
ctx.textBaseline = "middle";
|
|
1306
|
+
ctx.fillText("Total Sessions", centerX, centerY - 10);
|
|
1307
|
+
ctx.font = "25px Arial";
|
|
1308
|
+
ctx.fillStyle = "black";
|
|
1309
|
+
ctx.fillText("85", centerX, centerY + 20);
|
|
1310
|
+
ctx.restore();
|
|
1311
|
+
}
|
|
1312
|
+
};
|
|
1313
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react31.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react31.default.createElement(import_react_chartjs_2.Doughnut, { data, options, plugins: [centerTextPlugin] }));
|
|
1095
1314
|
};
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
var
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1315
|
+
|
|
1316
|
+
// src/Components/SemiCircleDonut.tsx
|
|
1317
|
+
var import_react32 = __toESM(require("react"));
|
|
1318
|
+
var import_react_chartjs_22 = require("react-chartjs-2");
|
|
1319
|
+
var import_chart2 = require("chart.js");
|
|
1320
|
+
import_chart2.Chart.register(import_chart2.DoughnutController, import_chart2.ArcElement, import_chart2.Tooltip, import_chart2.Legend);
|
|
1321
|
+
var SemiCircleDonut = (props) => {
|
|
1322
|
+
const data = {
|
|
1323
|
+
labels: [
|
|
1324
|
+
"Registration",
|
|
1325
|
+
"Book Appointment",
|
|
1326
|
+
"Diagnostic Tests",
|
|
1327
|
+
"Hospital Facility",
|
|
1328
|
+
"Others, Prescriptions"
|
|
1329
|
+
],
|
|
1330
|
+
datasets: [
|
|
1331
|
+
{
|
|
1332
|
+
label: "Bot Conversation",
|
|
1333
|
+
data: [30, 10, 27, 40, 12],
|
|
1334
|
+
backgroundColor: [
|
|
1335
|
+
"#FFCB8A",
|
|
1336
|
+
"#CADBBF",
|
|
1337
|
+
"#8AC1BB",
|
|
1338
|
+
"#FCB0CB",
|
|
1339
|
+
"#CEB0FA"
|
|
1340
|
+
],
|
|
1341
|
+
borderWidth: 0
|
|
1111
1342
|
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1343
|
+
]
|
|
1344
|
+
};
|
|
1345
|
+
const options = {
|
|
1346
|
+
responsive: true,
|
|
1347
|
+
circumference: 180,
|
|
1348
|
+
rotation: -90,
|
|
1349
|
+
cutout: "80%",
|
|
1350
|
+
plugins: {
|
|
1351
|
+
legend: {
|
|
1352
|
+
display: false
|
|
1353
|
+
// Disable the legend
|
|
1354
|
+
},
|
|
1355
|
+
tooltip: {
|
|
1356
|
+
enabled: true,
|
|
1357
|
+
callbacks: {
|
|
1358
|
+
label: function(context) {
|
|
1359
|
+
const label = context.label || "";
|
|
1360
|
+
const value = context.raw || 0;
|
|
1361
|
+
return `${label}: ${value}`;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
};
|
|
1367
|
+
const centerTextPlugin = {
|
|
1368
|
+
id: "centerText",
|
|
1369
|
+
beforeDraw: (chart) => {
|
|
1370
|
+
const { ctx, chartArea: { left, right, top, bottom } } = chart;
|
|
1371
|
+
const width = right - left;
|
|
1372
|
+
const height = bottom - top;
|
|
1373
|
+
const centerX = left + width / 2;
|
|
1374
|
+
const centerY = top + height / 1.5;
|
|
1375
|
+
const maxWidth = width * 0.8;
|
|
1376
|
+
ctx.save();
|
|
1377
|
+
ctx.fillStyle = "black";
|
|
1378
|
+
ctx.textAlign = "center";
|
|
1379
|
+
ctx.textBaseline = "middle";
|
|
1380
|
+
const drawText = (text, y, fontSize) => {
|
|
1381
|
+
ctx.font = `${fontSize}px Arial`;
|
|
1382
|
+
const textWidth = ctx.measureText(text).width;
|
|
1383
|
+
if (textWidth > maxWidth) {
|
|
1384
|
+
const newFontSize = fontSize * maxWidth / textWidth;
|
|
1385
|
+
ctx.font = `${newFontSize}px Arial`;
|
|
1386
|
+
}
|
|
1387
|
+
ctx.fillText(text, centerX, y);
|
|
1388
|
+
};
|
|
1389
|
+
drawText(props.fillText1, centerY - 10, 16);
|
|
1390
|
+
drawText(props.fillText2, centerY + 20, 8);
|
|
1391
|
+
ctx.restore();
|
|
1392
|
+
}
|
|
1393
|
+
};
|
|
1394
|
+
return /* @__PURE__ */ import_react32.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react32.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react32.default.createElement(import_react_chartjs_22.Doughnut, { data, options, plugins: [centerTextPlugin] }));
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
// src/Components/HorizontalBarChart.tsx
|
|
1398
|
+
var import_react33 = __toESM(require("react"));
|
|
1399
|
+
var import_react_chartjs_23 = require("react-chartjs-2");
|
|
1400
|
+
var import_chart3 = require("chart.js");
|
|
1401
|
+
import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip);
|
|
1402
|
+
var HorizontalBarChart = (props) => {
|
|
1403
|
+
const data = {
|
|
1404
|
+
labels: ["18-24", "25-34", "35-44", "45-54", "55-64", "65+"],
|
|
1405
|
+
datasets: [
|
|
1114
1406
|
{
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1407
|
+
data: [30, 10, 27, 40, 12, 24],
|
|
1408
|
+
backgroundColor: "#6298D5",
|
|
1409
|
+
barThickness: 15
|
|
1410
|
+
}
|
|
1411
|
+
]
|
|
1412
|
+
};
|
|
1413
|
+
const options = {
|
|
1414
|
+
responsive: true,
|
|
1415
|
+
indexAxis: "y",
|
|
1416
|
+
scales: {
|
|
1417
|
+
x: {
|
|
1418
|
+
beginAtZero: true,
|
|
1419
|
+
ticks: {
|
|
1420
|
+
callback: function(value) {
|
|
1421
|
+
return `${value}%`;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
y: {
|
|
1426
|
+
grid: {
|
|
1427
|
+
display: false
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
plugins: {
|
|
1432
|
+
tooltip: {
|
|
1433
|
+
enabled: true,
|
|
1434
|
+
callbacks: {
|
|
1435
|
+
label: function(context) {
|
|
1436
|
+
const label = context.label || "";
|
|
1437
|
+
const value = context.raw || 0;
|
|
1438
|
+
return `${label}: ${value}`;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
legend: {
|
|
1443
|
+
display: false
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react33.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react33.default.createElement(import_react_chartjs_23.Bar, { data, options }));
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
// src/Components/LineChart.tsx
|
|
1451
|
+
var import_react34 = __toESM(require("react"));
|
|
1452
|
+
var import_auto = __toESM(require("chart.js/auto"));
|
|
1453
|
+
var LineChart = (props) => {
|
|
1454
|
+
const chartRef = (0, import_react34.useRef)(null);
|
|
1455
|
+
const chartInstance = (0, import_react34.useRef)(null);
|
|
1456
|
+
const data = [
|
|
1457
|
+
{ label: "ROI", data: [10, 13, 20, 15, 10] },
|
|
1458
|
+
{ label: "Engagement Rate", data: [20, 23, 30, 28, 20] },
|
|
1459
|
+
{ label: "Conversion Rate", data: [50, 100, 150, 180, 50] }
|
|
1460
|
+
];
|
|
1461
|
+
const labels = ["Instagram", "Whatsapp", "Messages", "Telegram", "Linkedin"];
|
|
1462
|
+
(0, import_react34.useEffect)(() => {
|
|
1463
|
+
if (chartRef.current) {
|
|
1464
|
+
if (chartInstance.current) {
|
|
1465
|
+
chartInstance.current.destroy();
|
|
1466
|
+
}
|
|
1467
|
+
chartInstance.current = new import_auto.default(chartRef.current, {
|
|
1468
|
+
type: "line",
|
|
1469
|
+
data: {
|
|
1470
|
+
labels,
|
|
1471
|
+
datasets: data.map((dataset, index) => ({
|
|
1472
|
+
label: dataset.label,
|
|
1473
|
+
data: dataset.data,
|
|
1474
|
+
borderColor: index === 0 ? "#FF8F00" : index === 1 ? "#F50057" : "#254AAA",
|
|
1475
|
+
backgroundColor: "rgba(0, 0, 0, 0)",
|
|
1476
|
+
pointBackgroundColor: index === 0 ? "#FF8F00" : index === 1 ? "#F50057" : "#254AAA",
|
|
1477
|
+
pointBorderColor: "white",
|
|
1478
|
+
pointStyle: "circle",
|
|
1479
|
+
pointRadius: 3,
|
|
1480
|
+
tension: 0.1,
|
|
1481
|
+
fill: true
|
|
1482
|
+
}))
|
|
1483
|
+
},
|
|
1484
|
+
options: {
|
|
1485
|
+
plugins: {
|
|
1486
|
+
legend: {
|
|
1487
|
+
labels: {
|
|
1488
|
+
usePointStyle: true
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1123
1491
|
},
|
|
1124
|
-
{
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1492
|
+
scales: {
|
|
1493
|
+
x: {
|
|
1494
|
+
grid: {
|
|
1495
|
+
display: false
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
y: {
|
|
1499
|
+
beginAtZero: true,
|
|
1500
|
+
suggestedMax: 200,
|
|
1501
|
+
ticks: {
|
|
1502
|
+
callback: function(value) {
|
|
1503
|
+
return value + "%";
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
grid: {
|
|
1507
|
+
display: true
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
return () => {
|
|
1515
|
+
if (chartInstance.current) {
|
|
1516
|
+
chartInstance.current.destroy();
|
|
1517
|
+
}
|
|
1518
|
+
};
|
|
1519
|
+
}, [labels, data]);
|
|
1520
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react34.default.createElement("canvas", { ref: chartRef }));
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
// src/Components/DoubleBarChart.tsx
|
|
1524
|
+
var import_react35 = __toESM(require("react"));
|
|
1525
|
+
var import_auto2 = __toESM(require("chart.js/auto"));
|
|
1526
|
+
var DoubleBarChart = (props) => {
|
|
1527
|
+
const chartRef = (0, import_react35.useRef)(null);
|
|
1528
|
+
const chartInstance = (0, import_react35.useRef)(null);
|
|
1529
|
+
(0, import_react35.useEffect)(() => {
|
|
1530
|
+
if (chartRef.current) {
|
|
1531
|
+
if (chartInstance.current) {
|
|
1532
|
+
chartInstance.current.destroy();
|
|
1533
|
+
}
|
|
1534
|
+
chartInstance.current = new import_auto2.default(chartRef.current, {
|
|
1535
|
+
type: "bar",
|
|
1536
|
+
data: {
|
|
1537
|
+
labels: [
|
|
1538
|
+
"Summer Health Tips",
|
|
1539
|
+
"New Services Launch",
|
|
1540
|
+
"Discounts on Checkups",
|
|
1541
|
+
"Wellness Webinar",
|
|
1542
|
+
"LinkedIn Insights"
|
|
1543
|
+
],
|
|
1544
|
+
datasets: [
|
|
1545
|
+
{
|
|
1546
|
+
label: "Engagement Rate",
|
|
1547
|
+
data: [60, 70, 50, 80, 65],
|
|
1548
|
+
// Example data for male
|
|
1549
|
+
backgroundColor: "#93B8E2",
|
|
1550
|
+
barThickness: 10
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
label: "Conversion Rate",
|
|
1554
|
+
data: [70, 65, 75, 55, 85],
|
|
1555
|
+
// Example data for female
|
|
1556
|
+
backgroundColor: "#4484CD",
|
|
1557
|
+
barThickness: 10
|
|
1558
|
+
}
|
|
1559
|
+
]
|
|
1560
|
+
},
|
|
1561
|
+
options: {
|
|
1562
|
+
scales: {
|
|
1563
|
+
x: {
|
|
1564
|
+
grid: {
|
|
1565
|
+
display: false
|
|
1566
|
+
// Display x-axis grid lines
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
y: {
|
|
1570
|
+
beginAtZero: true,
|
|
1571
|
+
suggestedMax: 100,
|
|
1572
|
+
ticks: {
|
|
1573
|
+
callback: function(value) {
|
|
1574
|
+
return value + "%";
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
grid: {
|
|
1578
|
+
display: true
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1129
1581
|
},
|
|
1130
|
-
{
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1582
|
+
plugins: {
|
|
1583
|
+
legend: {
|
|
1584
|
+
labels: {
|
|
1585
|
+
usePointStyle: true
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1135
1588
|
}
|
|
1136
|
-
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
return () => {
|
|
1593
|
+
if (chartInstance.current) {
|
|
1594
|
+
chartInstance.current.destroy();
|
|
1595
|
+
}
|
|
1596
|
+
};
|
|
1597
|
+
}, []);
|
|
1598
|
+
return /* @__PURE__ */ import_react35.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react35.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react35.default.createElement("canvas", { ref: chartRef }));
|
|
1599
|
+
};
|
|
1600
|
+
|
|
1601
|
+
// src/Components/BarChart.tsx
|
|
1602
|
+
var import_react36 = __toESM(require("react"));
|
|
1603
|
+
var import_react_chartjs_24 = require("react-chartjs-2");
|
|
1604
|
+
var import_chart4 = require("chart.js");
|
|
1605
|
+
import_chart4.Chart.register(import_chart4.BarElement, import_chart4.CategoryScale, import_chart4.LinearScale, import_chart4.Tooltip);
|
|
1606
|
+
var BarChart = (props) => {
|
|
1607
|
+
const data = {
|
|
1608
|
+
labels: [
|
|
1609
|
+
"17 June",
|
|
1610
|
+
"18 June",
|
|
1611
|
+
"19 June",
|
|
1612
|
+
"20 June",
|
|
1613
|
+
"21 June",
|
|
1614
|
+
"22 June",
|
|
1615
|
+
"23 June"
|
|
1616
|
+
],
|
|
1617
|
+
datasets: [
|
|
1618
|
+
{
|
|
1619
|
+
data: [30, 100, 270, 140, 120, 240],
|
|
1620
|
+
backgroundColor: "#1565C0",
|
|
1621
|
+
barThickness: 15
|
|
1137
1622
|
}
|
|
1138
1623
|
]
|
|
1139
1624
|
};
|
|
1140
|
-
|
|
1625
|
+
const options = {
|
|
1626
|
+
responsive: true,
|
|
1627
|
+
scales: {
|
|
1628
|
+
x: {
|
|
1629
|
+
beginAtZero: true,
|
|
1630
|
+
grid: {
|
|
1631
|
+
display: false
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
y: {
|
|
1635
|
+
grid: {
|
|
1636
|
+
display: true
|
|
1637
|
+
},
|
|
1638
|
+
ticks: {
|
|
1639
|
+
min: 0,
|
|
1640
|
+
max: 400,
|
|
1641
|
+
stepSize: 200,
|
|
1642
|
+
callback: function(value) {
|
|
1643
|
+
return `${value}`;
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
},
|
|
1648
|
+
plugins: {
|
|
1649
|
+
tooltip: {
|
|
1650
|
+
enabled: true,
|
|
1651
|
+
callbacks: {
|
|
1652
|
+
label: function(context) {
|
|
1653
|
+
const label = context.label || "";
|
|
1654
|
+
const value = context.raw || 0;
|
|
1655
|
+
return ` ${label}: ${value}`;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
legend: {
|
|
1660
|
+
display: false
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
};
|
|
1664
|
+
return /* @__PURE__ */ import_react36.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react36.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react36.default.createElement(import_react_chartjs_24.Bar, { data, options }));
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
// src/Components/DivContainer.tsx
|
|
1668
|
+
var import_react37 = __toESM(require("react"));
|
|
1669
|
+
var DivContainer = (props) => {
|
|
1670
|
+
return /* @__PURE__ */ import_react37.default.createElement("div", { className: props.className, onClick: props.onClick }, props.label);
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
// src/Components/ColorPickerElement.tsx
|
|
1674
|
+
var import_react38 = __toESM(require("react"));
|
|
1675
|
+
var import_antd22 = require("antd");
|
|
1676
|
+
var ColorPickerElement = (props) => {
|
|
1677
|
+
const onHandleChange = (value, hex) => {
|
|
1678
|
+
console.log(hex);
|
|
1679
|
+
props.onChange && props.onChange(hex);
|
|
1680
|
+
};
|
|
1681
|
+
return /* @__PURE__ */ import_react38.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react38.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react38.default.createElement("br", null), /* @__PURE__ */ import_react38.default.createElement(
|
|
1682
|
+
import_antd22.ColorPicker,
|
|
1683
|
+
{
|
|
1684
|
+
className: props.className,
|
|
1685
|
+
showText: true,
|
|
1686
|
+
value: props.value,
|
|
1687
|
+
onChange: onHandleChange
|
|
1688
|
+
}
|
|
1689
|
+
));
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
// src/Components/NotificationAlert.tsx
|
|
1693
|
+
var import_react39 = __toESM(require("react"));
|
|
1694
|
+
var import_antd23 = require("antd");
|
|
1695
|
+
var NotificationAlert = (props) => {
|
|
1696
|
+
const [api, contextHolder] = import_antd23.notification.useNotification();
|
|
1697
|
+
const openNotificationType = (pauseOnHover, type) => {
|
|
1698
|
+
api[type]({
|
|
1699
|
+
message: props.message,
|
|
1700
|
+
description: props.description,
|
|
1701
|
+
duration: 4.5,
|
|
1702
|
+
pauseOnHover,
|
|
1703
|
+
showProgress: props.showProgress
|
|
1704
|
+
});
|
|
1705
|
+
};
|
|
1706
|
+
const openNotification = (pauseOnHover) => {
|
|
1707
|
+
api.open({
|
|
1708
|
+
message: props.message,
|
|
1709
|
+
description: props.description,
|
|
1710
|
+
duration: 4.5,
|
|
1711
|
+
showProgress: props.showProgress,
|
|
1712
|
+
pauseOnHover
|
|
1713
|
+
});
|
|
1714
|
+
};
|
|
1715
|
+
const handleClick = () => {
|
|
1716
|
+
const notificationType = props.notificationType || "info";
|
|
1717
|
+
props.notificationType ? openNotificationType(true, notificationType) : openNotification(true);
|
|
1718
|
+
};
|
|
1719
|
+
return /* @__PURE__ */ import_react39.default.createElement("div", { className: props.containerClassName }, contextHolder, /* @__PURE__ */ import_react39.default.createElement(ButtonElement, { ...props, onClick: handleClick }));
|
|
1141
1720
|
};
|
|
1142
|
-
var Donut_default = Donut;
|
|
1143
1721
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1144
1722
|
0 && (module.exports = {
|
|
1145
1723
|
AddMoreTable,
|
|
1724
|
+
BarChart,
|
|
1146
1725
|
ButtonElement,
|
|
1147
1726
|
CheckboxElement,
|
|
1727
|
+
CircleDonut,
|
|
1148
1728
|
CkEditor,
|
|
1729
|
+
ColorPickerElement,
|
|
1149
1730
|
DatePickerElement,
|
|
1150
1731
|
DateRangePickerElement,
|
|
1151
|
-
|
|
1732
|
+
DivContainer,
|
|
1733
|
+
DoubleBarChart,
|
|
1152
1734
|
DropDownGroup,
|
|
1153
1735
|
FileUpload,
|
|
1736
|
+
HorizontalBarChart,
|
|
1154
1737
|
Image,
|
|
1738
|
+
LineChart,
|
|
1155
1739
|
MultipleSelectElement,
|
|
1156
1740
|
Navbar,
|
|
1741
|
+
NotificationAlert,
|
|
1157
1742
|
NumberElement,
|
|
1158
1743
|
OtpElement,
|
|
1159
1744
|
PasswordElement,
|
|
1160
1745
|
RadioElement,
|
|
1161
1746
|
SelectElement,
|
|
1747
|
+
SemiCircleDonut,
|
|
1162
1748
|
Sidebar,
|
|
1163
1749
|
SingleCheckbox,
|
|
1164
1750
|
SingleSelectElement,
|