@unifiedsoftware/react-components 1.0.16 → 1.0.17
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.ts +91 -98
- package/dist/index.js +26 -510
- package/package.json +5 -16
- package/dist/index.d.mts +0 -2101
- package/dist/index.mjs +0 -809
package/dist/index.js
CHANGED
|
@@ -1,224 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var src_exports = {};
|
|
32
|
-
__export(src_exports, {
|
|
33
|
-
AppBreadCrumb: () => AppBreadCrumb,
|
|
34
|
-
AppBreadCrumbNav: () => AppBreadCrumbNav,
|
|
35
|
-
AppLoader: () => AppLoader,
|
|
36
|
-
BreadCrumbContext: () => BreadCrumbContext,
|
|
37
|
-
BreadCrumbContextProvider: () => BreadCrumbContextProvider,
|
|
38
|
-
BreadCrumbTitle: () => BreadCrumbTitle,
|
|
39
|
-
Breadcrumb: () => Breadcrumb,
|
|
40
|
-
CloseIcon: () => CloseIcon,
|
|
41
|
-
DrawerContext: () => DrawerContext,
|
|
42
|
-
DrawerContextProvider: () => DrawerContextProvider,
|
|
43
|
-
DropEnumList: () => DropEnumList,
|
|
44
|
-
GlobalProvider: () => GlobalProvider,
|
|
45
|
-
HistoryContext: () => HistoryContext,
|
|
46
|
-
HistoryContextProvider: () => HistoryContextProvider,
|
|
47
|
-
ItemLinkSidebar: () => ItemLinkSidebar,
|
|
48
|
-
ItemSidebar: () => ItemSidebar,
|
|
49
|
-
LoaderGrid: () => LoaderGrid,
|
|
50
|
-
Main: () => Main,
|
|
51
|
-
MenuItems: () => MenuItem,
|
|
52
|
-
MenuOptions: () => MenuOptions,
|
|
53
|
-
MenuTitle: () => MenuTitle,
|
|
54
|
-
NavOptions: () => NavOptions,
|
|
55
|
-
Navbar: () => Navbar,
|
|
56
|
-
SidebarMainContext: () => SidebarMainContext,
|
|
57
|
-
SidebarMainContextProvider: () => SidebarMainContextProvider,
|
|
58
|
-
SidebarNavigation: () => SidebarNavigation,
|
|
59
|
-
Title: () => Title
|
|
60
|
-
});
|
|
61
|
-
module.exports = __toCommonJS(src_exports);
|
|
62
|
-
|
|
63
|
-
// src/components/DropdownEnumList.tsx
|
|
64
|
-
var import_kendo_react_dropdowns = require("@progress/kendo-react-dropdowns");
|
|
65
|
-
var import_react = require("react");
|
|
66
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
67
|
-
function parsearDataForComboBox(array, key, text, itemAll = false) {
|
|
68
|
-
const dataForComboBox = [];
|
|
69
|
-
if (itemAll)
|
|
70
|
-
dataForComboBox.push({ key: "", text: "ALL" });
|
|
71
|
-
if (array !== void 0) {
|
|
72
|
-
array.map((a) => {
|
|
73
|
-
dataForComboBox.push({ key: a[key], text: a[text] });
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
return dataForComboBox;
|
|
77
|
-
}
|
|
78
|
-
function GetEnumDescription(key, typeEnum, description) {
|
|
79
|
-
const listLabel = description.get(typeEnum);
|
|
80
|
-
let label = void 0;
|
|
81
|
-
if (listLabel != void 0)
|
|
82
|
-
label = listLabel.get(parseInt(key));
|
|
83
|
-
if (label == void 0) {
|
|
84
|
-
label = typeEnum[key];
|
|
85
|
-
return label.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
86
|
-
}
|
|
87
|
-
return label;
|
|
88
|
-
}
|
|
89
|
-
function EnumToArray(typeEnum, replaceGuionForSpace = true, description) {
|
|
90
|
-
const values = [];
|
|
91
|
-
for (const key in typeEnum) {
|
|
92
|
-
if (typeof typeEnum[key] === "string")
|
|
93
|
-
values.push({
|
|
94
|
-
value: Number(key),
|
|
95
|
-
label: replaceGuionForSpace ? GetEnumDescription(key, typeEnum, description) : typeEnum[key]
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return values;
|
|
99
|
-
}
|
|
100
|
-
var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) => {
|
|
101
|
-
const [value, setValue] = (0, import_react.useState)("");
|
|
102
|
-
const [data, setData] = (0, import_react.useState)([]);
|
|
103
|
-
(0, import_react.useEffect)(() => {
|
|
104
|
-
setData(
|
|
105
|
-
parsearDataForComboBox(EnumToArray(dataEnum, true, description), "value", "label", false).sort(
|
|
106
|
-
(a, b) => Number(a.key) - Number(b.key)
|
|
107
|
-
)
|
|
108
|
-
);
|
|
109
|
-
}, []);
|
|
110
|
-
(0, import_react.useEffect)(() => {
|
|
111
|
-
if (data.length > 0) {
|
|
112
|
-
setValue(data.filter((x) => x.key == defaultValue)[0]);
|
|
113
|
-
}
|
|
114
|
-
}, [data]);
|
|
115
|
-
const handleOptionClick = (e) => {
|
|
116
|
-
onChange(e);
|
|
117
|
-
setValue(e);
|
|
118
|
-
};
|
|
119
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
-
import_kendo_react_dropdowns.DropDownList,
|
|
121
|
-
{
|
|
122
|
-
className: "d-inline-block align-middle mr-2",
|
|
123
|
-
data,
|
|
124
|
-
dataItemKey: "key",
|
|
125
|
-
id: "cmbDisplay",
|
|
126
|
-
name: "cmbDisplay",
|
|
127
|
-
onChange: (event) => {
|
|
128
|
-
handleOptionClick(event.value);
|
|
129
|
-
},
|
|
130
|
-
textField: "text",
|
|
131
|
-
style: {
|
|
132
|
-
width: `${width}px`
|
|
133
|
-
},
|
|
134
|
-
defaultValue: value
|
|
135
|
-
}
|
|
136
|
-
) });
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
// src/contexts/BreadCrumbContext.tsx
|
|
140
|
-
var import_react_ui = require("@unifiedsoftware/react-ui");
|
|
141
|
-
var import_react2 = require("react");
|
|
142
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
143
|
-
var BreadCrumbContext = (0, import_react2.createContext)({});
|
|
144
|
-
var BreadCrumbContextProvider = ({ children }) => {
|
|
145
|
-
const [active, setActive] = (0, import_react_ui.useLocalStorage)("@active", "");
|
|
146
|
-
const [path, setPath] = (0, import_react_ui.useLocalStorage)("@path", "/");
|
|
147
|
-
const [goBack, setGoBack] = (0, import_react_ui.useLocalStorage)("@goBack", false);
|
|
148
|
-
const [pathChild, setPathChild] = (0, import_react_ui.useLocalStorage)("@pathChild", "");
|
|
149
|
-
const [routes, setRoutes] = (0, import_react2.useState)([]);
|
|
150
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
151
|
-
BreadCrumbContext.Provider,
|
|
152
|
-
{
|
|
153
|
-
value: {
|
|
154
|
-
active,
|
|
155
|
-
setActive,
|
|
156
|
-
path,
|
|
157
|
-
setPath,
|
|
158
|
-
goBack,
|
|
159
|
-
setGoBack,
|
|
160
|
-
pathChild,
|
|
161
|
-
setPathChild,
|
|
162
|
-
routes,
|
|
163
|
-
setRoutes
|
|
164
|
-
},
|
|
165
|
-
children
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
// src/contexts/DrawerContext.tsx
|
|
171
|
-
var import_react3 = require("react");
|
|
172
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
173
|
-
var DrawerContext = (0, import_react3.createContext)({});
|
|
174
|
-
var DrawerContextProvider = ({ children }) => {
|
|
175
|
-
const [active, setActive] = (0, import_react3.useState)(false);
|
|
176
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DrawerContext.Provider, { value: { active, setActive }, children });
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// src/contexts/HistoryContext.tsx
|
|
180
|
-
var import_react_ui2 = require("@unifiedsoftware/react-ui");
|
|
181
|
-
var import_react4 = require("react");
|
|
182
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
183
|
-
var HistoryContext = (0, import_react4.createContext)({});
|
|
184
|
-
var HistoryContextProvider = ({ children }) => {
|
|
185
|
-
const [list, setList] = (0, import_react_ui2.useLocalStorage)("@list_paths", []);
|
|
186
|
-
const updateList = (value) => {
|
|
187
|
-
setList(
|
|
188
|
-
(prev) => prev.concat({
|
|
189
|
-
path: value.path,
|
|
190
|
-
name: value.name,
|
|
191
|
-
date: /* @__PURE__ */ new Date()
|
|
192
|
-
})
|
|
193
|
-
);
|
|
194
|
-
};
|
|
195
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HistoryContext.Provider, { value: { list, updateList }, children });
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// src/contexts/SidebarMainContext.tsx
|
|
199
|
-
var import_react5 = require("react");
|
|
200
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
201
|
-
var SidebarMainContext = (0, import_react5.createContext)({});
|
|
202
|
-
var SidebarMainContextProvider = ({ children }) => {
|
|
203
|
-
const [open, setOpen] = (0, import_react5.useState)(true);
|
|
204
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SidebarMainContext.Provider, { value: { open, setOpen }, children });
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
// src/contexts/GlobalProvider.tsx
|
|
208
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
209
|
-
function GlobalProvider({ children }) {
|
|
210
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HistoryContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BreadCrumbContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SidebarMainContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerContextProvider, { children }) }) }) });
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// src/layout/AppBreadcrumb.tsx
|
|
214
|
-
var import_react_router3 = require("@unifiedsoftware/react-router");
|
|
215
|
-
var import_react6 = require("react");
|
|
216
|
-
var import_md = require("react-icons/md");
|
|
217
|
-
var import_vsc = require("react-icons/vsc");
|
|
218
|
-
|
|
219
|
-
// src/styled-components/breadcrumb.ts
|
|
220
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
221
|
-
var Breadcrumb = import_styled_components.default.div`
|
|
1
|
+
"use strict";var fe=Object.create;var P=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var ye=(e,t)=>{for(var n in t)P(e,n,{get:t[n],enumerable:!0})},V=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ve(t))!ke.call(e,o)&&o!==n&&P(e,o,{get:()=>t[o],enumerable:!(a=he(t,o))||a.enumerable});return e};var x=(e,t,n)=>(n=e!=null?fe(Ce(e)):{},V(t||!e||!e.__esModule?P(n,"default",{value:e,enumerable:!0}):n,e)),we=e=>V(P({},"__esModule",{value:!0}),e);var Re={};ye(Re,{AppBreadCrumb:()=>Le,AppBreadCrumbNav:()=>Me,AppLoader:()=>Be,BreadCrumbContext:()=>C,BreadCrumbContextProvider:()=>T,BreadCrumbTitle:()=>D,Breadcrumb:()=>B,CloseIcon:()=>R,DrawerContext:()=>U,DrawerContextProvider:()=>E,DropEnumList:()=>J,GlobalProvider:()=>$e,HistoryContext:()=>L,HistoryContextProvider:()=>A,ItemLinkSidebar:()=>pe,ItemSidebar:()=>le,LoaderGrid:()=>Se,Main:()=>ce,MenuItems:()=>oe,MenuOptions:()=>z,MenuTitle:()=>ne,NavOptions:()=>De,Navbar:()=>ie,SidebarMainContext:()=>Z,SidebarMainContextProvider:()=>O,SidebarNavigation:()=>de,Title:()=>ze});module.exports=we(Re);var _=require("@progress/kendo-react-dropdowns"),f=require("react"),h=require("react/jsx-runtime");function Ne(e,t,n,a=!1){let o=[];return a&&o.push({key:"",text:"ALL"}),e!==void 0&&e.map(s=>{o.push({key:s[t],text:s[n]})}),o}function Pe(e,t,n){let a=n.get(t),o;return a!=null&&(o=a.get(parseInt(e))),o??(o=t[e],o.split("_").map(s=>s.charAt(0).toUpperCase()+s.slice(1).toLowerCase()).join(" "))}function Ie(e,t=!0,n){let a=[];for(let o in e)typeof e[o]=="string"&&a.push({value:Number(o),label:t?Pe(o,e,n):e[o]});return a}var J=({dataEnum:e,description:t,onChange:n,width:a,defaultValue:o})=>{let[s,l]=(0,f.useState)(""),[r,p]=(0,f.useState)([]);(0,f.useEffect)(()=>{p(Ne(Ie(e,!0,t),"value","label",!1).sort((c,ge)=>Number(c.key)-Number(ge.key)))},[]),(0,f.useEffect)(()=>{r.length>0&&l(r.filter(c=>c.key==o)[0])},[r]);let g=c=>{n(c),l(c)};return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(_.DropDownList,{className:"d-inline-block align-middle mr-2",data:r,dataItemKey:"key",id:"cmbDisplay",name:"cmbDisplay",onChange:c=>{g(c.value)},textField:"text",style:{width:`${a}px`},defaultValue:s})})};var v=require("@unifiedsoftware/react-ui"),I=require("react"),K=require("react/jsx-runtime"),C=(0,I.createContext)({}),T=({children:e})=>{let[t,n]=(0,v.useLocalStorage)("@active",""),[a,o]=(0,v.useLocalStorage)("@path","/"),[s,l]=(0,v.useLocalStorage)("@goBack",!1),[r,p]=(0,v.useLocalStorage)("@pathChild",""),[g,c]=(0,I.useState)([]);return(0,K.jsx)(C.Provider,{value:{active:t,setActive:n,path:a,setPath:o,goBack:s,setGoBack:l,pathChild:r,setPathChild:p,routes:g,setRoutes:c},children:e})};var $=require("react"),X=require("react/jsx-runtime"),U=(0,$.createContext)({}),E=({children:e})=>{let[t,n]=(0,$.useState)(!1);return(0,X.jsx)(U.Provider,{value:{active:t,setActive:n},children:e})};var Q=require("@unifiedsoftware/react-ui"),W=require("react"),Y=require("react/jsx-runtime"),L=(0,W.createContext)({}),A=({children:e})=>{let[t,n]=(0,Q.useLocalStorage)("@list_paths",[]),a=o=>{n(s=>s.concat({path:o.path,name:o.name,date:new Date}))};return(0,Y.jsx)(L.Provider,{value:{list:t,updateList:a},children:e})};var M=require("react"),j=require("react/jsx-runtime"),Z=(0,M.createContext)({}),O=({children:e})=>{let[t,n]=(0,M.useState)(!0);return(0,j.jsx)(Z.Provider,{value:{open:t,setOpen:n},children:e})};var k=require("react/jsx-runtime");function $e({children:e}){return(0,k.jsx)(A,{children:(0,k.jsx)(T,{children:(0,k.jsx)(O,{children:(0,k.jsx)(E,{children:e})})})})}var w=require("@unifiedsoftware/react-router"),b=require("react"),me=require("react-icons/md"),F=require("react-icons/vsc");var S=x(require("styled-components")),B=S.default.div`
|
|
222
2
|
font-family: 'Inter', sans-serif;
|
|
223
3
|
padding: 10px 0px;
|
|
224
4
|
text-transform: uppercase;
|
|
@@ -238,34 +18,27 @@ var Breadcrumb = import_styled_components.default.div`
|
|
|
238
18
|
cursor: pointer;
|
|
239
19
|
}
|
|
240
20
|
}
|
|
241
|
-
|
|
242
|
-
var BreadCrumbTitle = import_styled_components.default.div`
|
|
21
|
+
`,D=S.default.div`
|
|
243
22
|
font-family: 'Inter', sans-serif;
|
|
244
23
|
font-weight: bold;
|
|
245
24
|
font-size: 1.2rem !important;
|
|
246
25
|
color: #92190e;
|
|
247
26
|
margin-top: 15px;
|
|
248
|
-
|
|
249
|
-
var TitlePage = import_styled_components.default.div`
|
|
27
|
+
`,ee=S.default.div`
|
|
250
28
|
font-family: 'Inter', sans-serif;
|
|
251
29
|
font-weight: bold;
|
|
252
30
|
font-size: 1.2rem !important;
|
|
253
31
|
color: #92190e;
|
|
254
32
|
margin-top: 15px;
|
|
255
|
-
`;
|
|
256
|
-
|
|
257
|
-
// src/styled-components/menu.ts
|
|
258
|
-
var import_react_router = require("@unifiedsoftware/react-router");
|
|
259
|
-
var import_styled_components2 = __toESM(require("styled-components"));
|
|
260
|
-
var MenuItem = (0, import_styled_components2.default)(import_react_router.Link)`
|
|
33
|
+
`;var te=require("@unifiedsoftware/react-router"),G=x(require("styled-components")),oe=(0,G.default)(te.Link)`
|
|
261
34
|
text-decoration: none;
|
|
262
35
|
color: black;
|
|
263
36
|
display: flex;
|
|
264
|
-
justify-content: ${
|
|
37
|
+
justify-content: ${e=>e.type==="col"?"center":"flex-start"};
|
|
265
38
|
align-items: center;
|
|
266
|
-
flex-direction: ${
|
|
39
|
+
flex-direction: ${e=>e.type==="col"?"column":"row"};
|
|
267
40
|
border: 1px solid transparent;
|
|
268
|
-
width: ${
|
|
41
|
+
width: ${e=>e.width?e.width:"100px"};
|
|
269
42
|
padding: 10px;
|
|
270
43
|
text-decoration: none !important;
|
|
271
44
|
&:hover {
|
|
@@ -281,27 +54,20 @@ var MenuItem = (0, import_styled_components2.default)(import_react_router.Link)`
|
|
|
281
54
|
font-size: 12px;
|
|
282
55
|
text-decoration: none !important;
|
|
283
56
|
color: black;
|
|
284
|
-
margin-top: ${
|
|
57
|
+
margin-top: ${e=>e.type==="col"?"0px":"15px"};
|
|
285
58
|
&:hover {
|
|
286
59
|
text-decoration: none !important;
|
|
287
60
|
}
|
|
288
61
|
}
|
|
289
|
-
|
|
290
|
-
var MenuTitle = import_styled_components2.default.p`
|
|
62
|
+
`,ne=G.default.p`
|
|
291
63
|
font-size: 16px;
|
|
292
64
|
font-weight: bold !important;
|
|
293
|
-
`;
|
|
294
|
-
|
|
295
|
-
// src/styled-components/navbar.ts
|
|
296
|
-
var import_styled_components3 = __toESM(require("styled-components"));
|
|
297
|
-
var Navbar = import_styled_components3.default.nav`
|
|
298
|
-
background: ${(props) => {
|
|
299
|
-
return !props.$gradient ? ` linear-gradient(
|
|
65
|
+
`;var re=x(require("styled-components")),ie=re.default.nav`
|
|
66
|
+
background: ${e=>e.$gradient?"#92190e":` linear-gradient(
|
|
300
67
|
90.03deg,
|
|
301
68
|
#92190e 80.71%,
|
|
302
69
|
#f0b92c 107.21%
|
|
303
|
-
) !important`
|
|
304
|
-
}};
|
|
70
|
+
) !important`};
|
|
305
71
|
z-index: 10;
|
|
306
72
|
width: 100%;
|
|
307
73
|
max-width: 100vw;
|
|
@@ -344,11 +110,7 @@ var Navbar = import_styled_components3.default.nav`
|
|
|
344
110
|
left: 50%;
|
|
345
111
|
transform: translate(-50%, -50%);
|
|
346
112
|
}
|
|
347
|
-
`;
|
|
348
|
-
|
|
349
|
-
// src/styled-components/options.ts
|
|
350
|
-
var import_styled_components4 = __toESM(require("styled-components"));
|
|
351
|
-
var MenuOptions = import_styled_components4.default.div`
|
|
113
|
+
`;var ae=x(require("styled-components")),z=ae.default.div`
|
|
352
114
|
font-size: bold;
|
|
353
115
|
display: flex;
|
|
354
116
|
width: 100%;
|
|
@@ -376,12 +138,7 @@ var MenuOptions = import_styled_components4.default.div`
|
|
|
376
138
|
}
|
|
377
139
|
}
|
|
378
140
|
}
|
|
379
|
-
`;
|
|
380
|
-
|
|
381
|
-
// src/styled-components/sidebar.ts
|
|
382
|
-
var import_react_router2 = require("@unifiedsoftware/react-router");
|
|
383
|
-
var import_styled_components5 = __toESM(require("styled-components"));
|
|
384
|
-
var ItemSidebar = import_styled_components5.default.div`
|
|
141
|
+
`;var se=require("@unifiedsoftware/react-router"),y=x(require("styled-components")),le=y.default.div`
|
|
385
142
|
padding: 10px 25px;
|
|
386
143
|
display: flex;
|
|
387
144
|
align-items: center;
|
|
@@ -403,9 +160,8 @@ var ItemSidebar = import_styled_components5.default.div`
|
|
|
403
160
|
color: white !important;
|
|
404
161
|
}
|
|
405
162
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
position: ${({ $fixed = true }) => $fixed ? "fixed" : "static"};
|
|
163
|
+
`,de=y.default.nav`
|
|
164
|
+
position: ${({$fixed:e=!0})=>e?"fixed":"static"};
|
|
409
165
|
top: 0;
|
|
410
166
|
left: 0;
|
|
411
167
|
min-height: 100vh;
|
|
@@ -415,13 +171,13 @@ var SidebarNavigation = import_styled_components5.default.nav`
|
|
|
415
171
|
background: white;
|
|
416
172
|
font-family: 'Inter', sans-serif;
|
|
417
173
|
padding: 0;
|
|
418
|
-
width: ${({
|
|
174
|
+
width: ${({$fixed:e=!0,$active:t=!0})=>e?t?"270px":"0px":"auto"};
|
|
419
175
|
z-index: 11;
|
|
420
176
|
transition: width 0.2s ease-in-out;
|
|
421
177
|
overflow: hidden;
|
|
422
178
|
height: 100vh;
|
|
423
179
|
overflow-y: auto;
|
|
424
|
-
box-shadow: ${({
|
|
180
|
+
box-shadow: ${({$shadow:e=!0})=>e?"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px":"none"};
|
|
425
181
|
|
|
426
182
|
&::-webkit-scrollbar {
|
|
427
183
|
display: none !important;
|
|
@@ -563,8 +319,7 @@ var SidebarNavigation = import_styled_components5.default.nav`
|
|
|
563
319
|
}
|
|
564
320
|
}
|
|
565
321
|
}
|
|
566
|
-
|
|
567
|
-
var ConfigurationOption = import_styled_components5.default.nav`
|
|
322
|
+
`,ot=y.default.nav`
|
|
568
323
|
position: fixed;
|
|
569
324
|
top: 50px;
|
|
570
325
|
right: 0;
|
|
@@ -576,12 +331,11 @@ var ConfigurationOption = import_styled_components5.default.nav`
|
|
|
576
331
|
|
|
577
332
|
font-family: 'Inter', sans-serif;
|
|
578
333
|
padding: 0;
|
|
579
|
-
width: ${
|
|
334
|
+
width: ${e=>e.$active?"300px":"0px"};
|
|
580
335
|
z-index: 11;
|
|
581
336
|
transition: width 0.2s ease-in-out;
|
|
582
337
|
overflow: hidden !important;
|
|
583
|
-
|
|
584
|
-
var ItemLinkSidebar = (0, import_styled_components5.default)(import_react_router2.Link)`
|
|
338
|
+
`,pe=(0,y.default)(se.Link)`
|
|
585
339
|
padding: 10px 25px;
|
|
586
340
|
display: flex;
|
|
587
341
|
align-items: center;
|
|
@@ -597,11 +351,7 @@ var ItemLinkSidebar = (0, import_styled_components5.default)(import_react_router
|
|
|
597
351
|
color: white !important;
|
|
598
352
|
}
|
|
599
353
|
}
|
|
600
|
-
`;
|
|
601
|
-
|
|
602
|
-
// src/styled-components/template.ts
|
|
603
|
-
var import_styled_components6 = __toESM(require("styled-components"));
|
|
604
|
-
var Main = import_styled_components6.default.main`
|
|
354
|
+
`;var q=x(require("styled-components")),ce=q.default.main`
|
|
605
355
|
width: 100%;
|
|
606
356
|
min-height: 90vh;
|
|
607
357
|
display: flex;
|
|
@@ -610,14 +360,11 @@ var Main = import_styled_components6.default.main`
|
|
|
610
360
|
background-color: white;
|
|
611
361
|
padding: 10px 60px;
|
|
612
362
|
position: relative;
|
|
613
|
-
padding-left: ${
|
|
614
|
-
return props.$activeDrawer ? `300px` : `30px`;
|
|
615
|
-
}};
|
|
363
|
+
padding-left: ${e=>e.$activeDrawer?"300px":"30px"};
|
|
616
364
|
@media (max-width: 470px) {
|
|
617
365
|
padding: 10px 10px;
|
|
618
366
|
}
|
|
619
|
-
|
|
620
|
-
var CloseIcon = import_styled_components6.default.button`
|
|
367
|
+
`,R=q.default.button`
|
|
621
368
|
color: black;
|
|
622
369
|
text-decoration: none;
|
|
623
370
|
border: none;
|
|
@@ -636,237 +383,6 @@ var CloseIcon = import_styled_components6.default.button`
|
|
|
636
383
|
text-decoration: none;
|
|
637
384
|
background-color: #e8e8e8;
|
|
638
385
|
}
|
|
639
|
-
`;
|
|
640
|
-
|
|
641
|
-
// src/layout/AppBreadcrumb.tsx
|
|
642
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
643
|
-
var AppBreadCrumb = ({ title, paths }) => {
|
|
644
|
-
const { setRoutes } = (0, import_react6.useContext)(BreadCrumbContext);
|
|
645
|
-
(0, import_react6.useEffect)(() => {
|
|
646
|
-
if (!(paths == null ? void 0 : paths.length))
|
|
647
|
-
return;
|
|
648
|
-
setRoutes(paths != null ? paths : []);
|
|
649
|
-
}, []);
|
|
650
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BreadCrumbTitle, { children: title != null ? title : "Home" });
|
|
651
|
-
};
|
|
652
|
-
var AppBreadCrumbNav = ({ paths }) => {
|
|
653
|
-
const router = (0, import_react_router3.useRouter)();
|
|
654
|
-
const { active, path, routes, setRoutes } = (0, import_react6.useContext)(BreadCrumbContext);
|
|
655
|
-
const { updateList } = (0, import_react6.useContext)(HistoryContext);
|
|
656
|
-
(0, import_react6.useEffect)(() => {
|
|
657
|
-
updateList({ name: active, path });
|
|
658
|
-
}, [path, active]);
|
|
659
|
-
(0, import_react6.useEffect)(() => {
|
|
660
|
-
setRoutes(paths != null ? paths : []);
|
|
661
|
-
}, [paths]);
|
|
662
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Breadcrumb, { children: [
|
|
663
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "d-flex align-items-center", children: [
|
|
664
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_router3.Link, { href: "/", className: "link", children: "HOME" }),
|
|
665
|
-
routes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vsc.VscChevronRight, { color: "black" }),
|
|
666
|
-
routes.length > 0 ? routes.map((i, idx, arr) => {
|
|
667
|
-
if (i.route === -1) {
|
|
668
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "link", onClick: () => router.back(), children: [
|
|
669
|
-
i.title,
|
|
670
|
-
" ",
|
|
671
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vsc.VscChevronRight, { color: "black" })
|
|
672
|
-
] }, idx);
|
|
673
|
-
}
|
|
674
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_router3.Link, { href: i.route, className: "link", children: [
|
|
675
|
-
i.title,
|
|
676
|
-
" ",
|
|
677
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vsc.VscChevronRight, { color: "black" })
|
|
678
|
-
] }, idx);
|
|
679
|
-
}) : ""
|
|
680
|
-
] }),
|
|
681
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
682
|
-
CloseIcon,
|
|
683
|
-
{
|
|
684
|
-
onClick: () => {
|
|
685
|
-
if ((routes == null ? void 0 : routes.length) === 1) {
|
|
686
|
-
router.push("/");
|
|
687
|
-
setRoutes([]);
|
|
688
|
-
return;
|
|
689
|
-
}
|
|
690
|
-
router.push(`${routes && routes[(routes == null ? void 0 : routes.length) - 2].route}`);
|
|
691
|
-
},
|
|
692
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_md.MdClose, { fontSize: 20 })
|
|
693
|
-
}
|
|
694
|
-
)
|
|
695
|
-
] });
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
// src/layout/AppLoader.tsx
|
|
699
|
-
var import_react7 = require("react");
|
|
700
|
-
var import_react_dom = __toESM(require("react-dom"));
|
|
701
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
702
|
-
var LoaderGrid = () => {
|
|
703
|
-
const Loader = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "k-loading-mask", children: [
|
|
704
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "k-loading-text", children: "Loading" }),
|
|
705
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-image" }),
|
|
706
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-color" })
|
|
707
|
-
] });
|
|
708
|
-
const gridContent = document && document.querySelector(".k-grid-content");
|
|
709
|
-
const reportContent = document && document.querySelector(".loading-report");
|
|
710
|
-
return gridContent ? import_react_dom.default.createPortal(Loader, gridContent) : reportContent ? import_react_dom.default.createPortal(Loader, reportContent) : Loader;
|
|
711
|
-
};
|
|
712
|
-
var AppLoader = (props) => {
|
|
713
|
-
const { type = "grid", parent, minDuration } = props;
|
|
714
|
-
const parentEl = type === "grid" ? document.querySelector(parent != null ? parent : ".k-grid-container") : parent ? document.querySelector(parent) : null;
|
|
715
|
-
const Loading = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `${type}-loading k-loading-mask`, children: [
|
|
716
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "k-loading-text", children: "Loading" }),
|
|
717
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-image" }),
|
|
718
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-color" })
|
|
719
|
-
] });
|
|
720
|
-
(0, import_react7.useEffect)(() => {
|
|
721
|
-
if (type === "button") {
|
|
722
|
-
const loadingEl = document.createElement("div");
|
|
723
|
-
loadingEl.className = "icon button-loading k-loading-mask";
|
|
724
|
-
loadingEl.innerHTML = `
|
|
386
|
+
`;var d=require("react/jsx-runtime"),Le=({title:e,paths:t})=>{let{setRoutes:n}=(0,b.useContext)(C);return(0,b.useEffect)(()=>{t?.length&&n(t??[])},[]),(0,d.jsx)(D,{children:e??"Home"})},Me=({paths:e})=>{let t=(0,w.useRouter)(),{active:n,path:a,routes:o,setRoutes:s}=(0,b.useContext)(C),{updateList:l}=(0,b.useContext)(L);return(0,b.useEffect)(()=>{l({name:n,path:a})},[a,n]),(0,b.useEffect)(()=>{s(e??[])},[e]),(0,d.jsxs)(B,{children:[(0,d.jsxs)("div",{className:"d-flex align-items-center",children:[(0,d.jsx)(w.Link,{href:"/",className:"link",children:"HOME"}),o.length>0&&(0,d.jsx)(F.VscChevronRight,{color:"black"}),o.length>0?o.map((r,p,g)=>r.route===-1?(0,d.jsxs)("span",{className:"link",onClick:()=>t.back(),children:[r.title," ",p+1===g.length?"":(0,d.jsx)(F.VscChevronRight,{color:"black"})]},p):(0,d.jsxs)(w.Link,{href:r.route,className:"link",children:[r.title," ",p+1===g.length?"":(0,d.jsx)(F.VscChevronRight,{color:"black"})]},p)):""]}),(0,d.jsx)(R,{onClick:()=>{if(o?.length===1){t.push("/"),s([]);return}t.push(`${o&&o[o?.length-2].route}`)},children:(0,d.jsx)(me.MdClose,{fontSize:20})})]})};var ue=require("react"),H=x(require("react-dom")),m=require("react/jsx-runtime"),Se=()=>{let e=(0,m.jsxs)("div",{className:"k-loading-mask",children:[(0,m.jsx)("span",{className:"k-loading-text",children:"Loading"}),(0,m.jsx)("div",{className:"k-loading-image"}),(0,m.jsx)("div",{className:"k-loading-color"})]}),t=document&&document.querySelector(".k-grid-content"),n=document&&document.querySelector(".loading-report");return t?H.default.createPortal(e,t):n?H.default.createPortal(e,n):e},Be=e=>{let{type:t="grid",parent:n,minDuration:a}=e,o=t==="grid"?document.querySelector(n??".k-grid-container"):n?document.querySelector(n):null,s=(0,m.jsxs)("div",{className:`${t}-loading k-loading-mask`,children:[(0,m.jsx)("span",{className:"k-loading-text",children:"Loading"}),(0,m.jsx)("div",{className:"k-loading-image"}),(0,m.jsx)("div",{className:"k-loading-color"})]});return(0,ue.useEffect)(()=>{if(t==="button"){let l=document.createElement("div");if(l.className="icon button-loading k-loading-mask",l.innerHTML=`
|
|
725
387
|
<div class="k-loading-image"></div>
|
|
726
|
-
|
|
727
|
-
if (parentEl) {
|
|
728
|
-
const button = parentEl;
|
|
729
|
-
button.classList.add("btn-loading");
|
|
730
|
-
button.disabled = true;
|
|
731
|
-
button.insertBefore(loadingEl, button.firstChild);
|
|
732
|
-
}
|
|
733
|
-
return () => {
|
|
734
|
-
if (parentEl) {
|
|
735
|
-
if (minDuration) {
|
|
736
|
-
setTimeout(() => {
|
|
737
|
-
const button = parentEl;
|
|
738
|
-
button.classList.remove("btn-loading");
|
|
739
|
-
button.removeChild(loadingEl);
|
|
740
|
-
button.disabled = false;
|
|
741
|
-
}, minDuration);
|
|
742
|
-
} else {
|
|
743
|
-
const button = parentEl;
|
|
744
|
-
button.classList.remove("btn-loading");
|
|
745
|
-
button.removeChild(loadingEl);
|
|
746
|
-
button.disabled = false;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
};
|
|
750
|
-
}
|
|
751
|
-
}, []);
|
|
752
|
-
return type === "button" ? null : parentEl ? import_react_dom.default.createPortal(Loading, parentEl) : Loading;
|
|
753
|
-
};
|
|
754
|
-
|
|
755
|
-
// src/layout/NavOptions.tsx
|
|
756
|
-
var import_react_bootstrap = require("react-bootstrap");
|
|
757
|
-
var import_bs = require("react-icons/bs");
|
|
758
|
-
var import_fi = require("react-icons/fi");
|
|
759
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
760
|
-
var NavOptions = ({
|
|
761
|
-
exportExcel,
|
|
762
|
-
customButtons,
|
|
763
|
-
onCreate,
|
|
764
|
-
onRefresh,
|
|
765
|
-
onSelect,
|
|
766
|
-
onClear,
|
|
767
|
-
onExpandScreen
|
|
768
|
-
}) => {
|
|
769
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(MenuOptions, { children: [
|
|
770
|
-
onCreate && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onCreate, children: [
|
|
771
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiPlusSquare, { className: "icon" }),
|
|
772
|
-
" ",
|
|
773
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "New" })
|
|
774
|
-
] }),
|
|
775
|
-
onRefresh && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onRefresh, children: [
|
|
776
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiRefreshCcw, { className: "icon" }),
|
|
777
|
-
" ",
|
|
778
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Refresh" })
|
|
779
|
-
] }),
|
|
780
|
-
exportExcel && exportExcel.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_bootstrap.Dropdown, { className: "button-option", children: [
|
|
781
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
782
|
-
import_react_bootstrap.Dropdown.Toggle,
|
|
783
|
-
{
|
|
784
|
-
id: "btnExport",
|
|
785
|
-
className: "p-2 bg-light text-dark border-0 font-weight-bold",
|
|
786
|
-
title: "Export to Excel",
|
|
787
|
-
children: [
|
|
788
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiSave, { className: "icon" }),
|
|
789
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
790
|
-
"span",
|
|
791
|
-
{
|
|
792
|
-
style: {
|
|
793
|
-
fontSize: "13px",
|
|
794
|
-
fontFamily: '"Inter", sans-serif'
|
|
795
|
-
},
|
|
796
|
-
className: "text",
|
|
797
|
-
children: "Export"
|
|
798
|
-
}
|
|
799
|
-
)
|
|
800
|
-
]
|
|
801
|
-
}
|
|
802
|
-
),
|
|
803
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Dropdown.Menu, { children: exportExcel.map((item, index) => {
|
|
804
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_bootstrap.Dropdown.Item, { onClick: item.onAction, children: [
|
|
805
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: `${item.classNameIcon} mr-2` }),
|
|
806
|
-
" ",
|
|
807
|
-
item.title
|
|
808
|
-
] }, index);
|
|
809
|
-
}) })
|
|
810
|
-
] }),
|
|
811
|
-
onSelect && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onSelect, children: [
|
|
812
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiCheckCircle, { className: "icon" }),
|
|
813
|
-
" ",
|
|
814
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Select All" })
|
|
815
|
-
] }),
|
|
816
|
-
onClear && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onClear, children: [
|
|
817
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiFilter, { className: "icon" }),
|
|
818
|
-
" ",
|
|
819
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Clear Filters" })
|
|
820
|
-
] }),
|
|
821
|
-
onExpandScreen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onExpandScreen, children: [
|
|
822
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_bs.BsArrowsFullscreen, { className: "icon" }),
|
|
823
|
-
" ",
|
|
824
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Full Page" })
|
|
825
|
-
] }),
|
|
826
|
-
customButtons == null ? void 0 : customButtons.map((custom, index) => {
|
|
827
|
-
if (custom.render) {
|
|
828
|
-
return custom.render;
|
|
829
|
-
}
|
|
830
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: custom.onAction, children: [
|
|
831
|
-
custom.Icon !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(custom.Icon, { className: "icon" }),
|
|
832
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: custom.title })
|
|
833
|
-
] }, index);
|
|
834
|
-
})
|
|
835
|
-
] });
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
// src/layout/title.tsx
|
|
839
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
840
|
-
var Title = ({ title }) => {
|
|
841
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TitlePage, { children: title != null ? title : "Home" });
|
|
842
|
-
};
|
|
843
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
844
|
-
0 && (module.exports = {
|
|
845
|
-
AppBreadCrumb,
|
|
846
|
-
AppBreadCrumbNav,
|
|
847
|
-
AppLoader,
|
|
848
|
-
BreadCrumbContext,
|
|
849
|
-
BreadCrumbContextProvider,
|
|
850
|
-
BreadCrumbTitle,
|
|
851
|
-
Breadcrumb,
|
|
852
|
-
CloseIcon,
|
|
853
|
-
DrawerContext,
|
|
854
|
-
DrawerContextProvider,
|
|
855
|
-
DropEnumList,
|
|
856
|
-
GlobalProvider,
|
|
857
|
-
HistoryContext,
|
|
858
|
-
HistoryContextProvider,
|
|
859
|
-
ItemLinkSidebar,
|
|
860
|
-
ItemSidebar,
|
|
861
|
-
LoaderGrid,
|
|
862
|
-
Main,
|
|
863
|
-
MenuItems,
|
|
864
|
-
MenuOptions,
|
|
865
|
-
MenuTitle,
|
|
866
|
-
NavOptions,
|
|
867
|
-
Navbar,
|
|
868
|
-
SidebarMainContext,
|
|
869
|
-
SidebarMainContextProvider,
|
|
870
|
-
SidebarNavigation,
|
|
871
|
-
Title
|
|
872
|
-
});
|
|
388
|
+
`,o){let r=o;r.classList.add("btn-loading"),r.disabled=!0,r.insertBefore(l,r.firstChild)}return()=>{if(o)if(a)setTimeout(()=>{let r=o;r.classList.remove("btn-loading"),r.removeChild(l),r.disabled=!1},a);else{let r=o;r.classList.remove("btn-loading"),r.removeChild(l),r.disabled=!1}}}},[]),t==="button"?null:o?H.default.createPortal(s,o):s};var N=require("react-bootstrap"),be=require("react-icons/bs"),u=require("react-icons/fi");var i=require("react/jsx-runtime"),De=({exportExcel:e,customButtons:t,onCreate:n,onRefresh:a,onSelect:o,onClear:s,onExpandScreen:l})=>(0,i.jsxs)(z,{children:[n&&(0,i.jsxs)("button",{className:"button-option",onClick:n,children:[(0,i.jsx)(u.FiPlusSquare,{className:"icon"})," ",(0,i.jsx)("span",{className:"text",children:"New"})]}),a&&(0,i.jsxs)("button",{className:"button-option",onClick:a,children:[(0,i.jsx)(u.FiRefreshCcw,{className:"icon"})," ",(0,i.jsx)("span",{className:"text",children:"Refresh"})]}),e&&e.length>0&&(0,i.jsxs)(N.Dropdown,{className:"button-option",children:[(0,i.jsxs)(N.Dropdown.Toggle,{id:"btnExport",className:"p-2 bg-light text-dark border-0 font-weight-bold",title:"Export to Excel",children:[(0,i.jsx)(u.FiSave,{className:"icon"}),(0,i.jsx)("span",{style:{fontSize:"13px",fontFamily:'"Inter", sans-serif'},className:"text",children:"Export"})]}),(0,i.jsx)(N.Dropdown.Menu,{children:e.map((r,p)=>(0,i.jsxs)(N.Dropdown.Item,{onClick:r.onAction,children:[(0,i.jsx)("i",{className:`${r.classNameIcon} mr-2`})," ",r.title]},p))})]}),o&&(0,i.jsxs)("button",{className:"button-option",onClick:o,children:[(0,i.jsx)(u.FiCheckCircle,{className:"icon"})," ",(0,i.jsx)("span",{className:"text",children:"Select All"})]}),s&&(0,i.jsxs)("button",{className:"button-option",onClick:s,children:[(0,i.jsx)(u.FiFilter,{className:"icon"})," ",(0,i.jsx)("span",{className:"text",children:"Clear Filters"})]}),l&&(0,i.jsxs)("button",{className:"button-option",onClick:l,children:[(0,i.jsx)(be.BsArrowsFullscreen,{className:"icon"})," ",(0,i.jsx)("span",{className:"text",children:"Full Page"})]}),t?.map((r,p)=>r.render?r.render:(0,i.jsxs)("button",{className:"button-option",onClick:r.onAction,children:[r.Icon!==void 0&&(0,i.jsx)(r.Icon,{className:"icon"}),(0,i.jsx)("span",{className:"text",children:r.title})]},p))]});var xe=require("react/jsx-runtime"),ze=({title:e})=>(0,xe.jsx)(ee,{children:e??"Home"});0&&(module.exports={AppBreadCrumb,AppBreadCrumbNav,AppLoader,BreadCrumbContext,BreadCrumbContextProvider,BreadCrumbTitle,Breadcrumb,CloseIcon,DrawerContext,DrawerContextProvider,DropEnumList,GlobalProvider,HistoryContext,HistoryContextProvider,ItemLinkSidebar,ItemSidebar,LoaderGrid,Main,MenuItems,MenuOptions,MenuTitle,NavOptions,Navbar,SidebarMainContext,SidebarMainContextProvider,SidebarNavigation,Title});
|