@instincthub/react-ui 0.1.13 → 0.1.15

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.
Files changed (27) hide show
  1. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +1 -1
  2. package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -1
  3. package/dist/src/assets/css/main.css +1 -57
  4. package/dist/src/assets/css/navbar/sidenav.css +28 -12
  5. package/dist/src/components/auth/PasswordsMatch.js +1 -1
  6. package/dist/src/components/forms/DropFile.js +1 -1
  7. package/dist/src/components/navbar/ResponsiveNavbar.js +1 -1
  8. package/dist/src/components/status/DeleteConfirmationModal.js +1 -1
  9. package/dist/src/components/status/ModalWrapper.js +2 -0
  10. package/dist/src/components/status/ModalWrapper.js.map +1 -0
  11. package/dist/src/components/ui/ComponentLists.js +1 -1
  12. package/dist/src/components/ui/GetSuccessFailedIcon.js +2 -0
  13. package/dist/src/components/ui/GetSuccessFailedIcon.js.map +1 -0
  14. package/dist/src/components/ui/StatusIcon.js +2 -0
  15. package/dist/src/components/ui/StatusIcon.js.map +1 -0
  16. package/dist/src/index.js +1 -1
  17. package/dist/src/types/components/auth/PasswordsMatch.d.ts +9 -1
  18. package/dist/src/types/components/forms/DropFile.d.ts +2 -0
  19. package/dist/src/types/components/navbar/ResponsiveNavbar.d.ts +1 -1
  20. package/dist/src/types/components/status/DeleteConfirmationModal.d.ts +2 -0
  21. package/dist/src/types/components/status/ModalWrapper.d.ts +10 -0
  22. package/dist/src/types/components/ui/GetSuccessFailedIcon.d.ts +39 -0
  23. package/dist/src/types/components/ui/StatusIcon.d.ts +29 -0
  24. package/dist/src/types/index.d.ts +3 -0
  25. package/dist/src/types/types/index.d.ts +29 -0
  26. package/dist/tsconfig.build.tsbuildinfo +1 -1
  27. package/package.json +1 -1
@@ -4,5 +4,5 @@ import e from"../createLucideIcon.js";
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];e("x",t);export{t as __iconNode};
7
+ */const t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],a=e("x",t);export{t as __iconNode,a as default};
8
8
  //# sourceMappingURL=x.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x.js","sources":["../../../../../../node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["/**\n * @license lucide-react v0.525.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["__iconNode","d","key","createLucideIcon"],"mappings":";;;;;;GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAEC,EAAG,aAAcC,IAAK,WACjC,CAAC,OAAQ,CAAED,EAAG,aAAcC,IAAK,YAEzBC,EAAiB,IAAKH"}
