@e-llm-studio/instant-learning 0.1.1-alpha.56 → 0.1.1-alpha.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/cjs/features/IL-OTJ/ILOTJTest.js +1 -1
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordion.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionShell.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/TierCard.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantList.js +1 -1
- package/dist/cjs/features/LearningManagement/Sidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/SidebarWrapper.js +1 -1
- package/dist/cjs/features/LearningManagement/apis/apiConfig.js +1 -1
- package/dist/cjs/features/LearningManagement/apis/scopeApis.js +1 -1
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/EmptyLearningState.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeAddAction.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationAutocomplete.js +1 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
- package/dist/cjs/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/cjs/features/LearningManagement/queries/useApprovalQueries.js +1 -1
- package/dist/cjs/features/LearningManagement/store/useEnvStore.js +1 -1
- package/dist/cjs/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
- package/dist/cjs/features/LearningManagement/store/usePermissionsStore.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/EmptyRuleState.module.css.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/features/IL-OTJ/ILOTJTest.js +1 -1
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessPanel.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessPanel.module.css.js +1 -1
- package/dist/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
- package/dist/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
- package/dist/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleAccordion.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleAccordionShell.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
- package/dist/features/LearningManagement/RuleContent/TierCard.js +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantList.js +1 -1
- package/dist/features/LearningManagement/Sidebar.js +1 -1
- package/dist/features/LearningManagement/SidebarWrapper.js +1 -1
- package/dist/features/LearningManagement/apis/apiConfig.js +1 -1
- package/dist/features/LearningManagement/apis/scopeApis.js +1 -1
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js +1 -1
- package/dist/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
- package/dist/features/LearningManagement/components/EmptyLearningState.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeAddAction.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/features/LearningManagement/components/StationOnboarding/StationAutocomplete.js +1 -1
- package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
- package/dist/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/features/LearningManagement/queries/useApprovalQueries.js +1 -1
- package/dist/features/LearningManagement/store/useEnvStore.js +1 -1
- package/dist/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
- package/dist/features/LearningManagement/store/usePermissionsStore.js +1 -1
- package/dist/features/LearningManagement/styles/EmptyRuleState.module.css.js +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +0 -7
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts +41 -6
- package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +1 -3
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagementTest.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +0 -3
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts +0 -4
- package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/index.d.ts +1 -2
- package/dist/types/src/features/LearningManagement/RBAC/index.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/ContentLogic.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordion.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordion.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionShell.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionShell.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts +0 -4
- package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/VariantList.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RuleContent/VariantList.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/Sidebar.d.ts +0 -3
- package/dist/types/src/features/LearningManagement/Sidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/SidebarWrapper.d.ts +0 -3
- package/dist/types/src/features/LearningManagement/SidebarWrapper.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +0 -70
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/CreateLearningSetModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts +0 -1
- package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts +0 -10
- package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeAddAction.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeAddAction.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeMenu.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts +0 -3
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts +0 -3
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationAutocomplete.d.ts +0 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationAutocomplete.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +0 -4
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/queries/useApprovalQueries.d.ts +3 -4
- package/dist/types/src/features/LearningManagement/queries/useApprovalQueries.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts +0 -13
- package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts +2 -6
- package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts +1 -2
- package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/types.d.ts +1 -2
- package/dist/types/src/features/LearningManagement/types.d.ts.map +1 -1
- package/package.json +1 -3
- package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +0 -2
- package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js.map +0 -1
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js +0 -2
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js.map +0 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +0 -2
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +0 -1
- package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +0 -2
- package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js.map +0 -1
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js +0 -2
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js.map +0 -1
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +0 -2
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +0 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +0 -8
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +0 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts +0 -12
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@mui/material"),a=require("react"),o=require("./_components/ChatComponents/ChatComponent.js"),i=require("./_components/ILPopup.js"),s=require("./_components/VariantLoadingOverlay.js"),r=require("./_components/templates/RuleComparison/RuleComparison.js"),l=require("./_components/templates/RuleComparison/AgentComposerRuleComparison.js"),d=require("./_components/ChatComponents/NormalChat.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(a);exports.default=function(u){var g=u.open,h=u.chatAssistantName,m=u.organizationName,p=u.baseUrl,f=u.baseWebsocketUrl,C=u.closeFunction,v=u.ThinkingBulbIconComponent,x=u.customSections,S=u.customMetaData,b=u.chatTitle,k=void 0===b?"Instant Learning On-The-Job":b,w=u.formTitle,M=void 0===w?"Instant Learning On-The-Job Form":w,y=u.onSave,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@mui/material"),a=require("react"),o=require("./_components/ChatComponents/ChatComponent.js"),i=require("./_components/ILPopup.js"),s=require("./_components/VariantLoadingOverlay.js"),r=require("./_components/templates/RuleComparison/RuleComparison.js"),l=require("./_components/templates/RuleComparison/AgentComposerRuleComparison.js"),d=require("./_components/ChatComponents/NormalChat.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(a);exports.default=function(u){var g=u.open,h=u.chatAssistantName,m=u.organizationName,p=u.baseUrl,f=u.baseWebsocketUrl,C=u.closeFunction,v=u.ThinkingBulbIconComponent,x=u.customSections,S=u.customMetaData,b=u.chatTitle,k=void 0===b?"Instant Learning On-The-Job":b,w=u.formTitle,M=void 0===w?"Instant Learning On-The-Job Form":w,y=u.onSave,R=u.headerMessageHandlers,I=u.aiResponse,_=u.setAIResponse,j=u.width,F=void 0===j?"90vw":j,T=u.height,V=void 0===T?"90vh":T,A=u.sendMessageInChat,D=void 0===A?"":A,L=u.setSendMessageInChat,E=u.validateCustom,B=u.onResetChat,W=u.template,q=u.templateProps,P=u.initialChatMessage,z=u.setCitations,O=u.isLoading,N=void 0!==O&&O,U=u.isLocked,J=void 0!==U&&U,H=u.saveButtonConfig,G=void 0===H?{label:"Save Learning",loadingLabel:"Saving Learning..."}:H,X=u.saveButtonColor,Y=u.saveWithoutValBtnConfig,K=void 0===Y?{label:"Save Without Validation",loadingLabel:"Saving Without Validation..."}:Y,Q=u.textareaPlaceholder,Z=u.setCurrentRequestId,$=u.showSavedMessage,ee=void 0!==$&&$,ne=u.savedMessage,te=void 0===ne?"Thank you teacher for teaching me, your learning has been saved successfully.":ne,ae=u.isError,oe=void 0!==ae&&ae,ie=u.errorMessage,se=void 0===ie?"I'm sorry, I couldn't save your changes. Please try again.":ie,re=u.isSaving,le=void 0!==re&&re,de=u.isAiStreaming,ue=u.setIsAiStreaming,ce=u.showConfirmReset,ge=void 0!==ce&&ce,he=u.setShowConfirmReset,me=u.confirmReset,pe=u.isLoadingVariants,fe=u.isFormDirty,Ce=u.onResetRequest,ve=u.mainText,xe=void 0===ve?"Adding a variant":ve,Se=u.subText,be=void 0===Se?"This may take a moment as we update the learning with the new variant.":Se,ke=u.showComparison,we=void 0!==ke&&ke,Me=u.setShowComparison,ye=u.showAgentComposerRuleComparison,Re=void 0!==ye&&ye,Ie=u.setShowAgentComposerRuleComparison,_e=u.isFetchingComparison,je=u.handleOpenComparison,Fe=u.proposedRule,Te=u.variants,Ve=u.onAddAsVariant,Ae=u.isCopyEnabled,De=u.showSaveWithoutValidation,Le=void 0!==De&&De,Ee=u.onSaveWithoutValidation,Be=u.onComparisonLinkClick,We=u.targetComparisonVariantId,qe=u.highlightedComparisonField,Pe=u.onSubmitFeedback,ze=u.isUseNormalChat,Oe=void 0!==ze&&ze,Ne=u.userDetails,Ue=u.handleGlobalClickCapture,Je=u.isGlobalEditActive,He=u.socketTimeOutInMilliSeconds,Ge=u.initialDraftMessage,Xe=u.onValidateSession,Ye=a.useState(g),Ke=Ye[0],Qe=Ye[1],Ze=a.useState(!1);Ze[0];var $e=Ze[1],en=a.useState(!1),nn=en[0],tn=en[1],an=a.useState(!1),on=an[0];an[1];var sn=a.useState(45),rn=sn[0],ln=sn[1],dn=a.useState("right"),un=dn[0],cn=dn[1],gn=c.default.useRef(un),hn=a.useState(!1),mn=hn[0],pn=hn[1],fn=a.useState(0),Cn=fn[0],vn=fn[1],xn=a.useState(40),Sn=xn[0],bn=xn[1];a.useEffect(function(){gn.current=un},[un]),a.useEffect(function(){Qe(g)},[g]);var kn=a.useCallback(function(e){e.preventDefault(),pn(!0),vn(e.clientX),bn(rn)},[rn]),wn=a.useCallback(function(e){if(mn){var n=document.querySelector("[data-dialog-content]");if(n){var t=n.getBoundingClientRect(),a=(e.clientX-Cn)/t.width*100,o=Math.max(20,Math.min(80,Sn+a));ln(o),o>Sn&&cn("right"),o<Sn&&cn("left")}}},[mn,Cn,Sn]),Mn=a.useCallback(function(){pn(!1)},[]);a.useEffect(function(){if(mn)return document.addEventListener("mousemove",wn),document.addEventListener("mouseup",Mn),function(){document.removeEventListener("mousemove",wn),document.removeEventListener("mouseup",Mn)}},[mn,wn,Mn]);var yn=function(e,n){J&&"backdropClick"===n||("escapeKeyDown"!==n&&"manualClose"!==n||!(null==fe?void 0:fe())?(Qe(!1),C()):null==Ce||Ce())},Rn=a.useCallback(function(e){ln(function(n){var t;if("number"==typeof e)return e>n&&cn("right"),e<n&&cn("left"),e;var a=gn.current,o=null!==(t={20:30,30:"left"===a?20:50,50:"left"===a?30:75,75:"left"===a?50:100,100:75}[n])&&void 0!==t?t:40;return 100===o&&cn("left"),20===o&&cn("right"),o})},[]),In=a.useCallback(function(){je&&(Rn(30),je())},[Rn,je]);return n.jsx(t.Dialog,e.__assign({open:Ke,onClose:yn,maxWidth:!1,fullWidth:!0,PaperProps:{sx:{width:F,height:V,display:"flex",flexDirection:"column",padding:0,margin:0,maxWidth:"100vw",borderRadius:"10px"}}},{children:n.jsxs(t.DialogContent,e.__assign({"data-dialog-content":!0,onClickCapture:Ue,sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"row",gap:0,padding:0,fontFamily:'"Plus Jakarta Sans", sans-serif',"& *":{fontFamily:'"Plus Jakarta Sans", sans-serif !important'}}},{children:[n.jsx(t.Box,e.__assign({sx:{width:"".concat(rn,"%"),maxWidth:"".concat(rn,"%"),transition:mn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",bgcolor:"#ffffff",p:0,display:0===rn?"none":"flex",flexDirection:"column"}},{children:Oe?n.jsx(d.default,{chatAssistantName:h,organizationName:m,baseUrl:p,baseWebsocketUrl:f,setIsNewChatClicked:$e,ThinkingBulbIconComponent:v,isFormSaveClicked:nn,setIsFormSavedClicked:tn,onResetLearningData:function(){},sendMessageInChat:D,setSendMessageInChat:L,isFormValidating:on,chatTitle:k,customMetaData:S,headerMessageHandlers:R,aiResponse:I,setAIResponse:_,onResetChat:B,initialChatMessage:P,onSave:y,chatSize:rn,movingTowards:un,setChatSize:Rn,setCitations:z,textareaPlaceholder:Q,setCurrentRequestId:Z,showSavedMessage:ee,savedMessage:te,isError:oe,errorMessage:se,isSaving:le,onStreamingStateChange:ue,onViewComparison:In,isCopyEnabled:Ae,onComparisonLinkClick:Be,onSubmitFeedback:Pe}):n.jsx(o.default,{chatAssistantName:h,organizationName:m,baseUrl:p,baseWebsocketUrl:f,setIsNewChatClicked:$e,ThinkingBulbIconComponent:v,isFormSaveClicked:nn,setIsFormSavedClicked:tn,onResetLearningData:function(){},sendMessageInChat:D,setSendMessageInChat:L,isFormValidating:on,chatTitle:k,customMetaData:S,headerMessageHandlers:R,aiResponse:I,setAIResponse:_,onResetChat:B,initialChatMessage:P,onSave:y,chatSize:rn,movingTowards:un,setChatSize:Rn,setCitations:z,textareaPlaceholder:Q,setCurrentRequestId:Z,showSavedMessage:ee,savedMessage:te,isError:oe,errorMessage:se,isSaving:le,onStreamingStateChange:ue,onViewComparison:In,isCopyEnabled:Ae,onComparisonLinkClick:Be,onSubmitFeedback:Pe,userDetails:Ne,isGlobalEditActive:Je,socketTimeOutInMilliSeconds:He,initialDraftMessage:Ge,onValidateSession:Xe,onCloseSessionModal:me})})),n.jsx(t.Box,{sx:{width:"2px",cursor:"col-resize",backgroundColor:mn?"#1976d2":"#e0e0e0",transition:"background-color 0.2s ease","&:hover":{backgroundColor:"#1976d2"},flexShrink:0},onMouseDown:kn}),n.jsxs(t.Box,e.__assign({sx:{width:"".concat(100-rn,"%"),maxWidth:"".concat(100-rn,"%"),transition:mn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",display:100===rn?"none":"flex",flexDirection:"column",overflowY:"hidden",position:"relative"}},{children:[n.jsx(s.default,{isLoading:_e||!1,mainText:"Fetching differences between rules",subText:"This may take a moment..."}),n.jsx(s.default,{isLoading:pe||!1,mainText:xe,subText:be}),Re?n.jsx(l.default,{proposedRule:Fe,variants:Te,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Ve||Ve(),Rn(40),null==Ie||Ie(!1)},onSkip:function(){Rn(40),null==Ie||Ie(!1)},onBack:function(){Rn(40),null==Ie||Ie(!1)},targetVariantId:We,highlightedField:qe}):we?n.jsx(r.default,{proposedRule:Fe,variants:Te,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Ve||Ve(),Rn(40),null==Me||Me(!1)},onSkip:function(){Rn(40),null==Me||Me(!1)},onBack:function(){Rn(40),null==Me||Me(!1)},targetVariantId:We,highlightedField:qe}):n.jsx(i.default,{setIsFormSavedClicked:tn,customSections:x,onSave:y,formHeader:M,onClose:function(){return yn(0,"manualClose")},validateCustom:E,template:W,templateProps:q,isLoading:N,isAiStreaming:de,saveButtonConfig:G,saveButtonColor:X,showSaveWithoutValidation:Le,saveWithoutValBtnConfig:K,onSaveWithoutValidation:Ee}),n.jsx(t.Dialog,e.__assign({open:ge,onClose:function(){return null==he?void 0:he(!1)},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:n.jsxs(t.Box,e.__assign({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[n.jsx("h3",e.__assign({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"6px"}},{children:"Exit Teach Me OTJ?"})),n.jsx("p",e.__assign({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"10px"}},{children:"Exiting will discard any unsaved changes and end your session."})),n.jsxs(t.Box,e.__assign({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[n.jsx("button",e.__assign({onClick:function(){return null==he?void 0:he(!1)},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:me,style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Yes, Discard"}))]}))]}))}))]}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=ILOTJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib");require("react/jsx-runtime"),require("@mui/material"),require("lucide-react"),require("react"),require("uuid"),require("./_components/templates/TemplatesMap/templatesMap.js"),require("@mui/material/Tooltip"),require("react-markdown"),require("rehype-raw");var r=require("axios");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@e-llm-studio/streaming-response"),require("@e-llm-studio/watch-me-work"),require("./_components/ChatComponents/ChatHeader.js"),require("remark-gfm"),require("./_components/MarkdownComponents/MarkdownElements.js"),require("./_components/CitationLink.js"),require("@e-llm-studio/citation"),require("./store/CitationsContext.js"),require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib");require("react/jsx-runtime"),require("@mui/material"),require("lucide-react"),require("react"),require("uuid"),require("./_components/templates/TemplatesMap/templatesMap.js"),require("@mui/material/Tooltip"),require("react-markdown"),require("rehype-raw");var r=require("axios");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@e-llm-studio/streaming-response"),require("@e-llm-studio/watch-me-work"),require("./_components/ChatComponents/ChatHeader.js"),require("remark-gfm"),require("./_components/MarkdownComponents/MarkdownElements.js"),require("./_components/CitationLink.js"),require("@e-llm-studio/citation"),require("./store/CitationsContext.js"),require("./_components/templates/RuleComparison/RuleComparison.js");var i=t(r);exports.getVariantInfo=function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i.default.post("https://devllmstudio.creativeworkspace.ai/instant_learning/give-variant-info",r)];case 1:return[2,e.sent().data];case 2:throw t=e.sent(),console.error("Error getting variant info:",t),t;case 3:return[2]}})})};
|
|
2
2
|
//# sourceMappingURL=ILOTJTest.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material"),n=require("@mui/icons-material/Close"),a=require("../../LearningManagement/store/useLearningTemplateStore.js"),s=require("../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js"),o=require("../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),u=require("../../../plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(n),d=function(){var n=r.useState(!0),a=n[0],s=n[1];return t.jsxs(i.Dialog,e.__assign({open:a,onClose:function(){return s(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[t.jsxs(i.DialogTitle,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[t.jsx(i.Typography,e.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),t.jsx(i.IconButton,e.__assign({onClick:function(){return s(!1)}},{children:t.jsx(c.default,{})}))]})),t.jsx(i.DialogContent,e.__assign({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},p={Default:s.default,"Radio Traffic Learning":o.default,Guidelines:u.default,Category:function(){return t.jsx("div",{children:"Category Template - Coming Soon!"})}};exports.default=function(n){var s=a.useLearningTemplateStore(function(e){return e.backwardCompatibility}),o=a.useLearningTemplateStore(function(e){return n.app_integration_id?e.templateMap[n.app_integration_id]:void 0}),u=a.useLearningTemplateStore(function(e){return e.setTemplateData}),l=s?"Radio Traffic Learning":o,c=r.useState(!l),f=c[0],g=c[1],_=r.useState(!1),h=_[0],m=_[1];if(r.useEffect(function(){if(n.isOpen){if(!s&&!n.app_integration_id)return console.error("TeachMeWrapper requires an app_integration_id when backward compatibility is disabled."),m(!0),void g(!1);if(l)g(!1);else{e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),g(!0),m(!1),[4,(a=n.app_integration_id,s=n.token,e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(e){switch(e.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(a),{headers:{Authorization:"Bearer ".concat(s)}})];case 1:if(!(t=e.sent()).ok)throw new Error("Failed to fetch value type");return[4,t.json()];case 2:return r=e.sent(),console.log("Fetched value type data:",r),!r||Array.isArray(r.data)&&0===r.data.length?[2,null]:[2,r.data[0].value_type_name||r.valueTypeName||r.templateName]}})}))];case 1:return t=i.sent(),u(n.app_integration_id,t),[3,4];case 2:return r=i.sent(),console.error(r),m(!0),n.app_integration_id&&u(n.app_integration_id,"ERROR"),[3,4];case 3:return g(!1),[7];case 4:return[2]}var a,s})})}}},[n.isOpen,n.app_integration_id,l,n.token,u,s]),f)return t.jsx(i.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:t.jsx(i.CircularProgress,{size:32})}));if(h||!l)return t.jsx(d,{});var v=p[l];return v?t.jsx(v,e.__assign({},n)):(console.warn("No renderer found for template: ".concat(l)),t.jsx(d,{}))};
|
|
2
2
|
//# sourceMappingURL=TeachMeWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),r=require("@mui/material"),s=require("lucide-react"),t=require("@viswa-test/test-citation"),o=function(n){var s=n.data,t=n.isSelected,o=n.onClick;return i.jsxs(r.Box,e.__assign({id:"variant-card-".concat(s.id),onClick:o,sx:{minWidth:"280px",maxWidth:"280px",p:2,m:.5,bgcolor:t?"#EFF6FF99":"#FFFFFF",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",gap:1,flexShrink:0,opacity:s.isLoading?.7:1,border:t?"1.4px solid #2563EB":"1.4px solid transparent",boxShadow:t?"none":"0px 2px 4px 0px #19213D14","&:hover":{borderColor:t?"#2563EB":"#CBD5E1",boxShadow:t?"none":"0px 4px 8px 0px #19213D1F"}}},{children:[i.jsx(r.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:s.isLoading?i.jsx(r.Skeleton,{variant:"rounded",width:80,height:20}):i.jsx(r.Box,e.__assign({sx:{bgcolor:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:600,px:1,py:.5,borderRadius:"100px",border:"1px solid #FFE1E1",textTransform:"capitalize"}},{children:s.similarityScoreText||"0% Similarity"}))})),i.jsx(r.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:1}},{children:i.jsxs(r.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"}},{children:[s.isLoading?i.jsx(r.Skeleton,{width:"90%"}):i.jsx(r.Typography,e.__assign({title:s.title,sx:{fontWeight:500,fontSize:"14px",color:"#19213D",lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}},{children:s.title})),s.scope&&i.jsx(r.Box,e.__assign({sx:{flexShrink:0,fontSize:"10px",fontWeight:600,color:"#19213D",bgcolor:"#FFF",border:"1px solid #EDEFF2",px:.75,py:.25,borderRadius:"6px",lineHeight:1.4,whiteSpace:"nowrap"}},{children:s.scope}))]}))}))]}))};exports.default=function(a){var l=a.variants,x=void 0===l?[]:l,c=a.onSelectVariant,d=a.onSkip,g=a.onBack,p=a.targetVariantId,f=n.useState(p||null),h=f[0],u=f[1],_=n.useRef(null);n.useEffect(function(){p&&u(p)},[p]);var m=function(e){_.current&&_.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},b=n.useMemo(function(){if(h){var e=String(h).trim();return x.find(function(i){return i.id&&String(i.id).trim()===e})||x[0]}return x.length>0?x[0]:null},[h,x]);n.useEffect(function(){if(h&&_.current){var e=h.trim();setTimeout(function(){var i=document.getElementById("variant-card-".concat(e)),n=_.current;if(i&&n){var r=i.offsetLeft-n.offsetLeft-n.clientWidth/2+i.clientWidth/2;n.scrollTo({left:r,behavior:"smooth"})}},150)}},[h,x]);n.useEffect(function(){!h&&!p&&x.length>0&&!x[0].isLoading&&u(x[0].id)},[x,h,p]);var y=n.useState(!1),F=y[0],v=y[1],j=n.useState(!1),B=j[0],w=j[1];n.useEffect(function(){var e=_.current;if(e){var i=function(){v(e.scrollLeft>0),w(e.scrollLeft+e.clientWidth<e.scrollWidth-1)};return i(),e.addEventListener("scroll",i),window.addEventListener("resize",i),function(){e.removeEventListener("scroll",i),window.removeEventListener("resize",i)}}},[x]);var S=(null==b?void 0:b.intentTreeData)||null,E=(null==b?void 0:b.behaviorTreeData)||null;return i.jsxs(r.Box,e.__assign({sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#FFFFFF",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden"}},{children:[i.jsxs(r.Box,e.__assign({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF"}},{children:[i.jsxs(r.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1}},{children:[i.jsx(r.IconButton,e.__assign({onClick:g,size:"small"},{children:i.jsx(s.ArrowLeft,{})})),i.jsx(r.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:450,color:"#0F172A"}},{children:"Learning Comparison"}))]})),i.jsx(r.IconButton,e.__assign({onClick:d,size:"small"},{children:i.jsx(r.Box,e.__assign({sx:{fontSize:24,lineHeight:.5}},{children:"×"}))}))]})),i.jsx(r.Box,e.__assign({sx:{bgcolor:"#F6F7F9B2"}},{children:x.length>1&&i.jsxs(r.Box,e.__assign({sx:{pb:2}},{children:[i.jsxs(r.Box,e.__assign({sx:{px:3,display:"flex",alignItems:"center",justifyContent:"space-between",py:1}},{children:[i.jsx(r.Typography,e.__assign({sx:{fontSize:"13px",color:"#475569"}},{children:"Choose the Learning you want to compare with the rule you are creating."})),i.jsxs(r.Box,e.__assign({sx:{display:"flex",gap:.5,flexShrink:0,ml:1}},{children:[i.jsx(r.IconButton,e.__assign({onClick:function(){return m("left")},size:"small",disabled:!F},{children:i.jsx(s.ArrowLeft,{size:18})})),i.jsx(r.IconButton,e.__assign({onClick:function(){return m("right")},size:"small",disabled:!B},{children:i.jsx(s.ArrowRight,{size:18})}))]}))]})),i.jsx(r.Box,e.__assign({ref:_,sx:{display:"flex",gap:1,overflowX:"auto",px:3,"&::-webkit-scrollbar":{display:"none"}}},{children:x.map(function(e){return i.jsx(o,{data:e,isSelected:(null==b?void 0:b.id)===e.id,onClick:function(){return u((i=e).id),void c(i);var i}},e.id)})}))]}))})),i.jsxs(r.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:3,margin:3,overflowY:"auto",backgroundColor:"#fff","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"#CBD5E1",borderRadius:"10px"}}},{children:[S&&i.jsxs(r.Box,e.__assign({sx:{display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid #E2E8F0"}},{children:[i.jsxs(r.Box,e.__assign({sx:{px:3,py:1.5,bgcolor:"#F8F9FB",borderBottom:"1px solid #E2E8F0",textAlign:"center"}},{children:[i.jsx(r.Typography,e.__assign({sx:{fontSize:"15px",fontWeight:600,color:"#0F172A",mb:.5}},{children:"Is the learning's intent matching?"})),i.jsx(r.Typography,e.__assign({sx:{fontSize:"13px",color:"#64748B"}},{children:"Checking if the learning you are creating is same as the existing learning."}))]})),i.jsx(t.CognitiveCompare,{treeData:S,componentHeaderText:"Is the learning's intent matching?",displayConfig:{isHeaderVisible:!1,isToggleVisible:!1,maintainRelativeOrder:!1,isLoading:!1}})]})),E&&i.jsxs(r.Box,e.__assign({sx:{display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid #E2E8F0"}},{children:[i.jsxs(r.Box,e.__assign({sx:{px:3,py:1.5,bgcolor:"#F8F9FB",borderBottom:"1px solid #E2E8F0",textAlign:"center"}},{children:[i.jsx(r.Typography,e.__assign({sx:{fontSize:"15px",fontWeight:600,color:"#0F172A",mb:.5}},{children:"Is the learning behavior matching?"})),i.jsx(r.Typography,e.__assign({sx:{fontSize:"13px",color:"#64748B"}},{children:"Checking if the variant you are trying to add is similar, overlapping or conflicting with the existing variant."}))]})),i.jsx(t.CognitiveCompare,{treeData:E,componentHeaderText:"Is the learning behavior matching?",displayConfig:{isHeaderVisible:!1,isToggleVisible:!1,maintainRelativeOrder:!1,isLoading:!1}})]}))]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("@mui/material"),r=require("lucide-react"),o=require("../../_svg/SparkleIcon.js"),s=require("@e-llm-studio/citation"),l=require("../../_svg/ButtonCognitiveIcon.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=function(e,n){if(!n)return null;var t=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),i=n.match(t);return i?i[1].replace(/\\n/g,"\n"):null},d=function(e,n,t){var i=100*e;if(!t)return{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:"Not Defined"};var r=function(e){return e.split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" ")}(n);return i>=70?{bg:"#FEF2F2",border:"#FEE2E2",badgeBg:"#FEF2F2",badgeBorder:"#FECACA",badgeText:"#B91C1C",highlightBg:"#FECACA",label:r}:i>=40?{bg:"#FFFCF6",border:"#FFDD80",badgeBg:"#FEF9C3",badgeBorder:"#FEF08A",badgeText:"#A16207",highlightBg:"#FDDEB3",label:r}:{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:r}},p=a(t).default.forwardRef(function(t,r){var o=t.label,s=t.content,l=t.highlights,a=void 0===l?[]:l,c=t.styleVariant,d=t.isHighlighted,p=void 0!==d&&d,x=Array.isArray(s)?s.join("\n"):s||"",g="#B91C1C"===c.badgeText?{borderColor:"#EF4444",shadow:"rgba(239, 68, 68, 0.25)"}:"#A16207"===c.badgeText?{borderColor:"#F59E0B",shadow:"rgba(245, 158, 11, 0.25)"}:{borderColor:"#6366F1",shadow:"rgba(99, 102, 241, 0.25)"};return n.jsxs(i.Box,e.__assign({sx:{mb:1.5}},{children:[n.jsx(i.Typography,e.__assign({sx:{fontSize:"12px",color:"#19213D",mb:.5,fontWeight:500,lineHeight:"130%"}},{children:o})),n.jsx(i.Box,e.__assign({ref:r,sx:{p:"4px 12px",borderRadius:"6px",border:p?"1.5px solid ".concat(g.borderColor):"1px solid ".concat(c.border),boxShadow:p?"0px 0px 0px 2px ".concat(g.shadow):"none",bgcolor:c.bg,fontSize:"13px",color:"#0B0E1A",lineHeight:1.4,minHeight:"24px",display:"flex",alignItems:"center",whiteSpace:"pre-line",wordBreak:"break-word"}},{children:n.jsx(i.Box,{children:function(){if(!x)return n.jsx(i.Typography,e.__assign({sx:{color:"#94A3B8",fontSize:"12px",fontStyle:"italic"}},{children:"Not Defined"}));if(!a||0===a.length)return x;var t=a.filter(function(e){return e&&e.length>0}).map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(0===t.length)return x;var r=new RegExp("(".concat(t.join("|"),")"),"gi");return x.split(r).map(function(t,r){return a.some(function(e){return e&&e.toLowerCase()===t.toLowerCase()})?n.jsx(i.Box,e.__assign({component:"span",sx:{bgcolor:c.highlightBg,borderRadius:"2px",px:"2px"}},{children:t}),r):t})}()})}))]}))}),x=function(t){var r=t.data,o=t.isSelected,s=t.isCognitiveOpen,a=t.onToggleCognitive,c=t.onClick,d=r.summaryText||r.description||"",p=d.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),x=p?d.replace(p[0],"").trim():d,g=!!p;return n.jsxs(i.Box,e.__assign({id:"variant-card-".concat(r.id),onClick:c,sx:{minWidth:"280px",maxWidth:"280px",p:2,m:.5,bgcolor:o?"#EFF6FF99":"#FFFFFF",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",gap:1,flexShrink:0,opacity:r.isLoading?.7:1,border:o?"1.4px solid #2563EB":null,boxShadow:o?"none":"0px 2px 4px 0px #19213D14","&:hover":{borderColor:o?"#2563EB":"#CBD5E1",boxShadow:o?"none":"0px 4px 8px 0px #19213D1F"}}},{children:[n.jsx(i.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:r.isLoading?n.jsx(i.Skeleton,{variant:"rounded",width:80,height:20}):n.jsxs(i.Box,e.__assign({sx:{bgcolor:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:600,px:1,py:.5,borderRadius:"100px",border:"1px solid #FFE1E1"}},{children:[void 0!==r.similarity?r.similarity:0,"% Similarity"]}))})),n.jsxs(i.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[n.jsxs(i.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"}},{children:[n.jsx(i.Typography,e.__assign({title:r.title,sx:{fontWeight:500,fontSize:"14px",color:"#19213D",lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}},{children:r.title})),r.scope&&n.jsx(i.Box,e.__assign({sx:{flexShrink:0,fontSize:"10px",fontWeight:600,color:"#19213D",bgcolor:"#FFF",border:"1px solid #EDEFF2",px:.75,py:.25,borderRadius:"6px",lineHeight:1.4,whiteSpace:"nowrap"}},{children:r.scope}))]})),r.isLoading?n.jsxs(i.Box,{children:[n.jsx(i.Skeleton,{width:"90%"}),n.jsx(i.Skeleton,{width:"60%"})]}):n.jsxs(i.Box,e.__assign({title:x,sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n.jsx(i.Typography,e.__assign({sx:{fontWeight:400,fontSize:"13px",color:"#666F8D",lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"}},{children:x})),g&&n.jsxs(i.Box,e.__assign({onClick:function(e){e.stopPropagation(),o||c(),a()},sx:{display:"inline-flex",alignItems:"center",alignSelf:"flex-start",gap:"4px",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",marginLeft:"-4px","&:hover":{backgroundColor:"#F1F5F9"}}},{children:[n.jsx("div",e.__assign({style:{width:"13px",height:"13px",display:"flex",alignItems:"center"}},{children:n.jsx(l.ButtonCognitiveIcon,{})})),n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o&&s?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:n.jsx("path",{d:"M6 9l6 6 6-6"})}))]}))]}))]}))]}))};exports.default=function(a){var g,h,u=a.proposedRule,f=a.variants,_=void 0===f?[]:f,y=a.onSelectVariant;a.onAddAsVariant;var b=a.onSkip,m=a.onBack,v=a.targetVariantId,w=a.highlightedField,F=t.useState(v||null),B=F[0],j=F[1],C=t.useState(!1),E=C[0],S=C[1],k=t.useState(null),A=k[0],R=k[1],T=t.useRef(null),L=t.useRef(null);t.useEffect(function(){if(v&&j(v),R(null!=w?w:null),w){var e=setTimeout(function(){return R(null)},6e3);return function(){return clearTimeout(e)}}},[v,w]);var D=function(e){T.current&&T.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},I=t.useMemo(function(){return e.__spreadArray([],_,!0).sort(function(e,n){return(n.similarity||0)-(e.similarity||0)})},[_]),W=t.useMemo(function(){if(B){var e=String(B).trim();return _.find(function(n){return n.id&&String(n.id).trim()===e})||I[0]}return I.length>0?I[0]:null},[B,_,I]);t.useEffect(function(){if(B&&T.current){var e=B.trim();setTimeout(function(){var n=document.getElementById("variant-card-".concat(e)),t=T.current;if(n&&t){var i=n.offsetLeft-t.offsetLeft-t.clientWidth/2+n.clientWidth/2;t.scrollTo({left:i,behavior:"smooth"})}},150)}},[B,I]);var z=W||{title:"",scope:"",description:"",wta:"",wnta:"",variantType:"Default"},H=null==W?void 0:W.analysis,M=(null===(h=null===(g=null==H?void 0:H.rule_difference_comparison)||void 0===g?void 0:g.summary)||void 0===h?void 0:h.overall_summary)||"",O=M.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),q=!!O,V=O?O[1]:"",N=c("reason",V)||"",P=c("gap",V)||"",U=c("relevance_score",V)||"",Y=t.useMemo(function(){return{ul:function(t){t.node;var i=e.__rest(t,["node"]);return n.jsx("ol",e.__assign({},i,{style:{paddingLeft:"1.25rem",listStyleType:"decimal",margin:0}}))},li:function(t){t.node;var i=e.__rest(t,["node"]);return n.jsx("li",e.__assign({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},ol:function(t){t.node;var i=e.__rest(t,["node"]);return n.jsx("li",e.__assign({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},a:function(t){var i=t.href,r=t.children,o=e.__rest(t,["href","children"]);if(!i)return n.jsx("a",e.__assign({},o,{children:r}));var s=i||"";try{s=decodeURIComponent(i)}catch(e){console.error("Error decoding href",e)}if(s.includes("variant_id=")){var l="",a="",c=s.match(/variant_id=([^?&]+)/);c&&(l=c[1]);var d=s.match(/field_name=([^&]+)/);return d&&(a=d[1]),n.jsxs("button",e.__assign({type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),j(l),R(a),setTimeout(function(){return R(null)},6e3)},style:{background:"none",border:"none",outline:"none",borderRadius:"6px",padding:"1px 4px",color:"#0F172A",cursor:"pointer",fontSize:"13px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"2px",margin:"0 1px",verticalAlign:"baseline",textDecoration:"none",boxShadow:"none",WebkitAppearance:"none",MozAppearance:"none"},title:"View Comparison"},{children:[r,n.jsx("svg",e.__assign({width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M10.2082 8.67708H2.0415M2.0415 8.67708L4.08317 6.63542M2.0415 8.67708L4.08317 10.7188M2.0415 3.57292H10.2082M10.2082 3.57292L8.1665 1.53125M10.2082 3.57292L8.1665 5.61458",stroke:"#0F172A",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}))]}))}return n.jsx("a",e.__assign({href:i,target:"_blank",rel:"noopener noreferrer",style:{color:"#7C3AED"}},o,{children:r}))}}},[]);t.useEffect(function(){!B&&!v&&I.length>0&&!I[0].isLoading&&j(I[0].id)},[I,B,v]);var $=t.useRef(null),J=t.useState([]),X=J[0],G=J[1],K=t.useState(!1),Q=K[0],Z=K[1],ee=t.useState(!1),ne=ee[0],te=ee[1];t.useEffect(function(){var e=T.current;if(e){var n=function(){Z(e.scrollLeft>0),te(e.scrollLeft+e.clientWidth<e.scrollWidth-1)};return n(),e.addEventListener("scroll",n),window.addEventListener("resize",n),function(){e.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},[I]);var ie={title:t.useRef(null),scope:t.useRef(null),description:t.useRef(null),wta:t.useRef(null),wnta:t.useRef(null)},re={title:t.useRef(null),scope:t.useRef(null),description:t.useRef(null),wta:t.useRef(null),wnta:t.useRef(null)};t.useEffect(function(){if(A){var e="when_to_apply"===A?"wta":"when_not_to_apply"===A?"wnta":A,n=ie[e]||re[e];n&&n.current&&setTimeout(function(){n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}},[A]);var oe=function(e){var n,t,i,r,o,s=null===(n=null==H?void 0:H.rule_difference_comparison)||void 0===n?void 0:n.fields,l="when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e,a=!(!u[l]&&!z[l]);if(!s||!s[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var c=s[e];if(c.mappings){var d=c.mappings[0]||{};return{score:c.score,relation:d.relation||"",highlightsA:(null===(t=d.highlights)||void 0===t?void 0:t.ruleA_spans)||[],highlightsB:(null===(i=d.highlights)||void 0===i?void 0:i.ruleB_spans)||[],hasContent:a}}return{score:c.score,relation:c.relation||"",highlightsA:(null===(r=c.highlights)||void 0===r?void 0:r.ruleA_spans)||[],highlightsB:(null===(o=c.highlights)||void 0===o?void 0:o.ruleB_spans)||[],hasContent:a}},se=["title","scope","description","when_to_apply","when_not_to_apply"],le=function(){if($.current){var e=$.current.getBoundingClientRect(),n=[];se.forEach(function(t){var i="when_to_apply"===t?ie.wta:"when_not_to_apply"===t?ie.wnta:ie[t],r="when_to_apply"===t?re.wta:"when_not_to_apply"===t?re.wnta:re[t];if(i.current&&r.current){i.current.style.height="auto",r.current.style.height="auto";var o=i.current.getBoundingClientRect(),s=r.current.getBoundingClientRect(),l=Math.max(o.height,s.height);i.current.style.height="".concat(l,"px"),r.current.style.height="".concat(l,"px");var a=i.current.getBoundingClientRect(),c=r.current.getBoundingClientRect(),p=oe(t),x=d(p.score,p.relation,p.hasContent),g=a.top+a.height/2-e.top;n.push({x1:a.right-e.left,y1:g,x2:c.left-e.left,y2:g,style:x})}}),G(n)}};return t.useEffect(function(){var e=setTimeout(le,250);window.addEventListener("resize",le);var n=null;return $.current&&(n=new ResizeObserver(function(){window.requestAnimationFrame(function(){le()})})).observe($.current),function(){clearTimeout(e),window.removeEventListener("resize",le),n&&n.disconnect()}},[u,z,H,E]),n.jsxs(i.Box,e.__assign({sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden"}},{children:[n.jsxs(i.Box,e.__assign({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4"}},{children:[n.jsxs(i.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1}},{children:[n.jsx(i.IconButton,e.__assign({onClick:m,size:"small"},{children:n.jsx(r.ArrowLeft,{})})),n.jsx(i.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:450,color:"#0F172A"}},{children:"Learning Comparison"}))]})),n.jsx(i.IconButton,e.__assign({onClick:b,size:"small"},{children:n.jsx(i.Box,e.__assign({sx:{fontSize:24,lineHeight:.5}},{children:"×"}))}))]})),I.length>1&&n.jsxs(i.Box,e.__assign({sx:{px:3,pb:.25}},{children:[n.jsxs(i.Box,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1}},{children:[n.jsx(i.Typography,e.__assign({sx:{fontSize:"13px",color:"#475569"}},{children:"Choose the Learning you want to compare with the rule you are creating."})),n.jsxs(i.Box,e.__assign({sx:{display:"flex",gap:.5,flexShrink:0,ml:1}},{children:[n.jsx(i.IconButton,e.__assign({onClick:function(){return D("left")},size:"small",disabled:!Q},{children:n.jsx(r.ArrowLeft,{size:18})})),n.jsx(i.IconButton,e.__assign({onClick:function(){return D("right")},size:"small",disabled:!ne},{children:n.jsx(r.ArrowRight,{size:18})}))]}))]})),n.jsx(i.Box,e.__assign({ref:T,sx:{display:"flex",gap:1,overflowX:"auto",pb:.05,"&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"transparent",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"transparent"}}},{children:I.map(function(e){return n.jsx(x,{data:e,isSelected:(null==W?void 0:W.id)===e.id,isCognitiveOpen:E,onToggleCognitive:function(){S(function(e){var n=!e;return n&&L.current&&L.current.scrollTo({top:0,behavior:"smooth"}),n})},onClick:function(){return j((n=e).id),y(n),void S(!1);var n}},e.id)})}))]})),n.jsx(i.Box,e.__assign({ref:L,sx:{flex:1,overflowY:"auto",py:1.5,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",borderTop:M&&q&&E?"none":"1.5px solid #EEF0F4"}},{children:n.jsxs(i.Box,e.__assign({sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"}},{children:[M&&q&&E&&n.jsx(i.Box,e.__assign({sx:{width:"100%",pb:1,animation:"fadeIn 0.2s ease-out","& > div > button":{display:"none !important"},"& > div > div":{marginTop:"0px"}}},{children:n.jsx(s.CognitiveDecisioningCard,{headerIcon:n.jsx(l.ButtonCognitiveIcon,{}),reasoning:N,gap:P,score:U,mdComponents:Y,isOpen:!0,onToggle:function(){return S(!1)}})})),n.jsxs(i.Box,e.__assign({ref:$,sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative"}},{children:[n.jsx("svg",e.__assign({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:X.map(function(t,r){var o=(t.x1+t.x2)/2,s=t.y1;return n.jsxs("g",{children:[n.jsx("line",{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:t.style.badgeBorder,strokeWidth:"1"}),n.jsx("foreignObject",e.__assign({x:o-125,y:s-16,width:"250",height:"32"},{children:n.jsx(i.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:n.jsx(i.Box,e.__assign({sx:{fontSize:"11px",bgcolor:t.style.badgeBg,color:t.style.badgeText,border:"1px solid ".concat(t.style.badgeBorder),borderRadius:"12px",px:1.5,py:.25,fontWeight:500,textAlign:"center",whiteSpace:"nowrap"}},{children:t.style.label}))}))}))]},r)})})),n.jsxs(i.Box,e.__assign({sx:{border:"1px dashed #B0B0B0",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)",minWidth:0}},{children:[n.jsx(i.Box,e.__assign({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px dashed #B0B0B0",borderRadius:"8px 8px 0 0",display:"flex",minHeight:"24px",alignItems:"center"}},{children:n.jsx(i.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#19213D"}},{children:"Learning You’re Creating"}))})),n.jsx(i.Box,e.__assign({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:se.map(function(e){var t=oe(e),i=d(t.score,t.relation,t.hasContent),r="when_to_apply"===e?ie.wta:"when_not_to_apply"===e?ie.wnta:ie[e],o=u["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return n.jsx(p,{ref:r,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:t.highlightsA,styleVariant:i,isHighlighted:A===e},"left-".concat(e))})}))]})),n.jsx(i.Box,{sx:{width:"1px"}}),n.jsxs(i.Box,e.__assign({sx:{border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0}},{children:[n.jsx(i.Box,e.__assign({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"24px",display:"flex",alignItems:"center"}},{children:n.jsxs(i.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",display:"flex",alignItems:"center",gap:1}},{children:[n.jsx("div",e.__assign({style:{width:"18px",height:"18px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:n.jsx(o.default,{})})),"Existing Learning"]}))})),n.jsx(i.Box,e.__assign({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:se.map(function(e){var t=oe(e),i=d(t.score,t.relation,t.hasContent),r="when_to_apply"===e?re.wta:"when_not_to_apply"===e?re.wnta:re[e],o=z["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return n.jsx(p,{ref:r,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:t.highlightsB,styleVariant:i,isHighlighted:A===e},"right-".concat(e))})}))]}))]}))]}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=RuleComparison.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),r=require("lucide-react"),s=require("./store/useLearningTemplateStore.js"),a=require("primereact/toast"),i=require("./styles/LearningTemplateManagement.module.css.js"),o=require("./LearningTemplateLayout.js"),l=require("./components/EmptyLearningState.js"),u=require("./store/useAuthStore.js"),c=require("./apis/scopeApis.js"),d=require("./components/ConfirmationModal.js"),p=require("./components/LearningTemplateManagementSkeleton.js"),f=require("./utils/treeUtils.js"),g=require("./store/useEnvStore.js"),m=require("./store/useConfigStore.js"),v=require("./components/ToolTip.js"),S=require("./components/CreateRuleSetLegacyModal.js"),h=require("./store/usePermissionsStore.js"),_=require("./store/useAppSecRolesStore.js"),y=require("./queries/useApprovalQueries.js"),T=require("./RuleContent/AddScopeModal.js"),b=require("react-router-dom"),C=require("./shared/SuccessToastContent.js"),L=require("./shared/ErrorToastContent.js"),j=[{id:"learnings",label:"Learnings",icon:r.BookOpen,badgeKey:"learningsCount"},{id:"access",label:"Access",icon:r.Users}],w=[{type:"GLOBAL",label:"Global",addChildLabel:"Add Scope",addChildType:"SCOPE"},{type:"SCOPE",label:"Scope",addChildLabel:"Add Subscope",addChildType:"SUBSCOPE"},{type:"SUBSCOPE",label:"Subscope"}];exports.default=function(r){var A,E=this,R=r.userDetails,I=r.llmStudioUrl,O=r.audacyBackendUrl,q=r.ilLabels,k=r.config,D=r.rbacConfig,P=r.app_integration_id,x=r.backwardCompatibility,N=void 0!==x&&x,B=s.useLearningTemplateStore(function(e){return e.selectedRuleSetId}),G=s.useLearningTemplateStore(function(e){return e.setSelectedRuleSetId}),U=s.useLearningTemplateStore(function(e){return e.error}),M=s.useLearningTemplateStore(function(e){return e.setError}),F=s.useLearningTemplateStore(function(e){return e.setStations}),Q=s.useLearningTemplateStore(function(e){return e.scopeTreeData}),H=s.useLearningTemplateStore(function(e){return e.setScopeTreeData}),K=n.useState({isOpen:!1,type:"GLOBAL"}),V=K[0],W=K[1],Y=n.useState(!1),z=Y[0],J=Y[1],X=n.useState(!1),Z=X[0],$=X[1],ee=n.useState("learnings"),te=ee[0],ne=ee[1],re=n.useState(null),se=re[0],ae=re[1],ie=n.useState(null),oe=ie[0],le=ie[1],ue=n.useRef(null),ce=n.useRef(null),de=n.useRef(null),pe=u.default();pe.user;var fe=pe.setUser,ge=m.useConfigStore(),me=ge.setConfig,ve=ge.setIlLabels,Se=function(){try{return b.useLocation()}catch(e){return{search:""}}}();n.useEffect(function(){var e=new URLSearchParams(window.location.search).get("rulesetid");(null==e?void 0:e.length)&&G&&ne&&(G(e),ne("learnings"))},[null==Se?void 0:Se.search,ne,G]);var he=h.usePermissionsStore(function(e){return e.fetchPermissions}),_e=h.usePermissionsStore(function(e){return e.hasPermission}),ye=_.useAppSecRolesStore(function(e){return e.setRoles}),Te=g.default(function(e){return e.appsecRbacUrl})===D.appsecRbacUrl,be=y.useGetAppSecRolesQuery(D.applicationId,Te).data;n.useEffect(function(){be&&ye(be.map(function(e){return{_id:e._id,name:e.name}}))},[be,ye]),n.useEffect(function(){var e;console.log("userDetails",R),fe(R),console.log("llmStudioUrl",I),console.log("audacyBackendUrl",O),g.default.getState().setLlmStudioUrl(I),g.default.getState().setAudacyBackendUrl(O),g.default.getState().setRbacConfig(D),me(k),ve(q),s.useLearningTemplateStore.getState().setAppIntegrationId(null!=P?P:null),s.useLearningTemplateStore.getState().setBackwardCompatibility(N),s.useLearningTemplateStore.getState().setToken(null!==(e=R.accessToken)&&void 0!==e?e:null)},[R,fe,I,O,D,k,me,q,ve,P,N]),n.useEffect(function(){(null==R?void 0:R.accessToken)&&I&&c.fetchTiers()},[P,null==R?void 0:R.accessToken,I]);var Ce=function(t){return void 0===t&&(t=!0),e.__awaiter(E,void 0,void 0,function(){var n,r,a,i,o,l;return e.__generator(this,function(u){switch(u.label){case 0:t&&J(!0),M(null),u.label=1;case 1:return u.trys.push([1,4,5,6]),[4,he(D.applicationId)];case 2:return u.sent(),n=function(t){if(!h.usePermissionsStore.getState().hasPermission("ilotj.scope.view",t.id))return null;var r=t.children?t.children.map(function(e){return n(e)}).filter(function(e){return null!==e}):[];return e.__assign(e.__assign({},t),{children:r})},[4,c.fetchScopes(P,R.accessToken)];case 3:return(r=u.sent())&&r.data&&r.data.data&&(a=r.data.data,Array.isArray(a)&&(a=a.length>0?a[0]:null),a?(i=n(a))?(ae(null),H({data:i}),ce.current?(G(ce.current),ne("learnings"),ce.current=null):s.useLearningTemplateStore.getState().selectedRuleSetId||G(i.id)):(ae(null!==(l=a.id)&&void 0!==l?l:null),H(null)):(ae(null),H(null))),[3,6];case 4:return o=u.sent(),console.error("Failed to fetch rule sets or permissions",o),M("Failed to load data. Please try again later."),[3,6];case 5:return J(!1),[7];case 6:return[2]}})})};n.useEffect(function(){var e;(null===(e=null==R?void 0:R.accessToken)||void 0===e?void 0:e.length)&&Te?Ce(!0):console.warn("Error: Trying to fetch rules without access token",R)},[null==R?void 0:R.accessToken,M,F,D.applicationId,Te]);var Le=function(t,n,r){return e.__awaiter(E,void 0,void 0,function(){var a,i,o,l,u,d,p,g,m;return e.__generator(this,function(v){switch(v.label){case 0:$(!0),v.label=1;case 1:return v.trys.push([1,8,9,10]),[4,c.deleteRuleSet(t,R.accessToken)];case 2:if(v.sent(),s.useLearningTemplateStore.getState().selectedRuleSetId===t&&(a=s.useLearningTemplateStore.getState().scopeTreeData,(i=f.findNodePathById((null==a?void 0:a.data)||null,t))&&i.length>1&&(o=i[i.length-2],G(o),ne("learnings"))),!r||!n)return[3,6];v.label=3;case 3:return v.trys.push([3,5,,6]),[4,c.updateStation({station_name:n,ruleset_id:""})];case 4:return v.sent(),[3,6];case 5:return l=v.sent(),console.error("Error unlinking station on subscope delete:",l),[3,6];case 6:return[4,Ce(!0)];case 7:return v.sent(),W(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),null===(d=de.current)||void 0===d||d.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,10];case 8:return u=v.sent(),console.error("An error occurred during scope deletion.",u),null===(p=de.current)||void 0===p||p.show({severity:"error",summary:"Delete Failed",detail:(null===(m=null===(g=null==u?void 0:u.response)||void 0===g?void 0:g.data)||void 0===m?void 0:m.message)||"There was an error deleting the scope. Please try again."}),[3,10];case 9:return $(!1),[7];case 10:return[2]}})})},je=Q,we=oe?{data:{id:oe.stationId,name:oe.stationName,type:"STATION",metrics:{learningsCount:oe.learningsCount,stationsCount:0},children:[]}}:je,Ae=!!(null==we?void 0:we.data);null===(A=null==we?void 0:we.data)||void 0===A||A.type;var Ee=h.usePermissionsStore(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",D.applicationResourceId||""),Re=oe?j.filter(function(e){return"stations"!==e.id}):j;return t.jsx(v.TooltipProvider,{children:t.jsxs("div",e.__assign({className:i.default.learningManagementContainer},{children:[t.jsx("div",e.__assign({className:i.default.mainWrapper},{children:z?t.jsx(p.default,{}):U?t.jsxs("div",e.__assign({className:i.default.errorContainer},{children:[t.jsx("div",e.__assign({className:i.default.errorTitle},{children:"Error Loading Data"})),t.jsx("p",e.__assign({className:i.default.errorDesc},{children:U})),t.jsx("button",e.__assign({onClick:function(){return Ce(!0)},className:i.default.tryAgainBtn},{children:"Try Again"}))]})):Ae?t.jsx(o.default,{onOpenCreateModal:function(){return W({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,t,n){return W({isOpen:!0,type:t,parentId:e,parentName:n})},onRenameChild:function(e,t){return W({isOpen:!0,type:"RENAME",scopeId:e,initialName:t})},onDeleteChild:function(t,n,r){return e.__awaiter(E,void 0,void 0,function(){var a,i,o;return e.__generator(this,function(e){switch(e.label){case 0:return a=s.useLearningTemplateStore.getState().scopeTreeData,i=f.findNodePathById((null==a?void 0:a.data)||null,t),o=!!i&&3===i.length,0!==r?[3,2]:[4,Le(t,n,o)];case 1:return e.sent(),[3,3];case 2:W({isOpen:!0,type:"DELETE",scopeId:t,initialName:n,isSubscope:o}),e.label=3;case 3:return[2]}})})},canDeleteScope:function(e){return _e("ilotj.scope.delete",e)},canEditScope:function(e){return _e("ilotj.scope.edit",e)},canCreateScope:function(e){return _e("ilotj.scope.create",e)},onSectionSelect:function(e,t){console.log("Section Selected:",{scopeId:e,sectionId:t}),ne(t),G(e)},activeSectionId:te,scopeTreeData:we,sectionsConfig:Re,onViewStation:function(e){ue.current=B,le(e),ne("learnings"),G(e.stationId)},onRefreshRuleSets:function(e,t){void 0===e&&(e=!0),t&&(ce.current=t),Ce(e)},nodeTypesConfig:w,app_integration_id:P,token:R.accessToken}):t.jsx(l.default,{onCreate:function(){return W({isOpen:!0,type:"GLOBAL"})},title:"No Global Scope has been added!",desc:"Start by creating a Global scope to define base learnings that apply across all stations.",button:"Create Global Scope",canCreateRule:Ee,noAccessTitle:"Access Restricted",noAccessDesc:"You do not have access to create a Global scope for this application.",onRequestAccess:function(){return e.__awaiter(E,void 0,void 0,function(){var n,r,a,o,l,u,d,p,f;return e.__generator(this,function(e){switch(e.label){case 0:if(!(n=(null===(o=null===(a=s.useLearningTemplateStore.getState().scopeTreeData)||void 0===a?void 0:a.data)||void 0===o?void 0:o.id)||se))return null===(l=de.current)||void 0===l||l.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(L.default,{message:"Unable to identify the global scope for this access request."})}),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,c.requestAccess(n)];case 2:return e.sent(),null===(u=de.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:i.default.successToast,content:t.jsx(C.default,{message:"Access request submitted successfully!"})}),[3,4];case 3:return r=e.sent(),null===(d=de.current)||void 0===d||d.show({severity:"error",sticky:!1,className:i.default.errorToast,content:t.jsx(L.default,{message:(null===(f=null===(p=null==r?void 0:r.response)||void 0===p?void 0:p.data)||void 0===f?void 0:f.detail)||"Failed to request access. Please try again."})}),[3,4];case 4:return[2]}})})}})})),t.jsx(a.Toast,{ref:de}),N&&V.isOpen&&"DELETE"!==V.type&&"RENAME"!==V.type?t.jsx(S.default,{isOpen:!0,onClose:function(){return W(e.__assign(e.__assign({},V),{isOpen:!1}))},onSubmit:function(t){return e.__awaiter(E,void 0,void 0,function(){var n,r,a,i,o,l,u,d,p,f,g,m,v,S,h,_,y,T,b,C;return e.__generator(this,function(L){switch(L.label){case 0:$(!0),n=s.useLearningTemplateStore.getState().backwardCompatibility,L.label=1;case 1:return L.trys.push([1,12,13,14]),r=void 0,n&&"object"==typeof t?r=t:(a=t,i="SCOPE"===V.type&&V.parentId,o=i?"genreRuleSet":V.type,r={topic:o,scope_reference_id:null,scopeDescription:"demo",parentScopeId:V.parentId||null,scopeName:a,scopeReferenceMetadata:{},applicationMappingId:P}),[4,c.createRuleSet(r,R.accessToken)];case 2:if(l=L.sent(),!(u=null===(S=null==l?void 0:l.data)||void 0===S?void 0:S.scopeId))return[3,10];if(ce.current=u,d=n&&(null===(h=r.topic)||void 0===h?void 0:h.toLowerCase().includes("genre")),p=!n&&"GLOBAL"!==V.type&&V.parentId,!d&&!p)return[3,10];if(!(f=n?null===(y=null===(_=s.useLearningTemplateStore.getState().scopeTreeData)||void 0===_?void 0:_.data)||void 0===y?void 0:y.id:V.parentId))return[3,10];if(!N)return[3,7];L.label=3;case 3:return L.trys.push([3,5,,6]),[4,c.inheritScopeBackwardCompatible({source_scope_id:f,target_scope_id:u})];case 4:return L.sent(),[3,6];case 5:return g=L.sent(),console.error("Failed to inherit rules for the new scope:",g),[3,6];case 6:return[3,10];case 7:return L.trys.push([7,9,,10]),[4,c.inheritScope({source_scope_id:f,target_scope_id:u,application_mapping_id:P||"",is_copy_parent_variant_id:!1})];case 8:return L.sent(),[3,10];case 9:return m=L.sent(),console.error("Failed to inherit rules for the new scope:",m),[3,10];case 10:return[4,Ce(!0)];case 11:return L.sent(),W(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,14];case 12:throw v=L.sent(),console.error("An error occurred during scope creation.",v),null===(T=de.current)||void 0===T||T.show({severity:"error",summary:"Creation Failed",detail:(null===(C=null===(b=null==v?void 0:v.response)||void 0===b?void 0:b.data)||void 0===C?void 0:C.message)||"There was an error creating the scope. Please try again."}),v;case 13:return $(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:Ae,canCreateGlobal:Ee}):t.jsx(T.default,{isOpen:V.isOpen&&"DELETE"!==V.type,onClose:function(){return W(e.__assign(e.__assign({},V),{isOpen:!1}))},onCreate:function(t){return n=null!=t?t:"",e.__awaiter(E,void 0,void 0,function(){var t,r,s,a;return e.__generator(this,function(i){switch(i.label){case 0:$(!0),i.label=1;case 1:return i.trys.push([1,4,5,6]),V.scopeId?[4,c.renameScope({scope_id:V.scopeId,scope_name:n})]:[2];case 2:return i.sent(),[4,Ce(!0)];case 3:return i.sent(),W(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,6];case 4:throw t=i.sent(),console.error("An error occurred during scope rename.",t),null===(r=de.current)||void 0===r||r.show({severity:"error",summary:"Rename Failed",detail:(null===(a=null===(s=null==t?void 0:t.response)||void 0===s?void 0:s.data)||void 0===a?void 0:a.message)||"There was an error renaming the scope. Please try again."}),t;case 5:return $(!1),[7];case 6:return[2]}})});var n},hasGlobalRuleSet:Ae}),t.jsx(d.default,{isOpen:V.isOpen&&"DELETE"===V.type,onCancel:function(){return W(e.__assign(e.__assign({},V),{isOpen:!1}))},onConfirm:function(){return Le(V.scopeId,V.initialName,V.isSubscope)},title:"Delete Scope",description:t.jsxs(t.Fragment,{children:["Deleting ",t.jsx("span",e.__assign({className:i.default.highlight},{children:V.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:Z})]}))})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),r=require("lucide-react"),a=require("./store/useLearningTemplateStore.js"),s=require("primereact/toast"),i=require("./styles/LearningTemplateManagement.module.css.js"),o=require("./LearningTemplateLayout.js"),l=require("./components/EmptyLearningState.js"),u=require("./store/useAuthStore.js"),c=require("./apis/scopeApis.js"),d=require("./components/ConfirmationModal.js"),p=require("./components/LearningTemplateManagementSkeleton.js"),g=require("./utils/treeUtils.js"),S=require("./components/CreateLearningSetModal.js"),f=require("./store/useEnvStore.js"),m=require("./store/useConfigStore.js"),h=require("./components/ToolTip.js"),y=require("./components/CreateRuleSetLegacyModal.js"),v=require("react-router-dom"),_=[{id:"learnings",label:"Learnings",icon:r.BookOpen,badgeKey:"learningsCount"}],L=[{type:"GLOBAL",label:"Global",addChildLabel:"Add Scope",addChildType:"SCOPE"},{type:"SCOPE",label:"Scope"}],b=function(t){return t.flatMap(function(t){var n;return e.__spreadArray([t.id],b(null!==(n=t.children)&&void 0!==n?n:[]),!0)})};exports.default=function(r){var T,C=this,E=r.userDetails,O=r.llmStudioUrl,w=r.audacyBackendUrl,A=r.ilLabels,j=r.config,I=r.app_integration_id,N=r.backwardCompatibility,B=void 0!==N&&N,k=a.useLearningTemplateStore(function(e){return e.selectedRuleSetId}),R=a.useLearningTemplateStore(function(e){return e.setSelectedRuleSetId}),P=a.useLearningTemplateStore(function(e){return e.error}),D=a.useLearningTemplateStore(function(e){return e.setError}),q=a.useLearningTemplateStore(function(e){return e.setStations}),x=a.useLearningTemplateStore(function(e){return e.scopeTreeData}),G=a.useLearningTemplateStore(function(e){return e.setScopeTreeData}),M=n.useState({isOpen:!1,type:"GLOBAL"}),U=M[0],F=M[1],V=n.useState(!1),H=V[0],K=V[1],W=n.useState(!1),z=W[0],J=W[1],Q=n.useState("learnings"),X=Q[0],Y=Q[1],Z=n.useState(null),$=Z[0],ee=Z[1],te=n.useRef(null),ne=n.useRef(null),re=n.useRef(null),ae=u.default();ae.user;var se=ae.setUser,ie=m.useConfigStore(),oe=ie.setConfig,le=ie.setIlLabels,ue=a.useLearningTemplateStore(function(e){return e.setAllScopeIds}),ce=function(){try{return v.useLocation()}catch(e){return{search:""}}}();n.useEffect(function(){var e=new URLSearchParams(ce.search).get("rulesetid");(null==e?void 0:e.length)&&R&&Y&&(R(e),Y("learnings"))},[null==ce?void 0:ce.search,Y,R]),n.useEffect(function(){var e;console.log("userDetails",E),se(E),console.log("llmStudioUrl",O),console.log("audacyBackendUrl",w),f.default.getState().setLlmStudioUrl(O),f.default.getState().setAudacyBackendUrl(w),oe(j),le(A),a.useLearningTemplateStore.getState().setAppIntegrationId(null!=I?I:null),a.useLearningTemplateStore.getState().setBackwardCompatibility(B),a.useLearningTemplateStore.getState().setToken(null!==(e=E.accessToken)&&void 0!==e?e:null)},[E,se,O,w,j,oe,A,le]),n.useEffect(function(){(null==E?void 0:E.accessToken)&&O&&c.fetchTiers()},[I,null==E?void 0:E.accessToken,O]);var de=function(t){return void 0===t&&(t=!0),e.__awaiter(C,void 0,void 0,function(){var n,r,s,i;return e.__generator(this,function(e){switch(e.label){case 0:t&&K(!0),D(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,c.fetchScopes(I,E.accessToken)];case 2:return(n=e.sent())&&n.data&&n.data.data&&(r=n.data.data,Array.isArray(r)&&(r=r.length>0?r[0]:null),r?(G({data:r}),s=b(Array.isArray(r)?r:[r]),ue(s),ne.current?(R(ne.current),Y("learnings"),ne.current=null):a.useLearningTemplateStore.getState().selectedRuleSetId||R(r.id)):G(null)),[3,5];case 3:return i=e.sent(),console.error("Failed to fetch rule sets",i),D("Failed to load rule sets. Please try again later."),[3,5];case 4:return K(!1),[7];case 5:return[2]}})})};n.useEffect(function(){var e;(null===(e=null==E?void 0:E.accessToken)||void 0===e?void 0:e.length)?de(!0):console.warn("Error: Trying to fetch rules without access token",E)},[null==E?void 0:E.accessToken,D,q]);var pe=function(t){return e.__awaiter(C,void 0,void 0,function(){var n,r,s,i,o,l,u,d,p,g,S,f,m,h,y,v,_,L,b,T;return e.__generator(this,function(C){switch(C.label){case 0:J(!0),n=a.useLearningTemplateStore.getState().backwardCompatibility,C.label=1;case 1:return C.trys.push([1,12,13,14]),r=void 0,n&&"object"==typeof t?r=t:(s=t,i="SCOPE"===U.type&&U.parentId,o=i?"genreRuleSet":U.type,r={topic:o,scope_reference_id:null,scopeDescription:"demo",parentScopeId:U.parentId||null,scopeName:s,scopeReferenceMetadata:{},applicationMappingId:I}),[4,c.createRuleSet(r,E.accessToken)];case 2:if(l=C.sent(),!(u=null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.scopeId))return[3,10];if(ne.current=u,d=n&&(null===(y=r.topic)||void 0===y?void 0:y.toLowerCase().includes("genre")),p=!n&&"GLOBAL"!==U.type&&U.parentId,!d&&!p)return[3,10];if(!(g=n?null===(_=null===(v=a.useLearningTemplateStore.getState().scopeTreeData)||void 0===v?void 0:v.data)||void 0===_?void 0:_.id:U.parentId))return[3,10];if(!B)return[3,7];C.label=3;case 3:return C.trys.push([3,5,,6]),[4,c.inheritScopeBackwardCompatible({source_scope_id:g,target_scope_id:u})];case 4:return C.sent(),[3,6];case 5:return S=C.sent(),console.error("Failed to inherit rules for the new scope:",S),[3,6];case 6:return[3,10];case 7:return C.trys.push([7,9,,10]),[4,c.inheritScope({source_scope_id:g,target_scope_id:u,application_mapping_id:I||"",is_copy_parent_variant_id:!1})];case 8:return C.sent(),[3,10];case 9:return f=C.sent(),console.error("Failed to inherit rules for the new scope:",f),[3,10];case 10:return[4,de(!0)];case 11:return C.sent(),F(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,14];case 12:throw m=C.sent(),console.error("An error occurred during scope creation.",m),null===(L=re.current)||void 0===L||L.show({severity:"error",summary:"Creation Failed",detail:(null===(T=null===(b=null==m?void 0:m.response)||void 0===b?void 0:b.data)||void 0===T?void 0:T.message)||"There was an error creating the scope. Please try again."}),m;case 13:return J(!1),[7];case 14:return[2]}})})},ge=function(t,n,r){return e.__awaiter(C,void 0,void 0,function(){var s,i,o,l,u,d,p,S,f;return e.__generator(this,function(m){switch(m.label){case 0:J(!0),m.label=1;case 1:return m.trys.push([1,8,9,10]),[4,c.deleteRuleSet(t,E.accessToken)];case 2:if(m.sent(),a.useLearningTemplateStore.getState().selectedRuleSetId===t&&(s=a.useLearningTemplateStore.getState().scopeTreeData,(i=g.findNodePathById((null==s?void 0:s.data)||null,t))&&i.length>1&&(o=i[i.length-2],R(o),Y("learnings"))),!r||!n)return[3,6];m.label=3;case 3:return m.trys.push([3,5,,6]),[4,c.updateStation({station_name:n,ruleset_id:""})];case 4:return m.sent(),[3,6];case 5:return l=m.sent(),console.error("Error unlinking station on subscope delete:",l),[3,6];case 6:return[4,de(!0)];case 7:return m.sent(),F(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),null===(d=re.current)||void 0===d||d.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,10];case 8:return u=m.sent(),console.error("An error occurred during scope deletion.",u),null===(p=re.current)||void 0===p||p.show({severity:"error",summary:"Delete Failed",detail:(null===(f=null===(S=null==u?void 0:u.response)||void 0===S?void 0:S.data)||void 0===f?void 0:f.message)||"There was an error deleting the scope. Please try again."}),[3,10];case 9:return J(!1),[7];case 10:return[2]}})})},Se=x,fe=$?{data:{id:$.stationId,name:$.stationName,type:"STATION",metrics:{learningsCount:$.learningsCount,stationsCount:0},children:[]}}:Se,me=!!(null==fe?void 0:fe.data);null===(T=null==fe?void 0:fe.data)||void 0===T||T.type;var he=$?_.filter(function(e){return"stations"!==e.id}):_;return t.jsx(h.TooltipProvider,{children:t.jsxs("div",e.__assign({className:i.default.learningManagementContainer},{children:[t.jsx("div",e.__assign({className:i.default.mainWrapper},{children:H?t.jsx(p.default,{}):P?t.jsxs("div",e.__assign({className:i.default.errorContainer},{children:[t.jsx("div",e.__assign({className:i.default.errorTitle},{children:"Error Loading Data"})),t.jsx("p",e.__assign({className:i.default.errorDesc},{children:P})),t.jsx("button",e.__assign({onClick:function(){return de(!0)},className:i.default.tryAgainBtn},{children:"Try Again"}))]})):me?t.jsx(o.default,{onOpenCreateModal:function(){return F({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,t,n){return F({isOpen:!0,type:t,parentId:e,parentName:n})},onRenameChild:function(e,t){return F({isOpen:!0,type:"RENAME",scopeId:e,initialName:t})},onDeleteChild:function(t,n,r){return e.__awaiter(C,void 0,void 0,function(){var s,i,o;return e.__generator(this,function(e){switch(e.label){case 0:return s=a.useLearningTemplateStore.getState().scopeTreeData,i=g.findNodePathById((null==s?void 0:s.data)||null,t),o=!!i&&3===i.length,0!==r?[3,2]:[4,ge(t,n,o)];case 1:return e.sent(),[3,3];case 2:F({isOpen:!0,type:"DELETE",scopeId:t,initialName:n,isSubscope:o}),e.label=3;case 3:return[2]}})})},onSectionSelect:function(e,t){console.log("Section Selected:",{scopeId:e,sectionId:t}),Y(t),R(e)},activeSectionId:X,scopeTreeData:fe,sectionsConfig:he,onViewStation:function(e){te.current=k,ee(e),Y("learnings"),R(e.stationId)},onRefreshRuleSets:function(e,t){void 0===e&&(e=!0),t&&(ne.current=t),de(e)},nodeTypesConfig:L,app_integration_id:I,token:E.accessToken}):t.jsx(l.default,{onCreate:function(){return F({isOpen:!0,type:"GLOBAL"})},title:"No Global Scope has been added!",desc:"Start by creating a Global scope to define base learnings that apply across all stations.",button:"Create Global Scope"})})),t.jsx(s.Toast,{ref:re}),B&&U.isOpen&&"DELETE"!==U.type&&"RENAME"!==U.type?t.jsx(y.default,{isOpen:!0,onClose:function(){return F(e.__assign(e.__assign({},U),{isOpen:!1}))},onSubmit:pe,hasGlobalRuleSet:me}):t.jsx(S.default,{isOpen:U.isOpen&&"DELETE"!==U.type,onClose:function(){return F(e.__assign(e.__assign({},U),{isOpen:!1}))},onSubmit:"RENAME"===U.type?function(t){return e.__awaiter(C,void 0,void 0,function(){var n,r,a,s;return e.__generator(this,function(i){switch(i.label){case 0:J(!0),i.label=1;case 1:return i.trys.push([1,4,5,6]),U.scopeId?[4,c.renameScope({scope_id:U.scopeId,scope_name:t})]:[2];case 2:return i.sent(),[4,de(!0)];case 3:return i.sent(),F(function(t){return e.__assign(e.__assign({},t),{isOpen:!1})}),[3,6];case 4:throw n=i.sent(),console.error("An error occurred during scope rename.",n),null===(r=re.current)||void 0===r||r.show({severity:"error",summary:"Rename Failed",detail:(null===(s=null===(a=null==n?void 0:n.response)||void 0===a?void 0:a.data)||void 0===s?void 0:s.message)||"There was an error renaming the scope. Please try again."}),n;case 5:return J(!1),[7];case 6:return[2]}})})}:pe,isLoading:z,title:"GLOBAL"===U.type?"Create Global Scope":"SCOPE"===U.type?"Add Scope":"SUBSCOPE"===U.type?"Add Subscope":"Rename Scope",description:"GLOBAL"===U.type?"Create the Global scope to define base learnings that apply across all stations.":"SCOPE"===U.type?"This scope will be created under ".concat(U.parentName||"Global"," and will inherit its Learnings by default."):"SUBSCOPE"===U.type?"This subscope will be created under ".concat(U.parentName||"Scope"," and will inherit ").concat(U.parentName||"Scope","'s Learnings and Stations by default."):"",inputLabel:"GLOBAL"===U.type||"SCOPE"===U.type?"Scope Name":"SUBSCOPE"===U.type?"Subscope Name":"Scope Name",submitLabel:"GLOBAL"===U.type?"Create Scope":"SCOPE"===U.type?"Add Scope":"SUBSCOPE"===U.type?"Add Subscope":"Save",placeholder:"GLOBAL"===U.type?"Enter the global scope name":"SCOPE"===U.type?"Enter the scope name":"SUBSCOPE"===U.type?"Enter the subscope name":"Enter the new name",initialValue:"RENAME"===U.type?U.initialName:""}),t.jsx(d.default,{isOpen:U.isOpen&&"DELETE"===U.type,onCancel:function(){return F(e.__assign(e.__assign({},U),{isOpen:!1}))},onConfirm:function(){return ge(U.scopeId,U.initialName,U.isSubscope)},title:"Delete Scope",description:t.jsxs(t.Fragment,{children:["Deleting ",t.jsx("span",e.__assign({className:i.default.highlight},{children:U.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:z})]}))})};
|
|
2
2
|
//# sourceMappingURL=LearningManagement.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("./RuleContent/RuleContent.js"),o=require("./StationsContent/StationsContent.js"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("./RuleContent/RuleContent.js"),o=require("./StationsContent/StationsContent.js"),i=require("./styles/LearningTemplateLayout.module.css.js"),a=require("./utils/treeUtils.js"),s=require("./SidebarWrapper.js"),r=require("./store/useLearningTemplateStore.js"),l=require("./components/StationOnboarding/StationOnboardModal.js");exports.default=function(d){var u,c=d.onOpenCreateModal,p=d.onRefreshRuleSets,S=d.scopeTreeData,f=d.onAddChild,C=d.onRenameChild,g=d.onDeleteChild,j=d.onSectionSelect,m=d.onViewStation,v=d.activeSectionId,_=void 0===v?"learnings":v,h=d.sectionsConfig,R=d.nodeTypesConfig,q=d.app_integration_id,x=d.token,T=r.useLearningTemplateStore(function(e){return e.isStationModalOpen}),O=r.useLearningTemplateStore(function(e){return e.setStationModalOpen}),y=r.useLearningTemplateStore(function(e){return e.selectedRuleSetId}),L=y?a.findNodeById((null==S?void 0:S.data)||null,y):null;return n.jsxs("div",e.__assign({className:i.default.container},{children:[n.jsx(s.default,{onOpenCreateModal:c,onRefreshRuleSets:p,scopeTreeData:S,onAddChild:f,onRenameChild:C,onDeleteChild:g,onSectionSelect:j,activeSectionId:_,sectionsConfig:h,nodeTypesConfig:R}),n.jsx("div",e.__assign({className:i.default.content},{children:"stations"===_?n.jsx(o.default,{scopeId:y||"",scopeName:(null==L?void 0:L.name)||"Unknown Scope",stationsCount:null===(u=null==L?void 0:L.metrics)||void 0===u?void 0:u.stationsCount,onViewStation:m}):n.jsx(t.default,{onRefreshRuleSets:p,app_integration_id:q,token:x})})),n.jsx(l.default,{isOpen:T,onClose:function(){O(!1)},onBoardStation:function(e){p(!0,e)},app_integration_id:q,token:x})]}))};
|
|
2
2
|
//# sourceMappingURL=LearningTemplateLayout.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime"),r=require("appsec-ui"),c=require("../store/useAuthStore.js"),a=require("../store/usePermissionsStore.js"),o=require("./AccessPanel.module.css.js"),t=require("../store/useEnvStore.js");exports.default=function(u){var i=u.ruleSetId,n=u.moduleId,l=u.mode,d=void 0===l?"both":l,p=c.default(function(e){return e.user}),f=t.default(function(e){return e.rbacConfig}),m=t.default(function(e){return e.appsecRbacUrl}),j=t.default(function(e){return e.appsecBaseUrl}),g=null==p?void 0:p.accessToken,v=a.usePermissionsStore(function(e){return e.hasPermission}),h=i||void 0,P=Boolean(h),_=P&&v("ilotj.scope.access.user.add",h),x=P&&v("ilotj.scope.access.user.edit",h),b=P&&v("ilotj.scope.access.user.remove",h),q=P&&v("ilotj.scope.access.group.add",h),A=P&&v("ilotj.scope.access.group.role.change",h),U=P&&v("ilotj.scope.access.group.remove",h);return h&&f&&m&&j?s.jsx("div",e.__assign({className:o.default.accessPanel},{children:s.jsx(r.RbacQueryProvider,{children:s.jsx(r.AppsecProvider,e.__assign({appId:f.applicationName,baseUrl:m,appsecUrl:j,mode:"manage",getAuthToken:function(){return null!=g?g:""}},{children:s.jsx(r.AccessListPanel,{resourceId:h,moduleId:n||f.moduleId,mode:d,canAddUser:_,canEditUser:x,canDeleteUser:b,canAddGroup:q,canEditGroup:A,canDeleteGroup:U})}))})})):s.jsx("div",e.__assign({className:o.default.accessPanel},{children:s.jsx("p",e.__assign({className:o.default.emptyState},{children:"Waiting for access configuration..."}))}))};
|
|
2
2
|
//# sourceMappingURL=AccessPanel.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(".AccessPanel-module_accessPanel__RXDzY{--appsec-bg:#fff;--appsec-surface:#f9fafb;--appsec-surface-alt:#f2f4f7;--appsec-border:#d0d5dd;--appsec-text:#101828;--appsec-text-secondary:#475467;--appsec-text-tertiary:#667085;--appsec-primary:#2563eb;--appsec-primary-light:#eff6ff;--appsec-danger:#dc2626;--appsec-danger-light:#fef2f2;--appsec-success:#16a34a;--appsec-success-light:#f0fdf4;--appsec-warning:#d97706;--appsec-warning-light:#fffbeb;box-sizing:border-box;color:#101828;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;height:100%;overflow:auto;padding:16px;width:100%}.AccessPanel-module_emptyState__EAuao{color:#667085;font-size:14px;margin:0}.AccessPanel-module_accessManagement__3XAwK{background:#fff;display:flex;flex-direction:column;height:100%;min-height:0}.AccessPanel-module_accessTabs__G6baq{align-items:center;border-bottom:1px solid #e4e7ec;display:flex;gap:4px;padding:12px 16px 0}.AccessPanel-module_accessTab__gUfj-{background:#0000;border:0;border-bottom:2px solid #0000;color:#667085;cursor:pointer;font-size:14px;font-weight:600;padding:10px 12px}.AccessPanel-module_accessTab__gUfj-:hover:not(:disabled){color:#101828}.AccessPanel-module_accessTab__gUfj-:disabled{color:#98a2b3;cursor:not-allowed}.AccessPanel-module_accessTabActive__6ZZzE{border-bottom-color:#2563eb;color:#101828}.AccessPanel-module_accessTabPanel__h458u{flex:1;min-height:0;overflow:hidden}.AccessPanel-module_accessPanel__RXDzY *{box-sizing:border-box}.AccessPanel-module_accessPanel__RXDzY button,.AccessPanel-module_accessPanel__RXDzY input,.AccessPanel-module_accessPanel__RXDzY select,.AccessPanel-module_accessPanel__RXDzY textarea{font:inherit}.AccessPanel-module_accessPanel__RXDzY button{background:#0000;border:0;cursor:pointer}.AccessPanel-module_accessPanel__RXDzY p{margin:0}.AccessPanel-module_accessPanel__RXDzY .fixed{position:fixed}.AccessPanel-module_accessPanel__RXDzY .inset-0{inset:0}.AccessPanel-module_accessPanel__RXDzY .top-0{top:0}.AccessPanel-module_accessPanel__RXDzY .right-0{right:0}.AccessPanel-module_accessPanel__RXDzY .bottom-0{bottom:0}.AccessPanel-module_accessPanel__RXDzY .left-0{left:0}.AccessPanel-module_accessPanel__RXDzY .top-2{top:8px}.AccessPanel-module_accessPanel__RXDzY .top-4{top:16px}.AccessPanel-module_accessPanel__RXDzY .right-2{right:8px}.AccessPanel-module_accessPanel__RXDzY .right-4{right:16px}.AccessPanel-module_accessPanel__RXDzY .left-3{left:12px}.AccessPanel-module_accessPanel__RXDzY .right-2\\.5{right:10px}.AccessPanel-module_accessPanel__RXDzY .top-1\\.5{top:6px}.AccessPanel-module_accessPanel__RXDzY .top-2\\.5{top:10px}.AccessPanel-module_accessPanel__RXDzY .top-1\\/2{top:50%}.AccessPanel-module_accessPanel__RXDzY .left-1\\/2{left:50%}.AccessPanel-module_accessPanel__RXDzY .-translate-x-1\\/2{transform:translateX(-50%)}.AccessPanel-module_accessPanel__RXDzY .-translate-y-1\\/2{transform:translateY(-50%)}.AccessPanel-module_accessPanel__RXDzY .bg-black\\/40{background-color:#0006}.AccessPanel-module_accessPanel__RXDzY .bg-black\\/50{background-color:#00000080}.AccessPanel-module_accessPanel__RXDzY .flex{display:flex}.AccessPanel-module_accessPanel__RXDzY .inline-flex{display:inline-flex}.AccessPanel-module_accessPanel__RXDzY .block{display:block}.AccessPanel-module_accessPanel__RXDzY .inline-block{display:inline-block}.AccessPanel-module_accessPanel__RXDzY .hidden{display:none}.AccessPanel-module_accessPanel__RXDzY .grid{display:grid}.AccessPanel-module_accessPanel__RXDzY .flex-col{flex-direction:column}.AccessPanel-module_accessPanel__RXDzY .flex-row{flex-direction:row}.AccessPanel-module_accessPanel__RXDzY .flex-wrap{flex-wrap:wrap}.AccessPanel-module_accessPanel__RXDzY .flex-nowrap{flex-wrap:nowrap}.AccessPanel-module_accessPanel__RXDzY .flex-1{flex:1 1 0%}.AccessPanel-module_accessPanel__RXDzY .flex-auto{flex:1 1 auto}.AccessPanel-module_accessPanel__RXDzY .flex-none{flex:none}.AccessPanel-module_accessPanel__RXDzY .shrink-0{flex-shrink:0}.AccessPanel-module_accessPanel__RXDzY .grow{flex-grow:1}.AccessPanel-module_accessPanel__RXDzY .items-center{align-items:center}.AccessPanel-module_accessPanel__RXDzY .items-start{align-items:flex-start}.AccessPanel-module_accessPanel__RXDzY .items-end{align-items:flex-end}.AccessPanel-module_accessPanel__RXDzY .items-stretch{align-items:stretch}.AccessPanel-module_accessPanel__RXDzY .justify-center{justify-content:center}.AccessPanel-module_accessPanel__RXDzY .justify-between{justify-content:space-between}.AccessPanel-module_accessPanel__RXDzY .justify-end{justify-content:flex-end}.AccessPanel-module_accessPanel__RXDzY .justify-start{justify-content:flex-start}.AccessPanel-module_accessPanel__RXDzY .self-center{align-self:center}.AccessPanel-module_accessPanel__RXDzY .self-start{align-self:flex-start}.AccessPanel-module_accessPanel__RXDzY .self-end{align-self:flex-end}.AccessPanel-module_accessPanel__RXDzY .gap-0{gap:0}.AccessPanel-module_accessPanel__RXDzY .gap-0\\.5{gap:2px}.AccessPanel-module_accessPanel__RXDzY .gap-1{gap:4px}.AccessPanel-module_accessPanel__RXDzY .gap-1\\.5{gap:6px}.AccessPanel-module_accessPanel__RXDzY .gap-2{gap:8px}.AccessPanel-module_accessPanel__RXDzY .gap-2\\.5{gap:10px}.AccessPanel-module_accessPanel__RXDzY .gap-3{gap:12px}.AccessPanel-module_accessPanel__RXDzY .gap-4{gap:16px}.AccessPanel-module_accessPanel__RXDzY .gap-5{gap:20px}.AccessPanel-module_accessPanel__RXDzY .gap-6{gap:24px}.AccessPanel-module_accessPanel__RXDzY .gap-x-2{column-gap:8px}.AccessPanel-module_accessPanel__RXDzY .gap-x-3{column-gap:12px}.AccessPanel-module_accessPanel__RXDzY .gap-y-2{row-gap:8px}.AccessPanel-module_accessPanel__RXDzY .gap-y-3{row-gap:12px}.AccessPanel-module_accessPanel__RXDzY .space-y-1>:not([hidden])~:not([hidden]){margin-top:4px}.AccessPanel-module_accessPanel__RXDzY .space-y-2>:not([hidden])~:not([hidden]){margin-top:8px}.AccessPanel-module_accessPanel__RXDzY .space-y-3>:not([hidden])~:not([hidden]){margin-top:12px}.AccessPanel-module_accessPanel__RXDzY .space-y-4>:not([hidden])~:not([hidden]){margin-top:16px}.AccessPanel-module_accessPanel__RXDzY .space-x-2>:not([hidden])~:not([hidden]){margin-left:8px}.AccessPanel-module_accessPanel__RXDzY .space-x-3>:not([hidden])~:not([hidden]){margin-left:12px}.AccessPanel-module_accessPanel__RXDzY .relative{position:relative}.AccessPanel-module_accessPanel__RXDzY .absolute{position:absolute}.AccessPanel-module_accessPanel__RXDzY .sticky{position:sticky}.AccessPanel-module_accessPanel__RXDzY .z-10{z-index:10}.AccessPanel-module_accessPanel__RXDzY .z-20{z-index:20}.AccessPanel-module_accessPanel__RXDzY .z-50{z-index:50}.AccessPanel-module_accessPanel__RXDzY .z-100{z-index:100}.AccessPanel-module_accessPanel__RXDzY .pointer-events-none{pointer-events:none}.AccessPanel-module_accessPanel__RXDzY .pointer-events-auto{pointer-events:auto}.AccessPanel-module_accessPanel__RXDzY .w-full{width:100%}.AccessPanel-module_accessPanel__RXDzY .h-full{height:100%}.AccessPanel-module_accessPanel__RXDzY .w-auto{width:auto}.AccessPanel-module_accessPanel__RXDzY .h-auto{height:auto}.AccessPanel-module_accessPanel__RXDzY .w-fit{width:fit-content}.AccessPanel-module_accessPanel__RXDzY .w-3{width:12px}.AccessPanel-module_accessPanel__RXDzY .h-3{height:12px}.AccessPanel-module_accessPanel__RXDzY .w-3\\.5{width:14px}.AccessPanel-module_accessPanel__RXDzY .h-3\\.5{height:14px}.AccessPanel-module_accessPanel__RXDzY .w-4{width:16px}.AccessPanel-module_accessPanel__RXDzY .h-4{height:16px}.AccessPanel-module_accessPanel__RXDzY .w-5{width:20px}.AccessPanel-module_accessPanel__RXDzY .h-5{height:20px}.AccessPanel-module_accessPanel__RXDzY .w-6{width:24px}.AccessPanel-module_accessPanel__RXDzY .h-6{height:24px}.AccessPanel-module_accessPanel__RXDzY .w-7{width:28px}.AccessPanel-module_accessPanel__RXDzY .h-7{height:28px}.AccessPanel-module_accessPanel__RXDzY .w-8{width:32px}.AccessPanel-module_accessPanel__RXDzY .h-8{height:32px}.AccessPanel-module_accessPanel__RXDzY .w-9{width:36px}.AccessPanel-module_accessPanel__RXDzY .h-9{height:36px}.AccessPanel-module_accessPanel__RXDzY .w-10{width:40px}.AccessPanel-module_accessPanel__RXDzY .h-10{height:40px}.AccessPanel-module_accessPanel__RXDzY .w-12{width:48px}.AccessPanel-module_accessPanel__RXDzY .h-12{height:48px}.AccessPanel-module_accessPanel__RXDzY .w-14{width:56px}.AccessPanel-module_accessPanel__RXDzY .w-16{width:64px}.AccessPanel-module_accessPanel__RXDzY .w-20{width:80px}.AccessPanel-module_accessPanel__RXDzY .w-24{width:96px}.AccessPanel-module_accessPanel__RXDzY .w-28{width:112px}.AccessPanel-module_accessPanel__RXDzY .w-32{width:128px}.AccessPanel-module_accessPanel__RXDzY .w-40{width:160px}.AccessPanel-module_accessPanel__RXDzY .w-48{width:192px}.AccessPanel-module_accessPanel__RXDzY .w-64{width:256px}.AccessPanel-module_accessPanel__RXDzY .w-80{width:320px}.AccessPanel-module_accessPanel__RXDzY .min-w-0{min-width:0}.AccessPanel-module_accessPanel__RXDzY .min-w-32{min-width:128px}.AccessPanel-module_accessPanel__RXDzY .min-w-40{min-width:160px}.AccessPanel-module_accessPanel__RXDzY .min-w-48{min-width:192px}.AccessPanel-module_accessPanel__RXDzY .max-w-xs{max-width:320px}.AccessPanel-module_accessPanel__RXDzY .max-w-sm{max-width:384px}.AccessPanel-module_accessPanel__RXDzY .max-w-md{max-width:448px}.AccessPanel-module_accessPanel__RXDzY .max-w-lg{max-width:512px}.AccessPanel-module_accessPanel__RXDzY .max-w-full{max-width:100%}.AccessPanel-module_accessPanel__RXDzY .max-h-60{max-height:240px}.AccessPanel-module_accessPanel__RXDzY .max-h-72{max-height:288px}.AccessPanel-module_accessPanel__RXDzY .max-h-96{max-height:384px}.AccessPanel-module_accessPanel__RXDzY .min-h-0{min-height:0}.AccessPanel-module_accessPanel__RXDzY .rounded-none{border-radius:0}.AccessPanel-module_accessPanel__RXDzY .rounded-sm{border-radius:2px}.AccessPanel-module_accessPanel__RXDzY .rounded{border-radius:4px}.AccessPanel-module_accessPanel__RXDzY .rounded-md{border-radius:6px}.AccessPanel-module_accessPanel__RXDzY .rounded-lg{border-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-xl{border-radius:12px}.AccessPanel-module_accessPanel__RXDzY .rounded-2xl{border-radius:16px}.AccessPanel-module_accessPanel__RXDzY .rounded-full{border-radius:9999px}.AccessPanel-module_accessPanel__RXDzY .rounded-appsec{border-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-t-lg{border-top-left-radius:8px;border-top-right-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-b-lg{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-l-lg{border-bottom-left-radius:8px;border-top-left-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-r-lg{border-bottom-right-radius:8px;border-top-right-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-t-md{border-top-left-radius:6px;border-top-right-radius:6px}.AccessPanel-module_accessPanel__RXDzY .rounded-b-md{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.AccessPanel-module_accessPanel__RXDzY .rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.AccessPanel-module_accessPanel__RXDzY .rounded-b-xl{border-bottom-left-radius:12px;border-bottom-right-radius:12px}.AccessPanel-module_accessPanel__RXDzY .border{border:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-0{border:0}.AccessPanel-module_accessPanel__RXDzY .border-2{border:2px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-t{border-top:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-b{border-bottom:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-l{border-left:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-r{border-right:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-t-0{border-top:0}.AccessPanel-module_accessPanel__RXDzY .border-b-0{border-bottom:0}.AccessPanel-module_accessPanel__RXDzY .border-appsec-border{border-color:var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-appsec-primary{border-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .border-appsec-danger{border-color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .border-transparent{border-color:#0000}.AccessPanel-module_accessPanel__RXDzY .border-gray-200{border-color:#eaecf0}.AccessPanel-module_accessPanel__RXDzY .border-blue-200{border-color:#bfdbfe}.AccessPanel-module_accessPanel__RXDzY .divide-y>:not([hidden])~:not([hidden]){border-top:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .divide-x>:not([hidden])~:not([hidden]){border-left:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY [role=tablist]{background:var(--appsec-surface);border:1px solid var(--appsec-border);border-radius:8px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.AccessPanel-module_accessPanel__RXDzY [role=tab]{background:#0000;border:none;border-radius:0;color:var(--appsec-text-secondary);cursor:pointer;font-size:13px;font-weight:400;padding:8px 12px;text-align:center;transition:background .12s,color .12s;white-space:nowrap}.AccessPanel-module_accessPanel__RXDzY [role=tab].active,.AccessPanel-module_accessPanel__RXDzY [role=tab][aria-selected=true],.AccessPanel-module_accessPanel__RXDzY [role=tab][data-state=active]{background:var(--appsec-primary);color:#fff;font-weight:500}.AccessPanel-module_accessPanel__RXDzY [role=tab]:not([aria-selected=true]):not([data-state=active]):not(.active):hover{background:var(--appsec-surface-alt);color:var(--appsec-text)}.AccessPanel-module_accessPanel__RXDzY .overflow-hidden{overflow:hidden}.AccessPanel-module_accessPanel__RXDzY .overflow-auto{overflow:auto}.AccessPanel-module_accessPanel__RXDzY .overflow-y-auto{overflow-y:auto}.AccessPanel-module_accessPanel__RXDzY .overflow-x-auto{overflow-x:auto}.AccessPanel-module_accessPanel__RXDzY .overflow-visible{overflow:visible}.AccessPanel-module_accessPanel__RXDzY .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AccessPanel-module_accessPanel__RXDzY .whitespace-nowrap{white-space:nowrap}.AccessPanel-module_accessPanel__RXDzY .whitespace-normal{white-space:normal}.AccessPanel-module_accessPanel__RXDzY .break-words{overflow-wrap:break-word}.AccessPanel-module_accessPanel__RXDzY .break-all{word-break:break-all}.AccessPanel-module_accessPanel__RXDzY .text-left{text-align:left}.AccessPanel-module_accessPanel__RXDzY .text-center{text-align:center}.AccessPanel-module_accessPanel__RXDzY .text-right{text-align:right}.AccessPanel-module_accessPanel__RXDzY .text-xs{font-size:12px;line-height:16px}.AccessPanel-module_accessPanel__RXDzY .text-sm{font-size:14px;line-height:20px}.AccessPanel-module_accessPanel__RXDzY .text-base{font-size:16px;line-height:24px}.AccessPanel-module_accessPanel__RXDzY .text-lg{font-size:18px;line-height:28px}.AccessPanel-module_accessPanel__RXDzY .text-xl{font-size:20px;line-height:28px}.AccessPanel-module_accessPanel__RXDzY .text-2xl{font-size:24px;line-height:32px}.AccessPanel-module_accessPanel__RXDzY .text-\\[10px\\]{font-size:10px;line-height:14px}.AccessPanel-module_accessPanel__RXDzY .text-\\[11px\\]{font-size:11px;line-height:16px}.AccessPanel-module_accessPanel__RXDzY .text-\\[13px\\]{font-size:13px;line-height:18px}.AccessPanel-module_accessPanel__RXDzY .font-normal{font-weight:400}.AccessPanel-module_accessPanel__RXDzY .font-medium{font-weight:500}.AccessPanel-module_accessPanel__RXDzY .font-semibold{font-weight:600}.AccessPanel-module_accessPanel__RXDzY .font-bold{font-weight:700}.AccessPanel-module_accessPanel__RXDzY .italic{font-style:italic}.AccessPanel-module_accessPanel__RXDzY .not-italic{font-style:normal}.AccessPanel-module_accessPanel__RXDzY .uppercase{text-transform:uppercase}.AccessPanel-module_accessPanel__RXDzY .lowercase{text-transform:lowercase}.AccessPanel-module_accessPanel__RXDzY .capitalize{text-transform:capitalize}.AccessPanel-module_accessPanel__RXDzY .normal-case{text-transform:none}.AccessPanel-module_accessPanel__RXDzY .underline{text-decoration:underline}.AccessPanel-module_accessPanel__RXDzY .no-underline{text-decoration:none}.AccessPanel-module_accessPanel__RXDzY .line-through{text-decoration:line-through}.AccessPanel-module_accessPanel__RXDzY .leading-none{line-height:1}.AccessPanel-module_accessPanel__RXDzY .leading-tight{line-height:1.25}.AccessPanel-module_accessPanel__RXDzY .leading-snug{line-height:1.375}.AccessPanel-module_accessPanel__RXDzY .leading-normal{line-height:1.5}.AccessPanel-module_accessPanel__RXDzY .leading-relaxed{line-height:1.625}.AccessPanel-module_accessPanel__RXDzY .text-white{color:#fff}.AccessPanel-module_accessPanel__RXDzY .text-black{color:#000}.AccessPanel-module_accessPanel__RXDzY .text-appsec-text{color:var(--appsec-text)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-text-secondary{color:var(--appsec-text-secondary)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-text-tertiary{color:var(--appsec-text-tertiary)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-primary{color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-danger{color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-success{color:var(--appsec-success)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-warning{color:var(--appsec-warning)}.AccessPanel-module_accessPanel__RXDzY .text-gray-400{color:#98a2b3}.AccessPanel-module_accessPanel__RXDzY .text-gray-500{color:#667085}.AccessPanel-module_accessPanel__RXDzY .text-gray-600{color:#475467}.AccessPanel-module_accessPanel__RXDzY .text-gray-700{color:#344054}.AccessPanel-module_accessPanel__RXDzY .text-gray-900{color:#101828}.AccessPanel-module_accessPanel__RXDzY .text-blue-600{color:#2563eb}.AccessPanel-module_accessPanel__RXDzY .text-blue-700{color:#1d4ed8}.AccessPanel-module_accessPanel__RXDzY .text-red-600{color:#dc2626}.AccessPanel-module_accessPanel__RXDzY .text-red-700{color:#b91c1c}.AccessPanel-module_accessPanel__RXDzY .text-green-600{color:#16a34a}.AccessPanel-module_accessPanel__RXDzY .text-green-700{color:#15803d}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-bg{background-color:var(--appsec-bg)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-surface{background-color:var(--appsec-surface)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-surface-alt{background-color:var(--appsec-surface-alt)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-primary{background-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-primary-light{background-color:var(--appsec-primary-light)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-danger{background-color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-danger-light{background-color:var(--appsec-danger-light)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-success-light{background-color:var(--appsec-success-light)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-warning-light{background-color:var(--appsec-warning-light)}.AccessPanel-module_accessPanel__RXDzY .bg-transparent{background-color:initial}.AccessPanel-module_accessPanel__RXDzY .bg-white{background-color:#fff}.AccessPanel-module_accessPanel__RXDzY .bg-gray-50{background-color:#f9fafb}.AccessPanel-module_accessPanel__RXDzY .bg-gray-100{background-color:#f2f4f7}.AccessPanel-module_accessPanel__RXDzY .bg-gray-200{background-color:#eaecf0}.AccessPanel-module_accessPanel__RXDzY .bg-blue-50{background-color:#eff6ff}.AccessPanel-module_accessPanel__RXDzY .bg-blue-600{background-color:#2563eb}.AccessPanel-module_accessPanel__RXDzY .bg-red-50{background-color:#fef2f2}.AccessPanel-module_accessPanel__RXDzY .bg-red-600{background-color:#dc2626}.AccessPanel-module_accessPanel__RXDzY .bg-green-50{background-color:#f0fdf4}.AccessPanel-module_accessPanel__RXDzY .bg-yellow-50{background-color:#fffbeb}.AccessPanel-module_accessPanel__RXDzY .bg-blue-500{background-color:#3b82f6}.AccessPanel-module_accessPanel__RXDzY .bg-purple-500{background-color:#a855f7}.AccessPanel-module_accessPanel__RXDzY .bg-green-600{background-color:#16a34a}.AccessPanel-module_accessPanel__RXDzY .bg-orange-500{background-color:#f97316}.AccessPanel-module_accessPanel__RXDzY .bg-pink-500{background-color:#ec4899}.AccessPanel-module_accessPanel__RXDzY .bg-teal-500{background-color:#14b8a6}.AccessPanel-module_accessPanel__RXDzY .bg-indigo-500{background-color:#6366f1}.AccessPanel-module_accessPanel__RXDzY .bg-rose-500{background-color:#f43f5e}.AccessPanel-module_accessPanel__RXDzY .p-0{padding:0}.AccessPanel-module_accessPanel__RXDzY .p-0\\.5{padding:2px}.AccessPanel-module_accessPanel__RXDzY .p-1{padding:4px}.AccessPanel-module_accessPanel__RXDzY .p-1\\.5{padding:6px}.AccessPanel-module_accessPanel__RXDzY .p-2{padding:8px}.AccessPanel-module_accessPanel__RXDzY .p-2\\.5{padding:10px}.AccessPanel-module_accessPanel__RXDzY .p-3{padding:12px}.AccessPanel-module_accessPanel__RXDzY .p-4{padding:16px}.AccessPanel-module_accessPanel__RXDzY .p-5{padding:20px}.AccessPanel-module_accessPanel__RXDzY .p-6{padding:24px}.AccessPanel-module_accessPanel__RXDzY .px-1{padding-left:4px;padding-right:4px}.AccessPanel-module_accessPanel__RXDzY .px-2{padding-left:8px;padding-right:8px}.AccessPanel-module_accessPanel__RXDzY .px-2\\.5{padding-left:10px;padding-right:10px}.AccessPanel-module_accessPanel__RXDzY .px-3{padding-left:12px;padding-right:12px}.AccessPanel-module_accessPanel__RXDzY .px-4{padding-left:16px;padding-right:16px}.AccessPanel-module_accessPanel__RXDzY .px-5{padding-left:20px;padding-right:20px}.AccessPanel-module_accessPanel__RXDzY .px-6{padding-left:24px;padding-right:24px}.AccessPanel-module_accessPanel__RXDzY .py-0\\.5{padding-bottom:2px;padding-top:2px}.AccessPanel-module_accessPanel__RXDzY .py-1{padding-bottom:4px;padding-top:4px}.AccessPanel-module_accessPanel__RXDzY .py-1\\.5{padding-bottom:6px;padding-top:6px}.AccessPanel-module_accessPanel__RXDzY .py-2{padding-bottom:8px;padding-top:8px}.AccessPanel-module_accessPanel__RXDzY .py-2\\.5{padding-bottom:10px;padding-top:10px}.AccessPanel-module_accessPanel__RXDzY .py-3{padding-bottom:12px;padding-top:12px}.AccessPanel-module_accessPanel__RXDzY .py-4{padding-bottom:16px;padding-top:16px}.AccessPanel-module_accessPanel__RXDzY .py-5{padding-bottom:20px;padding-top:20px}.AccessPanel-module_accessPanel__RXDzY .py-6{padding-bottom:24px;padding-top:24px}.AccessPanel-module_accessPanel__RXDzY .py-8{padding-bottom:32px;padding-top:32px}.AccessPanel-module_accessPanel__RXDzY .pt-0{padding-top:0}.AccessPanel-module_accessPanel__RXDzY .pt-1{padding-top:4px}.AccessPanel-module_accessPanel__RXDzY .pt-2{padding-top:8px}.AccessPanel-module_accessPanel__RXDzY .pt-3{padding-top:12px}.AccessPanel-module_accessPanel__RXDzY .pt-4{padding-top:16px}.AccessPanel-module_accessPanel__RXDzY .pb-0{padding-bottom:0}.AccessPanel-module_accessPanel__RXDzY .pb-1{padding-bottom:4px}.AccessPanel-module_accessPanel__RXDzY .pb-2{padding-bottom:8px}.AccessPanel-module_accessPanel__RXDzY .pb-3{padding-bottom:12px}.AccessPanel-module_accessPanel__RXDzY .pb-4{padding-bottom:16px}.AccessPanel-module_accessPanel__RXDzY .pl-0{padding-left:0}.AccessPanel-module_accessPanel__RXDzY .pl-2{padding-left:8px}.AccessPanel-module_accessPanel__RXDzY .pl-3{padding-left:12px}.AccessPanel-module_accessPanel__RXDzY .pl-4{padding-left:16px}.AccessPanel-module_accessPanel__RXDzY .pl-9{padding-left:36px}.AccessPanel-module_accessPanel__RXDzY .pr-0{padding-right:0}.AccessPanel-module_accessPanel__RXDzY .pr-2{padding-right:8px}.AccessPanel-module_accessPanel__RXDzY .pr-3{padding-right:12px}.AccessPanel-module_accessPanel__RXDzY .pr-4{padding-right:16px}.AccessPanel-module_accessPanel__RXDzY .pr-6{padding-right:24px}.AccessPanel-module_accessPanel__RXDzY .pr-8{padding-right:32px}.AccessPanel-module_accessPanel__RXDzY .pr-10{padding-right:40px}.AccessPanel-module_accessPanel__RXDzY .m-0{margin:0}.AccessPanel-module_accessPanel__RXDzY .m-1{margin:4px}.AccessPanel-module_accessPanel__RXDzY .m-2{margin:8px}.AccessPanel-module_accessPanel__RXDzY .m-auto{margin:auto}.AccessPanel-module_accessPanel__RXDzY .mx-auto{margin-left:auto;margin-right:auto}.AccessPanel-module_accessPanel__RXDzY .ml-auto{margin-left:auto}.AccessPanel-module_accessPanel__RXDzY .mr-auto{margin-right:auto}.AccessPanel-module_accessPanel__RXDzY .mt-0{margin-top:0}.AccessPanel-module_accessPanel__RXDzY .mt-1{margin-top:4px}.AccessPanel-module_accessPanel__RXDzY .mt-2{margin-top:8px}.AccessPanel-module_accessPanel__RXDzY .mt-3{margin-top:12px}.AccessPanel-module_accessPanel__RXDzY .mt-4{margin-top:16px}.AccessPanel-module_accessPanel__RXDzY .mt-6{margin-top:24px}.AccessPanel-module_accessPanel__RXDzY .mb-0{margin-bottom:0}.AccessPanel-module_accessPanel__RXDzY .mb-1{margin-bottom:4px}.AccessPanel-module_accessPanel__RXDzY .mb-2{margin-bottom:8px}.AccessPanel-module_accessPanel__RXDzY .mb-3{margin-bottom:12px}.AccessPanel-module_accessPanel__RXDzY .mb-4{margin-bottom:16px}.AccessPanel-module_accessPanel__RXDzY .ml-0{margin-left:0}.AccessPanel-module_accessPanel__RXDzY .ml-1{margin-left:4px}.AccessPanel-module_accessPanel__RXDzY .ml-2{margin-left:8px}.AccessPanel-module_accessPanel__RXDzY .ml-3{margin-left:12px}.AccessPanel-module_accessPanel__RXDzY .mr-0{margin-right:0}.AccessPanel-module_accessPanel__RXDzY .mr-1{margin-right:4px}.AccessPanel-module_accessPanel__RXDzY .mr-2{margin-right:8px}.AccessPanel-module_accessPanel__RXDzY .-mt-px{margin-top:-1px}.AccessPanel-module_accessPanel__RXDzY .shadow-none{box-shadow:none}.AccessPanel-module_accessPanel__RXDzY .shadow-sm{box-shadow:0 1px 2px #1018280f}.AccessPanel-module_accessPanel__RXDzY .shadow{box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.AccessPanel-module_accessPanel__RXDzY .shadow-md{box-shadow:0 4px 8px #10182814,0 2px 4px #1018280a}.AccessPanel-module_accessPanel__RXDzY .shadow-lg{box-shadow:0 12px 24px #1018281f}.AccessPanel-module_accessPanel__RXDzY .shadow-xl{box-shadow:0 20px 40px #10182829}.AccessPanel-module_accessPanel__RXDzY :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea,select){background-color:var(--appsec-bg);border:1px solid var(--appsec-border);border-radius:8px;color:var(--appsec-text);height:36px;outline:none;padding:0 12px;transition:border-color .12s,box-shadow .12s;width:100%}.AccessPanel-module_accessPanel__RXDzY :where(textarea){height:auto;padding:8px 12px;resize:vertical}.AccessPanel-module_accessPanel__RXDzY :where(input[type=text]:focus,input[type=email]:focus,input[type=search]:focus,input[type=password]:focus,textarea:focus,select:focus){border-color:var(--appsec-primary);box-shadow:0 0 0 3px var(--appsec-primary-light)}.AccessPanel-module_accessPanel__RXDzY :where(input::placeholder,textarea::placeholder){color:var(--appsec-text-tertiary)}.AccessPanel-module_accessPanel__RXDzY :where(input[type=checkbox]){accent-color:var(--appsec-primary);height:16px;width:16px}.AccessPanel-module_accessPanel__RXDzY .appearance-none{appearance:none}.AccessPanel-module_accessPanel__RXDzY .outline-none{outline:0}.AccessPanel-module_accessPanel__RXDzY .focus\\:border-appsec-primary:focus{border-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .focus\\:ring-2:focus{box-shadow:0 0 0 3px var(--appsec-primary-light)}.AccessPanel-module_accessPanel__RXDzY .focus\\:outline-none:focus{outline:0}.AccessPanel-module_accessPanel__RXDzY button:hover:not(:disabled){opacity:.92}.AccessPanel-module_accessPanel__RXDzY .disabled\\:opacity-30:disabled,.AccessPanel-module_accessPanel__RXDzY button:disabled{opacity:.3}.AccessPanel-module_accessPanel__RXDzY .disabled\\:opacity-50:disabled{opacity:.5}.AccessPanel-module_accessPanel__RXDzY .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.AccessPanel-module_accessPanel__RXDzY .cursor-pointer{cursor:pointer}.AccessPanel-module_accessPanel__RXDzY .cursor-not-allowed{cursor:not-allowed}.AccessPanel-module_accessPanel__RXDzY .cursor-default{cursor:default}.AccessPanel-module_accessPanel__RXDzY .select-none{user-select:none}.AccessPanel-module_accessPanel__RXDzY .select-text{user-select:text}.AccessPanel-module_accessPanel__RXDzY .opacity-0{opacity:0}.AccessPanel-module_accessPanel__RXDzY .opacity-30{opacity:.3}.AccessPanel-module_accessPanel__RXDzY .opacity-50{opacity:.5}.AccessPanel-module_accessPanel__RXDzY .opacity-75{opacity:.75}.AccessPanel-module_accessPanel__RXDzY .opacity-100{opacity:1}.AccessPanel-module_accessPanel__RXDzY .transition-all{transition:all .15s ease}.AccessPanel-module_accessPanel__RXDzY .transition-colors{transition:color .15s ease,background-color .15s ease,border-color .15s ease}.AccessPanel-module_accessPanel__RXDzY .transition-opacity{transition:opacity .15s ease}.AccessPanel-module_accessPanel__RXDzY .transition-transform{transition:transform .15s ease}.AccessPanel-module_accessPanel__RXDzY .duration-150{transition-duration:.15s}.AccessPanel-module_accessPanel__RXDzY .duration-200{transition-duration:.2s}.AccessPanel-module_accessPanel__RXDzY .duration-300{transition-duration:.3s}.AccessPanel-module_accessPanel__RXDzY .ease-in-out{transition-timing-function:ease-in-out}.AccessPanel-module_accessPanel__RXDzY .rotate-90{transform:rotate(90deg)}.AccessPanel-module_accessPanel__RXDzY .rotate-180{transform:rotate(180deg)}.AccessPanel-module_accessPanel__RXDzY .-rotate-90{transform:rotate(-90deg)}.AccessPanel-module_accessPanel__RXDzY .scale-95{transform:scale(.95)}.AccessPanel-module_accessPanel__RXDzY .scale-100{transform:scale(1)}.AccessPanel-module_accessPanel__RXDzY .list-none{list-style:none}.AccessPanel-module_accessPanel__RXDzY .list-disc{list-style:disc}.AccessPanel-module_accessPanel__RXDzY .object-cover{object-fit:cover}.AccessPanel-module_accessPanel__RXDzY .object-contain{object-fit:contain}.AccessPanel-module_accessPanel__RXDzY .sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-appsec-surface:hover{background-color:var(--appsec-surface)}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-appsec-surface-alt:hover{background-color:var(--appsec-surface-alt)}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-appsec-danger-light:hover{background-color:var(--appsec-danger-light)}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-gray-50:hover{background-color:#f9fafb}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-gray-100:hover{background-color:#f2f4f7}.AccessPanel-module_accessPanel__RXDzY .hover\\:text-appsec-text:hover{color:var(--appsec-text)}.AccessPanel-module_accessPanel__RXDzY .hover\\:text-appsec-danger:hover{color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .hover\\:text-appsec-primary:hover{color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .hover\\:border-appsec-primary:hover{border-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .hover\\:underline:hover{text-decoration:underline}.AccessPanel-module_accessPanel__RXDzY .hover\\:opacity-80:hover{opacity:.8}.AccessPanel-module_accessPanel__RXDzY .hover\\:shadow-md:hover{box-shadow:0 4px 8px #10182814,0 2px 4px #1018280a}.AccessPanel-module_accessPanel__RXDzY .group:hover .group-hover\\:opacity-100{opacity:1}.AccessPanel-module_accessPanel__RXDzY .group-hover\\:opacity-100{opacity:0;transition:opacity .15s}"),exports.default={accessPanel:"AccessPanel-module_accessPanel__RXDzY",emptyState:"AccessPanel-module_emptyState__EAuao",accessManagement:"AccessPanel-module_accessManagement__3XAwK",accessTabs:"AccessPanel-module_accessTabs__G6baq",accessTab:"AccessPanel-module_accessTab__gUfj-",accessTabActive:"AccessPanel-module_accessTabActive__6ZZzE",accessTabPanel:"AccessPanel-module_accessTabPanel__h458u"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../../node_modules/style-inject/dist/style-inject.es.js").default(".AccessPanel-module_accessPanel__RXDzY{--appsec-bg:#fff;--appsec-surface:#f9fafb;--appsec-surface-alt:#f2f4f7;--appsec-border:#d0d5dd;--appsec-text:#101828;--appsec-text-secondary:#475467;--appsec-text-tertiary:#667085;--appsec-primary:#2563eb;--appsec-primary-light:#eff6ff;--appsec-danger:#dc2626;--appsec-danger-light:#fef2f2;--appsec-success:#16a34a;--appsec-success-light:#f0fdf4;--appsec-warning:#d97706;--appsec-warning-light:#fffbeb;box-sizing:border-box;color:#101828;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;height:100%;overflow:auto;padding:16px;width:100%}.AccessPanel-module_emptyState__EAuao{color:#667085;font-size:14px;margin:0}.AccessPanel-module_accessPanel__RXDzY *{box-sizing:border-box}.AccessPanel-module_accessPanel__RXDzY button,.AccessPanel-module_accessPanel__RXDzY input,.AccessPanel-module_accessPanel__RXDzY select,.AccessPanel-module_accessPanel__RXDzY textarea{font:inherit}.AccessPanel-module_accessPanel__RXDzY button{background:#0000;border:0;cursor:pointer}.AccessPanel-module_accessPanel__RXDzY p{margin:0}.AccessPanel-module_accessPanel__RXDzY .fixed{position:fixed}.AccessPanel-module_accessPanel__RXDzY .inset-0{inset:0}.AccessPanel-module_accessPanel__RXDzY .top-0{top:0}.AccessPanel-module_accessPanel__RXDzY .right-0{right:0}.AccessPanel-module_accessPanel__RXDzY .bottom-0{bottom:0}.AccessPanel-module_accessPanel__RXDzY .left-0{left:0}.AccessPanel-module_accessPanel__RXDzY .top-2{top:8px}.AccessPanel-module_accessPanel__RXDzY .top-4{top:16px}.AccessPanel-module_accessPanel__RXDzY .right-2{right:8px}.AccessPanel-module_accessPanel__RXDzY .right-4{right:16px}.AccessPanel-module_accessPanel__RXDzY .left-3{left:12px}.AccessPanel-module_accessPanel__RXDzY .right-2\\.5{right:10px}.AccessPanel-module_accessPanel__RXDzY .top-1\\.5{top:6px}.AccessPanel-module_accessPanel__RXDzY .top-2\\.5{top:10px}.AccessPanel-module_accessPanel__RXDzY .top-1\\/2{top:50%}.AccessPanel-module_accessPanel__RXDzY .left-1\\/2{left:50%}.AccessPanel-module_accessPanel__RXDzY .-translate-x-1\\/2{transform:translateX(-50%)}.AccessPanel-module_accessPanel__RXDzY .-translate-y-1\\/2{transform:translateY(-50%)}.AccessPanel-module_accessPanel__RXDzY .bg-black\\/40{background-color:#0006}.AccessPanel-module_accessPanel__RXDzY .bg-black\\/50{background-color:#00000080}.AccessPanel-module_accessPanel__RXDzY .flex{display:flex}.AccessPanel-module_accessPanel__RXDzY .inline-flex{display:inline-flex}.AccessPanel-module_accessPanel__RXDzY .block{display:block}.AccessPanel-module_accessPanel__RXDzY .inline-block{display:inline-block}.AccessPanel-module_accessPanel__RXDzY .hidden{display:none}.AccessPanel-module_accessPanel__RXDzY .grid{display:grid}.AccessPanel-module_accessPanel__RXDzY .flex-col{flex-direction:column}.AccessPanel-module_accessPanel__RXDzY .flex-row{flex-direction:row}.AccessPanel-module_accessPanel__RXDzY .flex-wrap{flex-wrap:wrap}.AccessPanel-module_accessPanel__RXDzY .flex-nowrap{flex-wrap:nowrap}.AccessPanel-module_accessPanel__RXDzY .flex-1{flex:1 1 0%}.AccessPanel-module_accessPanel__RXDzY .flex-auto{flex:1 1 auto}.AccessPanel-module_accessPanel__RXDzY .flex-none{flex:none}.AccessPanel-module_accessPanel__RXDzY .shrink-0{flex-shrink:0}.AccessPanel-module_accessPanel__RXDzY .grow{flex-grow:1}.AccessPanel-module_accessPanel__RXDzY .items-center{align-items:center}.AccessPanel-module_accessPanel__RXDzY .items-start{align-items:flex-start}.AccessPanel-module_accessPanel__RXDzY .items-end{align-items:flex-end}.AccessPanel-module_accessPanel__RXDzY .items-stretch{align-items:stretch}.AccessPanel-module_accessPanel__RXDzY .justify-center{justify-content:center}.AccessPanel-module_accessPanel__RXDzY .justify-between{justify-content:space-between}.AccessPanel-module_accessPanel__RXDzY .justify-end{justify-content:flex-end}.AccessPanel-module_accessPanel__RXDzY .justify-start{justify-content:flex-start}.AccessPanel-module_accessPanel__RXDzY .self-center{align-self:center}.AccessPanel-module_accessPanel__RXDzY .self-start{align-self:flex-start}.AccessPanel-module_accessPanel__RXDzY .self-end{align-self:flex-end}.AccessPanel-module_accessPanel__RXDzY .gap-0{gap:0}.AccessPanel-module_accessPanel__RXDzY .gap-0\\.5{gap:2px}.AccessPanel-module_accessPanel__RXDzY .gap-1{gap:4px}.AccessPanel-module_accessPanel__RXDzY .gap-1\\.5{gap:6px}.AccessPanel-module_accessPanel__RXDzY .gap-2{gap:8px}.AccessPanel-module_accessPanel__RXDzY .gap-2\\.5{gap:10px}.AccessPanel-module_accessPanel__RXDzY .gap-3{gap:12px}.AccessPanel-module_accessPanel__RXDzY .gap-4{gap:16px}.AccessPanel-module_accessPanel__RXDzY .gap-5{gap:20px}.AccessPanel-module_accessPanel__RXDzY .gap-6{gap:24px}.AccessPanel-module_accessPanel__RXDzY .gap-x-2{column-gap:8px}.AccessPanel-module_accessPanel__RXDzY .gap-x-3{column-gap:12px}.AccessPanel-module_accessPanel__RXDzY .gap-y-2{row-gap:8px}.AccessPanel-module_accessPanel__RXDzY .gap-y-3{row-gap:12px}.AccessPanel-module_accessPanel__RXDzY .space-y-1>:not([hidden])~:not([hidden]){margin-top:4px}.AccessPanel-module_accessPanel__RXDzY .space-y-2>:not([hidden])~:not([hidden]){margin-top:8px}.AccessPanel-module_accessPanel__RXDzY .space-y-3>:not([hidden])~:not([hidden]){margin-top:12px}.AccessPanel-module_accessPanel__RXDzY .space-y-4>:not([hidden])~:not([hidden]){margin-top:16px}.AccessPanel-module_accessPanel__RXDzY .space-x-2>:not([hidden])~:not([hidden]){margin-left:8px}.AccessPanel-module_accessPanel__RXDzY .space-x-3>:not([hidden])~:not([hidden]){margin-left:12px}.AccessPanel-module_accessPanel__RXDzY .relative{position:relative}.AccessPanel-module_accessPanel__RXDzY .absolute{position:absolute}.AccessPanel-module_accessPanel__RXDzY .sticky{position:sticky}.AccessPanel-module_accessPanel__RXDzY .z-10{z-index:10}.AccessPanel-module_accessPanel__RXDzY .z-20{z-index:20}.AccessPanel-module_accessPanel__RXDzY .z-50{z-index:50}.AccessPanel-module_accessPanel__RXDzY .z-100{z-index:100}.AccessPanel-module_accessPanel__RXDzY .pointer-events-none{pointer-events:none}.AccessPanel-module_accessPanel__RXDzY .pointer-events-auto{pointer-events:auto}.AccessPanel-module_accessPanel__RXDzY .w-full{width:100%}.AccessPanel-module_accessPanel__RXDzY .h-full{height:100%}.AccessPanel-module_accessPanel__RXDzY .w-auto{width:auto}.AccessPanel-module_accessPanel__RXDzY .h-auto{height:auto}.AccessPanel-module_accessPanel__RXDzY .w-fit{width:fit-content}.AccessPanel-module_accessPanel__RXDzY .w-3{width:12px}.AccessPanel-module_accessPanel__RXDzY .h-3{height:12px}.AccessPanel-module_accessPanel__RXDzY .w-3\\.5{width:14px}.AccessPanel-module_accessPanel__RXDzY .h-3\\.5{height:14px}.AccessPanel-module_accessPanel__RXDzY .w-4{width:16px}.AccessPanel-module_accessPanel__RXDzY .h-4{height:16px}.AccessPanel-module_accessPanel__RXDzY .w-5{width:20px}.AccessPanel-module_accessPanel__RXDzY .h-5{height:20px}.AccessPanel-module_accessPanel__RXDzY .w-6{width:24px}.AccessPanel-module_accessPanel__RXDzY .h-6{height:24px}.AccessPanel-module_accessPanel__RXDzY .w-7{width:28px}.AccessPanel-module_accessPanel__RXDzY .h-7{height:28px}.AccessPanel-module_accessPanel__RXDzY .w-8{width:32px}.AccessPanel-module_accessPanel__RXDzY .h-8{height:32px}.AccessPanel-module_accessPanel__RXDzY .w-9{width:36px}.AccessPanel-module_accessPanel__RXDzY .h-9{height:36px}.AccessPanel-module_accessPanel__RXDzY .w-10{width:40px}.AccessPanel-module_accessPanel__RXDzY .h-10{height:40px}.AccessPanel-module_accessPanel__RXDzY .w-12{width:48px}.AccessPanel-module_accessPanel__RXDzY .h-12{height:48px}.AccessPanel-module_accessPanel__RXDzY .w-14{width:56px}.AccessPanel-module_accessPanel__RXDzY .w-16{width:64px}.AccessPanel-module_accessPanel__RXDzY .w-20{width:80px}.AccessPanel-module_accessPanel__RXDzY .w-24{width:96px}.AccessPanel-module_accessPanel__RXDzY .w-28{width:112px}.AccessPanel-module_accessPanel__RXDzY .w-32{width:128px}.AccessPanel-module_accessPanel__RXDzY .w-40{width:160px}.AccessPanel-module_accessPanel__RXDzY .w-48{width:192px}.AccessPanel-module_accessPanel__RXDzY .w-64{width:256px}.AccessPanel-module_accessPanel__RXDzY .w-80{width:320px}.AccessPanel-module_accessPanel__RXDzY .min-w-0{min-width:0}.AccessPanel-module_accessPanel__RXDzY .min-w-32{min-width:128px}.AccessPanel-module_accessPanel__RXDzY .min-w-40{min-width:160px}.AccessPanel-module_accessPanel__RXDzY .min-w-48{min-width:192px}.AccessPanel-module_accessPanel__RXDzY .max-w-xs{max-width:320px}.AccessPanel-module_accessPanel__RXDzY .max-w-sm{max-width:384px}.AccessPanel-module_accessPanel__RXDzY .max-w-md{max-width:448px}.AccessPanel-module_accessPanel__RXDzY .max-w-lg{max-width:512px}.AccessPanel-module_accessPanel__RXDzY .max-w-full{max-width:100%}.AccessPanel-module_accessPanel__RXDzY .max-h-60{max-height:240px}.AccessPanel-module_accessPanel__RXDzY .max-h-72{max-height:288px}.AccessPanel-module_accessPanel__RXDzY .max-h-96{max-height:384px}.AccessPanel-module_accessPanel__RXDzY .min-h-0{min-height:0}.AccessPanel-module_accessPanel__RXDzY .rounded-none{border-radius:0}.AccessPanel-module_accessPanel__RXDzY .rounded-sm{border-radius:2px}.AccessPanel-module_accessPanel__RXDzY .rounded{border-radius:4px}.AccessPanel-module_accessPanel__RXDzY .rounded-md{border-radius:6px}.AccessPanel-module_accessPanel__RXDzY .rounded-lg{border-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-xl{border-radius:12px}.AccessPanel-module_accessPanel__RXDzY .rounded-2xl{border-radius:16px}.AccessPanel-module_accessPanel__RXDzY .rounded-full{border-radius:9999px}.AccessPanel-module_accessPanel__RXDzY .rounded-appsec{border-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-t-lg{border-top-left-radius:8px;border-top-right-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-b-lg{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-l-lg{border-bottom-left-radius:8px;border-top-left-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-r-lg{border-bottom-right-radius:8px;border-top-right-radius:8px}.AccessPanel-module_accessPanel__RXDzY .rounded-t-md{border-top-left-radius:6px;border-top-right-radius:6px}.AccessPanel-module_accessPanel__RXDzY .rounded-b-md{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.AccessPanel-module_accessPanel__RXDzY .rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.AccessPanel-module_accessPanel__RXDzY .rounded-b-xl{border-bottom-left-radius:12px;border-bottom-right-radius:12px}.AccessPanel-module_accessPanel__RXDzY .border{border:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-0{border:0}.AccessPanel-module_accessPanel__RXDzY .border-2{border:2px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-t{border-top:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-b{border-bottom:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-l{border-left:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-r{border-right:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-t-0{border-top:0}.AccessPanel-module_accessPanel__RXDzY .border-b-0{border-bottom:0}.AccessPanel-module_accessPanel__RXDzY .border-appsec-border{border-color:var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .border-appsec-primary{border-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .border-appsec-danger{border-color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .border-transparent{border-color:#0000}.AccessPanel-module_accessPanel__RXDzY .border-gray-200{border-color:#eaecf0}.AccessPanel-module_accessPanel__RXDzY .border-blue-200{border-color:#bfdbfe}.AccessPanel-module_accessPanel__RXDzY .divide-y>:not([hidden])~:not([hidden]){border-top:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY .divide-x>:not([hidden])~:not([hidden]){border-left:1px solid var(--appsec-border)}.AccessPanel-module_accessPanel__RXDzY [role=tablist]{background:var(--appsec-surface);border:1px solid var(--appsec-border);border-radius:8px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.AccessPanel-module_accessPanel__RXDzY [role=tab]{background:#0000;border:none;border-radius:0;color:var(--appsec-text-secondary);cursor:pointer;font-size:13px;font-weight:400;padding:8px 12px;text-align:center;transition:background .12s,color .12s;white-space:nowrap}.AccessPanel-module_accessPanel__RXDzY [role=tab].active,.AccessPanel-module_accessPanel__RXDzY [role=tab][aria-selected=true],.AccessPanel-module_accessPanel__RXDzY [role=tab][data-state=active]{background:var(--appsec-primary);color:#fff;font-weight:500}.AccessPanel-module_accessPanel__RXDzY [role=tab]:not([aria-selected=true]):not([data-state=active]):not(.active):hover{background:var(--appsec-surface-alt);color:var(--appsec-text)}.AccessPanel-module_accessPanel__RXDzY .overflow-hidden{overflow:hidden}.AccessPanel-module_accessPanel__RXDzY .overflow-auto{overflow:auto}.AccessPanel-module_accessPanel__RXDzY .overflow-y-auto{overflow-y:auto}.AccessPanel-module_accessPanel__RXDzY .overflow-x-auto{overflow-x:auto}.AccessPanel-module_accessPanel__RXDzY .overflow-visible{overflow:visible}.AccessPanel-module_accessPanel__RXDzY .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AccessPanel-module_accessPanel__RXDzY .whitespace-nowrap{white-space:nowrap}.AccessPanel-module_accessPanel__RXDzY .whitespace-normal{white-space:normal}.AccessPanel-module_accessPanel__RXDzY .break-words{overflow-wrap:break-word}.AccessPanel-module_accessPanel__RXDzY .break-all{word-break:break-all}.AccessPanel-module_accessPanel__RXDzY .text-left{text-align:left}.AccessPanel-module_accessPanel__RXDzY .text-center{text-align:center}.AccessPanel-module_accessPanel__RXDzY .text-right{text-align:right}.AccessPanel-module_accessPanel__RXDzY .text-xs{font-size:12px;line-height:16px}.AccessPanel-module_accessPanel__RXDzY .text-sm{font-size:14px;line-height:20px}.AccessPanel-module_accessPanel__RXDzY .text-base{font-size:16px;line-height:24px}.AccessPanel-module_accessPanel__RXDzY .text-lg{font-size:18px;line-height:28px}.AccessPanel-module_accessPanel__RXDzY .text-xl{font-size:20px;line-height:28px}.AccessPanel-module_accessPanel__RXDzY .text-2xl{font-size:24px;line-height:32px}.AccessPanel-module_accessPanel__RXDzY .text-\\[10px\\]{font-size:10px;line-height:14px}.AccessPanel-module_accessPanel__RXDzY .text-\\[11px\\]{font-size:11px;line-height:16px}.AccessPanel-module_accessPanel__RXDzY .text-\\[13px\\]{font-size:13px;line-height:18px}.AccessPanel-module_accessPanel__RXDzY .font-normal{font-weight:400}.AccessPanel-module_accessPanel__RXDzY .font-medium{font-weight:500}.AccessPanel-module_accessPanel__RXDzY .font-semibold{font-weight:600}.AccessPanel-module_accessPanel__RXDzY .font-bold{font-weight:700}.AccessPanel-module_accessPanel__RXDzY .italic{font-style:italic}.AccessPanel-module_accessPanel__RXDzY .not-italic{font-style:normal}.AccessPanel-module_accessPanel__RXDzY .uppercase{text-transform:uppercase}.AccessPanel-module_accessPanel__RXDzY .lowercase{text-transform:lowercase}.AccessPanel-module_accessPanel__RXDzY .capitalize{text-transform:capitalize}.AccessPanel-module_accessPanel__RXDzY .normal-case{text-transform:none}.AccessPanel-module_accessPanel__RXDzY .underline{text-decoration:underline}.AccessPanel-module_accessPanel__RXDzY .no-underline{text-decoration:none}.AccessPanel-module_accessPanel__RXDzY .line-through{text-decoration:line-through}.AccessPanel-module_accessPanel__RXDzY .leading-none{line-height:1}.AccessPanel-module_accessPanel__RXDzY .leading-tight{line-height:1.25}.AccessPanel-module_accessPanel__RXDzY .leading-snug{line-height:1.375}.AccessPanel-module_accessPanel__RXDzY .leading-normal{line-height:1.5}.AccessPanel-module_accessPanel__RXDzY .leading-relaxed{line-height:1.625}.AccessPanel-module_accessPanel__RXDzY .text-white{color:#fff}.AccessPanel-module_accessPanel__RXDzY .text-black{color:#000}.AccessPanel-module_accessPanel__RXDzY .text-appsec-text{color:var(--appsec-text)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-text-secondary{color:var(--appsec-text-secondary)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-text-tertiary{color:var(--appsec-text-tertiary)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-primary{color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-danger{color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-success{color:var(--appsec-success)}.AccessPanel-module_accessPanel__RXDzY .text-appsec-warning{color:var(--appsec-warning)}.AccessPanel-module_accessPanel__RXDzY .text-gray-400{color:#98a2b3}.AccessPanel-module_accessPanel__RXDzY .text-gray-500{color:#667085}.AccessPanel-module_accessPanel__RXDzY .text-gray-600{color:#475467}.AccessPanel-module_accessPanel__RXDzY .text-gray-700{color:#344054}.AccessPanel-module_accessPanel__RXDzY .text-gray-900{color:#101828}.AccessPanel-module_accessPanel__RXDzY .text-blue-600{color:#2563eb}.AccessPanel-module_accessPanel__RXDzY .text-blue-700{color:#1d4ed8}.AccessPanel-module_accessPanel__RXDzY .text-red-600{color:#dc2626}.AccessPanel-module_accessPanel__RXDzY .text-red-700{color:#b91c1c}.AccessPanel-module_accessPanel__RXDzY .text-green-600{color:#16a34a}.AccessPanel-module_accessPanel__RXDzY .text-green-700{color:#15803d}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-bg{background-color:var(--appsec-bg)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-surface{background-color:var(--appsec-surface)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-surface-alt{background-color:var(--appsec-surface-alt)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-primary{background-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-primary-light{background-color:var(--appsec-primary-light)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-danger{background-color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-danger-light{background-color:var(--appsec-danger-light)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-success-light{background-color:var(--appsec-success-light)}.AccessPanel-module_accessPanel__RXDzY .bg-appsec-warning-light{background-color:var(--appsec-warning-light)}.AccessPanel-module_accessPanel__RXDzY .bg-transparent{background-color:initial}.AccessPanel-module_accessPanel__RXDzY .bg-white{background-color:#fff}.AccessPanel-module_accessPanel__RXDzY .bg-gray-50{background-color:#f9fafb}.AccessPanel-module_accessPanel__RXDzY .bg-gray-100{background-color:#f2f4f7}.AccessPanel-module_accessPanel__RXDzY .bg-gray-200{background-color:#eaecf0}.AccessPanel-module_accessPanel__RXDzY .bg-blue-50{background-color:#eff6ff}.AccessPanel-module_accessPanel__RXDzY .bg-blue-600{background-color:#2563eb}.AccessPanel-module_accessPanel__RXDzY .bg-red-50{background-color:#fef2f2}.AccessPanel-module_accessPanel__RXDzY .bg-red-600{background-color:#dc2626}.AccessPanel-module_accessPanel__RXDzY .bg-green-50{background-color:#f0fdf4}.AccessPanel-module_accessPanel__RXDzY .bg-yellow-50{background-color:#fffbeb}.AccessPanel-module_accessPanel__RXDzY .bg-blue-500{background-color:#3b82f6}.AccessPanel-module_accessPanel__RXDzY .bg-purple-500{background-color:#a855f7}.AccessPanel-module_accessPanel__RXDzY .bg-green-600{background-color:#16a34a}.AccessPanel-module_accessPanel__RXDzY .bg-orange-500{background-color:#f97316}.AccessPanel-module_accessPanel__RXDzY .bg-pink-500{background-color:#ec4899}.AccessPanel-module_accessPanel__RXDzY .bg-teal-500{background-color:#14b8a6}.AccessPanel-module_accessPanel__RXDzY .bg-indigo-500{background-color:#6366f1}.AccessPanel-module_accessPanel__RXDzY .bg-rose-500{background-color:#f43f5e}.AccessPanel-module_accessPanel__RXDzY .p-0{padding:0}.AccessPanel-module_accessPanel__RXDzY .p-0\\.5{padding:2px}.AccessPanel-module_accessPanel__RXDzY .p-1{padding:4px}.AccessPanel-module_accessPanel__RXDzY .p-1\\.5{padding:6px}.AccessPanel-module_accessPanel__RXDzY .p-2{padding:8px}.AccessPanel-module_accessPanel__RXDzY .p-2\\.5{padding:10px}.AccessPanel-module_accessPanel__RXDzY .p-3{padding:12px}.AccessPanel-module_accessPanel__RXDzY .p-4{padding:16px}.AccessPanel-module_accessPanel__RXDzY .p-5{padding:20px}.AccessPanel-module_accessPanel__RXDzY .p-6{padding:24px}.AccessPanel-module_accessPanel__RXDzY .px-1{padding-left:4px;padding-right:4px}.AccessPanel-module_accessPanel__RXDzY .px-2{padding-left:8px;padding-right:8px}.AccessPanel-module_accessPanel__RXDzY .px-2\\.5{padding-left:10px;padding-right:10px}.AccessPanel-module_accessPanel__RXDzY .px-3{padding-left:12px;padding-right:12px}.AccessPanel-module_accessPanel__RXDzY .px-4{padding-left:16px;padding-right:16px}.AccessPanel-module_accessPanel__RXDzY .px-5{padding-left:20px;padding-right:20px}.AccessPanel-module_accessPanel__RXDzY .px-6{padding-left:24px;padding-right:24px}.AccessPanel-module_accessPanel__RXDzY .py-0\\.5{padding-bottom:2px;padding-top:2px}.AccessPanel-module_accessPanel__RXDzY .py-1{padding-bottom:4px;padding-top:4px}.AccessPanel-module_accessPanel__RXDzY .py-1\\.5{padding-bottom:6px;padding-top:6px}.AccessPanel-module_accessPanel__RXDzY .py-2{padding-bottom:8px;padding-top:8px}.AccessPanel-module_accessPanel__RXDzY .py-2\\.5{padding-bottom:10px;padding-top:10px}.AccessPanel-module_accessPanel__RXDzY .py-3{padding-bottom:12px;padding-top:12px}.AccessPanel-module_accessPanel__RXDzY .py-4{padding-bottom:16px;padding-top:16px}.AccessPanel-module_accessPanel__RXDzY .py-5{padding-bottom:20px;padding-top:20px}.AccessPanel-module_accessPanel__RXDzY .py-6{padding-bottom:24px;padding-top:24px}.AccessPanel-module_accessPanel__RXDzY .py-8{padding-bottom:32px;padding-top:32px}.AccessPanel-module_accessPanel__RXDzY .pt-0{padding-top:0}.AccessPanel-module_accessPanel__RXDzY .pt-1{padding-top:4px}.AccessPanel-module_accessPanel__RXDzY .pt-2{padding-top:8px}.AccessPanel-module_accessPanel__RXDzY .pt-3{padding-top:12px}.AccessPanel-module_accessPanel__RXDzY .pt-4{padding-top:16px}.AccessPanel-module_accessPanel__RXDzY .pb-0{padding-bottom:0}.AccessPanel-module_accessPanel__RXDzY .pb-1{padding-bottom:4px}.AccessPanel-module_accessPanel__RXDzY .pb-2{padding-bottom:8px}.AccessPanel-module_accessPanel__RXDzY .pb-3{padding-bottom:12px}.AccessPanel-module_accessPanel__RXDzY .pb-4{padding-bottom:16px}.AccessPanel-module_accessPanel__RXDzY .pl-0{padding-left:0}.AccessPanel-module_accessPanel__RXDzY .pl-2{padding-left:8px}.AccessPanel-module_accessPanel__RXDzY .pl-3{padding-left:12px}.AccessPanel-module_accessPanel__RXDzY .pl-4{padding-left:16px}.AccessPanel-module_accessPanel__RXDzY .pl-9{padding-left:36px}.AccessPanel-module_accessPanel__RXDzY .pr-0{padding-right:0}.AccessPanel-module_accessPanel__RXDzY .pr-2{padding-right:8px}.AccessPanel-module_accessPanel__RXDzY .pr-3{padding-right:12px}.AccessPanel-module_accessPanel__RXDzY .pr-4{padding-right:16px}.AccessPanel-module_accessPanel__RXDzY .pr-6{padding-right:24px}.AccessPanel-module_accessPanel__RXDzY .pr-8{padding-right:32px}.AccessPanel-module_accessPanel__RXDzY .pr-10{padding-right:40px}.AccessPanel-module_accessPanel__RXDzY .m-0{margin:0}.AccessPanel-module_accessPanel__RXDzY .m-1{margin:4px}.AccessPanel-module_accessPanel__RXDzY .m-2{margin:8px}.AccessPanel-module_accessPanel__RXDzY .m-auto{margin:auto}.AccessPanel-module_accessPanel__RXDzY .mx-auto{margin-left:auto;margin-right:auto}.AccessPanel-module_accessPanel__RXDzY .ml-auto{margin-left:auto}.AccessPanel-module_accessPanel__RXDzY .mr-auto{margin-right:auto}.AccessPanel-module_accessPanel__RXDzY .mt-0{margin-top:0}.AccessPanel-module_accessPanel__RXDzY .mt-1{margin-top:4px}.AccessPanel-module_accessPanel__RXDzY .mt-2{margin-top:8px}.AccessPanel-module_accessPanel__RXDzY .mt-3{margin-top:12px}.AccessPanel-module_accessPanel__RXDzY .mt-4{margin-top:16px}.AccessPanel-module_accessPanel__RXDzY .mt-6{margin-top:24px}.AccessPanel-module_accessPanel__RXDzY .mb-0{margin-bottom:0}.AccessPanel-module_accessPanel__RXDzY .mb-1{margin-bottom:4px}.AccessPanel-module_accessPanel__RXDzY .mb-2{margin-bottom:8px}.AccessPanel-module_accessPanel__RXDzY .mb-3{margin-bottom:12px}.AccessPanel-module_accessPanel__RXDzY .mb-4{margin-bottom:16px}.AccessPanel-module_accessPanel__RXDzY .ml-0{margin-left:0}.AccessPanel-module_accessPanel__RXDzY .ml-1{margin-left:4px}.AccessPanel-module_accessPanel__RXDzY .ml-2{margin-left:8px}.AccessPanel-module_accessPanel__RXDzY .ml-3{margin-left:12px}.AccessPanel-module_accessPanel__RXDzY .mr-0{margin-right:0}.AccessPanel-module_accessPanel__RXDzY .mr-1{margin-right:4px}.AccessPanel-module_accessPanel__RXDzY .mr-2{margin-right:8px}.AccessPanel-module_accessPanel__RXDzY .-mt-px{margin-top:-1px}.AccessPanel-module_accessPanel__RXDzY .shadow-none{box-shadow:none}.AccessPanel-module_accessPanel__RXDzY .shadow-sm{box-shadow:0 1px 2px #1018280f}.AccessPanel-module_accessPanel__RXDzY .shadow{box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.AccessPanel-module_accessPanel__RXDzY .shadow-md{box-shadow:0 4px 8px #10182814,0 2px 4px #1018280a}.AccessPanel-module_accessPanel__RXDzY .shadow-lg{box-shadow:0 12px 24px #1018281f}.AccessPanel-module_accessPanel__RXDzY .shadow-xl{box-shadow:0 20px 40px #10182829}.AccessPanel-module_accessPanel__RXDzY :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea,select){background-color:var(--appsec-bg);border:1px solid var(--appsec-border);border-radius:8px;color:var(--appsec-text);height:36px;outline:none;padding:0 12px;transition:border-color .12s,box-shadow .12s;width:100%}.AccessPanel-module_accessPanel__RXDzY :where(textarea){height:auto;padding:8px 12px;resize:vertical}.AccessPanel-module_accessPanel__RXDzY :where(input[type=text]:focus,input[type=email]:focus,input[type=search]:focus,input[type=password]:focus,textarea:focus,select:focus){border-color:var(--appsec-primary);box-shadow:0 0 0 3px var(--appsec-primary-light)}.AccessPanel-module_accessPanel__RXDzY :where(input::placeholder,textarea::placeholder){color:var(--appsec-text-tertiary)}.AccessPanel-module_accessPanel__RXDzY :where(input[type=checkbox]){accent-color:var(--appsec-primary);height:16px;width:16px}.AccessPanel-module_accessPanel__RXDzY .appearance-none{appearance:none}.AccessPanel-module_accessPanel__RXDzY .outline-none{outline:0}.AccessPanel-module_accessPanel__RXDzY .focus\\:border-appsec-primary:focus{border-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .focus\\:ring-2:focus{box-shadow:0 0 0 3px var(--appsec-primary-light)}.AccessPanel-module_accessPanel__RXDzY .focus\\:outline-none:focus{outline:0}.AccessPanel-module_accessPanel__RXDzY button:hover:not(:disabled){opacity:.92}.AccessPanel-module_accessPanel__RXDzY .disabled\\:opacity-30:disabled,.AccessPanel-module_accessPanel__RXDzY button:disabled{opacity:.3}.AccessPanel-module_accessPanel__RXDzY .disabled\\:opacity-50:disabled{opacity:.5}.AccessPanel-module_accessPanel__RXDzY .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.AccessPanel-module_accessPanel__RXDzY .cursor-pointer{cursor:pointer}.AccessPanel-module_accessPanel__RXDzY .cursor-not-allowed{cursor:not-allowed}.AccessPanel-module_accessPanel__RXDzY .cursor-default{cursor:default}.AccessPanel-module_accessPanel__RXDzY .select-none{user-select:none}.AccessPanel-module_accessPanel__RXDzY .select-text{user-select:text}.AccessPanel-module_accessPanel__RXDzY .opacity-0{opacity:0}.AccessPanel-module_accessPanel__RXDzY .opacity-30{opacity:.3}.AccessPanel-module_accessPanel__RXDzY .opacity-50{opacity:.5}.AccessPanel-module_accessPanel__RXDzY .opacity-75{opacity:.75}.AccessPanel-module_accessPanel__RXDzY .opacity-100{opacity:1}.AccessPanel-module_accessPanel__RXDzY .transition-all{transition:all .15s ease}.AccessPanel-module_accessPanel__RXDzY .transition-colors{transition:color .15s ease,background-color .15s ease,border-color .15s ease}.AccessPanel-module_accessPanel__RXDzY .transition-opacity{transition:opacity .15s ease}.AccessPanel-module_accessPanel__RXDzY .transition-transform{transition:transform .15s ease}.AccessPanel-module_accessPanel__RXDzY .duration-150{transition-duration:.15s}.AccessPanel-module_accessPanel__RXDzY .duration-200{transition-duration:.2s}.AccessPanel-module_accessPanel__RXDzY .duration-300{transition-duration:.3s}.AccessPanel-module_accessPanel__RXDzY .ease-in-out{transition-timing-function:ease-in-out}.AccessPanel-module_accessPanel__RXDzY .rotate-90{transform:rotate(90deg)}.AccessPanel-module_accessPanel__RXDzY .rotate-180{transform:rotate(180deg)}.AccessPanel-module_accessPanel__RXDzY .-rotate-90{transform:rotate(-90deg)}.AccessPanel-module_accessPanel__RXDzY .scale-95{transform:scale(.95)}.AccessPanel-module_accessPanel__RXDzY .scale-100{transform:scale(1)}.AccessPanel-module_accessPanel__RXDzY .list-none{list-style:none}.AccessPanel-module_accessPanel__RXDzY .list-disc{list-style:disc}.AccessPanel-module_accessPanel__RXDzY .object-cover{object-fit:cover}.AccessPanel-module_accessPanel__RXDzY .object-contain{object-fit:contain}.AccessPanel-module_accessPanel__RXDzY .sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-appsec-surface:hover{background-color:var(--appsec-surface)}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-appsec-surface-alt:hover{background-color:var(--appsec-surface-alt)}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-appsec-danger-light:hover{background-color:var(--appsec-danger-light)}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-gray-50:hover{background-color:#f9fafb}.AccessPanel-module_accessPanel__RXDzY .hover\\:bg-gray-100:hover{background-color:#f2f4f7}.AccessPanel-module_accessPanel__RXDzY .hover\\:text-appsec-text:hover{color:var(--appsec-text)}.AccessPanel-module_accessPanel__RXDzY .hover\\:text-appsec-danger:hover{color:var(--appsec-danger)}.AccessPanel-module_accessPanel__RXDzY .hover\\:text-appsec-primary:hover{color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .hover\\:border-appsec-primary:hover{border-color:var(--appsec-primary)}.AccessPanel-module_accessPanel__RXDzY .hover\\:underline:hover{text-decoration:underline}.AccessPanel-module_accessPanel__RXDzY .hover\\:opacity-80:hover{opacity:.8}.AccessPanel-module_accessPanel__RXDzY .hover\\:shadow-md:hover{box-shadow:0 4px 8px #10182814,0 2px 4px #1018280a}.AccessPanel-module_accessPanel__RXDzY .group:hover .group-hover\\:opacity-100{opacity:1}.AccessPanel-module_accessPanel__RXDzY .group-hover\\:opacity-100{opacity:0;transition:opacity .15s}"),exports.default={accessPanel:"AccessPanel-module_accessPanel__RXDzY",emptyState:"AccessPanel-module_emptyState__EAuao"};
|
|
2
2
|
//# sourceMappingURL=AccessPanel.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),r=require("@tanstack/react-query"),t=require("lucide-react"),o=require("primereact/toast"),s=require("uuid"),a=require("../components/StationOnboarding/StationAutocomplete.js"),l=require("./AddScopeApprovalSearchComponent.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),r=require("@tanstack/react-query"),t=require("lucide-react"),o=require("primereact/toast"),s=require("uuid"),a=require("../components/StationOnboarding/StationAutocomplete.js"),l=require("./AddScopeApprovalSearchComponent.js"),u=require("../components/ScopeSkeletonLoader.js"),d=require("@mui/material"),c=require("../store/useAuthStore.js"),p=require("../store/useAppSecRolesStore.js"),g=require("../store/useEnvStore.js"),_=require("../apis/scopeApis.js"),f=require("../store/useLearningTemplateStore.js"),h=require("../config.js");exports.default=function(m){var v=m.isOpen,x=m.onClose,y=m.onCreate,S=m.hasGlobalRuleSet,b=n.useState(""),j=b[0],C=b[1],q=n.useState(""),w=q[0],A=q[1],k=n.useState({}),R=k[0],I=k[1],D=n.useRef(null),F=c.default().user,L=p.useAppSecRolesStore(function(e){return e.roles}),z=g.default(function(e){return e.rbacConfig}),E=n.useState(null),N=E[0],B=E[1],T=n.useState("approval_required"),W=T[0],O=T[1],G=n.useState([]),P=G[0],M=G[1],K=n.useState([]),U=K[0],X=K[1],H=n.useState(""),J=H[0],Q=H[1],V=r.useMutation({mutationFn:function(i){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:return[4,_.createRuleSet(i,null!==(n=null==F?void 0:F.accessToken)&&void 0!==n?n:"")];case 1:return[2,e.sent()]}})})},onSuccess:function(i){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){return console.log("Rule Set Created Successfully",i),[2]})})}}),Y=V.data,Z=V.isPending,$=V.mutateAsync;return n.useEffect(function(){v&&(C(""),A(""),I({}),B(null),O("approval_required"),M([]),X([]),Q(""))},[v]),v?Z?i.jsx(u.default,{isLoading:Z}):i.jsxs("div",e.__assign({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[i.jsx(o.Toast,{ref:D}),i.jsxs("div",e.__assign({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[i.jsxs("div",e.__assign({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[i.jsxs("div",{children:[i.jsx("h2",e.__assign({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:"Add Scope"})),i.jsx("p",e.__assign({style:{margin:"4px 0 0 0",fontSize:14,fontWeight:400,color:"#666F8D"}},{children:"This scope will be created under Global and will inherit its Learnings by default."}))]}),i.jsx("button",e.__assign({onClick:x,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:i.jsx(t.X,{size:24})}))]})),i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:20}},{children:[i.jsxs("div",e.__assign({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[i.jsxs("label",e.__assign({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[i.jsx("span",e.__assign({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),"Scope Name"]})),"Custom"===j?i.jsx(a.default,{value:w,onChange:function(i){if(i.length>50)return A(i.slice(0,50)),void I(function(i){return e.__assign(e.__assign({},i),{name:"Scope Name must be 50 characters or fewer"})});A(i),I(function(i){return e.__assign(e.__assign({},i),{name:void 0})})},onStationSelect:function(e){B(e)},style:{border:R.name?"1px solid #8F2C23":void 0}}):i.jsx(d.Input,{value:w,onChange:function(i){var n=i.target.value;if(n.length>50)return A(n.slice(0,50)),void I(function(i){return e.__assign(e.__assign({},i),{name:"Scope Name must be 50 characters or fewer"})});A(n),I(function(i){return e.__assign(e.__assign({},i),{name:void 0})})},style:{border:"1px solid ".concat(R.name?"#8F2C23":"#F0F2F5")},placeholder:"e.g. Global Learnings"}),R.name&&i.jsx("p",e.__assign({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:R.name}))]})),i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:12}},{children:[i.jsxs("label",e.__assign({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[i.jsx("span",e.__assign({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),"Learning Approval Settings"]})),i.jsxs("div",e.__assign({role:"radio","aria-checked":"approval_required"===W,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return O("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||O("approval_required")}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:8}},{children:[i.jsx("div",e.__assign({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===W?"#2563EB":"#CBD5E1")}},{children:"approval_required"===W&&i.jsx("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),i.jsx("span",e.__assign({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:"Approval Required Before Publishing"}))]})),i.jsx("p",e.__assign({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:"Learnings require approval before publishing."}))]})),"approval_required"===W&&i.jsx(l.default,{selectedApprovers:P,selectedGroupOfApprovers:U,onApproversChange:M,onGroupsChange:X}),J&&i.jsx("p",e.__assign({style:{margin:0,marginLeft:24,fontSize:12,color:"#8F2C23"}},{children:J})),i.jsxs("div",e.__assign({role:"radio","aria-checked":"publish_without"===W,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){O("publish_without"),Q("")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(O("publish_without"),Q(""))}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:8}},{children:[i.jsx("div",e.__assign({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===W?"#2563EB":"#CBD5E1")}},{children:"publish_without"===W&&i.jsx("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),i.jsx("span",e.__assign({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:"Publish Without Approval"}))]})),i.jsx("p",e.__assign({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:"Learnings can be published directly."}))]}))]})),i.jsxs("div",e.__assign({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[i.jsx("button",e.__assign({onClick:x,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:Z?.5:1},disabled:Z},{children:"Cancel"})),i.jsx("button",e.__assign({onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var i,n,r,t,o,a,l,u,d,c,p,g;return e.__generator(this,function(_){if(i={},w.trim()?w.length>50&&(i.name="Scope Name must be 50 characters or fewer"):i.name="Scope Name is required","approval_required"===W&&0===P.length&&0===U.length&&Q("Please select at least one approver or approver group."),i.name)return I(i),[2];if("approval_required"===W&&0===P.length&&0===U.length)return[2];Q("");try{n="approval_required"===W,r=f.useLearningTemplateStore.getState().backwardCompatibility,t=r?{topic:S?"genreRuleSet":"globalRuleSet",customScopeGroupName:h.IL_CONFIG_CONSTANTS.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:w,parentScopeId:null,customScopeName:w,customScopeId:s.v4(),createByName:(null==F?void 0:F.firstname)||"System",createdBy:(null==F?void 0:F.email)||"system@audacy.com",approvalRequired:n,appsecData:{application:null==z?void 0:z.applicationId,module:null==z?void 0:z.moduleId,roles:e.__spreadArray(e.__spreadArray([],n?[{users:P.map(function(e){return e.email}),groups:U.map(function(e){return e._id}),role:null!==(a=null===(o=L.find(function(e){return"Learning Manager"===e.name}))||void 0===o?void 0:o._id)&&void 0!==a?a:""}]:[],!0),[{users:[null==F?void 0:F.email],groups:[],role:null!==(u=null===(l=L.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===l?void 0:l._id)&&void 0!==u?u:""}],!1)}}:{topic:S?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:w,parentScopeId:null,scopeName:w,scopeReferenceMetadata:{},applicationMappingId:f.useLearningTemplateStore.getState().app_integration_id},console.log("Add Scope payload:",t),$(t),y(null===(d=null==Y?void 0:Y.data)||void 0===d?void 0:d.scopeId),x()}catch(e){console.error("An error occurred during scope creation.",e),null===(c=D.current)||void 0===c||c.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(g=null===(p=null==e?void 0:e.response)||void 0===p?void 0:p.data)||void 0===g?void 0:g.message)||"There was an error creating the scope. Please try again."})}return[2]})})},style:{display:"flex",alignItems:"center",borderRadius:6,backgroundColor:"#2563EB",padding:"8px 16px",fontSize:14,fontWeight:500,color:"white",border:"none",cursor:"pointer",opacity:Z||"Custom"===j&&!N?.5:1},disabled:Z||"Custom"===j&&!N},{children:Z?i.jsxs(i.Fragment,{children:[i.jsx(t.Loader2,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):"Create Scope"}))]}))]}))]}))]})):null};
|
|
2
2
|
//# sourceMappingURL=AddScopeModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react"),i=require("@mui/material"),t=require("@mui/icons-material/Check"),r=require("@mui/icons-material/CloseRounded"),s=require("lucide-react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(t),c=a(r),d={header:{padding:"16px 16px 0",display:"flex",justifyContent:"space-between",alignItems:"center"},title:{color:"#334155",fontSize:"1rem"},closeButton:{border:"none",background:"transparent",padding:0,color:"#9CA3AF",cursor:"pointer",outline:"none",transition:"color 150ms ease-in-out"},dialogContent:{padding:"8px 16px"},description:{color:"#475569",fontSize:"0.875rem",lineHeight:1.625},descriptionStrong:{fontWeight:700,color:"#1E293B"},secondaryDescription:{color:"#475569",fontSize:"0.875rem",marginTop:"8px"},rejectSection:{marginTop:"20px"},feedbackLabel:{display:"block",fontSize:"0.875rem",fontWeight:600,color:"#334155",marginBottom:"6px"},textarea:{width:"100%",fontSize:"0.875rem",color:"#1E293B",padding:"10px",border:"1px solid #E2E8F0",borderRadius:"0.5rem",outline:"none",resize:"none",transition:"border-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box",fontFamily:"inherit"},checkboxLabel:{display:"flex",justifyContent:"flex-end",gap:"12px",cursor:"pointer",userSelect:"none",marginTop:"16px"},checkbox:{marginTop:"4px",height:"1rem",width:"1rem",borderRadius:"0.25rem",border:"1px solid #CBD5E1",accentColor:"#DC2626",cursor:"pointer"},checkboxTextWrap:{display:"flex",flexDirection:"column"},checkboxText:{fontSize:"0.875rem",fontWeight:500,color:"#1E293B",transition:"color 150ms ease-in-out"},actions:{padding:"24px",gap:"8px"},secondaryButton:{padding:"8px 20px",fontSize:"0.875rem",fontWeight:500,color:"#475569",border:"1px solid #E2E8F0",borderRadius:"0.5rem",backgroundColor:"#FFFFFF",transition:"background-color 150ms ease-in-out, border-color 150ms ease-in-out",cursor:"pointer"},primaryButton:{display:"inline-flex",alignItems:"center",gap:"0.375rem",padding:"8px 20px",fontSize:"0.875rem",fontWeight:500,color:"#FFFFFF",border:"none",borderRadius:"0.5rem",transition:"background-color 150ms ease-in-out",boxShadow:"none",cursor:"pointer"},actionIcon:{width:"1rem",height:"1rem",fontSize:"1rem"},variantCard:{backgroundColor:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:"10px",padding:"16px 20px",marginTop:"12px"},variantCardTitle:{fontSize:"0.9375rem",fontWeight:700,color:"#111111",marginBottom:"4px"},variantCardDescription:{fontSize:"0.8125rem",color:"#374151",marginBottom:"12px",lineHeight:1.5},variantCardMono:{fontSize:"0.75rem",color:"#4b5563",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",lineHeight:1.6}};exports.default=function(t){var r=t.open,a=t.mode,u=t.onClose,p=t.onSubmit,g=t.variantInformation,x=t.ruleTitle,b=t.pendingVariants,h=void 0===b?[]:b,f=t.isPending,m=void 0!==f&&f,_=o.useState(""),y=_[0],j=_[1],C=o.useState(!1),v=C[0],k=C[1],F=o.useState(!1),S=F[0],E=F[1],w=o.useState(!1),T=w[0],A=w[1],B=o.useState(!1),M=B[0],z=B[1],D=o.useState(!1),L=D[0],W=D[1],R=o.useState(!1),I=R[0],q=R[1],H="undefined"!=typeof document?document.getElementById("rule-template-layout-content"):null,N="reject"===a,P=function(){p(N?{feedback:y,deleteLearning:v}:{}),j(""),k(!1)},V=function(){j(""),k(!1),u()};return n.jsxs(i.Dialog,e.__assign({open:r,onClose:V,container:H,maxWidth:!1,fullWidth:!0,sx:{position:"absolute",inset:0,zIndex:999,"& .MuiBackdrop-root":{position:"absolute"},"& .MuiDialog-container":{alignItems:"center",justifyContent:"center",padding:"24px 16px"},"& .MuiDialog-paper":{width:"100%",maxWidth:"640px",margin:0,borderRadius:"16px"}}},{children:[n.jsxs("div",e.__assign({style:d.header},{children:[n.jsx("div",e.__assign({style:d.title},{children:N?"Reject Learning":"Approve Learning"})),n.jsx("button",e.__assign({onClick:u,onMouseEnter:function(){return E(!0)},onMouseLeave:function(){return E(!1)},style:e.__assign(e.__assign({},d.closeButton),{color:S?"#4B5563":"#9CA3AF"})},{children:n.jsx(s.X,{size:24})}))]})),n.jsxs(i.DialogContent,e.__assign({sx:d.dialogContent},{children:[n.jsxs(i.DialogContentText,e.__assign({sx:d.description},{children:[n.jsx("span",e.__assign({style:d.descriptionStrong},{children:g}))," ",N?"will not be published or applied within the selected scope. You can provide feedback before rejecting.":"will be published and become active within the selected scope after approval."]})),h.length>0&&n.jsx("div",{children:h.map(function(o,i){return n.jsxs("div",e.__assign({style:d.variantCard},{children:[n.jsxs("div",e.__assign({style:d.variantCardTitle},{children:[x,h.length>1?" — Variant ".concat(i+1):""]})),o.description&&n.jsx("div",e.__assign({style:d.variantCardDescription},{children:o.description})),n.jsxs("div",e.__assign({style:d.variantCardMono},{children:[o.whenToApply&&n.jsxs("div",{children:["WTA — ",o.whenToApply]}),o.whenNotToApply&&n.jsxs("div",{children:["WNTA — ",o.whenNotToApply]})]}))]}),o.variantId)})}),n.jsx(i.DialogContentText,e.__assign({sx:d.secondaryDescription},{children:N?"":"Take a moment to check the configuration before moving forward."})),N&&n.jsxs("div",e.__assign({style:d.rejectSection},{children:[n.jsxs("div",{children:[n.jsx("label",e.__assign({htmlFor:"feedback",style:d.feedbackLabel},{children:"Feedback"})),n.jsx("textarea",{id:"feedback",rows:4,value:y,onChange:function(e){return j(e.target.value)},onFocus:function(){return A(!0)},onBlur:function(){return A(!1)},placeholder:"Add feedback or reason for rejection",style:e.__assign(e.__assign({},d.textarea),{borderColor:T?"#EF4444":"#E2E8F0",boxShadow:T?"0 0 0 2px rgba(239, 68, 68, 0.2)":"none"})})]}),n.jsxs("label",e.__assign({style:d.checkboxLabel,onMouseEnter:function(){return z(!0)},onMouseLeave:function(){return z(!1)}},{children:[n.jsx("input",{type:"checkbox",checked:!0,disabled:!0,onChange:function(e){return k(e.target.checked)},style:d.checkbox}),n.jsx("div",e.__assign({style:d.checkboxTextWrap},{children:n.jsx("span",e.__assign({style:e.__assign(e.__assign({},d.checkboxText),{color:M?"#0F172A":"#1E293B"})},{children:"Also delete this learning"}))}))]}))]}))]})),n.jsxs(i.DialogActions,e.__assign({sx:d.actions},{children:[n.jsx("button",e.__assign({onClick:V,type:"button",disabled:m,onMouseEnter:function(){return W(!0)},onMouseLeave:function(){return W(!1)},style:e.__assign(e.__assign({},d.secondaryButton),{backgroundColor:L&&!m?"#F8FAFC":"#FFFFFF",borderColor:L&&!m?"#CBD5E1":"#E2E8F0",opacity:m?.5:1,cursor:m?"not-allowed":"pointer"})},{children:"Cancel"})),N?n.jsxs("button",e.__assign({onClick:P,type:"button",disabled:m,onMouseEnter:function(){return q(!0)},onMouseLeave:function(){return q(!1)},style:e.__assign(e.__assign({},d.primaryButton),{backgroundColor:m?"#EF4444":I?"#DC2626":"#EF4444",opacity:m?.7:1,cursor:m?"not-allowed":"pointer"})},{children:[m?n.jsx(s.Loader2,{size:16,style:{animation:"spin 1s linear infinite"}}):n.jsx(c.default,{sx:d.actionIcon}),m?"Rejecting…":"Reject Learning"]})):n.jsxs("button",e.__assign({onClick:P,type:"button",disabled:m,onMouseEnter:function(){return q(!0)},onMouseLeave:function(){return q(!1)},style:e.__assign(e.__assign({},d.primaryButton),{backgroundColor:m?"#22C55E":I?"#16A34A":"#22C55E",opacity:m?.7:1,cursor:m?"not-allowed":"pointer"})},{children:[m?n.jsx(s.Loader2,{size:16,style:{animation:"spin 1s linear infinite"}}):n.jsx(l.default,{sx:d.actionIcon}),m?"Approving…":"Approve Learning"]}))]})),n.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}))};
|
|
2
2
|
//# sourceMappingURL=ApprovalLearningDialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("../store/useLearningTemplateStore.js"),i=require("../utils/treeUtils.js"),o=require("./RuleHeader.js"),l=require("../components/EmptyLearningState.js"),u=require("./RuleTierList.js"),a=require("../apis/scopeApis.js");exports.default=function(s){var d,c=s.onAddRule,p=s.onDeleteRule,f=s.onEditRule,g=s.onEditVariant,m=s.onDeleteVariant,v=s.onExportRule,S=s.isExporting,h=s.emptyStateTitle,R=void 0===h?"No learnings have been added !":h,T=s.emptyStateDesc,x=void 0===T?"Start by adding learnings that should apply across all stations.":T,y=s.emptyStateButtonText,j=void 0===y?"Create New Learning":y,E=s.onToggleSuccess,D=s.onReorderRules,b=s.onRefreshRuleSets,L=s.setDeleteConfirmationUsedFor,N=s.onCopyToTier,q=n.useLearningTemplateStore(function(e){return e.currentRules}),C=n.useLearningTemplateStore(function(e){return e.toggleRuleTier}),_=n.useLearningTemplateStore(function(e){return e.scopeTreeData}),F=n.useLearningTemplateStore(function(e){return e.selectedRuleSetId}),I=n.useLearningTemplateStore(function(e){return e.createdVariantInfo}),V=r.useMemo(function(){if(I){var e=new Map;return I.forEach(function(t){t.variants.forEach(function(t){return e.set(t.id,t.action)})}),e}},[I]),w=r.useMemo(function(){if(I&&q){var e={tier1:"1",tier2:"2",tier_1:"1",tier_2:"2"},t={};return q.forEach(function(e){t[e.id]=e.name}),I.map(function(r){return t[e[r.tierName]]}).filter(Boolean)}},[I,q]),A=F?i.findNodeById((null==_?void 0:_.data)||null,F):null,G="GLOBAL"===(null==A?void 0:A.type)||"Global"===(null==A?void 0:A.name),B=A?{ruleSetId:A.id,ruleSetName:A.name,ruleSetDesc:"",ruleCount:null===(d=null==A?void 0:A.metrics)||void 0===d?void 0:d.learningsCount}:void 0,M=r.useCallback(function(t,r){return e.__awaiter(void 0,void 0,void 0,function(){var t,n;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a.getRuleOverrideHistory(r||"")];case 1:return(t=e.sent())&&t.data?[2,t.data]:[2,null];case 2:throw n=e.sent(),console.error("Failed to fetch override history",n),n;case 3:return[2]}})})},[]);return q&&0!==(null==q?void 0:q.length)?t.jsxs(t.Fragment,{children:[t.jsx(o.default,{onAddRule:c,onExport:v,isExporting:S,ruleSetName:null==B?void 0:B.ruleSetName,ruleSetDescription:null==B?void 0:B.ruleSetDesc,isGlobal:G}),t.jsx(u.default,{tiers:q,ruleSetId:(null==B?void 0:B.ruleSetId)||"",onToggleTier:C,onDeleteRule:p,isGlobalScope:G,onFetchOverrideHistory:M,onEditRule:f,onEditVariant:g,onDeleteVariant:m,highlightedVariants:V,highlightedTierNames:w,onToggleSuccess:E,onReorderRules:D,onRefreshRuleSets:b,setDeleteConfirmationUsedFor:L,onCopyToTier:N})]}):t.jsxs(t.Fragment,{children:[t.jsx(o.default,{onAddRule:c,onExport:v,isExporting:S,ruleSetName:null==B?void 0:B.ruleSetName,ruleSetDescription:null==B?void 0:B.ruleSetDesc,isGlobal:G}),t.jsx(l.default,{onCreate:c,title:R,desc:x,button:j})]})};
|
|
2
2
|
//# sourceMappingURL=ContentLogic.js.map
|