@ukpc-lib/react 0.3.45 → 0.3.46
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/components/index.cjs +1 -1
- package/dist/components/index.js +3 -2
- package/package.json +1 -1
- package/web-components-bundle/global-topbar/index.cjs +1 -1
- package/web-components-bundle/global-topbar/index.js +1 -1
- package/web-components-bundle/has-permission/index.cjs +1 -1
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/{index-19ada296.js → index-0db61062.js} +674 -673
- package/web-components-bundle/{index-cc668959.cjs → index-ac079ff9.cjs} +1 -1
|
@@ -1089,7 +1089,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1089
1089
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1090
1090
|
* See the License for the specific language governing permissions and
|
|
1091
1091
|
* limitations under the License.
|
|
1092
|
-
*/function dy(e=BA()){return wI().then(t=>{if(!t)throw nn.create("unsupported-browser")},t=>{throw nn.create("indexed-db-unsupported")}),Hd(Wd(e),"messaging").getImmediate()}async function kI(e,t){return e=Wd(e),fy(e,t)}function CI(e,t){return e=Wd(e),SI(e,t)}_I();const hy=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const r=dy(Ud({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));kI(r,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async s=>{var o,c;if(s){console.log("current token for client: ",s);try{const h="/notification-management/api/v1/notifications/registrations",x=e.baseUrl+h;await se.axios.post(x,{deviceToken:s},{withCredentials:!0})}catch(h){console.log(h),se.pushError(((c=(o=h.response)==null?void 0:o.data)==null?void 0:c.errorMessage)||"Have error when get notification list")}}else console.log("No registration token available. Request permission to generate one.")}).catch(s=>{console.log("An error occurred while retrieving token. ",s)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},DI=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=r=>{console.log("Broadcast chanel message",r),r&&e(s=>({...s,unread:{...s.unread,total:s.unread.total+1}}))}},EI=e=>new Promise(t=>{const r=dy(Ud({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));CI(r,s=>{console.log("payload",s),t(s)})}),us={"subscription-diaglog":"_subscription-diaglog_1bysb_2","subscription-container":"_subscription-container_1bysb_15","subscription-title":"_subscription-title_1bysb_25","subscription-text":"_subscription-text_1bysb_34","subscription-btn__container":"_subscription-btn__container_1bysb_38","btn-success":"_btn-success_1bysb_44","btn-cancel":"_btn-cancel_1bysb_45"},TI=["granted","denied"],RI=e=>{const[t,r]=D.reactExports.useState(!1),s=()=>{Notification.requestPermission(function(c){c==="granted"&&hy(e),TI.includes(c)&&r(!0)})},o=()=>{r(!0)};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:t?"":D.jsxRuntimeExports.jsx("div",{className:us["subscription-diaglog"],children:D.jsxRuntimeExports.jsxs("div",{className:us["subscription-container"],children:[D.jsxRuntimeExports.jsx("h4",{className:us["subscription-title"],children:"Notification"}),D.jsxRuntimeExports.jsx("p",{className:us["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),D.jsxRuntimeExports.jsxs("div",{className:us["subscription-btn__container"],children:[D.jsxRuntimeExports.jsx("button",{className:us["btn-cancel"],onClick:o,children:"Not now"}),D.jsxRuntimeExports.jsx("button",{className:us["btn-success"],onClick:s,children:"Turn on"})]})]})})})},Ou={"notification-massage_container":"_notification-massage_container_ql4az_1","notification-name":"_notification-name_ql4az_18","notification-message_service":"_notification-message_service_ql4az_23","notification-message_button-close":"_notification-message_button-close_ql4az_27"},Hi=D.reactExports.createContext({}),MI=({children:e})=>{const[t,r]=D.reactExports.useState(!0),[s,o]=D.reactExports.useState({all:{rows:[],total:0},unread:{rows:[],total:0}}),c=()=>{r(!t)},h=()=>{r(!0)};return D.jsxRuntimeExports.jsx(Hi.Provider,{value:{isOpen:t,toggleOpen:c,setShowModalFalse:h,notidata:s,setNotiData:o},children:e})},AI=e=>{const[t,r]=D.reactExports.useState({actorName:"",message:"",context:""});console.log(t);const{setNotiData:s}=D.reactExports.useContext(Hi);function o(){return D.jsxRuntimeExports.jsx("div",{className:Ou["notification-massage_container"],children:D.jsxRuntimeExports.jsxs("div",{className:Ou["notification-massage_content"],children:[D.jsxRuntimeExports.jsx("h6",{className:Ou["notification-name"],children:t==null?void 0:t.actorName}),D.jsxRuntimeExports.jsxs("div",{className:Ou["notification-message_service"],children:[D.jsxRuntimeExports.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),D.jsxRuntimeExports.jsx("span",{children:t==null?void 0:t.context})]})]})})}return D.reactExports.useEffect(()=>{t&&Notification.permission==="granted"&&(t.actorName||t.message||t.context)&&se.notify(D.jsxRuntimeExports.jsx(o,{}))},[t]),D.reactExports.useEffect(()=>{Notification.permission==="granted"&&hy(e)},[Notification.permission]),D.reactExports.useEffect(()=>{DI(s)},[]),EI(e).then(c=>{var h,x,S;console.log("aaa",c),r({actorName:(h=c==null?void 0:c.data)==null?void 0:h.actorName,message:(x=c==null?void 0:c.data)==null?void 0:x.message,context:(S=c==null?void 0:c.data)==null?void 0:S.context}),s(E=>{var A;return{...E,unread:{...E.unread,total:((A=E.unread)==null?void 0:A.total)+1}}})}).catch(c=>console.log("failed: ",c)),D.jsxRuntimeExports.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?D.jsxRuntimeExports.jsx(RI,{...e}):""})};function OI({config:e,pushError:t=se.pushError}){const r=se.axios.create(e);r.interceptors.request.use(async o=>(o.headers={Accept:"application/json","Content-Type":"application/json"},o),o=>Promise.reject(o)),r.interceptors.response.use(o=>o,async o=>s(o));async function s(o){var S,E,A,$;console.error("Error 🚨:",o);const c=o.config,h=(E=(S=o.response)==null?void 0:S.data)==null?void 0:E.errorMessage,x=h===se.ERROR_MESSAGE.TOKEN_EXPIRED;return((A=o.response)==null?void 0:A.status)===401?x&&!c._retry?(c._retry=!0,r.post("/authentication/api/v1/auth/refresh-token").then(()=>r(c)).catch(()=>se.login(e.baseURL))):((!h||!x)&&se.login(e.baseURL),Promise.reject("Unauthorized! Please login again.")):((($=o.response)==null?void 0:$.status)===403||t(ps.t(`${h||"Something went wrong!"}`)),Promise.reject(o.response.data))}return r}const II=e=>{const[t,r]=D.reactExports.useState([]);return D.reactExports.useEffect(()=>{se.axios.get(`${e}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(s=>r(s.data)).catch(s=>{console.error("Getting user permission error:",s)})},[e]),t},py=e=>(t,r)=>{const s=II(e);return r?t.every(o=>s==null?void 0:s.includes(o)):t.some(o=>s==null?void 0:s.includes(o))},gy=({baseUrl:e,accessWith:t,requireAll:r,children:s})=>py(e)(t,r)?D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:s}):null;{const e=D.s(gy,{props:{baseUrl:"string",accessWith:"json",requireAll:"boolean",children:"json"},shadow:"open"});customElements.define("has-permission",e)}function PI(){const[e,t]=D.reactExports.useState();return D.reactExports.useEffect(()=>{const r=localStorage.getItem("language");t(r||ps.Language.en)},[]),{language:e,setLanguage:t}}const my=D.reactExports.createContext({}),NI=()=>D.reactExports.useContext(my),LI=({children:e})=>{const t=PI();return D.jsxRuntimeExports.jsx(my.Provider,{value:t,children:D.jsxRuntimeExports.jsx(ps.I18nextProvider,{i18n:ps.instance,children:e})})},eh=({baseUrl:e,notiPath:t,setNotiData:r})=>{const s=OI({config:{withCredentials:!0,baseURL:e}});return async()=>{var A;const h=e+(t||"/notification-management/api/v1/notifications"),S=(A=(await s.get(h,{params:{filter:{notificationFilterType:"all"}},withCredentials:!0})).data)==null?void 0:A.rows,E=S==null?void 0:S.filter($=>$.isRead===!1);r({all:{rows:S??[],total:(S==null?void 0:S.length)??0},unread:{rows:E??[],total:(E==null?void 0:E.length)??0}})}},jI=({notification:e,baseUrl:t,notiPath:r,markAllAsReadState:s,brandColors:o})=>{var H;const[c,h]=D.reactExports.useState(!1),[x,S]=D.reactExports.useState({id:e.id,isRead:e.isRead}),E=x.isRead===!1?"unread":"read",A={borderColor:x.isRead?"#c5c5c5":(o==null?void 0:o.primary500)||se.color.primary500,backgroundColor:x.isRead?"#c5c5c5":(o==null?void 0:o.primary500)||se.color.primary500},{setNotiData:$}=D.reactExports.useContext(Hi),B=eh({baseUrl:t,notiPath:r,setNotiData:$}),K=async(ae,de)=>{var he,te;try{const ie=r||`/notification-management/api/v1/notifications/${ae}`,d=t+ie;await se.axios.put(d,{isRead:de},{withCredentials:!0})}catch(ie){S({id:e.id,isRead:e.isRead}),se.pushError(((te=(he=ie.response)==null?void 0:he.data)==null?void 0:te.errorMessage)||"Have error when get notification list")}await B()},q=(ae,de)=>{console.log("specificNotificationID",ae);const he=!de;S(te=>({...te,isRead:he})),console.log("newIsReadState",he),K(ae,he)};D.reactExports.useEffect(()=>{S(s?ae=>({...ae,isRead:!0}):{id:e.id,isRead:e.isRead})},[s,e.id,e.isRead]);const F=()=>{h(!c)},re=ae=>{const de=le(),he=le(ae),te=de.diff(he,"days"),ie=de.diff(he,"minutes"),d=de.diff(he,"months"),Me=de.diff(he,"years");if(console.log("diffInMonths",d),ie<1)return"Just now";if(te===0){if(ie<=60)return`${ie} minute${ie>1?"s":""} ago`;const oe=Math.floor(ie/60);return console.log("diffIhours",oe),`${oe} hour${oe>1?"s":""} ago`}if(te===1)return"Yesterday";if(te>=2&&te<7)return`${te} days ago`;if(te<30){const oe=Math.floor(te/7);return`${oe} week${oe>1?"s":""} ago`}return d===0||d===1?"1 month ago":d<12?`${d} months ago`:Me===0||Me===1?"1 year ago":"Over 1 year ago"};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs("div",{className:"notitification-item__container",children:[D.jsxRuntimeExports.jsx("div",{className:"notification-item__image-container",children:D.jsxRuntimeExports.jsx("img",{src:!e.actorAvatarUrl||e.actorName==="System"?"https://ukpcsaprod.blob.core.windows.net/account/logo.png":e.actorAvatarUrl,onError:({currentTarget:ae})=>{console.log("img on error",ae),ae.onerror=null,ae.src="https://ukpcsaprod.blob.core.windows.net/account/logo.png"},alt:e.actorName})}),D.jsxRuntimeExports.jsxs("div",{style:{width:"100%"},children:[D.jsxRuntimeExports.jsxs("div",{className:"notification-item__content-wrapper",children:[D.jsxRuntimeExports.jsxs("div",{className:"notification-item__content",children:[D.jsxRuntimeExports.jsx("p",{className:"notification-item__user-name",children:e.actorName}),D.jsxRuntimeExports.jsxs("p",{children:[`${e.message} `,D.jsxRuntimeExports.jsx("span",{children:e==null?void 0:e.context})]}),(e==null?void 0:e.notificationType)==="deleteMultiple"&&D.jsxRuntimeExports.jsxs("button",{style:{color:se.color.primary400,textDecoration:"underline"},onClick:F,children:[c?"Hide":"Show "," details"]})]}),D.jsxRuntimeExports.jsx("div",{className:"notification-item__time",children:D.jsxRuntimeExports.jsx("p",{children:re(e.createdAt)})}),D.jsxRuntimeExports.jsx("button",{className:`${E} notification-item__read-at`,"aria-label":"Mark as read",style:A,onClick:()=>q(e.id,e.isRead)})]}),c&&D.jsxRuntimeExports.jsx("div",{style:{background:"#fff",width:"100%",padding:"8px",fontSize:"12px",marginTop:"8px"},children:D.jsxRuntimeExports.jsx("ul",{children:(H=e==null?void 0:e.data)==null?void 0:H.map((ae,de)=>D.jsxRuntimeExports.jsxs("li",{style:{display:"flex",alignItems:"center",marginBottom:"4px"},children:[D.jsxRuntimeExports.jsx("span",{style:{backgroundColor:se.color.primary400},className:"list-dot"}),D.jsxRuntimeExports.jsx("span",{style:{width:"calc(100% - 12px)"},children:ae.name})]},de))})})]})]})})},Ug=({notidata:e,baseUrl:t,notiPath:r,brandColors:s,notiUnreadNumber:o})=>{const[c,h]=D.reactExports.useState(!1);console.log(c);const{setNotiData:x}=D.reactExports.useContext(Hi),S=eh({baseUrl:t,notiPath:r,setNotiData:x}),E=async()=>{var $,B;try{const q=t+(r||"/notification-management/api/v1/notifications");await se.axios.put(q,{withCredentials:!0})}catch(K){console.log(K),h(!1),se.pushError(((B=($=K.response)==null?void 0:$.data)==null?void 0:B.errorMessage)||"Have error when get notification list")}await S(),h(!1)},A=()=>{h(!0),E()};return console.log("notiUnreadNumber",o),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{className:"mark-all-read",children:D.jsxRuntimeExports.jsx("button",{onClick:A,style:{visibility:o===0?"hidden":"visible"},children:"Mark all as read"})}),D.jsxRuntimeExports.jsx("div",{className:"notification-items__wrapper",children:D.jsxRuntimeExports.jsx("div",{className:"notification-items__content",children:Object.values(e).map(($,B)=>D.jsxRuntimeExports.jsx(jI,{notification:$,baseUrl:t,notiPath:r,markAllAsReadState:c,brandColors:s},B))})})]})},$I=({baseUrl:e,notiPath:t,brandColors:r})=>{var S,E,A,$;const{setShowModalFalse:s}=D.reactExports.useContext(Hi),{notidata:o}=D.reactExports.useContext(Hi);console.log(o);const[c,h]=D.reactExports.useState("all"),x=[{id:"all",tabTitle:`All (${((S=o==null?void 0:o.all)==null?void 0:S.total)||0})`,children:D.jsxRuntimeExports.jsx(Ug,{notidata:((E=o==null?void 0:o.all)==null?void 0:E.rows)||[],baseUrl:e,notiPath:t,brandColors:r,notiUnreadNumber:o.unread.total})},{id:"unread",tabTitle:`Unread (${((A=o==null?void 0:o.unread)==null?void 0:A.total)||0})`,children:D.jsxRuntimeExports.jsx(Ug,{notidata:(($=o==null?void 0:o.unread)==null?void 0:$.rows)||[],baseUrl:e,notiPath:t,brandColors:r,notiUnreadNumber:o.unread.total})}];return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx("div",{style:{position:"absolute",backgroundColor:"#fff",width:"550px",height:"90vh",right:"100px",top:"100%",padding:"32px",boxShadow:"10px 0px 20px #999",borderRadius:"0 0 8px 8px",overflow:"hidden"},children:D.jsxRuntimeExports.jsxs("div",{className:"list-content",children:[D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[D.jsxRuntimeExports.jsx("h3",{style:{fontSize:"24px",fontWeight:"500",color:se.color.textPrimary},className:"list-title",children:"Notifications"}),D.jsxRuntimeExports.jsx("button",{onClick:s,children:D.jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M7.05086 6.13616C6.66033 5.74563 6.02717 5.74563 5.63664 6.13616C5.24612 6.52668 5.24612 7.15984 5.63664 7.55037L10.5864 12.5001L5.63664 17.4499C5.24612 17.8404 5.24612 18.4736 5.63664 18.8641C6.02717 19.2546 6.66033 19.2546 7.05086 18.8641L12.0006 13.9143L16.9504 18.8641C17.3409 19.2546 17.974 19.2546 18.3646 18.8641C18.7551 18.4736 18.7551 17.8404 18.3646 17.4499L13.4148 12.5001L18.3646 7.55037C18.7551 7.15984 18.7551 6.52668 18.3646 6.13616C17.974 5.74563 17.3409 5.74563 16.9504 6.13616L12.0006 11.0859L7.05086 6.13616Z",fill:"#85858A"})})})]}),D.jsxRuntimeExports.jsx(Sw,{tabs:x,setCurrentTab:h,currentTab:c,brandColors:r})]})})})};function th({childrenClass:e,action:t,childrenOpenClass:r}){const s=document.querySelector("#topbar-wrapper"),o=s==null?void 0:s.shadowRoot,c=o==null?void 0:o.querySelector(`.${e}`),h=o==null?void 0:o.querySelector(`.${r}`),x=o==null?void 0:o.querySelector("nav"),S=E=>{x==null||x.addEventListener("click",function(A){if(r&&h&&h.contains(A.target)){if(c&&!c.contains(A.target))return}else c&&!c.contains(A.target)&&t()}),s&&!s.contains(E.target)&&t()};document.addEventListener("click",S,!0)}function FI({iconColor:e="#fff",baseUrl:t,notiPath:r,brandColors:s}){var $,B;const{isOpen:o,toggleOpen:c,setShowModalFalse:h}=D.reactExports.useContext(Hi),{notidata:x,setNotiData:S}=D.reactExports.useContext(Hi),E=eh({baseUrl:t,notiPath:r,setNotiData:S}),A=async()=>{var K,q;try{await E()}catch(F){se.pushError(((q=(K=F.response)==null?void 0:K.data)==null?void 0:q.errorMessage)||"Have error when get notification list")}};return D.reactExports.useEffect(()=>{A()},[o]),D.reactExports.useEffect(()=>{th({childrenClass:"noti-container",childrenOpenClass:"noti-list-container",action(){h()}})}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"noti-container",style:{position:"relative"},children:[D.jsxRuntimeExports.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:c,style:{cursor:"pointer",color:e},children:[D.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(x==null?void 0:x.unread)&&(x==null?void 0:x.unread.total)!=0&&D.jsxRuntimeExports.jsx("span",{style:{position:"absolute",top:"-9px",right:"-6px",width:"20px",height:"20px",border:"1px solid #fff",borderRadius:"50%",color:"#fff",fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:se.color.danger},className:"notification-badge",children:(($=x==null?void 0:x.unread)==null?void 0:$.total)>9?"9+":`${(B=x==null?void 0:x.unread)==null?void 0:B.total}`})]}),D.jsxRuntimeExports.jsx("div",{className:"noti-list-container",children:!o&&D.jsxRuntimeExports.jsx($I,{baseUrl:t,notiPath:r,brandColors:s})})]})}const YI=`.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.2rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{display:flex;background:#292929;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between}.logo-container{height:100%;display:flex;align-items:center}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.languageDropdown{height:100%;padding:0 8px;display:flex;flex-direction:row;gap:8px;border-radius:3px;align-items:center;justify-content:center;height:41px;background-color:#ffffff1a;cursor:pointer;transition:background-color .2s ease-in-out}.languageDropdown:hover{background-color:#fff3}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;-o-object-fit:cover;object-fit:cover;border-radius:9999px;border:2px solid #FFFFFF}#userAvatarNull{width:2.5rem;height:2.5rem;background:#DDDDDD;border-radius:100%;color:#fff;font-size:20px;font-weight:400;display:flex;align-items:center;justify-content:center}.relative{position:relative}.cursor-pointer{cursor:pointer}
|
|
1092
|
+
*/function dy(e=BA()){return wI().then(t=>{if(!t)throw nn.create("unsupported-browser")},t=>{throw nn.create("indexed-db-unsupported")}),Hd(Wd(e),"messaging").getImmediate()}async function kI(e,t){return e=Wd(e),fy(e,t)}function CI(e,t){return e=Wd(e),SI(e,t)}_I();const hy=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const r=dy(Ud({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));kI(r,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async s=>{var o,c;if(s){console.log("current token for client: ",s);try{const h="/notification-management/api/v1/notifications/registrations",x=e.baseUrl+h;await se.axios.post(x,{deviceToken:s},{withCredentials:!0})}catch(h){console.log(h),se.pushError(((c=(o=h.response)==null?void 0:o.data)==null?void 0:c.errorMessage)||"Have error when get notification list")}}else console.log("No registration token available. Request permission to generate one.")}).catch(s=>{console.log("An error occurred while retrieving token. ",s)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},DI=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=r=>{console.log("Broadcast chanel message",r),r&&e(s=>({...s,unread:{...s.unread,total:s.unread.total+1}}))}},EI=e=>new Promise(t=>{const r=dy(Ud({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));CI(r,s=>{console.log("payload",s),t(s)})}),us={"subscription-diaglog":"_subscription-diaglog_1bysb_2","subscription-container":"_subscription-container_1bysb_15","subscription-title":"_subscription-title_1bysb_25","subscription-text":"_subscription-text_1bysb_34","subscription-btn__container":"_subscription-btn__container_1bysb_38","btn-success":"_btn-success_1bysb_44","btn-cancel":"_btn-cancel_1bysb_45"},TI=["granted","denied"],RI=e=>{const[t,r]=D.reactExports.useState(!1),s=()=>{Notification.requestPermission(function(c){c==="granted"&&hy(e),TI.includes(c)&&r(!0)})},o=()=>{r(!0)};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:t?"":D.jsxRuntimeExports.jsx("div",{className:us["subscription-diaglog"],children:D.jsxRuntimeExports.jsxs("div",{className:us["subscription-container"],children:[D.jsxRuntimeExports.jsx("h4",{className:us["subscription-title"],children:"Notification"}),D.jsxRuntimeExports.jsx("p",{className:us["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),D.jsxRuntimeExports.jsxs("div",{className:us["subscription-btn__container"],children:[D.jsxRuntimeExports.jsx("button",{className:us["btn-cancel"],onClick:o,children:"Not now"}),D.jsxRuntimeExports.jsx("button",{className:us["btn-success"],onClick:s,children:"Turn on"})]})]})})})},Ou={"notification-massage_container":"_notification-massage_container_ql4az_1","notification-name":"_notification-name_ql4az_18","notification-message_service":"_notification-message_service_ql4az_23","notification-message_button-close":"_notification-message_button-close_ql4az_27"},Hi=D.reactExports.createContext({}),MI=({children:e})=>{const[t,r]=D.reactExports.useState(!0),[s,o]=D.reactExports.useState({all:{rows:[],total:0},unread:{rows:[],total:0}}),c=()=>{r(!t)},h=()=>{r(!0)};return D.jsxRuntimeExports.jsx(Hi.Provider,{value:{isOpen:t,toggleOpen:c,setShowModalFalse:h,notidata:s,setNotiData:o},children:e})},AI=e=>{const[t,r]=D.reactExports.useState({actorName:"",message:"",context:""});console.log(t);const{setNotiData:s}=D.reactExports.useContext(Hi);function o(){return D.jsxRuntimeExports.jsx("div",{className:Ou["notification-massage_container"],children:D.jsxRuntimeExports.jsxs("div",{className:Ou["notification-massage_content"],children:[D.jsxRuntimeExports.jsx("h6",{className:Ou["notification-name"],children:t==null?void 0:t.actorName}),D.jsxRuntimeExports.jsxs("div",{className:Ou["notification-message_service"],children:[D.jsxRuntimeExports.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),D.jsxRuntimeExports.jsx("span",{children:t==null?void 0:t.context})]})]})})}return D.reactExports.useEffect(()=>{t&&Notification.permission==="granted"&&(t.actorName||t.message||t.context)&&se.notify(D.jsxRuntimeExports.jsx(o,{}))},[t]),D.reactExports.useEffect(()=>{Notification.permission==="granted"&&hy(e)},[Notification.permission]),D.reactExports.useEffect(()=>{DI(s)},[]),EI(e).then(c=>{var h,x,S;console.log("aaa",c),r({actorName:(h=c==null?void 0:c.data)==null?void 0:h.actorName,message:(x=c==null?void 0:c.data)==null?void 0:x.message,context:(S=c==null?void 0:c.data)==null?void 0:S.context}),s(E=>{var A;return{...E,unread:{...E.unread,total:((A=E.unread)==null?void 0:A.total)+1}}})}).catch(c=>console.log("failed: ",c)),D.jsxRuntimeExports.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?D.jsxRuntimeExports.jsx(RI,{...e}):""})};function OI({config:e,pushError:t=se.pushError}){const r=se.axios.create(e);r.interceptors.request.use(async o=>(o.headers={Accept:"application/json","Content-Type":"application/json"},o),o=>Promise.reject(o)),r.interceptors.response.use(o=>o,async o=>s(o));async function s(o){var S,E,A,$;console.error("Error 🚨:",o);const c=o.config,h=(E=(S=o.response)==null?void 0:S.data)==null?void 0:E.errorMessage,x=h===se.ERROR_MESSAGE.TOKEN_EXPIRED;return((A=o.response)==null?void 0:A.status)===401?x&&!c._retry?(c._retry=!0,r.post("/authentication/api/v1/auth/refresh-token").then(()=>r(c)).catch(()=>se.login(e.baseURL))):((!h||!x)&&se.login(e.baseURL),Promise.reject("Unauthorized! Please login again.")):((($=o.response)==null?void 0:$.status)===403||t(ps.t(`${h||"Something went wrong!"}`)),Promise.reject(o.response.data))}return r}const II=e=>{const[t,r]=D.reactExports.useState([]);return D.reactExports.useEffect(()=>{se.axios.get(`${e}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(s=>r(s.data)).catch(s=>{console.error("Getting user permission error:",s)})},[e]),t},py=e=>(t,r)=>{const s=II(e);return r?t.every(o=>s==null?void 0:s.includes(o)):t.some(o=>s==null?void 0:s.includes(o))},gy=({baseUrl:e,accessWith:t,requireAll:r,children:s})=>py(e)(t,r)?D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:s}):null;{const e=D.s(gy,{props:{baseUrl:"string",accessWith:"json",requireAll:"boolean",children:"json"},shadow:"open"});customElements.define("has-permission",e)}function PI(){const[e,t]=D.reactExports.useState();return D.reactExports.useEffect(()=>{const r=localStorage.getItem("language");t(r||ps.Language.en)},[]),{language:e,setLanguage:t}}const my=D.reactExports.createContext({}),NI=()=>D.reactExports.useContext(my),LI=({children:e})=>{const t=PI();return D.jsxRuntimeExports.jsx(my.Provider,{value:t,children:D.jsxRuntimeExports.jsx(ps.I18nextProvider,{i18n:ps.instance,children:e})})},eh=({baseUrl:e,notiPath:t,setNotiData:r})=>{const s=OI({config:{withCredentials:!0,baseURL:e}});return async()=>{var A;const h=e+(t||"/notification-management/api/v1/notifications"),S=(A=(await s.get(h,{params:{filter:{notificationFilterType:"all"}},withCredentials:!0})).data)==null?void 0:A.rows,E=S==null?void 0:S.filter($=>$.isRead===!1);r({all:{rows:S??[],total:(S==null?void 0:S.length)??0},unread:{rows:E??[],total:(E==null?void 0:E.length)??0}})}},jI=({notification:e,baseUrl:t,notiPath:r,markAllAsReadState:s,brandColors:o})=>{var H;const[c,h]=D.reactExports.useState(!1),[x,S]=D.reactExports.useState({id:e.id,isRead:e.isRead}),E=x.isRead===!1?"unread":"read",A={borderColor:x.isRead?"#c5c5c5":(o==null?void 0:o.primary500)||se.color.primary500,backgroundColor:x.isRead?"#c5c5c5":(o==null?void 0:o.primary500)||se.color.primary500},{setNotiData:$}=D.reactExports.useContext(Hi),B=eh({baseUrl:t,notiPath:r,setNotiData:$}),K=async(ae,de)=>{var he,te;try{const ie=r||`/notification-management/api/v1/notifications/${ae}`,d=t+ie;await se.axios.put(d,{isRead:de},{withCredentials:!0})}catch(ie){S({id:e.id,isRead:e.isRead}),se.pushError(((te=(he=ie.response)==null?void 0:he.data)==null?void 0:te.errorMessage)||"Have error when get notification list")}await B()},q=(ae,de)=>{console.log("specificNotificationID",ae);const he=!de;S(te=>({...te,isRead:he})),console.log("newIsReadState",he),K(ae,he)};D.reactExports.useEffect(()=>{S(s?ae=>({...ae,isRead:!0}):{id:e.id,isRead:e.isRead})},[s,e.id,e.isRead]);const F=()=>{h(!c)},re=ae=>{const de=le(),he=le(ae),te=de.diff(he,"days"),ie=de.diff(he,"minutes"),d=de.diff(he,"months"),Me=de.diff(he,"years");if(console.log("diffInMonths",d),ie<1)return"Just now";if(te===0){if(ie<=60)return`${ie} minute${ie>1?"s":""} ago`;const oe=Math.floor(ie/60);return console.log("diffIhours",oe),`${oe} hour${oe>1?"s":""} ago`}if(te===1)return"Yesterday";if(te>=2&&te<7)return`${te} days ago`;if(te<30){const oe=Math.floor(te/7);return`${oe} week${oe>1?"s":""} ago`}return d===0||d===1?"1 month ago":d<12?`${d} months ago`:Me===0||Me===1?"1 year ago":"Over 1 year ago"};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs("div",{className:"notitification-item__container",children:[D.jsxRuntimeExports.jsx("div",{className:"notification-item__image-container",children:D.jsxRuntimeExports.jsx("img",{src:!e.actorAvatarUrl||e.actorName==="System"?"https://ukpcsaprod.blob.core.windows.net/account/logo.png":e.actorAvatarUrl,onError:({currentTarget:ae})=>{console.log("img on error",ae),ae.onerror=null,ae.src="https://ukpcsaprod.blob.core.windows.net/account/logo.png"},alt:e.actorName})}),D.jsxRuntimeExports.jsxs("div",{style:{width:"100%"},children:[D.jsxRuntimeExports.jsxs("div",{className:"notification-item__content-wrapper",children:[D.jsxRuntimeExports.jsxs("div",{className:"notification-item__content",children:[D.jsxRuntimeExports.jsx("p",{className:"notification-item__user-name",children:e.actorName}),D.jsxRuntimeExports.jsxs("p",{children:[`${e.message} `,D.jsxRuntimeExports.jsx("span",{children:e==null?void 0:e.context})]}),(e==null?void 0:e.notificationType)==="deleteMultiple"&&D.jsxRuntimeExports.jsxs("button",{style:{color:se.color.primary400,textDecoration:"underline"},onClick:F,children:[c?"Hide":"Show "," details"]})]}),D.jsxRuntimeExports.jsx("div",{className:"notification-item__time",children:D.jsxRuntimeExports.jsx("p",{children:re(e.createdAt)})}),D.jsxRuntimeExports.jsx("button",{className:`${E} notification-item__read-at`,"aria-label":"Mark as read",style:A,onClick:()=>q(e.id,e.isRead)})]}),c&&D.jsxRuntimeExports.jsx("div",{style:{background:"#fff",width:"100%",padding:"8px",fontSize:"12px",marginTop:"8px"},children:D.jsxRuntimeExports.jsx("ul",{children:(H=e==null?void 0:e.data)==null?void 0:H.map((ae,de)=>D.jsxRuntimeExports.jsxs("li",{style:{display:"flex",alignItems:"center",marginBottom:"4px"},children:[D.jsxRuntimeExports.jsx("span",{style:{backgroundColor:se.color.primary400},className:"list-dot"}),D.jsxRuntimeExports.jsx("span",{style:{width:"calc(100% - 12px)"},children:ae.name})]},de))})})]})]})})},Ug=({notidata:e,baseUrl:t,notiPath:r,brandColors:s,notiUnreadNumber:o})=>{const[c,h]=D.reactExports.useState(!1);console.log(c);const{setNotiData:x}=D.reactExports.useContext(Hi),S=eh({baseUrl:t,notiPath:r,setNotiData:x}),E=async()=>{var $,B;try{const q=t+(r||"/notification-management/api/v1/notifications");await se.axios.put(q,{withCredentials:!0})}catch(K){console.log(K),h(!1),se.pushError(((B=($=K.response)==null?void 0:$.data)==null?void 0:B.errorMessage)||"Have error when get notification list")}await S(),h(!1)},A=()=>{h(!0),E()};return console.log("notiUnreadNumber",o),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{className:"mark-all-read",children:D.jsxRuntimeExports.jsx("button",{onClick:A,style:{visibility:o===0?"hidden":"visible"},children:"Mark all as read"})}),D.jsxRuntimeExports.jsx("div",{className:"notification-items__wrapper",children:D.jsxRuntimeExports.jsx("div",{className:"notification-items__content",children:Object.values(e).map(($,B)=>D.jsxRuntimeExports.jsx(jI,{notification:$,baseUrl:t,notiPath:r,markAllAsReadState:c,brandColors:s},B))})})]})},$I=({baseUrl:e,notiPath:t,brandColors:r})=>{var S,E,A,$;const{setShowModalFalse:s}=D.reactExports.useContext(Hi),{notidata:o}=D.reactExports.useContext(Hi);console.log(o);const[c,h]=D.reactExports.useState("all"),x=[{id:"all",tabTitle:`All (${((S=o==null?void 0:o.all)==null?void 0:S.total)||0})`,children:D.jsxRuntimeExports.jsx(Ug,{notidata:((E=o==null?void 0:o.all)==null?void 0:E.rows)||[],baseUrl:e,notiPath:t,brandColors:r,notiUnreadNumber:o.unread.total})},{id:"unread",tabTitle:`Unread (${((A=o==null?void 0:o.unread)==null?void 0:A.total)||0})`,children:D.jsxRuntimeExports.jsx(Ug,{notidata:(($=o==null?void 0:o.unread)==null?void 0:$.rows)||[],baseUrl:e,notiPath:t,brandColors:r,notiUnreadNumber:o.unread.total})}];return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx("div",{style:{position:"absolute",backgroundColor:"#fff",width:"550px",height:"90vh",right:"100px",top:"100%",padding:"32px",boxShadow:"10px 0px 20px #999",borderRadius:"0 0 8px 8px",overflow:"hidden",zIndex:"10"},children:D.jsxRuntimeExports.jsxs("div",{className:"list-content",children:[D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[D.jsxRuntimeExports.jsx("h3",{style:{fontSize:"24px",fontWeight:"500",color:se.color.textPrimary},className:"list-title",children:"Notifications"}),D.jsxRuntimeExports.jsx("button",{onClick:s,children:D.jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M7.05086 6.13616C6.66033 5.74563 6.02717 5.74563 5.63664 6.13616C5.24612 6.52668 5.24612 7.15984 5.63664 7.55037L10.5864 12.5001L5.63664 17.4499C5.24612 17.8404 5.24612 18.4736 5.63664 18.8641C6.02717 19.2546 6.66033 19.2546 7.05086 18.8641L12.0006 13.9143L16.9504 18.8641C17.3409 19.2546 17.974 19.2546 18.3646 18.8641C18.7551 18.4736 18.7551 17.8404 18.3646 17.4499L13.4148 12.5001L18.3646 7.55037C18.7551 7.15984 18.7551 6.52668 18.3646 6.13616C17.974 5.74563 17.3409 5.74563 16.9504 6.13616L12.0006 11.0859L7.05086 6.13616Z",fill:"#85858A"})})})]}),D.jsxRuntimeExports.jsx(Sw,{tabs:x,setCurrentTab:h,currentTab:c,brandColors:r})]})})})};function th({childrenClass:e,action:t,childrenOpenClass:r}){const s=document.querySelector("#topbar-wrapper"),o=s==null?void 0:s.shadowRoot,c=o==null?void 0:o.querySelector(`.${e}`),h=o==null?void 0:o.querySelector(`.${r}`),x=o==null?void 0:o.querySelector("nav"),S=E=>{x==null||x.addEventListener("click",function(A){if(r&&h&&h.contains(A.target)){if(c&&!c.contains(A.target))return}else c&&!c.contains(A.target)&&t()}),s&&!s.contains(E.target)&&t()};document.addEventListener("click",S,!0)}function FI({iconColor:e="#fff",baseUrl:t,notiPath:r,brandColors:s}){var $,B;const{isOpen:o,toggleOpen:c,setShowModalFalse:h}=D.reactExports.useContext(Hi),{notidata:x,setNotiData:S}=D.reactExports.useContext(Hi),E=eh({baseUrl:t,notiPath:r,setNotiData:S}),A=async()=>{var K,q;try{await E()}catch(F){se.pushError(((q=(K=F.response)==null?void 0:K.data)==null?void 0:q.errorMessage)||"Have error when get notification list")}};return D.reactExports.useEffect(()=>{A()},[o]),D.reactExports.useEffect(()=>{th({childrenClass:"noti-container",childrenOpenClass:"noti-list-container",action(){h()}})}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"noti-container",style:{position:"relative"},children:[D.jsxRuntimeExports.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:c,style:{cursor:"pointer",color:e},children:[D.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(x==null?void 0:x.unread)&&(x==null?void 0:x.unread.total)!=0&&D.jsxRuntimeExports.jsx("span",{style:{position:"absolute",top:"-9px",right:"-6px",width:"20px",height:"20px",border:"1px solid #fff",borderRadius:"50%",color:"#fff",fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:se.color.danger},className:"notification-badge",children:(($=x==null?void 0:x.unread)==null?void 0:$.total)>9?"9+":`${(B=x==null?void 0:x.unread)==null?void 0:B.total}`})]}),D.jsxRuntimeExports.jsx("div",{className:"noti-list-container",children:!o&&D.jsxRuntimeExports.jsx($I,{baseUrl:t,notiPath:r,brandColors:s})})]})}const YI=`.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.2rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{display:flex;background:#292929;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between;position:relative}.logo-container{height:100%;display:flex;align-items:center}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.languageDropdown{height:100%;padding:0 8px;display:flex;flex-direction:row;gap:8px;border-radius:3px;align-items:center;justify-content:center;height:41px;background-color:#ffffff1a;cursor:pointer;transition:background-color .2s ease-in-out}.languageDropdown:hover{background-color:#fff3}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;-o-object-fit:cover;object-fit:cover;border-radius:9999px;border:2px solid #FFFFFF}#userAvatarNull{width:2.5rem;height:2.5rem;background:#DDDDDD;border-radius:100%;color:#fff;font-size:20px;font-weight:400;display:flex;align-items:center;justify-content:center}.relative{position:relative}.cursor-pointer{cursor:pointer}
|
|
1093
1093
|
`,WI=`:root{--textPrimary: #292929;--textWhite: #fff;--primary500: #2E7D32;--grey100: #FAFAFA;--gray200: #EEEEEE;--gray600: #85858A;--link: #007BFF }.list-content{overflow-y:auto;overflow-x:hidden}.mark-all-read{text-align:right;color:#007bff;margin-bottom:12px;font-size:12px}.notification-items__wrapper{overflow:hidden}.notification-items__content{height:calc(100vh - 275px);overflow-x:hidden;overflow-y:auto;color:#292929}.notitification-item__container{display:flex;justify-content:space-between;padding:16px;border-bottom:#FAFAFA 1px solid;text-align:left;font-size:12px;position:relative;z-index:10;cursor:pointer;border-radius:4px;margin-bottom:8px}.notitification-item__container:hover{background-color:#fafafa}.notification-item__image-container{width:46px;height:40px;display:flex;justify-content:center;align-items:center;border-radius:50%;overflow:hidden;margin-right:16px}.notification-item__image-container img{width:100%;height:100%;text-align:center;-o-object-fit:cover;object-fit:cover;color:transparent;text-indent:10000px}.notification-item__content-wrapper{width:100%;display:flex;align-items:center;justify-content:space-between}.notification-item__context-link{color:#007bff}.notification-item__content{width:68%;padding-right:16px}.notification-item__user-name{margin-bottom:2px;font-size:14px}.notification-item__time{margin-right:15px;text-align:right}.notification-item__read-at{border-width:2px;border-style:solid;border-radius:50%;width:10px;height:10px;display:block;position:relative}.notification-item__read-at:before{position:absolute;top:-30px;right:0;width:91px;background-color:#85858a;color:#fff;border-radius:4px;font-size:10px;text-align:center;padding:4px;opacity:0;visibility:hidden;transition:all .3s cubic-bezier(.39,.575,.565,1)}.notification-item__read-at:hover:before{opacity:1;visibility:visible}.notification-item__read-at.read:before{content:"Mark as unread"}.notification-item__read-at.unread:before{content:"Mark as read"}.notification-item__read-at.read{border-color:#eee}.notification-item__read-at.unread{border-color:#2e7d32;background-color:#2e7d32}.list-dot{border-radius:50%;width:8px;height:8px;margin-right:4px;display:block}
|
|
1094
1094
|
`,BI=`._subscription-diaglog_1bysb_2{position:fixed;width:100vw;height:100vh;top:0;left:0;background-color:#0006;z-index:10000;display:flex;align-items:center;justify-content:center}._subscription-container_1bysb_15{width:610px;height:222px;border-radius:8px;padding:32px 24px 40px;background:#fff;color:#292929}._subscription-title_1bysb_25{font-size:20px;font-weight:500;text-align:center;color:#292929}._subscription-title_1bysb_25,._subscription-text_1bysb_34{margin-bottom:24px}._subscription-btn__container_1bysb_38{display:flex;justify-content:space-between;align-items:center}._btn-success_1bysb_44,._btn-cancel_1bysb_45{width:150px;height:40px;display:flex;align-items:center;justify-content:center;padding:8px;color:#292929;border-radius:1px;transition:background-color .25s cubic-bezier(.4,0,.2,1) 0ms,box-shadow .25s cubic-bezier(.4,0,.2,1) 0ms,border-color .25s cubic-bezier(.4,0,.2,1) 0ms,color .25s cubic-bezier(.4,0,.2,1) 0ms}._btn-cancel_1bysb_45{background-color:#ddd}._btn-cancel_1bysb_45:hover{background-color:#c5c5c5}._btn-success_1bysb_44{background-color:#93d500}._btn-success_1bysb_44:hover{background-color:#2e7d32}
|
|
1095
1095
|
`,HI=`._notification-massage_container_ql4az_1{background:#fff;padding:0 64px 0 84px;border-radius:8px;font-family:TT Firs Neue Trl,sans-serif}._notification-massage_container_ql4az_1:before{position:absolute;content:"";width:48px;height:48px;background:url(https://ukpcsaprod.blob.core.windows.net/saas/notification-icon.svg) no-repeat center/100%;top:12px;left:24px}._notification-name_ql4az_18{font-weight:500;font-size:14px}._notification-message_service_ql4az_23{font-size:12px}._notification-message_button-close_ql4az_27{position:absolute;top:12px;right:24px;width:24px;height:24px}
|