1
+ {"version":3,"file":"x.js","sources":["../../../../../../node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["/**\n * @license lucide-react v0.525.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["__iconNode","d","key","X","createLucideIcon"],"mappings":";;;;;;GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAEC,EAAG,aAAcC,IAAK,WACjC,CAAC,OAAQ,CAAED,EAAG,aAAcC,IAAK,YAE7BC,EAAIC,EAAiB,IAAKJ"}
@@ -567,63 +567,7 @@ small {
567
567
  /* .video_component {
568
568
  border: 3px solid blue;
569
569
  } */
570
- .addAccount::before {
571
- content: "\e7fe";
572
- font-family: "Material Icons";
573
- -webkit-font-feature-settings: "liga";
574
- margin-right: 10px;
575
- position: absolute;
576
- left: 15px;
577
- top: 8px;
578
- font-size: 20px;
579
- font-weight: 400;
580
- margin-right: 10px;
581
- }
582
- .stepBackBtn::before {
583
- content: "\e5c4";
584
- font-family: "Material Icons";
585
- -webkit-font-feature-settings: "liga";
586
- margin-right: 10px;
587
- position: absolute;
588
- left: 7px;
589
- top: 8px;
590
- font-size: 20px;
591
- font-weight: 400;
592
- margin-right: 10px;
593
- }
594
- .switch_acct::before {
595
- content: "\e9ed";
596
- font-family: "Material Icons";
597
- -webkit-font-feature-settings: "liga";
598
- margin-right: 10px;
599
- position: absolute;
600
- left: 19px;
601
- top: 8px;
602
- font-size: 20px;
603
- font-weight: 400;
604
- margin-right: 10px;
605
- }
606
- .switch_acct::after {
607
- content: "\e5e1";
608
- font-family: "Material Icons";
609
- -webkit-font-feature-settings: "liga";
610
- margin-right: 10px;
611
- position: absolute;
612
- right: 10px;
613
- top: 11px;
614
- }
615
- .sign_out::before {
616
- content: "\e9ba";
617
- font-family: "Material Icons";
618
- -webkit-font-feature-settings: "liga";
619
- margin-right: 10px;
620
- position: absolute;
621
- left: 14px;
622
- top: 8px;
623
- font-size: 20px;
624
- font-weight: 400;
625
- margin-right: 10px;
626
- }
570
+
627
571
  .DarkLavender {
628
572
  background-color: var(--DarkLavender);
629
573
  }
@@ -184,6 +184,10 @@
184
184
  padding: 12px;
185
185
  }
186
186
 
187
+ .ihub-sidenav-logo img {
188
+ object-fit: contain;
189
+ }
190
+
187
191
  /* Toggle button */
188
192
  .ihub-sidenav-toggle {
189
193
  position: absolute;
@@ -574,20 +578,30 @@
574
578
  }
575
579
 
576
580
  /* Desktop: Dynamic margin adjustments based on sidebar state */
577
- .ihub-sidenav-container-left.ihub-sidenav-container-expanded .ihub-sidenav-main {
578
- margin-left: var(--ihub-sidenav-width, 240px); /* Use CSS variable for dynamic width, fallback to 240px */
581
+ .ihub-sidenav-container-left.ihub-sidenav-container-expanded
582
+ .ihub-sidenav-main {
583
+ margin-left: var(
584
+ --ihub-sidenav-width,
585
+ 240px
586
+ ); /* Use CSS variable for dynamic width, fallback to 240px */
579
587
  }
580
588
 
581
- .ihub-sidenav-container-left.ihub-sidenav-container-collapsed .ihub-sidenav-main {
589
+ .ihub-sidenav-container-left.ihub-sidenav-container-collapsed
590
+ .ihub-sidenav-main {
582
591
  margin-left: 64px; /* Match collapsed sidebar width */
583
592
  }
584
593
 
585
594
  /* For right-positioned sidebar */
586
- .ihub-sidenav-container-right.ihub-sidenav-container-expanded .ihub-sidenav-main {
587
- margin-right: var(--ihub-sidenav-width, 240px); /* Use CSS variable for dynamic width, fallback to 240px */
595
+ .ihub-sidenav-container-right.ihub-sidenav-container-expanded
596
+ .ihub-sidenav-main {
597
+ margin-right: var(
598
+ --ihub-sidenav-width,
599
+ 240px
600
+ ); /* Use CSS variable for dynamic width, fallback to 240px */
588
601
  }
589
602
 
590
- .ihub-sidenav-container-right.ihub-sidenav-container-collapsed .ihub-sidenav-main {
603
+ .ihub-sidenav-container-right.ihub-sidenav-container-collapsed
604
+ .ihub-sidenav-main {
591
605
  margin-right: 64px; /* Match collapsed sidebar width */
592
606
  }
593
607
 
@@ -627,12 +641,12 @@
627
641
  margin-right: 0 !important;
628
642
  width: 100%;
629
643
  }
630
-
644
+
631
645
  /* Ensure sidebar properly overlays on mobile */
632
646
  .ihub-sidenav-mobile {
633
647
  z-index: 1001; /* Above content and backdrop */
634
648
  }
635
-
649
+
636
650
  /* No margin adjustments needed on mobile since sidebar overlays */
637
651
  .ihub-sidenav-container-left .ihub-sidenav-main,
638
652
  .ihub-sidenav-container-right .ihub-sidenav-main {
@@ -643,14 +657,16 @@
643
657
 
644
658
  @media (min-width: 769px) and (max-width: 1024px) {
645
659
  /* Tablet adjustments */
646
- .ihub-sidenav-container-left.ihub-sidenav-container-expanded .ihub-sidenav-main {
660
+ .ihub-sidenav-container-left.ihub-sidenav-container-expanded
661
+ .ihub-sidenav-main {
647
662
  margin-left: 200px; /* Slightly smaller on tablet */
648
663
  }
649
-
650
- .ihub-sidenav-container-right.ihub-sidenav-container-expanded .ihub-sidenav-main {
664
+
665
+ .ihub-sidenav-container-right.ihub-sidenav-container-expanded
666
+ .ihub-sidenav-main {
651
667
  margin-right: 200px;
652
668
  }
653
-
669
+
654
670
  .ihub-sidenav-expanded {
655
671
  width: 200px; /* Narrower sidebar on tablet */
656
672
  }
@@ -1,2 +1,2 @@
1
- import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useState as a}from"react";import t from"../forms/PasswordField.js";function o(){var o=a(""),i=r(o,2),d=i[0],l=i[1],n=a(""),m=r(n,2),u=m[0],c=m[1],p=function(r){var e=r.target.name,s=r.target.value;if("password"===e&&s.length<6?(r.target.style.borderColor="#EA5F5E",r.target.classList.add("ihub-is_invalid"),l("Password too short (it must be above 8 characters)!")):(r.target.style.borderColor="#69779B",r.target.classList.remove("ihub-is_invalid"),l("")),"password2"===e){var a=document.querySelector('[type="password"]');a&&a instanceof HTMLInputElement&&a.value!==s?(r.target.style.borderColor="#EA5F5E",r.target.classList.add("ihub-is_invalid"),c("Password does not match!")):(r.target.style.borderColor="#69779B",r.target.classList.remove("ihub-is_invalid"),c(""))}};return e("div",{children:[s(t,{label:"Password *",name:"password",required:!0,onChange:p,id:"password",error:d,helperText:"Password must be above 8 characters"}),s(t,{label:"Confirm Password *",name:"password2",required:!0,onChange:p,id:"password2",error:u,helperText:"Passwords must match"})]})}export{o as default};
1
+ import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as s,jsx as a}from"react/jsx-runtime";import{useState as e}from"react";import o from"../forms/PasswordField.js";function t(t){var l=t.defaultPassword,d=void 0===l?"":l,i=t.onPasswordChange,n=t.onConfirmPasswordChange,u=e(""),m=r(u,2),h=m[0],c=m[1],w=e(""),g=r(w,2),v=g[0],b=g[1],p=e(d),P=r(p,2),f=P[0],C=P[1],_=e(""),y=r(_,2),x=y[0],E=y[1],L=function(r){var s=r.target.name,a=r.target.value;"password"===s&&(C(a),a.length<8?(r.target.style.borderColor="#EA5F5E",r.target.classList.add("ihub-is_invalid"),c("Password too short (it must be above 8 characters)!"),null==i||i(a,!1)):(r.target.style.borderColor="#69779B",r.target.classList.remove("ihub-is_invalid"),c(""),null==i||i(a,!0)),x&&x!==a?(b("Password does not match!"),null==n||n(x,!1)):x&&x===a&&(b(""),null==n||n(x,!0))),"password2"===s&&(E(a),f!==a?(r.target.style.borderColor="#EA5F5E",r.target.classList.add("ihub-is_invalid"),b("Password does not match!"),null==n||n(a,!1)):(r.target.style.borderColor="#69779B",r.target.classList.remove("ihub-is_invalid"),b(""),null==n||n(a,!0)))};return s("div",{children:[a(o,{label:"Password",name:"password",required:!0,onChange:L,id:"password",error:h,helperText:"Password must be above 8 characters",value:f||d}),a(o,{label:"Confirm Password",name:"password2",required:!0,onChange:L,id:"password2",error:v,helperText:"Passwords must match",value:x||d})]})}export{t as default};
2
2
  //# sourceMappingURL=PasswordsMatch.js.map
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e,objectSpread2 as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as i,jsx as o}from"react/jsx-runtime";import{useState as a,useCallback as n}from"react";import{useDropzone as l}from"../../../node_modules/react-dropzone/dist/es/index.js";var c=function(c){var p,r=c.onDrop,s=c.label,d=c.acceptedTypes,m=c.maxSize,u=c.tmplateUrl,f=void 0===u?"https://github.com/instincthub/images/raw/main/leadcontact_upload_template.xlsx":u,x=c.multiple,v=void 0!==x&&x,h=c.className,g=void 0===h?"":h,w=a(""),b=e(w,2),j=b[0],D=b[1],z=n((function(e){var t=e[0];D(t.name),r(t)}),[r]),_=function(e){return{".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xls":"application/vnd.ms-excel",".csv":"text/csv",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".webp":"image/webp",".txt":"text/plain",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation"}[e.toLowerCase()]||"application/octet-stream"},N=l({onDropAccepted:z,accept:function(){if(!d||0===d.length)return{"application/vnd.ms-excel":[".xlsx",".xls"],"text/csv":[".csv"]};var e={};return d.forEach((function(t){var i=_(t);i&&(e[i]||(e[i]=[]),e[i].push(t))})),e}(),maxFiles:v?void 0:1,maxSize:m}),P=N.getRootProps,S=N.getInputProps,A=N.isDragActive;return i("div",{className:"ihub-dropzone ".concat(g),children:[i("div",t(t({},P()),{},{className:"ihub-dropzone-wrap",children:[o("input",t({},S())),o("p",A?{children:"Drop the files here ..."}:{children:s||(p=(null==d?void 0:d.join(", "))||".xlsx, .xls, .csv","Drag 'n' drop \"".concat(p,'" files here, or click to select files'))}),j&&i("p",{children:["File: ",j]})]})),!j&&f&&i("div",{className:"ihub-download-template",children:[o("p",{children:"PS: Existing contact will be update while new contacts will be created."}),o("a",{href:f,children:"Download Template"})]})]})};export{c as default};
1
+ import{slicedToArray as e,objectSpread2 as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as o,jsx as a}from"react/jsx-runtime";import{useState as i,useCallback as n}from"react";import{useDropzone as l}from"../../../node_modules/react-dropzone/dist/es/index.js";var p=function(p){var c,r=p.onDrop,s=p.label,d=p.acceptedTypes,m=p.maxSize,u=p.tmplateUrl,f=void 0===u?"https://github.com/instincthub/images/raw/main/leadcontact_upload_template.xlsx":u,x=p.onTemplateDownload,h=p.multiple,v=void 0!==h&&h,g=p.className,b=void 0===g?"":g,w=i(""),j=e(w,2),D=j[0],z=j[1],N=n((function(e){var t=e[0];z(t.name),r(t)}),[r]),T=function(e){return{".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xls":"application/vnd.ms-excel",".csv":"text/csv",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".webp":"image/webp",".txt":"text/plain",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation"}[e.toLowerCase()]||"application/octet-stream"},_=l({onDropAccepted:N,accept:function(){if(!d||0===d.length)return{"application/vnd.ms-excel":[".xlsx",".xls"],"text/csv":[".csv"]};var e={};return d.forEach((function(t){var o=T(t);o&&(e[o]||(e[o]=[]),e[o].push(t))})),e}(),maxFiles:v?void 0:1,maxSize:m}),P=_.getRootProps,S=_.getInputProps,y=_.isDragActive;return o("div",{className:"ihub-dropzone ".concat(b),children:[o("div",t(t({},P()),{},{className:"ihub-dropzone-wrap",children:[a("input",t({},S())),a("p",y?{children:"Drop the files here ..."}:{children:s||(c=(null==d?void 0:d.join(", "))||".xlsx, .xls, .csv","Drag 'n' drop \"".concat(c,'" files here, or click to select files'))}),D&&o("p",{children:["File: ",D]})]})),!D&&(x||f)&&o("div",{className:"ihub-download-template",children:[a("p",{children:"PS: Existing contact will be update while new contacts will be created."}),x?a("button",{type:"button",onClick:x,className:"ihub-template-download-btn",children:"Download Template"}):a("a",{href:f,children:"Download Template"})]})]})};export{p as default};
2
2
  //# sourceMappingURL=DropFile.js.map
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e,typeof as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as i,jsx as r,Fragment as a}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import l from"next/link";import c from"next/image";import s from"@mui/icons-material/LightMode";import u from"@mui/icons-material/DarkMode";var h=function(h){var d=h.session,m=h.logoSrc,b=h.logoAlt,v=void 0===b?"Company Logo":b,f=h.navLinks,p=h.userAreaLinks,g=void 0===p?[]:p,N=h.theme,w=void 0===N?"LightMode":N,k=h.containerClass,L=void 0===k?"ihub-container":k,E=h.topBanner,M=h.bottomBanner,x=h.hideTopBanner,_=void 0!==x&&x,D=h.hideBottomBanner,B=void 0!==D&&D,C=t(!1),S=e(C,2),y=S[0],A=S[1],j=t(!1),z=e(j,2),I=z[0],P=z[1],T=t(!1),U=e(T,2),H=U[0],W=U[1],Y=t(null),q=e(Y,2),F=q[0],G=q[1],J=t(null),K=e(J,2),O=K[0],Q=K[1],R=t(w),V=e(R,2),X=V[0],Z=V[1],$=d,ee=null==$?void 0:$.user,ne=function(){if(null==ee||!ee.name)return"";if("string"==typeof ee.name)return ee.name;if("object"===n(ee.name)){var e=ee.name;return e.full_name||"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email||""}return""}();o((function(){var e=function(){window.scrollY>50?P(!0):P(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]),o((function(){var e=localStorage.getItem("theme");e&&(Z(e),document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e))}),[]),o((function(){var e=function(e){var n=e.target;!y||n.closest(".ihub-navbar-elements")||n.closest(".ihub-hamburger")||A(!1),H&&!n.closest(".ihub-user-dropdown")&&(W(!1),Q(null)),null===F||n.closest(".ihub-nav-submenu-".concat(F))||G(null)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}),[y,H,F,O]),o((function(){var e=function(){window.innerWidth>768&&y&&A(!1)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[y]);return i("header",{className:"ihub-navbar ".concat(I?"ihub-navbar-scrolled":""," ").concat("DarkMode"===X?"ihub-navbar-dark":""),children:[E&&!_&&r("div",{className:"ihub-navbar-top-banner",children:E}),r("div",{className:L,children:i("nav",{className:"ihub-navbar-container",children:[r("div",{className:"ihub-navbar-logo",children:r(l,{href:"/",children:r(c,{src:m,alt:v,width:120,height:40,className:"ihub-logo-image"})})}),i("div",{className:"ihub-hamburger",onClick:function(){A(!y),G(null)},children:[r("div",{className:"ihub-hamburger-line ".concat(y?"ihub-active":"")}),r("div",{className:"ihub-hamburger-line ".concat(y?"ihub-active":"")}),r("div",{className:"ihub-hamburger-line ".concat(y?"ihub-active":"")})]}),i("div",{className:"ihub-navbar-elements ".concat(y?"ihub-active":""),children:[i("ul",{className:"ihub-nav-links",children:[f.map((function(e,n){return r("li",{className:"ihub-nav-item ihub-nav-submenu-".concat(n," ").concat(e.submenu?"ihub-has-submenu":""," ").concat(F===n?"ihub-submenu-active":""),children:e.submenu?i(a,{children:[i("a",{href:"#",onClick:function(e){return function(e,n){n.preventDefault(),G(F===e?null:e)}(n,e)},className:"ihub-submenu-toggle ".concat(e.highlight?"ihub-nav-highlight":""),children:[e.title,r("span",{className:"ihub-dropdown-arrow"})]}),F===n&&r("ul",{className:"ihub-submenu",children:e.submenu.map((function(e,n){return r("li",{className:"ihub-submenu-item",children:e.isExternal?i("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[e.icon&&r("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]}):i(l,{href:e.href,children:[e.icon&&r("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]})},n)}))})]}):r(a,{children:e.isExternal?r("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:e.highlight?"ihub-nav-highlight":"",children:e.title}):r(l,{href:e.href,className:e.highlight?"ihub-nav-highlight":"",children:e.title})})},n)})),r("li",{className:"ihub-nav-item",children:r("button",{onClick:function(){var e="LightMode"===X?"DarkMode":"LightMode";document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e),Z(e),localStorage.setItem("theme",e)},className:"ihub-theme-toggle","aria-label":"Switch to ".concat("LightMode"===X?"DarkMode":"LightMode"," mode"),children:r("LightMode"===X?u:s,{})})})]}),r("div",{className:"ihub-navbar-user-area",children:d?i("div",{className:"ihub-user-dropdown",children:[i("div",{className:"ihub-user-profile",onClick:function(){W(!H),Q(null)},children:[null!=ee&&ee.image?r(c,{src:ee.image,alt:"User",width:40,height:40,className:"ihub-user-avatar"}):r("div",{className:"ihub-user-initials",children:ne.charAt(0)||"U"}),i("span",{className:"ihub-user-name ihub-hide-sm",children:[ne,r("span",{className:"ihub-dropdown-arrow"})]})]}),H&&i("div",{className:"ihub-dropdown ihub-user-menu-dropdown",children:[g.map((function(e,n){return r("div",{className:"ihub-dropdown-item-wrapper",children:e.submenu?i("div",{className:"ihub-dropdown-with-submenu",children:[i("a",{href:"#",className:"ihub-dropdown-item ihub-dropdown-parent",onClick:function(e){return function(e,n){n.preventDefault(),n.stopPropagation(),Q(O===e?null:e)}(n,e)},target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&r("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title,r("span",{className:"ihub-submenu-caret ".concat(O===n?"ihub-active":"")})]}),O===n&&r("div",{className:"ihub-user-submenu",children:e.submenu.map((function(e,n){return i(l,{href:e.href,className:"ihub-dropdown-subitem",target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&r("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]},n)}))})]}):i(l,{href:e.href,className:"ihub-dropdown-item",children:[e.icon&&r("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]})},n)})),i(l,{href:"/api/auth/signout",className:"ihub-dropdown-item ihub-signout",children:[r("span",{className:"ihub-dropdown-icon",children:"⤴"}),"Sign out"]})]})]}):r("div",{className:"ihub-auth-buttons",children:g.map((function(e,n){return e.isButton?r(l,{href:e.href,className:"".concat("outline"===e.buttonStyle?"ihub-outlined-btn":"ihub-important-btn"),target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:e.title},n):r(l,{href:e.href,className:"ihub-auth-link",children:e.title},n)}))})})]})]})}),M&&!B&&r("div",{className:"ihub-navbar-bottom-banner",children:M})]})};export{h as default};
1
+ import{slicedToArray as e,typeof as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as i,jsx as r,Fragment as a}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import l from"next/link";import c from"next/image";import s from"@mui/icons-material/LightMode";import u from"@mui/icons-material/DarkMode";var h=function(h){var d=h.session,m=h.logoSrc,b=h.logoAlt,v=void 0===b?"Company Logo":b,p=h.navLinks,f=h.userAreaLinks,g=void 0===f?[]:f,N=h.theme,w=void 0===N?"LightMode":N,k=h.containerClass,L=void 0===k?"ihub-container":k,E=h.topBanner,M=h.bottomBanner,D=h.hideTopBanner,x=void 0!==D&&D,_=h.hideBottomBanner,B=void 0!==_&&_,C=h.userDropdownOpen,S=h.onUserDropdownToggle,y=h.renderUserDropdown,A=o(!1),U=e(A,2),j=U[0],T=U[1],z=o(!1),I=e(z,2),O=I[0],P=I[1],H=o(!1),W=e(H,2),Y=W[0],q=W[1],F=o(null),G=e(F,2),J=G[0],K=G[1],Q=o(null),R=e(Q,2),V=R[0],X=R[1],Z=o(w),$=e(Z,2),ee=$[0],ne=$[1],ie=void 0!==C,re=ie?C:Y,ae=d,oe=null==ae?void 0:ae.user,te=function(){if(null==oe||!oe.name)return"";if("string"==typeof oe.name)return oe.name;if("object"===n(oe.name)){var e=oe.name;return e.full_name||"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email||""}return""}();t((function(){var e=function(){window.scrollY>50?P(!0):P(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]),t((function(){var e=localStorage.getItem("theme");e&&(ne(e),document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e))}),[]),t((function(){var e=function(e){var n=e.target;!j||n.closest(".ihub-navbar-elements")||n.closest(".ihub-hamburger")||T(!1),re&&!n.closest(".ihub-user-dropdown")&&ce(),null===J||n.closest(".ihub-nav-submenu-".concat(J))||K(null)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}),[j,re,J,V]),t((function(){var e=function(){window.innerWidth>768&&j&&T(!1)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[j]);var le=function(){var e=!re;ie?null==S||S(e):q(e),X(null)},ce=function(){ie?null==S||S(!1):q(!1),X(null)};return i("header",{className:"ihub-navbar ".concat(O?"ihub-navbar-scrolled":""," ").concat("DarkMode"===ee?"ihub-navbar-dark":""),children:[E&&!x&&r("div",{className:"ihub-navbar-top-banner",children:E}),r("div",{className:L,children:i("nav",{className:"ihub-navbar-container",children:[r("div",{className:"ihub-navbar-logo",children:r(l,{href:"/",children:r(c,{src:m,alt:v,width:120,height:40,className:"ihub-logo-image"})})}),i("div",{className:"ihub-hamburger",onClick:function(){T(!j),K(null)},children:[r("div",{className:"ihub-hamburger-line ".concat(j?"ihub-active":"")}),r("div",{className:"ihub-hamburger-line ".concat(j?"ihub-active":"")}),r("div",{className:"ihub-hamburger-line ".concat(j?"ihub-active":"")})]}),i("div",{className:"ihub-navbar-elements ".concat(j?"ihub-active":""),children:[i("ul",{className:"ihub-nav-links",children:[p.map((function(e,n){return r("li",{className:"ihub-nav-item ihub-nav-submenu-".concat(n," ").concat(e.submenu?"ihub-has-submenu":""," ").concat(J===n?"ihub-submenu-active":""),children:e.submenu?i(a,{children:[i("a",{href:"#",onClick:function(e){return function(e,n){n.preventDefault(),K(J===e?null:e)}(n,e)},className:"ihub-submenu-toggle ".concat(e.highlight?"ihub-nav-highlight":""),children:[e.title,r("span",{className:"ihub-dropdown-arrow"})]}),J===n&&r("ul",{className:"ihub-submenu",children:e.submenu.map((function(e,n){return r("li",{className:"ihub-submenu-item",children:e.isExternal?i("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[e.icon&&r("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]}):i(l,{href:e.href,children:[e.icon&&r("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]})},n)}))})]}):r(a,{children:e.isExternal?r("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:e.highlight?"ihub-nav-highlight":"",children:e.title}):r(l,{href:e.href,className:e.highlight?"ihub-nav-highlight":"",children:e.title})})},n)})),r("li",{className:"ihub-nav-item",children:r("button",{onClick:function(){var e="LightMode"===ee?"DarkMode":"LightMode";document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e),ne(e),localStorage.setItem("theme",e)},className:"ihub-theme-toggle","aria-label":"Switch to ".concat("LightMode"===ee?"DarkMode":"LightMode"," mode"),children:r("LightMode"===ee?u:s,{})})})]}),r("div",{className:"ihub-navbar-user-area",children:d?i("div",{className:"ihub-user-dropdown",children:[i("div",{className:"ihub-user-profile",onClick:le,children:[null!=oe&&oe.image?r(c,{src:oe.image,alt:"User",width:40,height:40,className:"ihub-user-avatar"}):r("div",{className:"ihub-user-initials",children:te.charAt(0)||"U"}),i("span",{className:"ihub-user-name ihub-hide-sm",children:[te,r("span",{className:"ihub-dropdown-arrow"})]})]}),re&&r("div",{className:"ihub-dropdown ihub-user-menu-dropdown",children:y?y({user:oe,isOpen:re,toggleDropdown:le,closeDropdown:ce}):i(a,{children:[g.map((function(e,n){return r("div",{className:"ihub-dropdown-item-wrapper",children:e.submenu?i("div",{className:"ihub-dropdown-with-submenu",children:[i("a",{href:"#",className:"ihub-dropdown-item ihub-dropdown-parent",onClick:function(e){return function(e,n){n.preventDefault(),n.stopPropagation(),X(V===e?null:e)}(n,e)},target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&r("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title,r("span",{className:"ihub-submenu-caret ".concat(V===n?"ihub-active":"")})]}),V===n&&r("div",{className:"ihub-user-submenu",children:e.submenu.map((function(e,n){return i(l,{href:e.href,className:"ihub-dropdown-subitem",target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&r("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]},n)}))})]}):i(l,{href:e.href,className:"ihub-dropdown-item",children:[e.icon&&r("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]})},n)})),i(l,{href:"/api/auth/signout",className:"ihub-dropdown-item ihub-signout",children:[r("span",{className:"ihub-dropdown-icon",children:"⤴"}),"Sign out"]})]})})]}):r("div",{className:"ihub-auth-buttons",children:g.map((function(e,n){return e.isButton?r(l,{href:e.href,className:"".concat("outline"===e.buttonStyle?"ihub-outlined-btn":"ihub-important-btn"),target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:e.title},n):r(l,{href:e.href,className:"ihub-auth-link",children:e.title},n)}))})})]})]})}),M&&!B&&r("div",{className:"ihub-navbar-bottom-banner",children:M})]})};export{h as default};
2
2
  //# sourceMappingURL=ResponsiveNavbar.js.map
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e,asyncToGenerator as i,regeneratorRuntime as l}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useState as s,useCallback as o,useEffect as c}from"react";import{useSession as n}from"../../../node_modules/next-auth/react.js";import a from"./CopyToClipBoard.js";import{reqOptions as u}from"../lib/helpFunction.js";import{useDispatch as d,useSelector as m}from"../lib/redux/store.js";import"../lib/redux/slices/courseSlice/courseFilterSubject.js";import"../lib/redux/slices/courseSlice/courseFilterLevel.js";import"../lib/redux/slices/courseSlice/courseFilterDuration.js";import"../lib/redux/slices/courseSlice/courseSearch.js";import"../lib/redux/slices/courseSlice/stepQuestions.js";import"../lib/redux/slices/courseSlice/stepContent.js";import"../lib/redux/slices/courseSlice/videoTimestamp.js";import"../lib/redux/slices/courseSlice/videoTimestampObject.js";import"../lib/redux/slices/courseSlice/courseModules.js";import"../lib/redux/slices/courseSlice/courseOverview.js";import"../lib/redux/slices/courseSlice/selectedCourses.js";import"../lib/redux/slices/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import{confirmDelete as p}from"../lib/redux/slices/navigationSlice/confirmDelete.js";import{selectConfirmDelete as b}from"../lib/redux/slices/navigationSlice/selectors.js";import"../lib/redux/slices/navigationSlice/IPAdress.js";import"../lib/redux/slices/navigationSlice/settingsToggle.js";import"../lib/redux/slices/navigationSlice/userLocation.js";import"../lib/redux/slices/navigationSlice/searchValue.js";import"../lib/redux/slices/navigationSlice/currentPromo.js";import"../lib/redux/slices/navigationSlice/courseNextStep.js";import"../lib/redux/slices/channelSlice/activeChannel.js";import"../lib/redux/slices/channelSlice/channelDetails.js";import"../lib/redux/slices/channelSlice/instructorChannelList.js";import"../lib/redux/slices/channelSlice/channelHandle.js";import"../lib/redux/slices/generics/objectSlice.js";import"../lib/redux/slices/generics/arraySlice.js";import"../lib/redux/slices/messageSlice/feedbackToggle.js";import"../lib/redux/slices/messageSlice/statusMessageState.js";import"../lib/redux/slices/utilsSlice/screenSize.js";import"../lib/redux/slices/authSlice/channelCallbackUrl.js";var h=function(h){var g=s(""),x=e(g,2),j=x[0],S=x[1],f=d(),v=m(b),y=v.url,C=v.title,T=function(t,r,c){var a=n().data,d=s("idle"),m=e(d,2),p=m[0],b=m[1],h=s(null),g=e(h,2),x=g[0],j=g[1],S=a;return{deleteItem:o(i(l().mark((function e(){var i,r,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return b("loading"),j(null),i=null==S?void 0:S.accessToken,r=u("DELETE",null,i),e.prev=6,e.next=9,fetch(t,r);case 9:204===(s=e.sent).status?(b("success"),c()):401===s.status?(b("error"),j("You don't have permission to delete this item.")):(b("error"),j("Couldn't delete the item. Please try again or report the issue.")),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(6),b("error"),j("Network error. Please check your connection and try again.");case 17:case"end":return e.stop()}}),e,null,[[6,13]])}))),[t,S,c]),status:p,error:x}}(y,0,o((function(){f(p.actions.set({deleteStatus:204,title:C}))}),[f,C])),N=T.deleteItem,k=T.status,D=T.error,P=o((function(){f(p.actions.set({}))}),[f]),w=j===C;return c((function(){S("")}),[C]),y?t("div",{className:"ihub-modal",onClick:P,role:"dialog","aria-labelledby":"delete-modal-title","aria-describedby":"delete-modal-description",children:t("div",{className:"ihub-modal-content",onClick:function(e){return e.stopPropagation()},children:r("div",{className:"ihub-delete-modal",children:[r("h4",{id:"delete-modal-title",children:["Delete ",C,"?"]}),t("p",{className:"ihub-delete-warning",id:"delete-modal-description",children:"Warning: This action cannot be undone!"}),r("p",{children:["This will permanently delete the"," ",t("strong",{children:h.itemTitle||C})," repository, including all associated data, feedbacks, schedules, and team associations."]}),r("form",{onSubmit:function(e){e.preventDefault(),w&&N()},children:[r("div",{className:"ihub-delete-confirmation",children:[r("p",{children:["Please type ",t("strong",{children:C})," to confirm deletion."]}),t(a,{text:C||""})]}),r("div",{className:"ihub-form-input",children:[t("input",{type:"text",value:j,onChange:function(e){return S(e.target.value)},className:"ihub-delete-input",placeholder:"Type to confirm","aria-describedby":"confirmation-helper",autoComplete:"off",autoFocus:!0}),t("small",{id:"confirmation-helper",className:"ihub-helper-text",children:"Type the exact name to enable deletion"})]}),D&&t("p",{className:"ihub-delete-message",role:"alert",children:D}),r("div",{className:"ihub-delete-actions",children:[t("button",{type:"submit",disabled:!w||"loading"===k,className:"ihub-danger-btn","aria-busy":"loading"===k,children:"loading"===k?"Deleting...":"Delete"}),t("button",{type:"button",onClick:P,className:"ihub-outlined-btn",children:"Cancel"})]})]})]})})}):null};export{h as default};
1
+ import{objectWithoutProperties as e,slicedToArray as i,asyncToGenerator as t,regeneratorRuntime as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as l,jsxs as s}from"react/jsx-runtime";import{useState as o,useCallback as c,useEffect as n}from"react";import{useSession as a}from"../../../node_modules/next-auth/react.js";import u from"./CopyToClipBoard.js";import{reqOptions as d}from"../lib/helpFunction.js";import{useDispatch as m,useSelector as p}from"../lib/redux/store.js";import"../lib/redux/slices/courseSlice/courseFilterSubject.js";import"../lib/redux/slices/courseSlice/courseFilterLevel.js";import"../lib/redux/slices/courseSlice/courseFilterDuration.js";import"../lib/redux/slices/courseSlice/courseSearch.js";import"../lib/redux/slices/courseSlice/stepQuestions.js";import"../lib/redux/slices/courseSlice/stepContent.js";import"../lib/redux/slices/courseSlice/videoTimestamp.js";import"../lib/redux/slices/courseSlice/videoTimestampObject.js";import"../lib/redux/slices/courseSlice/courseModules.js";import"../lib/redux/slices/courseSlice/courseOverview.js";import"../lib/redux/slices/courseSlice/selectedCourses.js";import"../lib/redux/slices/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import{confirmDelete as b}from"../lib/redux/slices/navigationSlice/confirmDelete.js";import{selectConfirmDelete as h}from"../lib/redux/slices/navigationSlice/selectors.js";import"../lib/redux/slices/navigationSlice/IPAdress.js";import"../lib/redux/slices/navigationSlice/settingsToggle.js";import"../lib/redux/slices/navigationSlice/userLocation.js";import"../lib/redux/slices/navigationSlice/searchValue.js";import"../lib/redux/slices/navigationSlice/currentPromo.js";import"../lib/redux/slices/navigationSlice/courseNextStep.js";import"../lib/redux/slices/channelSlice/activeChannel.js";import"../lib/redux/slices/channelSlice/channelDetails.js";import"../lib/redux/slices/channelSlice/instructorChannelList.js";import"../lib/redux/slices/channelSlice/channelHandle.js";import"../lib/redux/slices/generics/objectSlice.js";import"../lib/redux/slices/generics/arraySlice.js";import"../lib/redux/slices/messageSlice/feedbackToggle.js";import"../lib/redux/slices/messageSlice/statusMessageState.js";import"../lib/redux/slices/utilsSlice/screenSize.js";import"../lib/redux/slices/authSlice/channelCallbackUrl.js";var g=["token"],x=function(x){var j=x.token,S=e(x,g),f=o(""),v=i(f,2),y=v[0],C=v[1],N=m(),T=p(h),k=T.url,D=T.title,P=function(e,l,s,n){var u=a().data,m=o("idle"),p=i(m,2),b=p[0],h=p[1],g=o(null),x=i(g,2),j=x[0],S=x[1],f=u;return{deleteItem:c(t(r().mark((function i(){var t,l;return r().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(e){i.next=2;break}return i.abrupt("return");case 2:return h("loading"),S(null),t=d("DELETE",null,s),i.prev=5,i.next=8,fetch(e,t);case 8:204===(l=i.sent).status?(h("success"),n()):401===l.status?(h("error"),S("You don't have permission to delete this item.")):(h("error"),S("Couldn't delete the item. Please try again or report the issue.")),i.next=16;break;case 12:i.prev=12,i.t0=i.catch(5),h("error"),S("Network error. Please check your connection and try again.");case 16:case"end":return i.stop()}}),i,null,[[5,12]])}))),[e,f,n]),status:b,error:j}}(k,0,j,c((function(){N(b.actions.set({deleteStatus:204,title:D}))}),[N,D])),w=P.deleteItem,F=P.status,L=P.error,E=c((function(){N(b.actions.set({}))}),[N]),I=y===D;return n((function(){C("")}),[D]),k?l("div",{className:"ihub-modal",onClick:E,role:"dialog","aria-labelledby":"delete-modal-title","aria-describedby":"delete-modal-description",children:l("div",{className:"ihub-modal-content",onClick:function(e){return e.stopPropagation()},children:s("div",{className:"ihub-delete-modal",children:[s("h4",{id:"delete-modal-title",children:["Delete ",D,"?"]}),l("p",{className:"ihub-delete-warning",id:"delete-modal-description",children:"Warning: This action cannot be undone!"}),s("p",{children:["This will permanently delete the"," ",l("strong",{children:S.itemTitle||D})," repository, including all associated data, feedbacks, schedules, and team associations."]}),s("form",{onSubmit:function(e){e.preventDefault(),I&&w()},children:[s("div",{className:"ihub-delete-confirmation",children:[s("p",{children:["Please type ",l("strong",{children:D})," to confirm deletion."]}),l(u,{text:D||""})]}),s("div",{className:"ihub-form-input",children:[l("input",{type:"text",value:y,onChange:function(e){return C(e.target.value)},className:"ihub-delete-input",placeholder:"Type to confirm","aria-describedby":"confirmation-helper",autoComplete:"off",autoFocus:!0}),l("small",{id:"confirmation-helper",className:"ihub-helper-text",children:"Type the exact name to enable deletion"})]}),L&&l("p",{className:"ihub-delete-message",role:"alert",children:L}),s("div",{className:"ihub-delete-actions",children:[l("button",{type:"submit",disabled:!I||"loading"===F,className:"ihub-danger-btn","aria-busy":"loading"===F,children:"loading"===F?"Deleting...":"Delete"}),l("button",{type:"button",onClick:E,className:"ihub-outlined-btn",children:"Cancel"})]})]})]})})}):null};export{x as default};
2
2
  //# sourceMappingURL=DeleteConfirmationModal.js.map