@inceptionbg/main 1.0.0
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 +83 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +41 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { FC, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import { AxiosInstance } from 'axios';
|
|
5
|
+
|
|
6
|
+
interface IToken {
|
|
7
|
+
sub: string;
|
|
8
|
+
userUuid: string;
|
|
9
|
+
clientCertificate: string;
|
|
10
|
+
scope: string[];
|
|
11
|
+
iat: number;
|
|
12
|
+
exp: number;
|
|
13
|
+
iss: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ISidebarItem {
|
|
17
|
+
label: string;
|
|
18
|
+
icon?: IconDefinition;
|
|
19
|
+
to?: string;
|
|
20
|
+
content?: ISidebarSubItem[];
|
|
21
|
+
menu?: {
|
|
22
|
+
content: ISidebarSubItem[];
|
|
23
|
+
openedMenu: string;
|
|
24
|
+
setOpenedMenu: (label: string) => void;
|
|
25
|
+
};
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
badge?: number;
|
|
28
|
+
addUrl?: string;
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface ISidebarSubItem {
|
|
32
|
+
label: string;
|
|
33
|
+
to?: string;
|
|
34
|
+
content?: ISidebarItem[];
|
|
35
|
+
hidden?: boolean;
|
|
36
|
+
tooltip?: string;
|
|
37
|
+
badge?: number;
|
|
38
|
+
addUrl?: string;
|
|
39
|
+
primary?: boolean;
|
|
40
|
+
collapsed?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface Props$1 {
|
|
44
|
+
moduleName?: string;
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
declare const Header: FC<Props$1>;
|
|
48
|
+
|
|
49
|
+
interface Props {
|
|
50
|
+
items: ISidebarItem[][];
|
|
51
|
+
UserBox?: ReactElement;
|
|
52
|
+
logo?: string;
|
|
53
|
+
collapsed?: boolean;
|
|
54
|
+
setCollapsed?: (collapsed: boolean) => void;
|
|
55
|
+
}
|
|
56
|
+
declare const Sidebar: FC<Props>;
|
|
57
|
+
|
|
58
|
+
declare const axiosInstance: AxiosInstance;
|
|
59
|
+
interface IProps {
|
|
60
|
+
API_URL: string;
|
|
61
|
+
CERTIFICATE_URL: string;
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
var axiosInstance: AxiosInstance;
|
|
66
|
+
}
|
|
67
|
+
declare const AxiosTokenHandler: FC<IProps>;
|
|
68
|
+
|
|
69
|
+
declare const login: (data: FormData) => Promise<void>;
|
|
70
|
+
declare const logOut: (nextUrl?: boolean, clearData?: boolean) => void;
|
|
71
|
+
declare const loginWithCertificate: () => Promise<void>;
|
|
72
|
+
declare const getNewTokens: (refreshToken: string) => Promise<void>;
|
|
73
|
+
|
|
74
|
+
type LocalStorageItem = "activeUser" | "token" | "refreshToken" | "logInWay" | "codeVerifier" | "activeOrg";
|
|
75
|
+
declare const lsGet: (key: LocalStorageItem) => string | null;
|
|
76
|
+
declare const lsSet: (key: LocalStorageItem, value: string) => void;
|
|
77
|
+
declare const lsRemove: (key: LocalStorageItem) => void;
|
|
78
|
+
declare const getDefaultOrgUuid: () => string;
|
|
79
|
+
declare const setDefaultOrgUuid: (organizationUuid: string) => void;
|
|
80
|
+
declare const getActiveOrgUuid: () => string;
|
|
81
|
+
declare const setActiveOrgUuid: (organizationUuid: string) => void;
|
|
82
|
+
|
|
83
|
+
export { AxiosTokenHandler, Header, ISidebarItem, IToken, Sidebar, axiosInstance, getActiveOrgUuid, getDefaultOrgUuid, getNewTokens, logOut, login, loginWithCertificate, lsGet, lsRemove, lsSet, setActiveOrgUuid, setDefaultOrgUuid };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v4 as e}from"uuid";export{v4 as uuidv4}from"uuid";import{jsxs as t,jsx as r,Fragment as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as a,Fragment as c,createElement as l}from"react";import s from"clsx";import{FontAwesomeIcon as d}from"@fortawesome/react-fontawesome";import{useNavigate as m,useLocation as p,Link as h}from"react-router-dom";import{IconButton as f,ConditionalWrapper as u,Collapse as g,Tooltip as v,maxChar as b,parseUrlSearch as C,deleteProps as k,Dialog as x}from"@inceptionbg/iui";import{useTranslation as w}from"react-i18next";import N from"axios";import U from"jwt-decode";const I=({moduleName:e,children:n})=>t("div",{className:"iui-header",children:[r("div",{className:"flex gap-3 align-center",children:r("h1",{children:e})}),r("div",{className:"flex gap-2 align-center",children:n})]}),T={prefix:"fad",iconName:"circle-plus",icon:[512,512,[],"f055",["M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256C397.4 512 512 397.4 512 256S397.4 0 256 0zM352 280H280V352c0 13.2-10.8 24-23.1 24C242.8 376 232 365.2 232 352V280H160C146.8 280 136 269.2 136 256c0-13.2 10.8-24 24-24H232V160c0-13.2 10.8-24 24-24C269.2 136 280 146.8 280 160v72h72C365.2 232 376 242.8 376 256C376 269.2 365.2 280 352 280z","M352 280H280V352c0 13.2-10.8 24-23.1 24C242.8 376 232 365.2 232 352V280H160C146.8 280 136 269.2 136 256c0-13.2 10.8-24 24-24H232V160c0-13.2 10.8-24 24-24C269.2 136 280 146.8 280 160v72h72C365.2 232 376 242.8 376 256C376 269.2 365.2 280 352 280z"]]},M=({link:e})=>{const t=m();return r(f,{className:"add-button",icon:T,onClick:r=>{r.preventDefault(),t(e)}})},S={prefix:"fal",iconName:"angle-down",icon:[384,512,[],"f107","M362.7 203.9l-159.1 144c-6.125 5.469-15.31 5.469-21.44 0L21.29 203.9C14.73 197.1 14.2 187.9 20.1 181.3C26.38 174.4 36.5 174.5 42.73 180.1L192 314.5l149.3-134.4c6.594-5.877 16.69-5.361 22.62 1.188C369.8 187.9 369.3 197.1 362.7 203.9z"]},L=({label:e,icon:o,to:i,badge:a,menu:c,collapsed:l})=>{const{pathname:m}=p();return t(n,{children:[r(u,{condition:!!i,wrapper:e=>r(h,{to:i,children:e}),children:t("div",{onClick:c?()=>c.setOpenedMenu(e!==c.openedMenu?e:""):void 0,className:s("iui-sidebar-item clickable",{active:i===m||c?.content.find((e=>e.to===m))&&e!==c?.openedMenu}),children:[t("div",{className:"flex align-center",children:[r(d,{icon:o,className:"sidebar-icon"}),r("p",{className:s({"content-hidden":l}),children:e})]}),c&&t("div",{className:"flex align-center gap-1",children:[!!a&&r("div",{className:"notification-badge",children:a>99?"99+":a}),r(d,{icon:S,className:s("sidebar-expand-icon",{rotate:e===c.openedMenu})})]})]})}),c&&r(g,{className:s({"content-hidden":l}),isOpen:c.openedMenu===e,children:c.content.map((({hidden:e,label:n,to:o,primary:i,badge:a,addUrl:c,tooltip:l})=>!e&&r(u,{condition:!!o,wrapper:e=>r(h,{to:o,children:e}),children:r(v,{label:l,disabled:!l,position:"right",children:t("div",{className:s("iui-sidebar-sub-item",{clickable:!!o,active:o===m,primary:i}),children:[r("p",{children:b(n,20)}),t("div",{className:"flex align-center gap-1",children:[!!a&&r("div",{className:"notification-badge",children:a>99?"99+":a}),!!c&&r(M,{link:c})]})]})})},n)))})]})},O={prefix:"fas",iconName:"angle-left",icon:[256,512,[],"f104","M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"]},y=({items:e,UserBox:n,logo:d,collapsed:m,setCollapsed:p})=>{const[h,u]=o([]),[g,v]=o(""),b=i(null);return a((()=>{m?setTimeout((()=>{b.current?.classList.add("sidebar-hover")}),300):b.current?.classList.remove("sidebar-hover")}),[m]),a((()=>{const t=e.map((e=>e.filter((e=>!e.hidden&&(e.to||e.content?.some((e=>!e.hidden)))))));u(t)}),[e,u]),t("div",{ref:b,className:s("iui-sidebar",{collapsed:m}),children:[!!p&&r("div",{className:s("sidebar-colapse",{collapsed:m}),children:r(f,{icon:O,className:s("toggle-btn",{"fa-flip-horizontal":m}),onClick:()=>p(!m)})}),n,t("div",{className:"iui-sidebar-content",children:[r("div",{className:"iui-sidebar-items",children:h.map(((e,n)=>t(c,{children:[n>0&&!!e.length&&r("hr",{className:"mx-3"}),e.map((e=>!e.hidden&&l(L,{...e,key:e.label,menu:e.content?{content:e.content,openedMenu:g,setOpenedMenu:v}:void 0,collapsed:m})))]},n)))}),d&&r("div",{className:"flex center",children:r("img",{className:"sidebar-logo",src:d,alt:"logo"})})]})]})},E=e=>U(e),$=e=>localStorage.getItem(e),z=(e,t)=>localStorage.setItem(e,t),R=e=>localStorage.removeItem(e),j=()=>localStorage.getItem(`${$("activeUser")}-defaultOrg`),B=e=>localStorage.setItem(`${$("activeUser")}-defaultOrg`,e),D=()=>localStorage.getItem(`${$("activeUser")}-activeOrg`),H=e=>localStorage.setItem(`${$("activeUser")}-activeOrg`,e),V=e=>P.post("/auth/token",e,{headers:{"Content-Type":"application/x-www-form-urlencoded",noToast:!0,public:!0}}).then((({data:e})=>{z("token",e.token),z("refreshToken",e.refreshToken),z("activeUser",E(e.token).userUuid)})).then((()=>{const e=C(window.location.search).nextUrl;window.location.href=e||""})),A=(e,t)=>{R("token"),R("refreshToken"),t&&(R("activeUser"),localStorage.removeItem(`${$("activeUser")}-activeOrg`)),window.location.href=e?`/login?nextUrl=${window.location.pathname}`:"/login"},q=()=>P.post("/auth/certificate/token",void 0,{headers:{certificate:!0,public:!0}}).then((({data:e})=>{z("token",e.token),z("activeUser",E(e.token).userUuid)})).then((()=>{const e=C(window.location.search).nextUrl;window.location.href=e||""})),F=e=>{const t=new FormData;return t.set("refreshToken",e),P.post("/auth/token",t,{headers:{"Content-Type":"application/x-www-form-urlencoded",public:!0,noToast:!0}}).then((({data:e})=>{z("token",e.token),z("refreshToken",e.refreshToken)})).catch((()=>{}))},P=N.create(),W=({API_URL:i,CERTIFICATE_URL:l,children:s})=>{const[d,m]=o(!1),[p,h]=o(!1),[f,u]=o([]),[g,v]=o(!1),{t:b}=w();return a((()=>{const e=setInterval((()=>{!document.hidden&&(e=>{const t=$("token"),r=$("refreshToken"),n=!!t&&E(t),o=Date.now();if(n&&o<1e3*n.exp&&1e3*n.exp-o<1e3*(n.exp-n.iat)*.3)!r||n.clientCertificate&&"false"!==n.clientCertificate?e(!0):(console.log("Get new token",(new Date).toLocaleTimeString()),F(r))})(h)}),5e3);return()=>{clearInterval(e)}}),[]),a((()=>{const t=P.interceptors.request.use((t=>{if(t.baseURL=i,t.headers.public)return t.headers=k(t.headers,["public"]),t.headers.certificate&&(t.headers=k(t.headers,["certificate"]),t.baseURL=l?.replace("{random}",e())||""),t;const r=t.headers.token||$("token"),n=r&&E(r),o=new AbortController;if(t.signal=o.signal,!r||(Date.now()-1e3*n.exp)/36e5>4)o.abort(),A(!0);else if(Date.now()>1e3*n.exp)o.abort(),m(!0);else{if(t.headers.certificate){t.headers=k(t.headers,["certificate"]);const r=l?.replace("{random}",e())||"";r&&(t.baseURL=r,t.headers["x-epismonosa-user"]=n.sub)}t.headers.Authorization=`Bearer ${r}`}return t}),(e=>(console.log(1,"error: ",e),Promise.reject(e)))),r=P.interceptors.response.use(void 0,(e=>{if(e.config.signal?.aborted)console.log("Request aborted");else{const t=e.response?.data.errors,r=t?.length?t.map((e=>e.errorCode&&b(`Error${e.errorCode}`)||e.errorMessage)):[b("ErrorMessage")];u(r)}return Promise.reject(e)}));return v(!0),()=>{v(!1),P.interceptors.request.eject(t),P.interceptors.response.eject(r)}}),[]),t(n,{children:[g?s:null,r(x,{isOpen:d,onClose:()=>m(!1),cancelButton:{label:b("No")},confirmButton:{label:b("Yes"),onClick:()=>A(!0)},title:b("SessionExpired"),desc:b("SessionExpiredInfo"),type:"info"}),r(x,{isOpen:p,onClose:()=>h(!1),cancelButton:{label:b("Logout"),onClick:()=>A(!0,!0)},confirmButton:{label:b("Yes"),onClick:()=>q().catch((()=>{u([b("WrongCertificate")])}))},title:b("SessionWillExpire"),desc:b("SessionWillExpireInfo"),type:"info"}),r(x,{isOpen:!!f.length,onClose:()=>u([]),type:"error",children:r("div",{children:f.map(((e,n)=>t(c,{children:[n>0&&r("hr",{}),r("div",{className:"text-center new-line",children:e})]},e)))})})]})};export{W as AxiosTokenHandler,I as Header,y as Sidebar,P as axiosInstance,D as getActiveOrgUuid,j as getDefaultOrgUuid,F as getNewTokens,A as logOut,V as login,q as loginWithCertificate,$ as lsGet,R as lsRemove,z as lsSet,H as setActiveOrgUuid,B as setDefaultOrgUuid};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Header/Header.tsx","../src/icons/duotone/faPlusCircle.ts","../src/components/Sidebar/AddButton.tsx","../src/icons/light/faAngleDown.ts","../src/components/Sidebar/SidebarItem.tsx","../src/icons/solid/faAngleLeft.ts","../src/components/Sidebar/Sidebar.tsx","../src/auth/TokenUtils.ts","../src/utils/LocalStorageHelper.ts","../src/auth/Auth.ts","../src/auth/AxiosTokenHandler.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":["Header","moduleName","children","_jsxs","className","_jsx","faPlusCircle","icon","AddButton","link","navigate","useNavigate","IconButton","onClick","e","preventDefault","faAngleDown","SidebarItem","label","to","badge","menu","collapsed","pathname","useLocation","_Fragment","ConditionalWrapper","condition","wrapper","Link","setOpenedMenu","openedMenu","undefined","clsx","active","content","find","FontAwesomeIcon","rotate","Collapse","isOpen","map","hidden","primary","addUrl","tooltip","Tooltip","disabled","position","clickable","maxChar","faAngleLeft","prefix","iconName","Sidebar","items","UserBox","logo","setCollapsed","itemsList","setItemsList","useState","sidebarRef","useRef","useEffect","setTimeout","current","classList","add","remove","newItems","list","filter","item","some","ref","i","Fragment","length","_createElement","key","src","alt","decodeToken","token","jwtDecode","lsGet","localStorage","getItem","lsSet","value","setItem","lsRemove","removeItem","getDefaultOrgUuid","setDefaultOrgUuid","organizationUuid","getActiveOrgUuid","setActiveOrgUuid","login","data","axiosInstance","post","headers","noToast","public","then","refreshToken","userUuid","nextUrl","parseUrlSearch","window","location","search","href","logOut","clearData","loginWithCertificate","certificate","getNewTokens","formData","FormData","set","catch","axios","create","AxiosTokenHandler","API_URL","CERTIFICATE_URL","isSessionExpired","setIsSessionExpired","isCertificateSessionAlmostExpired","setIsCertificateSessionAlmostExpired","errors","setErrors","isSet","setIsSet","t","useTranslation","intervalId","setInterval","document","tokenDecoded","now","Date","exp","iat","clientCertificate","console","log","toLocaleTimeString","onRefreshToken","clearInterval","reqInterceptor","interceptors","request","use","config","baseURL","deleteProps","replace","uuidv4","controller","AbortController","signal","abort","certificateURL","sub","Authorization","error","Promise","reject","resInterceptor","response","aborted","errorMessages","errorCode","errorMessage","eject","Dialog","onClose","cancelButton","confirmButton","title","desc","type"],"mappings":"knBAOa,MAAAA,EAAoB,EAAGC,aAAYC,cAE5CC,EAAK,MAAA,CAAAC,UAAU,uBACbC,EAAK,MAAA,CAAAD,UAAU,0BAEbF,SAAAG,EAAA,KAAA,CAAAH,SAAKD,MAEPI,EAAA,MAAA,CAAKD,UAAU,0BAAyBF,SACrCA,OCHII,EAA+B,QAV7B,eACE,cAYfC,KAAM,CAXM,IACC,IAUS,GATR,OACI,CAClB,gVACA,0PCDWC,EAAuB,EAAGC,WACrC,MAAMC,EAAWC,IACjB,OACEN,EAACO,EACC,CAAAR,UAAU,aACVG,KAAMD,EACNO,QAAUC,IACRA,EAAEC,iBACFL,EAASD,EAAK,GAGlB,ECTSO,EAA8B,QAR5B,eACE,aAUfT,KAAM,CATM,IACC,IAQS,GAPR,OAEd,6OCMW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@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inceptionbg/main",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Main app wrapper for Inception ecosystem",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rollup -c"
|
|
13
|
+
},
|
|
14
|
+
"author": "Aleksandar Sadzak",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@inceptionbg/iui": "^1.0.9",
|
|
18
|
+
"uuid": "^9.0.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@rollup/plugin-commonjs": "^25.0.2",
|
|
22
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
23
|
+
"@rollup/plugin-typescript": "^11.1.2",
|
|
24
|
+
"@types/react-beautiful-dnd": "^13.1.4",
|
|
25
|
+
"@types/uuid": "^9.0.2",
|
|
26
|
+
"rollup": "^3.26.0",
|
|
27
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
28
|
+
"rollup-plugin-dts": "^5.3.0",
|
|
29
|
+
"rollup-plugin-postcss": "^4.0.2"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@types/react": "^18.2.14",
|
|
33
|
+
"@types/react-dom": "^18.2.6",
|
|
34
|
+
"@types/react-router-dom": "^5.3.3",
|
|
35
|
+
"react": "^18.2.0",
|
|
36
|
+
"react-dom": "^18.2.0",
|
|
37
|
+
"react-i18next": "^13.0.1",
|
|
38
|
+
"react-router-dom": "^6.14.1",
|
|
39
|
+
"sass": "^1.63.6"
|
|
40
|
+
}
|
|
41
|
+
}
|