@e-llm-studio/instant-learning 1.3.0-alpha.76 → 1.3.0-alpha.78

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),o=require("lucide-react"),t=require("../../styles/ScopeTree.module.css.js"),r=require("./TreeNodeHeader.js"),d=require("./TreeAddAction.js"),l=require("../../store/useLMSConfigStore.js"),a=require("../../constants.js"),c=require("../../store/useLearningTemplateStore.js"),s=require("./TreeSectionItem.js"),u=function(p){var h,v,f,m,_=p.node,C=p.depth,T=void 0===C?0:C,g=p.nodePath,D=void 0===g?[]:g,b=p.expandedNodeIds,y=p.activeSelection,A=p.onToggleExpand,E=p.onSectionSelect,S=p.onNodeOptionsClick,x=p.onAddChild,L=p.onRenameChild,j=p.onDeleteChild,R=p.canDeleteScope,N=p.canEditScope,P=p.canCreateScope,I=p.searchQuery,w=p.sectionsConfig,M=void 0===w?[]:w,k=p.nodeTypesConfig,q=void 0===k?[]:k,V=p.forceVisible,H=void 0!==V&&V,W=p.compactView,O=void 0!==W&&W,Q=e.__spreadArray(e.__spreadArray([],D,!0),[_.id],!1),Y=b.has(_.id),F=c.useLearningTemplateStore.getState().backwardCompatibility,K=F||O,U=i.useState(!1),X=U[0],J=U[1],z=l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scope")),B=!!y&&y.nodePath[y.nodePath.length-1]===_.id,G=!!y&&(y.nodePath.includes(_.id)&&!B),Z=l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.applyToLevels"),""),$=function(){if(!Z)return null;try{var e=JSON.parse(Z);return Array.isArray(e)?e.map(Number):null}catch(e){return null}}(),ee=T+1,ne=F||null===$||$.includes(ee),ie=!!F||"true"===l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.enabled"),"false")&&ne,oe=F?7:parseInt(l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.count"),"7"),10)||7,te=_.children||[],re=ie&&!I&&te.length>oe,de=i.useRef(null);i.useEffect(function(){B&&de.current&&de.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[B]);var le=i.useRef(X);i.useEffect(function(){le.current=X},[X]),i.useEffect(function(){y&&re&&!le.current&&(te.slice(oe).some(function(e){return y.nodePath.includes(e.id)})&&J(!0))},[y,re,te,oe]);var ae=function(e,n){if(!n)return!0;var i=n.toLowerCase();return!!e.name.toLowerCase().includes(i)||!!e.children&&e.children.some(function(e){return ae(e,n)})};if(!H&&!ae(_,I||""))return null;var ce=T>=q.length-1?q[q.length-1]:q[T],se=!!(null==ce?void 0:ce.addChildType),ue=K?M.filter(function(e){return"learnings"!==e.id&&"stations"!==e.id}).filter(function(e){return!e.isVisible||e.isVisible(_,T)}).map(function(e){return{label:e.label,icon:e.icon,onClick:function(){return E(Q,e.id)}}}):[],pe=!R||R(_.id),he=!N||N(_.id),ve=!P||P(_.id),fe=_.children&&_.children.length>0,me=!pe||fe,_e=pe?fe?"This scope cannot be deleted because other scopes inherit learnings from it.":void 0:"You do not have permission to delete this scope.",Ce=ve?void 0:"You do not have permission to add a scope here.",Te=!I||_.name.toLowerCase().includes(I.toLowerCase()),ge=re&&!X,De=te.length-oe,be=ge?te.slice(0,oe):te;return n.jsxs("div",e.__assign({ref:de,className:t.default.nodeWrapper,style:{"--tree-depth":T}},{children:[n.jsx(r.TreeNodeHeader,{nodeType:_.type,name:_.name,isExpanded:Y,isSelected:B,isAncestor:G,isExpandable:!!fe,childrenCount:null===(h=_.children)||void 0===h?void 0:h.length,learningsCount:K?null===(v=_.metrics)||void 0===v?void 0:v.learningsCount:void 0,isCompactView:K,onToggleExpand:function(e){e.stopPropagation(),A(_.id)},onClick:function(){E(Q,"learnings")},searchQuery:I,menuOptions:e.__spreadArray(e.__spreadArray(e.__spreadArray([],se?[{label:ce.addChildLabel||"Add Child",icon:o.Plus,onClick:function(){return null==x?void 0:x(_.id,ce.addChildType,_.name)},disabled:!ve,tooltip:Ce}]:[],!0),[{label:"".concat(l.dt("".concat(a.MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH,".rename"),"Rename")),icon:o.Pencil,onClick:function(){return null==L?void 0:L(_.id,_.name)},disabled:!he||"station"===(null===(f=null==_?void 0:_.type)||void 0===f?void 0:f.toLocaleLowerCase()),tooltip:he?void 0:"You do not have permission to rename this scope."},{label:"station"===(null===(m=null==_?void 0:_.type)||void 0===m?void 0:m.toLowerCase())?"Delete Station":F?"Delete Scope":"".concat(l.dt("".concat(a.MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH,".delete"),"Delete ".concat((null==ce?void 0:ce.label)||"Node"),{scope:z})),icon:o.Trash2,onClick:function(){var e;return null==j?void 0:j(_.id,_.name,(null===(e=_.metrics)||void 0===e?void 0:e.learningsCount)||0)},disabled:me,tooltip:_e,className:"text-red-500 hover:text-red-600 hover:bg-red-50"}],!1),ue,!0)}),Y&&n.jsxs("div",e.__assign({className:t.default.childrenWrapper},{children:[!K&&M.filter(function(e){return!e.isVisible||e.isVisible(_,T)}).map(function(e){var i;return n.jsx(s.TreeSectionItem,{icon:e.icon,label:e.label,badgeCount:e.badgeKey?null===(i=_.metrics)||void 0===i?void 0:i[e.badgeKey]:void 0,isActive:B&&(null==y?void 0:y.sectionId)===e.id,onClick:function(){return E(Q,e.id)}},"".concat(_.id,"-").concat(e.id))}),be.map(function(e){return n.jsx(u,{node:e,depth:T+1,nodePath:Q,expandedNodeIds:b,activeSelection:y,onToggleExpand:A,onSectionSelect:E,onNodeOptionsClick:S,onAddChild:x,onRenameChild:L,onDeleteChild:j,canDeleteScope:R,canEditScope:N,canCreateScope:P,searchQuery:I,forceVisible:Te,sectionsConfig:M,nodeTypesConfig:q,compactView:K},e.id)}),re&&n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),J(function(e){var n=!e;return n&&E(Q,"stations"),n})},className:"".concat(t.default.addAction)},{children:X?n.jsx(n.Fragment,{children:n.jsx("span",{children:"Show less"})}):n.jsx(n.Fragment,{children:n.jsx("span",e.__assign({style:{paddingLeft:"15px"}},{children:l.interpolate(l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.viewMoreText"),"{count} more..."),{count:De})}))})})),se&&!K&&n.jsx(d.TreeAddAction,{label:ce.addChildLabel||"Add Child",onAdd:function(){return null==x?void 0:x(_.id,ce.addChildType,_.name)},disabled:!ve,tooltip:Ce})]}))]}))};exports.TreeNode=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),o=require("lucide-react"),t=require("../../styles/ScopeTree.module.css.js"),r=require("./TreeNodeHeader.js"),d=require("./TreeAddAction.js"),l=require("../../store/useLMSConfigStore.js"),a=require("../../constants.js"),s=require("../../store/useLearningTemplateStore.js"),c=require("./TreeSectionItem.js"),u=function(p){var h,v,m,_,f=p.node,C=p.depth,g=void 0===C?0:C,T=p.nodePath,D=void 0===T?[]:T,b=p.expandedNodeIds,y=p.activeSelection,A=p.onToggleExpand,x=p.onSectionSelect,E=p.onNodeOptionsClick,L=p.onAddChild,S=p.onRenameChild,j=p.onDeleteChild,N=p.canDeleteScope,R=p.canEditScope,P=p.canCreateScope,w=p.searchQuery,I=p.sectionsConfig,M=void 0===I?[]:I,k=p.nodeTypesConfig,q=void 0===k?[]:k,V=p.forceVisible,H=void 0!==V&&V,W=p.compactView,O=void 0!==W&&W,Y=e.__spreadArray(e.__spreadArray([],D,!0),[f.id],!1),Q=b.has(f.id),K=s.useLearningTemplateStore.getState().backwardCompatibility,U=K||O,X=l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scope")),F=!!y&&y.nodePath[y.nodePath.length-1]===f.id,J=!!y&&(y.nodePath.includes(f.id)&&!F),z=l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.applyToLevels"),""),B=function(){if(!z)return null;try{var e=JSON.parse(z);return Array.isArray(e)?e.map(Number):null}catch(e){return null}}(),G=g+1,Z=K||null===B||B.includes(G),$=!!K||"true"===l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.enabled"),"false")&&Z,ee=K?7:parseInt(l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.count"),"7"),10)||7,ne=f.children||[],ie=$&&!w&&ne.length>ee,oe=i.useRef(null);i.useEffect(function(){F&&oe.current&&oe.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[F]);var te=function(e,n){if(!n)return!0;var i=n.toLowerCase();return!!e.name.toLowerCase().includes(i)||!!e.children&&e.children.some(function(e){return te(e,n)})};if(!H&&!te(f,w||""))return null;var re=g>=q.length-1?q[q.length-1]:q[g],de=!!(null==re?void 0:re.addChildType),le=U?M.filter(function(e){return"learnings"!==e.id&&"stations"!==e.id}).filter(function(e){return!e.isVisible||e.isVisible(f,g)}).map(function(e){return{label:e.label,icon:e.icon,onClick:function(){return x(Y,e.id)}}}):[],ae=!N||N(f.id),se=!R||R(f.id),ce=!P||P(f.id),ue=f.children&&f.children.length>0,pe=!ae||ue,he=ae?ue?"This scope cannot be deleted because other scopes inherit learnings from it.":void 0:"You do not have permission to delete this scope.",ve=ce?void 0:"You do not have permission to add a scope here.",me=!w||f.name.toLowerCase().includes(w.toLowerCase()),_e=function(e){return n.jsx(u,{node:e,depth:g+1,nodePath:Y,expandedNodeIds:b,activeSelection:y,onToggleExpand:A,onSectionSelect:x,onNodeOptionsClick:E,onAddChild:L,onRenameChild:S,onDeleteChild:j,canDeleteScope:N,canEditScope:R,canCreateScope:P,searchQuery:w,forceVisible:me,sectionsConfig:M,nodeTypesConfig:q,compactView:U},e.id)};return n.jsxs("div",e.__assign({ref:oe,className:t.default.nodeWrapper,style:{"--tree-depth":g}},{children:[n.jsx(r.TreeNodeHeader,{nodeType:f.type,name:f.name,isExpanded:Q,isSelected:F,isAncestor:J,isExpandable:!!ue,childrenCount:null===(h=f.children)||void 0===h?void 0:h.length,learningsCount:U?null===(v=f.metrics)||void 0===v?void 0:v.learningsCount:void 0,isCompactView:U,onToggleExpand:function(e){e.stopPropagation(),A(f.id)},onClick:function(){x(Y,"learnings")},searchQuery:w,menuOptions:e.__spreadArray(e.__spreadArray(e.__spreadArray([],de?[{label:re.addChildLabel||"Add Child",icon:o.Plus,onClick:function(){return null==L?void 0:L(f.id,re.addChildType,f.name)},disabled:!ce,tooltip:ve}]:[],!0),[{label:"".concat(l.dt("".concat(a.MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH,".rename"),"Rename")),icon:o.Pencil,onClick:function(){return null==S?void 0:S(f.id,f.name)},disabled:!se||"station"===(null===(m=null==f?void 0:f.type)||void 0===m?void 0:m.toLocaleLowerCase()),tooltip:se?void 0:"You do not have permission to rename this scope."},{label:"station"===(null===(_=null==f?void 0:f.type)||void 0===_?void 0:_.toLowerCase())?"Delete Station":K?"Delete Scope":"".concat(l.dt("".concat(a.MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH,".delete"),"Delete ".concat((null==re?void 0:re.label)||"Node"),{scope:X})),icon:o.Trash2,onClick:function(){var e;return null==j?void 0:j(f.id,f.name,(null===(e=f.metrics)||void 0===e?void 0:e.learningsCount)||0)},disabled:pe,tooltip:he,className:"text-red-500 hover:text-red-600 hover:bg-red-50"}],!1),le,!0)}),Q&&n.jsxs("div",e.__assign({className:t.default.childrenWrapper},{children:[!U&&M.filter(function(e){return!e.isVisible||e.isVisible(f,g)}).map(function(e){var i;return n.jsx(c.TreeSectionItem,{icon:e.icon,label:e.label,badgeCount:e.badgeKey?null===(i=f.metrics)||void 0===i?void 0:i[e.badgeKey]:void 0,isActive:F&&(null==y?void 0:y.sectionId)===e.id,onClick:function(){return x(Y,e.id)}},"".concat(f.id,"-").concat(e.id))}),ie?n.jsxs(n.Fragment,{children:[n.jsx("div",e.__assign({className:t.default.scopeScrollContainer,style:{maxHeight:"calc(var(--scope-row-height, 40px) * ".concat(ee,")"),overflowY:"scroll"}},{children:ne.map(_e)})),n.jsx("button",e.__assign({type:"button",className:t.default.addAction,onClick:function(e){e.stopPropagation(),x(Y,"stations")}},{children:n.jsx("span",e.__assign({style:{paddingLeft:"15px"}},{children:l.interpolate(l.dt("".concat(a.MIDDLE_DRAWER_DT_PATH,".scopeDisplayLimit.viewMoreText"),"View all stations"),{count:ne.length})}))}))]}):ne.map(_e),de&&!U&&n.jsx(d.TreeAddAction,{label:re.addChildLabel||"Add Child",onAdd:function(){return null==L?void 0:L(f.id,re.addChildType,f.name)},disabled:!ce,tooltip:ve})]}))]}))};exports.TreeNode=u;
2
2
  //# sourceMappingURL=TreeNode.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../../node_modules/style-inject/dist/style-inject.es.js").default(".ScopeTree-module_treeContainer__IfdEO{display:flex;flex:1;flex-direction:column;gap:.5rem;height:100%;overflow:auto;padding:0 1.25rem 80px}.ScopeTree-module_treeContainer__IfdEO::-webkit-scrollbar{height:4px;width:4px}.ScopeTree-module_treeContainer__IfdEO::-webkit-scrollbar-thumb{background-color:#e5e7eb;border-radius:9999px}.ScopeTree-module_nodeWrapper__zt96G{display:flex;flex-direction:column;min-width:max-content;position:relative}.ScopeTree-module_childrenWrapper__uggxw{border-left:1px solid #e3e6ea;display:flex;flex-direction:column;gap:.5rem;margin-left:calc(var(--tree-depth, 0)*0px + .875rem);margin-top:.5rem;min-width:max-content;padding-left:1rem}.ScopeTree-module_nodeHeader__qxJAp{align-items:center;border:1px solid #0000;border-radius:.375rem;color:#19213d;cursor:pointer;display:flex;gap:.5rem;min-width:max-content;padding:.5rem;transition:all .2s}.ScopeTree-module_nodeHeader__qxJAp:hover{background-color:#f7f8fa}.ScopeTree-module_nodeHeaderSelected__UTNOH{border-color:#2563eb;color:#2563eb}.ScopeTree-module_nodeHeaderAncestor__Cjnkv{color:#2563eb}.ScopeTree-module_chevron__bmchk{align-items:center;border-radius:50px;color:#9ca3af;display:flex;flex-shrink:0;justify-content:center;padding:5px;transition:transform .2s;transition:background-color .3s ease-in-out}.ScopeTree-module_chevron__bmchk:hover{background:#e8ebf0}.ScopeTree-module_chevronExpanded__aZNQo{transform:rotate(180deg)}.ScopeTree-module_chevronHidden__dfrws{visibility:hidden;width:16px}.ScopeTree-module_folderIcon__93n7V{align-items:center;color:inherit;display:flex;flex-shrink:0;justify-content:center}.ScopeTree-module_nodeName__-o5cw{flex:1;font-size:.875rem;font-weight:500;white-space:nowrap}.ScopeTree-module_optionsButton__KD0N8{align-items:center;background:#0000;border:none;border-radius:.25rem;color:#64748b;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:all .2s}.ScopeTree-module_optionsButton__KD0N8:hover{background-color:#e2e8f0;color:#19213d}.ScopeTree-module_pill__LfoFO{align-items:center;border:1px solid #0000;border-radius:.5rem;color:#64748b;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:all .2s}.ScopeTree-module_pill__LfoFO:hover{background-color:#f7f8fa;color:#19213d}.ScopeTree-module_pillActive__hV98M{background-color:#f0f5ff;border-color:#2563eb;color:#2563eb}.ScopeTree-module_pillActive__hV98M:hover{background-color:#e0ebff;color:#2563eb}.ScopeTree-module_pillIcon__qOzv0{align-items:center;display:flex;justify-content:center}.ScopeTree-module_pillLabel__-pnNE{flex:1;font-size:.875rem;font-weight:500}.ScopeTree-module_badge__0M-VE{align-items:center;background-color:#f1f5f9;border-radius:9999px;color:#475569;display:inline-flex;font-size:.625rem;font-weight:600;height:1.25rem;justify-content:center;min-width:1.25rem;padding:0 .375rem}.ScopeTree-module_badgeActive__lFpKZ{background-color:#2563eb;color:#fff}.ScopeTree-module_addAction__alNAW{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#2563eb;cursor:pointer;display:flex;font-size:.875rem;font-weight:500;gap:.5rem;margin-top:.25rem;padding:.5rem;transition:all .2s;width:fit-content}.ScopeTree-module_addAction__alNAW:hover{background-color:#f0f5ff}.ScopeTree-module_addIcon__Rx81g{align-items:center;display:flex;justify-content:center}.ScopeTree-module_menuContainer__IyejG{display:inline-block;position:relative;text-align:left}.ScopeTree-module_menuDropdown__12xxX{background-color:#fff;border:1px solid #0000000d;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;display:flex;flex-direction:column;outline:none;padding:.25rem 0;position:absolute;width:12rem;z-index:9999}.ScopeTree-module_menuDropdownTop__hkZpa{bottom:100%;margin-bottom:.25rem;right:0}.ScopeTree-module_menuDropdownBottom__w53jm{margin-top:.25rem;right:0;top:100%}.ScopeTree-module_menuOption__wcvl7{align-items:center;background:#0000;border:none;color:#374151;cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem;text-align:left;width:100%}.ScopeTree-module_menuOption__wcvl7:not(:disabled):hover{background-color:#f3f4f6;color:#111827}.ScopeTree-module_menuOptionDisabled__1FaQQ{color:#9ca3af;cursor:not-allowed;opacity:.6}.ScopeTree-module_menuOptionIcon__s2FWC{flex-shrink:0;margin-right:.75rem}.ScopeTree-module_tooltipWrapper__Jhz1M{position:relative;width:100%}.ScopeTree-module_tooltipContent__J02zm{animation:ScopeTree-module_tooltipFadeIn__of1bQ .15s ease-out;background-color:#2a3547;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a;color:#fff;font-family:sans-serif;font-size:.875rem;max-width:280px;padding:.5rem .75rem;position:relative;z-index:9999}.ScopeTree-module_tooltipArrow__m9eHn{fill:#2a3547;position:absolute}@keyframes ScopeTree-module_tooltipFadeIn__of1bQ{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.ScopeTree-module_highlightText__mHYra{background-color:#fde047;border-radius:.125rem;color:#111827}"),exports.default={treeContainer:"ScopeTree-module_treeContainer__IfdEO",nodeWrapper:"ScopeTree-module_nodeWrapper__zt96G",childrenWrapper:"ScopeTree-module_childrenWrapper__uggxw",nodeHeader:"ScopeTree-module_nodeHeader__qxJAp",nodeHeaderSelected:"ScopeTree-module_nodeHeaderSelected__UTNOH",nodeHeaderAncestor:"ScopeTree-module_nodeHeaderAncestor__Cjnkv",chevron:"ScopeTree-module_chevron__bmchk",chevronExpanded:"ScopeTree-module_chevronExpanded__aZNQo",chevronHidden:"ScopeTree-module_chevronHidden__dfrws",folderIcon:"ScopeTree-module_folderIcon__93n7V",nodeName:"ScopeTree-module_nodeName__-o5cw",optionsButton:"ScopeTree-module_optionsButton__KD0N8",pill:"ScopeTree-module_pill__LfoFO",pillActive:"ScopeTree-module_pillActive__hV98M",pillIcon:"ScopeTree-module_pillIcon__qOzv0",pillLabel:"ScopeTree-module_pillLabel__-pnNE",badge:"ScopeTree-module_badge__0M-VE",badgeActive:"ScopeTree-module_badgeActive__lFpKZ",addAction:"ScopeTree-module_addAction__alNAW",addIcon:"ScopeTree-module_addIcon__Rx81g",menuContainer:"ScopeTree-module_menuContainer__IyejG",menuDropdown:"ScopeTree-module_menuDropdown__12xxX",menuDropdownTop:"ScopeTree-module_menuDropdownTop__hkZpa",menuDropdownBottom:"ScopeTree-module_menuDropdownBottom__w53jm",menuOption:"ScopeTree-module_menuOption__wcvl7",menuOptionDisabled:"ScopeTree-module_menuOptionDisabled__1FaQQ",menuOptionIcon:"ScopeTree-module_menuOptionIcon__s2FWC",tooltipWrapper:"ScopeTree-module_tooltipWrapper__Jhz1M",tooltipContent:"ScopeTree-module_tooltipContent__J02zm",tooltipFadeIn:"ScopeTree-module_tooltipFadeIn__of1bQ",tooltipArrow:"ScopeTree-module_tooltipArrow__m9eHn",highlightText:"ScopeTree-module_highlightText__mHYra"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../../node_modules/style-inject/dist/style-inject.es.js").default(".ScopeTree-module_treeContainer__IfdEO{display:flex;flex:1;flex-direction:column;gap:.5rem;height:100%;overflow:auto;padding:0 1.25rem 80px}.ScopeTree-module_nodeWrapper__zt96G{display:flex;flex-direction:column;min-width:max-content;position:relative}.ScopeTree-module_childrenWrapper__uggxw{border-left:1px solid #e3e6ea;display:flex;flex-direction:column;gap:.5rem;margin-left:calc(var(--tree-depth, 0)*0px + .875rem);margin-top:.5rem;min-width:max-content;padding-left:1rem}.ScopeTree-module_nodeHeader__qxJAp{align-items:center;border:1px solid #0000;border-radius:.375rem;color:#19213d;cursor:pointer;display:flex;gap:.5rem;min-width:max-content;padding:.5rem;transition:all .2s}.ScopeTree-module_nodeHeader__qxJAp:hover{background-color:#f7f8fa}.ScopeTree-module_nodeHeaderSelected__UTNOH{border-color:#2563eb;color:#2563eb}.ScopeTree-module_nodeHeaderAncestor__Cjnkv{color:#2563eb}.ScopeTree-module_chevron__bmchk{align-items:center;border-radius:50px;color:#9ca3af;display:flex;flex-shrink:0;justify-content:center;padding:5px;transition:transform .2s;transition:background-color .3s ease-in-out}.ScopeTree-module_chevron__bmchk:hover{background:#e8ebf0}.ScopeTree-module_chevronExpanded__aZNQo{transform:rotate(180deg)}.ScopeTree-module_chevronHidden__dfrws{visibility:hidden;width:16px}.ScopeTree-module_folderIcon__93n7V{align-items:center;color:inherit;display:flex;flex-shrink:0;justify-content:center}.ScopeTree-module_nodeName__-o5cw{flex:1;font-size:.875rem;font-weight:500;white-space:nowrap}.ScopeTree-module_optionsButton__KD0N8{align-items:center;background:#0000;border:none;border-radius:.25rem;color:#64748b;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:all .2s}.ScopeTree-module_optionsButton__KD0N8:hover{background-color:#e2e8f0;color:#19213d}.ScopeTree-module_pill__LfoFO{align-items:center;border:1px solid #0000;border-radius:.5rem;color:#64748b;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:all .2s}.ScopeTree-module_pill__LfoFO:hover{background-color:#f7f8fa;color:#19213d}.ScopeTree-module_pillActive__hV98M{background-color:#f0f5ff;border-color:#2563eb;color:#2563eb}.ScopeTree-module_pillActive__hV98M:hover{background-color:#e0ebff;color:#2563eb}.ScopeTree-module_pillIcon__qOzv0{align-items:center;display:flex;justify-content:center}.ScopeTree-module_pillLabel__-pnNE{flex:1;font-size:.875rem;font-weight:500}.ScopeTree-module_badge__0M-VE{align-items:center;background-color:#f1f5f9;border-radius:9999px;color:#475569;display:inline-flex;font-size:.625rem;font-weight:600;height:1.25rem;justify-content:center;min-width:1.25rem;padding:0 .375rem}.ScopeTree-module_badgeActive__lFpKZ{background-color:#2563eb;color:#fff}.ScopeTree-module_addAction__alNAW{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#2563eb;cursor:pointer;display:flex;font-size:.875rem;font-weight:500;gap:.5rem;margin-top:.25rem;padding:.5rem;transition:all .2s;width:fit-content}.ScopeTree-module_addAction__alNAW:hover{background-color:#f0f5ff}.ScopeTree-module_addIcon__Rx81g{align-items:center;display:flex;justify-content:center}.ScopeTree-module_menuContainer__IyejG{display:inline-block;position:relative;text-align:left}.ScopeTree-module_menuDropdown__12xxX{background-color:#fff;border:1px solid #0000000d;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;display:flex;flex-direction:column;outline:none;padding:.25rem 0;position:absolute;width:12rem;z-index:9999}.ScopeTree-module_menuDropdownTop__hkZpa{bottom:100%;margin-bottom:.25rem;right:0}.ScopeTree-module_menuDropdownBottom__w53jm{margin-top:.25rem;right:0;top:100%}.ScopeTree-module_menuOption__wcvl7{align-items:center;background:#0000;border:none;color:#374151;cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem;text-align:left;width:100%}.ScopeTree-module_menuOption__wcvl7:not(:disabled):hover{background-color:#f3f4f6;color:#111827}.ScopeTree-module_menuOptionDisabled__1FaQQ{color:#9ca3af;cursor:not-allowed;opacity:.6}.ScopeTree-module_menuOptionIcon__s2FWC{flex-shrink:0;margin-right:.75rem}.ScopeTree-module_tooltipWrapper__Jhz1M{position:relative;width:100%}.ScopeTree-module_tooltipContent__J02zm{animation:ScopeTree-module_tooltipFadeIn__of1bQ .15s ease-out;background-color:#2a3547;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a;color:#fff;font-family:sans-serif;font-size:.875rem;max-width:280px;padding:.5rem .75rem;position:relative;z-index:9999}.ScopeTree-module_tooltipArrow__m9eHn{fill:#2a3547;position:absolute}@keyframes ScopeTree-module_tooltipFadeIn__of1bQ{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.ScopeTree-module_highlightText__mHYra{background-color:#fde047;border-radius:.125rem;color:#111827}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar{width:8px}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar-track{background:#0000}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#c7c7cc;border:2px solid #0000;border-radius:4px}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar-thumb:hover{background-color:#a8a8ad}"),exports.default={treeContainer:"ScopeTree-module_treeContainer__IfdEO",nodeWrapper:"ScopeTree-module_nodeWrapper__zt96G",childrenWrapper:"ScopeTree-module_childrenWrapper__uggxw",nodeHeader:"ScopeTree-module_nodeHeader__qxJAp",nodeHeaderSelected:"ScopeTree-module_nodeHeaderSelected__UTNOH",nodeHeaderAncestor:"ScopeTree-module_nodeHeaderAncestor__Cjnkv",chevron:"ScopeTree-module_chevron__bmchk",chevronExpanded:"ScopeTree-module_chevronExpanded__aZNQo",chevronHidden:"ScopeTree-module_chevronHidden__dfrws",folderIcon:"ScopeTree-module_folderIcon__93n7V",nodeName:"ScopeTree-module_nodeName__-o5cw",optionsButton:"ScopeTree-module_optionsButton__KD0N8",pill:"ScopeTree-module_pill__LfoFO",pillActive:"ScopeTree-module_pillActive__hV98M",pillIcon:"ScopeTree-module_pillIcon__qOzv0",pillLabel:"ScopeTree-module_pillLabel__-pnNE",badge:"ScopeTree-module_badge__0M-VE",badgeActive:"ScopeTree-module_badgeActive__lFpKZ",addAction:"ScopeTree-module_addAction__alNAW",addIcon:"ScopeTree-module_addIcon__Rx81g",menuContainer:"ScopeTree-module_menuContainer__IyejG",menuDropdown:"ScopeTree-module_menuDropdown__12xxX",menuDropdownTop:"ScopeTree-module_menuDropdownTop__hkZpa",menuDropdownBottom:"ScopeTree-module_menuDropdownBottom__w53jm",menuOption:"ScopeTree-module_menuOption__wcvl7",menuOptionDisabled:"ScopeTree-module_menuOptionDisabled__1FaQQ",menuOptionIcon:"ScopeTree-module_menuOptionIcon__s2FWC",tooltipWrapper:"ScopeTree-module_tooltipWrapper__Jhz1M",tooltipContent:"ScopeTree-module_tooltipContent__J02zm",tooltipFadeIn:"ScopeTree-module_tooltipFadeIn__of1bQ",tooltipArrow:"ScopeTree-module_tooltipArrow__m9eHn",highlightText:"ScopeTree-module_highlightText__mHYra",scopeScrollContainer:"ScopeTree-module_scopeScrollContainer__ikLzG"};
2
2
  //# sourceMappingURL=ScopeTree.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../../node_modules/style-inject/dist/style-inject.es.js").default(".Sidebar-module_sidebar__BhVQw{background-color:#fff;border-right:1px solid #e3e6ea;display:flex;flex-direction:column;height:calc(100vh - 140px);overflow:hidden;padding-top:1.25rem;position:relative;width:340px;width:fit-content}.Sidebar-module_tabsContainer__n542w{margin-bottom:1.25rem;padding:0 1.25rem}.Sidebar-module_tabsWrapper__z6rAx{background-color:#f3f4f6cc;border-radius:.5rem;display:grid;gap:.25rem;grid-template-columns:1fr 1fr;padding:.25rem}.Sidebar-module_tab__79tnm{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#64748b;cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem .75rem;transition:all .2s}.Sidebar-module_tab__79tnm:hover{color:#2563eb}.Sidebar-module_tabActive__amUJ5{background-color:#fff;box-shadow:0 1px 2px 0 #0000000d;color:#2563eb;font-weight:700}.Sidebar-module_searchContainer__KMtRV{margin-bottom:1rem;padding:0 1.25rem}.Sidebar-module_searchWrapper__4ejma{display:flex;gap:.5rem}.Sidebar-module_searchInputWrapper__VI9Qk{align-items:center;display:flex;flex:1;position:relative;width:100%}.Sidebar-module_searchIcon__iyv9p{color:#9ca3af;left:.75rem;position:absolute;top:50%;transform:translateY(-50%)}.Sidebar-module_searchInput__oVmKU{background-color:#fff;border:1px solid #f0f2f5;border-radius:.5rem;box-shadow:0 1px 2px 0 #0000000d;font-size:.875rem;outline:none;padding:.5rem 1rem .5rem 2.25rem;transition:all .2s;width:100%}.Sidebar-module_searchInput__oVmKU:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb33}.Sidebar-module_searchInput__oVmKU::placeholder{color:#9ca3af}.Sidebar-module_searchRightContainer__JZf8q{align-items:center;display:flex;gap:.5rem;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.Sidebar-module_searchCountBadge__JdOCA{background-color:#fde047;border-radius:.25rem;color:#374151;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.Sidebar-module_searchClearButton__TCsGU{align-items:center;background:#0000;border:none;color:#9ca3af;cursor:pointer;display:flex;margin:0;outline:none;padding:0;transition:color .2s ease}.Sidebar-module_searchClearButton__TCsGU:hover{color:#4b5563}.Sidebar-module_filterButton__OA1Bn{background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;cursor:pointer;padding:.5rem;transition:background-color .2s,border-color .2s}.Sidebar-module_filterButton__OA1Bn:hover{background-color:#f0f2f5}.Sidebar-module_filterButton__OA1Bn svg{color:#19213d}.Sidebar-module_divider__EIZV1{background-color:#f0f2f5;height:1.5px;margin:0 1.25rem 1rem;width:100%}.Sidebar-module_content__iG2Ya{flex:1;overflow-y:auto;padding:0 1.25rem}.Sidebar-module_content__iG2Ya::-webkit-scrollbar{width:4px}.Sidebar-module_content__iG2Ya::-webkit-scrollbar-thumb{background-color:#e5e7eb;border-radius:9999px}.Sidebar-module_section__ChTDq{margin-bottom:1.5rem}.Sidebar-module_sectionTitle__EC2Bt{color:#19213d;font-size:.875rem;font-weight:600;margin-bottom:.75rem}.Sidebar-module_sectionList__TErRr{display:flex;flex-direction:column;gap:.75rem}.Sidebar-module_createButtonContainer__EECqj{background-color:#fff;border-top:1px solid #e5e7eb;bottom:0;box-shadow:0 -4px 20px #0000000d;left:0;padding:1rem;position:absolute;width:100%;z-index:50}.Sidebar-module_createButton__wE7-a{align-items:center;background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;color:#19213d;cursor:pointer;display:flex;font-size:.75rem;font-weight:500;gap:.5rem;justify-content:center;padding:.75rem;transition:all .2s;width:100%}.Sidebar-module_createButton__wE7-a:hover{background-color:#f3f4f6;box-shadow:0 1px 2px 0 #0000000d}.Sidebar-module_createButton__wE7-a:active{transform:scale(.99)}.Sidebar-module_emptyContent__TV90P{align-items:center;color:#9ca3af;display:flex;flex-direction:column;font-size:.875rem;height:10rem;justify-content:center}"),exports.default={sidebar:"Sidebar-module_sidebar__BhVQw",tabsContainer:"Sidebar-module_tabsContainer__n542w",tabsWrapper:"Sidebar-module_tabsWrapper__z6rAx",tab:"Sidebar-module_tab__79tnm",tabActive:"Sidebar-module_tabActive__amUJ5",searchContainer:"Sidebar-module_searchContainer__KMtRV",searchWrapper:"Sidebar-module_searchWrapper__4ejma",searchInputWrapper:"Sidebar-module_searchInputWrapper__VI9Qk",searchIcon:"Sidebar-module_searchIcon__iyv9p",searchInput:"Sidebar-module_searchInput__oVmKU",searchRightContainer:"Sidebar-module_searchRightContainer__JZf8q",searchCountBadge:"Sidebar-module_searchCountBadge__JdOCA",searchClearButton:"Sidebar-module_searchClearButton__TCsGU",filterButton:"Sidebar-module_filterButton__OA1Bn",divider:"Sidebar-module_divider__EIZV1",content:"Sidebar-module_content__iG2Ya",section:"Sidebar-module_section__ChTDq",sectionTitle:"Sidebar-module_sectionTitle__EC2Bt",sectionList:"Sidebar-module_sectionList__TErRr",createButtonContainer:"Sidebar-module_createButtonContainer__EECqj",createButton:"Sidebar-module_createButton__wE7-a",emptyContent:"Sidebar-module_emptyContent__TV90P"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../../node_modules/style-inject/dist/style-inject.es.js").default(".Sidebar-module_sidebar__BhVQw{background-color:#fff;border-right:1px solid #e3e6ea;display:flex;flex-direction:column;height:calc(100vh - 140px);overflow:hidden;padding-top:1.25rem;position:relative;width:340px;width:fit-content}.Sidebar-module_tabsContainer__n542w{margin-bottom:1.25rem;padding:0 1.25rem}.Sidebar-module_tabsWrapper__z6rAx{background-color:#f3f4f6cc;border-radius:.5rem;display:grid;gap:.25rem;grid-template-columns:1fr 1fr;padding:.25rem}.Sidebar-module_tab__79tnm{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#64748b;cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem .75rem;transition:all .2s}.Sidebar-module_tab__79tnm:hover{color:#2563eb}.Sidebar-module_tabActive__amUJ5{background-color:#fff;box-shadow:0 1px 2px 0 #0000000d;color:#2563eb;font-weight:700}.Sidebar-module_searchContainer__KMtRV{margin-bottom:1rem;padding:0 1.25rem}.Sidebar-module_searchWrapper__4ejma{display:flex;gap:.5rem}.Sidebar-module_searchInputWrapper__VI9Qk{align-items:center;display:flex;flex:1;position:relative;width:100%}.Sidebar-module_searchIcon__iyv9p{color:#9ca3af;left:.75rem;position:absolute;top:50%;transform:translateY(-50%)}.Sidebar-module_searchInput__oVmKU{background-color:#fff;border:1px solid #f0f2f5;border-radius:.5rem;box-shadow:0 1px 2px 0 #0000000d;font-size:.875rem;outline:none;padding:.5rem 1rem .5rem 2.25rem;transition:all .2s;width:100%}.Sidebar-module_searchInput__oVmKU:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb33}.Sidebar-module_searchInput__oVmKU::placeholder{color:#9ca3af}.Sidebar-module_searchRightContainer__JZf8q{align-items:center;display:flex;gap:.5rem;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.Sidebar-module_searchCountBadge__JdOCA{background-color:#fde047;border-radius:.25rem;color:#374151;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.Sidebar-module_searchClearButton__TCsGU{align-items:center;background:#0000;border:none;color:#9ca3af;cursor:pointer;display:flex;margin:0;outline:none;padding:0;transition:color .2s ease}.Sidebar-module_searchClearButton__TCsGU:hover{color:#4b5563}.Sidebar-module_filterButton__OA1Bn{background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;cursor:pointer;padding:.5rem;transition:background-color .2s,border-color .2s}.Sidebar-module_filterButton__OA1Bn:hover{background-color:#f0f2f5}.Sidebar-module_filterButton__OA1Bn svg{color:#19213d}.Sidebar-module_divider__EIZV1{background-color:#f0f2f5;height:1.5px;margin:0 1.25rem 1rem;width:100%}.Sidebar-module_content__iG2Ya{flex:1;overflow-y:auto;padding:0 1.25rem}.Sidebar-module_section__ChTDq{margin-bottom:1.5rem}.Sidebar-module_sectionTitle__EC2Bt{color:#19213d;font-size:.875rem;font-weight:600;margin-bottom:.75rem}.Sidebar-module_sectionList__TErRr{display:flex;flex-direction:column;gap:.75rem}.Sidebar-module_createButtonContainer__EECqj{background-color:#fff;border-top:1px solid #e5e7eb;bottom:0;box-shadow:0 -4px 20px #0000000d;left:0;padding:1rem;position:absolute;width:100%;z-index:50}.Sidebar-module_createButton__wE7-a{align-items:center;background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;color:#19213d;cursor:pointer;display:flex;font-size:.75rem;font-weight:500;gap:.5rem;justify-content:center;padding:.75rem;transition:all .2s;width:100%}.Sidebar-module_createButton__wE7-a:hover{background-color:#f3f4f6;box-shadow:0 1px 2px 0 #0000000d}.Sidebar-module_createButton__wE7-a:active{transform:scale(.99)}.Sidebar-module_emptyContent__TV90P{align-items:center;color:#9ca3af;display:flex;flex-direction:column;font-size:.875rem;height:10rem;justify-content:center}"),exports.default={sidebar:"Sidebar-module_sidebar__BhVQw",tabsContainer:"Sidebar-module_tabsContainer__n542w",tabsWrapper:"Sidebar-module_tabsWrapper__z6rAx",tab:"Sidebar-module_tab__79tnm",tabActive:"Sidebar-module_tabActive__amUJ5",searchContainer:"Sidebar-module_searchContainer__KMtRV",searchWrapper:"Sidebar-module_searchWrapper__4ejma",searchInputWrapper:"Sidebar-module_searchInputWrapper__VI9Qk",searchIcon:"Sidebar-module_searchIcon__iyv9p",searchInput:"Sidebar-module_searchInput__oVmKU",searchRightContainer:"Sidebar-module_searchRightContainer__JZf8q",searchCountBadge:"Sidebar-module_searchCountBadge__JdOCA",searchClearButton:"Sidebar-module_searchClearButton__TCsGU",filterButton:"Sidebar-module_filterButton__OA1Bn",divider:"Sidebar-module_divider__EIZV1",content:"Sidebar-module_content__iG2Ya",section:"Sidebar-module_section__ChTDq",sectionTitle:"Sidebar-module_sectionTitle__EC2Bt",sectionList:"Sidebar-module_sectionList__TErRr",createButtonContainer:"Sidebar-module_createButtonContainer__EECqj",createButton:"Sidebar-module_createButton__wE7-a",emptyContent:"Sidebar-module_emptyContent__TV90P"};
2
2
  //# sourceMappingURL=Sidebar.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__spreadArray as e,__assign as n}from"tslib";import{jsxs as o,jsx as i,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as r,useEffect as d}from"react";import{Plus as c,Pencil as a,Trash2 as s}from"lucide-react";import u from"../../styles/ScopeTree.module.css.js";import{TreeNodeHeader as p}from"./TreeNodeHeader.js";import{TreeAddAction as m}from"./TreeAddAction.js";import{dt as h,interpolate as v}from"../../store/useLMSConfigStore.js";import{MIDDLE_DRAWER_DT_PATH as f,MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH as C}from"../../constants.js";import{useLearningTemplateStore as b}from"../../store/useLearningTemplateStore.js";import{TreeSectionItem as g}from"./TreeSectionItem.js";var y=function(S){var L,T,w,x,A=S.node,N=S.depth,k=void 0===N?0:N,D=S.nodePath,V=void 0===D?[]:D,j=S.expandedNodeIds,P=S.activeSelection,E=S.onToggleExpand,I=S.onSectionSelect,O=S.onNodeOptionsClick,Q=S.onAddChild,R=S.onRenameChild,Y=S.onDeleteChild,K=S.canDeleteScope,M=S.canEditScope,W=S.canCreateScope,H=S.searchQuery,J=S.sectionsConfig,q=void 0===J?[]:J,z=S.nodeTypesConfig,B=void 0===z?[]:z,F=S.forceVisible,G=void 0!==F&&F,U=S.compactView,X=void 0!==U&&U,Z=e(e([],V,!0),[A.id],!1),$=j.has(A.id),_=b.getState().backwardCompatibility,ee=_||X,ne=l(!1),oe=ne[0],ie=ne[1],te=h("".concat(f,".scope")),le=!!P&&P.nodePath[P.nodePath.length-1]===A.id,re=!!P&&(P.nodePath.includes(A.id)&&!le),de=h("".concat(f,".scopeDisplayLimit.applyToLevels"),""),ce=function(){if(!de)return null;try{var e=JSON.parse(de);return Array.isArray(e)?e.map(Number):null}catch(e){return null}}(),ae=k+1,se=_||null===ce||ce.includes(ae),ue=!!_||"true"===h("".concat(f,".scopeDisplayLimit.enabled"),"false")&&se,pe=_?7:parseInt(h("".concat(f,".scopeDisplayLimit.count"),"7"),10)||7,me=A.children||[],he=ue&&!H&&me.length>pe,ve=r(null);d(function(){le&&ve.current&&ve.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[le]);var fe=r(oe);d(function(){fe.current=oe},[oe]),d(function(){P&&he&&!fe.current&&(me.slice(pe).some(function(e){return P.nodePath.includes(e.id)})&&ie(!0))},[P,he,me,pe]);var Ce=function(e,n){if(!n)return!0;var o=n.toLowerCase();return!!e.name.toLowerCase().includes(o)||!!e.children&&e.children.some(function(e){return Ce(e,n)})};if(!G&&!Ce(A,H||""))return null;var be=k>=B.length-1?B[B.length-1]:B[k],ge=!!(null==be?void 0:be.addChildType),ye=ee?q.filter(function(e){return"learnings"!==e.id&&"stations"!==e.id}).filter(function(e){return!e.isVisible||e.isVisible(A,k)}).map(function(e){return{label:e.label,icon:e.icon,onClick:function(){return I(Z,e.id)}}}):[],Se=!K||K(A.id),Le=!M||M(A.id),Te=!W||W(A.id),we=A.children&&A.children.length>0,xe=!Se||we,Ae=Se?we?"This scope cannot be deleted because other scopes inherit learnings from it.":void 0:"You do not have permission to delete this scope.",Ne=Te?void 0:"You do not have permission to add a scope here.",ke=!H||A.name.toLowerCase().includes(H.toLowerCase()),De=he&&!oe,Ve=me.length-pe,je=De?me.slice(0,pe):me;return o("div",n({ref:ve,className:u.nodeWrapper,style:{"--tree-depth":k}},{children:[i(p,{nodeType:A.type,name:A.name,isExpanded:$,isSelected:le,isAncestor:re,isExpandable:!!we,childrenCount:null===(L=A.children)||void 0===L?void 0:L.length,learningsCount:ee?null===(T=A.metrics)||void 0===T?void 0:T.learningsCount:void 0,isCompactView:ee,onToggleExpand:function(e){e.stopPropagation(),E(A.id)},onClick:function(){I(Z,"learnings")},searchQuery:H,menuOptions:e(e(e([],ge?[{label:be.addChildLabel||"Add Child",icon:c,onClick:function(){return null==Q?void 0:Q(A.id,be.addChildType,A.name)},disabled:!Te,tooltip:Ne}]:[],!0),[{label:"".concat(h("".concat(C,".rename"),"Rename")),icon:a,onClick:function(){return null==R?void 0:R(A.id,A.name)},disabled:!Le||"station"===(null===(w=null==A?void 0:A.type)||void 0===w?void 0:w.toLocaleLowerCase()),tooltip:Le?void 0:"You do not have permission to rename this scope."},{label:"station"===(null===(x=null==A?void 0:A.type)||void 0===x?void 0:x.toLowerCase())?"Delete Station":_?"Delete Scope":"".concat(h("".concat(C,".delete"),"Delete ".concat((null==be?void 0:be.label)||"Node"),{scope:te})),icon:s,onClick:function(){var e;return null==Y?void 0:Y(A.id,A.name,(null===(e=A.metrics)||void 0===e?void 0:e.learningsCount)||0)},disabled:xe,tooltip:Ae,className:"text-red-500 hover:text-red-600 hover:bg-red-50"}],!1),ye,!0)}),$&&o("div",n({className:u.childrenWrapper},{children:[!ee&&q.filter(function(e){return!e.isVisible||e.isVisible(A,k)}).map(function(e){var n;return i(g,{icon:e.icon,label:e.label,badgeCount:e.badgeKey?null===(n=A.metrics)||void 0===n?void 0:n[e.badgeKey]:void 0,isActive:le&&(null==P?void 0:P.sectionId)===e.id,onClick:function(){return I(Z,e.id)}},"".concat(A.id,"-").concat(e.id))}),je.map(function(e){return i(y,{node:e,depth:k+1,nodePath:Z,expandedNodeIds:j,activeSelection:P,onToggleExpand:E,onSectionSelect:I,onNodeOptionsClick:O,onAddChild:Q,onRenameChild:R,onDeleteChild:Y,canDeleteScope:K,canEditScope:M,canCreateScope:W,searchQuery:H,forceVisible:ke,sectionsConfig:q,nodeTypesConfig:B,compactView:ee},e.id)}),he&&i("button",n({type:"button",onClick:function(e){e.stopPropagation(),ie(function(e){var n=!e;return n&&I(Z,"stations"),n})},className:"".concat(u.addAction)},{children:i(t,oe?{children:i("span",{children:"Show less"})}:{children:i("span",n({style:{paddingLeft:"15px"}},{children:v(h("".concat(f,".scopeDisplayLimit.viewMoreText"),"{count} more..."),{count:Ve})}))})})),ge&&!ee&&i(m,{label:be.addChildLabel||"Add Child",onAdd:function(){return null==Q?void 0:Q(A.id,be.addChildType,A.name)},disabled:!Te,tooltip:Ne})]}))]}))};export{y as TreeNode};
1
+ import{__spreadArray as e,__assign as o}from"tslib";import{jsxs as n,jsx as i,Fragment as t}from"react/jsx-runtime";import{useRef as l,useEffect as d}from"react";import{Plus as r,Pencil as a,Trash2 as c}from"lucide-react";import s from"../../styles/ScopeTree.module.css.js";import{TreeNodeHeader as p}from"./TreeNodeHeader.js";import{TreeAddAction as u}from"./TreeAddAction.js";import{dt as m,interpolate as h}from"../../store/useLMSConfigStore.js";import{MIDDLE_DRAWER_DT_PATH as v,MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH as f}from"../../constants.js";import{useLearningTemplateStore as C}from"../../store/useLearningTemplateStore.js";import{TreeSectionItem as b}from"./TreeSectionItem.js";var g=function(y){var S,L,T,w,x=y.node,N=y.depth,A=void 0===N?0:N,k=y.nodePath,D=void 0===k?[]:k,V=y.expandedNodeIds,j=y.activeSelection,E=y.onToggleExpand,P=y.onSectionSelect,I=y.onNodeOptionsClick,O=y.onAddChild,Y=y.onRenameChild,Q=y.onDeleteChild,R=y.canDeleteScope,H=y.canEditScope,K=y.canCreateScope,M=y.searchQuery,W=y.sectionsConfig,J=void 0===W?[]:W,q=y.nodeTypesConfig,z=void 0===q?[]:q,B=y.forceVisible,F=void 0!==B&&B,G=y.compactView,U=void 0!==G&&G,X=e(e([],D,!0),[x.id],!1),Z=V.has(x.id),$=C.getState().backwardCompatibility,_=$||U,ee=m("".concat(v,".scope")),oe=!!j&&j.nodePath[j.nodePath.length-1]===x.id,ne=!!j&&(j.nodePath.includes(x.id)&&!oe),ie=m("".concat(v,".scopeDisplayLimit.applyToLevels"),""),te=function(){if(!ie)return null;try{var e=JSON.parse(ie);return Array.isArray(e)?e.map(Number):null}catch(e){return null}}(),le=A+1,de=$||null===te||te.includes(le),re=!!$||"true"===m("".concat(v,".scopeDisplayLimit.enabled"),"false")&&de,ae=$?7:parseInt(m("".concat(v,".scopeDisplayLimit.count"),"7"),10)||7,ce=x.children||[],se=re&&!M&&ce.length>ae,pe=l(null);d(function(){oe&&pe.current&&pe.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[oe]);var ue=function(e,o){if(!o)return!0;var n=o.toLowerCase();return!!e.name.toLowerCase().includes(n)||!!e.children&&e.children.some(function(e){return ue(e,o)})};if(!F&&!ue(x,M||""))return null;var me=A>=z.length-1?z[z.length-1]:z[A],he=!!(null==me?void 0:me.addChildType),ve=_?J.filter(function(e){return"learnings"!==e.id&&"stations"!==e.id}).filter(function(e){return!e.isVisible||e.isVisible(x,A)}).map(function(e){return{label:e.label,icon:e.icon,onClick:function(){return P(X,e.id)}}}):[],fe=!R||R(x.id),Ce=!H||H(x.id),be=!K||K(x.id),ge=x.children&&x.children.length>0,ye=!fe||ge,Se=fe?ge?"This scope cannot be deleted because other scopes inherit learnings from it.":void 0:"You do not have permission to delete this scope.",Le=be?void 0:"You do not have permission to add a scope here.",Te=!M||x.name.toLowerCase().includes(M.toLowerCase()),we=function(e){return i(g,{node:e,depth:A+1,nodePath:X,expandedNodeIds:V,activeSelection:j,onToggleExpand:E,onSectionSelect:P,onNodeOptionsClick:I,onAddChild:O,onRenameChild:Y,onDeleteChild:Q,canDeleteScope:R,canEditScope:H,canCreateScope:K,searchQuery:M,forceVisible:Te,sectionsConfig:J,nodeTypesConfig:z,compactView:_},e.id)};return n("div",o({ref:pe,className:s.nodeWrapper,style:{"--tree-depth":A}},{children:[i(p,{nodeType:x.type,name:x.name,isExpanded:Z,isSelected:oe,isAncestor:ne,isExpandable:!!ge,childrenCount:null===(S=x.children)||void 0===S?void 0:S.length,learningsCount:_?null===(L=x.metrics)||void 0===L?void 0:L.learningsCount:void 0,isCompactView:_,onToggleExpand:function(e){e.stopPropagation(),E(x.id)},onClick:function(){P(X,"learnings")},searchQuery:M,menuOptions:e(e(e([],he?[{label:me.addChildLabel||"Add Child",icon:r,onClick:function(){return null==O?void 0:O(x.id,me.addChildType,x.name)},disabled:!be,tooltip:Le}]:[],!0),[{label:"".concat(m("".concat(f,".rename"),"Rename")),icon:a,onClick:function(){return null==Y?void 0:Y(x.id,x.name)},disabled:!Ce||"station"===(null===(T=null==x?void 0:x.type)||void 0===T?void 0:T.toLocaleLowerCase()),tooltip:Ce?void 0:"You do not have permission to rename this scope."},{label:"station"===(null===(w=null==x?void 0:x.type)||void 0===w?void 0:w.toLowerCase())?"Delete Station":$?"Delete Scope":"".concat(m("".concat(f,".delete"),"Delete ".concat((null==me?void 0:me.label)||"Node"),{scope:ee})),icon:c,onClick:function(){var e;return null==Q?void 0:Q(x.id,x.name,(null===(e=x.metrics)||void 0===e?void 0:e.learningsCount)||0)},disabled:ye,tooltip:Se,className:"text-red-500 hover:text-red-600 hover:bg-red-50"}],!1),ve,!0)}),Z&&n("div",o({className:s.childrenWrapper},{children:[!_&&J.filter(function(e){return!e.isVisible||e.isVisible(x,A)}).map(function(e){var o;return i(b,{icon:e.icon,label:e.label,badgeCount:e.badgeKey?null===(o=x.metrics)||void 0===o?void 0:o[e.badgeKey]:void 0,isActive:oe&&(null==j?void 0:j.sectionId)===e.id,onClick:function(){return P(X,e.id)}},"".concat(x.id,"-").concat(e.id))}),se?n(t,{children:[i("div",o({className:s.scopeScrollContainer,style:{maxHeight:"calc(var(--scope-row-height, 40px) * ".concat(ae,")"),overflowY:"scroll"}},{children:ce.map(we)})),i("button",o({type:"button",className:s.addAction,onClick:function(e){e.stopPropagation(),P(X,"stations")}},{children:i("span",o({style:{paddingLeft:"15px"}},{children:h(m("".concat(v,".scopeDisplayLimit.viewMoreText"),"View all stations"),{count:ce.length})}))}))]}):ce.map(we),he&&!_&&i(u,{label:me.addChildLabel||"Add Child",onAdd:function(){return null==O?void 0:O(x.id,me.addChildType,x.name)},disabled:!be,tooltip:Le})]}))]}))};export{g as TreeNode};
2
2
  //# sourceMappingURL=TreeNode.js.map
@@ -1,2 +1,2 @@
1
- import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var o={treeContainer:"ScopeTree-module_treeContainer__IfdEO",nodeWrapper:"ScopeTree-module_nodeWrapper__zt96G",childrenWrapper:"ScopeTree-module_childrenWrapper__uggxw",nodeHeader:"ScopeTree-module_nodeHeader__qxJAp",nodeHeaderSelected:"ScopeTree-module_nodeHeaderSelected__UTNOH",nodeHeaderAncestor:"ScopeTree-module_nodeHeaderAncestor__Cjnkv",chevron:"ScopeTree-module_chevron__bmchk",chevronExpanded:"ScopeTree-module_chevronExpanded__aZNQo",chevronHidden:"ScopeTree-module_chevronHidden__dfrws",folderIcon:"ScopeTree-module_folderIcon__93n7V",nodeName:"ScopeTree-module_nodeName__-o5cw",optionsButton:"ScopeTree-module_optionsButton__KD0N8",pill:"ScopeTree-module_pill__LfoFO",pillActive:"ScopeTree-module_pillActive__hV98M",pillIcon:"ScopeTree-module_pillIcon__qOzv0",pillLabel:"ScopeTree-module_pillLabel__-pnNE",badge:"ScopeTree-module_badge__0M-VE",badgeActive:"ScopeTree-module_badgeActive__lFpKZ",addAction:"ScopeTree-module_addAction__alNAW",addIcon:"ScopeTree-module_addIcon__Rx81g",menuContainer:"ScopeTree-module_menuContainer__IyejG",menuDropdown:"ScopeTree-module_menuDropdown__12xxX",menuDropdownTop:"ScopeTree-module_menuDropdownTop__hkZpa",menuDropdownBottom:"ScopeTree-module_menuDropdownBottom__w53jm",menuOption:"ScopeTree-module_menuOption__wcvl7",menuOptionDisabled:"ScopeTree-module_menuOptionDisabled__1FaQQ",menuOptionIcon:"ScopeTree-module_menuOptionIcon__s2FWC",tooltipWrapper:"ScopeTree-module_tooltipWrapper__Jhz1M",tooltipContent:"ScopeTree-module_tooltipContent__J02zm",tooltipFadeIn:"ScopeTree-module_tooltipFadeIn__of1bQ",tooltipArrow:"ScopeTree-module_tooltipArrow__m9eHn",highlightText:"ScopeTree-module_highlightText__mHYra"};e(".ScopeTree-module_treeContainer__IfdEO{display:flex;flex:1;flex-direction:column;gap:.5rem;height:100%;overflow:auto;padding:0 1.25rem 80px}.ScopeTree-module_treeContainer__IfdEO::-webkit-scrollbar{height:4px;width:4px}.ScopeTree-module_treeContainer__IfdEO::-webkit-scrollbar-thumb{background-color:#e5e7eb;border-radius:9999px}.ScopeTree-module_nodeWrapper__zt96G{display:flex;flex-direction:column;min-width:max-content;position:relative}.ScopeTree-module_childrenWrapper__uggxw{border-left:1px solid #e3e6ea;display:flex;flex-direction:column;gap:.5rem;margin-left:calc(var(--tree-depth, 0)*0px + .875rem);margin-top:.5rem;min-width:max-content;padding-left:1rem}.ScopeTree-module_nodeHeader__qxJAp{align-items:center;border:1px solid #0000;border-radius:.375rem;color:#19213d;cursor:pointer;display:flex;gap:.5rem;min-width:max-content;padding:.5rem;transition:all .2s}.ScopeTree-module_nodeHeader__qxJAp:hover{background-color:#f7f8fa}.ScopeTree-module_nodeHeaderSelected__UTNOH{border-color:#2563eb;color:#2563eb}.ScopeTree-module_nodeHeaderAncestor__Cjnkv{color:#2563eb}.ScopeTree-module_chevron__bmchk{align-items:center;border-radius:50px;color:#9ca3af;display:flex;flex-shrink:0;justify-content:center;padding:5px;transition:transform .2s;transition:background-color .3s ease-in-out}.ScopeTree-module_chevron__bmchk:hover{background:#e8ebf0}.ScopeTree-module_chevronExpanded__aZNQo{transform:rotate(180deg)}.ScopeTree-module_chevronHidden__dfrws{visibility:hidden;width:16px}.ScopeTree-module_folderIcon__93n7V{align-items:center;color:inherit;display:flex;flex-shrink:0;justify-content:center}.ScopeTree-module_nodeName__-o5cw{flex:1;font-size:.875rem;font-weight:500;white-space:nowrap}.ScopeTree-module_optionsButton__KD0N8{align-items:center;background:#0000;border:none;border-radius:.25rem;color:#64748b;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:all .2s}.ScopeTree-module_optionsButton__KD0N8:hover{background-color:#e2e8f0;color:#19213d}.ScopeTree-module_pill__LfoFO{align-items:center;border:1px solid #0000;border-radius:.5rem;color:#64748b;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:all .2s}.ScopeTree-module_pill__LfoFO:hover{background-color:#f7f8fa;color:#19213d}.ScopeTree-module_pillActive__hV98M{background-color:#f0f5ff;border-color:#2563eb;color:#2563eb}.ScopeTree-module_pillActive__hV98M:hover{background-color:#e0ebff;color:#2563eb}.ScopeTree-module_pillIcon__qOzv0{align-items:center;display:flex;justify-content:center}.ScopeTree-module_pillLabel__-pnNE{flex:1;font-size:.875rem;font-weight:500}.ScopeTree-module_badge__0M-VE{align-items:center;background-color:#f1f5f9;border-radius:9999px;color:#475569;display:inline-flex;font-size:.625rem;font-weight:600;height:1.25rem;justify-content:center;min-width:1.25rem;padding:0 .375rem}.ScopeTree-module_badgeActive__lFpKZ{background-color:#2563eb;color:#fff}.ScopeTree-module_addAction__alNAW{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#2563eb;cursor:pointer;display:flex;font-size:.875rem;font-weight:500;gap:.5rem;margin-top:.25rem;padding:.5rem;transition:all .2s;width:fit-content}.ScopeTree-module_addAction__alNAW:hover{background-color:#f0f5ff}.ScopeTree-module_addIcon__Rx81g{align-items:center;display:flex;justify-content:center}.ScopeTree-module_menuContainer__IyejG{display:inline-block;position:relative;text-align:left}.ScopeTree-module_menuDropdown__12xxX{background-color:#fff;border:1px solid #0000000d;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;display:flex;flex-direction:column;outline:none;padding:.25rem 0;position:absolute;width:12rem;z-index:9999}.ScopeTree-module_menuDropdownTop__hkZpa{bottom:100%;margin-bottom:.25rem;right:0}.ScopeTree-module_menuDropdownBottom__w53jm{margin-top:.25rem;right:0;top:100%}.ScopeTree-module_menuOption__wcvl7{align-items:center;background:#0000;border:none;color:#374151;cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem;text-align:left;width:100%}.ScopeTree-module_menuOption__wcvl7:not(:disabled):hover{background-color:#f3f4f6;color:#111827}.ScopeTree-module_menuOptionDisabled__1FaQQ{color:#9ca3af;cursor:not-allowed;opacity:.6}.ScopeTree-module_menuOptionIcon__s2FWC{flex-shrink:0;margin-right:.75rem}.ScopeTree-module_tooltipWrapper__Jhz1M{position:relative;width:100%}.ScopeTree-module_tooltipContent__J02zm{animation:ScopeTree-module_tooltipFadeIn__of1bQ .15s ease-out;background-color:#2a3547;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a;color:#fff;font-family:sans-serif;font-size:.875rem;max-width:280px;padding:.5rem .75rem;position:relative;z-index:9999}.ScopeTree-module_tooltipArrow__m9eHn{fill:#2a3547;position:absolute}@keyframes ScopeTree-module_tooltipFadeIn__of1bQ{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.ScopeTree-module_highlightText__mHYra{background-color:#fde047;border-radius:.125rem;color:#111827}");export{o as default};
1
+ import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var o={treeContainer:"ScopeTree-module_treeContainer__IfdEO",nodeWrapper:"ScopeTree-module_nodeWrapper__zt96G",childrenWrapper:"ScopeTree-module_childrenWrapper__uggxw",nodeHeader:"ScopeTree-module_nodeHeader__qxJAp",nodeHeaderSelected:"ScopeTree-module_nodeHeaderSelected__UTNOH",nodeHeaderAncestor:"ScopeTree-module_nodeHeaderAncestor__Cjnkv",chevron:"ScopeTree-module_chevron__bmchk",chevronExpanded:"ScopeTree-module_chevronExpanded__aZNQo",chevronHidden:"ScopeTree-module_chevronHidden__dfrws",folderIcon:"ScopeTree-module_folderIcon__93n7V",nodeName:"ScopeTree-module_nodeName__-o5cw",optionsButton:"ScopeTree-module_optionsButton__KD0N8",pill:"ScopeTree-module_pill__LfoFO",pillActive:"ScopeTree-module_pillActive__hV98M",pillIcon:"ScopeTree-module_pillIcon__qOzv0",pillLabel:"ScopeTree-module_pillLabel__-pnNE",badge:"ScopeTree-module_badge__0M-VE",badgeActive:"ScopeTree-module_badgeActive__lFpKZ",addAction:"ScopeTree-module_addAction__alNAW",addIcon:"ScopeTree-module_addIcon__Rx81g",menuContainer:"ScopeTree-module_menuContainer__IyejG",menuDropdown:"ScopeTree-module_menuDropdown__12xxX",menuDropdownTop:"ScopeTree-module_menuDropdownTop__hkZpa",menuDropdownBottom:"ScopeTree-module_menuDropdownBottom__w53jm",menuOption:"ScopeTree-module_menuOption__wcvl7",menuOptionDisabled:"ScopeTree-module_menuOptionDisabled__1FaQQ",menuOptionIcon:"ScopeTree-module_menuOptionIcon__s2FWC",tooltipWrapper:"ScopeTree-module_tooltipWrapper__Jhz1M",tooltipContent:"ScopeTree-module_tooltipContent__J02zm",tooltipFadeIn:"ScopeTree-module_tooltipFadeIn__of1bQ",tooltipArrow:"ScopeTree-module_tooltipArrow__m9eHn",highlightText:"ScopeTree-module_highlightText__mHYra",scopeScrollContainer:"ScopeTree-module_scopeScrollContainer__ikLzG"};e(".ScopeTree-module_treeContainer__IfdEO{display:flex;flex:1;flex-direction:column;gap:.5rem;height:100%;overflow:auto;padding:0 1.25rem 80px}.ScopeTree-module_nodeWrapper__zt96G{display:flex;flex-direction:column;min-width:max-content;position:relative}.ScopeTree-module_childrenWrapper__uggxw{border-left:1px solid #e3e6ea;display:flex;flex-direction:column;gap:.5rem;margin-left:calc(var(--tree-depth, 0)*0px + .875rem);margin-top:.5rem;min-width:max-content;padding-left:1rem}.ScopeTree-module_nodeHeader__qxJAp{align-items:center;border:1px solid #0000;border-radius:.375rem;color:#19213d;cursor:pointer;display:flex;gap:.5rem;min-width:max-content;padding:.5rem;transition:all .2s}.ScopeTree-module_nodeHeader__qxJAp:hover{background-color:#f7f8fa}.ScopeTree-module_nodeHeaderSelected__UTNOH{border-color:#2563eb;color:#2563eb}.ScopeTree-module_nodeHeaderAncestor__Cjnkv{color:#2563eb}.ScopeTree-module_chevron__bmchk{align-items:center;border-radius:50px;color:#9ca3af;display:flex;flex-shrink:0;justify-content:center;padding:5px;transition:transform .2s;transition:background-color .3s ease-in-out}.ScopeTree-module_chevron__bmchk:hover{background:#e8ebf0}.ScopeTree-module_chevronExpanded__aZNQo{transform:rotate(180deg)}.ScopeTree-module_chevronHidden__dfrws{visibility:hidden;width:16px}.ScopeTree-module_folderIcon__93n7V{align-items:center;color:inherit;display:flex;flex-shrink:0;justify-content:center}.ScopeTree-module_nodeName__-o5cw{flex:1;font-size:.875rem;font-weight:500;white-space:nowrap}.ScopeTree-module_optionsButton__KD0N8{align-items:center;background:#0000;border:none;border-radius:.25rem;color:#64748b;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:all .2s}.ScopeTree-module_optionsButton__KD0N8:hover{background-color:#e2e8f0;color:#19213d}.ScopeTree-module_pill__LfoFO{align-items:center;border:1px solid #0000;border-radius:.5rem;color:#64748b;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:all .2s}.ScopeTree-module_pill__LfoFO:hover{background-color:#f7f8fa;color:#19213d}.ScopeTree-module_pillActive__hV98M{background-color:#f0f5ff;border-color:#2563eb;color:#2563eb}.ScopeTree-module_pillActive__hV98M:hover{background-color:#e0ebff;color:#2563eb}.ScopeTree-module_pillIcon__qOzv0{align-items:center;display:flex;justify-content:center}.ScopeTree-module_pillLabel__-pnNE{flex:1;font-size:.875rem;font-weight:500}.ScopeTree-module_badge__0M-VE{align-items:center;background-color:#f1f5f9;border-radius:9999px;color:#475569;display:inline-flex;font-size:.625rem;font-weight:600;height:1.25rem;justify-content:center;min-width:1.25rem;padding:0 .375rem}.ScopeTree-module_badgeActive__lFpKZ{background-color:#2563eb;color:#fff}.ScopeTree-module_addAction__alNAW{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#2563eb;cursor:pointer;display:flex;font-size:.875rem;font-weight:500;gap:.5rem;margin-top:.25rem;padding:.5rem;transition:all .2s;width:fit-content}.ScopeTree-module_addAction__alNAW:hover{background-color:#f0f5ff}.ScopeTree-module_addIcon__Rx81g{align-items:center;display:flex;justify-content:center}.ScopeTree-module_menuContainer__IyejG{display:inline-block;position:relative;text-align:left}.ScopeTree-module_menuDropdown__12xxX{background-color:#fff;border:1px solid #0000000d;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;display:flex;flex-direction:column;outline:none;padding:.25rem 0;position:absolute;width:12rem;z-index:9999}.ScopeTree-module_menuDropdownTop__hkZpa{bottom:100%;margin-bottom:.25rem;right:0}.ScopeTree-module_menuDropdownBottom__w53jm{margin-top:.25rem;right:0;top:100%}.ScopeTree-module_menuOption__wcvl7{align-items:center;background:#0000;border:none;color:#374151;cursor:pointer;display:flex;font-size:.875rem;padding:.5rem 1rem;text-align:left;width:100%}.ScopeTree-module_menuOption__wcvl7:not(:disabled):hover{background-color:#f3f4f6;color:#111827}.ScopeTree-module_menuOptionDisabled__1FaQQ{color:#9ca3af;cursor:not-allowed;opacity:.6}.ScopeTree-module_menuOptionIcon__s2FWC{flex-shrink:0;margin-right:.75rem}.ScopeTree-module_tooltipWrapper__Jhz1M{position:relative;width:100%}.ScopeTree-module_tooltipContent__J02zm{animation:ScopeTree-module_tooltipFadeIn__of1bQ .15s ease-out;background-color:#2a3547;border-radius:.375rem;box-shadow:0 10px 15px -3px #0000001a;color:#fff;font-family:sans-serif;font-size:.875rem;max-width:280px;padding:.5rem .75rem;position:relative;z-index:9999}.ScopeTree-module_tooltipArrow__m9eHn{fill:#2a3547;position:absolute}@keyframes ScopeTree-module_tooltipFadeIn__of1bQ{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.ScopeTree-module_highlightText__mHYra{background-color:#fde047;border-radius:.125rem;color:#111827}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar{width:8px}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar-track{background:#0000}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#c7c7cc;border:2px solid #0000;border-radius:4px}.ScopeTree-module_scopeScrollContainer__ikLzG::-webkit-scrollbar-thumb:hover{background-color:#a8a8ad}");export{o as default};
2
2
  //# sourceMappingURL=ScopeTree.module.css.js.map
@@ -1,2 +1,2 @@
1
- import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var r={sidebar:"Sidebar-module_sidebar__BhVQw",tabsContainer:"Sidebar-module_tabsContainer__n542w",tabsWrapper:"Sidebar-module_tabsWrapper__z6rAx",tab:"Sidebar-module_tab__79tnm",tabActive:"Sidebar-module_tabActive__amUJ5",searchContainer:"Sidebar-module_searchContainer__KMtRV",searchWrapper:"Sidebar-module_searchWrapper__4ejma",searchInputWrapper:"Sidebar-module_searchInputWrapper__VI9Qk",searchIcon:"Sidebar-module_searchIcon__iyv9p",searchInput:"Sidebar-module_searchInput__oVmKU",searchRightContainer:"Sidebar-module_searchRightContainer__JZf8q",searchCountBadge:"Sidebar-module_searchCountBadge__JdOCA",searchClearButton:"Sidebar-module_searchClearButton__TCsGU",filterButton:"Sidebar-module_filterButton__OA1Bn",divider:"Sidebar-module_divider__EIZV1",content:"Sidebar-module_content__iG2Ya",section:"Sidebar-module_section__ChTDq",sectionTitle:"Sidebar-module_sectionTitle__EC2Bt",sectionList:"Sidebar-module_sectionList__TErRr",createButtonContainer:"Sidebar-module_createButtonContainer__EECqj",createButton:"Sidebar-module_createButton__wE7-a",emptyContent:"Sidebar-module_emptyContent__TV90P"};e(".Sidebar-module_sidebar__BhVQw{background-color:#fff;border-right:1px solid #e3e6ea;display:flex;flex-direction:column;height:calc(100vh - 140px);overflow:hidden;padding-top:1.25rem;position:relative;width:340px;width:fit-content}.Sidebar-module_tabsContainer__n542w{margin-bottom:1.25rem;padding:0 1.25rem}.Sidebar-module_tabsWrapper__z6rAx{background-color:#f3f4f6cc;border-radius:.5rem;display:grid;gap:.25rem;grid-template-columns:1fr 1fr;padding:.25rem}.Sidebar-module_tab__79tnm{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#64748b;cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem .75rem;transition:all .2s}.Sidebar-module_tab__79tnm:hover{color:#2563eb}.Sidebar-module_tabActive__amUJ5{background-color:#fff;box-shadow:0 1px 2px 0 #0000000d;color:#2563eb;font-weight:700}.Sidebar-module_searchContainer__KMtRV{margin-bottom:1rem;padding:0 1.25rem}.Sidebar-module_searchWrapper__4ejma{display:flex;gap:.5rem}.Sidebar-module_searchInputWrapper__VI9Qk{align-items:center;display:flex;flex:1;position:relative;width:100%}.Sidebar-module_searchIcon__iyv9p{color:#9ca3af;left:.75rem;position:absolute;top:50%;transform:translateY(-50%)}.Sidebar-module_searchInput__oVmKU{background-color:#fff;border:1px solid #f0f2f5;border-radius:.5rem;box-shadow:0 1px 2px 0 #0000000d;font-size:.875rem;outline:none;padding:.5rem 1rem .5rem 2.25rem;transition:all .2s;width:100%}.Sidebar-module_searchInput__oVmKU:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb33}.Sidebar-module_searchInput__oVmKU::placeholder{color:#9ca3af}.Sidebar-module_searchRightContainer__JZf8q{align-items:center;display:flex;gap:.5rem;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.Sidebar-module_searchCountBadge__JdOCA{background-color:#fde047;border-radius:.25rem;color:#374151;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.Sidebar-module_searchClearButton__TCsGU{align-items:center;background:#0000;border:none;color:#9ca3af;cursor:pointer;display:flex;margin:0;outline:none;padding:0;transition:color .2s ease}.Sidebar-module_searchClearButton__TCsGU:hover{color:#4b5563}.Sidebar-module_filterButton__OA1Bn{background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;cursor:pointer;padding:.5rem;transition:background-color .2s,border-color .2s}.Sidebar-module_filterButton__OA1Bn:hover{background-color:#f0f2f5}.Sidebar-module_filterButton__OA1Bn svg{color:#19213d}.Sidebar-module_divider__EIZV1{background-color:#f0f2f5;height:1.5px;margin:0 1.25rem 1rem;width:100%}.Sidebar-module_content__iG2Ya{flex:1;overflow-y:auto;padding:0 1.25rem}.Sidebar-module_content__iG2Ya::-webkit-scrollbar{width:4px}.Sidebar-module_content__iG2Ya::-webkit-scrollbar-thumb{background-color:#e5e7eb;border-radius:9999px}.Sidebar-module_section__ChTDq{margin-bottom:1.5rem}.Sidebar-module_sectionTitle__EC2Bt{color:#19213d;font-size:.875rem;font-weight:600;margin-bottom:.75rem}.Sidebar-module_sectionList__TErRr{display:flex;flex-direction:column;gap:.75rem}.Sidebar-module_createButtonContainer__EECqj{background-color:#fff;border-top:1px solid #e5e7eb;bottom:0;box-shadow:0 -4px 20px #0000000d;left:0;padding:1rem;position:absolute;width:100%;z-index:50}.Sidebar-module_createButton__wE7-a{align-items:center;background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;color:#19213d;cursor:pointer;display:flex;font-size:.75rem;font-weight:500;gap:.5rem;justify-content:center;padding:.75rem;transition:all .2s;width:100%}.Sidebar-module_createButton__wE7-a:hover{background-color:#f3f4f6;box-shadow:0 1px 2px 0 #0000000d}.Sidebar-module_createButton__wE7-a:active{transform:scale(.99)}.Sidebar-module_emptyContent__TV90P{align-items:center;color:#9ca3af;display:flex;flex-direction:column;font-size:.875rem;height:10rem;justify-content:center}");export{r as default};
1
+ import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var r={sidebar:"Sidebar-module_sidebar__BhVQw",tabsContainer:"Sidebar-module_tabsContainer__n542w",tabsWrapper:"Sidebar-module_tabsWrapper__z6rAx",tab:"Sidebar-module_tab__79tnm",tabActive:"Sidebar-module_tabActive__amUJ5",searchContainer:"Sidebar-module_searchContainer__KMtRV",searchWrapper:"Sidebar-module_searchWrapper__4ejma",searchInputWrapper:"Sidebar-module_searchInputWrapper__VI9Qk",searchIcon:"Sidebar-module_searchIcon__iyv9p",searchInput:"Sidebar-module_searchInput__oVmKU",searchRightContainer:"Sidebar-module_searchRightContainer__JZf8q",searchCountBadge:"Sidebar-module_searchCountBadge__JdOCA",searchClearButton:"Sidebar-module_searchClearButton__TCsGU",filterButton:"Sidebar-module_filterButton__OA1Bn",divider:"Sidebar-module_divider__EIZV1",content:"Sidebar-module_content__iG2Ya",section:"Sidebar-module_section__ChTDq",sectionTitle:"Sidebar-module_sectionTitle__EC2Bt",sectionList:"Sidebar-module_sectionList__TErRr",createButtonContainer:"Sidebar-module_createButtonContainer__EECqj",createButton:"Sidebar-module_createButton__wE7-a",emptyContent:"Sidebar-module_emptyContent__TV90P"};e(".Sidebar-module_sidebar__BhVQw{background-color:#fff;border-right:1px solid #e3e6ea;display:flex;flex-direction:column;height:calc(100vh - 140px);overflow:hidden;padding-top:1.25rem;position:relative;width:340px;width:fit-content}.Sidebar-module_tabsContainer__n542w{margin-bottom:1.25rem;padding:0 1.25rem}.Sidebar-module_tabsWrapper__z6rAx{background-color:#f3f4f6cc;border-radius:.5rem;display:grid;gap:.25rem;grid-template-columns:1fr 1fr;padding:.25rem}.Sidebar-module_tab__79tnm{align-items:center;background:#0000;border:none;border-radius:.375rem;color:#64748b;cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem .75rem;transition:all .2s}.Sidebar-module_tab__79tnm:hover{color:#2563eb}.Sidebar-module_tabActive__amUJ5{background-color:#fff;box-shadow:0 1px 2px 0 #0000000d;color:#2563eb;font-weight:700}.Sidebar-module_searchContainer__KMtRV{margin-bottom:1rem;padding:0 1.25rem}.Sidebar-module_searchWrapper__4ejma{display:flex;gap:.5rem}.Sidebar-module_searchInputWrapper__VI9Qk{align-items:center;display:flex;flex:1;position:relative;width:100%}.Sidebar-module_searchIcon__iyv9p{color:#9ca3af;left:.75rem;position:absolute;top:50%;transform:translateY(-50%)}.Sidebar-module_searchInput__oVmKU{background-color:#fff;border:1px solid #f0f2f5;border-radius:.5rem;box-shadow:0 1px 2px 0 #0000000d;font-size:.875rem;outline:none;padding:.5rem 1rem .5rem 2.25rem;transition:all .2s;width:100%}.Sidebar-module_searchInput__oVmKU:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb33}.Sidebar-module_searchInput__oVmKU::placeholder{color:#9ca3af}.Sidebar-module_searchRightContainer__JZf8q{align-items:center;display:flex;gap:.5rem;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.Sidebar-module_searchCountBadge__JdOCA{background-color:#fde047;border-radius:.25rem;color:#374151;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.Sidebar-module_searchClearButton__TCsGU{align-items:center;background:#0000;border:none;color:#9ca3af;cursor:pointer;display:flex;margin:0;outline:none;padding:0;transition:color .2s ease}.Sidebar-module_searchClearButton__TCsGU:hover{color:#4b5563}.Sidebar-module_filterButton__OA1Bn{background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;cursor:pointer;padding:.5rem;transition:background-color .2s,border-color .2s}.Sidebar-module_filterButton__OA1Bn:hover{background-color:#f0f2f5}.Sidebar-module_filterButton__OA1Bn svg{color:#19213d}.Sidebar-module_divider__EIZV1{background-color:#f0f2f5;height:1.5px;margin:0 1.25rem 1rem;width:100%}.Sidebar-module_content__iG2Ya{flex:1;overflow-y:auto;padding:0 1.25rem}.Sidebar-module_section__ChTDq{margin-bottom:1.5rem}.Sidebar-module_sectionTitle__EC2Bt{color:#19213d;font-size:.875rem;font-weight:600;margin-bottom:.75rem}.Sidebar-module_sectionList__TErRr{display:flex;flex-direction:column;gap:.75rem}.Sidebar-module_createButtonContainer__EECqj{background-color:#fff;border-top:1px solid #e5e7eb;bottom:0;box-shadow:0 -4px 20px #0000000d;left:0;padding:1rem;position:absolute;width:100%;z-index:50}.Sidebar-module_createButton__wE7-a{align-items:center;background-color:#f7f8fa;border:1px solid #f0f2f5;border-radius:.5rem;color:#19213d;cursor:pointer;display:flex;font-size:.75rem;font-weight:500;gap:.5rem;justify-content:center;padding:.75rem;transition:all .2s;width:100%}.Sidebar-module_createButton__wE7-a:hover{background-color:#f3f4f6;box-shadow:0 1px 2px 0 #0000000d}.Sidebar-module_createButton__wE7-a:active{transform:scale(.99)}.Sidebar-module_emptyContent__TV90P{align-items:center;color:#9ca3af;display:flex;flex-direction:column;font-size:.875rem;height:10rem;justify-content:center}");export{r as default};
2
2
  //# sourceMappingURL=Sidebar.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TreeNode.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/LearningManagement/components/ScopeTree/TreeNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQ/E,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAClE,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9F,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACrF,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiU5C,CAAC"}
1
+ {"version":3,"file":"TreeNode.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/LearningManagement/components/ScopeTree/TreeNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQ/E,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAClE,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9F,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACrF,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAuS5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/instant-learning",
3
- "version": "1.3.0-alpha.76",
3
+ "version": "1.3.0-alpha.78",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -100,7 +100,7 @@
100
100
  "@babel/plugin-transform-runtime": "^7.25.9",
101
101
  "@babel/preset-react": "7.26.3",
102
102
  "@babel/preset-typescript": "7.26.0",
103
- "@e-llm-studio/streaming-response": "^1.1.77",
103
+ "@e-llm-studio/streaming-response": "^1.1.78",
104
104
  "@emotion/react": "^11.14.0",
105
105
  "@emotion/styled": "^11.14.1",
106
106
  "@monaco-editor/react": "^4.7.0",