@unifiedsoftware/react-components 1.0.16 → 1.0.18

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.mjs DELETED
@@ -1,809 +0,0 @@
1
- // src/components/DropdownEnumList.tsx
2
- import { DropDownList } from "@progress/kendo-react-dropdowns";
3
- import { useEffect, useState } from "react";
4
- import { Fragment, jsx } from "react/jsx-runtime";
5
- function parsearDataForComboBox(array, key, text, itemAll = false) {
6
- const dataForComboBox = [];
7
- if (itemAll)
8
- dataForComboBox.push({ key: "", text: "ALL" });
9
- if (array !== void 0) {
10
- array.map((a) => {
11
- dataForComboBox.push({ key: a[key], text: a[text] });
12
- });
13
- }
14
- return dataForComboBox;
15
- }
16
- function GetEnumDescription(key, typeEnum, description) {
17
- const listLabel = description.get(typeEnum);
18
- let label = void 0;
19
- if (listLabel != void 0)
20
- label = listLabel.get(parseInt(key));
21
- if (label == void 0) {
22
- label = typeEnum[key];
23
- return label.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
24
- }
25
- return label;
26
- }
27
- function EnumToArray(typeEnum, replaceGuionForSpace = true, description) {
28
- const values = [];
29
- for (const key in typeEnum) {
30
- if (typeof typeEnum[key] === "string")
31
- values.push({
32
- value: Number(key),
33
- label: replaceGuionForSpace ? GetEnumDescription(key, typeEnum, description) : typeEnum[key]
34
- });
35
- }
36
- return values;
37
- }
38
- var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) => {
39
- const [value, setValue] = useState("");
40
- const [data, setData] = useState([]);
41
- useEffect(() => {
42
- setData(
43
- parsearDataForComboBox(EnumToArray(dataEnum, true, description), "value", "label", false).sort(
44
- (a, b) => Number(a.key) - Number(b.key)
45
- )
46
- );
47
- }, []);
48
- useEffect(() => {
49
- if (data.length > 0) {
50
- setValue(data.filter((x) => x.key == defaultValue)[0]);
51
- }
52
- }, [data]);
53
- const handleOptionClick = (e) => {
54
- onChange(e);
55
- setValue(e);
56
- };
57
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
58
- DropDownList,
59
- {
60
- className: "d-inline-block align-middle mr-2",
61
- data,
62
- dataItemKey: "key",
63
- id: "cmbDisplay",
64
- name: "cmbDisplay",
65
- onChange: (event) => {
66
- handleOptionClick(event.value);
67
- },
68
- textField: "text",
69
- style: {
70
- width: `${width}px`
71
- },
72
- defaultValue: value
73
- }
74
- ) });
75
- };
76
-
77
- // src/contexts/BreadCrumbContext.tsx
78
- import { useLocalStorage } from "@unifiedsoftware/react-ui";
79
- import { createContext, useState as useState2 } from "react";
80
- import { jsx as jsx2 } from "react/jsx-runtime";
81
- var BreadCrumbContext = createContext({});
82
- var BreadCrumbContextProvider = ({ children }) => {
83
- const [active, setActive] = useLocalStorage("@active", "");
84
- const [path, setPath] = useLocalStorage("@path", "/");
85
- const [goBack, setGoBack] = useLocalStorage("@goBack", false);
86
- const [pathChild, setPathChild] = useLocalStorage("@pathChild", "");
87
- const [routes, setRoutes] = useState2([]);
88
- return /* @__PURE__ */ jsx2(
89
- BreadCrumbContext.Provider,
90
- {
91
- value: {
92
- active,
93
- setActive,
94
- path,
95
- setPath,
96
- goBack,
97
- setGoBack,
98
- pathChild,
99
- setPathChild,
100
- routes,
101
- setRoutes
102
- },
103
- children
104
- }
105
- );
106
- };
107
-
108
- // src/contexts/DrawerContext.tsx
109
- import { createContext as createContext2, useState as useState3 } from "react";
110
- import { jsx as jsx3 } from "react/jsx-runtime";
111
- var DrawerContext = createContext2({});
112
- var DrawerContextProvider = ({ children }) => {
113
- const [active, setActive] = useState3(false);
114
- return /* @__PURE__ */ jsx3(DrawerContext.Provider, { value: { active, setActive }, children });
115
- };
116
-
117
- // src/contexts/HistoryContext.tsx
118
- import { useLocalStorage as useLocalStorage2 } from "@unifiedsoftware/react-ui";
119
- import { createContext as createContext3 } from "react";
120
- import { jsx as jsx4 } from "react/jsx-runtime";
121
- var HistoryContext = createContext3({});
122
- var HistoryContextProvider = ({ children }) => {
123
- const [list, setList] = useLocalStorage2("@list_paths", []);
124
- const updateList = (value) => {
125
- setList(
126
- (prev) => prev.concat({
127
- path: value.path,
128
- name: value.name,
129
- date: /* @__PURE__ */ new Date()
130
- })
131
- );
132
- };
133
- return /* @__PURE__ */ jsx4(HistoryContext.Provider, { value: { list, updateList }, children });
134
- };
135
-
136
- // src/contexts/SidebarMainContext.tsx
137
- import { createContext as createContext4, useState as useState4 } from "react";
138
- import { jsx as jsx5 } from "react/jsx-runtime";
139
- var SidebarMainContext = createContext4({});
140
- var SidebarMainContextProvider = ({ children }) => {
141
- const [open, setOpen] = useState4(true);
142
- return /* @__PURE__ */ jsx5(SidebarMainContext.Provider, { value: { open, setOpen }, children });
143
- };
144
-
145
- // src/contexts/GlobalProvider.tsx
146
- import { jsx as jsx6 } from "react/jsx-runtime";
147
- function GlobalProvider({ children }) {
148
- return /* @__PURE__ */ jsx6(HistoryContextProvider, { children: /* @__PURE__ */ jsx6(BreadCrumbContextProvider, { children: /* @__PURE__ */ jsx6(SidebarMainContextProvider, { children: /* @__PURE__ */ jsx6(DrawerContextProvider, { children }) }) }) });
149
- }
150
-
151
- // src/layout/AppBreadcrumb.tsx
152
- import { Link as Link3, useRouter } from "@unifiedsoftware/react-router";
153
- import { useContext, useEffect as useEffect2 } from "react";
154
- import { MdClose } from "react-icons/md";
155
- import { VscChevronRight } from "react-icons/vsc";
156
-
157
- // src/styled-components/breadcrumb.ts
158
- import styled from "styled-components";
159
- var Breadcrumb = styled.div`
160
- font-family: 'Inter', sans-serif;
161
- padding: 10px 0px;
162
- text-transform: uppercase;
163
- font-weight: bold;
164
- font-size: 0.9rem;
165
- color: #92190e;
166
- display: flex;
167
- justify-content: space-between;
168
- align-items: center;
169
- background-color: white;
170
- align-items: center;
171
-
172
- .link {
173
- color: #92190e;
174
- &:hover {
175
- color: #92190e;
176
- cursor: pointer;
177
- }
178
- }
179
- `;
180
- var BreadCrumbTitle = styled.div`
181
- font-family: 'Inter', sans-serif;
182
- font-weight: bold;
183
- font-size: 1.2rem !important;
184
- color: #92190e;
185
- margin-top: 15px;
186
- `;
187
- var TitlePage = styled.div`
188
- font-family: 'Inter', sans-serif;
189
- font-weight: bold;
190
- font-size: 1.2rem !important;
191
- color: #92190e;
192
- margin-top: 15px;
193
- `;
194
-
195
- // src/styled-components/menu.ts
196
- import { Link } from "@unifiedsoftware/react-router";
197
- import styled2 from "styled-components";
198
- var MenuItem = styled2(Link)`
199
- text-decoration: none;
200
- color: black;
201
- display: flex;
202
- justify-content: ${(props) => props.type === "col" ? "center" : "flex-start"};
203
- align-items: center;
204
- flex-direction: ${(props) => props.type === "col" ? "column" : "row"};
205
- border: 1px solid transparent;
206
- width: ${(props) => props.width ? props.width : "100px"};
207
- padding: 10px;
208
- text-decoration: none !important;
209
- &:hover {
210
- box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
211
- }
212
-
213
- .icon {
214
- width: 30px;
215
- text-decoration: none;
216
- }
217
- .text {
218
- text-align: center;
219
- font-size: 12px;
220
- text-decoration: none !important;
221
- color: black;
222
- margin-top: ${(props) => props.type === "col" ? "0px" : "15px"};
223
- &:hover {
224
- text-decoration: none !important;
225
- }
226
- }
227
- `;
228
- var MenuTitle = styled2.p`
229
- font-size: 16px;
230
- font-weight: bold !important;
231
- `;
232
-
233
- // src/styled-components/navbar.ts
234
- import styled3 from "styled-components";
235
- var Navbar = styled3.nav`
236
- background: ${(props) => {
237
- return !props.$gradient ? ` linear-gradient(
238
- 90.03deg,
239
- #92190e 80.71%,
240
- #f0b92c 107.21%
241
- ) !important` : `#92190e`;
242
- }};
243
- z-index: 10;
244
- width: 100%;
245
- max-width: 100vw;
246
- display: flex;
247
- justify-content: space-between;
248
- padding-top: 10px;
249
- padding-bottom: 10px;
250
- position: sticky;
251
- top: 0px;
252
- height: 40px;
253
- .input {
254
- border-radius: 2px !important;
255
- padding: 2px !important;
256
- font-size: 12px !important;
257
- height: 20px !important;
258
- border: none;
259
- &:focus {
260
- outline: none !important;
261
- }
262
- ::placeholder {
263
- color: #92190e;
264
- }
265
- @media (max-width: 470px) {
266
- display: none;
267
- }
268
- }
269
- .dialog {
270
- z-index: 20000 !important;
271
- position: absolute;
272
- width: 400px;
273
- height: 500px;
274
- min-height: 500px;
275
- overflow: scroll;
276
- overflow-x: hidden;
277
- min-width: 400px;
278
- max-width: 400px;
279
- background-color: white;
280
- border-radius: 20px;
281
- top: 50%;
282
- left: 50%;
283
- transform: translate(-50%, -50%);
284
- }
285
- `;
286
-
287
- // src/styled-components/options.ts
288
- import styled4 from "styled-components";
289
- var MenuOptions = styled4.div`
290
- font-size: bold;
291
- display: flex;
292
- width: 100%;
293
- gap: 10px;
294
- justify-content: flex-start;
295
- border-bottom: 1px solid #e6e6e6;
296
- background-color: white;
297
- flex-wrap: wrap;
298
- .button-option {
299
- display: flex;
300
- flex-direction: row;
301
- justify-content: space-between;
302
- align-items: center;
303
- gap: 5px;
304
- padding: 10px 20px;
305
- font-weight: bold;
306
- background-color: white !important;
307
- border: none;
308
- .icon {
309
- color: #92190e;
310
- }
311
- .text {
312
- @media (max-width: 470px) {
313
- display: none;
314
- }
315
- }
316
- }
317
- `;
318
-
319
- // src/styled-components/sidebar.ts
320
- import { Link as Link2 } from "@unifiedsoftware/react-router";
321
- import styled5 from "styled-components";
322
- var ItemSidebar = styled5.div`
323
- padding: 10px 25px;
324
- display: flex;
325
- align-items: center;
326
- gap: 30px;
327
- font-family: 'Inter', sans-serif;
328
- &:hover {
329
- color: white !important;
330
- text-decoration: none;
331
- background: #92190e;
332
- .icon-sidebar {
333
- color: white !important;
334
- }
335
- }
336
- &:active {
337
- color: white !important;
338
- text-decoration: none;
339
- background: #92190e;
340
- .icon-sidebar {
341
- color: white !important;
342
- }
343
- }
344
- `;
345
- var SidebarNavigation = styled5.nav`
346
- position: ${({ $fixed = true }) => $fixed ? "fixed" : "static"};
347
- top: 0;
348
- left: 0;
349
- min-height: 100vh;
350
- box-shadow: 7px 0px 14px 1px rgba(145, 141, 141, 0.51);
351
- -webkit-box-shadow: 7px 0px 14px 1px rgba(145, 141, 141, 0.51);
352
- -moz-box-shadow: 7px 0px 14px 1px rgba(145, 141, 141, 0.51);
353
- background: white;
354
- font-family: 'Inter', sans-serif;
355
- padding: 0;
356
- width: ${({ $fixed = true, $active = true }) => $fixed ? $active ? "270px" : "0px" : "auto"};
357
- z-index: 11;
358
- transition: width 0.2s ease-in-out;
359
- overflow: hidden;
360
- height: 100vh;
361
- overflow-y: auto;
362
- box-shadow: ${({ $shadow = true }) => $shadow ? "rgba(99, 99, 99, 0.2) 0px 2px 8px 0px" : "none"};
363
-
364
- &::-webkit-scrollbar {
365
- display: none !important;
366
- }
367
- .nav {
368
- flex-wrap: nowrap;
369
- flex-direction: column;
370
- font-size: 12px;
371
-
372
- .nav-item {
373
- .collapse {
374
- z-index: 999;
375
- }
376
-
377
- .collapse.show,
378
- .collapsing {
379
- background: rgba(0, 0, 0);
380
- }
381
-
382
- .nav-link {
383
- align-items: center;
384
- display: flex;
385
- padding-left: 40px;
386
- white-space: nowrap;
387
-
388
- color: #92190e;
389
- i {
390
- margin-right: 20px;
391
- }
392
- .menu-title {
393
- color: inherit;
394
- display: inline-block;
395
- line-height: 1;
396
- color: black;
397
- vertical-align: middle;
398
- cursor: pointer;
399
- }
400
- }
401
-
402
- &.active {
403
- > .nav-link {
404
- color: white;
405
- }
406
-
407
- &.not-navigation-link {
408
- position: relative;
409
- }
410
- }
411
-
412
- &:not(.sub-menu) {
413
- > .nav-item {
414
- &:hover {
415
- &:not(.nav-profile) {
416
- > .nav-link {
417
- background: $sidebar-light-menu-hover-bg;
418
- color: $sidebar-light-menu-hover-color;
419
- }
420
- }
421
- }
422
- }
423
- }
424
-
425
- &.sub-menu {
426
- margin-bottom: 0;
427
- padding: $sidebar-submenu-padding;
428
-
429
- .rtl & {
430
- padding: 0 4rem 0 0;
431
- }
432
-
433
- .nav-item {
434
- .nav-link {
435
- color: $sidebar-light-submenu-color;
436
- padding: $sidebar-submenu-item-padding;
437
- font-size: $sidebar-submenu-font-size;
438
- line-height: 1;
439
- height: auto;
440
-
441
- &.active {
442
- color: $sidebar-light-menu-active-color;
443
- background: transparent;
444
-
445
- &:before {
446
- background: $sidebar-light-menu-active-color;
447
- }
448
- }
449
- }
450
-
451
- &:hover {
452
- > .nav-link {
453
- background: $sidebar-light-submenu-hover-bg;
454
- color: $sidebar-light-submenu-hover-color;
455
-
456
- &:before {
457
- background: $sidebar-light-submenu-hover-color;
458
- }
459
- }
460
- }
461
- }
462
- }
463
-
464
- &.sub-menu2 {
465
- margin-bottom: 0;
466
- padding: $sidebar-submenu2-padding;
467
-
468
- .rtl & {
469
- padding: 0 4rem 0 0;
470
- }
471
-
472
- .nav-item {
473
- .nav-link {
474
- color: $sidebar-light-submenu-color;
475
- padding: $sidebar-submenu-item-padding;
476
- font-size: $sidebar-submenu-font-size;
477
- line-height: 1;
478
- height: auto;
479
-
480
- &.active {
481
- color: $sidebar-light-menu-active-color;
482
- background: transparent;
483
-
484
- &:before {
485
- background: $sidebar-light-menu-active-color;
486
- }
487
- }
488
- }
489
-
490
- &:hover {
491
- > .nav-link {
492
- background: $sidebar-light-submenu-hover-bg;
493
- color: $sidebar-light-submenu-hover-color;
494
-
495
- &:before {
496
- background: $sidebar-light-submenu-hover-color;
497
- }
498
- }
499
- }
500
- }
501
- }
502
- }
503
- }
504
- `;
505
- var ConfigurationOption = styled5.nav`
506
- position: fixed;
507
- top: 50px;
508
- right: 0;
509
- min-height: 100vh;
510
- box-shadow: 7px 0px 14px 1px rgba(201, 196, 196, 0.51);
511
- -webkit-box-shadow: 7px 0px 14px 1px rgba(201, 196, 196, 0.51);
512
- -moz-box-shadow: 7px 0px 14px 1px rgba(201, 196, 196, 0.51);
513
- min-height: calc(100vh);
514
-
515
- font-family: 'Inter', sans-serif;
516
- padding: 0;
517
- width: ${(props) => props.$active ? "300px" : "0px"};
518
- z-index: 11;
519
- transition: width 0.2s ease-in-out;
520
- overflow: hidden !important;
521
- `;
522
- var ItemLinkSidebar = styled5(Link2)`
523
- padding: 10px 25px;
524
- display: flex;
525
- align-items: center;
526
- gap: 30px;
527
- color: #343a40;
528
- text-decoration: none;
529
- font-family: 'Inter', sans-serif;
530
- &:hover {
531
- color: white !important;
532
- text-decoration: none;
533
- background: #92190e;
534
- .icon-sidebar {
535
- color: white !important;
536
- }
537
- }
538
- `;
539
-
540
- // src/styled-components/template.ts
541
- import styled6 from "styled-components";
542
- var Main = styled6.main`
543
- width: 100%;
544
- min-height: 90vh;
545
- display: flex;
546
- flex-direction: column;
547
- justify-content: space-between;
548
- background-color: white;
549
- padding: 10px 60px;
550
- position: relative;
551
- padding-left: ${(props) => {
552
- return props.$activeDrawer ? `300px` : `30px`;
553
- }};
554
- @media (max-width: 470px) {
555
- padding: 10px 10px;
556
- }
557
- `;
558
- var CloseIcon = styled6.button`
559
- color: black;
560
- text-decoration: none;
561
- border: none;
562
- padding: 10px 10px;
563
- background-color: white;
564
- border-radius: 50%;
565
- display: flex;
566
- align-items: center;
567
- justify-content: center;
568
- cursor: pointer;
569
- top: 10px;
570
- right: 10px;
571
- text-align: center;
572
- &:hover {
573
- color: black;
574
- text-decoration: none;
575
- background-color: #e8e8e8;
576
- }
577
- `;
578
-
579
- // src/layout/AppBreadcrumb.tsx
580
- import { jsx as jsx7, jsxs } from "react/jsx-runtime";
581
- var AppBreadCrumb = ({ title, paths }) => {
582
- const { setRoutes } = useContext(BreadCrumbContext);
583
- useEffect2(() => {
584
- if (!(paths == null ? void 0 : paths.length))
585
- return;
586
- setRoutes(paths != null ? paths : []);
587
- }, []);
588
- return /* @__PURE__ */ jsx7(BreadCrumbTitle, { children: title != null ? title : "Home" });
589
- };
590
- var AppBreadCrumbNav = ({ paths }) => {
591
- const router = useRouter();
592
- const { active, path, routes, setRoutes } = useContext(BreadCrumbContext);
593
- const { updateList } = useContext(HistoryContext);
594
- useEffect2(() => {
595
- updateList({ name: active, path });
596
- }, [path, active]);
597
- useEffect2(() => {
598
- setRoutes(paths != null ? paths : []);
599
- }, [paths]);
600
- return /* @__PURE__ */ jsxs(Breadcrumb, { children: [
601
- /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center", children: [
602
- /* @__PURE__ */ jsx7(Link3, { href: "/", className: "link", children: "HOME" }),
603
- routes.length > 0 && /* @__PURE__ */ jsx7(VscChevronRight, { color: "black" }),
604
- routes.length > 0 ? routes.map((i, idx, arr) => {
605
- if (i.route === -1) {
606
- return /* @__PURE__ */ jsxs("span", { className: "link", onClick: () => router.back(), children: [
607
- i.title,
608
- " ",
609
- idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx7(VscChevronRight, { color: "black" })
610
- ] }, idx);
611
- }
612
- return /* @__PURE__ */ jsxs(Link3, { href: i.route, className: "link", children: [
613
- i.title,
614
- " ",
615
- idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx7(VscChevronRight, { color: "black" })
616
- ] }, idx);
617
- }) : ""
618
- ] }),
619
- /* @__PURE__ */ jsx7(
620
- CloseIcon,
621
- {
622
- onClick: () => {
623
- if ((routes == null ? void 0 : routes.length) === 1) {
624
- router.push("/");
625
- setRoutes([]);
626
- return;
627
- }
628
- router.push(`${routes && routes[(routes == null ? void 0 : routes.length) - 2].route}`);
629
- },
630
- children: /* @__PURE__ */ jsx7(MdClose, { fontSize: 20 })
631
- }
632
- )
633
- ] });
634
- };
635
-
636
- // src/layout/AppLoader.tsx
637
- import { useEffect as useEffect3 } from "react";
638
- import ReactDOM from "react-dom";
639
- import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
640
- var LoaderGrid = () => {
641
- const Loader = /* @__PURE__ */ jsxs2("div", { className: "k-loading-mask", children: [
642
- /* @__PURE__ */ jsx8("span", { className: "k-loading-text", children: "Loading" }),
643
- /* @__PURE__ */ jsx8("div", { className: "k-loading-image" }),
644
- /* @__PURE__ */ jsx8("div", { className: "k-loading-color" })
645
- ] });
646
- const gridContent = document && document.querySelector(".k-grid-content");
647
- const reportContent = document && document.querySelector(".loading-report");
648
- return gridContent ? ReactDOM.createPortal(Loader, gridContent) : reportContent ? ReactDOM.createPortal(Loader, reportContent) : Loader;
649
- };
650
- var AppLoader = (props) => {
651
- const { type = "grid", parent, minDuration } = props;
652
- const parentEl = type === "grid" ? document.querySelector(parent != null ? parent : ".k-grid-container") : parent ? document.querySelector(parent) : null;
653
- const Loading = /* @__PURE__ */ jsxs2("div", { className: `${type}-loading k-loading-mask`, children: [
654
- /* @__PURE__ */ jsx8("span", { className: "k-loading-text", children: "Loading" }),
655
- /* @__PURE__ */ jsx8("div", { className: "k-loading-image" }),
656
- /* @__PURE__ */ jsx8("div", { className: "k-loading-color" })
657
- ] });
658
- useEffect3(() => {
659
- if (type === "button") {
660
- const loadingEl = document.createElement("div");
661
- loadingEl.className = "icon button-loading k-loading-mask";
662
- loadingEl.innerHTML = `
663
- <div class="k-loading-image"></div>
664
- `;
665
- if (parentEl) {
666
- const button = parentEl;
667
- button.classList.add("btn-loading");
668
- button.disabled = true;
669
- button.insertBefore(loadingEl, button.firstChild);
670
- }
671
- return () => {
672
- if (parentEl) {
673
- if (minDuration) {
674
- setTimeout(() => {
675
- const button = parentEl;
676
- button.classList.remove("btn-loading");
677
- button.removeChild(loadingEl);
678
- button.disabled = false;
679
- }, minDuration);
680
- } else {
681
- const button = parentEl;
682
- button.classList.remove("btn-loading");
683
- button.removeChild(loadingEl);
684
- button.disabled = false;
685
- }
686
- }
687
- };
688
- }
689
- }, []);
690
- return type === "button" ? null : parentEl ? ReactDOM.createPortal(Loading, parentEl) : Loading;
691
- };
692
-
693
- // src/layout/NavOptions.tsx
694
- import { Dropdown } from "react-bootstrap";
695
- import { BsArrowsFullscreen } from "react-icons/bs";
696
- import { FiCheckCircle, FiFilter, FiPlusSquare, FiRefreshCcw, FiSave } from "react-icons/fi";
697
- import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
698
- var NavOptions = ({
699
- exportExcel,
700
- customButtons,
701
- onCreate,
702
- onRefresh,
703
- onSelect,
704
- onClear,
705
- onExpandScreen
706
- }) => {
707
- return /* @__PURE__ */ jsxs3(MenuOptions, { children: [
708
- onCreate && /* @__PURE__ */ jsxs3("button", { className: "button-option", onClick: onCreate, children: [
709
- /* @__PURE__ */ jsx9(FiPlusSquare, { className: "icon" }),
710
- " ",
711
- /* @__PURE__ */ jsx9("span", { className: "text", children: "New" })
712
- ] }),
713
- onRefresh && /* @__PURE__ */ jsxs3("button", { className: "button-option", onClick: onRefresh, children: [
714
- /* @__PURE__ */ jsx9(FiRefreshCcw, { className: "icon" }),
715
- " ",
716
- /* @__PURE__ */ jsx9("span", { className: "text", children: "Refresh" })
717
- ] }),
718
- exportExcel && exportExcel.length > 0 && /* @__PURE__ */ jsxs3(Dropdown, { className: "button-option", children: [
719
- /* @__PURE__ */ jsxs3(
720
- Dropdown.Toggle,
721
- {
722
- id: "btnExport",
723
- className: "p-2 bg-light text-dark border-0 font-weight-bold",
724
- title: "Export to Excel",
725
- children: [
726
- /* @__PURE__ */ jsx9(FiSave, { className: "icon" }),
727
- /* @__PURE__ */ jsx9(
728
- "span",
729
- {
730
- style: {
731
- fontSize: "13px",
732
- fontFamily: '"Inter", sans-serif'
733
- },
734
- className: "text",
735
- children: "Export"
736
- }
737
- )
738
- ]
739
- }
740
- ),
741
- /* @__PURE__ */ jsx9(Dropdown.Menu, { children: exportExcel.map((item, index) => {
742
- return /* @__PURE__ */ jsxs3(Dropdown.Item, { onClick: item.onAction, children: [
743
- /* @__PURE__ */ jsx9("i", { className: `${item.classNameIcon} mr-2` }),
744
- " ",
745
- item.title
746
- ] }, index);
747
- }) })
748
- ] }),
749
- onSelect && /* @__PURE__ */ jsxs3("button", { className: "button-option", onClick: onSelect, children: [
750
- /* @__PURE__ */ jsx9(FiCheckCircle, { className: "icon" }),
751
- " ",
752
- /* @__PURE__ */ jsx9("span", { className: "text", children: "Select All" })
753
- ] }),
754
- onClear && /* @__PURE__ */ jsxs3("button", { className: "button-option", onClick: onClear, children: [
755
- /* @__PURE__ */ jsx9(FiFilter, { className: "icon" }),
756
- " ",
757
- /* @__PURE__ */ jsx9("span", { className: "text", children: "Clear Filters" })
758
- ] }),
759
- onExpandScreen && /* @__PURE__ */ jsxs3("button", { className: "button-option", onClick: onExpandScreen, children: [
760
- /* @__PURE__ */ jsx9(BsArrowsFullscreen, { className: "icon" }),
761
- " ",
762
- /* @__PURE__ */ jsx9("span", { className: "text", children: "Full Page" })
763
- ] }),
764
- customButtons == null ? void 0 : customButtons.map((custom, index) => {
765
- if (custom.render) {
766
- return custom.render;
767
- }
768
- return /* @__PURE__ */ jsxs3("button", { className: "button-option", onClick: custom.onAction, children: [
769
- custom.Icon !== void 0 && /* @__PURE__ */ jsx9(custom.Icon, { className: "icon" }),
770
- /* @__PURE__ */ jsx9("span", { className: "text", children: custom.title })
771
- ] }, index);
772
- })
773
- ] });
774
- };
775
-
776
- // src/layout/title.tsx
777
- import { jsx as jsx10 } from "react/jsx-runtime";
778
- var Title = ({ title }) => {
779
- return /* @__PURE__ */ jsx10(TitlePage, { children: title != null ? title : "Home" });
780
- };
781
- export {
782
- AppBreadCrumb,
783
- AppBreadCrumbNav,
784
- AppLoader,
785
- BreadCrumbContext,
786
- BreadCrumbContextProvider,
787
- BreadCrumbTitle,
788
- Breadcrumb,
789
- CloseIcon,
790
- DrawerContext,
791
- DrawerContextProvider,
792
- DropEnumList,
793
- GlobalProvider,
794
- HistoryContext,
795
- HistoryContextProvider,
796
- ItemLinkSidebar,
797
- ItemSidebar,
798
- LoaderGrid,
799
- Main,
800
- MenuItem as MenuItems,
801
- MenuOptions,
802
- MenuTitle,
803
- NavOptions,
804
- Navbar,
805
- SidebarMainContext,
806
- SidebarMainContextProvider,
807
- SidebarNavigation,
808
- Title
809
- };