@unifiedsoftware/react-ui 1.0.7 → 1.0.9
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 +160 -218
- package/dist/index.d.ts +160 -218
- package/dist/index.js +312 -964
- package/dist/index.mjs +264 -890
- package/package.json +3 -11
package/dist/index.mjs
CHANGED
|
@@ -56,13 +56,89 @@ var Badge_default = Badge;
|
|
|
56
56
|
|
|
57
57
|
// src/components/Button/Button.tsx
|
|
58
58
|
import clsx3 from "clsx";
|
|
59
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
60
|
+
|
|
61
|
+
// src/icons/ChevronDownIcon.tsx
|
|
62
|
+
import { forwardRef } from "react";
|
|
63
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
64
|
+
var ChevronDownIcon = forwardRef((props, ref) => {
|
|
65
|
+
return /* @__PURE__ */ jsxs2(
|
|
66
|
+
"svg",
|
|
67
|
+
__spreadProps(__spreadValues({
|
|
68
|
+
ref,
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
fill: "currentColor",
|
|
71
|
+
"stroke-width": "0",
|
|
72
|
+
viewBox: "0 0 24 24",
|
|
73
|
+
height: "1em",
|
|
74
|
+
width: "1em",
|
|
75
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
76
|
+
}, props), {
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsx2("path", { fill: "none", d: "M0 0h24v24H0V0z" }),
|
|
79
|
+
/* @__PURE__ */ jsx2("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" })
|
|
80
|
+
]
|
|
81
|
+
})
|
|
82
|
+
);
|
|
83
|
+
});
|
|
84
|
+
var ChevronDownIcon_default = ChevronDownIcon;
|
|
85
|
+
|
|
86
|
+
// src/icons/ChevronUpIcon.tsx
|
|
59
87
|
import { forwardRef as forwardRef2 } from "react";
|
|
60
|
-
import {
|
|
88
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
89
|
+
var ChevronUpIcon = forwardRef2((props, ref) => {
|
|
90
|
+
return /* @__PURE__ */ jsxs3(
|
|
91
|
+
"svg",
|
|
92
|
+
__spreadProps(__spreadValues({
|
|
93
|
+
ref,
|
|
94
|
+
stroke: "currentColor",
|
|
95
|
+
fill: "currentColor",
|
|
96
|
+
"stroke-width": "0",
|
|
97
|
+
viewBox: "0 0 24 24",
|
|
98
|
+
height: "1em",
|
|
99
|
+
width: "1em",
|
|
100
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
101
|
+
}, props), {
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx3("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
104
|
+
/* @__PURE__ */ jsx3("path", { d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" })
|
|
105
|
+
]
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
var ChevronUpIcon_default = ChevronUpIcon;
|
|
110
|
+
|
|
111
|
+
// src/icons/LoaderIcon.tsx
|
|
112
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
113
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
114
|
+
var LoaderIcon = forwardRef3((props, ref) => {
|
|
115
|
+
return /* @__PURE__ */ jsxs4(
|
|
116
|
+
"svg",
|
|
117
|
+
__spreadProps(__spreadValues({
|
|
118
|
+
ref,
|
|
119
|
+
stroke: "currentColor",
|
|
120
|
+
fill: "none",
|
|
121
|
+
"stroke-width": "2",
|
|
122
|
+
viewBox: "0 0 24 24",
|
|
123
|
+
"stroke-linecap": "round",
|
|
124
|
+
"stroke-linejoin": "round",
|
|
125
|
+
height: "1em",
|
|
126
|
+
width: "1em",
|
|
127
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
128
|
+
}, props), {
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsx4("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
131
|
+
/* @__PURE__ */ jsx4("path", { d: "M12 3a9 9 0 1 0 9 9" })
|
|
132
|
+
]
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
});
|
|
136
|
+
var LoaderIcon_default = LoaderIcon;
|
|
61
137
|
|
|
62
138
|
// src/components/Icon/Icon.tsx
|
|
63
139
|
import clsx2 from "clsx";
|
|
64
|
-
import { Children, cloneElement, forwardRef } from "react";
|
|
65
|
-
var Icon =
|
|
140
|
+
import { Children, cloneElement, forwardRef as forwardRef4 } from "react";
|
|
141
|
+
var Icon = forwardRef4(({ children, size }, ref) => {
|
|
66
142
|
const child = Children.only(children);
|
|
67
143
|
return cloneElement(child, __spreadProps(__spreadValues({
|
|
68
144
|
ref
|
|
@@ -73,8 +149,8 @@ var Icon = forwardRef(({ children, size }, ref) => {
|
|
|
73
149
|
var Icon_default = Icon;
|
|
74
150
|
|
|
75
151
|
// src/components/Button/Button.tsx
|
|
76
|
-
import { jsx as
|
|
77
|
-
var Button =
|
|
152
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
153
|
+
var Button = forwardRef5(
|
|
78
154
|
(_a, ref) => {
|
|
79
155
|
var _b = _a, {
|
|
80
156
|
as: Component = "button",
|
|
@@ -87,7 +163,8 @@ var Button = forwardRef2(
|
|
|
87
163
|
iconOnly,
|
|
88
164
|
startContent,
|
|
89
165
|
endContent,
|
|
90
|
-
loading
|
|
166
|
+
loading,
|
|
167
|
+
disabled
|
|
91
168
|
} = _b, rest = __objRest(_b, [
|
|
92
169
|
"as",
|
|
93
170
|
"children",
|
|
@@ -99,9 +176,10 @@ var Button = forwardRef2(
|
|
|
99
176
|
"iconOnly",
|
|
100
177
|
"startContent",
|
|
101
178
|
"endContent",
|
|
102
|
-
"loading"
|
|
179
|
+
"loading",
|
|
180
|
+
"disabled"
|
|
103
181
|
]);
|
|
104
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ jsxs5(
|
|
105
183
|
Component,
|
|
106
184
|
__spreadProps(__spreadValues({
|
|
107
185
|
ref,
|
|
@@ -111,17 +189,19 @@ var Button = forwardRef2(
|
|
|
111
189
|
[`${PREFIX_CLS}button--${variant}`]: variant,
|
|
112
190
|
[`${PREFIX_CLS}button--${color}`]: color,
|
|
113
191
|
[`${PREFIX_CLS}button--${size}`]: size,
|
|
114
|
-
[`${PREFIX_CLS}button--icon-only`]: iconOnly
|
|
192
|
+
[`${PREFIX_CLS}button--icon-only`]: iconOnly,
|
|
193
|
+
[`${PREFIX_CLS}button--disabled`]: disabled
|
|
115
194
|
},
|
|
116
195
|
className
|
|
117
196
|
),
|
|
118
|
-
role
|
|
197
|
+
role,
|
|
198
|
+
disabled
|
|
119
199
|
}, rest), {
|
|
120
200
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
loading ? /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}overlay` }),
|
|
202
|
+
/* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}outline` }),
|
|
203
|
+
loading ? /* @__PURE__ */ jsx5(Icon_default, { children: /* @__PURE__ */ jsx5(LoaderIcon_default, { className: `${PREFIX_CLS}animation-spin` }) }) : startContent,
|
|
204
|
+
/* @__PURE__ */ jsx5("div", { className: `${PREFIX_CLS}button__content`, children }),
|
|
125
205
|
endContent
|
|
126
206
|
]
|
|
127
207
|
})
|
|
@@ -131,12 +211,12 @@ var Button = forwardRef2(
|
|
|
131
211
|
|
|
132
212
|
// src/components/Chip/Chip.tsx
|
|
133
213
|
import clsx4 from "clsx";
|
|
134
|
-
import { forwardRef as
|
|
135
|
-
import { jsx as
|
|
136
|
-
var Chip =
|
|
214
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
215
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
216
|
+
var Chip = forwardRef6(
|
|
137
217
|
(_a, ref) => {
|
|
138
218
|
var _b = _a, { as: Component = "div", children, className, variant, color, size } = _b, rest = __objRest(_b, ["as", "children", "className", "variant", "color", "size"]);
|
|
139
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ jsxs6(
|
|
140
220
|
Component,
|
|
141
221
|
__spreadProps(__spreadValues({
|
|
142
222
|
ref,
|
|
@@ -151,8 +231,8 @@ var Chip = forwardRef3(
|
|
|
151
231
|
)
|
|
152
232
|
}, rest), {
|
|
153
233
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ jsx6("div", { className: clsx4(`${PREFIX_CLS}overlay`) }),
|
|
235
|
+
/* @__PURE__ */ jsx6("div", { className: `${PREFIX_CLS}outline` }),
|
|
156
236
|
children
|
|
157
237
|
]
|
|
158
238
|
})
|
|
@@ -177,7 +257,7 @@ var useCollapse = () => {
|
|
|
177
257
|
var CollapseContext_default = CollapseContext;
|
|
178
258
|
|
|
179
259
|
// src/components/Collapse/Collapse.tsx
|
|
180
|
-
import { jsxs as
|
|
260
|
+
import { jsxs as jsxs7 } from "react/jsx-runtime";
|
|
181
261
|
var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
|
|
182
262
|
const collapseRef = useRef(null);
|
|
183
263
|
const [selfIsOpen, setSelfIsOpen] = useState(isOpen != null ? isOpen : false);
|
|
@@ -207,7 +287,7 @@ var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
|
|
|
207
287
|
}
|
|
208
288
|
}, 100);
|
|
209
289
|
}, [isOpen]);
|
|
210
|
-
return /* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ jsxs7(
|
|
211
291
|
CollapseContext_default.Provider,
|
|
212
292
|
{
|
|
213
293
|
value: {
|
|
@@ -229,8 +309,8 @@ var Collapse_default = Collapse;
|
|
|
229
309
|
|
|
230
310
|
// src/components/Collapse/CollapseContent.tsx
|
|
231
311
|
import clsx5 from "clsx";
|
|
232
|
-
import { Children as Children3, cloneElement as cloneElement2, forwardRef as
|
|
233
|
-
var CollapseContent =
|
|
312
|
+
import { Children as Children3, cloneElement as cloneElement2, forwardRef as forwardRef7 } from "react";
|
|
313
|
+
var CollapseContent = forwardRef7(({ children }, ref) => {
|
|
234
314
|
var _a, _b;
|
|
235
315
|
const { collapseRef, isOpen, heightAuto } = useCollapse();
|
|
236
316
|
const child = Children3.only(children);
|
|
@@ -250,8 +330,8 @@ var CollapseContent = forwardRef4(({ children }, ref) => {
|
|
|
250
330
|
var CollapseContent_default = CollapseContent;
|
|
251
331
|
|
|
252
332
|
// src/components/Collapse/CollapseTrigger.tsx
|
|
253
|
-
import { Children as Children4, cloneElement as cloneElement3, forwardRef as
|
|
254
|
-
var CollapseTrigger =
|
|
333
|
+
import { Children as Children4, cloneElement as cloneElement3, forwardRef as forwardRef8 } from "react";
|
|
334
|
+
var CollapseTrigger = forwardRef8(({ children }, ref) => {
|
|
255
335
|
const { collapseRef, onToggle } = useCollapse();
|
|
256
336
|
const child = Children4.only(children);
|
|
257
337
|
return cloneElement3(child, __spreadValues({
|
|
@@ -290,7 +370,7 @@ import { useMemo as useMemo2 } from "react";
|
|
|
290
370
|
|
|
291
371
|
// src/components/Menu/MenuItem.tsx
|
|
292
372
|
import clsx6 from "clsx";
|
|
293
|
-
import { forwardRef as
|
|
373
|
+
import { forwardRef as forwardRef9, useContext as useContext4, useEffect as useEffect2 } from "react";
|
|
294
374
|
|
|
295
375
|
// src/components/Menu/MenuValueContext.tsx
|
|
296
376
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
@@ -305,8 +385,8 @@ var useMenuItemValue = () => {
|
|
|
305
385
|
var MenuValueContext_default = MenuValueContext;
|
|
306
386
|
|
|
307
387
|
// src/components/Menu/MenuItem.tsx
|
|
308
|
-
import { jsx as
|
|
309
|
-
var MenuItem =
|
|
388
|
+
import { jsx as jsx7, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
389
|
+
var MenuItem = forwardRef9((props, ref) => {
|
|
310
390
|
const _a = props, { as: Component = "div", className, style, value, title, icon, level = 1, disabled, onClick } = _a, rest = __objRest(_a, ["as", "className", "style", "value", "title", "icon", "level", "disabled", "onClick"]);
|
|
311
391
|
const { value: menuValue, originalValue, openMode, onChange, onOpen, onItemSelect } = useMenu();
|
|
312
392
|
const values = useContext4(MenuValueContext_default);
|
|
@@ -324,7 +404,7 @@ var MenuItem = forwardRef6((props, ref) => {
|
|
|
324
404
|
onChange(mergedValues);
|
|
325
405
|
}
|
|
326
406
|
}, [value, originalValue, openMode]);
|
|
327
|
-
return /* @__PURE__ */
|
|
407
|
+
return /* @__PURE__ */ jsxs8(
|
|
328
408
|
Component,
|
|
329
409
|
__spreadProps(__spreadValues({
|
|
330
410
|
ref,
|
|
@@ -342,9 +422,9 @@ var MenuItem = forwardRef6((props, ref) => {
|
|
|
342
422
|
onClick: handleClick
|
|
343
423
|
}, rest), {
|
|
344
424
|
children: [
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
icon && /* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ jsx7("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx7("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
|
|
426
|
+
icon && /* @__PURE__ */ jsx7("div", { className: `${PREFIX_CLS}menu-item__icon`, children: icon }),
|
|
427
|
+
/* @__PURE__ */ jsx7("div", { className: `${PREFIX_CLS}menu-item__content`, children: /* @__PURE__ */ jsx7("span", { className: `${PREFIX_CLS}menu-item__title`, children: title }) })
|
|
348
428
|
]
|
|
349
429
|
})
|
|
350
430
|
);
|
|
@@ -355,7 +435,6 @@ var MenuItem_default = MenuItem;
|
|
|
355
435
|
// src/components/Menu/MenuSubmenu.tsx
|
|
356
436
|
import clsx7 from "clsx";
|
|
357
437
|
import { useContext as useContext5, useMemo } from "react";
|
|
358
|
-
import { MdKeyboardArrowDown, MdKeyboardArrowUp } from "react-icons/md";
|
|
359
438
|
|
|
360
439
|
// src/components/Menu/utils.ts
|
|
361
440
|
var getOpenValuesByPathname = (pathname) => {
|
|
@@ -381,7 +460,7 @@ var addOrRemoveValueInArray = (array, value) => {
|
|
|
381
460
|
};
|
|
382
461
|
|
|
383
462
|
// src/components/Menu/MenuSubmenu.tsx
|
|
384
|
-
import { jsx as
|
|
463
|
+
import { jsx as jsx8, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
385
464
|
var MenuSubmenu = (_a) => {
|
|
386
465
|
var _b = _a, {
|
|
387
466
|
children,
|
|
@@ -411,7 +490,7 @@ var MenuSubmenu = (_a) => {
|
|
|
411
490
|
const content = useMemo(() => {
|
|
412
491
|
return items == null ? void 0 : items.map((_a2, index) => {
|
|
413
492
|
var _b2 = _a2, { type } = _b2, item = __objRest(_b2, ["type"]);
|
|
414
|
-
return type === "item" ? /* @__PURE__ */
|
|
493
|
+
return type === "item" ? /* @__PURE__ */ jsx8(MenuItem_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : type === "submenu" ? /* @__PURE__ */ jsx8(MenuSubmenu, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : type === "group" ? /* @__PURE__ */ jsx8(MenuGroup_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index) : /* @__PURE__ */ jsx8(MenuItem_default, __spreadValues({ level: level !== void 0 ? level + 1 : void 0 }, item), index);
|
|
415
494
|
});
|
|
416
495
|
}, [items]);
|
|
417
496
|
const handleClick = (event) => {
|
|
@@ -429,8 +508,8 @@ var MenuSubmenu = (_a) => {
|
|
|
429
508
|
}
|
|
430
509
|
onClick == null ? void 0 : onClick(event);
|
|
431
510
|
};
|
|
432
|
-
return /* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ jsx8(MenuValueContext_default.Provider, { value: mergedValues, children: /* @__PURE__ */ jsx8("div", { className: clsx7(`${PREFIX_CLS}menu-submenu`), children: /* @__PURE__ */ jsxs9(Collapse_default, { isOpen, children: [
|
|
512
|
+
/* @__PURE__ */ jsx8(CollapseTrigger_default, { children: /* @__PURE__ */ jsxs9(
|
|
434
513
|
"div",
|
|
435
514
|
__spreadProps(__spreadValues({
|
|
436
515
|
className: clsx7(
|
|
@@ -446,14 +525,14 @@ var MenuSubmenu = (_a) => {
|
|
|
446
525
|
onClick: handleClick
|
|
447
526
|
}, rest), {
|
|
448
527
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
icon && /* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
|
|
529
|
+
icon && /* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}menu-item__icon`, children: icon }),
|
|
530
|
+
/* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}menu-item__content`, children: /* @__PURE__ */ jsx8("span", { className: `${PREFIX_CLS}menu-item__title`, children: title }) }),
|
|
531
|
+
/* @__PURE__ */ jsx8("div", { className: `${PREFIX_CLS}menu-item__icon`, children: isOpen ? /* @__PURE__ */ jsx8(ChevronUpIcon_default, { className: `${PREFIX_CLS}icon` }) : /* @__PURE__ */ jsx8(ChevronDownIcon_default, { className: `${PREFIX_CLS}icon` }) })
|
|
453
532
|
]
|
|
454
533
|
})
|
|
455
534
|
) }),
|
|
456
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ jsx8(CollapseContent_default, { children: /* @__PURE__ */ jsx8(
|
|
457
536
|
"ul",
|
|
458
537
|
{
|
|
459
538
|
className: clsx7(`${PREFIX_CLS}menu`, {
|
|
@@ -467,7 +546,7 @@ var MenuSubmenu = (_a) => {
|
|
|
467
546
|
var MenuSubmenu_default = MenuSubmenu;
|
|
468
547
|
|
|
469
548
|
// src/components/Menu/MenuGroup.tsx
|
|
470
|
-
import { Fragment, jsx as
|
|
549
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
471
550
|
var MenuGroup = (_a) => {
|
|
472
551
|
var _b = _a, {
|
|
473
552
|
children,
|
|
@@ -489,11 +568,11 @@ var MenuGroup = (_a) => {
|
|
|
489
568
|
const content = useMemo2(() => {
|
|
490
569
|
return items == null ? void 0 : items.map((_a2, index) => {
|
|
491
570
|
var _b2 = _a2, { type } = _b2, item = __objRest(_b2, ["type"]);
|
|
492
|
-
return type === "item" ? /* @__PURE__ */
|
|
571
|
+
return type === "item" ? /* @__PURE__ */ jsx9(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx9(MenuSubmenu_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx9(MenuItem_default, __spreadValues({}, item), index);
|
|
493
572
|
});
|
|
494
573
|
}, [items]);
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
574
|
+
return /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
575
|
+
/* @__PURE__ */ jsxs10(
|
|
497
576
|
"div",
|
|
498
577
|
__spreadProps(__spreadValues({
|
|
499
578
|
className: clsx8(`${PREFIX_CLS}menu-group`, className),
|
|
@@ -502,8 +581,8 @@ var MenuGroup = (_a) => {
|
|
|
502
581
|
}, style)
|
|
503
582
|
}, rest), {
|
|
504
583
|
children: [
|
|
505
|
-
icon && /* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */
|
|
584
|
+
icon && /* @__PURE__ */ jsx9("div", { className: `${PREFIX_CLS}menu-group__icon`, children: icon }),
|
|
585
|
+
/* @__PURE__ */ jsx9("div", { className: `${PREFIX_CLS}menu-group__content`, children: /* @__PURE__ */ jsx9("span", { className: `${PREFIX_CLS}menu-group__title`, children: title }) })
|
|
507
586
|
]
|
|
508
587
|
})
|
|
509
588
|
),
|
|
@@ -513,7 +592,7 @@ var MenuGroup = (_a) => {
|
|
|
513
592
|
var MenuGroup_default = MenuGroup;
|
|
514
593
|
|
|
515
594
|
// src/components/Menu/Menu.tsx
|
|
516
|
-
import { jsx as
|
|
595
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
517
596
|
var Menu = (_a) => {
|
|
518
597
|
var _b = _a, {
|
|
519
598
|
children,
|
|
@@ -544,7 +623,7 @@ var Menu = (_a) => {
|
|
|
544
623
|
const content = useMemo3(() => {
|
|
545
624
|
return items == null ? void 0 : items.map((_a3, index) => {
|
|
546
625
|
var _b2 = _a3, { type } = _b2, item = __objRest(_b2, ["type"]);
|
|
547
|
-
return type === "item" ? /* @__PURE__ */
|
|
626
|
+
return type === "item" ? /* @__PURE__ */ jsx10(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx10(MenuSubmenu_default, __spreadValues({}, item), index) : type === "group" ? /* @__PURE__ */ jsx10(MenuGroup_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx10(MenuItem_default, __spreadValues({}, item), index);
|
|
548
627
|
});
|
|
549
628
|
}, [items]);
|
|
550
629
|
const handleChange = (value) => {
|
|
@@ -574,7 +653,7 @@ var Menu = (_a) => {
|
|
|
574
653
|
setSelfOpenValues(openValuesProp);
|
|
575
654
|
}
|
|
576
655
|
}, [openValuesProp]);
|
|
577
|
-
return /* @__PURE__ */
|
|
656
|
+
return /* @__PURE__ */ jsx10(
|
|
578
657
|
MenuContext_default.Provider,
|
|
579
658
|
{
|
|
580
659
|
value: {
|
|
@@ -587,7 +666,7 @@ var Menu = (_a) => {
|
|
|
587
666
|
onChange: handleChange,
|
|
588
667
|
onItemSelect: handleItemSelect
|
|
589
668
|
},
|
|
590
|
-
children: /* @__PURE__ */
|
|
669
|
+
children: /* @__PURE__ */ jsx10("div", __spreadProps(__spreadValues({ className: clsx9(`${PREFIX_CLS}menu`) }, rest), { children: content || children }))
|
|
591
670
|
}
|
|
592
671
|
);
|
|
593
672
|
};
|
|
@@ -597,8 +676,93 @@ var Menu_default = Menu;
|
|
|
597
676
|
// src/components/Tabs/Tab.tsx
|
|
598
677
|
import clsx10 from "clsx";
|
|
599
678
|
import mergeRefs from "merge-refs";
|
|
600
|
-
import { forwardRef as
|
|
601
|
-
|
|
679
|
+
import { forwardRef as forwardRef10, useEffect as useEffect4, useId, useRef as useRef2 } from "react";
|
|
680
|
+
|
|
681
|
+
// ../../../node_modules/react-icons/lib/esm/iconBase.js
|
|
682
|
+
import React3 from "react";
|
|
683
|
+
|
|
684
|
+
// ../../../node_modules/react-icons/lib/esm/iconContext.js
|
|
685
|
+
import React2 from "react";
|
|
686
|
+
var DefaultContext = {
|
|
687
|
+
color: void 0,
|
|
688
|
+
size: void 0,
|
|
689
|
+
className: void 0,
|
|
690
|
+
style: void 0,
|
|
691
|
+
attr: void 0
|
|
692
|
+
};
|
|
693
|
+
var IconContext = React2.createContext && React2.createContext(DefaultContext);
|
|
694
|
+
|
|
695
|
+
// ../../../node_modules/react-icons/lib/esm/iconBase.js
|
|
696
|
+
var __assign = function() {
|
|
697
|
+
__assign = Object.assign || function(t) {
|
|
698
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
699
|
+
s = arguments[i];
|
|
700
|
+
for (var p in s)
|
|
701
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
702
|
+
t[p] = s[p];
|
|
703
|
+
}
|
|
704
|
+
return t;
|
|
705
|
+
};
|
|
706
|
+
return __assign.apply(this, arguments);
|
|
707
|
+
};
|
|
708
|
+
var __rest = function(s, e) {
|
|
709
|
+
var t = {};
|
|
710
|
+
for (var p in s)
|
|
711
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
712
|
+
t[p] = s[p];
|
|
713
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
714
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
715
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
716
|
+
t[p[i]] = s[p[i]];
|
|
717
|
+
}
|
|
718
|
+
return t;
|
|
719
|
+
};
|
|
720
|
+
function Tree2Element(tree) {
|
|
721
|
+
return tree && tree.map(function(node, i) {
|
|
722
|
+
return React3.createElement(node.tag, __assign({
|
|
723
|
+
key: i
|
|
724
|
+
}, node.attr), Tree2Element(node.child));
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
function GenIcon(data) {
|
|
728
|
+
return function(props) {
|
|
729
|
+
return React3.createElement(IconBase, __assign({
|
|
730
|
+
attr: __assign({}, data.attr)
|
|
731
|
+
}, props), Tree2Element(data.child));
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
function IconBase(props) {
|
|
735
|
+
var elem = function(conf) {
|
|
736
|
+
var attr = props.attr, size = props.size, title = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
737
|
+
var computedSize = size || conf.size || "1em";
|
|
738
|
+
var className;
|
|
739
|
+
if (conf.className)
|
|
740
|
+
className = conf.className;
|
|
741
|
+
if (props.className)
|
|
742
|
+
className = (className ? className + " " : "") + props.className;
|
|
743
|
+
return React3.createElement("svg", __assign({
|
|
744
|
+
stroke: "currentColor",
|
|
745
|
+
fill: "currentColor",
|
|
746
|
+
strokeWidth: "0"
|
|
747
|
+
}, conf.attr, attr, svgProps, {
|
|
748
|
+
className,
|
|
749
|
+
style: __assign(__assign({
|
|
750
|
+
color: props.color || conf.color
|
|
751
|
+
}, conf.style), props.style),
|
|
752
|
+
height: computedSize,
|
|
753
|
+
width: computedSize,
|
|
754
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
755
|
+
}), title && React3.createElement("title", null, title), props.children);
|
|
756
|
+
};
|
|
757
|
+
return IconContext !== void 0 ? React3.createElement(IconContext.Consumer, null, function(conf) {
|
|
758
|
+
return elem(conf);
|
|
759
|
+
}) : elem(DefaultContext);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
// ../../../node_modules/react-icons/tb/index.esm.js
|
|
763
|
+
function TbX(props) {
|
|
764
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "fill": "none", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "stroke": "none", "d": "M0 0h24v24H0z", "fill": "none" } }, { "tag": "path", "attr": { "d": "M18 6l-12 12" } }, { "tag": "path", "attr": { "d": "M6 6l12 12" } }] })(props);
|
|
765
|
+
}
|
|
602
766
|
|
|
603
767
|
// src/components/Tabs/TabsContext.ts
|
|
604
768
|
import { createContext as createContext4, useContext as useContext6 } from "react";
|
|
@@ -612,11 +776,31 @@ var useTabs = () => {
|
|
|
612
776
|
};
|
|
613
777
|
|
|
614
778
|
// src/components/Tabs/Tab.tsx
|
|
615
|
-
import { jsx as
|
|
616
|
-
var Tab =
|
|
779
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
780
|
+
var Tab = forwardRef10(
|
|
617
781
|
(_a, ref) => {
|
|
618
|
-
var _b = _a, {
|
|
782
|
+
var _b = _a, {
|
|
783
|
+
as: Component = "div",
|
|
784
|
+
children,
|
|
785
|
+
className,
|
|
786
|
+
role = "presentation",
|
|
787
|
+
value: valueProp,
|
|
788
|
+
closable,
|
|
789
|
+
disabled,
|
|
790
|
+
onClick
|
|
791
|
+
} = _b, rest = __objRest(_b, [
|
|
792
|
+
"as",
|
|
793
|
+
"children",
|
|
794
|
+
"className",
|
|
795
|
+
"role",
|
|
796
|
+
"value",
|
|
797
|
+
"closable",
|
|
798
|
+
"disabled",
|
|
799
|
+
"onClick"
|
|
800
|
+
]);
|
|
619
801
|
const tabRef = useRef2(null);
|
|
802
|
+
const id = useId();
|
|
803
|
+
const value = valueProp != null ? valueProp : id;
|
|
620
804
|
const _a2 = useTabs(), { onClose, registerItem } = _a2, tabs = __objRest(_a2, ["onClose", "registerItem"]);
|
|
621
805
|
const handleClick = (event) => {
|
|
622
806
|
const previousTab = tabs.previousTabRef.current;
|
|
@@ -662,7 +846,7 @@ var Tab = forwardRef7(
|
|
|
662
846
|
tabs.previousTabRef.current = tabRef.current;
|
|
663
847
|
}
|
|
664
848
|
}, [value, tabs.value]);
|
|
665
|
-
return /* @__PURE__ */
|
|
849
|
+
return /* @__PURE__ */ jsxs11(
|
|
666
850
|
Component,
|
|
667
851
|
__spreadProps(__spreadValues({
|
|
668
852
|
ref: mergeRefs(tabRef, ref, (el) => tabs.tabRefs.current[value] = el),
|
|
@@ -675,12 +859,12 @@ var Tab = forwardRef7(
|
|
|
675
859
|
onClick: handleClick
|
|
676
860
|
}, rest), {
|
|
677
861
|
children: [
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ jsx11("div", { className: `${PREFIX_CLS}overlay`, children: /* @__PURE__ */ jsx11("div", { className: `${PREFIX_CLS}overlay__surface` }) }),
|
|
863
|
+
/* @__PURE__ */ jsxs11("div", { className: `${PREFIX_CLS}tab__content`, children: [
|
|
680
864
|
children,
|
|
681
|
-
closable && /* @__PURE__ */
|
|
865
|
+
closable && /* @__PURE__ */ jsx11(Button, { variant: "text", color: "secondary", iconOnly: true, size: "xs", onClick: handleClose, children: /* @__PURE__ */ jsx11(Icon_default, { children: /* @__PURE__ */ jsx11(TbX, {}) }) })
|
|
682
866
|
] }),
|
|
683
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ jsx11("div", { className: `${PREFIX_CLS}tab__indicator` })
|
|
684
868
|
]
|
|
685
869
|
})
|
|
686
870
|
);
|
|
@@ -689,7 +873,7 @@ var Tab = forwardRef7(
|
|
|
689
873
|
|
|
690
874
|
// src/components/Tabs/Tabs.tsx
|
|
691
875
|
import clsx11 from "clsx";
|
|
692
|
-
import {
|
|
876
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState3 } from "react";
|
|
693
877
|
|
|
694
878
|
// src/utils/scroll.ts
|
|
695
879
|
var scrollToItem = (parentElement, currentElement) => {
|
|
@@ -717,8 +901,7 @@ var scrollToItem = (parentElement, currentElement) => {
|
|
|
717
901
|
};
|
|
718
902
|
|
|
719
903
|
// src/components/Tabs/Tabs.tsx
|
|
720
|
-
import { jsx as
|
|
721
|
-
var prefixCls = "us-";
|
|
904
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
722
905
|
var Tabs = (_a) => {
|
|
723
906
|
var _b = _a, {
|
|
724
907
|
children,
|
|
@@ -780,117 +963,35 @@ var Tabs = (_a) => {
|
|
|
780
963
|
setSelfValue(item == null ? void 0 : item.value);
|
|
781
964
|
}
|
|
782
965
|
}, [value, items]);
|
|
783
|
-
return /* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ jsxs12(
|
|
784
967
|
TabsContext.Provider,
|
|
785
968
|
{
|
|
786
969
|
value: { previousTabRef, tabRefs, value: selfValue, onChange: handleChange, onClose: handleClose, registerItem },
|
|
787
970
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ jsx12(
|
|
789
972
|
"div",
|
|
790
973
|
__spreadProps(__spreadValues({
|
|
791
974
|
ref: tabsRef,
|
|
792
|
-
className: clsx11(`${
|
|
975
|
+
className: clsx11(`${PREFIX_CLS}tabs`, { [`${PREFIX_CLS}tabs--${alignment}`]: alignment }, className)
|
|
793
976
|
}, rest), {
|
|
794
|
-
children
|
|
795
|
-
var _a2;
|
|
796
|
-
return !isValidElement(child) ? null : cloneElement4(child, __spreadProps(__spreadValues({}, child.props), { value: (_a2 = child.props.value) != null ? _a2 : index }));
|
|
797
|
-
})
|
|
977
|
+
children
|
|
798
978
|
})
|
|
799
979
|
),
|
|
800
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ jsx12("div", { className: `${PREFIX_CLS}divider` })
|
|
801
981
|
]
|
|
802
982
|
}
|
|
803
983
|
);
|
|
804
984
|
};
|
|
805
985
|
|
|
806
|
-
// src/components/DropdownEnumList.tsx
|
|
807
|
-
import { DropDownList } from "@progress/kendo-react-dropdowns";
|
|
808
|
-
import { useEffect as useEffect6, useState as useState4 } from "react";
|
|
809
|
-
import { Fragment as Fragment2, jsx as jsx10 } from "react/jsx-runtime";
|
|
810
|
-
function parsearDataForComboBox(array, key, text, itemAll = false) {
|
|
811
|
-
const dataForComboBox = [];
|
|
812
|
-
if (itemAll)
|
|
813
|
-
dataForComboBox.push({ key: "", text: "ALL" });
|
|
814
|
-
if (array !== void 0) {
|
|
815
|
-
array.map((a) => {
|
|
816
|
-
dataForComboBox.push({ key: a[key], text: a[text] });
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
return dataForComboBox;
|
|
820
|
-
}
|
|
821
|
-
function GetEnumDescription(key, typeEnum, description) {
|
|
822
|
-
const listLabel = description.get(typeEnum);
|
|
823
|
-
let label = void 0;
|
|
824
|
-
if (listLabel != void 0)
|
|
825
|
-
label = listLabel.get(parseInt(key));
|
|
826
|
-
if (label == void 0) {
|
|
827
|
-
label = typeEnum[key];
|
|
828
|
-
return label.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
829
|
-
}
|
|
830
|
-
return label;
|
|
831
|
-
}
|
|
832
|
-
function EnumToArray(typeEnum, replaceGuionForSpace = true, description) {
|
|
833
|
-
const values = [];
|
|
834
|
-
for (const key in typeEnum) {
|
|
835
|
-
if (typeof typeEnum[key] === "string")
|
|
836
|
-
values.push({
|
|
837
|
-
value: Number(key),
|
|
838
|
-
label: replaceGuionForSpace ? GetEnumDescription(key, typeEnum, description) : typeEnum[key]
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
return values;
|
|
842
|
-
}
|
|
843
|
-
var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) => {
|
|
844
|
-
const [value, setValue] = useState4("");
|
|
845
|
-
const [data, setData] = useState4([]);
|
|
846
|
-
useEffect6(() => {
|
|
847
|
-
setData(
|
|
848
|
-
parsearDataForComboBox(EnumToArray(dataEnum, true, description), "value", "label", false).sort(
|
|
849
|
-
(a, b) => Number(a.key) - Number(b.key)
|
|
850
|
-
)
|
|
851
|
-
);
|
|
852
|
-
}, []);
|
|
853
|
-
useEffect6(() => {
|
|
854
|
-
if (data.length > 0) {
|
|
855
|
-
setValue(data.filter((x) => x.key == defaultValue)[0]);
|
|
856
|
-
}
|
|
857
|
-
}, [data]);
|
|
858
|
-
const handleOptionClick = (e) => {
|
|
859
|
-
onChange(e);
|
|
860
|
-
setValue(e);
|
|
861
|
-
};
|
|
862
|
-
return /* @__PURE__ */ jsx10(Fragment2, { children: /* @__PURE__ */ jsx10(
|
|
863
|
-
DropDownList,
|
|
864
|
-
{
|
|
865
|
-
className: "d-inline-block align-middle mr-2",
|
|
866
|
-
data,
|
|
867
|
-
dataItemKey: "key",
|
|
868
|
-
id: "cmbDisplay",
|
|
869
|
-
name: "cmbDisplay",
|
|
870
|
-
onChange: (event) => {
|
|
871
|
-
handleOptionClick(event.value);
|
|
872
|
-
},
|
|
873
|
-
textField: "text",
|
|
874
|
-
style: {
|
|
875
|
-
width: `${width}px`
|
|
876
|
-
},
|
|
877
|
-
defaultValue: value
|
|
878
|
-
}
|
|
879
|
-
) });
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
// src/contexts/BreadCrumbContext.tsx
|
|
883
|
-
import { createContext as createContext5, useState as useState6 } from "react";
|
|
884
|
-
|
|
885
986
|
// src/hooks/useLocalStorage.tsx
|
|
886
|
-
import { useCallback, useEffect as
|
|
987
|
+
import { useCallback, useEffect as useEffect7, useState as useState4 } from "react";
|
|
887
988
|
|
|
888
989
|
// src/hooks/useEventListener.tsx
|
|
889
990
|
import { useRef as useRef4 } from "react";
|
|
890
991
|
|
|
891
992
|
// src/hooks/useIsomorphicLayoutEffect.tsx
|
|
892
|
-
import { useEffect as
|
|
893
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect :
|
|
993
|
+
import { useEffect as useEffect6, useLayoutEffect } from "react";
|
|
994
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect6;
|
|
894
995
|
var useIsomorphicLayoutEffect_default = useIsomorphicLayoutEffect;
|
|
895
996
|
|
|
896
997
|
// src/hooks/useEventListener.tsx
|
|
@@ -916,7 +1017,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
916
1017
|
return initialValue;
|
|
917
1018
|
}
|
|
918
1019
|
}, [initialValue, key]);
|
|
919
|
-
const [storedValue, setStoredValue] =
|
|
1020
|
+
const [storedValue, setStoredValue] = useState4(readValue);
|
|
920
1021
|
const setValue = useCallback(
|
|
921
1022
|
(value) => {
|
|
922
1023
|
if (typeof window == "undefined") {
|
|
@@ -933,7 +1034,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
933
1034
|
},
|
|
934
1035
|
[key, storedValue]
|
|
935
1036
|
);
|
|
936
|
-
|
|
1037
|
+
useEffect7(() => {
|
|
937
1038
|
setStoredValue(readValue());
|
|
938
1039
|
}, []);
|
|
939
1040
|
const handleStorageChange = useCallback(() => {
|
|
@@ -952,91 +1053,20 @@ function parseJSON(value) {
|
|
|
952
1053
|
}
|
|
953
1054
|
}
|
|
954
1055
|
|
|
955
|
-
// src/contexts/BreadCrumbContext.tsx
|
|
956
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
957
|
-
var BreadCrumbContext = createContext5({});
|
|
958
|
-
var BreadCrumbContextProvider = ({ children }) => {
|
|
959
|
-
const [active, setActive] = useLocalStorage("@active", "");
|
|
960
|
-
const [path, setPath] = useLocalStorage("@path", "/");
|
|
961
|
-
const [goBack, setGoBack] = useLocalStorage("@goBack", false);
|
|
962
|
-
const [pathChild, setPathChild] = useLocalStorage("@pathChild", "");
|
|
963
|
-
const [routes, setRoutes] = useState6([]);
|
|
964
|
-
return /* @__PURE__ */ jsx11(
|
|
965
|
-
BreadCrumbContext.Provider,
|
|
966
|
-
{
|
|
967
|
-
value: {
|
|
968
|
-
active,
|
|
969
|
-
setActive,
|
|
970
|
-
path,
|
|
971
|
-
setPath,
|
|
972
|
-
goBack,
|
|
973
|
-
setGoBack,
|
|
974
|
-
pathChild,
|
|
975
|
-
setPathChild,
|
|
976
|
-
routes,
|
|
977
|
-
setRoutes
|
|
978
|
-
},
|
|
979
|
-
children
|
|
980
|
-
}
|
|
981
|
-
);
|
|
982
|
-
};
|
|
983
|
-
|
|
984
|
-
// src/contexts/DrawerContext.tsx
|
|
985
|
-
import { createContext as createContext6, useState as useState7 } from "react";
|
|
986
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
987
|
-
var DrawerContext = createContext6({});
|
|
988
|
-
var DrawerContextProvider = ({ children }) => {
|
|
989
|
-
const [active, setActive] = useState7(false);
|
|
990
|
-
return /* @__PURE__ */ jsx12(DrawerContext.Provider, { value: { active, setActive }, children });
|
|
991
|
-
};
|
|
992
|
-
|
|
993
|
-
// src/contexts/HistoryContext.tsx
|
|
994
|
-
import { createContext as createContext7 } from "react";
|
|
995
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
996
|
-
var HistoryContext = createContext7({});
|
|
997
|
-
var HistoryContextProvider = ({ children }) => {
|
|
998
|
-
const [list, setList] = useLocalStorage("@list_paths", []);
|
|
999
|
-
const updateList = (value) => {
|
|
1000
|
-
setList(
|
|
1001
|
-
(prev) => prev.concat({
|
|
1002
|
-
path: value.path,
|
|
1003
|
-
name: value.name,
|
|
1004
|
-
date: /* @__PURE__ */ new Date()
|
|
1005
|
-
})
|
|
1006
|
-
);
|
|
1007
|
-
};
|
|
1008
|
-
return /* @__PURE__ */ jsx13(HistoryContext.Provider, { value: { list, updateList }, children });
|
|
1009
|
-
};
|
|
1010
|
-
|
|
1011
|
-
// src/contexts/SidebarMainContext.tsx
|
|
1012
|
-
import { createContext as createContext8, useState as useState8 } from "react";
|
|
1013
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1014
|
-
var SidebarMainContext = createContext8({});
|
|
1015
|
-
var SidebarMainContextProvider = ({ children }) => {
|
|
1016
|
-
const [open2, setOpen] = useState8(true);
|
|
1017
|
-
return /* @__PURE__ */ jsx14(SidebarMainContext.Provider, { value: { open: open2, setOpen }, children });
|
|
1018
|
-
};
|
|
1019
|
-
|
|
1020
|
-
// src/contexts/GlobalProvider.tsx
|
|
1021
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1022
|
-
function GlobalProvider({ children }) {
|
|
1023
|
-
return /* @__PURE__ */ jsx15(HistoryContextProvider, { children: /* @__PURE__ */ jsx15(BreadCrumbContextProvider, { children: /* @__PURE__ */ jsx15(SidebarMainContextProvider, { children: /* @__PURE__ */ jsx15(DrawerContextProvider, { children }) }) }) });
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
1056
|
// src/hooks/usePrevious.tsx
|
|
1027
|
-
import { useEffect as
|
|
1057
|
+
import { useEffect as useEffect8, useRef as useRef5 } from "react";
|
|
1028
1058
|
var usePrevious = (value) => {
|
|
1029
1059
|
const ref = useRef5();
|
|
1030
|
-
|
|
1060
|
+
useEffect8(() => {
|
|
1031
1061
|
ref.current = value;
|
|
1032
1062
|
});
|
|
1033
1063
|
return ref.current;
|
|
1034
1064
|
};
|
|
1035
1065
|
|
|
1036
1066
|
// src/hooks/useStep.tsx
|
|
1037
|
-
import { useCallback as useCallback2, useMemo as useMemo4, useState as
|
|
1067
|
+
import { useCallback as useCallback2, useMemo as useMemo4, useState as useState5 } from "react";
|
|
1038
1068
|
var useStep = (maxStep) => {
|
|
1039
|
-
const [currentStep, setCurrentStep] =
|
|
1069
|
+
const [currentStep, setCurrentStep] = useState5(1);
|
|
1040
1070
|
const canGoToNextStep = useMemo4(() => currentStep + 1 <= maxStep, [currentStep, maxStep]);
|
|
1041
1071
|
const canGoToPrevStep = useMemo4(() => currentStep - 1 >= 1, [currentStep]);
|
|
1042
1072
|
const setStep = useCallback2(
|
|
@@ -1075,679 +1105,23 @@ var useStep = (maxStep) => {
|
|
|
1075
1105
|
}
|
|
1076
1106
|
];
|
|
1077
1107
|
};
|
|
1078
|
-
|
|
1079
|
-
// src/layout/AppBreadcrumb.tsx
|
|
1080
|
-
import { useContext as useContext7, useEffect as useEffect10 } from "react";
|
|
1081
|
-
import { MdClose } from "react-icons/md";
|
|
1082
|
-
import { VscChevronRight } from "react-icons/vsc";
|
|
1083
|
-
import { Link as Link3 } from "react-router-dom";
|
|
1084
|
-
|
|
1085
|
-
// src/styled-components/breadcrumb.ts
|
|
1086
|
-
import styled from "styled-components";
|
|
1087
|
-
var Breadcrumb = styled.div`
|
|
1088
|
-
font-family: 'Inter', sans-serif;
|
|
1089
|
-
padding: 10px 0px;
|
|
1090
|
-
text-transform: uppercase;
|
|
1091
|
-
font-weight: bold;
|
|
1092
|
-
font-size: 0.9rem;
|
|
1093
|
-
color: #92190e;
|
|
1094
|
-
display: flex;
|
|
1095
|
-
justify-content: space-between;
|
|
1096
|
-
align-items: center;
|
|
1097
|
-
background-color: white;
|
|
1098
|
-
align-items: center;
|
|
1099
|
-
|
|
1100
|
-
.link {
|
|
1101
|
-
color: #92190e;
|
|
1102
|
-
&:hover {
|
|
1103
|
-
color: #92190e;
|
|
1104
|
-
cursor: pointer;
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
`;
|
|
1108
|
-
var BreadCrumbTitle = styled.div`
|
|
1109
|
-
font-family: 'Inter', sans-serif;
|
|
1110
|
-
font-weight: bold;
|
|
1111
|
-
font-size: 1.2rem !important;
|
|
1112
|
-
color: #92190e;
|
|
1113
|
-
margin-top: 15px;
|
|
1114
|
-
`;
|
|
1115
|
-
var TitlePage = styled.div`
|
|
1116
|
-
font-family: 'Inter', sans-serif;
|
|
1117
|
-
font-weight: bold;
|
|
1118
|
-
font-size: 1.2rem !important;
|
|
1119
|
-
color: #92190e;
|
|
1120
|
-
margin-top: 15px;
|
|
1121
|
-
`;
|
|
1122
|
-
|
|
1123
|
-
// src/styled-components/menu.ts
|
|
1124
|
-
import { Link } from "react-router-dom";
|
|
1125
|
-
import styled2 from "styled-components";
|
|
1126
|
-
var MenuItem2 = styled2(Link)`
|
|
1127
|
-
text-decoration: none;
|
|
1128
|
-
color: black;
|
|
1129
|
-
display: flex;
|
|
1130
|
-
justify-content: ${(props) => props.type === "col" ? "center" : "flex-start"};
|
|
1131
|
-
align-items: center;
|
|
1132
|
-
flex-direction: ${(props) => props.type === "col" ? "column" : "row"};
|
|
1133
|
-
border: 1px solid transparent;
|
|
1134
|
-
width: ${(props) => props.width ? props.width : "100px"};
|
|
1135
|
-
padding: 10px;
|
|
1136
|
-
text-decoration: none !important;
|
|
1137
|
-
&:hover {
|
|
1138
|
-
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
.icon {
|
|
1142
|
-
width: 30px;
|
|
1143
|
-
text-decoration: none;
|
|
1144
|
-
}
|
|
1145
|
-
.text {
|
|
1146
|
-
text-align: center;
|
|
1147
|
-
font-size: 12px;
|
|
1148
|
-
text-decoration: none !important;
|
|
1149
|
-
color: black;
|
|
1150
|
-
margin-top: ${(props) => props.type === "col" ? "0px" : "15px"};
|
|
1151
|
-
&:hover {
|
|
1152
|
-
text-decoration: none !important;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
`;
|
|
1156
|
-
var MenuTitle = styled2.p`
|
|
1157
|
-
font-size: 16px;
|
|
1158
|
-
font-weight: bold !important;
|
|
1159
|
-
`;
|
|
1160
|
-
|
|
1161
|
-
// src/styled-components/navbar.ts
|
|
1162
|
-
import styled3 from "styled-components";
|
|
1163
|
-
var Navbar = styled3.nav`
|
|
1164
|
-
background: ${(props) => {
|
|
1165
|
-
return !props.gradient ? ` linear-gradient( 90.03deg, #92190e 80.71%, #f0b92c 107.21% ) !important` : `#92190e`;
|
|
1166
|
-
}};
|
|
1167
|
-
z-index: 10;
|
|
1168
|
-
width: 100%;
|
|
1169
|
-
max-width: 100vw;
|
|
1170
|
-
display: flex;
|
|
1171
|
-
justify-content: space-between;
|
|
1172
|
-
padding-top: 10px;
|
|
1173
|
-
padding-bottom: 10px;
|
|
1174
|
-
position: sticky;
|
|
1175
|
-
top: 0px;
|
|
1176
|
-
height: 40px;
|
|
1177
|
-
.input {
|
|
1178
|
-
border-radius: 2px !important;
|
|
1179
|
-
padding: 2px !important;
|
|
1180
|
-
font-size: 12px !important;
|
|
1181
|
-
height: 20px !important;
|
|
1182
|
-
border: none;
|
|
1183
|
-
&:focus {
|
|
1184
|
-
outline: none !important;
|
|
1185
|
-
}
|
|
1186
|
-
::placeholder {
|
|
1187
|
-
color: #92190e;
|
|
1188
|
-
}
|
|
1189
|
-
@media (max-width: 470px) {
|
|
1190
|
-
display: none;
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
.dialog {
|
|
1194
|
-
z-index: 20000 !important;
|
|
1195
|
-
position: absolute;
|
|
1196
|
-
width: 400px;
|
|
1197
|
-
height: 500px;
|
|
1198
|
-
min-height: 500px;
|
|
1199
|
-
overflow: scroll;
|
|
1200
|
-
overflow-x: hidden;
|
|
1201
|
-
min-width: 400px;
|
|
1202
|
-
max-width: 400px;
|
|
1203
|
-
background-color: white;
|
|
1204
|
-
border-radius: 20px;
|
|
1205
|
-
top: 50%;
|
|
1206
|
-
left: 50%;
|
|
1207
|
-
transform: translate(-50%, -50%);
|
|
1208
|
-
}
|
|
1209
|
-
`;
|
|
1210
|
-
|
|
1211
|
-
// src/styled-components/options.ts
|
|
1212
|
-
import styled4 from "styled-components";
|
|
1213
|
-
var MenuOptions = styled4.div`
|
|
1214
|
-
font-size: bold;
|
|
1215
|
-
display: flex;
|
|
1216
|
-
width: 100%;
|
|
1217
|
-
gap: 10px;
|
|
1218
|
-
justify-content: flex-start;
|
|
1219
|
-
border-bottom: 1px solid #e6e6e6;
|
|
1220
|
-
background-color: white;
|
|
1221
|
-
flex-wrap: wrap;
|
|
1222
|
-
.button-option {
|
|
1223
|
-
display: flex;
|
|
1224
|
-
flex-direction: row;
|
|
1225
|
-
justify-content: space-between;
|
|
1226
|
-
align-items: center;
|
|
1227
|
-
gap: 5px;
|
|
1228
|
-
padding: 10px 20px;
|
|
1229
|
-
font-weight: bold;
|
|
1230
|
-
background-color: white !important;
|
|
1231
|
-
border: none;
|
|
1232
|
-
.icon {
|
|
1233
|
-
color: #92190e;
|
|
1234
|
-
}
|
|
1235
|
-
.text {
|
|
1236
|
-
@media (max-width: 470px) {
|
|
1237
|
-
display: none;
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
`;
|
|
1242
|
-
|
|
1243
|
-
// src/styled-components/sidebar.ts
|
|
1244
|
-
import { Link as Link2 } from "react-router-dom";
|
|
1245
|
-
import styled5 from "styled-components";
|
|
1246
|
-
var ItemSidebar = styled5.div`
|
|
1247
|
-
padding: 10px 25px;
|
|
1248
|
-
display: flex;
|
|
1249
|
-
align-items: center;
|
|
1250
|
-
gap: 30px;
|
|
1251
|
-
font-family: 'Inter', sans-serif;
|
|
1252
|
-
&:hover {
|
|
1253
|
-
color: white !important;
|
|
1254
|
-
text-decoration: none;
|
|
1255
|
-
background: #92190e;
|
|
1256
|
-
.icon-sidebar {
|
|
1257
|
-
color: white !important;
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
&:active {
|
|
1261
|
-
color: white !important;
|
|
1262
|
-
text-decoration: none;
|
|
1263
|
-
background: #92190e;
|
|
1264
|
-
.icon-sidebar {
|
|
1265
|
-
color: white !important;
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
`;
|
|
1269
|
-
var SidebarNavigation = styled5.nav`
|
|
1270
|
-
position: ${({ fixed = true }) => fixed ? "fixed" : "static"};
|
|
1271
|
-
top: 0;
|
|
1272
|
-
left: 0;
|
|
1273
|
-
min-height: 100vh;
|
|
1274
|
-
box-shadow: 7px 0px 14px 1px rgba(145, 141, 141, 0.51);
|
|
1275
|
-
-webkit-box-shadow: 7px 0px 14px 1px rgba(145, 141, 141, 0.51);
|
|
1276
|
-
-moz-box-shadow: 7px 0px 14px 1px rgba(145, 141, 141, 0.51);
|
|
1277
|
-
background: white;
|
|
1278
|
-
font-family: 'Inter', sans-serif;
|
|
1279
|
-
padding: 0;
|
|
1280
|
-
width: ${({ fixed = true, active = true }) => fixed ? active ? "270px" : "0px" : "auto"};
|
|
1281
|
-
z-index: 11;
|
|
1282
|
-
transition: width 0.2s ease-in-out;
|
|
1283
|
-
|
|
1284
|
-
overflow: hidden;
|
|
1285
|
-
height: 100vh;
|
|
1286
|
-
overflow-y: auto;
|
|
1287
|
-
box-shadow: ${({ shadow = true }) => shadow ? "rgba(99, 99, 99, 0.2) 0px 2px 8px 0px" : "none"};
|
|
1288
|
-
|
|
1289
|
-
&::-webkit-scrollbar {
|
|
1290
|
-
display: none !important;
|
|
1291
|
-
}
|
|
1292
|
-
.nav {
|
|
1293
|
-
flex-wrap: nowrap;
|
|
1294
|
-
flex-direction: column;
|
|
1295
|
-
font-size: 12px;
|
|
1296
|
-
|
|
1297
|
-
.nav-item {
|
|
1298
|
-
.collapse {
|
|
1299
|
-
z-index: 999;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
.collapse.show,
|
|
1303
|
-
.collapsing {
|
|
1304
|
-
background: rgba(0, 0, 0);
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
.nav-link {
|
|
1308
|
-
align-items: center;
|
|
1309
|
-
display: flex;
|
|
1310
|
-
padding-left: 40px;
|
|
1311
|
-
white-space: nowrap;
|
|
1312
|
-
|
|
1313
|
-
color: #92190e;
|
|
1314
|
-
i {
|
|
1315
|
-
margin-right: 20px;
|
|
1316
|
-
}
|
|
1317
|
-
.menu-title {
|
|
1318
|
-
color: inherit;
|
|
1319
|
-
display: inline-block;
|
|
1320
|
-
line-height: 1;
|
|
1321
|
-
color: black;
|
|
1322
|
-
vertical-align: middle;
|
|
1323
|
-
cursor: pointer;
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
&.active {
|
|
1328
|
-
> .nav-link {
|
|
1329
|
-
color: white;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
&.not-navigation-link {
|
|
1333
|
-
position: relative;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
&:not(.sub-menu) {
|
|
1338
|
-
> .nav-item {
|
|
1339
|
-
&:hover {
|
|
1340
|
-
&:not(.nav-profile) {
|
|
1341
|
-
> .nav-link {
|
|
1342
|
-
background: $sidebar-light-menu-hover-bg;
|
|
1343
|
-
color: $sidebar-light-menu-hover-color;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
&.sub-menu {
|
|
1351
|
-
margin-bottom: 0;
|
|
1352
|
-
padding: $sidebar-submenu-padding;
|
|
1353
|
-
|
|
1354
|
-
.rtl & {
|
|
1355
|
-
padding: 0 4rem 0 0;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
.nav-item {
|
|
1359
|
-
.nav-link {
|
|
1360
|
-
color: $sidebar-light-submenu-color;
|
|
1361
|
-
padding: $sidebar-submenu-item-padding;
|
|
1362
|
-
font-size: $sidebar-submenu-font-size;
|
|
1363
|
-
line-height: 1;
|
|
1364
|
-
height: auto;
|
|
1365
|
-
|
|
1366
|
-
&.active {
|
|
1367
|
-
color: $sidebar-light-menu-active-color;
|
|
1368
|
-
background: transparent;
|
|
1369
|
-
|
|
1370
|
-
&:before {
|
|
1371
|
-
background: $sidebar-light-menu-active-color;
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
&:hover {
|
|
1377
|
-
> .nav-link {
|
|
1378
|
-
background: $sidebar-light-submenu-hover-bg;
|
|
1379
|
-
color: $sidebar-light-submenu-hover-color;
|
|
1380
|
-
|
|
1381
|
-
&:before {
|
|
1382
|
-
background: $sidebar-light-submenu-hover-color;
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
&.sub-menu2 {
|
|
1390
|
-
margin-bottom: 0;
|
|
1391
|
-
padding: $sidebar-submenu2-padding;
|
|
1392
|
-
|
|
1393
|
-
.rtl & {
|
|
1394
|
-
padding: 0 4rem 0 0;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
.nav-item {
|
|
1398
|
-
.nav-link {
|
|
1399
|
-
color: $sidebar-light-submenu-color;
|
|
1400
|
-
padding: $sidebar-submenu-item-padding;
|
|
1401
|
-
font-size: $sidebar-submenu-font-size;
|
|
1402
|
-
line-height: 1;
|
|
1403
|
-
height: auto;
|
|
1404
|
-
|
|
1405
|
-
&.active {
|
|
1406
|
-
color: $sidebar-light-menu-active-color;
|
|
1407
|
-
background: transparent;
|
|
1408
|
-
|
|
1409
|
-
&:before {
|
|
1410
|
-
background: $sidebar-light-menu-active-color;
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
&:hover {
|
|
1416
|
-
> .nav-link {
|
|
1417
|
-
background: $sidebar-light-submenu-hover-bg;
|
|
1418
|
-
color: $sidebar-light-submenu-hover-color;
|
|
1419
|
-
|
|
1420
|
-
&:before {
|
|
1421
|
-
background: $sidebar-light-submenu-hover-color;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
`;
|
|
1430
|
-
var ConfigurationOption = styled5.nav`
|
|
1431
|
-
position: fixed;
|
|
1432
|
-
top: 50px;
|
|
1433
|
-
right: 0;
|
|
1434
|
-
min-height: 100vh;
|
|
1435
|
-
box-shadow: 7px 0px 14px 1px rgba(201, 196, 196, 0.51);
|
|
1436
|
-
-webkit-box-shadow: 7px 0px 14px 1px rgba(201, 196, 196, 0.51);
|
|
1437
|
-
-moz-box-shadow: 7px 0px 14px 1px rgba(201, 196, 196, 0.51);
|
|
1438
|
-
min-height: calc(100vh);
|
|
1439
|
-
|
|
1440
|
-
font-family: 'Inter', sans-serif;
|
|
1441
|
-
padding: 0;
|
|
1442
|
-
width: ${(props) => props.active ? "300px" : "0px"};
|
|
1443
|
-
z-index: 11;
|
|
1444
|
-
transition: width 0.2s ease-in-out;
|
|
1445
|
-
overflow: hidden !important;
|
|
1446
|
-
`;
|
|
1447
|
-
var ItemLinkSidebar = styled5(Link2)`
|
|
1448
|
-
padding: 10px 25px;
|
|
1449
|
-
display: flex;
|
|
1450
|
-
align-items: center;
|
|
1451
|
-
gap: 30px;
|
|
1452
|
-
color: #343a40;
|
|
1453
|
-
text-decoration: none;
|
|
1454
|
-
font-family: 'Inter', sans-serif;
|
|
1455
|
-
&:hover {
|
|
1456
|
-
color: white !important;
|
|
1457
|
-
text-decoration: none;
|
|
1458
|
-
background: #92190e;
|
|
1459
|
-
.icon-sidebar {
|
|
1460
|
-
color: white !important;
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
`;
|
|
1464
|
-
|
|
1465
|
-
// src/styled-components/template.ts
|
|
1466
|
-
import styled6 from "styled-components";
|
|
1467
|
-
var Main = styled6.main`
|
|
1468
|
-
width: 100%;
|
|
1469
|
-
min-height: 90vh;
|
|
1470
|
-
display: flex;
|
|
1471
|
-
flex-direction: column;
|
|
1472
|
-
justify-content: space-between;
|
|
1473
|
-
background-color: white;
|
|
1474
|
-
padding: 10px 60px;
|
|
1475
|
-
position: relative;
|
|
1476
|
-
padding-left: ${(props) => {
|
|
1477
|
-
return props.activeDrawer ? `300px` : `30px`;
|
|
1478
|
-
}};
|
|
1479
|
-
@media (max-width: 470px) {
|
|
1480
|
-
padding: 10px 10px;
|
|
1481
|
-
}
|
|
1482
|
-
`;
|
|
1483
|
-
var CloseIcon = styled6.button`
|
|
1484
|
-
color: black;
|
|
1485
|
-
text-decoration: none;
|
|
1486
|
-
border: none;
|
|
1487
|
-
padding: 10px 10px;
|
|
1488
|
-
background-color: white;
|
|
1489
|
-
border-radius: 50%;
|
|
1490
|
-
display: flex;
|
|
1491
|
-
align-items: center;
|
|
1492
|
-
justify-content: center;
|
|
1493
|
-
cursor: pointer;
|
|
1494
|
-
top: 10px;
|
|
1495
|
-
right: 10px;
|
|
1496
|
-
text-align: center;
|
|
1497
|
-
&:hover {
|
|
1498
|
-
color: black;
|
|
1499
|
-
text-decoration: none;
|
|
1500
|
-
background-color: #e8e8e8;
|
|
1501
|
-
}
|
|
1502
|
-
`;
|
|
1503
|
-
|
|
1504
|
-
// src/layout/AppBreadcrumb.tsx
|
|
1505
|
-
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1506
|
-
var AppBreadCrumb = ({ title, paths }) => {
|
|
1507
|
-
const { setRoutes } = useContext7(BreadCrumbContext);
|
|
1508
|
-
useEffect10(() => {
|
|
1509
|
-
if (!(paths == null ? void 0 : paths.length))
|
|
1510
|
-
return;
|
|
1511
|
-
setRoutes(paths != null ? paths : []);
|
|
1512
|
-
}, []);
|
|
1513
|
-
return /* @__PURE__ */ jsx16(BreadCrumbTitle, { children: title != null ? title : "Home" });
|
|
1514
|
-
};
|
|
1515
|
-
var AppBreadCrumbNav = ({
|
|
1516
|
-
paths,
|
|
1517
|
-
onPush
|
|
1518
|
-
}) => {
|
|
1519
|
-
const { active, path, routes, setRoutes } = useContext7(BreadCrumbContext);
|
|
1520
|
-
const { updateList } = useContext7(HistoryContext);
|
|
1521
|
-
useEffect10(() => {
|
|
1522
|
-
updateList({ name: active, path });
|
|
1523
|
-
}, [path, active]);
|
|
1524
|
-
useEffect10(() => {
|
|
1525
|
-
setRoutes(paths != null ? paths : []);
|
|
1526
|
-
}, [paths]);
|
|
1527
|
-
return /* @__PURE__ */ jsxs10(Breadcrumb, { children: [
|
|
1528
|
-
/* @__PURE__ */ jsxs10("div", { className: "d-flex align-items-center", children: [
|
|
1529
|
-
/* @__PURE__ */ jsx16(Link3, { to: "/", className: "link", children: "HOME" }),
|
|
1530
|
-
routes.length > 0 && /* @__PURE__ */ jsx16(VscChevronRight, { color: "black" }),
|
|
1531
|
-
routes.length > 0 ? routes.map((i, idx, arr) => {
|
|
1532
|
-
if (i.route === -1) {
|
|
1533
|
-
return /* @__PURE__ */ jsxs10("span", { className: "link", onClick: () => onPush(-1), children: [
|
|
1534
|
-
i.title,
|
|
1535
|
-
" ",
|
|
1536
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx16(VscChevronRight, { color: "black" })
|
|
1537
|
-
] }, idx);
|
|
1538
|
-
}
|
|
1539
|
-
return /* @__PURE__ */ jsxs10(Link3, { to: i.route, className: "link", children: [
|
|
1540
|
-
i.title,
|
|
1541
|
-
" ",
|
|
1542
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ jsx16(VscChevronRight, { color: "black" })
|
|
1543
|
-
] }, idx);
|
|
1544
|
-
}) : ""
|
|
1545
|
-
] }),
|
|
1546
|
-
/* @__PURE__ */ jsx16(
|
|
1547
|
-
CloseIcon,
|
|
1548
|
-
{
|
|
1549
|
-
onClick: () => {
|
|
1550
|
-
if ((routes == null ? void 0 : routes.length) === 1) {
|
|
1551
|
-
onPush("/");
|
|
1552
|
-
setRoutes([]);
|
|
1553
|
-
return;
|
|
1554
|
-
}
|
|
1555
|
-
onPush(`${routes && routes[(routes == null ? void 0 : routes.length) - 2].route}`);
|
|
1556
|
-
},
|
|
1557
|
-
children: /* @__PURE__ */ jsx16(MdClose, { fontSize: 20 })
|
|
1558
|
-
}
|
|
1559
|
-
)
|
|
1560
|
-
] });
|
|
1561
|
-
};
|
|
1562
|
-
|
|
1563
|
-
// src/layout/AppLoader.tsx
|
|
1564
|
-
import { useEffect as useEffect11 } from "react";
|
|
1565
|
-
import ReactDOM from "react-dom";
|
|
1566
|
-
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1567
|
-
var LoaderGrid = () => {
|
|
1568
|
-
const Loader = /* @__PURE__ */ jsxs11("div", { className: "k-loading-mask", children: [
|
|
1569
|
-
/* @__PURE__ */ jsx17("span", { className: "k-loading-text", children: "Loading" }),
|
|
1570
|
-
/* @__PURE__ */ jsx17("div", { className: "k-loading-image" }),
|
|
1571
|
-
/* @__PURE__ */ jsx17("div", { className: "k-loading-color" })
|
|
1572
|
-
] });
|
|
1573
|
-
const gridContent = document && document.querySelector(".k-grid-content");
|
|
1574
|
-
const reportContent = document && document.querySelector(".loading-report");
|
|
1575
|
-
return gridContent ? ReactDOM.createPortal(Loader, gridContent) : reportContent ? ReactDOM.createPortal(Loader, reportContent) : Loader;
|
|
1576
|
-
};
|
|
1577
|
-
var AppLoader = (props) => {
|
|
1578
|
-
const { type = "grid", parent, minDuration } = props;
|
|
1579
|
-
const parentEl = type === "grid" ? document.querySelector(parent != null ? parent : ".k-grid-container") : parent ? document.querySelector(parent) : null;
|
|
1580
|
-
const Loading = /* @__PURE__ */ jsxs11("div", { className: `${type}-loading k-loading-mask`, children: [
|
|
1581
|
-
/* @__PURE__ */ jsx17("span", { className: "k-loading-text", children: "Loading" }),
|
|
1582
|
-
/* @__PURE__ */ jsx17("div", { className: "k-loading-image" }),
|
|
1583
|
-
/* @__PURE__ */ jsx17("div", { className: "k-loading-color" })
|
|
1584
|
-
] });
|
|
1585
|
-
useEffect11(() => {
|
|
1586
|
-
if (type === "button") {
|
|
1587
|
-
const loadingEl = document.createElement("div");
|
|
1588
|
-
loadingEl.className = "icon button-loading k-loading-mask";
|
|
1589
|
-
loadingEl.innerHTML = `
|
|
1590
|
-
<div class="k-loading-image"></div>
|
|
1591
|
-
`;
|
|
1592
|
-
if (parentEl) {
|
|
1593
|
-
const button = parentEl;
|
|
1594
|
-
button.classList.add("btn-loading");
|
|
1595
|
-
button.disabled = true;
|
|
1596
|
-
button.insertBefore(loadingEl, button.firstChild);
|
|
1597
|
-
}
|
|
1598
|
-
return () => {
|
|
1599
|
-
if (parentEl) {
|
|
1600
|
-
if (minDuration) {
|
|
1601
|
-
setTimeout(() => {
|
|
1602
|
-
const button = parentEl;
|
|
1603
|
-
button.classList.remove("btn-loading");
|
|
1604
|
-
button.removeChild(loadingEl);
|
|
1605
|
-
button.disabled = false;
|
|
1606
|
-
}, minDuration);
|
|
1607
|
-
} else {
|
|
1608
|
-
const button = parentEl;
|
|
1609
|
-
button.classList.remove("btn-loading");
|
|
1610
|
-
button.removeChild(loadingEl);
|
|
1611
|
-
button.disabled = false;
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
};
|
|
1615
|
-
}
|
|
1616
|
-
}, []);
|
|
1617
|
-
return type === "button" ? null : parentEl ? ReactDOM.createPortal(Loading, parentEl) : Loading;
|
|
1618
|
-
};
|
|
1619
|
-
|
|
1620
|
-
// src/layout/NavOptions.tsx
|
|
1621
|
-
import { Dropdown } from "react-bootstrap";
|
|
1622
|
-
import { BsArrowsFullscreen } from "react-icons/bs";
|
|
1623
|
-
import { FiCheckCircle, FiFilter, FiPlusSquare, FiRefreshCcw, FiSave } from "react-icons/fi";
|
|
1624
|
-
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1625
|
-
var NavOptions = ({
|
|
1626
|
-
exportExcel,
|
|
1627
|
-
customButtons,
|
|
1628
|
-
onCreate,
|
|
1629
|
-
onRefresh,
|
|
1630
|
-
onSelect,
|
|
1631
|
-
onClear,
|
|
1632
|
-
onExpandScreen
|
|
1633
|
-
}) => {
|
|
1634
|
-
return /* @__PURE__ */ jsxs12(MenuOptions, { children: [
|
|
1635
|
-
onCreate && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onCreate, children: [
|
|
1636
|
-
/* @__PURE__ */ jsx18(FiPlusSquare, { className: "icon" }),
|
|
1637
|
-
" ",
|
|
1638
|
-
/* @__PURE__ */ jsx18("span", { className: "text", children: "New" })
|
|
1639
|
-
] }),
|
|
1640
|
-
onRefresh && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onRefresh, children: [
|
|
1641
|
-
/* @__PURE__ */ jsx18(FiRefreshCcw, { className: "icon" }),
|
|
1642
|
-
" ",
|
|
1643
|
-
/* @__PURE__ */ jsx18("span", { className: "text", children: "Refresh" })
|
|
1644
|
-
] }),
|
|
1645
|
-
exportExcel && exportExcel.length > 0 && /* @__PURE__ */ jsxs12(Dropdown, { className: "button-option", children: [
|
|
1646
|
-
/* @__PURE__ */ jsxs12(
|
|
1647
|
-
Dropdown.Toggle,
|
|
1648
|
-
{
|
|
1649
|
-
id: "btnExport",
|
|
1650
|
-
className: "p-2 bg-light text-dark border-0 font-weight-bold",
|
|
1651
|
-
title: "Export to Excel",
|
|
1652
|
-
children: [
|
|
1653
|
-
/* @__PURE__ */ jsx18(FiSave, { className: "icon" }),
|
|
1654
|
-
/* @__PURE__ */ jsx18(
|
|
1655
|
-
"span",
|
|
1656
|
-
{
|
|
1657
|
-
style: {
|
|
1658
|
-
fontSize: "13px",
|
|
1659
|
-
fontFamily: '"Inter", sans-serif'
|
|
1660
|
-
},
|
|
1661
|
-
className: "text",
|
|
1662
|
-
children: "Export"
|
|
1663
|
-
}
|
|
1664
|
-
)
|
|
1665
|
-
]
|
|
1666
|
-
}
|
|
1667
|
-
),
|
|
1668
|
-
/* @__PURE__ */ jsx18(Dropdown.Menu, { children: exportExcel.map((item, index) => {
|
|
1669
|
-
return /* @__PURE__ */ jsxs12(Dropdown.Item, { onClick: item.onAction, children: [
|
|
1670
|
-
/* @__PURE__ */ jsx18("i", { className: `${item.classNameIcon} mr-2` }),
|
|
1671
|
-
" ",
|
|
1672
|
-
item.title
|
|
1673
|
-
] }, index);
|
|
1674
|
-
}) })
|
|
1675
|
-
] }),
|
|
1676
|
-
onSelect && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onSelect, children: [
|
|
1677
|
-
/* @__PURE__ */ jsx18(FiCheckCircle, { className: "icon" }),
|
|
1678
|
-
" ",
|
|
1679
|
-
/* @__PURE__ */ jsx18("span", { className: "text", children: "Select All" })
|
|
1680
|
-
] }),
|
|
1681
|
-
onClear && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onClear, children: [
|
|
1682
|
-
/* @__PURE__ */ jsx18(FiFilter, { className: "icon" }),
|
|
1683
|
-
" ",
|
|
1684
|
-
/* @__PURE__ */ jsx18("span", { className: "text", children: "Clear Filters" })
|
|
1685
|
-
] }),
|
|
1686
|
-
onExpandScreen && /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: onExpandScreen, children: [
|
|
1687
|
-
/* @__PURE__ */ jsx18(BsArrowsFullscreen, { className: "icon" }),
|
|
1688
|
-
" ",
|
|
1689
|
-
/* @__PURE__ */ jsx18("span", { className: "text", children: "Full Page" })
|
|
1690
|
-
] }),
|
|
1691
|
-
customButtons == null ? void 0 : customButtons.map((custom, index) => {
|
|
1692
|
-
if (custom.render) {
|
|
1693
|
-
return custom.render;
|
|
1694
|
-
}
|
|
1695
|
-
return /* @__PURE__ */ jsxs12("button", { className: "button-option", onClick: custom.onAction, children: [
|
|
1696
|
-
custom.Icon !== void 0 && /* @__PURE__ */ jsx18(custom.Icon, { className: "icon" }),
|
|
1697
|
-
/* @__PURE__ */ jsx18("span", { className: "text", children: custom.title })
|
|
1698
|
-
] }, index);
|
|
1699
|
-
})
|
|
1700
|
-
] });
|
|
1701
|
-
};
|
|
1702
|
-
|
|
1703
|
-
// src/layout/title.tsx
|
|
1704
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1705
|
-
var Title = ({ title }) => {
|
|
1706
|
-
return /* @__PURE__ */ jsx19(TitlePage, { children: title != null ? title : "Home" });
|
|
1707
|
-
};
|
|
1708
1108
|
export {
|
|
1709
|
-
AppBreadCrumb,
|
|
1710
|
-
AppBreadCrumbNav,
|
|
1711
|
-
AppLoader,
|
|
1712
1109
|
Badge_default as Badge,
|
|
1713
|
-
BreadCrumbContext,
|
|
1714
|
-
BreadCrumbContextProvider,
|
|
1715
|
-
BreadCrumbTitle,
|
|
1716
|
-
Breadcrumb,
|
|
1717
1110
|
Button,
|
|
1718
1111
|
Chip_default as Chip,
|
|
1719
|
-
CloseIcon,
|
|
1720
1112
|
Collapse_default as Collapse,
|
|
1721
1113
|
CollapseContent_default as CollapseContent,
|
|
1722
1114
|
CollapseContext_default as CollapseContext,
|
|
1723
1115
|
CollapseTrigger_default as CollapseTrigger,
|
|
1724
|
-
|
|
1725
|
-
DrawerContextProvider,
|
|
1726
|
-
DropEnumList,
|
|
1727
|
-
GlobalProvider,
|
|
1728
|
-
HistoryContext,
|
|
1729
|
-
HistoryContextProvider,
|
|
1730
|
-
ItemLinkSidebar,
|
|
1731
|
-
ItemSidebar,
|
|
1732
|
-
LoaderGrid,
|
|
1733
|
-
Main,
|
|
1116
|
+
Icon_default as Icon,
|
|
1734
1117
|
Menu_default as Menu,
|
|
1735
1118
|
MenuContext_default as MenuContext,
|
|
1736
1119
|
MenuGroup_default as MenuGroup,
|
|
1737
1120
|
MenuItem_default as MenuItem,
|
|
1738
|
-
MenuItem2 as MenuItems,
|
|
1739
|
-
MenuOptions,
|
|
1740
1121
|
MenuSubmenu_default as MenuSubmenu,
|
|
1741
|
-
MenuTitle,
|
|
1742
1122
|
MenuValueContext_default as MenuValueContext,
|
|
1743
|
-
NavOptions,
|
|
1744
|
-
Navbar,
|
|
1745
|
-
SidebarMainContext,
|
|
1746
|
-
SidebarMainContextProvider,
|
|
1747
|
-
SidebarNavigation,
|
|
1748
1123
|
Tab,
|
|
1749
1124
|
Tabs,
|
|
1750
|
-
Title,
|
|
1751
1125
|
getOpenValuesByPathname,
|
|
1752
1126
|
useCollapse,
|
|
1753
1127
|
useLocalStorage,
|