@instincthub/react-ui 0.0.5 → 0.0.6
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/README.md +4 -3
- package/dist/src/assets/css/bootstrap/display.css +21 -0
- package/dist/src/assets/css/bootstrap/readme/display.md +20 -0
- package/dist/src/assets/css/forms/input-fields.css +3 -2
- package/dist/src/assets/css/main.css +3 -3
- package/dist/src/assets/css/modals/modal-updates.css +6 -3
- package/dist/src/assets/css/modals/modal.css +1 -1
- package/dist/src/assets/css/navbar/sidenav.css +8 -0
- package/dist/src/assets/css/ui/content-viewer.css +1 -0
- package/dist/src/assets/css/ui/create-button.css +140 -0
- package/dist/src/assets/css/ui/pagination.css +359 -0
- package/dist/src/assets/css/ui/ui-index.css +2 -0
- package/dist/src/components/auth/LoginForm.js +1 -1
- package/dist/src/components/auth/ReactClientProviders.js +1 -1
- package/dist/src/components/forms/CheckBoxes.js +2 -0
- package/dist/src/components/forms/CheckBoxes.js.map +1 -0
- package/dist/src/components/forms/ChipsInput.js +1 -1
- package/dist/src/components/forms/FileField.js +2 -0
- package/dist/src/components/forms/FileField.js.map +1 -0
- package/dist/src/components/forms/FilterArray.js +1 -1
- package/dist/src/components/forms/FilterObjects.js +1 -1
- package/dist/src/components/forms/SearchField.js +1 -1
- package/dist/src/components/forms/SearchObjectsFromDB.js +1 -1
- package/dist/src/components/forms/TextArea.js +1 -1
- package/dist/src/components/forms/TextArea.js.map +1 -1
- package/dist/src/components/lib/auth/actions.js +1 -1
- package/dist/src/components/lib/auth/dbRequestst.js +1 -1
- package/dist/src/components/lib/auth/dbRequestst.js.map +1 -1
- package/dist/src/components/lib/convertArrayToObject.js +2 -0
- package/dist/src/components/lib/convertArrayToObject.js.map +1 -0
- package/dist/src/components/lib/createSubscription.js +2 -0
- package/dist/src/components/lib/createSubscription.js.map +1 -0
- package/dist/src/components/lib/elementIsVisibleInViewport.js +2 -0
- package/dist/src/components/lib/elementIsVisibleInViewport.js.map +1 -0
- package/dist/src/components/lib/fileToBase64.js +2 -0
- package/dist/src/components/lib/fileToBase64.js.map +1 -0
- package/dist/src/components/lib/formError.js +2 -0
- package/dist/src/components/lib/formError.js.map +1 -0
- package/dist/src/components/lib/getPriceObjects.js +2 -0
- package/dist/src/components/lib/getPriceObjects.js.map +1 -0
- package/dist/src/components/lib/helpFunction.js +1 -1
- package/dist/src/components/lib/helpFunction.js.map +1 -1
- package/dist/src/components/lib/index.js +1 -1
- package/dist/src/components/lib/index.js.map +1 -1
- package/dist/src/components/lib/modals/modals.js +1 -1
- package/dist/src/components/lib/modals/modals.js.map +1 -1
- package/dist/src/components/lib/paystack.js.map +1 -1
- package/dist/src/components/lib/permissions.js +1 -1
- package/dist/src/components/lib/permissions.js.map +1 -1
- package/dist/src/components/lib/redux/index.js +1 -1
- package/dist/src/components/lib/redux/rootReducer.js +1 -1
- package/dist/src/components/lib/redux/rootReducer.js.map +1 -1
- package/dist/src/components/lib/redux/slices/authSlice/selectors.js +2 -0
- package/dist/src/components/lib/redux/slices/authSlice/selectors.js.map +1 -0
- package/dist/src/components/lib/redux/slices/generics/arraySlice.js +2 -0
- package/dist/src/components/lib/redux/slices/generics/arraySlice.js.map +1 -0
- package/dist/src/components/lib/redux/slices/generics/objectSlice.js +2 -0
- package/dist/src/components/lib/redux/slices/generics/objectSlice.js.map +1 -0
- package/dist/src/components/lib/redux/slices/generics/selectors.js +2 -0
- package/dist/src/components/lib/redux/slices/generics/selectors.js.map +1 -0
- package/dist/src/components/navbar/ChannelListAvatar.js +1 -1
- package/dist/src/components/navbar/SideNavbar.js +1 -1
- package/dist/src/components/status/DeleteConfirmationModal.js +1 -1
- package/dist/src/components/status/ModalExamples.js +1 -1
- package/dist/src/components/status/MultiPurposeModal.js +1 -1
- package/dist/src/components/status/ReactTimeTracker.js +1 -1
- package/dist/src/components/ui/ComponentLists.js +2 -0
- package/dist/src/components/ui/ComponentLists.js.map +1 -0
- package/dist/src/components/ui/create-button/CreateButton.js +2 -0
- package/dist/src/components/ui/create-button/CreateButton.js.map +1 -0
- package/dist/src/components/ui/create-button/CreateButtonExample.js +2 -0
- package/dist/src/components/ui/create-button/CreateButtonExample.js.map +1 -0
- package/dist/src/components/ui/editor/CustomTextEditor.js +1 -1
- package/dist/src/components/ui/pagination/Pagination.js +2 -0
- package/dist/src/components/ui/pagination/Pagination.js.map +1 -0
- package/dist/src/components/ui/pagination/PaginationDemo.js +2 -0
- package/dist/src/components/ui/pagination/PaginationDemo.js.map +1 -0
- package/dist/src/components/ui/tables/IHubTableServer.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/types/components/auth/LoginForm.d.ts +3 -1
- package/dist/src/types/components/auth/index.d.ts +5 -0
- package/dist/src/types/components/forms/CheckBoxes.d.ts +33 -6
- package/dist/src/types/components/forms/CheckboxesField.d.ts +24 -1
- package/dist/src/types/components/forms/FileField.d.ts +8 -4
- package/dist/src/types/components/forms/FilterArray.d.ts +12 -2
- package/dist/src/types/components/forms/FilterObjects.d.ts +11 -3
- package/dist/src/types/components/forms/SearchField.d.ts +16 -0
- package/dist/src/types/components/forms/TextArea.d.ts +12 -0
- package/dist/src/types/components/forms/index.d.ts +49 -0
- package/dist/src/types/components/lib/auth/dbRequestst.d.ts +2 -0
- package/dist/src/types/components/lib/convertArrayToObject.d.ts +30 -0
- package/dist/src/types/components/lib/helpFunction.d.ts +4 -0
- package/dist/src/types/components/lib/index.d.ts +6 -6
- package/dist/src/types/components/lib/modals/modals.d.ts +2 -1
- package/dist/src/types/components/lib/permissions.d.ts +12 -1
- package/dist/src/types/components/lib/redux/rootReducer.d.ts +2 -0
- package/dist/src/types/components/lib/redux/slices/generics/arraySlice.d.ts +20 -0
- package/dist/src/types/components/lib/redux/slices/generics/index.d.ts +2 -0
- package/dist/src/types/components/lib/redux/slices/generics/objectSlice.d.ts +12 -0
- package/dist/src/types/components/lib/redux/slices/generics/selectors.d.ts +3 -0
- package/dist/src/types/components/lib/redux/slices/index.d.ts +2 -0
- package/dist/src/types/components/lib/redux/slices/selectors.d.ts +5 -0
- package/dist/src/types/components/lib/redux/store.d.ts +6 -0
- package/dist/src/types/components/navbar/index.d.ts +5 -0
- package/dist/src/types/components/status/MultiPurposeModal.d.ts +27 -10
- package/dist/src/types/components/status/index.d.ts +11 -0
- package/dist/src/types/components/tabs/index.d.ts +3 -0
- package/dist/src/types/components/theme/index.d.ts +6 -0
- package/dist/src/types/components/ui/create-button/CreateButton.d.ts +54 -0
- package/dist/src/types/components/ui/create-button/CreateButtonExample.d.ts +3 -0
- package/dist/src/types/components/ui/editor/CustomTextEditor.d.ts +7 -3
- package/dist/src/types/components/ui/index.d.ts +16 -0
- package/dist/src/types/components/ui/pagination/Pagination.d.ts +8 -0
- package/dist/src/types/components/ui/pagination/PaginationDemo.d.ts +3 -0
- package/dist/src/types/index.d.ts +9 -3
- package/dist/src/types/types/index.d.ts +37 -5
- package/dist/src/types/types/navbar.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -2
- package/dist/src/components/ComponentLists.js +0 -2
- package/dist/src/components/ComponentLists.js.map +0 -1
- /package/dist/src/types/components/{ComponentLists.d.ts → ui/ComponentLists.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{objectSpread2 as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import{createSlice as t}from"@reduxjs/toolkit";var a=t({name:"object",initialState:{value:{},status:"idle"},reducers:{setObject:function(e,t){e.value=t.payload},updateObject:function(t,a){t.value=e(e({},t.value),a.payload)},clearObject:function(e){e.value={}}}}),l=a.actions,o=l.setObject,u=l.updateObject,c=l.clearObject;export{c as clearObject,a as objectSlice,o as setObject,u as updateObject};
|
|
2
|
+
//# sourceMappingURL=objectSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectSlice.js","sources":["../../../../../../../src/components/lib/redux/slices/generics/objectSlice.ts"],"sourcesContent":["import { createSlice, type PayloadAction } from \"@reduxjs/toolkit\";\r\n\r\ninterface ObjectState {\r\n value: Record<string, any>;\r\n status: \"idle\" | \"loading\" | \"failed\";\r\n}\r\n\r\nconst initialState: ObjectState = {\r\n value: {},\r\n status: \"idle\",\r\n};\r\n\r\nexport const objectSlice = createSlice({\r\n name: \"object\",\r\n initialState,\r\n reducers: {\r\n setObject(state, action: PayloadAction<Record<string, any>>) {\r\n state.value = action.payload;\r\n },\r\n updateObject(state, action: PayloadAction<Partial<Record<string, any>>>) {\r\n state.value = { ...state.value, ...action.payload };\r\n },\r\n clearObject(state) {\r\n state.value = {};\r\n },\r\n },\r\n});\r\n\r\nexport const { setObject, updateObject, clearObject } = objectSlice.actions;\r\nexport type { ObjectState };\r\n"],"names":["objectSlice","createSlice","name","initialState","value","status","reducers","setObject","state","action","payload","updateObject","_objectSpread","clearObject","_objectSlice$actions","actions"],"mappings":"uIAOA,IAKaA,EAAcC,EAAY,CACrCC,KAAM,SACNC,aAPgC,CAChCC,MAAO,CAAE,EACTC,OAAQ,QAMRC,SAAU,CACRC,mBAAUC,EAAOC,GACfD,EAAMJ,MAAQK,EAAOC,OACtB,EACDC,sBAAaH,EAAOC,GAClBD,EAAMJ,MAAKQ,EAAAA,EAAA,CAAA,EAAQJ,EAAMJ,OAAUK,EAAOC,QAC3C,EACDG,YAAAA,SAAYL,GACVA,EAAMJ,MAAQ,EAChB,KAIGU,EAAiDd,EAAYe,QAArDR,EAASO,EAATP,UAAWI,EAAYG,EAAZH,aAAcE,EAAWC,EAAXD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.js","sources":["../../../../../../../src/components/lib/redux/slices/generics/selectors.ts"],"sourcesContent":["/* Instruments */\r\nimport { ReduxState } from \"../../store\";\r\n\r\nexport const selectObjectSlice = (state: ReduxState) => state.objectSlice.value;\r\nexport const selectArraySlice = (state: ReduxState) => state.arraySlice.value;\r\n"],"names":["selectObjectSlice","state","objectSlice","value","selectArraySlice","arraySlice"],"mappings":"IAGaA,EAAoB,SAACC,GAAiB,OAAKA,EAAMC,YAAYC,KAAK,EAClEC,EAAmB,SAACH,GAAiB,OAAKA,EAAMI,WAAWF,KAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as l,jsx as a}from"react/jsx-runtime";import{useState as e,useEffect as i}from"react";import{
|
|
1
|
+
import{slicedToArray as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as l,jsx as a}from"react/jsx-runtime";import{useState as e,useEffect as i}from"react";import{reqOptions as r,fetchAPI as c,API_HOST_URL as o}from"../lib/helpFunction.js";import"../lib/utils.js";import{useSession as t}from"next-auth/react";import{useRouter as u,usePathname as m,useParams as s}from"next/navigation";function d(d){var h,v,p,f,b,N=d.className,w=void 0===N?"":N,g=d.apiPath,_=void 0===g?"channels/instructor-channel/list/":g,j=u(),x=m(),A=s().channel||"",C=t(),T=C.data;C.update;var k=null==T?void 0:T.user,y=null==k||null===(h=k.name)||void 0===h?void 0:h.token,P=null==k||null===(v=k.name)||void 0===v?void 0:v.channels,B=null==P||null===(p=P.active)||void 0===p?void 0:p.channel,E=null==B?void 0:B.username,F=e({}),G=n(F,2),H=G[0],q=G[1],z=e({result:[]}),D=n(z,2),I=D[0],J=D[1];i((function(){if(y){var n="".concat(o).concat(_),l=r("GET",null,y);c(q,n,l,!0)}}),[y]),i((function(){var n=null==I?void 0:I.username;if(E&&n&&E===n){var l=window.location.origin,a=window.location.href.replace(l,"").replace(A,n);j.replace(a)}}),[E,I,A,j,x]),i((function(){(null==I?void 0:I.username)===A&&(window.location.reload(),J({}))}),[A,I]);return l("div",{className:"".concat(w," commentator ihub-channel-list-avatar"),children:[l("div",{className:"item nameTruce",children:[null!=B&&B.thumbnail?a("img",{src:B.thumbnail.split("?")[0],alt:B.name||"Channel thumbnail"}):a("p",{className:"char_avatar",children:(null==B||null===(f=B.name)||void 0===f?void 0:f.charAt(0))||"?"}),l("div",{className:"name",children:[a("h3",{children:null==B?void 0:B.name}),l("p",{children:["@",null==B?void 0:B.username]})]})]}),null==H||null===(b=H.results)||void 0===b?void 0:b.map((function(n,e){var i,r;return n.channel.username!==E&&l("ul",{className:"item ff_layer",onClick:function(){return l=n.channel,a=x.replace(A,"".concat(l.username)),void j.push(a);var l,a},children:[null!==(i=n.channel)&&void 0!==i&&i.thumbnail?a("img",{src:n.channel.thumbnail.split("?")[0],alt:n.channel.name||"Channel thumbnail"}):a("p",{className:"char_avatar",children:(null===(r=n.channel.name)||void 0===r?void 0:r.charAt(0))||"?"}),l("div",{className:"name",children:[a("h3",{children:n.channel.name}),l("p",{children:["@",n.channel.username]})]})]},e)}))]})}export{d as default};
|
|
2
2
|
//# sourceMappingURL=ChannelListAvatar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e,objectSpread2 as i,createForOfIteratorHelper as n,toConsumableArray as a}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as r,Fragment as d}from"react/jsx-runtime";import c,{useState as s,useEffect as o,useCallback as l,useRef as u}from"react";import h from"next/link";import v from"next/image";import b from"@mui/icons-material/ChevronLeft";import m from"@mui/icons-material/ChevronRight";import f from"../auth/ClientOnly.js";var p=function(p){var g,N=p.items,w=p.defaultExpanded,x=void 0===w||w,y=p.isExpanded,k=p.onExpandedChange,C=p.position,E=void 0===C?"left":C,D=p.variant,S=void 0===D?"default":D,L=p.expandedWidth,z=void 0===L?240:L,A=p.collapsedWidth,I=void 0===A?64:A,M=p.animation,W=void 0===M?"slide":M,j=p.logo,T=p.footer,B=p.className,F=void 0===B?"":B,K=p.darkMode,U=void 0!==K&&K,X=p.positioning,O=p.resizable,_=void 0!==O&&O,G=p.maxWidth,H=void 0===G?400:G,P=p.minWidth,R=void 0===P?180:P,q=p.onNavigate,J=p.autoCollapseOnMobile,Q=void 0===J||J,V=p.showBackdrop,Y=void 0===V||V,Z=p.onBackdropClick,$=p.enableTouchGestures,ee=void 0===$||$,ie=p.persistState,ne=void 0===ie||ie,ae=p.persistStateKey,te=void 0===ae?"ihub-sidenav-expanded":ae,re=p.lazyRender,de=void 0!==re&&re,ce=p.renderItem,se=p.tooltip,oe=p.toggleShortcut,le=p.contentContainerClassName,ue=void 0===le?"":le,he=p.children,ve=void 0!==y,be=s(x),me=e(be,2),fe=me[0],pe=me[1];o((function(){if(ve)pe(y);else if(ne&&"undefined"!=typeof window){var e=localStorage.getItem(te);null!==e&&pe("true"===e)}}),[ve,y,ne,te]),o((function(){ve&&pe(y)}),[ve,y]);var ge=function(){return ve?y:fe},Ne=function(e){ve||(pe(e),ne&&"undefined"!=typeof window&&localStorage.setItem(te,String(e))),null==k||k(e)},we=function(){return Ne(!ge())},xe=s(null),ye=e(xe,2),ke=ye[0],Ce=ye[1],Ee=s(new Set),De=e(Ee,2),Se=De[0],Le=De[1];o((function(){var e=new Set,i=function(n){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.forEach((function(n){if("group"===n.type){var t=n;(t.defaultExpanded||a||t.children.some((function(e){return"isActive"in e&&e.isActive||"group"===e.type&&e.defaultExpanded})))&&(e.add(n.id),i(t.children,!0))}}))};i(N),Le(e)}),[N]),o((function(){var e=function(i){var t,r=n(i);try{var d,c=function(){var i=t.value;if("isActive"in i&&i.isActive)return{v:i.id};if("group"===i.type){var n=e(i.children);if(n)return Le((function(e){return new Set([].concat(a(e),[i.id]))})),{v:n}}};for(r.s();!(t=r.n()).done;)if(d=c())return d.v}catch(e){r.e(e)}finally{r.f()}return null},i=e(N);i&&Ce(i)}),[N]);var ze=l((function(e,i){"button"===e.type&&e.onClick(i),Ce(e.id),null==q||q(e,i),Q&&window.innerWidth<=768&&Ne(!1)}),[q,Q,Ne]),Ae=s(!1),Ie=e(Ae,2),Me=Ie[0],We=Ie[1];o((function(){var e=function(){We(window.innerWidth<=768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),o((function(){if(oe){var e=function(e){var i=oe.toLowerCase().split("+"),n=i.filter((function(e){return["ctrl","alt","shift","meta"].includes(e)})),a=i.find((function(e){return!["ctrl","alt","shift","meta"].includes(e)}));a&&e.key.toLowerCase()===a&&n.every((function(i){switch(i){case"ctrl":return e.ctrlKey;case"alt":return e.altKey;case"shift":return e.shiftKey;case"meta":return e.metaKey;default:return!1}}))&&(e.preventDefault(),we())};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}}),[oe,we]);var je=s(ge()?z:I),Te=e(je,2),Be=Te[0],Fe=Te[1],Ke=u(!1),Ue=u(null);o((function(){Fe(ge()?z:I)}),[ge,z,I]);var Xe=u(null),Oe=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ce)return ce(e,i);switch(e.type){case"link":return _e(e,i);case"group":return Ge(e,i);case"button":return He(e,i);case"divider":return Pe(e);default:return null}},_e=function(e,i){if(e.hasAccess&&!e.hasAccess())return null;var n=e.id===ke,a=i>0?"ihub-sidenav-indent-".concat(i):"",c=t(d,{children:[e.icon&&r("span",{className:"ihub-sidenav-icon",children:"string"==typeof e.icon?r(v,{src:e.icon,alt:"",width:24,height:24}):e.icon}),r("span",{className:"ihub-sidenav-text ".concat(ge()?"":"ihub-sidenav-text-hidden"),children:e.title}),e.badge&&r("span",{className:"ihub-sidenav-badge ihub-sidenav-badge-".concat(e.badge.variant||"default"),children:e.badge.content})]});return e.isExternal?r("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"ihub-sidenav-item ihub-sidenav-link ".concat(a," ").concat(n?"ihub-sidenav-active":""," ").concat(e.isDisabled?"ihub-sidenav-disabled":""," ").concat(e.className||""),onClick:function(i){return!e.isDisabled&&ze(e,i)},"data-tooltip":!ge()&&null!=se&&se.enabled?e.title:void 0,"aria-disabled":e.isDisabled,children:c}):r(h,{href:e.href,className:"ihub-sidenav-item ihub-sidenav-link ".concat(a," ").concat(n?"ihub-sidenav-active":""," ").concat(e.isDisabled?"ihub-sidenav-disabled":""," ").concat(e.className||""),onClick:function(i){return!e.isDisabled&&ze(e,i)},"data-tooltip":!ge()&&null!=se&&se.enabled?e.title:void 0,"aria-disabled":e.isDisabled,children:c})},Ge=function(e,i){var n=Se.has(e.id),a=e.children.some((function(e){return e.id===ke||"group"===e.type&&e.children.some((function(e){return e.id===ke}))})),d=i>0?"ihub-sidenav-indent-".concat(i):"";return e.hideGroupTitle?r("div",{className:"ihub-sidenav-group ".concat(e.className||""),children:e.children.map((function(e,n){return r(c.Fragment,{children:Oe(e,i)},e.id||"group-child-".concat(n))}))}):t("div",{className:"ihub-sidenav-group ".concat(e.className||""," ").concat(a?"ihub-sidenav-group-active":""),children:[t("div",{className:"ihub-sidenav-item ihub-sidenav-group-header ".concat(d," ").concat(e.isDisabled?"ihub-sidenav-disabled":""),onClick:function(){return!e.isDisabled&&(i=e.id,void Le((function(e){var n=new Set(e);return n.has(i)?n.delete(i):n.add(i),n})));var i},"data-tooltip":!ge()&&null!=se&&se.enabled?e.title:void 0,"aria-disabled":e.isDisabled,"aria-expanded":n,children:[e.icon&&r("span",{className:"ihub-sidenav-icon",children:"string"==typeof e.icon?r(v,{src:e.icon,alt:"",width:24,height:24}):e.icon}),r("span",{className:"ihub-sidenav-text ".concat(ge()?"":"ihub-sidenav-text-hidden"),children:e.title}),e.badge&&r("span",{className:"ihub-sidenav-badge ihub-sidenav-badge-".concat(e.badge.variant||"default"),children:e.badge.content}),r("span",{className:"ihub-sidenav-arrow ".concat(n?"ihub-sidenav-arrow-expanded":""," ").concat(ge()?"":"ihub-sidenav-arrow-hidden")})]}),(n||!ge())&&r("div",{className:"ihub-sidenav-group-items ".concat(n?"ihub-sidenav-group-expanded":""," ").concat(ge()?"":"ihub-sidenav-group-collapsed"),children:(!de||n||!ge())&&e.children.map((function(e,n){return r(c.Fragment,{children:Oe(e,i+1)},e.id||"group-child-".concat(n))}))})]})},He=function(e,i){var n=i>0?"ihub-sidenav-indent-".concat(i):"";return t("button",{className:"ihub-sidenav-item ihub-sidenav-button ".concat(n," ").concat(e.isDisabled?"ihub-sidenav-disabled":""," ").concat(e.className||""),onClick:function(i){return!e.isDisabled&&ze(e,i)},"data-tooltip":!ge()&&null!=se&&se.enabled?e.title:void 0,disabled:e.isDisabled,children:[e.icon&&r("span",{className:"ihub-sidenav-icon",children:"string"==typeof e.icon?r(v,{src:e.icon,alt:"",width:24,height:24}):e.icon}),r("span",{className:"ihub-sidenav-text ".concat(ge()?"":"ihub-sidenav-text-hidden"),children:e.title}),e.badge&&r("span",{className:"ihub-sidenav-badge ihub-sidenav-badge-".concat(e.badge.variant||"default"),children:e.badge.content})]})},Pe=function(e,i){return r("div",{className:"ihub-sidenav-divider",children:e.title&&ge()&&r("span",{className:"ihub-sidenav-divider-text",children:e.title})})},Re=["ihub-sidenav","ihub-sidenav-".concat(E),"ihub-sidenav-".concat(S),ge()?"ihub-sidenav-expanded":"ihub-sidenav-collapsed",U?"ihub-sidenav-dark":"",_&&ge()?"ihub-sidenav-resizable":"",Me?"ihub-sidenav-mobile":"","none"!==W?"ihub-sidenav-".concat(W):"",F].filter(Boolean).join(" "),qe=i(i(i({width:"number"==typeof Be?"".concat(Be,"px"):Be},null!=X&&X.fixed?{position:"fixed"}:{}),void 0!==(null==X?void 0:X.top)?{top:X.top}:{}),void 0!==(null==X?void 0:X.zIndex)?{zIndex:X.zIndex}:{}),Je=["ihub-sidenav-container","ihub-sidenav-container-".concat(E),ge()?"ihub-sidenav-container-expanded":"ihub-sidenav-container-collapsed",ue].filter(Boolean).join(" ");return t("div",{className:Je,children:[Me&&ge()&&Y&&r("div",{className:"ihub-sidenav-backdrop",onClick:function(){Ne(!1),null==Z||Z()}}),t("div",{ref:Ue,className:Re,style:qe,onTouchStart:function(e){ee&&Me&&(Xe.current=e.touches[0].clientX)},onTouchMove:function(e){if(ee&&Me&&null!==Xe.current){var i=e.touches[0].clientX-Xe.current;Math.abs(i)>=50&&(Ne("left"===E&&i>0||"right"===E&&i<0),Xe.current=null)}},onTouchEnd:function(){Xe.current=null},children:[r("button",{className:"ihub-sidenav-toggle",onClick:we,"aria-expanded":ge(),"aria-label":ge()?"Collapse sidebar":"Expand sidebar",children:"left"===E?ge()?r(b,{}):r(m,{className:"ihub-ml-2"}):ge()?r(m,{}):r(b,{className:"ihub-mr-2"})}),(null==j?void 0:j.href)&&r("div",{className:"ihub-sidenav-logo",children:r(h,{href:j.href||"",children:ge()||!j.src?r(v,{src:j.src,alt:j.alt,width:j.width||120,height:j.height||40}):j.miniSrc&&r(v,{src:j.miniSrc,alt:j.alt,width:j.height||40,height:j.height||40})})}),_&&ge()&&r("div",{className:"ihub-sidenav-resize-handle ihub-sidenav-resize-handle-".concat(E),onMouseDown:function(e){if(_&&ge()){e.preventDefault(),Ke.current=!0;var i=function(e){var i;Ke.current&&(i="left"===E?e.clientX:window.innerWidth-e.clientX,i=Math.max(Number(R),Math.min(Number(H),i)),Fe(i))},n=function(){Ke.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}}}),r("div",{className:"ihub-sidenav-content ihub-scrollbar-thin-light ".concat(null!=j&&j.href?"":"ihub-mt-2"),children:r("nav",{className:"ihub-sidenav-nav",children:N.map((function(e,i){return r(c.Fragment,{children:Oe(e)},e.id||"nav-item-".concat(i))}))})}),T&&t("div",{className:"ihub-sidenav-footer",children:[r(f,{fallback:t("div",{className:"ihub-sidenav-user",children:[r("div",{className:"ihub-sidenav-user-initials",children:"U"}),r("div",{className:"ihub-sidenav-user-info",children:r("div",{className:"ihub-sidenav-user-name",children:"User"})})]}),children:T.showUserProfile&&T.user&&ge()&&t("div",{className:"ihub-sidenav-user",children:[T.user.avatar?r(v,{src:"".concat(T.user.avatar),alt:T.user.name||"User",width:40,height:40,className:"ihub-sidenav-user-avatar"}):r("div",{className:"ihub-sidenav-user-initials",children:(null===(g=T.user.name)||void 0===g?void 0:g.charAt(0))||"U"}),t("div",{className:"ihub-sidenav-user-info",children:[T.user.name&&r("div",{className:"ihub-sidenav-user-name",children:T.user.name}),T.user.role&&r("div",{className:"ihub-sidenav-user-role",children:T.user.role})]})]})}),T.actions&&r("div",{className:"ihub-sidenav-footer-actions",children:T.actions.map((function(e,i){return r(c.Fragment,{children:He(e,0)},e.id||"footer-action-".concat(i))}))}),T.content&&r("div",{className:"ihub-sidenav-footer-content",children:ge()?T.content:null})]})]}),r("div",{className:"ihub-sidenav-main",children:he})]})};export{p as default};
|
|
1
|
+
import{slicedToArray as e,objectSpread2 as i,createForOfIteratorHelper as n,toConsumableArray as a}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as r,Fragment as s}from"react/jsx-runtime";import c,{useState as o,useEffect as d,useCallback as l,useRef as u}from"react";import h from"next/link";import v from"next/image";import m from"@mui/icons-material/ChevronLeft";import b from"@mui/icons-material/ChevronRight";import p from"../auth/ClientOnly.js";import"../lib/helpFunction.js";import"@mui/icons-material/Visibility";import"@mui/icons-material/VisibilityOff";import"next-auth/react";import"next/navigation";import"../lib/utils.js";import"../ui/OrDivider.js";import"../forms/SubmitButton.js";import"react-redux";import"../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/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import"../lib/redux/slices/navigationSlice/statusMessageState.js";import"../lib/redux/slices/navigationSlice/confirmDelete.js";import"../lib/redux/slices/navigationSlice/IPAdress.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"@mui/icons-material/DoneOutlined";import"@mui/icons-material/ContentCopyOutlined";import"../status/MultiPurposeModal.js";var f=function(f){var g,x=f.items,N=f.defaultExpanded,S=void 0===N||N,w=f.isExpanded,j=f.onExpandedChange,y=f.position,C=void 0===y?"left":y,k=f.variant,D=void 0===k?"default":k,E=f.expandedWidth,A=void 0===E?240:E,L=f.collapsedWidth,M=void 0===L?64:L,z=f.animation,F=void 0===z?"slide":z,O=f.logo,T=f.footer,I=f.className,W=void 0===I?"":I,B=f.darkMode,K=void 0!==B&&B,U=f.positioning,P=f.resizable,X=void 0!==P&&P,H=f.maxWidth,_=void 0===H?400:H,G=f.minWidth,R=void 0===G?180:G,V=f.onNavigate,Q=f.autoCollapseOnMobile,q=void 0===Q||Q,J=f.showBackdrop,Y=void 0===J||J,Z=f.onBackdropClick,$=f.enableTouchGestures,ee=void 0===$||$,ie=f.persistState,ne=void 0===ie||ie,ae=f.persistStateKey,te=void 0===ae?"ihub-sidenav-expanded":ae,re=f.lazyRender,se=void 0!==re&&re,ce=f.renderItem,oe=f.tooltip,de=f.toggleShortcut,le=f.contentContainerClassName,ue=void 0===le?"":le,he=f.children,ve=void 0!==w,me=o(S),be=e(me,2),pe=be[0],fe=be[1];d((function(){if(ve)fe(w);else if(ne&&"undefined"!=typeof window){var e=localStorage.getItem(te);null!==e&&fe("true"===e)}}),[ve,w,ne,te]),d((function(){ve&&fe(w)}),[ve,w]);var ge=function(){return ve?w:pe},xe=function(e){ve||(fe(e),ne&&"undefined"!=typeof window&&localStorage.setItem(te,String(e))),null==j||j(e)},Ne=function(){return xe(!ge())},Se=o(null),we=e(Se,2),je=we[0],ye=we[1],Ce=o(new Set),ke=e(Ce,2),De=ke[0],Ee=ke[1];d((function(){var e=new Set,i=function(n){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.forEach((function(n){if("group"===n.type){var t=n;(t.defaultExpanded||a||t.children.some((function(e){return"isActive"in e&&e.isActive||"group"===e.type&&e.defaultExpanded})))&&(e.add(n.id),i(t.children,!0))}}))};i(x),Ee(e)}),[x]),d((function(){var e=function(i){var t,r=n(i);try{var s,c=function(){var i=t.value;if("isActive"in i&&i.isActive)return{v:i.id};if("group"===i.type){var n=e(i.children);if(n)return Ee((function(e){return new Set([].concat(a(e),[i.id]))})),{v:n}}};for(r.s();!(t=r.n()).done;)if(s=c())return s.v}catch(e){r.e(e)}finally{r.f()}return null},i=e(x);i&&ye(i)}),[x]);var Ae=l((function(e,i){"button"===e.type&&e.onClick(i),ye(e.id),null==V||V(e,i),q&&window.innerWidth<=768&&xe(!1)}),[V,q,xe]),Le=o(!1),Me=e(Le,2),ze=Me[0],Fe=Me[1];d((function(){var e=function(){Fe(window.innerWidth<=768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),d((function(){if(de){var e=function(e){var i=de.toLowerCase().split("+"),n=i.filter((function(e){return["ctrl","alt","shift","meta"].includes(e)})),a=i.find((function(e){return!["ctrl","alt","shift","meta"].includes(e)}));a&&e.key.toLowerCase()===a&&n.every((function(i){switch(i){case"ctrl":return e.ctrlKey;case"alt":return e.altKey;case"shift":return e.shiftKey;case"meta":return e.metaKey;default:return!1}}))&&(e.preventDefault(),Ne())};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}}),[de,Ne]);var Oe=o(ge()?A:M),Te=e(Oe,2),Ie=Te[0],We=Te[1],Be=u(!1),Ke=u(null);d((function(){We(ge()?A:M)}),[ge,A,M]);var Ue=u(null),Pe=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ce)return ce(e,i);switch(e.type){case"link":return Xe(e,i);case"group":return He(e,i);case"button":return _e(e,i);case"divider":return Ge(e);default:return null}},Xe=function(e,i){if(e.hasAccess&&!e.hasAccess())return null;var n=e.id===je,a=i>0?"ihub-sidenav-indent-".concat(i):"",c=t(s,{children:[e.icon&&r("span",{className:"ihub-sidenav-icon",children:"string"==typeof e.icon?r(v,{src:e.icon,alt:"",width:24,height:24}):e.icon}),r("span",{className:"ihub-sidenav-text ".concat(ge()?"":"ihub-sidenav-text-hidden"),children:e.title}),e.badge&&r("span",{className:"ihub-sidenav-badge ihub-sidenav-badge-".concat(e.badge.variant||"default"),children:e.badge.content})]});return e.isExternal?r("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"ihub-sidenav-item ihub-sidenav-link ".concat(a," ").concat(n?"ihub-sidenav-active":""," ").concat(e.isDisabled?"ihub-sidenav-disabled":""," ").concat(e.className||""),onClick:function(i){return!e.isDisabled&&Ae(e,i)},"data-tooltip":!ge()&&null!=oe&&oe.enabled?e.title:void 0,"aria-disabled":e.isDisabled,children:c}):r(h,{href:e.href,className:"ihub-sidenav-item ihub-sidenav-link ".concat(a," ").concat(e.isActive&&0===i?"ihub-sidenav-active":e.isActive?"ihub-sidenav-child-active":""," ").concat(e.isDisabled?"ihub-sidenav-disabled":""," ").concat(e.className||""),onClick:function(i){return!e.isDisabled&&Ae(e,i)},"data-tooltip":!ge()&&null!=oe&&oe.enabled?e.title:void 0,"aria-disabled":e.isDisabled,children:c})},He=function(e,i){var n=De.has(e.id),a=e.children.some((function(e){return e.id===je||"group"===e.type&&e.children.some((function(e){return e.id===je}))})),s=i>0?"ihub-sidenav-indent-".concat(i):"";return e.hideGroupTitle?r("div",{className:"ihub-sidenav-group ".concat(e.className||""),children:e.children.map((function(e,n){return r(c.Fragment,{children:Pe(e,i)},e.id||"group-child-".concat(n))}))}):t("div",{className:"ihub-sidenav-group ".concat(e.className||""," ").concat(a?"ihub-sidenav-group-active":""),children:[t("div",{className:"ihub-sidenav-item ihub-sidenav-group-header ".concat(e.isActive?"ihub-sidenav-active":""," ").concat(s," ").concat(e.isDisabled?"ihub-sidenav-disabled":""),onClick:function(){return!e.isDisabled&&(i=e.id,void Ee((function(e){var n=new Set(e);return n.has(i)?n.delete(i):n.add(i),n})));var i},"data-tooltip":!ge()&&null!=oe&&oe.enabled?e.title:void 0,"aria-disabled":e.isDisabled,"aria-expanded":n,children:[e.icon&&r("span",{className:"ihub-sidenav-icon",children:"string"==typeof e.icon?r(v,{src:e.icon,alt:"",width:24,height:24}):e.icon}),r("span",{className:"ihub-sidenav-text ".concat(ge()?"":"ihub-sidenav-text-hidden"),children:e.title}),e.badge&&r("span",{className:"ihub-sidenav-badge ihub-sidenav-badge-".concat(e.badge.variant||"default"),children:e.badge.content}),r("span",{className:"ihub-sidenav-arrow ".concat(n?"ihub-sidenav-arrow-expanded":""," ").concat(ge()?"":"ihub-sidenav-arrow-hidden")})]}),(n||!ge())&&r("div",{className:"ihub-sidenav-group-items ".concat(n?"ihub-sidenav-group-expanded":""," ").concat(ge()?"":"ihub-sidenav-group-collapsed"),children:(!se||n||!ge())&&e.children.map((function(e,n){return r(c.Fragment,{children:Pe(e,i+1)},e.id||"group-child-".concat(n))}))})]})},_e=function(e,i){var n=i>0?"ihub-sidenav-indent-".concat(i):"";return t("button",{className:"ihub-sidenav-item ihub-sidenav-button ".concat(n," ").concat(e.isDisabled?"ihub-sidenav-disabled":""," ").concat(e.className||""),onClick:function(i){return!e.isDisabled&&Ae(e,i)},"data-tooltip":!ge()&&null!=oe&&oe.enabled?e.title:void 0,disabled:e.isDisabled,children:[e.icon&&r("span",{className:"ihub-sidenav-icon",children:"string"==typeof e.icon?r(v,{src:e.icon,alt:"",width:24,height:24}):e.icon}),r("span",{className:"ihub-sidenav-text ".concat(ge()?"":"ihub-sidenav-text-hidden"),children:e.title}),e.badge&&r("span",{className:"ihub-sidenav-badge ihub-sidenav-badge-".concat(e.badge.variant||"default"),children:e.badge.content})]})},Ge=function(e,i){return r("div",{className:"ihub-sidenav-divider",children:e.title&&ge()&&r("span",{className:"ihub-sidenav-divider-text",children:e.title})})},Re=["ihub-sidenav","ihub-sidenav-".concat(C),"ihub-sidenav-".concat(D),ge()?"ihub-sidenav-expanded":"ihub-sidenav-collapsed",K?"ihub-sidenav-dark":"",X&&ge()?"ihub-sidenav-resizable":"",ze?"ihub-sidenav-mobile":"","none"!==F?"ihub-sidenav-".concat(F):"",W].filter(Boolean).join(" "),Ve=i(i(i({width:"number"==typeof Ie?"".concat(Ie,"px"):Ie},null!=U&&U.fixed?{position:"fixed"}:{}),void 0!==(null==U?void 0:U.top)?{top:U.top}:{}),void 0!==(null==U?void 0:U.zIndex)?{zIndex:U.zIndex}:{}),Qe=["ihub-sidenav-container","ihub-sidenav-container-".concat(C),ge()?"ihub-sidenav-container-expanded":"ihub-sidenav-container-collapsed",ue].filter(Boolean).join(" ");return t("div",{className:Qe,children:[ze&&ge()&&Y&&r("div",{className:"ihub-sidenav-backdrop",onClick:function(){xe(!1),null==Z||Z()}}),t("div",{ref:Ke,className:Re,style:Ve,onTouchStart:function(e){ee&&ze&&(Ue.current=e.touches[0].clientX)},onTouchMove:function(e){if(ee&&ze&&null!==Ue.current){var i=e.touches[0].clientX-Ue.current;Math.abs(i)>=50&&(xe("left"===C&&i>0||"right"===C&&i<0),Ue.current=null)}},onTouchEnd:function(){Ue.current=null},children:[r("button",{className:"ihub-sidenav-toggle",onClick:Ne,"aria-expanded":ge(),"aria-label":ge()?"Collapse sidebar":"Expand sidebar",children:"left"===C?ge()?r(m,{}):r(b,{className:"ihub-ml-2"}):ge()?r(b,{}):r(m,{className:"ihub-mr-2"})}),(null==O?void 0:O.href)&&r("div",{className:"ihub-sidenav-logo",children:r(h,{href:O.href||"",children:ge()||!O.src?r(v,{src:O.src,alt:O.alt,width:O.width||120,height:O.height||40}):O.miniSrc&&r(v,{src:O.miniSrc,alt:O.alt,width:O.height||40,height:O.height||40})})}),X&&ge()&&r("div",{className:"ihub-sidenav-resize-handle ihub-sidenav-resize-handle-".concat(C),onMouseDown:function(e){if(X&&ge()){e.preventDefault(),Be.current=!0;var i=function(e){var i;Be.current&&(i="left"===C?e.clientX:window.innerWidth-e.clientX,i=Math.max(Number(R),Math.min(Number(_),i)),We(i))},n=function(){Be.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}}}),r("div",{className:"ihub-sidenav-content ihub-scrollbar-thin-light ".concat(null!=O&&O.href?"":"ihub-mt-2"),children:r("nav",{className:"ihub-sidenav-nav",children:x.map((function(e,i){return r(c.Fragment,{children:Pe(e)},e.id||"nav-item-".concat(i))}))})}),T&&t("div",{className:"ihub-sidenav-footer",children:[r(p,{fallback:t("div",{className:"ihub-sidenav-user",children:[r("div",{className:"ihub-sidenav-user-initials",children:"U"}),r("div",{className:"ihub-sidenav-user-info",children:r("div",{className:"ihub-sidenav-user-name",children:"User"})})]}),children:T.showUserProfile&&T.user&&ge()&&t("div",{className:"ihub-sidenav-user",children:[T.user.avatar?r(v,{src:"".concat(T.user.avatar),alt:T.user.name||"User",width:40,height:40,className:"ihub-sidenav-user-avatar"}):r("div",{className:"ihub-sidenav-user-initials",children:(null===(g=T.user.name)||void 0===g?void 0:g.charAt(0))||"U"}),t("div",{className:"ihub-sidenav-user-info",children:[T.user.name&&r("div",{className:"ihub-sidenav-user-name",children:T.user.name}),T.user.role&&r("div",{className:"ihub-sidenav-user-role",children:T.user.role})]})]})}),T.actions&&r("div",{className:"ihub-sidenav-footer-actions",children:T.actions.map((function(e,i){return r(c.Fragment,{children:_e(e,0)},e.id||"footer-action-".concat(i))}))}),T.content&&r("div",{className:"ihub-sidenav-footer-content",children:ge()?T.content:null})]})]}),r("div",{className:"ihub-sidenav-main",children:he})]})};export{f as default};
|
|
2
2
|
//# sourceMappingURL=SideNavbar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e,asyncToGenerator as i,regeneratorRuntime as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as r,jsxs as l}from"react/jsx-runtime";import{useState as s,useCallback as o,useEffect as n}from"react";import{useSession as a}from"next-auth/react";import c 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/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import"../lib/redux/slices/navigationSlice/statusMessageState.js";import{confirmDelete as p}from"../lib/redux/slices/navigationSlice/confirmDelete.js";import{selectConfirmDelete as
|
|
1
|
+
import{slicedToArray as e,asyncToGenerator as i,regeneratorRuntime as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as r,jsxs as l}from"react/jsx-runtime";import{useState as s,useCallback as o,useEffect as n}from"react";import{useSession as a}from"next-auth/react";import c 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/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import"../lib/redux/slices/navigationSlice/statusMessageState.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/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";var h=function(h){var g=s(""),f=e(g,2),x=f[0],v=f[1],j=d(),S=m(b),y=S.url,C=S.title,N=function(r,l,n){var c=a().data,d=s("idle"),m=e(d,2),p=m[0],b=m[1],h=s(null),g=e(h,2),f=g[0],x=g[1],v=null==c?void 0:c.user;return{deleteItem:o(i(t().mark((function e(){var i,l,s,o;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return b("loading"),x(null),l=null===(i=v.name)||void 0===i?void 0:i.token,s=u("DELETE",null,l),e.prev=6,e.next=9,fetch(r,s);case 9:204===(o=e.sent).status?(b("success"),n()):401===o.status?(b("error"),x("You don't have permission to delete this item.")):(b("error"),x("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"),x("Network error. Please check your connection and try again.");case 17:case"end":return e.stop()}}),e,null,[[6,13]])}))),[r,c,n]),status:p,error:f}}(y,0,o((function(){j(p.actions.set({deleteStatus:204,title:C}))}),[j,C])),T=N.deleteItem,k=N.status,D=N.error,w=o((function(){j(p.actions.set({}))}),[j]),P=x===C;return n((function(){v("")}),[C]),y?r("div",{className:"ihub-modal",onClick:w,role:"dialog","aria-labelledby":"delete-modal-title","aria-describedby":"delete-modal-description",children:r("div",{className:"ihub-modal-content",onClick:function(e){return e.stopPropagation()},children:l("div",{className:"ihub-delete-modal",children:[l("h4",{id:"delete-modal-title",children:["Delete ",C,"?"]}),r("p",{className:"ihub-delete-warning",id:"delete-modal-description",children:"Warning: This action cannot be undone!"}),l("p",{children:["This will permanently delete the"," ",r("strong",{children:h.itemTitle||C})," repository, including all associated data, feedbacks, schedules, and team associations."]}),l("form",{onSubmit:function(e){e.preventDefault(),P&&T()},children:[l("div",{className:"ihub-delete-confirmation",children:[l("p",{children:["Please type ",r("strong",{children:C})," to confirm deletion."]}),r(c,{text:C||""})]}),l("div",{className:"ihub-form-input",children:[r("input",{type:"text",value:x,onChange:function(e){return v(e.target.value)},className:"ihub-delete-input",placeholder:"Type to confirm","aria-describedby":"confirmation-helper",autoComplete:"off",autoFocus:!0}),r("small",{id:"confirmation-helper",className:"ihub-helper-text",children:"Type the exact name to enable deletion"})]}),D&&r("p",{className:"ihub-delete-message",role:"alert",children:D}),l("div",{className:"ihub-delete-actions",children:[r("button",{type:"submit",disabled:!P||"loading"===k,className:"ihub-danger-btn","aria-busy":"loading"===k,children:"loading"===k?"Deleting...":"Delete"}),r("button",{type:"button",onClick:w,className:"ihub-outlined-btn",children:"Cancel"})]})]})]})})}):null};export{h as default};
|
|
2
2
|
//# sourceMappingURL=DeleteConfirmationModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e,objectSpread2 as i,defineProperty as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as l}from"react/jsx-runtime";import{useState as o}from"react";import
|
|
1
|
+
import{slicedToArray as e,objectSpread2 as i,defineProperty as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as l}from"react/jsx-runtime";import{useState as o}from"react";import r from"./MultiPurposeModal.js";import a from"../forms/SubmitButton.js";import"../lib/helpFunction.js";import{openToast as s}from"../lib/modals/modals.js";import"../lib/utils.js";import u from"../forms/InputText.js";var c=function(){var c=o(!1),m=e(c,2),d=m[0],h=m[1],b=o(!1),p=e(b,2),f=p[0],C=p[1],v=o(!1),N=e(v,2),y=N[0],x=N[1],F=o(!1),g=e(F,2),k=g[0],w=g[1],M=o(!1),O=e(M,2),j=O[0],S=O[1],z=o(1),T=e(z,2),q=T[0];T[1];var A=o({name:"",email:""}),B=e(A,2),E=B[0],I=B[1],P=function(e){var t=e.target,l=t.name,o=t.value;I((function(e){return i(i({},e),{},n({},l,o))}))};return t("div",{className:"ihub-container ihub-mt-5",children:[l("h1",{children:"Modal Examples"}),t("div",{className:"ihub-d-flex ihub-py-5",style:{gap:"20px",flexWrap:"wrap"},children:[l("button",{className:"ihub-important-btn",onClick:function(){return h(!0)},children:"Open Basic Modal"}),l("button",{className:"ihub-outlined-btn",onClick:function(){return C(!0)},children:"Open Form Modal"}),l("button",{className:"ihub-outlined-btn",onClick:function(){return S(!0)},children:"Open Form Modal Event"}),l("button",{className:"ihub-primary-btn",onClick:function(){return x(!0)},children:"Open Custom Modal"}),l("button",{className:"ihub-danger-btn",onClick:function(){return w(!0)},children:"Open Full Screen Modal"})]}),t(r,{isOpen:d,onClose:function(){return h(!1)},title:"Basic Information Modal",size:"small",showFooter:!0,children:[l("p",{children:"This is a basic modal with default settings. It includes:"}),t("ul",{children:[l("li",{children:"A title in the header"}),l("li",{children:"Content in the body"}),l("li",{children:"A footer with default buttons"}),l("li",{children:"Small size (400px max width)"})]})]}),t(r,{isOpen:f,onClose:function(){return C(!1)},title:"User Information Form",size:"medium",showFooter:!0,footerContent:t("div",{className:"ihub-buttons",children:[l("button",{className:"ihub-outlined-btn",onClick:function(){return C(!1)},children:"Cancel"}),l("button",{className:"ihub-important-btn",onClick:function(){console.log("Form submitted with data:",E),C(!1)},disabled:!E.name||!E.email,children:"Submit"})]}),children:[l(u,{label:"Full Name",id:"name",name:"name",type:"text",value:E.name,onChange:P,className:"ihub-input",required:!0}),l(u,{label:"Email Address",id:"email",name:"email",type:"email",value:E.email,onChange:P,className:"ihub-input",required:!0})]}),t(r,{title:"Form Modal with event",isOpen:j,onClose:function(){return S(!1)},size:"medium",showFooter:!0,handleSubmit:function(e){e.preventDefault(),console.log("Form event:",e),s("Check console for form data")},footerContent:t("div",{className:"ihub-buttons",children:[l("button",{className:"ihub-outlined-btn",onClick:function(){return C(!1)},children:"Cancel"}),l(a,{label:"Submit",type:"submit",status:q})]}),children:[l(u,{label:"Full Name",id:"name",name:"name",type:"text",value:E.name,onChange:P,className:"ihub-input",required:!0}),l(u,{label:"Email Address",id:"email",name:"email",type:"email",value:E.email,onChange:P,className:"ihub-input",required:!0})]}),l(r,{isOpen:y,onClose:function(){return x(!1)},size:"large",showCloseButton:!0,closeOnOverlayClick:!1,className:"ihub-custom-modal",children:t("div",{className:"ihub-py-3",children:[l("h2",{className:"ihub-mb-3",children:"Custom Modal Without Header"}),l("p",{children:"This modal demonstrates:"}),t("ul",{children:[l("li",{children:"No formal header section (title is in the body)"}),l("li",{children:"Custom close button still included"}),l("li",{children:"Large size variant (900px max width)"}),l("li",{children:"Overlay click is disabled (can only close via button)"}),l("li",{children:"No footer section"})]}),l("div",{className:"ihub-d-flex ihub-justify-content-center ihub-mt-4",children:l("button",{className:"ihub-important-btn",onClick:function(){return x(!1)},children:"Close This Modal"})})]})}),l(r,{isOpen:k,onClose:function(){return w(!1)},title:"Full Screen Experience",size:"full",showFooter:!1,children:t("div",{style:{minHeight:"80vh"},children:[l("h3",{children:"This is a full-screen modal"}),l("p",{children:"Perfect for immersive experiences, detailed forms, or content that requires maximum screen real estate. This modal takes over the entire viewport."}),l("div",{className:"ihub-mt-5",children:l("button",{className:"ihub-danger-btn",onClick:function(){return w(!1)},children:"Close Full Screen Modal"})})]})})]})};export{c as default};
|
|
2
2
|
//# sourceMappingURL=ModalExamples.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as
|
|
1
|
+
import{slicedToArray as e,objectSpread2 as o,typeof as l}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as i,jsx as t}from"react/jsx-runtime";import n,{useState as r,useRef as a,useEffect as u,useCallback as c,useMemo as s}from"react";import d from"@mui/icons-material/CloseOutlined";var m=n.memo((function(l){var n=l.isOpen,m=l.onClose,h=l.title,b=l.size,f=void 0===b?"medium":b,v=l.height,p=void 0===v?"70vh":v,C=l.children,y=l.showFooter,N=void 0!==y&&y,S=l.footerContent,O=l.showCloseButton,g=void 0===O||O,w=l.closeOnOverlayClick,k=void 0===w||w,T=l.className,F=void 0===T?"":T,P=l.disableScroll,B=void 0===P||P,R=l.handleSubmit,j=l.removeForm,x=void 0!==j&&j,z=l.enableContentRefresh,M=void 0===z||z,_=l.preserveScrollPosition,A=void 0===_||_,H=r(!1),q=e(H,2),D=q[0],E=q[1],G=r(0),I=e(G,2),J=I[0],K=I[1],L=a(null);u((function(){if(M){var e=0;A&&L.current&&(e=L.current.scrollTop),K((function(e){return e+1})),A&&e>0&&setTimeout((function(){L.current&&(L.current.scrollTop=e)}),0)}}),[C,M,A]),u((function(){var e;return n?(E(!0),B&&(document.body.style.overflow="hidden")):e=setTimeout((function(){E(!1),B&&(document.body.style.overflow="")}),300),function(){e&&clearTimeout(e),B&&(document.body.style.overflow="")}}),[n,B]);var Q=c((function(e){e.target===e.currentTarget&&k&&m()}),[k,m]),U=s((function(){return{small:"ihub-modal-small",medium:"ihub-modal-medium",large:"ihub-modal-large",full:"ihub-modal-full"}[f]}),[f]),V=s((function(){return"ihub-modal-content ".concat(U," ").concat(F)}),[U,F]),W=s((function(){return"ihub-modal ".concat(n?"ihub-modal-open":"ihub-modal-closing")}),[n]),X=s((function(){return h||g?i("div",{className:"ihub-modal-header",children:[h&&t("h2",{id:"ihub-modal-title",className:"ihub-modal-title",children:h}),g&&t("button",{type:"button",className:"ihub-close-it",onClick:m,"aria-label":"Close modal",children:t(d,{})})]}):null}),[h,g,m]),Y=s((function(){return N?t("div",{className:"ihub-modal-footer",children:S||i("div",{className:"ihub-buttons",children:[t("button",{className:"ihub-outlined-btn",onClick:m,type:"button",children:"Cancel"}),t("button",{className:"ihub-important-btn",type:R?"submit":"button",children:R?"Confirm":"Close"})]})}):null}),[N,S,m,R]);if(!D&&!n)return null;var Z=o({ref:L,className:"ihub-modal-body ihub-txt-modal",style:{height:p}},M&&{key:J});return t("div",{className:W,onClick:Q,role:"dialog","aria-modal":"true","aria-labelledby":h?"ihub-modal-title":void 0,children:x?i("div",{className:V,children:[X,t("div",o(o({},Z),{},{children:C})),Y]}):t("form",{onSubmit:R,children:i("div",{className:V,children:[X,t("div",o(o({},Z),{},{children:C})),Y]})})})}),(function(e,o){if(e.isOpen!==o.isOpen)return!1;if(o.enableContentRefresh){if(e.children!==o.children)return!1}else if(e.children!==o.children&&l(e.children)!==l(o.children))return!1;return e.footerContent===o.footerContent&&(e.title===o.title&&(e.size===o.size&&e.showFooter===o.showFooter&&e.showCloseButton===o.showCloseButton&&e.closeOnOverlayClick===o.closeOnOverlayClick&&e.className===o.className&&e.disableScroll===o.disableScroll&&e.handleSubmit===o.handleSubmit&&e.removeForm===o.removeForm&&e.enableContentRefresh===o.enableContentRefresh&&e.preserveScrollPosition===o.preserveScrollPosition))}));m.displayName="MultiPurposeModal";export{m as default};
|
|
2
2
|
//# sourceMappingURL=MultiPurposeModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e,asyncToGenerator as r,regeneratorRuntime as t,objectSpread2 as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{useRef as i,useState as s,useEffect as c}from"react";import{IN_DEV_MODE as o,reqOptions as l,API_HOST_URL as u}from"../lib/helpFunction.js";import{useParams as a}from"next/navigation";import{useDispatch as d,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/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import"../lib/redux/slices/navigationSlice/statusMessageState.js";import"../lib/redux/slices/navigationSlice/confirmDelete.js";import{selectIPAdress as m}from"../lib/redux/slices/navigationSlice/selectors.js";import{IPAdress as v}from"../lib/redux/slices/navigationSlice/IPAdress.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";function b(b){var f,x=b.channel_username,S=void 0===x?null:x,
|
|
1
|
+
import{slicedToArray as e,asyncToGenerator as r,regeneratorRuntime as t,objectSpread2 as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{useRef as i,useState as s,useEffect as c}from"react";import{IN_DEV_MODE as o,reqOptions as l,API_HOST_URL as u}from"../lib/helpFunction.js";import{useParams as a}from"next/navigation";import{useDispatch as d,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/navigationSlice/appToggle.js";import"../lib/redux/slices/navigationSlice/toggleCreateCourse.js";import"../lib/redux/slices/navigationSlice/toggleCreateCohort.js";import"../lib/redux/slices/navigationSlice/statusMessageState.js";import"../lib/redux/slices/navigationSlice/confirmDelete.js";import{selectIPAdress as m}from"../lib/redux/slices/navigationSlice/selectors.js";import{IPAdress as v}from"../lib/redux/slices/navigationSlice/IPAdress.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";function b(b){var f,x=b.channel_username,S=void 0===x?null:x,j=b.session,h=b.endpoint,g=void 0===h?"/api/user-ip-address":h,w=d(),k=p(m),y=i(new Date),T=i(null),C=s((null===(f=document)||void 0===f?void 0:f.visibilityState)||"visible"),D=e(C,2),_=D[0],E=D[1],L=a().channel||S,O=i(!1),P=function(){var e=document.visibilityState;E(e),"hidden"===e?(T.current=new Date,O.current=!0):(y.current=new Date,T.current=null)},F=function(){T.current=new Date,O.current=!0,E((function(e){return"idle"===e?"idle_update":"idle"}))};return c((function(){return y.current=new Date,document.addEventListener("visibilitychange",P),document.addEventListener("idle",F),function(){y.current&&!T.current&&(T.current=new Date,O.current=!0),document.removeEventListener("visibilitychange",P),document.removeEventListener("idle",F)}}),[]),c((function(){if(null==k||!k.ip_address){var e=function(){var e=r(t().mark((function e(){var r,n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(g||"");case 3:if((r=e.sent).ok){e.next=6;break}throw new Error("HTTP error! Status: ".concat(r.status));case 6:return e.next=8,r.json();case 8:n=e.sent,w(v.actions.set(n)),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.error("Error fetching IP address:",e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();e()}}),[w,null==k?void 0:k.ip_address,null==v?void 0:v.actions]),c((function(){var e=function(){var e=r(t().mark((function e(){var r,i,s,c,a,d,p;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O.current&&y.current&&T.current){e.next=2;break}return e.abrupt("return");case 2:if(!((i=Math.round((T.current.getTime()-y.current.getTime())/1e3))<=0)){e.next=6;break}return O.current=!1,e.abrupt("return");case 6:if(s=n(n({},k),{},{seconds:i,url:window.location.href,datetime_start:y.current.toISOString(),datetime_end:T.current.toISOString(),user:(null==j||null===(r=j.user)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.id)||""}),e.prev=7,L){e.next=11;break}return console.warn("Cannot send time data: handle is undefined"),e.abrupt("return");case 11:return c=JSON.stringify(s),a=l("POST",c,null,"json"),e.next=15,fetch("".concat(u,"history/").concat(L,"/timespent/"),a);case 15:if(201!==(d=e.sent).status){e.next=26;break}if(O.current=!1,!o){e.next=24;break}return console.log("Time spent sent to server successfully!"),e.next=22,d.json();case 22:p=e.sent,console.log(p);case 24:e.next=27;break;case 26:console.error("Server responded with status: ".concat(d.status));case 27:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(7),console.error("Couldn't send time data:",e.t0);case 32:case"end":return e.stop()}}),e,null,[[7,29]])})));return function(){return e.apply(this,arguments)}}();return e(),function(){O.current&&e()}}),[_,j,k,L]),null}export{b as default};
|
|
2
2
|
//# sourceMappingURL=ReactTimeTracker.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{slicedToArray as o}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as e,jsx as t}from"react/jsx-runtime";var n=function(){var n=[{name:"ActionDropdown",description:"Dropdown component for actions",category:"Forms",repo_path:"src/components/forms/ActionDropdown.tsx"},{name:"AnimatedBox",description:"Animated container component",category:"Forms",repo_path:"src/components/forms/AnimatedBox.tsx"},{name:"PasswordField",description:"Secure password input field",category:"Forms",repo_path:"src/components/forms/PasswordField.tsx"},{name:"DateInput",description:"Date selection input field",category:"Forms",repo_path:"src/components/forms/DateInput.tsx"},{name:"DateTimeInput",description:"Date and time selection input field",category:"Forms",repo_path:"src/components/forms/DateTimeInput.tsx"},{name:"DropFile",description:"File drag and drop component",category:"Forms",repo_path:"src/components/forms/DropFile.tsx"},{name:"EmailList",description:"Email list display component",category:"Forms",repo_path:"src/components/forms/EmailList.tsx"},{name:"FilterArray",description:"Array filtering component",category:"Forms",repo_path:"src/components/forms/FilterArray.tsx"},{name:"FilterBy",description:"Filtering component with criteria",category:"Forms",repo_path:"src/components/forms/FilterBy.tsx"},{name:"FilterObjects",description:"Object filtering component",category:"Forms",repo_path:"src/components/forms/FilterObjects.tsx"},{name:"FormError",description:"Form error display component",category:"Forms",repo_path:"src/components/forms/FormError.tsx"},{name:"HandleError",description:"Error handling component",category:"Forms",repo_path:"src/components/forms/HandleError.tsx"},{name:"Logout",description:"Logout functionality component",category:"Forms",repo_path:"src/components/forms/Logout.tsx"},{name:"MessageDisplay",description:"Message display component",category:"Forms",repo_path:"src/components/forms/MessageDisplay.tsx"},{name:"MultipleEmail",description:"Multiple email input component",category:"Forms",repo_path:"src/components/forms/MultipleEmail.tsx"},{name:"PageLoading",description:"Page loading indicator component",category:"Forms",repo_path:"src/components/forms/PageLoading.tsx"},{name:"PhoneNumberInput",description:"Phone number input with formatting",category:"Forms",repo_path:"src/components/forms/PhoneNumberInput.tsx"},{name:"RadioField",description:"Radio button input field",category:"Forms",repo_path:"src/components/forms/RadioField.tsx"},{name:"RadioSimple",description:"Simplified radio button component",category:"Forms",repo_path:"src/components/forms/RadioSimple.tsx"},{name:"ReactTimeAgo",description:"Time ago display component",category:"Forms",repo_path:"src/components/forms/ReactTimeAgo.tsx"},{name:"ReadTermsAndCondition",description:"Terms and conditions acceptance component",category:"Forms",repo_path:"src/components/forms/ReadTermsAndCondition.tsx"},{name:"SearchField",description:"Search input field component",category:"Forms",repo_path:"src/components/forms/SearchField.tsx"},{name:"SearchFieldDB",description:"Database search field component",category:"Forms",repo_path:"src/components/forms/SearchFieldDB.tsx"},{name:"StepProgressBar",description:"Step progress indicator component",category:"Forms",repo_path:"src/components/forms/StepProgressBar.tsx"},{name:"SubmitButton",description:"Form submission button component",category:"Forms",repo_path:"src/components/forms/SubmitButton.tsx"},{name:"Tables",description:"Table display component",category:"Forms",repo_path:"src/components/forms/Tables.tsx"},{name:"TextArea",description:"Multi-line text input component",category:"Forms",repo_path:"src/components/forms/TextArea.tsx"},{name:"TextField",description:"Text input field component",category:"Forms",repo_path:"src/components/forms/TextField.tsx"},{name:"Tooltip",description:"Tooltip display component",category:"Forms",repo_path:"src/components/forms/Tooltip.tsx"},{name:"UnsplashRandomImage",description:"Random image from Unsplash component",category:"Forms",repo_path:"src/components/forms/UnsplashRandomImage.tsx"},{name:"DownloadAsExcel",description:"Excel download functionality component",category:"Forms",repo_path:"src/components/forms/DownloadAsExcel.tsx"},{name:"THeadSortBtn",description:"Table header sort button component",category:"Forms",repo_path:"src/components/forms/THeadSortBtn.tsx"},{name:"THeadSortList",description:"Table header sort list component",category:"Forms",repo_path:"src/components/forms/THeadSortList.tsx"},{name:"TBodyNoData",description:"Table body empty state component",category:"Forms",repo_path:"src/components/forms/TBodyNoData.tsx"},{name:"FileUploader",description:"File upload component",category:"Forms",repo_path:"src/components/forms/uploads/FileUploader.tsx"},{name:"IhubFileUploader",description:"InstinctHub file upload component",category:"Forms",repo_path:"src/components/forms/uploads/IhubFileUploader.tsx"},{name:"ActionCallbackDropdown",description:"Action callback dropdown component",category:"Forms",repo_path:"src/components/forms/ActionCallbackDropdown.tsx"},{name:"InputNumber",description:"InputNumber component for numerical input",category:"Form",repo_path:"src/components/forms/InputNumber.tsx"},{name:"InputText",description:"InputText component for text input",category:"Form",repo_path:"src/components/forms/InputText.tsx"},{name:"InputTextarea",description:"InputTextarea component for text input",category:"Form",repo_path:"src/components/forms/InputTextarea.tsx"},{name:"SearchObjectsFromDB",description:"SearchObjectsFromDB component for searching objects from database",category:"Form",repo_path:"src/components/forms/SearchObjectsFromDB.tsx"},{name:"ToggleButton",description:"ToggleButton component for changing state.",category:"Form",repo_path:"src/components/forms/ToggleButton.tsx"},{name:"DateInputPicker",description:"DateInputPicker component for picking date and time.",category:"Form",repo_path:"src/components/forms/DateInputPicker.tsx"},{name:"ChipsInput",description:"ChipsInput is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/ChipsInput.tsx"},{name:"RadioButton",description:"RadioButton is used to enter single value on an input field.",category:"Form",repo_path:"src/components/forms/radio-btn/RadioButton.tsx"},{name:"RadioGroup",description:"RadioGroup is used to select each from group value on an input field.",category:"Form",repo_path:"src/components/forms/radio-btn/RadioGroup.tsx"},{name:"InputAmount",description:"InputAmount is used to enter amount on an input field.",category:"Form",repo_path:"src/components/forms/InputAmount.tsx"},{name:"CheckBoxes",description:"CheckBoxes is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/CheckBoxes.tsx"},{name:"CheckBoxesField",description:"CheckBoxesField is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/CheckboxesField.tsx"},{name:"IsUsernameEmailTaken",description:"Username/email availability checker",category:"Auth",repo_path:"src/components/auth/IsUsernameEmailTaken.tsx"},{name:"ClientDetector",description:"Client device detection component",category:"Auth",repo_path:"src/components/auth/ClientDetector.tsx"},{name:"PasswordsMatch",description:"Password matching validation component",category:"Auth",repo_path:"src/components/auth/PasswordsMatch.tsx"},{name:"FromInstinctHub",description:"From InstinctHub component",category:"Auth",repo_path:"src/components/auth/FromInstinctHub.tsx"},{name:"LoginForm",description:"Login form component",category:"Auth",repo_path:"src/components/auth/LoginForm.tsx"},{name:"ChannelListAvatar",description:"Channel list avatar component",category:"Navbar",repo_path:"src/components/navbar/ChannelListAvatar.tsx"},{name:"MenuDropdown",description:"Menu dropdown component",category:"Navbar",repo_path:"src/components/navbar/MenuDropdown.tsx"},{name:"Breadcrumb",description:"Breadcrumb component",category:"Navbar",repo_path:"src/components/navbar/Breadcrumb.tsx"},{name:"ResponsiveNavbar",description:"Responsive navbar component",category:"Navbar",repo_path:"src/components/navbar/ResponsiveNavbar.tsx"},{name:"SideNavbar",description:"Side navbar component",category:"Navbar",repo_path:"src/components/navbar/SideNavbar.tsx"},{name:"CustomTextEditor",description:"Custom text editor component",category:"UI",repo_path:"src/components/ui/editor/CustomTextEditor.tsx"},{name:"ContentViewer",description:"Content viewer component",category:"UI",repo_path:"src/components/ui/viewer/ContentViewer.tsx"},{name:"ContentViewOrEdit",description:"Content view or edit component",category:"UI",repo_path:"src/components/ui/viewer/ContentViewOrEdit.tsx"},{name:"CodeDisplay",description:"Code display component",category:"UI",repo_path:"src/components/ui/viewer/CodeDisplay.tsx"},{name:"IHubTable",description:"InstinctHub table component",category:"UI",repo_path:"src/components/ui/tables/IHubTable.tsx"},{name:"IHubTableServer",description:"InstinctHub server table component",category:"UI",repo_path:"src/components/ui/tables/IHubTableServer.tsx"},{name:"OrDivider",description:"Or divider component",category:"UI",repo_path:"src/components/ui/OrDivider.tsx"},{name:"Card",description:"Card component",category:"UI",repo_path:"src/components/ui/cards/Card.tsx"},{name:"CardList",description:"Card list component",category:"UI",repo_path:"src/components/ui/cards/CardList.tsx"},{name:"CardGrid",description:"Card grid component",category:"UI",repo_path:"src/components/ui/cards/CardGrid.tsx"},{name:"HorizontalCard",description:"Horizontal card component",category:"UI",repo_path:"src/components/ui/cards/HorizontalCard.tsx"},{name:"FeatureCard",description:"Feature card component",category:"UI",repo_path:"src/components/ui/cards/FeatureCard.tsx"},{name:"MediaCard",description:"Media card component",category:"UI",repo_path:"src/components/ui/cards/MediaCard.tsx"},{name:"PricingCard",description:"Pricing card component",category:"UI",repo_path:"src/components/ui/cards/PricingCard.tsx"},{name:"ProfileCard",description:"Profile card component",category:"UI",repo_path:"src/components/ui/cards/ProfileCard.tsx"},{name:"RandomGradientImage",description:"Random gradient image component",category:"UI",repo_path:"src/components/ui/images/RandomGradientImage.tsx"},{name:"Dialog",description:"A reusable dialog component",category:"UI",repo_path:"src/components/ui/dialogs/Dialog.tsx"},{name:"Badge",description:"A reusable Badge component",category:"UI",repo_path:"src/components/ui/Badge.tsx"},{name:"Action",description:"A reusable Action component",category:"UI",repo_path:"src/components/ui/Action.tsx"},{name:"Dropdown",description:"A reusable Dropdown component",category:"UI",repo_path:"src/components/ui/Dropdown.tsx"},{name:"ColorPicker",description:"A reusable ColorPicker component",category:"UI",repo_path:"src/components/ui/ColorPicker.tsx"},{name:"Pagination",description:"A reusable Pagination component",category:"UI",repo_path:"src/components/ui/pagination/Pagination.tsx"},{name:"PaginationDemo",description:"A demo for the Pagination component",category:"UI",repo_path:"src/components/ui/pagination/PaginationDemo.tsx"},{name:"CreateButton",description:"A reusable CreateButton component",category:"UI",repo_path:"src/components/ui/create-button/CreateButton.tsx"},{name:"CreateButtonExample",description:"An example of the CreateButton component",category:"UI",repo_path:"src/components/ui/create-button/CreateButtonExample.tsx"},{name:"ChangeStyleVariable",description:"Style variable changer component",category:"Theme",repo_path:"src/components/theme/ChangeStyleVariable.tsx"},{name:"DarkModeProvider",description:"Dark mode provider component",category:"Theme",repo_path:"src/components/theme/DarkModeProvider.tsx"},{name:"LoadingAnimate",description:"Loading animation component",category:"Theme",repo_path:"src/components/theme/LoadingAnimate.tsx"},{name:"SessionProviders",description:"Session providers component",category:"Theme",repo_path:"src/components/theme/SessionProviders.tsx"},{name:"SessionExpiresLogout",description:"Session expiration logout component",category:"Theme",repo_path:"src/components/theme/signout/SessionExpiresLogout.tsx"},{name:"SignOutSession",description:"Sign out session component",category:"Theme",repo_path:"src/components/theme/signout/SignOutSession.tsx"},{name:"TimeTracker",description:"Time tracking component",category:"Status",repo_path:"src/components/status/ReactTimeTracker.tsx"},{name:"SessionHandleProvider",description:"Session handling provider component",category:"Status",repo_path:"src/components/status/SessionHandleProvider.tsx"},{name:"Error500",description:"500 error display component",category:"Status",repo_path:"src/components/status/Error500.tsx"},{name:"ErrorState",description:"Error state display component",category:"Status",repo_path:"src/components/status/ErrorState.tsx"},{name:"ReactTimeTracker",description:"React time tracking component",category:"Status",repo_path:"src/components/status/ReactTimeTracker.tsx"},{name:"DeleteConfirmationModal",description:"Delete confirmation modal component",category:"Status",repo_path:"src/components/status/DeleteConfirmationModal.tsx"},{name:"CopyToClipboard",description:"Copy to clipboard functionality component",category:"Status",repo_path:"src/components/status/CopyToClipBoard.tsx"},{name:"MultiPurposeModal",description:"Multi-purpose modal component",category:"Status",repo_path:"src/components/status/MultiPurposeModal.tsx"},{name:"ModalExamples",description:"Modal examples component",category:"Status",repo_path:"src/components/status/ModalExamples.tsx"},{name:"NotFound",description:"Not found component",category:"Status",repo_path:"src/components/status/NotFound.tsx"},{name:"Unauthorized",description:"Unauthorized component",category:"Status",repo_path:"src/components/status/Unauthorized.tsx"},{name:"Tabs",description:"Tab navigation component",category:"Tabs",repo_path:"src/components/tabs/Tabs.tsx"},{name:"VeriticalTabs",description:"Vertical tab navigation component",category:"Tabs",repo_path:"src/components/tabs/VerticalTabs.tsx"},{name:"TabContent",description:"Tab content display component",category:"Tabs",repo_path:"src/components/tabs/TabContent.tsx"}].reduce((function(o,e){return o[e.category]||(o[e.category]=[]),o[e.category].push(e),o}),{}),r="https://github.com/instincthub/instincthub-react-ui/blob/main/";return e("div",{className:"ihub-component-lists",children:[t("h1",{className:"ihub-component-lists-title",children:"InstinctHub React UI Components"}),t("p",{className:"ihub-component-lists-description",children:"A comprehensive list of all available components in the InstinctHub React UI library."}),Object.entries(n).map((function(n){var a=o(n,2),s=a[0],c=a[1];return e("div",{className:"ihub-component-category",children:[t("h2",{className:"ihub-component-category-title",children:s}),t("div",{className:"ihub-component-grid",children:c.map((function(o){return e("div",{className:"ihub-component-card",children:[t("h3",{className:"ihub-component-name",children:o.name}),t("p",{className:"ihub-component-description",children:o.description}),t("a",{href:"".concat(r).concat(o.repo_path),target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link",onClick:function(e){e.preventDefault(),window.open("".concat(r).concat(o.repo_path),"_blank","noopener,noreferrer")},children:"View in Repository"})]},o.name)}))})]},s)}))]})};export{n as default};
|
|
2
|
+
//# sourceMappingURL=ComponentLists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentLists.js","sources":["../../../../src/components/ui/ComponentLists.tsx"],"sourcesContent":["import React from \"react\";\r\n\r\ninterface ComponentInfo {\r\n name: string;\r\n description: string;\r\n category: string;\r\n repo_path: string;\r\n}\r\n\r\nconst ComponentLists = () => {\r\n const components: ComponentInfo[] = [\r\n // Forms\r\n {\r\n name: \"ActionDropdown\",\r\n description: \"Dropdown component for actions\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/ActionDropdown.tsx\",\r\n },\r\n {\r\n name: \"AnimatedBox\",\r\n description: \"Animated container component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/AnimatedBox.tsx\",\r\n },\r\n {\r\n name: \"PasswordField\",\r\n description: \"Secure password input field\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/PasswordField.tsx\",\r\n },\r\n {\r\n name: \"DateInput\",\r\n description: \"Date selection input field\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/DateInput.tsx\",\r\n },\r\n {\r\n name: \"DateTimeInput\",\r\n description: \"Date and time selection input field\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/DateTimeInput.tsx\",\r\n },\r\n {\r\n name: \"DropFile\",\r\n description: \"File drag and drop component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/DropFile.tsx\",\r\n },\r\n {\r\n name: \"EmailList\",\r\n description: \"Email list display component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/EmailList.tsx\",\r\n },\r\n {\r\n name: \"FilterArray\",\r\n description: \"Array filtering component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/FilterArray.tsx\",\r\n },\r\n {\r\n name: \"FilterBy\",\r\n description: \"Filtering component with criteria\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/FilterBy.tsx\",\r\n },\r\n {\r\n name: \"FilterObjects\",\r\n description: \"Object filtering component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/FilterObjects.tsx\",\r\n },\r\n {\r\n name: \"FormError\",\r\n description: \"Form error display component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/FormError.tsx\",\r\n },\r\n {\r\n name: \"HandleError\",\r\n description: \"Error handling component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/HandleError.tsx\",\r\n },\r\n {\r\n name: \"Logout\",\r\n description: \"Logout functionality component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/Logout.tsx\",\r\n },\r\n {\r\n name: \"MessageDisplay\",\r\n description: \"Message display component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/MessageDisplay.tsx\",\r\n },\r\n {\r\n name: \"MultipleEmail\",\r\n description: \"Multiple email input component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/MultipleEmail.tsx\",\r\n },\r\n {\r\n name: \"PageLoading\",\r\n description: \"Page loading indicator component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/PageLoading.tsx\",\r\n },\r\n {\r\n name: \"PhoneNumberInput\",\r\n description: \"Phone number input with formatting\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/PhoneNumberInput.tsx\",\r\n },\r\n {\r\n name: \"RadioField\",\r\n description: \"Radio button input field\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/RadioField.tsx\",\r\n },\r\n {\r\n name: \"RadioSimple\",\r\n description: \"Simplified radio button component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/RadioSimple.tsx\",\r\n },\r\n {\r\n name: \"ReactTimeAgo\",\r\n description: \"Time ago display component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/ReactTimeAgo.tsx\",\r\n },\r\n {\r\n name: \"ReadTermsAndCondition\",\r\n description: \"Terms and conditions acceptance component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/ReadTermsAndCondition.tsx\",\r\n },\r\n {\r\n name: \"SearchField\",\r\n description: \"Search input field component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/SearchField.tsx\",\r\n },\r\n {\r\n name: \"SearchFieldDB\",\r\n description: \"Database search field component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/SearchFieldDB.tsx\",\r\n },\r\n {\r\n name: \"StepProgressBar\",\r\n description: \"Step progress indicator component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/StepProgressBar.tsx\",\r\n },\r\n {\r\n name: \"SubmitButton\",\r\n description: \"Form submission button component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/SubmitButton.tsx\",\r\n },\r\n {\r\n name: \"Tables\",\r\n description: \"Table display component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/Tables.tsx\",\r\n },\r\n {\r\n name: \"TextArea\",\r\n description: \"Multi-line text input component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/TextArea.tsx\",\r\n },\r\n {\r\n name: \"TextField\",\r\n description: \"Text input field component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/TextField.tsx\",\r\n },\r\n {\r\n name: \"Tooltip\",\r\n description: \"Tooltip display component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/Tooltip.tsx\",\r\n },\r\n {\r\n name: \"UnsplashRandomImage\",\r\n description: \"Random image from Unsplash component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/UnsplashRandomImage.tsx\",\r\n },\r\n {\r\n name: \"DownloadAsExcel\",\r\n description: \"Excel download functionality component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/DownloadAsExcel.tsx\",\r\n },\r\n {\r\n name: \"THeadSortBtn\",\r\n description: \"Table header sort button component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/THeadSortBtn.tsx\",\r\n },\r\n {\r\n name: \"THeadSortList\",\r\n description: \"Table header sort list component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/THeadSortList.tsx\",\r\n },\r\n {\r\n name: \"TBodyNoData\",\r\n description: \"Table body empty state component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/TBodyNoData.tsx\",\r\n },\r\n {\r\n name: \"FileUploader\",\r\n description: \"File upload component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/uploads/FileUploader.tsx\",\r\n },\r\n {\r\n name: \"IhubFileUploader\",\r\n description: \"InstinctHub file upload component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/uploads/IhubFileUploader.tsx\",\r\n },\r\n {\r\n name: \"ActionCallbackDropdown\",\r\n description: \"Action callback dropdown component\",\r\n category: \"Forms\",\r\n repo_path: \"src/components/forms/ActionCallbackDropdown.tsx\",\r\n },\r\n {\r\n name: \"InputNumber\",\r\n description: \"InputNumber component for numerical input\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/InputNumber.tsx\",\r\n },\r\n {\r\n name: \"InputText\",\r\n description: \"InputText component for text input\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/InputText.tsx\",\r\n },\r\n {\r\n name: \"InputTextarea\",\r\n description: \"InputTextarea component for text input\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/InputTextarea.tsx\",\r\n },\r\n {\r\n name: \"SearchObjectsFromDB\",\r\n description:\r\n \"SearchObjectsFromDB component for searching objects from database\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/SearchObjectsFromDB.tsx\",\r\n },\r\n {\r\n name: \"ToggleButton\",\r\n description: \"ToggleButton component for changing state.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/ToggleButton.tsx\",\r\n },\r\n {\r\n name: \"DateInputPicker\",\r\n description: \"DateInputPicker component for picking date and time.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/DateInputPicker.tsx\",\r\n },\r\n {\r\n name: \"ChipsInput\",\r\n description:\r\n \"ChipsInput is used to enter multiple values on an input field.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/ChipsInput.tsx\",\r\n },\r\n {\r\n name: \"RadioButton\",\r\n description:\r\n \"RadioButton is used to enter single value on an input field.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/radio-btn/RadioButton.tsx\",\r\n },\r\n {\r\n name: \"RadioGroup\",\r\n description:\r\n \"RadioGroup is used to select each from group value on an input field.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/radio-btn/RadioGroup.tsx\",\r\n },\r\n {\r\n name: \"InputAmount\",\r\n description: \"InputAmount is used to enter amount on an input field.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/InputAmount.tsx\",\r\n },\r\n {\r\n name: \"CheckBoxes\",\r\n description: \"CheckBoxes is used to enter multiple values on an input field.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/CheckBoxes.tsx\",\r\n },\r\n {\r\n name: \"CheckBoxesField\",\r\n description: \"CheckBoxesField is used to enter multiple values on an input field.\",\r\n category: \"Form\",\r\n repo_path: \"src/components/forms/CheckboxesField.tsx\",\r\n },\r\n\r\n // Auth\r\n {\r\n name: \"IsUsernameEmailTaken\",\r\n description: \"Username/email availability checker\",\r\n category: \"Auth\",\r\n repo_path: \"src/components/auth/IsUsernameEmailTaken.tsx\",\r\n },\r\n {\r\n name: \"ClientDetector\",\r\n description: \"Client device detection component\",\r\n category: \"Auth\",\r\n repo_path: \"src/components/auth/ClientDetector.tsx\",\r\n },\r\n {\r\n name: \"PasswordsMatch\",\r\n description: \"Password matching validation component\",\r\n category: \"Auth\",\r\n repo_path: \"src/components/auth/PasswordsMatch.tsx\",\r\n },\r\n {\r\n name: \"FromInstinctHub\",\r\n description: \"From InstinctHub component\",\r\n category: \"Auth\",\r\n repo_path: \"src/components/auth/FromInstinctHub.tsx\",\r\n },\r\n {\r\n name: \"LoginForm\",\r\n description: \"Login form component\",\r\n category: \"Auth\",\r\n repo_path: \"src/components/auth/LoginForm.tsx\",\r\n },\r\n \r\n\r\n // Navbar\r\n {\r\n name: \"ChannelListAvatar\",\r\n description: \"Channel list avatar component\",\r\n category: \"Navbar\",\r\n repo_path: \"src/components/navbar/ChannelListAvatar.tsx\",\r\n },\r\n {\r\n name: \"MenuDropdown\",\r\n description: \"Menu dropdown component\",\r\n category: \"Navbar\",\r\n repo_path: \"src/components/navbar/MenuDropdown.tsx\",\r\n },\r\n {\r\n name: \"Breadcrumb\",\r\n description: \"Breadcrumb component\",\r\n category: \"Navbar\",\r\n repo_path: \"src/components/navbar/Breadcrumb.tsx\",\r\n },\r\n {\r\n name: \"ResponsiveNavbar\",\r\n description: \"Responsive navbar component\",\r\n category: \"Navbar\",\r\n repo_path: \"src/components/navbar/ResponsiveNavbar.tsx\",\r\n },\r\n {\r\n name: \"SideNavbar\",\r\n description: \"Side navbar component\",\r\n category: \"Navbar\",\r\n repo_path: \"src/components/navbar/SideNavbar.tsx\",\r\n },\r\n\r\n // UI\r\n {\r\n name: \"CustomTextEditor\",\r\n description: \"Custom text editor component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/editor/CustomTextEditor.tsx\",\r\n },\r\n {\r\n name: \"ContentViewer\",\r\n description: \"Content viewer component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/viewer/ContentViewer.tsx\",\r\n },\r\n {\r\n name: \"ContentViewOrEdit\",\r\n description: \"Content view or edit component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/viewer/ContentViewOrEdit.tsx\",\r\n },\r\n {\r\n name: \"CodeDisplay\",\r\n description: \"Code display component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/viewer/CodeDisplay.tsx\",\r\n },\r\n {\r\n name: \"IHubTable\",\r\n description: \"InstinctHub table component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/tables/IHubTable.tsx\",\r\n },\r\n {\r\n name: \"IHubTableServer\",\r\n description: \"InstinctHub server table component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/tables/IHubTableServer.tsx\",\r\n },\r\n {\r\n name: \"OrDivider\",\r\n description: \"Or divider component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/OrDivider.tsx\",\r\n },\r\n {\r\n name: \"Card\",\r\n description: \"Card component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/Card.tsx\",\r\n },\r\n {\r\n name: \"CardList\",\r\n description: \"Card list component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/CardList.tsx\",\r\n },\r\n {\r\n name: \"CardGrid\",\r\n description: \"Card grid component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/CardGrid.tsx\",\r\n },\r\n {\r\n name: \"HorizontalCard\",\r\n description: \"Horizontal card component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/HorizontalCard.tsx\",\r\n },\r\n {\r\n name: \"FeatureCard\",\r\n description: \"Feature card component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/FeatureCard.tsx\",\r\n },\r\n {\r\n name: \"MediaCard\",\r\n description: \"Media card component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/MediaCard.tsx\",\r\n },\r\n {\r\n name: \"PricingCard\",\r\n description: \"Pricing card component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/PricingCard.tsx\",\r\n },\r\n {\r\n name: \"ProfileCard\",\r\n description: \"Profile card component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/cards/ProfileCard.tsx\",\r\n },\r\n {\r\n name: \"RandomGradientImage\",\r\n description: \"Random gradient image component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/images/RandomGradientImage.tsx\",\r\n },\r\n {\r\n name: \"Dialog\",\r\n description: \"A reusable dialog component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/dialogs/Dialog.tsx\",\r\n },\r\n {\r\n name: \"Badge\",\r\n description: \"A reusable Badge component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/Badge.tsx\",\r\n },\r\n {\r\n name: \"Action\",\r\n description: \"A reusable Action component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/Action.tsx\",\r\n },\r\n {\r\n name: \"Dropdown\",\r\n description: \"A reusable Dropdown component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/Dropdown.tsx\",\r\n },\r\n {\r\n name: \"ColorPicker\",\r\n description: \"A reusable ColorPicker component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/ColorPicker.tsx\",\r\n },\r\n {\r\n name: \"Pagination\",\r\n description: \"A reusable Pagination component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/pagination/Pagination.tsx\",\r\n },\r\n {\r\n name: \"PaginationDemo\",\r\n description: \"A demo for the Pagination component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/pagination/PaginationDemo.tsx\",\r\n },\r\n {\r\n name: \"CreateButton\",\r\n description: \"A reusable CreateButton component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/create-button/CreateButton.tsx\",\r\n },\r\n {\r\n name: \"CreateButtonExample\",\r\n description: \"An example of the CreateButton component\",\r\n category: \"UI\",\r\n repo_path: \"src/components/ui/create-button/CreateButtonExample.tsx\",\r\n },\r\n\r\n // Theme\r\n {\r\n name: \"ChangeStyleVariable\",\r\n description: \"Style variable changer component\",\r\n category: \"Theme\",\r\n repo_path: \"src/components/theme/ChangeStyleVariable.tsx\",\r\n },\r\n {\r\n name: \"DarkModeProvider\",\r\n description: \"Dark mode provider component\",\r\n category: \"Theme\",\r\n repo_path: \"src/components/theme/DarkModeProvider.tsx\",\r\n },\r\n {\r\n name: \"LoadingAnimate\",\r\n description: \"Loading animation component\",\r\n category: \"Theme\",\r\n repo_path: \"src/components/theme/LoadingAnimate.tsx\",\r\n },\r\n {\r\n name: \"SessionProviders\",\r\n description: \"Session providers component\",\r\n category: \"Theme\",\r\n repo_path: \"src/components/theme/SessionProviders.tsx\",\r\n },\r\n {\r\n name: \"SessionExpiresLogout\",\r\n description: \"Session expiration logout component\",\r\n category: \"Theme\",\r\n repo_path: \"src/components/theme/signout/SessionExpiresLogout.tsx\",\r\n },\r\n {\r\n name: \"SignOutSession\",\r\n description: \"Sign out session component\",\r\n category: \"Theme\",\r\n repo_path: \"src/components/theme/signout/SignOutSession.tsx\",\r\n },\r\n\r\n // Status\r\n {\r\n name: \"TimeTracker\",\r\n description: \"Time tracking component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/ReactTimeTracker.tsx\",\r\n },\r\n {\r\n name: \"SessionHandleProvider\",\r\n description: \"Session handling provider component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/SessionHandleProvider.tsx\",\r\n },\r\n {\r\n name: \"Error500\",\r\n description: \"500 error display component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/Error500.tsx\",\r\n },\r\n {\r\n name: \"ErrorState\",\r\n description: \"Error state display component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/ErrorState.tsx\",\r\n },\r\n {\r\n name: \"ReactTimeTracker\",\r\n description: \"React time tracking component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/ReactTimeTracker.tsx\",\r\n },\r\n {\r\n name: \"DeleteConfirmationModal\",\r\n description: \"Delete confirmation modal component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/DeleteConfirmationModal.tsx\",\r\n },\r\n {\r\n name: \"CopyToClipboard\",\r\n description: \"Copy to clipboard functionality component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/CopyToClipBoard.tsx\",\r\n },\r\n {\r\n name: \"MultiPurposeModal\",\r\n description: \"Multi-purpose modal component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/MultiPurposeModal.tsx\",\r\n },\r\n {\r\n name: \"ModalExamples\",\r\n description: \"Modal examples component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/ModalExamples.tsx\",\r\n },\r\n {\r\n name: \"NotFound\",\r\n description: \"Not found component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/NotFound.tsx\",\r\n },\r\n {\r\n name: \"Unauthorized\",\r\n description: \"Unauthorized component\",\r\n category: \"Status\",\r\n repo_path: \"src/components/status/Unauthorized.tsx\",\r\n },\r\n\r\n // Tabs\r\n {\r\n name: \"Tabs\",\r\n description: \"Tab navigation component\",\r\n category: \"Tabs\",\r\n repo_path: \"src/components/tabs/Tabs.tsx\",\r\n },\r\n {\r\n name: \"VeriticalTabs\",\r\n description: \"Vertical tab navigation component\",\r\n category: \"Tabs\",\r\n repo_path: \"src/components/tabs/VerticalTabs.tsx\",\r\n },\r\n {\r\n name: \"TabContent\",\r\n description: \"Tab content display component\",\r\n category: \"Tabs\",\r\n repo_path: \"src/components/tabs/TabContent.tsx\",\r\n },\r\n ];\r\n\r\n // Group components by category\r\n const groupedComponents = components.reduce((acc, component) => {\r\n if (!acc[component.category]) {\r\n acc[component.category] = [];\r\n }\r\n acc[component.category].push(component);\r\n return acc;\r\n }, {} as Record<string, ComponentInfo[]>);\r\n\r\n const baseRepoUrl =\r\n \"https://github.com/instincthub/instincthub-react-ui/blob/main/\";\r\n\r\n return (\r\n <div className=\"ihub-component-lists\">\r\n <h1 className=\"ihub-component-lists-title\">\r\n InstinctHub React UI Components\r\n </h1>\r\n <p className=\"ihub-component-lists-description\">\r\n A comprehensive list of all available components in the InstinctHub\r\n React UI library.\r\n </p>\r\n\r\n {Object.entries(groupedComponents).map(\r\n ([category, categoryComponents]) => (\r\n <div key={category} className=\"ihub-component-category\">\r\n <h2 className=\"ihub-component-category-title\">{category}</h2>\r\n <div className=\"ihub-component-grid\">\r\n {categoryComponents.map((component) => (\r\n <div key={component.name} className=\"ihub-component-card\">\r\n <h3 className=\"ihub-component-name\">{component.name}</h3>\r\n <p className=\"ihub-component-description\">\r\n {component.description}\r\n </p>\r\n <a\r\n href={`${baseRepoUrl}${component.repo_path}`}\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n className=\"ihub-component-link\"\r\n onClick={(e) => {\r\n e.preventDefault();\r\n window.open(\r\n `${baseRepoUrl}${component.repo_path}`,\r\n \"_blank\",\r\n \"noopener,noreferrer\"\r\n );\r\n }}\r\n >\r\n View in Repository\r\n </a>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n )\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default ComponentLists;\r\n"],"names":["ComponentLists","groupedComponents","name","description","category","repo_path","reduce","acc","component","push","baseRepoUrl","_jsxs","className","children","_jsx","Object","entries","map","_ref","_ref2","_slicedToArray","categoryComponents","href","concat","target","rel","onClick","e","preventDefault","window","open"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{objectSpread2 as a}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useRouter as n,useSearchParams as t}from"next/navigation";var r=function(r){var o=r.label,s=void 0===o?"Create":o,l=r.searchParam,u=r.onClick,c=r.variant,h=void 0===c?"important":c,b=r.disabled,d=void 0!==b&&b,m=r.className,p=void 0===m?"":m,v=r.size,g=void 0===v?"medium":v,f=r.loading,k=void 0!==f&&f,w=r.icon,N=r.animated,j=void 0===N||N,x=r.buttonProps,C=n(),y=t();return i("button",a(a({type:"button",className:function(){var a=[];switch(h){case"primary":a.push("ihub-primary-btn");break;case"outlined":a.push("ihub-outlined-btn");break;case"danger":a.push("ihub-danger-btn");break;default:a.push("ihub-important-btn")}switch(g){case"small":a.push("ihub-btn-small");break;case"large":a.push("ihub-btn-large")}return j&&a.push("ihub-anime-button"),k&&a.push("ihub-btn-loading"),p&&a.push(p),a.join(" ")}(),onClick:function(){if(!d&&!k)if(l){var a=new URLSearchParams(y.toString());a.set(l.key,l.value);var i="".concat(window.location.pathname,"?").concat(a.toString());C.replace(i)}else u&&u()},disabled:d||k},x),{},{children:[k&&e("div",{className:"ihub-btn-spinner",children:e("div",{className:"ihub-spinner"})}),w&&!k&&e("span",{className:"ihub-btn-icon",children:w}),e("span",{className:"ihub-btn-text",children:k?"Creating...":s}),j&&!k&&e("svg",{id:"animate",className:"ihub-btn-arrow",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M3 8h10m0 0l-3-3m3 3l-3 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}))};export{r as default};
|
|
2
|
+
//# sourceMappingURL=CreateButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import i from"./CreateButton.js";var l=function(){var l=function(){alert("Fallback function called!")};return e("div",{className:"ihub-create-button-demo",children:[a("h2",{children:"Create Button Component Examples"}),e("div",{className:"ihub-button-grid",children:[e("div",{className:"ihub-button-example",children:[a("h3",{children:"With Search Parameter"}),a(i,{label:"Create Course",searchParam:{key:"create",value:"course"},variant:"important",animated:!0})]}),e("div",{className:"ihub-button-example",children:[a("h3",{children:"With Fallback Function"}),a(i,{label:"Create Project",onClick:l,variant:"primary",animated:!0})]}),e("div",{className:"ihub-button-example",children:[a("h3",{children:"Different Variants"}),e("div",{className:"ihub-button-row",children:[a(i,{label:"Important",variant:"important",onClick:l}),a(i,{label:"Outlined",variant:"outlined",onClick:l}),a(i,{label:"Primary",variant:"primary",onClick:l})]})]}),e("div",{className:"ihub-button-example",children:[a("h3",{children:"Loading State"}),a(i,{label:"Create",loading:!0,variant:"important"})]}),e("div",{className:"ihub-button-example",children:[a("h3",{children:"With Icon"}),a(i,{label:"Add New",icon:a("span",{children:"+"}),onClick:l,variant:"important"})]}),e("div",{className:"ihub-button-example",children:[a("h3",{children:"Different Sizes"}),e("div",{className:"ihub-button-row",children:[a(i,{label:"Small",size:"small",onClick:l}),a(i,{label:"Medium",size:"medium",onClick:l}),a(i,{label:"Large",size:"large",onClick:l})]})]})]})]})};export{l as default};
|
|
2
|
+
//# sourceMappingURL=CreateButtonExample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateButtonExample.js","sources":["../../../../../src/components/ui/create-button/CreateButtonExample.tsx"],"sourcesContent":["import CreateButton from \"./CreateButton\";\r\n\r\n// Example usage component\r\nconst CreateButtonExample: React.FC = () => {\r\n const handleFallbackClick = (): void => {\r\n alert(\"Fallback function called!\");\r\n };\r\n\r\n return (\r\n <div className=\"ihub-create-button-demo\">\r\n <h2>Create Button Component Examples</h2>\r\n \r\n <div className=\"ihub-button-grid\">\r\n {/* With search parameter */}\r\n <div className=\"ihub-button-example\">\r\n <h3>With Search Parameter</h3>\r\n <CreateButton\r\n label=\"Create Course\"\r\n searchParam={{ key: \"create\", value: \"course\" }}\r\n variant=\"important\"\r\n animated={true}\r\n />\r\n </div>\r\n\r\n {/* With fallback function */}\r\n <div className=\"ihub-button-example\">\r\n <h3>With Fallback Function</h3>\r\n <CreateButton\r\n label=\"Create Project\"\r\n onClick={handleFallbackClick}\r\n variant=\"primary\"\r\n animated={true}\r\n />\r\n </div>\r\n\r\n {/* Different variants */}\r\n <div className=\"ihub-button-example\">\r\n <h3>Different Variants</h3>\r\n <div className=\"ihub-button-row\">\r\n <CreateButton\r\n label=\"Important\"\r\n variant=\"important\"\r\n onClick={handleFallbackClick}\r\n />\r\n <CreateButton\r\n label=\"Outlined\"\r\n variant=\"outlined\"\r\n onClick={handleFallbackClick}\r\n />\r\n <CreateButton\r\n label=\"Primary\"\r\n variant=\"primary\"\r\n onClick={handleFallbackClick}\r\n />\r\n </div>\r\n </div>\r\n\r\n {/* With loading state */}\r\n <div className=\"ihub-button-example\">\r\n <h3>Loading State</h3>\r\n <CreateButton\r\n label=\"Create\"\r\n loading={true}\r\n variant=\"important\"\r\n />\r\n </div>\r\n\r\n {/* With icon */}\r\n <div className=\"ihub-button-example\">\r\n <h3>With Icon</h3>\r\n <CreateButton\r\n label=\"Add New\"\r\n icon={<span>+</span>}\r\n onClick={handleFallbackClick}\r\n variant=\"important\"\r\n />\r\n </div>\r\n\r\n {/* Different sizes */}\r\n <div className=\"ihub-button-example\">\r\n <h3>Different Sizes</h3>\r\n <div className=\"ihub-button-row\">\r\n <CreateButton\r\n label=\"Small\"\r\n size=\"small\"\r\n onClick={handleFallbackClick}\r\n />\r\n <CreateButton\r\n label=\"Medium\"\r\n size=\"medium\"\r\n onClick={handleFallbackClick}\r\n />\r\n <CreateButton\r\n label=\"Large\"\r\n size=\"large\"\r\n onClick={handleFallbackClick}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default CreateButtonExample;"],"names":["CreateButtonExample","handleFallbackClick","alert","_jsxs","className","children","_jsx","CreateButton","label","searchParam","key","value","variant","animated","onClick","loading","icon","size"],"mappings":"mFAGA,IAAMA,EAAgC,WACpC,IAAMC,EAAsB,WAC1BC,MAAM,8BAGR,OACEC,EAAA,MAAA,CAAKC,UAAU,0BAAyBC,SAAA,CACtCC,EAAyC,KAAA,CAAAD,SAAA,qCAEzCF,EAAK,MAAA,CAAAC,UAAU,mBAEbC,SAAA,CAAAF,EAAA,MAAA,CAAKC,UAAU,sBAAqBC,SAAA,CAClCC,EAA8B,KAAA,CAAAD,SAAA,0BAC9BC,EAACC,EACC,CAAAC,MAAM,gBACNC,YAAa,CAAEC,IAAK,SAAUC,MAAO,UACrCC,QAAQ,YACRC,UAAU,OAKdV,EAAA,MAAA,CAAKC,UAAU,sBAAqBC,SAAA,CAClCC,EAA+B,KAAA,CAAAD,SAAA,2BAC/BC,EAACC,EACC,CAAAC,MAAM,iBACNM,QAASb,EACTW,QAAQ,UACRC,UAAU,OAKdV,EAAA,MAAA,CAAKC,UAAU,sBAAqBC,SAAA,CAClCC,EAA2B,KAAA,CAAAD,SAAA,uBAC3BF,EAAK,MAAA,CAAAC,UAAU,kBACbC,SAAA,CAAAC,EAACC,EAAY,CACXC,MAAM,YACNI,QAAQ,YACRE,QAASb,IAEXK,EAACC,EAAY,CACXC,MAAM,WACNI,QAAQ,WACRE,QAASb,IAEXK,EAACC,EAAY,CACXC,MAAM,UACNI,QAAQ,UACRE,QAASb,UAMfE,EAAK,MAAA,CAAAC,UAAU,sBACbC,SAAA,CAAAC,EAAA,KAAA,CAAAD,SAAA,kBACAC,EAACC,EAAY,CACXC,MAAM,SACNO,SAAS,EACTH,QAAQ,iBAKZT,EAAK,MAAA,CAAAC,UAAU,sBACbC,SAAA,CAAAC,EAAA,KAAA,CAAAD,SAAA,cACAC,EAACC,EAAY,CACXC,MAAM,UACNQ,KAAMV,EAAc,OAAA,CAAAD,SAAA,MACpBS,QAASb,EACTW,QAAQ,iBAKZT,EAAA,MAAA,CAAKC,UAAU,sBAAqBC,SAAA,CAClCC,EAAwB,KAAA,CAAAD,SAAA,oBACxBF,EAAK,MAAA,CAAAC,UAAU,kBACbC,SAAA,CAAAC,EAACC,EAAY,CACXC,MAAM,QACNS,KAAK,QACLH,QAASb,IAEXK,EAACC,EAAY,CACXC,MAAM,SACNS,KAAK,SACLH,QAASb,IAEXK,EAACC,EAAY,CACXC,MAAM,QACNS,KAAK,QACLH,QAASb,eAOvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{slicedToArray as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as i}from"react/jsx-runtime";import o from"react";import{useEditor as n,EditorContent as r}from"../../../../node_modules/@tiptap/react/dist/index.js";import{StarterKit as d}from"../../../../node_modules/@tiptap/starter-kit/dist/index.js";import{Image as s}from"../../../../node_modules/@tiptap/extension-image/dist/index.js";import{Link as a}from"../../../../node_modules/@tiptap/extension-link/dist/index.js";import{Table as p}from"../../../../node_modules/@tiptap/extension-table/dist/index.js";import{TableRow as m}from"../../../../node_modules/@tiptap/extension-table-row/dist/index.js";import{TableCell as l}from"../../../../node_modules/@tiptap/extension-table-cell/dist/index.js";import{TableHeader as c}from"../../../../node_modules/@tiptap/extension-table-header/dist/index.js";import{CodeBlock as u}from"../../../../node_modules/@tiptap/extension-code-block/dist/index.js";import{Highlight as h}from"../../../../node_modules/@tiptap/extension-highlight/dist/index.js";import{TaskList as x}from"../../../../node_modules/@tiptap/extension-task-list/dist/index.js";import{TaskItem as f}from"../../../../node_modules/@tiptap/extension-task-item/dist/index.js";import{Placeholder as g}from"../../../../node_modules/@tiptap/extension-placeholder/dist/index.js";import{CharacterCount as j}from"../../../../node_modules/@tiptap/extension-character-count/dist/index.js";import b from"./MenuBar.js";import{formatDateToWord as _}from"../../lib/helpFunction.js";function v(v){var w=v.label,k=v.name,B=void 0===k?"editor-content":k,C=v.note,E=v.onChange,L=v.setIsEditing,N=v.content,P=v.isEditing,H=void 0!==P&&P,M=v.charLimit,T=void 0===M?5e3:M,q=v.placeholder,y=void 0===q?"Begin writing here...":q,F=v.lastUpdated,I=void 0===F?"":F,U=v.showPreviewBtn,z=void 0!==U&&U,A=v.required,O=void 0!==A&&A,S=o.useState(N||""),D=e(S,2),G=D[0],J=D[1],K=n({extensions:[d,s,a.configure({openOnClick:!1}),p.configure({resizable:!0}),m,l,c,u,h,x,f.configure({nested:!0}),g.configure({placeholder:y}),j.configure({limit:T})],editorProps:{attributes:{class:"ihub-editor-content"}},content:G,onUpdate:function(e){var t=e.editor;E&&E(t.getHTML()),J(t.getHTML())}});return t("div",{className:"ihub-editor",children:[w&&i("label",{htmlFor:B,children:w}),i(b,{editor:K,isEditing:H,setIsEditing:L,showPreviewBtn:z}),i(r,{editor:K,className:"ihub-editor-content-wrapper",required:O}),i("input",{type:"hidden",value:G,name:B}),K&&t("div",{className:"ihub-editor-char-count",children:[i("p",{children:I?"Last updated: ".concat(_(I)):""}),t("p",{children:[K.storage.characterCount.words()," words:"," ",K.storage.characterCount.characters()/T,"/",T," ","characters"]})]}),C&&i("p",{className:"ihub-editor-note",children:C})]})}export{v as default};
|
|
2
2
|
//# sourceMappingURL=CustomTextEditor.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{slicedToArray as a,asyncToGenerator as n,regeneratorRuntime as i}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import l from"next/link";import{reqOptions as c,fetchAPI as s}from"../../lib/helpFunction.js";import"../../lib/utils.js";import{useSearchParams as u}from"next/navigation";var h=function(a){if(!a)return null;try{return new URL(a).searchParams.get("offset")}catch(a){return null}},d=function(d){var p=d.data,g=d.limit,f=d.urlPath,m=d.setData,b=d.token,v=void 0===b?null:b,w=d.tabsValues,x=void 0===w?"":w,N=d.searchValues,L=void 0===N?"":N,k=d.rangeLimit,y=void 0===k?5:k,P=d.className,G=void 0===P?"":P,I=d.showFirstLast,M=void 0===I||I,R=u(),j=R.get("offset")||"0",C=R.get("search")||"",S=o([]),U=a(S,2),B=U[0],F=U[1],T=o(0),A=a(T,2),V=A[0],Z=A[1],_=o(y||5),D=a(_,2),E=D[0],H=D[1],O=o(!1),q=a(O,2),z=q[0],J=q[1],K=Number(j),Q=Math.floor(K/g),W=h((null==p?void 0:p.next)||""),X=h((null==p?void 0:p.previous)||""),Y=function(){var a=n(i().mark((function a(n){var t,e,o,r,l;return i().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return J(!0),a.prev=1,t=c("GET",null,v),e=void 0!==n?"&offset=".concat(n):"",o=L||C?"&search=".concat(encodeURIComponent(L||C)):"",r=x?"&cat=".concat(encodeURIComponent(x)):"",l="".concat(f,"?limit=").concat(g).concat(e).concat(o).concat(r),console.log("searchOffset: ",n,l),a.next=10,s(m,l,t,!0);case 10:a.next=15;break;case 12:a.prev=12,a.t0=a.catch(1),console.error("Pagination fetch error:",a.t0);case 15:return a.prev=15,$(),J(!1),a.finish(15);case 19:case"end":return a.stop()}}),a,null,[[1,12,15,19]])})));return function(n){return a.apply(this,arguments)}}(),$=function(){console.log("updatePageRange called with currentPageIndex:",Q,y),Q+1>=y?(Z(Q-2),H(Q+3)):(Z(0),H(y))};if(r((function(){if(K>0||x||L||C?Y(K):Y(),null!=p&&p.count){var a=Math.ceil(p.count/g);F(Array.from({length:a},(function(a,n){return n})))}}),[j,null==p?void 0:p.count,x,g]),r((function(){if("undefined"!=typeof window){var a=new URLSearchParams(window.location.search);a.set("offset","0"),window.history.replaceState({},"","".concat(window.location.pathname,"?").concat(a.toString()))}}),[L,C]),!B.length&&!z)return null;var aa=B.length,na=0===Q,ia=Q===aa-1,ta=B.slice(V,E);return t("div",{className:"ihub-pagination-container ".concat(G),role:"navigation","aria-label":"Pagination",children:[z&&t("div",{className:"ihub-pagination-loading",children:[e("div",{className:"ihub-loading-spinner"}),e("span",{children:"Loading..."})]}),t("ul",{className:"ihub-pagination-list",children:[t("div",{className:"ihub-pagination-nav-group",children:[M&&e("li",{className:"ihub-pagination-item ".concat(na?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=0",className:"ihub-pagination-link ihub-pagination-first","aria-label":"Go to first page",tabIndex:na?-1:0,children:"First"})}),e("li",{className:"ihub-pagination-item ".concat(na||null==p||!p.previous?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=".concat(X||0),className:"ihub-pagination-link ihub-pagination-previous","aria-label":"Go to previous page",tabIndex:na||null==p||!p.previous?-1:0,children:e("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e("path",{d:"M7.66927 1.83333L3.08594 6.41667L7.66927 11L6.7526 12.8333L0.335938 6.41667L6.7526 0L7.66927 1.83333Z",fill:"currentColor"})})})})]}),e("div",{className:"ihub-pagination-pages",children:ta.map((function(a){var n=Q===a,i=a+1;return e("li",{className:"ihub-pagination-item ".concat(n?"ihub-pagination-active":""),"data-page":i,children:e(l,{href:"?offset=".concat(a*g),className:"ihub-pagination-link ihub-pagination-number","aria-label":"Go to page ".concat(i),"aria-current":n?"page":void 0,children:i})},a)}))}),t("div",{className:"ihub-pagination-nav-group ".concat(null!=p&&p.next?"":"ihub-pagination-disabled"),children:[e("li",{className:"ihub-pagination-item ".concat(ia||null==p||!p.next?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=".concat(W||K),className:"ihub-pagination-link ihub-pagination-next","aria-label":"Go to next page",tabIndex:ia||null==p||!p.next?-1:0,children:e("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e("path",{d:"M0.330731 1.83333L4.91406 6.41667L0.330731 11L1.2474 12.8333L7.66406 6.41667L1.2474 0L0.330731 1.83333Z",fill:"currentColor"})})})}),M&&e("li",{className:"ihub-pagination-item ".concat(ia?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=".concat((aa-1)*g),className:"ihub-pagination-link ihub-pagination-last","aria-label":"Go to last page",tabIndex:ia?-1:0,children:"Last"})})]})]}),e("div",{className:"ihub-pagination-info",children:t("span",{className:"ihub-pagination-summary",children:["Showing ",Math.min(K+1,(null==p?void 0:p.count)||0)," to"," ",Math.min(K+g,(null==p?void 0:p.count)||0)," of"," ",(null==p?void 0:p.count)||0," results"]})})]})};export{d as default};
|
|
2
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{slicedToArray as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as t}from"react";import{API_HOST_URL as a}from"../../lib/helpFunction.js";import"../../lib/utils.js";import n from"./Pagination.js";var l=function(){var l=t({count:150,next:"http://127.0.0.1:8000/api/v1/posts/?limit=20&offset=20",previous:null,results:[]}),o=e(l,2),s=o[0],d=o[1],c=t(""),p=e(c,2),u=p[0],h=p[1],m=t(""),v=e(m,2),g=v[0],f=v[1],b=t("0"),y=e(b,2),x=y[0],C=y[1];return r("div",{style:{padding:"2rem",fontFamily:"var(--Nunito, sans-serif)"},children:[i("h2",{style:{marginBottom:"2rem",color:"var(--DarkCyan)"},children:"Enhanced Pagination with API Integration"}),r("div",{style:{marginBottom:"2rem",display:"flex",gap:"1rem",flexWrap:"wrap"},children:[r("div",{children:[i("label",{children:"Search: "}),i("input",{type:"text",value:u,onChange:function(e){return r=e.target.value,h(r),void C("0");var r},placeholder:"Search posts...",style:{padding:"0.5rem",border:"1px solid #ccc",borderRadius:"4px"}})]}),r("div",{children:[i("label",{children:"Category: "}),r("select",{value:g,onChange:function(e){return r=e.target.value,f(r),void C("0");var r},style:{padding:"0.5rem",border:"1px solid #ccc",borderRadius:"4px"},children:[i("option",{value:"",children:"All Categories"}),i("option",{value:"tech",children:"Technology"}),i("option",{value:"design",children:"Design"}),i("option",{value:"business",children:"Business"})]})]})]}),r("div",{style:{marginBottom:"2rem",padding:"1rem",backgroundColor:"#f8f9fa",borderRadius:"8px"},children:[i("h3",{children:"Current State:"}),r("p",{children:["Offset: ",x]}),r("p",{children:['Search: "',u,'"']}),r("p",{children:['Tab: "',g,'"']}),r("p",{children:["Total items: ",s.count]})]}),i(n,{offset:x,data:s,limit:20,urlPath:a+"posts/",setData:d,token:"mock-token",searchValues:u,tabsValues:g,rangeLimit:5,showFirstLast:!0})]})};export{l as default};
|
|
2
|
+
//# sourceMappingURL=PaginationDemo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationDemo.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e,objectSpread2 as t,toConsumableArray as n,asyncToGenerator as r,regeneratorRuntime as a}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";import c,{useRef as l,useState as s,useCallback as u,useEffect as d}from"react";import h from"@mui/icons-material/FileDownloadOutlined";import p from"@mui/icons-material/RefreshOutlined";import b from"@mui/icons-material/InventoryOutlined";import m from"@mui/icons-material/ExpandMoreOutlined";import f from"@mui/icons-material/ExpandLessOutlined";import"../../../../node_modules/lodash/lodash.js";import"next-auth/react";import"next/navigation";import{getNestedValue as g,reqOptions as v,API_HOST_URL as N}from"../../lib/helpFunction.js";import"../../lib/utils.js";import{l as x}from"../../../../_virtual/lodash.js";function P(P){var y=P.token,k=P.columns,w=P.defaultData,C=P.endpointPath,S=P.initialParams,E=void 0===S?{}:S,j=P.dataAdapter,R=P.title,O=P.emptyStateMessage,M=void 0===O?"No data available":O,A=P.emptyStateIcon,L=void 0===A?i(b,{}):A,F=P.actions,H=P.showSearch,D=void 0===H||H,U=P.searchPlaceholder,_=void 0===U?"Search...":U,I=P.searchDebounceMs,T=void 0===I?1e3:I,B=P.enableSorting,G=void 0===B||B,J=P.enableExport,V=void 0!==J&&J,q=P.exportOptions,z=void 0===q?{csv:!0}:q,K=P.rowsPerPageOptions,Q=void 0===K?[10,25,50,100]:K,W=P.defaultRowsPerPage,X=void 0===W?10:W,Y=P.onRowClick,Z=P.onFetchError,$=P.expandable,ee=void 0!==$&&$,te=P.renderExpandedRow,ne=P.keyExtractor,re=void 0===ne?function(e){return JSON.stringify(e)}:ne,ae=P.stickyHeader,ie=void 0!==ae&&ae,oe=P.maxHeight,ce=P.hideHeaderOnMobile,le=void 0!==ce&&ce,se=l(!0),ue=l(null),de=s(w||[]),he=e(de,2),pe=he[0],be=he[1],me=s(!0),fe=e(me,2),ge=fe[0],ve=fe[1],Ne=s(null),xe=e(Ne,2),Pe=xe[0],ye=xe[1],ke=s({totalCount:0,currentPage:1,perPage:X,totalPages:0}),we=e(ke,2),Ce=we[0],Se=we[1],Ee=s(t({page:1,limit:X},E)),je=e(Ee,2),Re=je[0],Oe=je[1],Me=s([]),Ae=e(Me,2),Le=Ae[0],Fe=Ae[1],He=s(E.search||""),De=e(He,2),Ue=De[0],_e=De[1],Ie=u(x.exports.debounce((function(e){Oe((function(n){return t(t({},n),{},{search:e,page:1})}))}),T),[]),Te={data:w||[],pagination:{totalCount:null==w?void 0:w.length,currentPage:"",perPage:10,totalPages:Math.ceil(((null==w?void 0:w.length)||10)/10)},links:{next:"",previous:""}},Be=u(function(){var e=r(a().mark((function e(t){var n,r,i,o,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ve(!0),e.prev=1,C){e.next=4;break}return e.abrupt("return",Te);case 4:return n=new URLSearchParams({limit:t.limit.toString(),offset:((t.page-1)*t.limit).toString()}),t.search&&n.append("search",t.search),t.sort&&(r="desc"===t.direction?"-":"",n.append("ordering","".concat(r).concat(t.sort))),i=v("GET",null,y),o="".concat(N).concat(C,"?").concat(n.toString()),console.log("url: ",o,y),e.next=12,fetch(o,i);case 12:return c=e.sent,e.next=15,c.json();case 15:return l=e.sent,e.abrupt("return",{data:l.results,pagination:{totalCount:l.count,currentPage:Math.floor(parseInt(new URLSearchParams(l.next).get("offset")||"0")/t.limit),perPage:t.limit,totalPages:Math.ceil(l.count/t.limit)},links:{next:l.next,previous:l.previous}});case 19:throw e.prev=19,e.t0=e.catch(1),console.error("Error fetching program courses:",e.t0),e.t0;case 23:return e.prev=23,ve(!1),e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[1,19,23,26]])})));return function(t){return e.apply(this,arguments)}}(),[]),Ge=u((function(e){var t=e.target.value;_e(t),Ie(t)}),[Ie]),Je=u((function(e){Oe((function(n){return t(t({},n),{},{page:e})}))}),[]),Ve=u((function(e){Oe((function(n){return t(t({},n),{},{page:1,limit:e})}))}),[]),qe=u((function(e){if(G&&e.sortable&&"string"==typeof e.accessor){var n=e.accessor;Oe((function(e){return e.sort===n?t(t({},e),{},{direction:"asc"===e.direction?"desc":"asc"}):t(t({},e),{},{sort:n,direction:"asc"})}))}}),[G]),ze=u((function(){Oe((function(e){return t({},e)}))}),[]),Ke=u(function(){var e=r(a().mark((function e(r){var i,o,c,l,s,u,d,h,p,b;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,ve(!0),i=t(t({},Re),{},{page:1,limit:1e3,export:r}),e.next=7,Be(i);case 7:(o=e.sent)&&(c=j?j(o).data:o.data,l=z.fileName||"table-export","csv"===r&&(s=k.filter((function(e){return"string"==typeof e.accessor})).map((function(e){return e.header})),u=c.map((function(e){return k.filter((function(e){return"string"==typeof e.accessor})).map((function(t){var n,r=t.accessor;return String(null!==(n=e[r])&&void 0!==n?n:"")})).join(",")})),d=[s.join(",")].concat(n(u)).join("\n"),h=new Blob([d],{type:"text/csv;charset=utf-8;"}),p=document.createElement("a"),b=URL.createObjectURL(h),p.setAttribute("href",b),p.setAttribute("download","".concat(l,".csv")),p.style.visibility="hidden",document.body.appendChild(p),p.click(),document.body.removeChild(p))),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),console.error("Export error:",e.t0),Z&&Z(e.t0);case 15:return e.prev=15,ve(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,11,15,18]])})));return function(t){return e.apply(this,arguments)}}(),[k,Re,V,z,j,Z]),Qe=u((function(e,t){t.stopPropagation(),Fe((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(n(t),[e])}))}),[]);return d((function(){var e=!0,t=function(){var t=r(a().mark((function t(){var n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,ve(!0),t.next=4,Be(Re);case 4:n=t.sent,e&&(j?(r=j(n),be(r.data),r.pagination&&Se(r.pagination)):n&&(be(n.data),n.pagination&&Se(n.pagination)),ye(null)),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),console.error("Error fetching data:",t.t0),e&&(ye(t.t0),Z&&Z(t.t0));case 12:return t.prev=12,e&&(ve(!1),se.current=!1),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,8,12,15]])})));return function(){return t.apply(this,arguments)}}();return t(),function(){e=!1}}),[Re,j,Z]),ge&&se.current?o("div",{className:"ihub-data-list-container",children:[R&&i("h2",{children:R}),i("div",{className:"ihub-loading-state",children:i("p",{children:"Loading data..."})})]}):Pe&&!ge&&0===pe.length?o("div",{className:"ihub-data-list-container",children:[R&&i("h2",{children:R}),o("div",{className:"ihub-error-state",children:[i("p",{children:"Error loading data. Please try again."}),i("button",{className:"ihub-important-btn",onClick:ze,children:"Retry"})]})]}):o("div",{className:"ihub-data-list-container",ref:ue,children:[(R||F||D||V)&&o("div",{className:"ihub-data-list-header ihub-table-header ihub-p-0",children:[i("div",{children:R&&i("h2",{children:R})}),o("div",{className:"ihub-table-controls",children:[D&&i("div",{className:"ihub-table-search",children:o("div",{className:"ihub-search-input-wrapper",children:[i("input",{type:"text",placeholder:_,value:Ue,onChange:Ge,className:"ihub-search-input"}),ge&&i("div",{className:"ihub-search-loading-indicator",children:i("span",{className:"ihub-loading-dot"})})]})}),V&&o("div",{className:"ihub-export-buttons",children:[z.csv&&o("button",{className:"ihub-export-button ihub-export-csv",onClick:function(){return Ke("csv")},disabled:ge,children:[i(h,{}),"CSV"]}),z.excel&&o("button",{className:"ihub-export-button ihub-export-excel",onClick:function(){return Ke("excel")},disabled:ge,children:[i(h,{}),"Excel"]}),z.pdf&&o("button",{className:"ihub-export-button ihub-export-pdf",onClick:function(){return Ke("pdf")},disabled:ge,children:[i(h,{}),"PDF"]})]}),o("button",{className:"ihub-refresh-button",onClick:ze,disabled:ge,children:[i(p,{}),"Refresh"]}),F&&i("div",{className:"ihub-data-controls ihub-mb-0",children:F})]})]}),ge&&!se.current&&i("div",{className:"ihub-table-loading-overlay",children:i("div",{className:"ihub-loading-spinner"})}),o("div",{className:"ihub-scroll-container ".concat(ie?"ihub-sticky-header":""),style:oe?{maxHeight:oe}:void 0,children:[o("table",{className:"ihub-table ihub-scroll-container",children:[i("thead",{className:le?"ihub-hide-on-mobile":"",children:o("tr",{children:[ee&&te&&i("th",{style:{width:"40px"}}),k.map((function(e,t){return i("th",{className:"".concat(e.sortable&&G?"ihub-sortable-column":""," ").concat(Re.sort===e.accessor?"ihub-sorted-".concat(Re.direction):""),style:e.width?{width:e.width}:void 0,onClick:function(){return e.sortable&&G?qe(e):void 0},children:o("div",{className:"ihub-column-header",children:[i("span",{children:e.header}),e.sortable&&G&&i("span",{className:"ihub-sort-icon",children:Re.sort===e.accessor&&"asc"===Re.direction?"▲":Re.sort===e.accessor&&"desc"===Re.direction?"▼":"⇅"})]})},t)}))]})}),ge||0!==pe.length?i("tbody",{children:pe.map((function(e,t){var n=re(e),r=Le.includes(n);return o(c.Fragment,{children:[o("tr",{onClick:function(){return Y&&Y(e)},className:Y?"ihub-clickable-row":"",children:[ee&&te&&i("td",{onClick:function(e){return Qe(n,e)},children:i(r?f:m,{})}),k.map((function(t,n){return i("td",{"data-label":le?t.header:void 0,children:t.tooltip&&"string"==typeof t.accessor?i("div",{className:"ihub-cell-tooltip","data-tooltip":String(g(e,t.accessor)),children:t.cell?t.cell(e):g(e,t.accessor)}):t.cell?t.cell(e):"function"==typeof t.accessor?t.accessor(e):g(e,t.accessor)},n)}))]}),ee&&te&&r&&i("tr",{className:"ihub-expanded-row",children:i("td",{colSpan:k.length+1,children:i("div",{className:"ihub-row-details",children:te(e)})})})]},n)}))}):""]}),ge||0!==pe.length?"":o("div",{className:"ihub-data-list-container",children:[F&&i("div",{className:"ihub-data-controls ihub-mb-0",children:F}),i("div",{className:"ihub-empty-state",children:o("div",{children:[L,i("p",{children:M})]})})]})]}),Ce&&Ce.totalPages>1&&o("div",{className:"ihub-table-pagination",children:[o("div",{className:"ihub-pagination-info",children:["Showing ",(Ce.currentPage-1)*Ce.perPage+1," to"," ",Math.min(Ce.currentPage*Ce.perPage,Ce.totalCount)," ","of ",Ce.totalCount," entries"]}),o("div",{className:"ihub-pagination-controls",children:[i("button",{className:"ihub-pagination-button",disabled:1===Ce.currentPage||ge,onClick:function(){return Je(1)},children:"«"}),i("button",{className:"ihub-pagination-button",disabled:1===Ce.currentPage||ge,onClick:function(){return Je(Ce.currentPage-1)},children:"‹"}),Array.from({length:Math.min(5,Ce.totalPages)},(function(e,t){var n;return n=Ce.totalPages<=5||Ce.currentPage<=3?t+1:Ce.currentPage>=Ce.totalPages-2?Ce.totalPages-4+t:Ce.currentPage-2+t,i("button",{className:"ihub-pagination-button ".concat(Ce.currentPage===n?"ihub-active":""),onClick:function(){return Je(Number(n))},disabled:ge,children:n},n)})),i("button",{className:"ihub-pagination-button",disabled:Ce.currentPage===Ce.totalPages||ge,onClick:function(){return Je(Ce.currentPage+1)},children:"›"}),i("button",{className:"ihub-pagination-button",disabled:Ce.currentPage===Ce.totalPages||ge,onClick:function(){return Je(Ce.totalPages)},children:"»"})]}),o("div",{className:"ihub-rows-per-page",children:[i("span",{children:"Rows per page:"}),i("select",{value:Ce.perPage,onChange:function(e){return Ve(Number(e.target.value))},className:"ihub-rows-select",disabled:ge,children:Q.map((function(e){return i("option",{value:e,children:e},e)}))})]})]})]})}export{P as IHubTableServer,P as default};
|
|
1
|
+
import{slicedToArray as e,objectSpread2 as t,toConsumableArray as n,asyncToGenerator as r,regeneratorRuntime as a}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";import c,{useRef as l,useState as s,useCallback as u,useEffect as d}from"react";import h from"@mui/icons-material/FileDownloadOutlined";import p from"@mui/icons-material/RefreshOutlined";import b from"@mui/icons-material/InventoryOutlined";import m from"@mui/icons-material/ExpandMoreOutlined";import f from"@mui/icons-material/ExpandLessOutlined";import"../../../../node_modules/lodash/lodash.js";import{getNestedValue as g,reqOptions as v,API_HOST_URL as N}from"../../lib/helpFunction.js";import"../../lib/utils.js";import{l as x}from"../../../../_virtual/lodash.js";function P(P){var y=P.token,k=P.columns,w=P.defaultData,C=P.endpointPath,S=P.initialParams,E=void 0===S?{}:S,j=P.dataAdapter,R=P.title,O=P.emptyStateMessage,M=void 0===O?"No data available":O,A=P.emptyStateIcon,L=void 0===A?i(b,{}):A,F=P.actions,H=P.showSearch,D=void 0===H||H,U=P.searchPlaceholder,_=void 0===U?"Search...":U,I=P.searchDebounceMs,T=void 0===I?1e3:I,B=P.enableSorting,G=void 0===B||B,J=P.enableExport,V=void 0!==J&&J,q=P.exportOptions,z=void 0===q?{csv:!0}:q,K=P.rowsPerPageOptions,Q=void 0===K?[10,25,50,100]:K,W=P.defaultRowsPerPage,X=void 0===W?10:W,Y=P.onRowClick,Z=P.onFetchError,$=P.expandable,ee=void 0!==$&&$,te=P.renderExpandedRow,ne=P.keyExtractor,re=void 0===ne?function(e){return JSON.stringify(e)}:ne,ae=P.stickyHeader,ie=void 0!==ae&&ae,oe=P.maxHeight,ce=P.hideHeaderOnMobile,le=void 0!==ce&&ce,se=l(!0),ue=l(null),de=s(w||[]),he=e(de,2),pe=he[0],be=he[1],me=s(!0),fe=e(me,2),ge=fe[0],ve=fe[1],Ne=s(null),xe=e(Ne,2),Pe=xe[0],ye=xe[1],ke=s({totalCount:0,currentPage:1,perPage:X,totalPages:0}),we=e(ke,2),Ce=we[0],Se=we[1],Ee=s(t({page:1,limit:X},E)),je=e(Ee,2),Re=je[0],Oe=je[1],Me=s([]),Ae=e(Me,2),Le=Ae[0],Fe=Ae[1],He=s(E.search||""),De=e(He,2),Ue=De[0],_e=De[1],Ie=u(x.exports.debounce((function(e){Oe((function(n){return t(t({},n),{},{search:e,page:1})}))}),T),[]),Te={data:w||[],pagination:{totalCount:null==w?void 0:w.length,currentPage:"",perPage:10,totalPages:Math.ceil(((null==w?void 0:w.length)||10)/10)},links:{next:"",previous:""}},Be=u(function(){var e=r(a().mark((function e(t){var n,r,i,o,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ve(!0),e.prev=1,C){e.next=4;break}return e.abrupt("return",Te);case 4:return n=new URLSearchParams({limit:t.limit.toString(),offset:((t.page-1)*t.limit).toString()}),t.search&&n.append("search",t.search),t.sort&&(r="desc"===t.direction?"-":"",n.append("ordering","".concat(r).concat(t.sort))),i=v("GET",null,y),o="".concat(N).concat(C,"?").concat(n.toString()),console.log("url: ",o,y),e.next=12,fetch(o,i);case 12:return c=e.sent,e.next=15,c.json();case 15:return l=e.sent,e.abrupt("return",{data:l.results,pagination:{totalCount:l.count,currentPage:Math.floor(parseInt(new URLSearchParams(l.next).get("offset")||"0")/t.limit),perPage:t.limit,totalPages:Math.ceil(l.count/t.limit)},links:{next:l.next,previous:l.previous}});case 19:throw e.prev=19,e.t0=e.catch(1),console.error("Error fetching program courses:",e.t0),e.t0;case 23:return e.prev=23,ve(!1),e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[1,19,23,26]])})));return function(t){return e.apply(this,arguments)}}(),[]),Ge=u((function(e){var t=e.target.value;_e(t),Ie(t)}),[Ie]),Je=u((function(e){Oe((function(n){return t(t({},n),{},{page:e})}))}),[]),Ve=u((function(e){Oe((function(n){return t(t({},n),{},{page:1,limit:e})}))}),[]),qe=u((function(e){if(G&&e.sortable&&"string"==typeof e.accessor){var n=e.accessor;Oe((function(e){return e.sort===n?t(t({},e),{},{direction:"asc"===e.direction?"desc":"asc"}):t(t({},e),{},{sort:n,direction:"asc"})}))}}),[G]),ze=u((function(){Oe((function(e){return t({},e)}))}),[]),Ke=u(function(){var e=r(a().mark((function e(r){var i,o,c,l,s,u,d,h,p,b;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,ve(!0),i=t(t({},Re),{},{page:1,limit:1e3,export:r}),e.next=7,Be(i);case 7:(o=e.sent)&&(c=j?j(o).data:o.data,l=z.fileName||"table-export","csv"===r&&(s=k.filter((function(e){return"string"==typeof e.accessor})).map((function(e){return e.header})),u=c.map((function(e){return k.filter((function(e){return"string"==typeof e.accessor})).map((function(t){var n,r=t.accessor;return String(null!==(n=e[r])&&void 0!==n?n:"")})).join(",")})),d=[s.join(",")].concat(n(u)).join("\n"),h=new Blob([d],{type:"text/csv;charset=utf-8;"}),p=document.createElement("a"),b=URL.createObjectURL(h),p.setAttribute("href",b),p.setAttribute("download","".concat(l,".csv")),p.style.visibility="hidden",document.body.appendChild(p),p.click(),document.body.removeChild(p))),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),console.error("Export error:",e.t0),Z&&Z(e.t0);case 15:return e.prev=15,ve(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,11,15,18]])})));return function(t){return e.apply(this,arguments)}}(),[k,Re,V,z,j,Z]),Qe=u((function(e,t){t.stopPropagation(),Fe((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(n(t),[e])}))}),[]);return d((function(){var e=!0,t=function(){var t=r(a().mark((function t(){var n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,ve(!0),t.next=4,Be(Re);case 4:n=t.sent,e&&(j?(r=j(n),be(r.data),r.pagination&&Se(r.pagination)):n&&(be(n.data),n.pagination&&Se(n.pagination)),ye(null)),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),console.error("Error fetching data:",t.t0),e&&(ye(t.t0),Z&&Z(t.t0));case 12:return t.prev=12,e&&(ve(!1),se.current=!1),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,8,12,15]])})));return function(){return t.apply(this,arguments)}}();return t(),function(){e=!1}}),[Re,j,Z]),ge&&se.current?o("div",{className:"ihub-data-list-container",children:[R&&i("h2",{children:R}),i("div",{className:"ihub-loading-state",children:i("p",{children:"Loading data..."})})]}):Pe&&!ge&&0===pe.length?o("div",{className:"ihub-data-list-container",children:[R&&i("h2",{children:R}),o("div",{className:"ihub-error-state",children:[i("p",{children:"Error loading data. Please try again."}),i("button",{className:"ihub-important-btn",onClick:ze,children:"Retry"})]})]}):o("div",{className:"ihub-data-list-container",ref:ue,children:[(R||F||D||V)&&o("div",{className:"ihub-data-list-header ihub-table-header ihub-p-0",children:[i("div",{children:R&&i("h2",{children:R})}),o("div",{className:"ihub-table-controls",children:[D&&i("div",{className:"ihub-table-search",children:o("div",{className:"ihub-search-input-wrapper",children:[i("input",{type:"text",placeholder:_,value:Ue,onChange:Ge,className:"ihub-search-input"}),ge&&i("div",{className:"ihub-search-loading-indicator",children:i("span",{className:"ihub-loading-dot"})})]})}),V&&o("div",{className:"ihub-export-buttons",children:[z.csv&&o("button",{className:"ihub-export-button ihub-export-csv",onClick:function(){return Ke("csv")},disabled:ge,children:[i(h,{}),"CSV"]}),z.excel&&o("button",{className:"ihub-export-button ihub-export-excel",onClick:function(){return Ke("excel")},disabled:ge,children:[i(h,{}),"Excel"]}),z.pdf&&o("button",{className:"ihub-export-button ihub-export-pdf",onClick:function(){return Ke("pdf")},disabled:ge,children:[i(h,{}),"PDF"]})]}),o("button",{className:"ihub-refresh-button",onClick:ze,disabled:ge,children:[i(p,{}),"Refresh"]}),F&&i("div",{className:"ihub-data-controls ihub-mb-0",children:F})]})]}),ge&&!se.current&&i("div",{className:"ihub-table-loading-overlay",children:i("div",{className:"ihub-loading-spinner"})}),o("div",{className:"ihub-scroll-container ".concat(ie?"ihub-sticky-header":""),style:oe?{maxHeight:oe}:void 0,children:[o("table",{className:"ihub-table ihub-scroll-container",children:[i("thead",{className:le?"ihub-hide-on-mobile":"",children:o("tr",{children:[ee&&te&&i("th",{style:{width:"40px"}}),k.map((function(e,t){return i("th",{className:"".concat(e.sortable&&G?"ihub-sortable-column":""," ").concat(Re.sort===e.accessor?"ihub-sorted-".concat(Re.direction):""),style:e.width?{width:e.width}:void 0,onClick:function(){return e.sortable&&G?qe(e):void 0},children:o("div",{className:"ihub-column-header",children:[i("span",{children:e.header}),e.sortable&&G&&i("span",{className:"ihub-sort-icon",children:Re.sort===e.accessor&&"asc"===Re.direction?"▲":Re.sort===e.accessor&&"desc"===Re.direction?"▼":"⇅"})]})},t)}))]})}),ge||0!==pe.length?i("tbody",{children:pe.map((function(e,t){var n=re(e),r=Le.includes(n);return o(c.Fragment,{children:[o("tr",{onClick:function(){return Y&&Y(e)},className:Y?"ihub-clickable-row":"",children:[ee&&te&&i("td",{onClick:function(e){return Qe(n,e)},children:i(r?f:m,{})}),k.map((function(t,n){return i("td",{"data-label":le?t.header:void 0,children:t.tooltip&&"string"==typeof t.accessor?i("div",{className:"ihub-cell-tooltip","data-tooltip":String(g(e,t.accessor)),children:t.cell?t.cell(e):g(e,t.accessor)}):t.cell?t.cell(e):"function"==typeof t.accessor?t.accessor(e):g(e,t.accessor)},n)}))]}),ee&&te&&r&&i("tr",{className:"ihub-expanded-row",children:i("td",{colSpan:k.length+1,children:i("div",{className:"ihub-row-details",children:te(e)})})})]},n)}))}):""]}),ge||0!==pe.length?"":o("div",{className:"ihub-data-list-container",children:[F&&i("div",{className:"ihub-data-controls ihub-mb-0",children:F}),i("div",{className:"ihub-empty-state",children:o("div",{children:[L,i("p",{children:M})]})})]})]}),Ce&&Ce.totalPages>1&&o("div",{className:"ihub-table-pagination",children:[o("div",{className:"ihub-pagination-info",children:["Showing ",(Ce.currentPage-1)*Ce.perPage+1," to"," ",Math.min(Ce.currentPage*Ce.perPage,Ce.totalCount)," ","of ",Ce.totalCount," entries"]}),o("div",{className:"ihub-pagination-controls",children:[i("button",{className:"ihub-pagination-button",disabled:1===Ce.currentPage||ge,onClick:function(){return Je(1)},children:"«"}),i("button",{className:"ihub-pagination-button",disabled:1===Ce.currentPage||ge,onClick:function(){return Je(Ce.currentPage-1)},children:"‹"}),Array.from({length:Math.min(5,Ce.totalPages)},(function(e,t){var n;return n=Ce.totalPages<=5||Ce.currentPage<=3?t+1:Ce.currentPage>=Ce.totalPages-2?Ce.totalPages-4+t:Ce.currentPage-2+t,i("button",{className:"ihub-pagination-button ".concat(Ce.currentPage===n?"ihub-active":""),onClick:function(){return Je(Number(n))},disabled:ge,children:n},n)})),i("button",{className:"ihub-pagination-button",disabled:Ce.currentPage===Ce.totalPages||ge,onClick:function(){return Je(Ce.currentPage+1)},children:"›"}),i("button",{className:"ihub-pagination-button",disabled:Ce.currentPage===Ce.totalPages||ge,onClick:function(){return Je(Ce.totalPages)},children:"»"})]}),o("div",{className:"ihub-rows-per-page",children:[i("span",{children:"Rows per page:"}),i("select",{value:Ce.perPage,onChange:function(e){return Ve(Number(e.target.value))},className:"ihub-rows-select",disabled:ge,children:Q.map((function(e){return i("option",{value:e,children:e},e)}))})]})]})]})}export{P as IHubTableServer,P as default};
|
|
2
2
|
//# sourceMappingURL=IHubTableServer.js.map
|