@e-llm-studio/instant-learning 1.3.0-alpha.15 → 1.3.0-alpha.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +725 -8
- package/dist/ComponentRegistry.js +2 -0
- package/dist/ComponentRegistry.js.map +1 -0
- package/dist/ILMarketplaceWrapper.js +2 -0
- package/dist/ILMarketplaceWrapper.js.map +1 -0
- package/dist/ILMarketplaceWrapper.module.css.js +2 -0
- package/dist/ILMarketplaceWrapper.module.css.js.map +1 -0
- package/dist/cjs/ComponentRegistry.js +2 -0
- package/dist/cjs/ComponentRegistry.js.map +1 -0
- package/dist/cjs/ILMarketplaceWrapper.js +2 -0
- package/dist/cjs/ILMarketplaceWrapper.js.map +1 -0
- package/dist/cjs/ILMarketplaceWrapper.module.css.js +2 -0
- package/dist/cjs/ILMarketplaceWrapper.module.css.js.map +1 -0
- 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/TeachMePlugin.js +1 -1
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ConflictingReasoningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ViewFormUpdateCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCart.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCart.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCart.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCart.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.module.css.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.module.css.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineTooltip.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineTooltip.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/constants.js +2 -0
- package/dist/cjs/features/IL-marketplace/constants.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/hooks/useControllableState.js +2 -0
- package/dist/cjs/features/IL-marketplace/hooks/useControllableState.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/hooks/useGuidelineSelection.js +2 -0
- package/dist/cjs/features/IL-marketplace/hooks/useGuidelineSelection.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/icons/GuidelineSpinner.js +2 -0
- package/dist/cjs/features/IL-marketplace/icons/GuidelineSpinner.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/queryClient.js +2 -0
- package/dist/cjs/features/IL-marketplace/queryClient.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/services/IL-marketplace.api.js +2 -0
- package/dist/cjs/features/IL-marketplace/services/IL-marketplace.api.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.cart.api.js +2 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.cart.api.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.core.api.js +2 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.core.api.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.runtime.config.js +2 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.runtime.config.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.session.js +2 -0
- package/dist/cjs/features/IL-marketplace/services/guideline.session.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/services/instant-learning.api.js +2 -0
- package/dist/cjs/features/IL-marketplace/services/instant-learning.api.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/utils/guidelineFiles.js +2 -0
- package/dist/cjs/features/IL-marketplace/utils/guidelineFiles.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/utils/guidelineOverlay.js +2 -0
- package/dist/cjs/features/IL-marketplace/utils/guidelineOverlay.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/utils/microfrontend.js +2 -0
- package/dist/cjs/features/IL-marketplace/utils/microfrontend.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/utils/session.js +2 -0
- package/dist/cjs/features/IL-marketplace/utils/session.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/utils.js +2 -0
- package/dist/cjs/features/IL-marketplace/utils.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/workspace/useGuidelineWorkspace.js +2 -0
- package/dist/cjs/features/IL-marketplace/workspace/useGuidelineWorkspace.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/workspace/workspace.context.js +2 -0
- package/dist/cjs/features/IL-marketplace/workspace/workspace.context.js.map +1 -0
- package/dist/cjs/features/IL-marketplace/workspace/workspace.runtime.js +2 -0
- package/dist/cjs/features/IL-marketplace/workspace/workspace.runtime.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.styles.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.styles.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.styles.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.styles.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/api.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/api.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/endpoints.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/endpoints.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +1 -0
- package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagementTest.js +2 -0
- package/dist/cjs/features/LearningManagement/LearningManagementTest.js.map +1 -0
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.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/InstructionPromptBlock.js +2 -0
- package/dist/cjs/features/LearningManagement/RuleContent/InstructionPromptBlock.js.map +1 -0
- package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionHeader.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/RuleTierList.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/Sidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/StationsContent/StationsContent.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/ConfirmationModal.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/PromptTextEditor.js +2 -0
- package/dist/cjs/features/LearningManagement/components/PromptTextEditor.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeMenu.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
- package/dist/cjs/features/LearningManagement/config.js +1 -1
- package/dist/cjs/features/LearningManagement/constants.js +2 -0
- package/dist/cjs/features/LearningManagement/constants.js.map +1 -0
- package/dist/cjs/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js +2 -0
- package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js.map +1 -0
- package/dist/cjs/features/LearningManagement/store/useEnvStore.js +1 -1
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js +2 -0
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js.map +1 -0
- 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/PromptTextEditor.module.css.js +2 -0
- package/dist/cjs/features/LearningManagement/styles/PromptTextEditor.module.css.js.map +1 -0
- package/dist/cjs/features/LearningManagement/styles/RuleAccordion.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/TierCard.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/utils/learningMetadataUtils.js +2 -0
- package/dist/cjs/features/LearningManagement/utils/learningMetadataUtils.js.map +1 -0
- package/dist/cjs/features/LearningManagement/utils/treeUtils.js +1 -1
- package/dist/cjs/index.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/cjs/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.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/TeachMePlugin.js +1 -1
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/features/IL-OTJ/_components/ConflictingReasoningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.js +1 -1
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
- package/dist/features/IL-OTJ/_components/ViewFormUpdateCard.js +1 -1
- package/dist/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/features/IL-marketplace/components/GuidelineCardMenu.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCardMenu.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCardMenu.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCardMenu.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCart.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCart.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCart.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCart.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCartHeader.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCartHeader.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCartHeader.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCartHeader.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCartItem.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCartItem.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineCartItem.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCartItem.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineEmptyState.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineEmptyState.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineEmptyState.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineEmptyState.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineFilterPanel.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineFilterPanel.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineHeader.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineHeader.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineHeader.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineHeader.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineIconButton.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineIconButton.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineIconButton.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineIconButton.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineLandingPage.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLandingPage.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineLandingPage.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLandingPage.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineLibrary.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLibrary.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineLibrary.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLibrary.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineLibraryCard.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLibraryCard.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineProceedButton.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineProceedButton.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineProceedButton.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineProceedButton.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineSelectButton.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineSelectButton.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineSelectButton.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineSelectButton.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineStatusChip.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineStatusChip.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineStatusChip.module.css.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineStatusChip.module.css.js.map +1 -0
- package/dist/features/IL-marketplace/components/GuidelineTooltip.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineTooltip.js.map +1 -0
- package/dist/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
- package/dist/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -0
- package/dist/features/IL-marketplace/constants.js +2 -0
- package/dist/features/IL-marketplace/constants.js.map +1 -0
- package/dist/features/IL-marketplace/hooks/useControllableState.js +2 -0
- package/dist/features/IL-marketplace/hooks/useControllableState.js.map +1 -0
- package/dist/features/IL-marketplace/hooks/useGuidelineSelection.js +2 -0
- package/dist/features/IL-marketplace/hooks/useGuidelineSelection.js.map +1 -0
- package/dist/features/IL-marketplace/icons/GuidelineSpinner.js +2 -0
- package/dist/features/IL-marketplace/icons/GuidelineSpinner.js.map +1 -0
- package/dist/features/IL-marketplace/queryClient.js +2 -0
- package/dist/features/IL-marketplace/queryClient.js.map +1 -0
- package/dist/features/IL-marketplace/services/IL-marketplace.api.js +2 -0
- package/dist/features/IL-marketplace/services/IL-marketplace.api.js.map +1 -0
- package/dist/features/IL-marketplace/services/guideline.cart.api.js +2 -0
- package/dist/features/IL-marketplace/services/guideline.cart.api.js.map +1 -0
- package/dist/features/IL-marketplace/services/guideline.core.api.js +2 -0
- package/dist/features/IL-marketplace/services/guideline.core.api.js.map +1 -0
- package/dist/features/IL-marketplace/services/guideline.runtime.config.js +2 -0
- package/dist/features/IL-marketplace/services/guideline.runtime.config.js.map +1 -0
- package/dist/features/IL-marketplace/services/guideline.session.js +2 -0
- package/dist/features/IL-marketplace/services/guideline.session.js.map +1 -0
- package/dist/features/IL-marketplace/services/instant-learning.api.js +2 -0
- package/dist/features/IL-marketplace/services/instant-learning.api.js.map +1 -0
- package/dist/features/IL-marketplace/utils/guidelineFiles.js +2 -0
- package/dist/features/IL-marketplace/utils/guidelineFiles.js.map +1 -0
- package/dist/features/IL-marketplace/utils/guidelineOverlay.js +2 -0
- package/dist/features/IL-marketplace/utils/guidelineOverlay.js.map +1 -0
- package/dist/features/IL-marketplace/utils/microfrontend.js +2 -0
- package/dist/features/IL-marketplace/utils/microfrontend.js.map +1 -0
- package/dist/features/IL-marketplace/utils/session.js +2 -0
- package/dist/features/IL-marketplace/utils/session.js.map +1 -0
- package/dist/features/IL-marketplace/utils.js +2 -0
- package/dist/features/IL-marketplace/utils.js.map +1 -0
- package/dist/features/IL-marketplace/workspace/useGuidelineWorkspace.js +2 -0
- package/dist/features/IL-marketplace/workspace/useGuidelineWorkspace.js.map +1 -0
- package/dist/features/IL-marketplace/workspace/workspace.context.js +2 -0
- package/dist/features/IL-marketplace/workspace/workspace.context.js.map +1 -0
- package/dist/features/IL-marketplace/workspace/workspace.runtime.js +2 -0
- package/dist/features/IL-marketplace/workspace/workspace.runtime.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/Cart/Cart.js +2 -0
- package/dist/features/LSCGuidelinesCart/Cart/Cart.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/Cart/Cart.styles.js +2 -0
- package/dist/features/LSCGuidelinesCart/Cart/Cart.styles.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/GuidelineCard.js +2 -0
- package/dist/features/LSCGuidelinesCart/GuidelineCard.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/GuidelineCard.styles.js +2 -0
- package/dist/features/LSCGuidelinesCart/GuidelineCard.styles.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js +2 -0
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +2 -0
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js +2 -0
- package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/api.js +2 -0
- package/dist/features/LSCGuidelinesCart/api.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/endpoints.js +2 -0
- package/dist/features/LSCGuidelinesCart/endpoints.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +2 -0
- package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +1 -0
- package/dist/features/LearningManagement/AuditLog/AuditLog.js +1 -1
- package/dist/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/features/LearningManagement/LearningManagementTest.js +2 -0
- package/dist/features/LearningManagement/LearningManagementTest.js.map +1 -0
- package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessPanel.js +1 -1
- package/dist/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.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/InstructionPromptBlock.js +2 -0
- package/dist/features/LearningManagement/RuleContent/InstructionPromptBlock.js.map +1 -0
- package/dist/features/LearningManagement/RuleContent/RuleAccordionHeader.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/RuleTierList.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/Sidebar.js +1 -1
- package/dist/features/LearningManagement/StationsContent/StationsContent.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/ConfirmationModal.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/PromptTextEditor.js +2 -0
- package/dist/features/LearningManagement/components/PromptTextEditor.js.map +1 -0
- package/dist/features/LearningManagement/components/ScopeTree/TreeMenu.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
- package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
- package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
- package/dist/features/LearningManagement/config.js +1 -1
- package/dist/features/LearningManagement/constants.js +2 -0
- package/dist/features/LearningManagement/constants.js.map +1 -0
- package/dist/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/features/LearningManagement/queries/useLMSConfigQuery.js +2 -0
- package/dist/features/LearningManagement/queries/useLMSConfigQuery.js.map +1 -0
- package/dist/features/LearningManagement/store/useEnvStore.js +1 -1
- package/dist/features/LearningManagement/store/useLMSConfigStore.js +2 -0
- package/dist/features/LearningManagement/store/useLMSConfigStore.js.map +1 -0
- package/dist/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
- package/dist/features/LearningManagement/store/usePermissionsStore.js +1 -1
- package/dist/features/LearningManagement/styles/PromptTextEditor.module.css.js +2 -0
- package/dist/features/LearningManagement/styles/PromptTextEditor.module.css.js.map +1 -0
- package/dist/features/LearningManagement/styles/RuleAccordion.module.css.js +1 -1
- package/dist/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
- package/dist/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
- package/dist/features/LearningManagement/styles/TierCard.module.css.js +1 -1
- package/dist/features/LearningManagement/utils/learningMetadataUtils.js +2 -0
- package/dist/features/LearningManagement/utils/learningMetadataUtils.js.map +1 -0
- package/dist/features/LearningManagement/utils/treeUtils.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js +1 -1
- package/dist/types/src/ComponentRegistry.d.ts +29 -0
- package/dist/types/src/ComponentRegistry.d.ts.map +1 -0
- package/dist/types/src/ILMarketplaceMockTest.d.ts +3 -0
- package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -0
- package/dist/types/src/ILMarketplaceTest.d.ts +3 -0
- package/dist/types/src/ILMarketplaceTest.d.ts.map +1 -0
- package/dist/types/src/ILMarketplaceWrapper.d.ts +49 -0
- package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +0 -2
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts +597 -0
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +1 -17
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts +25 -0
- package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ViewFormUpdateCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/index.d.ts +2 -0
- package/dist/types/src/features/IL-OTJ/_components/index.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/helpers/message-rendering-utils.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/components/GuidelineCardMenu.d.ts +28 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCardMenu.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCart.d.ts +4 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCart.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCartHeader.d.ts +14 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCartHeader.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCartItem.d.ts +16 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineCartItem.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineConfirmDialog.d.ts +18 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineConfirmDialog.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineEmptyState.d.ts +11 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineEmptyState.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineFilterPanel.d.ts +9 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineFilterPanel.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineHeader.d.ts +4 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineHeader.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineIconButton.d.ts +15 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineIconButton.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineLandingPage.d.ts +4 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineLandingPage.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineLibrary.d.ts +59 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineLibrary.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryCard.d.ts +44 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryCard.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineProceedButton.d.ts +4 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineProceedButton.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineSelectButton.d.ts +11 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineSelectButton.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineStatusChip.d.ts +8 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineStatusChip.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineTooltip.d.ts +10 -0
- package/dist/types/src/features/IL-marketplace/components/GuidelineTooltip.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts +19 -0
- package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/constants.d.ts +175 -0
- package/dist/types/src/features/IL-marketplace/constants.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/hooks/useControllableState.d.ts +8 -0
- package/dist/types/src/features/IL-marketplace/hooks/useControllableState.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/hooks/useGuidelineSelection.d.ts +17 -0
- package/dist/types/src/features/IL-marketplace/hooks/useGuidelineSelection.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/hooks/useGuidelineWorkspaceLegacyBridge.d.ts +6 -0
- package/dist/types/src/features/IL-marketplace/hooks/useGuidelineWorkspaceLegacyBridge.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/icons/GuidelineSpinner.d.ts +7 -0
- package/dist/types/src/features/IL-marketplace/icons/GuidelineSpinner.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/index.d.ts +38 -0
- package/dist/types/src/features/IL-marketplace/index.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/queryClient.d.ts +3 -0
- package/dist/types/src/features/IL-marketplace/queryClient.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/IL-marketplace.api.d.ts +103 -0
- package/dist/types/src/features/IL-marketplace/services/IL-marketplace.api.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.api.d.ts +2 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.api.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.cart.api.d.ts +28 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.cart.api.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.chat.d.ts +2 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.chat.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.content.d.ts +2 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.content.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.core.api.d.ts +51 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.core.api.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.runtime.config.d.ts +47 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.runtime.config.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.session.d.ts +10 -0
- package/dist/types/src/features/IL-marketplace/services/guideline.session.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/instant-learning.api.d.ts +112 -0
- package/dist/types/src/features/IL-marketplace/services/instant-learning.api.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/services/instant-learning.wishlist.d.ts +8 -0
- package/dist/types/src/features/IL-marketplace/services/instant-learning.wishlist.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/types/add-context.types.d.ts +39 -0
- package/dist/types/src/features/IL-marketplace/types/add-context.types.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/types/api.types.d.ts +116 -0
- package/dist/types/src/features/IL-marketplace/types/api.types.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/types/file-item.d.ts +51 -0
- package/dist/types/src/features/IL-marketplace/types/file-item.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/types/guideline.api.types.d.ts +11 -0
- package/dist/types/src/features/IL-marketplace/types/guideline.api.types.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/types/guideline.types.d.ts +42 -0
- package/dist/types/src/features/IL-marketplace/types/guideline.types.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/types.d.ts +403 -0
- package/dist/types/src/features/IL-marketplace/types.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/addContextHelpers.d.ts +6 -0
- package/dist/types/src/features/IL-marketplace/utils/addContextHelpers.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/cn.d.ts +3 -0
- package/dist/types/src/features/IL-marketplace/utils/cn.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/guidelineFiles.d.ts +17 -0
- package/dist/types/src/features/IL-marketplace/utils/guidelineFiles.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/guidelineOverlay.d.ts +3 -0
- package/dist/types/src/features/IL-marketplace/utils/guidelineOverlay.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/guidelineSort.d.ts +3 -0
- package/dist/types/src/features/IL-marketplace/utils/guidelineSort.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/microfrontend.d.ts +13 -0
- package/dist/types/src/features/IL-marketplace/utils/microfrontend.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/session.d.ts +4 -0
- package/dist/types/src/features/IL-marketplace/utils/session.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils/url.d.ts +2 -0
- package/dist/types/src/features/IL-marketplace/utils/url.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/utils.d.ts +45 -0
- package/dist/types/src/features/IL-marketplace/utils.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/workspace/useGuidelineWorkspace.d.ts +44 -0
- package/dist/types/src/features/IL-marketplace/workspace/useGuidelineWorkspace.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.context.d.ts +9 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.context.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.runtime.d.ts +12 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.runtime.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.selectors.d.ts +5 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.selectors.d.ts.map +1 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.types.d.ts +89 -0
- package/dist/types/src/features/IL-marketplace/workspace/workspace.types.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts +10 -0
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.styles.d.ts +6 -0
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.styles.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.d.ts +11 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.styles.d.ts +6 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.styles.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts +16 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts +6 -0
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts +19 -0
- package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/api.d.ts +4 -0
- package/dist/types/src/features/LSCGuidelinesCart/api.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts +5 -0
- package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/interfacesApi.d.ts +25 -0
- package/dist/types/src/features/LSCGuidelinesCart/interfacesApi.d.ts.map +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/transformSelectedGuidelineData.d.ts +18 -0
- package/dist/types/src/features/LSCGuidelinesCart/transformSelectedGuidelineData.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/AuditLog/AuditLog.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +9 -1
- 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 +4 -0
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts +6 -0
- 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/InstructionPromptBlock.d.ts +27 -0
- package/dist/types/src/features/LearningManagement/RuleContent/InstructionPromptBlock.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleTierList.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts +4 -0
- package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/Sidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts +8 -0
- package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +26 -4
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ConfirmationModal.d.ts +2 -1
- package/dist/types/src/features/LearningManagement/components/ConfirmationModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts +6 -0
- package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/PromptTextEditor.d.ts +44 -0
- package/dist/types/src/features/LearningManagement/components/PromptTextEditor.d.ts.map +1 -0
- 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 +9 -0
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts +13 -0
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/constants.d.ts +9 -0
- package/dist/types/src/features/LearningManagement/constants.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +13 -0
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +251 -0
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts +11 -0
- package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts +2 -1
- package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/types.d.ts +8 -0
- package/dist/types/src/features/LearningManagement/types.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/utils/learningMetadataUtils.d.ts +12 -0
- package/dist/types/src/features/LearningManagement/utils/learningMetadataUtils.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts +2 -1
- package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +39 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts +1 -0
- package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts +17 -0
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts +1 -0
- package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts.map +1 -1
- package/package.json +37 -14
- package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +0 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +0 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +0 -1
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js +0 -2
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js.map +0 -1
- package/dist/cjs/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +0 -2
- package/dist/cjs/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +0 -1
- package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +0 -1
- package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +0 -1
- package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +0 -1
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js +0 -2
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js.map +0 -1
- package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +0 -2
- package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineCard.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useState as l,useEffect as d}from"react";import{CircleHelp as a,Plus as s,UserCheck as u,Clock3 as c,ShoppingBag as p,Search as h,Check as f,ChevronDown as m,ChevronUp as g}from"lucide-react";import{fetchGuidelineInstances as b}from"./api.js";import{GuidelineCard as y}from"./GuidelineCard.js";import{Cart as _}from"./Cart/Cart.js";import{LearningManagementWrapper as v}from"./LearningManagementWrapper.js";import k from"./GuidelinesLandingPage.styles.js";import{OutlinedInput as C,InputAdornment as z}from"@mui/material";import{transformSelectedToILData as S}from"./transformSelectedGuidelineData.js";function w(e,n){var t,i,r,o;return n?null!==(o=null===(r=e.mode_mappings.find(function(e){return e.mode_id===n}))||void 0===r?void 0:r.application_integration_id)&&void 0!==o?o:"":null!==(i=null===(t=e.mode_mappings[0])||void 0===t?void 0:t.application_integration_id)&&void 0!==i?i:""}function A(A){var W=A.baseUrl,x=A.baseWebsocketUrl,B=A.token,F=A.userDetails,I=A.modeId,U=A.assistantName,j=A.appsecRbacUrl,G=A.appsecBaseUrl,L=A.onProceedSelected,T=l([]),D=T[0],E=T[1],M=l(6),R=M[0],N=M[1],O=l([]),P=O[0],H=O[1],K=l(!1),q=K[0],J=K[1],Q=l(null),V=Q[0],X=Q[1],Y=l(null),Z=Y[0],$=Y[1],ee=l(""),ne=ee[0],te=ee[1],ie=l(""),re=ie[0],oe=ie[1];d(function(){var e=setTimeout(function(){oe(ne.trim())},750);return function(){return clearTimeout(e)}},[ne]),d(function(){N(6)},[re]),d(function(){J(!0),X(null),b(W,B).then(function(e){E(e.data)}).catch(function(e){return X(e.message)}).finally(function(){return J(!1)})},[W,B]);var le=new Set(P.map(function(e){return e.instant_learning_id}));function de(e){H(function(n){return n.some(function(n){return n.instant_learning_id===e.instant_learning_id})?n.filter(function(n){return n.instant_learning_id!==e.instant_learning_id}):[e]})}var ae=re.length>=2?D.filter(function(e){var n,t,i=re.toLowerCase();return(null===(n=e.instant_learning_title)||void 0===n?void 0:n.toLowerCase().includes(i))||(null===(t=e.instant_learning_description)||void 0===t?void 0:t.toLowerCase().includes(i))}):D,se=ae.slice(0,R),ue=ae.length-R,ce=R>6;return i("div",e({style:k.page},{children:r("main",e({style:k.main},{children:[r("section",e({style:k.headerSection},{children:[r("div",e({style:k.intro},{children:[i("h1",e({style:k.title},{children:"Add Guidelines"})),i("p",e({style:k.description},{children:"Add guidelines that shape how your agent behaves, responds, and interprets."})),r("button",e({type:"button",style:k.debugLink},{children:[i("span",{children:"Know more about debug mode"}),i(a,{size:18,strokeWidth:2})]}))]})),r("button",e({type:"button",style:k.addButton},{children:[i(s,{size:20,strokeWidth:2.4}),i("span",{children:"Add Guideline"})]}))]})),r("section",e({style:k.bodySection},{children:[r("section",e({style:k.librarySection},{children:[r("div",e({style:k.libraryTabs},{children:[r("button",e({type:"button",style:e(e({},k.tab),k.tabActive)},{children:[i(u,{size:18,strokeWidth:2}),i("span",{children:"Saved"})]})),r("button",e({type:"button",style:k.tab},{children:[i(c,{size:18,strokeWidth:2}),i("span",{children:"Recently used"})]})),r("button",e({type:"button",style:k.tab},{children:[i(p,{size:18,strokeWidth:2}),i("span",{children:"Marketplace"})]}))]})),!Z&&i("div",e({style:{position:"sticky",top:0,zIndex:10,backgroundColor:"#FFFFFF",paddingTop:12,backdropFilter:"blur(8px)"}},{children:i(C,{placeholder:"Search Guideline",value:ne,onChange:function(e){return te(e.target.value)},size:"small",startAdornment:i(z,e({position:"start"},{children:i(h,{size:16,color:"#9CA3AF"})})),sx:{width:"280px",borderRadius:"8px",fontSize:"14px","& .MuiOutlinedInput-notchedOutline":{borderColor:"#E5E7EB"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#D1D5DB"},bgcolor:"#fff"}})})),Z?i(v,{userDetails:F,baseUrl:W,baseWebsocketUrl:x,assistantName:U,appsecRbacUrl:j,appsecBaseUrl:G,appIntegrationId:w(Z,I),modeId:I,guidelineTitle:Z.instant_learning_title,onBack:function(){return $(null)},headerActions:le.has(Z.instant_learning_id)?r("button",e({type:"button",style:k.cardAddedButton,onClick:function(){return de(Z)}},{children:[i(f,{size:16,strokeWidth:2.4}),i("span",{children:"Added to Cart"})]})):r("button",e({type:"button",style:k.cardAddButton,onClick:function(){return de(Z)}},{children:[i(s,{size:16,strokeWidth:2.4}),i("span",{children:"Add to Cart"})]}))}):r(o,{children:[q&&i("p",e({style:k.loadingState},{children:"Loading guidelines..."})),V&&r("p",e({style:k.errorState},{children:["Error: ",V]})),!q&&!V&&i(o,{children:0===ae.length?i("p",e({style:k.loadingState},{children:re.length>=2?"No guidelines match your search.":"No guidelines found."})):r(o,{children:[i("div",e({style:k.libraryGrid},{children:se.map(function(e){return i(y,{guideline:e,inCart:le.has(e.instant_learning_id),onToggleCart:de,onExplore:$},e.instant_learning_id)})})),r("div",e({style:{display:"flex",alignItems:"center",gap:16}},{children:[ue>0&&r("button",e({type:"button",style:k.showMore,onClick:function(){return N(function(e){return e+6})}},{children:[r("span",{children:["Show more guidelines (",ue,")"]}),i(m,{size:16,strokeWidth:2.4})]})),ce&&r("button",e({type:"button",style:k.showMore,onClick:function(){return N(6)}},{children:[i("span",{children:"Hide"}),i(g,{size:16,strokeWidth:2.4})]}))]}))]})})]})]})),i(_,{items:P,onRemove:function(e){H(function(n){return n.filter(function(n){return n.instant_learning_id!==e})})},onProceed:function(e){return n(this,void 0,void 0,function(){var n,i;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,S(e,I,F.accessToken)];case 1:return n=t.sent(),console.log("Proceeding with il_data:",n),L(n),[3,3];case 2:return i=t.sent(),console.error("Error building il_data for selected guidelines:",i),[3,3];case 3:return[2]}})})}})]}))]}))}))}export{A as GuidelineLandingPage,A as default};
|
|
2
|
+
//# sourceMappingURL=GuidelinesLandingPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelinesLandingPage.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={page:{height:"100%",width:"100%",background:"#ffffff",fontFamily:"Inter, sans-serif"},main:{height:"100%",overflow:"auto",padding:40},headerSection:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:24,justifyContent:"space-between",alignItems:"flex-start"},intro:{minWidth:280,flex:"1 1 0%"},title:{fontSize:30,fontWeight:700,lineHeight:"38px",color:"#6D35F2",margin:0},description:{marginTop:8,fontSize:19,lineHeight:"28px",color:"#1F2937"},debugLink:{marginTop:12,display:"inline-flex",alignItems:"center",gap:8,fontSize:14,fontWeight:500,color:"#53657D",background:"none",border:"none",padding:0,cursor:"pointer"},addButton:{display:"inline-flex",height:44,minWidth:210,flexShrink:0,alignItems:"center",justifyContent:"center",gap:12,borderRadius:6,background:"#4438F5",padding:"0 20px",fontSize:15,fontWeight:600,color:"#ffffff",border:"none",boxShadow:"0 1px 2px rgba(16,24,40,0.08)",cursor:"pointer",marginLeft:"auto"},bodySection:{marginTop:48,display:"grid",width:"100%",gridTemplateColumns:"minmax(0,1fr) minmax(300px,360px)",alignItems:"start",gap:24},librarySection:{minWidth:0},libraryTabs:{display:"flex",borderBottom:"1px solid #EAECF0"},tab:{position:"relative",display:"inline-flex",height:40,alignItems:"center",gap:8,padding:"0 16px",fontSize:14,fontWeight:500,background:"none",border:"none",cursor:"pointer",color:"#B5BDC8"},tabActive:{color:"#1F2937",boxShadow:"inset 0 -3px 0 0 #6D5BFF"},libraryGrid:{marginTop:24,display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:20},cardAddButton:{display:"inline-flex",height:36,flex:1,alignItems:"center",justifyContent:"center",gap:8,borderRadius:6,border:"1px solid #4438F5",background:"#ffffff",fontSize:13,fontWeight:600,color:"#4438F5",cursor:"pointer"},cardAddedButton:{display:"inline-flex",height:36,flex:1,alignItems:"center",justifyContent:"center",gap:8,borderRadius:6,border:"1px solid #EAE7FF",background:"#EDE9FE",fontSize:13,fontWeight:600,color:"#4438F5",cursor:"pointer"},showMore:{marginTop:28,display:"inline-flex",alignItems:"center",gap:8,fontSize:14,fontWeight:600,color:"#5B2CF4",background:"none",border:"none",cursor:"pointer"},loadingState:{marginTop:24,fontSize:14,color:"#667085"},errorState:{marginTop:24,fontSize:14,color:"#F04438"}};export{e as default};
|
|
2
|
+
//# sourceMappingURL=GuidelinesLandingPage.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelinesLandingPage.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import{ArrowLeft as o}from"lucide-react";import{QueryClient as l,QueryClientProvider as r}from"@tanstack/react-query";import c from"../LearningManagement/LearningManagement.js";import{fetchRBACConfig as d}from"./api.js";var p={config:{CUSTOM_SCOPE_GROUP_NAME:"Preview",INSTANT_LEARNING_TYPE:"iL",MODEL:"claude-3.5-sonnet",CONFIG_MASTER_NAME:"preview-config",SCOPE_NAME:"Custom",ASSISTANT_NAME:"preview",ORGANIZATION_NAME:"techolution",BASE_URL:"https://devllmstudio.creativeworkspace.ai",BASE_WEBSOCKET_URL:"wss://devllmstudio.creativeworkspace.ai/graphql",CHAT_TITLE:"Preview",CHAT_TITLE_EDIT:"Preview Edit",FORM_TITLE:"Learning Details",INITIAL_CHAT_MESSAGE:"Hi",CATEGORY:"Global-Template",SOCKET_TIMEOUT:24e4},llmStudioUrl:"https://devllmstudio.creativeworkspace.ai",audacyBackendUrl:"https://dev-audacy-traffic-manager.techo.camp",ilLabels:{setupLabel:"Learning Setup",ruleTitle:"Learning Title",ruleDescriptionTitle:"Learning Description"}},s={applicationName:"IL Mode - ILOTJ",applicationId:"6a22c19581f05dc3afc8ad57",moduleId:"6a22c19581f05dc3afc8ad8e",applicationModuleId:"6a22c19581f05dc3afc8ad88",applicationResourceId:"6a22c19681f05dc3afc8ad94",appsecRbacUrl:"https://dev-cw-appsec.techo.camp/granularApi",appsecBaseUrl:"https://dev-cw-appsec.techo.camp"},f={configId:"6a1825e9fb722c37637b9490"},u=new l,g={wrapper:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},header:{display:"flex",alignItems:"center",gap:12,padding:"10px 0",borderBottom:"1px solid #EAECF0",flexShrink:0},backButton:{display:"inline-flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",fontSize:14,fontWeight:500,color:"#344054",padding:"4px 8px",borderRadius:6},headerTitle:{fontSize:14,fontWeight:600,color:"#1F2937",margin:0,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},headerActions:{display:"flex",alignItems:"center",gap:8,marginLeft:"auto"},lmsContainer:{flex:1,minHeight:0,overflow:"hidden"},loadingState:{padding:24,fontSize:14,color:"#667085"}};function m(l){var m=l.userDetails,h=l.baseUrl,T=l.baseWebsocketUrl,I=l.assistantName,v=l.appsecRbacUrl,_=l.appsecBaseUrl,E=l.appIntegrationId,A=l.modeId,S=l.guidelineTitle,L=l.onBack,b=l.headerActions,C=t(null),w=C[0],U=C[1];return n(function(){if(E){var a=e(e({},p),{config:e(e({},p.config),{ASSISTANT_NAME:I,BASE_URL:h,BASE_WEBSOCKET_URL:T}),llmStudioUrl:h}),i=e(e({},s),{appsecRbacUrl:v,appsecBaseUrl:_}),t=!1;return U(null),d(h,m.accessToken,E).then(function(n){var o,l,r,c;if(!t){var d=n?{applicationName:n.application_name,applicationId:n.application_id,moduleId:null===(o=n.module_data)||void 0===o?void 0:o.Scopes,applicationModuleId:null===(l=n.module_data)||void 0===l?void 0:l.General,applicationResourceId:null===(r=n.resource_data)||void 0===r?void 0:r["Learning Management"],appsecRbacUrl:v,appsecBaseUrl:_}:i;U(e(e({},a),{auditLogConfig:{configId:null!==(c=null==n?void 0:n.change_log_config_id)&&void 0!==c?c:f.configId},rbacConfig:d}))}}).catch(function(){t||(console.warn("RBAC config fetch failed, using fallback."),U(e(e({},a),{auditLogConfig:f,rbacConfig:i})))}),function(){t=!0}}},[E,h,T,I,v,_]),a(r,e({client:u},{children:i("div",e({style:g.wrapper},{children:[i("div",e({style:g.header},{children:[i("button",e({type:"button",style:g.backButton,onClick:L},{children:[a(o,{size:16,strokeWidth:2}),"Back"]})),S&&a("p",e({style:g.headerTitle},{children:S})),b&&a("div",e({style:g.headerActions},{children:b}))]})),a("div",e({style:g.lmsContainer},{children:w?a(c,e({},w,{userDetails:m,app_integration_id:E,modeId:A}),"lms-explore"):a("p",e({style:g.loadingState},{children:"Loading..."}))}))]}))}))}export{m as LearningManagementWrapper,m as default};
|
|
2
|
+
//# sourceMappingURL=LearningManagementWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LearningManagementWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as n}from"tslib";import{endpoints as e}from"./endpoints.js";function r(r,o){return t(this,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,fetch(e.listInstances(r),{headers:{accept:"application/json, text/plain, */*",authorization:"Bearer ".concat(o)}})];case 1:if(!(t=n.sent()).ok)throw new Error("Failed to fetch guidelines: ".concat(t.status));return[2,t.json()]}})})}function o(r,o,i){return t(this,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,fetch(e.getRbacConfig(r,i),{headers:{accept:"application/json, text/plain, */*",authorization:"Bearer ".concat(o)}})];case 1:if(!(t=n.sent()).ok)throw new Error("Failed to fetch RBAC config: ".concat(t.status));return[4,t.json()];case 2:return[2,n.sent().data]}})})}export{r as fetchGuidelineInstances,o as fetchRBACConfig};
|
|
2
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var n={listInstances:function(n){return"".concat(n,"/instant_learning/ilotj/listInstances?createdAt=desc")},getRbacConfig:function(n,t){return"".concat(n,"/instant_learning/ilotj/application/getRBACAuditConfig/").concat(t)}};export{n as endpoints};
|
|
2
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from"tslib";import{API_ENDPOINTS as n}from"../LearningManagement/apis/apiConfig.js";import{llmApiWithToken as i}from"../LearningManagement/apis/scopeApis.js";function r(r,o){var s;return e(this,void 0,void 0,function(){var e,a;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i(o).get(n.getTiers.replace("{appIntegrationId}",r))];case 1:return e=t.sent(),"success"===(null===(s=e.data)||void 0===s?void 0:s.status)?[2,e.data.data.map(function(e){return e.id})]:[2,[]];case 2:throw a=t.sent(),console.error("Error fetching tiers:",a),a;case 3:return[2]}})})}function o(r,o){var s,a,c;return e(this,void 0,void 0,function(){var e,u,d;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i(o).get("".concat(n.fetchScopes,"/").concat(r))];case 1:return e=t.sent(),console.log("fetchScopeIds response:",e),[2,(u=null===(c=null===(a=null===(s=e.data)||void 0===s?void 0:s.data)||void 0===a?void 0:a.data)||void 0===c?void 0:c.id)?[u]:[]];case 2:throw d=t.sent(),console.error("Error fetching rule sets:",d),d;case 3:return[2]}})})}function s(n,i,s){return e(this,void 0,void 0,function(){var a=this;return t(this,function(c){switch(c.label){case 0:return console.log(n,"selected",i,"modeId"),[4,Promise.all(n.map(function(n){return e(a,void 0,void 0,function(){var e,a,c,u;return t(this,function(t){switch(t.label){case 0:return e=function(e,t){var n,i,r,o;return t?null!==(o=null===(r=e.mode_mappings.find(function(e){return e.mode_id===t}))||void 0===r?void 0:r.application_integration_id)&&void 0!==o?o:"":null!==(i=null===(n=e.mode_mappings[0])||void 0===n?void 0:n.application_integration_id)&&void 0!==i?i:""}(n,i),[4,Promise.all([e?o(e,s):Promise.resolve([]),e?r(e,s):Promise.resolve([])])];case 1:return a=t.sent(),c=a[0],u=a[1],[2,{app_map_id:e,scope_ids:c,tier_ids:u}]}})})}))];case 1:return[2,{il_data:{selected_guidelines:c.sent()}}]}})})}export{s as transformSelectedToILData};
|
|
2
|
+
//# sourceMappingURL=transformSelectedGuidelineData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformSelectedGuidelineData.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as i,useMemo as n,useEffect as a}from"react";import{AuditLog as r}from"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import{User as l,ExternalLink as c}from"lucide-react";import s from"./ChangeLogDiff.js";import{dt as d}from"../store/useLMSConfigStore.js";import p from"../RBAC/AccessPanel.module.css.js";import{usePermissionsStore as h}from"../store/usePermissionsStore.js";import g from"../store/useEnvStore.js";import{useConfigStore as u}from"../store/useConfigStore.js";var m=function(m){var f=m.configId,b=m.ruleData,y=m.scopeId,x=m.scopeName,v=(null==x?void 0:x.trim())||"Selected",w=i("scope"),C=w[0],S=w[1];u.getState().configuration;var T=h(function(e){return e.hasPermission}),L=g(function(e){var o;return(null===(o=e.rbacConfig)||void 0===o?void 0:o.applicationResourceId)||""}),A=Boolean(y&&T("ilotj.scope.changeLog.view",y)),k=Boolean(L&&T("ilotj.application.changeLog.view",L)),D=n(function(){var e=[];return y&&e.push(y),e},[b,y]);a(function(){console.log("Flattened External Resource IDs:",D)},[D]);var I={configId:f,getData:{baseUrl:window.location.origin.includes("local")?"https://dev.appmod.ai":window.location.origin,endpoint:"/changelog/audit-log/fetch"},distinctValuesApi:{baseUrl:window.location.origin.includes("local")?"https://dev.appmod.ai":window.location.origin,endpoint:"/changelog/audit-log/distinct-values"},sidebar:{config:{showAnalystFilter:!0,showDateFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!1},labels:{title:"Filters",multiSelectLabel:"Modified By",multiSelectHint:"Filter by the user who made the change",changeTitleLabel:"Change Action",changeTitleHint:"Filter by Actions"}},table:{tableProps:{scrollable:!0,scrollHeight:"80vh",showGridlines:!0,size:"small",rowClassName:function(){return"custom-compact-row"},pt:{bodyCell:{style:{paddingTop:"4px",paddingBottom:"4px"}}}},hiddenColumns:["actions","changeSummary","changeDateTime","logId"],extraColumns:[{key:"modifiedBy",header:"Modified By",body:function(i){return o("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[t(l,{size:16,color:"#64748b",style:{flexShrink:0}}),t("span",e({style:{fontWeight:500}},{children:i.modifiedBy}))]}))},style:{width:"15%",minWidth:"140px"}},{key:"changeAction",header:"Action",body:function(o){var i,n,a=(i=o.changeTitle,(n=(i||"").toUpperCase()).includes("CREATE")?{color:"#2e7d32",backgroundColor:"#edf7ed",borderColor:"#c8e6c9",boxShadow:"0 1px 2px rgba(46, 125, 50, 0.08)"}:n.includes("UPDATE")||n.includes("TOGGLE")?{color:"#1565c0",backgroundColor:"#e3f2fd",borderColor:"#bbdefb",boxShadow:"0 1px 2px rgba(21, 101, 192, 0.08)"}:n.includes("DELETE")?{color:"#c62828",backgroundColor:"#fdeeed",borderColor:"#ffcdd2",boxShadow:"0 1px 2px rgba(198, 40, 40, 0.08)"}:{color:"#475569",backgroundColor:"#f8fafc",borderColor:"#cbd5e1",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.06)"}),r=o.changeTitle?o.changeTitle.replace(/_/g," "):"—";return t("span",e({style:{color:a.color,backgroundColor:a.backgroundColor,border:"1px solid ".concat(a.borderColor),boxShadow:a.boxShadow,padding:"6px 12px",borderRadius:"999px",fontSize:"12px",lineHeight:1,fontWeight:600,display:"inline-block",minWidth:"76px",textAlign:"center",textTransform:"capitalize"}},{children:r}))},style:{width:"15%",textAlign:"center"}},{key:"customChangeSummary",header:"Change Summary",body:function(e){var o;return t(s,{change:null!==(o=e.actionText)&&void 0!==o?o:"-"})},style:{width:"30%",minWidth:"200px"}},{key:"redirectLink",header:"Link",body:function(i){var n,a=(null===(n=i.metadata)||void 0===n?void 0:n.redirect_url)||i.redirect_url;return a?t("div",e({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:o("a",e({href:a,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"6px",color:"#2563eb",textDecoration:"none",fontWeight:500,fontSize:"13px"}},{children:["View ",t(c,{size:14})]}))})):t("span",e({style:{color:"#94a3b8",display:"flex",justifyContent:"center"}},{children:"—"}))},style:{width:"10%",minWidth:"90px",textAlign:"center"}},{key:"customChangeDateTime",header:"Change Time and Date",body:function(i){if(!i.actionDate)return t("span",e({style:{color:"#94a3b8"}},{children:"—"}));var n=new Date(i.actionDate),a=n.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),r=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return o("div",e({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",fontSize:"13px",color:"#475569"}},{children:[t("span",e({style:{fontWeight:500}},{children:a})),t("span",{children:r})]}))},style:{width:"15%",minWidth:"150px",textAlign:"center"}}]},filters:{config:{showFilterButton:!0,showSort:!0,showDate:!0,showSearch:!0,sortOptions:{latest:!0,oldest:!0,impactHighToLow:!1,impactLowToHigh:!1}}}};return t("div",e({style:{height:"100%",overflowY:"auto"}},{children:o("div",e({style:{padding:"24px",fontFamily:"Arial, sans-serif"}},{children:[o("div",e({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[t("h1",e({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:d("history.title","".concat(v," - Audit Log"),{scope_name:v})})),t("p",e({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:d("history.subtitle","Track all learning updates and modifications with the ".concat(v," scope."),{scope_name:v})}))]})),o("div",e({className:p.accessTabs,role:"tablist","aria-label":"Audit log level"},{children:[t("button",e({type:"button",role:"tab","aria-selected":"scope"===C,className:"".concat(p.accessTab," ").concat("scope"===C?p.accessTabActive:""),onClick:function(){return S("scope")},disabled:!A,title:A?"":"You do not have permission to view scope level change log"},{children:d("history.scopeLevel","Scope Level")})),t("button",e({type:"button",role:"tab","aria-selected":"application"===C,className:"".concat(p.accessTab," ").concat("application"===C?p.accessTabActive:""),onClick:function(){return S("application")},disabled:!k,title:k?"":"You do not have permission to view application level change log"},{children:d("history.applicationLevel","Application Level")}))]})),"scope"===C?t(r,e({},I,{query:{externalResourceId:D.length>0?D:[""],paginationLimit:10}}),"scope-audit-log"):t(r,e({},I,{query:{externalResourceId:[],paginationLimit:10}}),"application-audit-log")]}))}))};export{m as default};
|
|
2
2
|
//# sourceMappingURL=AuditLog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as t,__awaiter as n,__generator as r}from"tslib";import{jsx as o,jsxs as s,Fragment as i}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as c}from"react";import{BookOpen as u,Users as d,History as p}from"lucide-react";import{useLearningTemplateStore as m}from"./store/useLearningTemplateStore.js";import{Toast as f}from"primereact/toast";import v from"./styles/LearningTemplateManagement.module.css.js";import g from"./LearningTemplateLayout.js";import h from"./components/EmptyLearningState.js";import y from"./store/useAuthStore.js";import{fetchTiers as S,fetchScopes as b,inheritScope as C,inheritScopeBackwardCompatible as T,createRuleSet as E,renameScope as I,deleteRuleSet as L,requestAccess as A}from"./apis/scopeApis.js";import{QUERY_PARAM_KEYS as O,setQueryParams as w}from"./hooks/useLearningTemplateQueryParams.js";import R from"./components/ConfirmationModal.js";import j from"./components/LearningTemplateManagementSkeleton.js";import{findNodePathById as N}from"./utils/treeUtils.js";import D from"./store/useEnvStore.js";import{useConfigStore as _}from"./store/useConfigStore.js";import{TooltipProvider as k}from"./components/ToolTip.js";import P from"./components/CreateRuleSetLegacyModal.js";import{usePermissionsStore as U}from"./store/usePermissionsStore.js";import{useAppSecRolesStore as G}from"./store/useAppSecRolesStore.js";import{useGetAppSecRolesQuery as M}from"./queries/useApprovalQueries.js";import B from"./RuleContent/AddScopeModal.js";import{useLocation as F}from"react-router-dom";import q from"./shared/SuccessToastContent.js";import x from"./shared/ErrorToastContent.js";import H from"./RuleContent/RenameScopeModal.js";var Q=[{id:"learnings",label:"Learnings",icon:u,badgeKey:"learningsCount"},{id:"access",label:"Access",icon:d},{id:"history",label:"Change History",icon:p}],z=new Set(Q.map(function(e){return e.id}));function K(u){var d,p,K,V=this,W=u.userDetails,Y=u.llmStudioUrl,J=u.audacyBackendUrl,X=u.ilLabels,Z=u.config,$=u.rbacConfig,ee=u.auditLogConfig,te=u.app_integration_id,ne=u.backwardCompatibility,re=void 0!==ne&&ne,oe=m(function(e){return e.selectedRuleSetId}),se=m(function(e){return e.setSelectedRuleSetId}),ie=m(function(e){return e.error}),ae=m(function(e){return e.setError}),le=m(function(e){return e.setStations}),ce=m(function(e){return e.scopeTreeData}),ue=m(function(e){return e.setScopeTreeData}),de=a({isOpen:!1,type:"GLOBAL"}),pe=de[0],me=de[1],fe=a(!1),ve=fe[0],ge=fe[1],he=a(!1),ye=he[0],Se=he[1],be=a("learnings"),Ce=be[0],Te=be[1],Ee=a(null),Ie=Ee[0],Le=Ee[1],Ae=a(null),Oe=Ae[0],we=Ae[1],Re=l(null),je=l(null),Ne=l(!1),De=l(null),_e=y();_e.user;var ke=_e.setUser,Pe=_(),Ue=Pe.setConfig,Ge=Pe.setIlLabels,Me=e([{type:"GLOBAL",label:"Global",addChildLabel:"Add Scope",addChildType:"SCOPE"},t({type:"SCOPE",label:"Scope"},!re&&{addChildLabel:"Add Subscope",addChildType:"SUBSCOPE"})],re?[]:[{type:"SUBSCOPE",label:"Subscope"}],!0),Be=function(){try{return F()}catch(e){return{search:""}}}();c(function(){if(!Ne.current){var e=new URLSearchParams(window.location.search),t=e.get(O.RULESET_ID),n=e.get(O.SECTION),r=n&&z.has(n)?n:"learnings";(null==t?void 0:t.length)&&se&&Te&&(se(t),Te(r),Ne.current=!0)}},[null==Be?void 0:Be.search,Te,se]);var Fe=U(function(e){return e.fetchPermissions}),qe=U(function(e){return e.hasPermission}),xe=G(function(e){return e.setRoles}),He=D(function(e){return e.appsecRbacUrl})===$.appsecRbacUrl,Qe=M($.applicationId,He).data;c(function(){Qe&&xe(Qe.map(function(e){return{_id:e._id,name:e.name}}))},[Qe,xe]),c(function(){var e;console.log("userDetails",W),ke(W),console.log("llmStudioUrl",Y),console.log("audacyBackendUrl",J),D.getState().setLlmStudioUrl(Y),D.getState().setAudacyBackendUrl(J),D.getState().setRbacConfig($),D.getState().setAuditLogConfig(ee),Ue(Z),Ge(X),m.getState().setAppIntegrationId(null!=te?te:null),m.getState().setBackwardCompatibility(re),m.getState().setToken(null!==(e=null==W?void 0:W.accessToken)&&void 0!==e?e:null)},[W,ke,Y,J,$,ee,Z,Ue,X,Ge,te,re]),c(function(){(null==W?void 0:W.accessToken)&&Y&&S()},[te,null==W?void 0:W.accessToken,Y]);var ze=function(e){return void 0===e&&(e=!0),n(V,void 0,void 0,function(){var n,o,s,i,a,l;return r(this,function(r){switch(r.label){case 0:e&&ge(!0),ae(null),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,Fe($.applicationId)];case 2:return r.sent(),n=function(e){if(!U.getState().hasPermission("ilotj.scope.view",e.id))return null;var r=e.children?e.children.map(function(e){return n(e)}).filter(function(e){return null!==e}):[];return t(t({},e),{children:r})},[4,b(te,W.accessToken)];case 3:return(o=r.sent())&&o.data&&o.data.data&&(s=o.data.data,Array.isArray(s)&&(s=s.length>0?s[0]:null),s?(i=n(s))?(Le(null),ue({data:i}),je.current?(se(je.current),Te("learnings"),je.current=null):m.getState().selectedRuleSetId||se(i.id)):(Le(null!==(l=s.id)&&void 0!==l?l:null),ue(null)):(Le(null),ue(null))),[3,6];case 4:return a=r.sent(),console.error("Failed to fetch rule sets or permissions",a),ae("Failed to load data. Please try again later."),[3,6];case 5:return ge(!1),[7];case 6:return[2]}})})};c(function(){var e;(null===(e=null==W?void 0:W.accessToken)||void 0===e?void 0:e.length)&&He?ze(!0):console.warn("Error: Trying to fetch rules without access token",W)},[null==W?void 0:W.accessToken,ae,le,$.applicationId,He]);var Ke=function(e){return n(V,void 0,void 0,function(){var n,s,i,a;return r(this,function(r){switch(r.label){case 0:Se(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),pe.scopeId?[4,I({scope_id:pe.scopeId,scope_name:e})]:[2];case 2:return r.sent(),[4,ze(!0)];case 3:return r.sent(),me(function(e){return t(t({},e),{isOpen:!1})}),[3,6];case 4:throw n=r.sent(),console.error("An error occurred during scope rename.",n),null===(s=De.current)||void 0===s||s.show({severity:"error",sticky:!1,className:v.errorToast,content:o(x,{message:(null===(a=null===(i=null==n?void 0:n.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)||"There was an error renaming the scope. Please try again."})}),n;case 5:return Se(!1),[7];case 6:return[2]}})})},Ve=function(e,o,s){return n(V,void 0,void 0,function(){var n,o,s,i,a,l,c,u;return r(this,function(r){switch(r.label){case 0:Se(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,L(e,W.accessToken)];case 2:return r.sent(),m.getState().selectedRuleSetId===e&&(n=m.getState().scopeTreeData,(o=N((null==n?void 0:n.data)||null,e))&&o.length>1&&(s=o[o.length-2],se(s),Te("learnings"))),[4,ze(!0)];case 3:return r.sent(),me(function(e){return t(t({},e),{isOpen:!1})}),null===(a=De.current)||void 0===a||a.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,6];case 4:return i=r.sent(),console.error("An error occurred during scope deletion.",i),null===(l=De.current)||void 0===l||l.show({severity:"error",summary:"Delete Failed",detail:(null===(u=null===(c=null==i?void 0:i.response)||void 0===c?void 0:c.data)||void 0===u?void 0:u.message)||"There was an error deleting the scope. Please try again."}),[3,6];case 5:return Se(!1),[7];case 6:return[2]}})})},We=ce,Ye=Oe?{data:{id:Oe.stationId,name:Oe.stationName,type:"STATION",metrics:{learningsCount:Oe.learningsCount,stationsCount:0},children:[]}}:We,Je=!!(null==Ye?void 0:Ye.data);null===(d=null==Ye?void 0:Ye.data)||void 0===d||d.type;var Xe=U(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",$.applicationResourceId||""),Ze=Oe?Q.filter(function(e){return"stations"!==e.id}):Q;return o(k,{children:s("div",t({className:v.learningManagementContainer},{children:[o("div",t({className:v.mainWrapper},{children:ve?o(j,{}):ie?s("div",t({className:v.errorContainer},{children:[o("div",t({className:v.errorTitle},{children:"Error Loading Data"})),o("p",t({className:v.errorDesc},{children:ie})),o("button",t({onClick:function(){return ze(!0)},className:v.tryAgainBtn},{children:"Try Again"}))]})):Je?o(g,{onOpenCreateModal:function(){return me({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,t,n){return me({isOpen:!0,type:t,parentId:e,parentName:n})},onRenameChild:function(e,t){return me({isOpen:!0,type:"RENAME",scopeId:e,initialName:t})},onDeleteChild:function(e,t,o){return n(V,void 0,void 0,function(){var n,s,i;return r(this,function(r){switch(r.label){case 0:return n=m.getState().scopeTreeData,s=N((null==n?void 0:n.data)||null,e),i=!!s&&3===s.length,0!==o?[3,2]:[4,Ve(e)];case 1:return r.sent(),[3,3];case 2:me({isOpen:!0,type:"DELETE",scopeId:e,initialName:t,isSubscope:i}),r.label=3;case 3:return[2]}})})},canDeleteScope:function(e){return qe("ilotj.scope.delete",e)},canEditScope:function(e){return qe("ilotj.scope.edit",e)},canCreateScope:function(e){return qe("ilotj.scope.create",e)},onSectionSelect:function(e,t){var n;console.log("Section Selected:",{scopeId:e,sectionId:t}),w(((n={})[O.SECTION]="learnings"===t?null:t,n[O.RULESET_ID]=e,n)),Te(t),se(e)},activeSectionId:Ce,scopeTreeData:Ye,sectionsConfig:Ze,onViewStation:function(e){Re.current=oe,we(e),Te("learnings"),se(e.stationId)},onRefreshRuleSets:function(e,t){void 0===e&&(e=!0),t&&(je.current=t),ze(e)},nodeTypesConfig:Me,app_integration_id:te,token:W.accessToken}):o(h,{onCreate:function(){return me({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:Xe,noAccessTitle:"Access Restricted",noAccessDesc:"You do not have access to create a Global scope for this application.",onRequestAccess:function(){return n(V,void 0,void 0,function(){var e,t,n,s,i,a,l,c,u;return r(this,function(r){switch(r.label){case 0:if(!(e=(null===(s=null===(n=m.getState().scopeTreeData)||void 0===n?void 0:n.data)||void 0===s?void 0:s.id)||Ie))return null===(i=De.current)||void 0===i||i.show({severity:"error",sticky:!1,className:v.errorToast,content:o(x,{message:"Unable to identify the global scope for this access request."})}),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,A(e)];case 2:return r.sent(),null===(a=De.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:v.successToast,content:o(q,{message:"Access request submitted successfully!"})}),[3,4];case 3:return t=r.sent(),null===(l=De.current)||void 0===l||l.show({severity:"error",sticky:!1,className:v.errorToast,content:o(x,{message:(null===(u=null===(c=null==t?void 0:t.response)||void 0===c?void 0:c.data)||void 0===u?void 0:u.detail)||"Failed to request access. Please try again."})}),[3,4];case 4:return[2]}})})}})})),o(f,{ref:De,pt:{root:{style:{zIndex:9999}}}}),re&&pe.isOpen&&"DELETE"!==pe.type&&"RENAME"!==pe.type?o(P,{isOpen:!0,onClose:function(){return me(t(t({},pe),{isOpen:!1}))},onSubmit:function(e){return n(V,void 0,void 0,function(){var n,o,s,i,a,l,c,u,d,p,f,v,g,h,y,S,b,I,L,A;return r(this,function(r){switch(r.label){case 0:Se(!0),n=m.getState().backwardCompatibility,r.label=1;case 1:return r.trys.push([1,12,13,14]),o=void 0,n&&"object"==typeof e?o=e:(s=e,i="SCOPE"===pe.type&&pe.parentId,a=i?"genreRuleSet":pe.type,o={topic:a,scope_reference_id:null,scopeDescription:"demo",parentScopeId:pe.parentId||null,scopeName:s,scopeReferenceMetadata:{},applicationMappingId:te}),[4,E(o,W.accessToken)];case 2:if(l=r.sent(),!(c=null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.scopeId))return[3,10];if(je.current=c,u=n&&(null===(y=o.topic)||void 0===y?void 0:y.toLowerCase().includes("genre")),d=!n&&"GLOBAL"!==pe.type&&pe.parentId,!u&&!d)return[3,10];if(!(p=n?null===(b=null===(S=m.getState().scopeTreeData)||void 0===S?void 0:S.data)||void 0===b?void 0:b.id:pe.parentId))return[3,10];if(!re)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,T({source_scope_id:p,target_scope_id:c})];case 4:return r.sent(),[3,6];case 5:return f=r.sent(),console.error("Failed to inherit rules for the new scope:",f),[3,6];case 6:return[3,10];case 7:return r.trys.push([7,9,,10]),[4,C({source_scope_id:p,target_scope_id:c,application_mapping_id:te||"",is_copy_parent_variant_id:!1})];case 8:return r.sent(),[3,10];case 9:return v=r.sent(),console.error("Failed to inherit rules for the new scope:",v),[3,10];case 10:return[4,ze(!0)];case 11:return r.sent(),me(function(e){return t(t({},e),{isOpen:!1})}),[3,14];case 12:throw g=r.sent(),console.error("An error occurred during scope creation.",g),null===(I=De.current)||void 0===I||I.show({severity:"error",summary:"Creation Failed",detail:(null===(A=null===(L=null==g?void 0:g.response)||void 0===L?void 0:L.data)||void 0===A?void 0:A.message)||"There was an error creating the scope. Please try again."}),g;case 13:return Se(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:Je,canCreateGlobal:Xe,globalScopeId:null!==(K=null===(p=null==ce?void 0:ce.data)||void 0===p?void 0:p.id)&&void 0!==K?K:null}):s(i,{children:[o(B,{isOpen:pe.isOpen&&"DELETE"!==pe.type&&"RENAME"!==pe.type,onClose:function(){return me(t(t({},pe),{isOpen:!1}))},onCreate:function(e){return Ke(null!=e?e:"")},hasGlobalRuleSet:Je,parentId:pe.parentId}),o(H,{isOpen:pe.isOpen&&"RENAME"===pe.type,onClose:function(){return me(t(t({},pe),{isOpen:!1}))},onSave:Ke,initialName:pe.initialName})]}),o(R,{isOpen:pe.isOpen&&"DELETE"===pe.type,onCancel:function(){return me(t(t({},pe),{isOpen:!1}))},onConfirm:function(){return Ve(pe.scopeId,pe.initialName,pe.isSubscope)},title:"Delete Scope",description:s(i,{children:["Deleting ",o("span",t({className:v.highlight},{children:pe.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:ye})]}))})}export{K as default};
|
|
1
|
+
import{__assign as e,__spreadArray as n,__awaiter as t,__generator as r}from"tslib";import{jsx as o,jsxs as s,Fragment as a}from"react/jsx-runtime";import{useState as i,useRef as c,useCallback as l,useEffect as u}from"react";import{BookOpen as d,Users as p,History as m}from"lucide-react";import{useLearningTemplateStore as f}from"./store/useLearningTemplateStore.js";import{Toast as v}from"primereact/toast";import g from"./styles/LearningTemplateManagement.module.css.js";import h from"./LearningTemplateLayout.js";import S from"./components/EmptyLearningState.js";import y from"./store/useAuthStore.js";import{fetchTiers as b,getILInstance as C,fetchScopes as T,inheritScope as I,inheritScopeBackwardCompatible as L,createRuleSet as A,renameScope as E,deleteRuleSet as R,requestAccess as w}from"./apis/scopeApis.js";import{useRuleTemplateQueryParams as O,setQueryParams as j,QUERY_PARAM_KEYS as N}from"./hooks/useLearningTemplateQueryParams.js";import _ from"./components/ConfirmationModal.js";import D from"./components/LearningTemplateManagementSkeleton.js";import{findNodePathById as k,findNodeById as M}from"./utils/treeUtils.js";import P from"./store/useEnvStore.js";import{useConfigStore as U}from"./store/useConfigStore.js";import{TooltipProvider as B}from"./components/ToolTip.js";import q from"./components/CreateRuleSetLegacyModal.js";import{usePermissionsStore as G}from"./store/usePermissionsStore.js";import{useAppSecRolesStore as F}from"./store/useAppSecRolesStore.js";import{useGetAppSecRolesQuery as x}from"./queries/useApprovalQueries.js";import{useLMSConfigQuery as H}from"./queries/useLMSConfigQuery.js";import Q from"./RuleContent/AddScopeModal.js";import z from"./components/RuleContentSkeleton.js";import K from"./components/ErrorStateDisplay.js";import{useLocation as V,useSearchParams as W}from"react-router-dom";import Y from"./shared/SuccessToastContent.js";import J from"./shared/ErrorToastContent.js";import X from"./RuleContent/RenameScopeModal.js";import{dt as Z,useLMSConfigStore as $}from"./store/useLMSConfigStore.js";import{MIDDLE_DRAWER_DT_PATH as ee,MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH as ne,EMPTY_STATE_DT_PATH as te}from"./constants.js";function re(re){var oe,se,ae,ie=this,ce=re.userDetails,le=re.llmStudioUrl,ue=re.audacyBackendUrl,de=re.ilLabels,pe=re.config,me=re.rbacConfig,fe=re.auditLogConfig,ve=re.app_integration_id,ge=re.backwardCompatibility,he=void 0!==ge&&ge,Se=re.cognitiveCompareCompatibility,ye=void 0!==Se&&Se,be=re.modeId,Ce=re.modeDetails,Te=re.pluginPayload,Ie=[{id:"learnings",label:Z("".concat(ee,".treeMenu.submenu.learnings"),"Learnings"),icon:d,badgeKey:"learningsCount"},{id:"access",label:Z("".concat(ee,".treeMenu.submenu.access"),"Access"),icon:p},{id:"history",label:Z("".concat(ee,".treeMenu.submenu.changeHistory"),"Change History"),icon:m}],Le=new Set(Ie.map(function(e){return e.id})),Ae=O().clearLearningParams,Ee=f(function(e){return e.selectedRuleSetId}),Re=f(function(e){return e.setSelectedRuleSetId}),we=f(function(e){return e.setIlInstanceId}),Oe=f(function(e){return e.error}),je=f(function(e){return e.setError}),Ne=f(function(e){return e.setStations}),_e=f(function(e){return e.scopeTreeData}),De=f(function(e){return e.setScopeTreeData}),ke=i({isOpen:!1,type:"GLOBAL"}),Me=ke[0],Pe=ke[1],Ue=i(!1),Be=Ue[0],qe=Ue[1],Ge=i(!1),Fe=Ge[0],xe=Ge[1],He=i("learnings"),Qe=He[0],ze=He[1],Ke=i(null),Ve=Ke[0],We=Ke[1],Ye=i(!1),Je=Ye[0],Xe=Ye[1],Ze=i(null),$e=Ze[0];Ze[1];var en=i(!1),nn=en[0],tn=en[1],rn=i(!1),on=rn[0],sn=rn[1];c(null);var an=c(null),cn=c(!1),ln=c(null),un=y();un.user;var dn=un.setUser,pn=U(),mn=pn.setConfig,fn=pn.setIlLabels,vn=function(){try{return V()}catch(e){return{search:""}}}(),gn=function(){try{return W()[1]}catch(e){return null}}(),hn=l(function(e){if(gn){var n=new URLSearchParams(window.location.search);Object.entries(e).forEach(function(e){var t=e[0],r=e[1];null==r||""===r?n.delete(t):n.set(t,r)}),gn(n,{replace:!0})}else j(e)},[gn]);u(function(){if(!cn.current){var e=new URLSearchParams(window.location.search),n=e.get(N.RULESET_ID),t=e.get(N.SECTION),r=t&&(null==Le?void 0:Le.has(t))?t:"learnings";(null==n?void 0:n.length)&&Re&&ze&&(Re(n),ze(r),cn.current=!0)}},[null==vn?void 0:vn.search,ze,Re]),u(function(){return function(){Ae()}},[Ae]),u(function(){var e;Ee&&hn(((e={})[N.RULESET_ID]=Ee,e))},[Ee,hn]),u(function(){var n;(null==Te?void 0:Te.learningManagement)&&$.getState().setLMSConfig(e(e({},Te.learningManagement),{agents:null!==(n=Te.agents)&&void 0!==n?n:{}}))},[Te]);var Sn=G(function(e){return e.fetchPermissions}),yn=G(function(e){return e.hasPermission}),bn=F(function(e){return e.setRoles}),Cn=P(function(e){return e.appsecRbacUrl})===me.appsecRbacUrl,Tn=x(me.applicationId,Cn).data,In=H(null!=ve?ve:"",he),Ln=In.isLoading,An=In.isError,En=In.refetch;In.isSuccess;var Rn=i(0),wn=Rn[0],On=Rn[1];u(function(){if(!he&&ve&&le){t(ie,void 0,void 0,function(){var e,n,t,o,s,a,i;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,C(ve)];case 1:return e=r.sent(),(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.ILInstanceId)&&we(e.data.ILInstanceId),"number"==typeof(n=null===(i=null===(a=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.learningManagement)||void 0===a?void 0:a.scopeAndHierarchy)||void 0===i?void 0:i.maxHierarchyLevels)&&n>0&&On(n-1),[3,3];case 2:return t=r.sent(),console.error("Failed to fetch IL instance for hierarchy levels:",t),[3,3];case 3:return[2]}})})}},[ve,le]),u(function(){Tn&&bn(Tn.map(function(e){return{_id:e._id,name:e.name}}))},[Tn,bn]),u(function(){var e;console.log("userDetails",ce),dn(ce),console.log("llmStudioUrl",le),console.log("audacyBackendUrl",ue),P.getState().setLlmStudioUrl(le),P.getState().setAudacyBackendUrl(ue),P.getState().setRbacConfig(me),P.getState().setAuditLogConfig(fe),P.getState().setBaseModeName((null==Ce?void 0:Ce.modeNameFromURL)||null),mn(pe),fn(de),f.getState().setAppIntegrationId(null!=ve?ve:null),f.getState().setBackwardCompatibility(he),f.getState().setCognitiveCompareCompatibility(null!=ye&&ye),f.getState().setToken(null!==(e=null==ce?void 0:ce.accessToken)&&void 0!==e?e:null)},[ce,dn,le,ue,me,fe,pe,mn,de,fn,ve,he,ye,Ce]),u(function(){(null==ce?void 0:ce.accessToken)&&le&&b()},[ve,null==ce?void 0:ce.accessToken,le]);var jn=function(n){return void 0===n&&(n=!0),t(ie,void 0,void 0,function(){var t,o,s,a,i,c,l,u,d,p,m,v;return r(this,function(r){switch(r.label){case 0:n&&qe(!0),je(null),r.label=1;case 1:return r.trys.push([1,7,8,9]),[4,Sn(me.applicationId)];case 2:r.sent(),t=function(n){var r=G.getState().hasPermission("ilotj.scope.view",n.id),o=n.children?n.children.map(function(e){return t(e)}).filter(function(e){return null!==e}):[];return r||0!==o.length?e(e({},n),{hasAccess:r,children:o}):null},o=void 0,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,T(ve,ce.accessToken)];case 4:return o=r.sent(),[3,6];case 5:if(s=r.sent(),403===(null===(m=null==s?void 0:s.response)||void 0===m?void 0:m.status))return De(null),We(me.applicationResourceId||null),Xe(!0),[2];throw s;case 6:return o&&o.data&&o.data.data&&(a=o.data.data,Array.isArray(a)&&(a=a.length>0?a[0]:null),a?(i=t(a))?(We(null),Xe(!1),De({data:i}),an.current?(Re(an.current),ze("learnings"),an.current=null):(c=f.getState().selectedRuleSetId,l=c?M(i,c):null,c&&l||(u=function(e){if(e.hasAccess)return e;for(var n=0,t=e.children||[];n<t.length;n++){var r=t[n],o=u(r);if(o)return o}return null},d=u(i),Re(d?d.id:i.id)))):(We(null!==(v=a.id)&&void 0!==v?v:null),Xe(!1),De(null)):(We(null),Xe(!1),De(null))),[3,9];case 7:return p=r.sent(),console.error("Failed to fetch rule sets or permissions",p),je("Failed to load data. Please try again later."),[3,9];case 8:return qe(!1),[7];case 9:return[2]}})})};u(function(){var e;(null===(e=null==ce?void 0:ce.accessToken)||void 0===e?void 0:e.length)&&Cn?jn(!0):console.warn("Error: Trying to fetch rules without access token",ce)},[null==ce?void 0:ce.accessToken,je,Ne,me.applicationId,Cn]);var Nn=function(n,o,s){return t(ie,void 0,void 0,function(){var t,o,s,a,i,c,l,u;return r(this,function(r){switch(r.label){case 0:xe(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,R(n,ce.accessToken)];case 2:return r.sent(),f.getState().selectedRuleSetId===n&&(t=f.getState().scopeTreeData,(o=k((null==t?void 0:t.data)||null,n))&&o.length>1&&(s=o[o.length-2],Re(s),ze("learnings"))),[4,jn(!0)];case 3:return r.sent(),Pe(function(n){return e(e({},n),{isOpen:!1})}),null===(i=ln.current)||void 0===i||i.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,6];case 4:return a=r.sent(),console.error("An error occurred during scope deletion.",a),null===(c=ln.current)||void 0===c||c.show({severity:"error",summary:"Delete Failed",detail:(null===(u=null===(l=null==a?void 0:a.response)||void 0===l?void 0:l.data)||void 0===u?void 0:u.message)||"There was an error deleting the scope. Please try again."}),[3,6];case 5:return xe(!1),[7];case 6:return[2]}})})},_n=function(e,n){var t;console.log("Section Selected:",{scopeId:e,sectionId:n}),hn(((t={})[N.SECTION]="learnings"===n?null:n,t)),ze(n),Re(e),sn(!1)},Dn=_e,kn=$e?{data:{id:$e.stationId,name:$e.stationName,type:"STATION",metrics:{learningsCount:$e.learningsCount,stationsCount:0},children:[]}}:Dn,Mn=!!(null==kn?void 0:kn.data);null===(oe=null==kn?void 0:kn.data)||void 0===oe||oe.type;var Pn=G(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",me.applicationResourceId||""),Un=function(e){return t(ie,void 0,void 0,function(){var n,t,s,a,i,c,l,u,d,p;return r(this,function(r){switch(r.label){case 0:if(!(n="string"==typeof e?e:(null===(c=null===(i=f.getState().scopeTreeData)||void 0===i?void 0:i.data)||void 0===c?void 0:c.id)||Ve)&&!Je)return null===(l=ln.current)||void 0===l||l.show({severity:"error",sticky:!1,className:g.errorToast,content:o(J,{message:"Unable to identify the global scope for this access request."})}),[2];tn(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,w(n,Je)];case 2:return r.sent(),sn(!0),null===(u=ln.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:g.successToast,content:o(Y,{message:"Access request submitted successfully!"})}),[3,5];case 3:return t=r.sent(),s=null===(d=null==t?void 0:t.response)||void 0===d?void 0:d.data,a="GLOBAL_SCOPE_NOT_FOUND"===(null==s?void 0:s.code)?"Unable to identify the global scope for this access request.":(null==s?void 0:s.detail)||(null==s?void 0:s.message)||"Failed to request access. Please try again.",null===(p=ln.current)||void 0===p||p.show({severity:"error",sticky:!1,className:g.errorToast,content:o(J,{message:a})}),[3,5];case 4:return tn(!1),[7];case 5:return[2]}})})};if(Ln)return o("div",e({className:g.learningManagementContainer},{children:o(z,{})}));if(An)return o("div",e({className:g.learningManagementContainer},{children:o(K,{errorMessage:"Failed to load configuration. Please try again.",onRetry:function(){return En()},title:"Error Loading Configuration"})}));var Bn=n(n([{type:"GLOBAL",label:"Global",addChildLabel:"".concat(Z("".concat(ee,".addScope"),"Add Scope")),addChildType:"SCOPE"}],Array.from({length:wn},function(){return e({type:"SCOPE",label:Z("".concat(ee,".scope"),"Scope")},!he&&{addChildLabel:Z("".concat(ne,".addSubScope"),"Add Subscope"),addChildType:"SUBSCOPE"})}),!0),he?[]:[{type:"SUBSCOPE",label:Z("".concat(ee,".subScope"),"Subscope")}],!0),qn=$e?Ie.filter(function(e){return"stations"!==e.id}):Ie;return o(B,{children:s("div",e({className:g.learningManagementContainer},{children:[o("div",e({className:g.mainWrapper},{children:Be?o(D,{}):Oe?s("div",e({className:g.errorContainer},{children:[o("div",e({className:g.errorTitle},{children:"Error Loading Data"})),o("p",e({className:g.errorDesc},{children:Oe})),o("button",e({onClick:function(){return jn(!0)},className:g.tryAgainBtn},{children:"Try Again"}))]})):Mn?o(h,{onOpenCreateModal:function(){return Pe({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,n,t){return Pe({isOpen:!0,type:n,parentId:e,parentName:t})},onRenameChild:function(e,n){return Pe({isOpen:!0,type:"RENAME",scopeId:e,initialName:n})},onDeleteChild:function(e,n,o){return t(ie,void 0,void 0,function(){var t,s,a;return r(this,function(r){switch(r.label){case 0:return t=f.getState().scopeTreeData,s=k((null==t?void 0:t.data)||null,e),a=!!s&&3===s.length,0!==o?[3,2]:[4,Nn(e)];case 1:return r.sent(),[3,3];case 2:Pe({isOpen:!0,type:"DELETE",scopeId:e,initialName:n,isSubscope:a}),r.label=3;case 3:return[2]}})})},canDeleteScope:function(e){return yn("ilotj.scope.delete",e)},canEditScope:function(e){return yn("ilotj.scope.edit",e)},canCreateScope:function(e){return yn("ilotj.scope.create",e)},onSectionSelect:_n,activeSectionId:Qe,scopeTreeData:kn,sectionsConfig:qn,onViewStation:function(e){_n(e.stationId,"learnings")},onRefreshRuleSets:function(e,n){void 0===e&&(e=!0),n&&(an.current=n),jn(e)},nodeTypesConfig:Bn,app_integration_id:ve,token:ce.accessToken,modeId:be,onRequestAccess:Un,isRequestingAccess:nn,isAccessRequested:on}):o(S,{onCreate:function(){return Pe({isOpen:!0,type:"GLOBAL"})},title:Z("".concat(te,".title"),"No Global Scope has been added!"),desc:Z("".concat(te,".desc"),"Start by creating a Global scope to define base learnings that apply across all stations."),button:Z("".concat(te,".createGlobalScope"),"Create Global Scope"),canCreateRule:Pn,noAccessTitle:Z("".concat(te,".noAccessTitle"),"Access Restricted"),noAccessDesc:Z("".concat(te,".noAccessDesc"),"You do not have access for this application."),requestAccessButton:Z("".concat(te,".requestAccessButton"),"Request Access"),requestSentButton:Z("".concat(te,".requestSentButton"),"Request Sent"),onRequestAccess:Un,isRequestingAccess:nn,isAccessRequested:on})})),o(v,{ref:ln,pt:{root:{style:{zIndex:9999}}}}),he&&Me.isOpen&&"DELETE"!==Me.type&&"RENAME"!==Me.type?o(q,{isOpen:!0,onClose:function(){return Pe(e(e({},Me),{isOpen:!1}))},onSubmit:function(n){return t(ie,void 0,void 0,function(){var t,o,s,a,i,c,l,u,d,p,m,v,g,h,S,y,b,C,T,E;return r(this,function(r){switch(r.label){case 0:xe(!0),t=f.getState().backwardCompatibility,r.label=1;case 1:return r.trys.push([1,12,13,14]),o=void 0,t&&"object"==typeof n?o=n:(s=n,a="SCOPE"===Me.type&&Me.parentId,i=a?"genreRuleSet":Me.type,o={topic:i,scope_reference_id:null,scopeDescription:"demo",parentScopeId:Me.parentId||null,scopeName:s,scopeReferenceMetadata:{},applicationMappingId:ve}),[4,A(o,ce.accessToken)];case 2:if(c=r.sent(),!(l=null===(h=null==c?void 0:c.data)||void 0===h?void 0:h.scopeId))return[3,10];if(an.current=l,u=t&&(null===(S=o.topic)||void 0===S?void 0:S.toLowerCase().includes("genre")),d=!t&&"GLOBAL"!==Me.type&&Me.parentId,!u&&!d)return[3,10];if(!(p=t?null===(b=null===(y=f.getState().scopeTreeData)||void 0===y?void 0:y.data)||void 0===b?void 0:b.id:Me.parentId))return[3,10];if(!he)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,L({source_scope_id:p,target_scope_id:l})];case 4:return r.sent(),[3,6];case 5:return m=r.sent(),console.error("Failed to inherit rules for the new scope:",m),[3,6];case 6:return[3,10];case 7:return r.trys.push([7,9,,10]),[4,I({source_scope_id:p,target_scope_id:l,application_mapping_id:ve||"",is_copy_parent_variant_id:!1})];case 8:return r.sent(),[3,10];case 9:return v=r.sent(),console.error("Failed to inherit rules for the new scope:",v),[3,10];case 10:return[4,jn(!0)];case 11:return r.sent(),Pe(function(n){return e(e({},n),{isOpen:!1})}),[3,14];case 12:throw g=r.sent(),console.error("An error occurred during scope creation.",g),null===(C=ln.current)||void 0===C||C.show({severity:"error",summary:"Creation Failed",detail:(null===(E=null===(T=null==g?void 0:g.response)||void 0===T?void 0:T.data)||void 0===E?void 0:E.message)||"There was an error creating the scope. Please try again."}),g;case 13:return xe(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:Mn,canCreateGlobal:Pn,globalScopeId:null!==(ae=null===(se=null==_e?void 0:_e.data)||void 0===se?void 0:se.id)&&void 0!==ae?ae:null}):s(a,{children:[o(Q,{isOpen:Me.isOpen&&"DELETE"!==Me.type&&"RENAME"!==Me.type,onClose:function(){return Pe(e(e({},Me),{isOpen:!1}))},onCreate:function(e){e&&(an.current=e),jn(!0)},hasGlobalRuleSet:Mn,parentId:Me.parentId}),o(X,{isOpen:Me.isOpen&&"RENAME"===Me.type,onClose:function(){return Pe(e(e({},Me),{isOpen:!1}))},onSave:function(n){return t(ie,void 0,void 0,function(){var t,s,a,i,c,l;return r(this,function(r){switch(r.label){case 0:xe(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),Me.scopeId?(t=f.getState().backwardCompatibility,s=t?{scope_id:Me.scopeId,scope_name:n}:{scope_id:Me.scopeId,scope_type:"Custom",scope_name:n,application_mapping_id:ve},[4,E(s,ce.accessToken)]):[2];case 2:return r.sent(),[4,jn(!0)];case 3:return r.sent(),Pe(function(n){return e(e({},n),{isOpen:!1})}),[3,6];case 4:throw a=r.sent(),console.error("An error occurred during scope rename.",a),null===(i=ln.current)||void 0===i||i.show({severity:"error",sticky:!1,className:g.errorToast,content:o(J,{message:(null===(l=null===(c=null==a?void 0:a.response)||void 0===c?void 0:c.data)||void 0===l?void 0:l.message)||"There was an error renaming the scope. Please try again."})}),a;case 5:return xe(!1),[7];case 6:return[2]}})})},initialName:Me.initialName})]}),o(_,{isOpen:Me.isOpen&&"DELETE"===Me.type,onCancel:function(){return Pe(e(e({},Me),{isOpen:!1}))},onConfirm:function(){return Nn(Me.scopeId,Me.initialName,Me.isSubscope)},title:"Delete Scope",description:s(a,{children:["Deleting ",o("span",e({className:g.highlight},{children:Me.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:Fe})]}))})}export{re as default};
|
|
2
2
|
//# sourceMappingURL=LearningManagement.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"tslib";import"react/jsx-runtime";import"react";import"lucide-react";import"./store/useLearningTemplateStore.js";import"primereact/toast";import"./apis/scopeApis.js";import"./store/usePermissionsStore.js";import"./store/useLMSConfigStore.js";import"./components/ToolTip.js";import"./store/useAuthStore.js";import"@mui/material";import"@mui/icons-material/Check";import"@mui/icons-material/CloseRounded";import{QueryClient as t}from"@tanstack/react-query";import"./store/useEnvStore.js";import"date-fns/format";import"date-fns/isValid";import"date-fns/parseISO";import"framer-motion";import"../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../IL-OTJ/_components/InputDataReasoningCard.js";import"../IL-OTJ/_components/TooltipComponent.js";import"../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../IL-OTJ/store/CitationsContext.js";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"react-icons/bs";import"../IL-marketplace/components/GuidelineIconButton.js";import"@radix-ui/react-tooltip";import"@e-llm-studio/creative-workspace-ui-component";import"../IL-marketplace/queryClient.js";import"./store/useAppSecRolesStore.js";import"./config.js";import"../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import"./store/useConfigStore.js";import"appsec-ui";import"react-dom";import"./components/StationOnboarding/InputField.js";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"./AuditLog/ChangeLogDiff.js";import"./hooks/useLearningTemplateQueryParams.js";import"react-router-dom";new t;
|
|
2
|
+
//# sourceMappingURL=LearningManagementTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LearningManagementTest.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useEffect as n}from"react";import s from"./RuleContent/RuleContent.js";import i from"./StationsContent/StationsContent.js";import c from"./RBAC/AccessManagementPanel.js";import"appsec-ui";import"./store/useAuthStore.js";import"./store/usePermissionsStore.js";import{useLearningTemplateStore as a}from"./store/useLearningTemplateStore.js";import r from"./store/useEnvStore.js";import l from"./styles/LearningTemplateLayout.module.css.js";import{findNodeById as u,mapScopeChildrenToStations as d}from"./utils/treeUtils.js";import m from"./SidebarWrapper.js";import p from"./components/StationOnboarding/StationOnboardModal.js";import f from"./AuditLog/AuditLog.js";import S from"./components/EmptyLearningState.js";import{dt as v}from"./store/useLMSConfigStore.js";import{EMPTY_STATE_DT_PATH as g}from"./constants.js";var A=function(A){var C,R,h=A.onOpenCreateModal,j=A.onRefreshRuleSets,q=A.scopeTreeData,D=A.onAddChild,I=A.onRenameChild,T=A.onDeleteChild,w=A.canDeleteScope,M=A.canEditScope,O=A.canCreateScope,L=A.onSectionSelect,b=A.onViewStation,y=A.activeSectionId,B=void 0===y?"learnings":y,k=A.sectionsConfig,_=A.nodeTypesConfig,N=A.app_integration_id,E=A.token,U=A.modeId,x=A.onRequestAccess,P=A.isRequestingAccess,V=A.isAccessRequested,Y=a(function(e){return e.isStationModalOpen}),W=a(function(e){return e.setStationModalOpen}),z=a(function(e){return e.isStationOnboardModalTriggered}),F=a(function(e){return e.setIsStationOnboardModalTriggered}),G=a(function(e){return e.selectedRuleSetId}),H=a(function(e){return e.rawAuditRuleData}),J=r(function(e){return e.auditLogConfig});a(function(e){return e.ruleData});var K=G?u((null==q?void 0:q.data)||null,G):null;return Boolean((null===(C=null==q?void 0:q.data)||void 0===C?void 0:C.id)&&G===q.data.id),n(function(){z&&W(!0)},[z,W,F]),t("div",e({className:l.container},{children:[o(m,{onOpenCreateModal:h,onRefreshRuleSets:j,scopeTreeData:q,onAddChild:D,onRenameChild:I,onDeleteChild:T,canDeleteScope:w,canEditScope:M,canCreateScope:O,onSectionSelect:L,activeSectionId:B,sectionsConfig:k,nodeTypesConfig:_}),o("div",e({id:"rule-template-layout-content",className:"".concat(l.content," relative flex-1 overflow-hidden")},{children:"stations"===B?o(i,{scopeId:G||"",scopeName:(null==K?void 0:K.name)||"Unknown Scope",stationsCount:null===(R=null==K?void 0:K.metrics)||void 0===R?void 0:R.stationsCount,stations:d(K),onViewStation:b}):"access"===B?o(c,{selectedRuleSetId:G,scopeName:(null==K?void 0:K.name)||"Unknown Scope"}):"history"===B?(null==J?void 0:J.configId)?o(f,{configId:J.configId,scopeId:G||void 0,scopeName:(null==K?void 0:K.name)||"Unknown Scope",ruleData:H}):null:K&&!1===K.hasAccess?o(S,{onCreate:function(){},title:v("".concat(g,".noAccessTitle"),"Access Restricted"),desc:v("".concat(g,".noAccessDesc"),"You do not have access to view this ".concat(null==K?void 0:K.name," learnings.")),button:"",canCreateRule:!1,noAccessTitle:v("".concat(g,".noAccessTitle"),"Access Restricted"),noAccessDesc:v("".concat(g,".noAccessDesc"),"You do not have access to view this ".concat(null==K?void 0:K.name," learnings.")),requestAccessButton:v("".concat(g,".requestAccessButton"),"Request Access"),requestSentButton:v("".concat(g,".requestSentButton"),"Request Sent"),onRequestAccess:function(){return null==x?void 0:x(G)},isRequestingAccess:P,isAccessRequested:V}):o(s,{onRefreshRuleSets:j,app_integration_id:N,token:E,modeId:U})})),o(p,{isOpen:Y,onClose:function(){W(!1),F(!1)},onBoardStation:function(e){j(!0,e)},app_integration_id:N,token:E})]}))};export{A as default};
|
|
2
2
|
//# sourceMappingURL=LearningTemplateLayout.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import n from"./AccessPanel.js";import i from"../store/useEnvStore.js";import s from"./AccessPanel.module.css.js";import{dt as l}from"../store/useLMSConfigStore.js";var r=function(r){var a=r.selectedRuleSetId,c=r.scopeName,d=(null==c?void 0:c.trim())||"Selected",m=i(function(e){return e.rbacConfig});(null==m?void 0:m.applicationModuleId)||null==m||m.moduleId;var p=null==m?void 0:m.moduleId;return t("div",e({className:s.accessManagement},{children:[o("div",e({style:{padding:"24px 24px 0",fontFamily:"Arial, sans-serif"}},{children:t("div",e({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[o("h1",e({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:l("access.title","".concat(d," - Access Management"),{scope_name:d})})),o("p",e({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:l("access.subtitle","Manage users and groups within the ".concat(d," scope."),{scope_name:d})}))]}))})),o("div",e({className:s.accessTabPanel,role:"tabpanel"},{children:o(n,{ruleSetId:a,moduleId:p,mode:"both"})}))]}))};export{r as default};
|
|
2
2
|
//# sourceMappingURL=AccessManagementPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{RbacQueryProvider as o,AppsecProvider as t,AccessListPanel as n}from"appsec-ui";import c from"../store/useAuthStore.js";import{usePermissionsStore as s}from"../store/usePermissionsStore.js";import{useLearningTemplateStore as a}from"../store/useLearningTemplateStore.js";import i from"./AccessPanel.module.css.js";import u from"../store/useEnvStore.js";var d=function(d){var m=d.ruleSetId,l=d.resourceId,p=d.moduleId,f=d.mode,v=void 0===f?"both":f,g=c(function(e){return e.user}),h=u(function(e){return e.rbacConfig}),b=u(function(e){return e.appsecRbacUrl}),j=u(function(e){return e.appsecBaseUrl}),I=null==g?void 0:g.accessToken,U=s(function(e){return e.hasPermission}),S=a(function(e){return e.backwardCompatibility}),A=l||m||void 0,P=Boolean(A),N="ilotj.scope.access",k=P&&U("".concat(N,".user.add"),A),E=P&&U("".concat(N,".user.edit"),A),G=P&&U("".concat(N,".user.remove"),A),T=P&&U("".concat(N,".group.add"),A),x=P&&U("".concat(N,".group.edit"),A),y=P&&U("".concat(N,".group.remove"),A);if(!(A&&h&&b&&j))return r("div",e({className:i.accessPanel},{children:r("p",e({className:i.emptyState},{children:"Waiting for access configuration..."}))}));var B=p||h.moduleId,C=S?"users":v;return r("div",e({className:i.accessPanel},{children:r(o,{children:r(t,e({appId:h.applicationName,baseUrl:b,appsecUrl:j,mode:"manage",getAuthToken:function(){return null!=I?I:""}},{children:r(n,{resourceId:A,moduleId:B,mode:C,canAddUser:k,canEditUser:E,canDeleteUser:G,canAddGroup:T,canEditGroup:x,canDeleteGroup:y})}))})}))};export{d as default};
|
|
2
2
|
//# sourceMappingURL=AccessPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as r,jsx as
|
|
1
|
+
import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as l}from"react";import{Search as u,X as a}from"lucide-react";import{useApproverSearchQuery as c,useGroupSearchQuery as d}from"../queries/useApprovalQueries.js";import p from"../store/useAuthStore.js";var s={root:{marginLeft:"1.5rem"},sectionLabel:{fontSize:"0.875rem",fontWeight:500,color:"#19213D"},requiredMark:{marginRight:"0.25rem",fontSize:"1rem",fontWeight:600,color:"#8F2C23"},dropdownWrapper:{position:"relative",marginTop:"0.375rem"},inputShell:{display:"flex",minHeight:"38px",width:"100%",cursor:"text",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",borderRadius:"0.375rem",border:"1px solid #E2E8F0",padding:"0.375rem 0.5rem",boxSizing:"border-box",transition:"border-color 150ms ease-in-out, box-shadow 150ms ease-in-out"},searchIcon:{flexShrink:0,color:"#9CA3AF"},chip:{display:"flex",alignItems:"center",gap:"0.25rem",borderRadius:"9999px",backgroundColor:"#EFF6FF",padding:"0.125rem 0.625rem",fontSize:"0.75rem",fontWeight:500,color:"#1D4ED8"},chipRemoveButton:{marginLeft:"0.125rem",border:"none",borderRadius:"9999px",background:"transparent",padding:0,cursor:"pointer",outline:"none"},input:{minWidth:"120px",flex:1,border:"none",backgroundColor:"transparent",fontSize:"0.875rem",color:"#19213D",outline:"none"},dropdown:{position:"absolute",zIndex:50,marginTop:"0.25rem",maxHeight:"12rem",width:"100%",overflowY:"auto",borderRadius:"0.375rem",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF",padding:"0.25rem 0",listStyle:"none",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",boxSizing:"border-box"},skeletonItem:{padding:"0.5rem 0.75rem"},skeletonLinePrimary:{height:"1rem",width:"75%",borderRadius:"0.25rem",backgroundColor:"#E5E7EB"},skeletonLineSecondary:{height:"0.75rem",width:"50%",borderRadius:"0.25rem",backgroundColor:"#E5E7EB",marginTop:"0.375rem"},checkboxOption:{display:"flex",alignItems:"center",gap:"0.625rem",width:"100%",padding:"0.5rem 0.75rem",cursor:"pointer",boxSizing:"border-box"},checkboxInput:{width:"14px",height:"14px",flexShrink:0,cursor:"pointer",accentColor:"#2563EB",margin:0},optionTitle:{fontSize:"0.875rem",fontWeight:500,color:"#19213D",margin:0},optionSubtitle:{fontSize:"0.75rem",color:"#666F8D",margin:0}},m=function(m){var h,f=m.selectedApprovers,g=m.selectedGroupOfApprovers,b=m.onApproversChange,v=m.onGroupsChange,y=p(function(e){return e.user}),x=(null==y?void 0:y.firstname)?"".concat(y.firstname," ").concat(null!==(h=y.lastname)&&void 0!==h?h:"").trim():null==y?void 0:y.email,F=t(""),k=F[0],E=F[1],S=t(""),w=S[0],C=S[1],L=t(!1),D=L[0],B=L[1],z=i(null),I=i(null),M=t(""),_=M[0],T=M[1],R=t(""),A=R[0],W=R[1],O=t(!1),j=O[0],P=O[1],q=i(null),G=i(null),H=t(!1),Y=H[0],Q=H[1],J=t(!1),K=J[0],N=J[1],U=t(null),V=U[0],X=U[1],Z=t(null),$=Z[0],ee=Z[1],ne=t(null),re=ne[0],oe=ne[1],te=t(null),ie=te[0],le=te[1];l(function(){if(!k.trim())return C(""),void B(!1);var e=setTimeout(function(){return C(k)},500);return function(){return clearTimeout(e)}},[k]),l(function(){var e=setTimeout(function(){return W(_)},300);return function(){return clearTimeout(e)}},[_]);var ue=c(w),ae=ue.data,ce=ue.isFetching,de=(ae||[]).filter(function(e){return!f.some(function(n){return n.id===e._id})&&e.email!==(null==y?void 0:y.email)}).slice(0,10).map(function(e){var n,r,o,t;return{id:e._id,email:null!==(n=e.email)&&void 0!==n?n:"",name:(null===(r=e.firstname)||void 0===r?void 0:r.trim())?"".concat(e.firstname," ").concat(null!==(o=e.lastname)&&void 0!==o?o:"").trim():null!==(t=e.email)&&void 0!==t?t:""}});l(function(){w.trim()&&(ce||de.length>0)&&B(!0)},[ce,de.length,w]);var pe=d(A),se=pe.data,me=pe.isFetching,he=(se||[]).filter(function(e){return!g.some(function(n){return n._id===e._id})}).slice(0,10);l(function(){K&&(me||he.length>0)&&P(!0)},[me,he.length,K]),l(function(){var e=function(e){z.current&&!z.current.contains(e.target)&&B(!1),q.current&&!q.current.contains(e.target)&&P(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);return r("div",e({style:s.root},{children:[o("label",e({htmlFor:"approver-search-input",style:s.sectionLabel},{children:"Select who can approve"})),r("div",e({ref:z,style:s.dropdownWrapper},{children:[r("label",e({htmlFor:"approver-search-input",style:e(e({},s.inputShell),{borderColor:Y?"#2563EB":"#E2E8F0",boxShadow:Y?"0 0 0 1px #2563EB":"none"})},{children:[o(u,{size:14,style:s.searchIcon}),(null==y?void 0:y.email)&&r("span",e({style:e(e({},s.chip),{backgroundColor:"#F1F5F9",color:"#64748B"})},{children:[x," (You)"]})),f.map(function(n){return r("span",e({style:s.chip,title:n.email},{children:[n.name||n.email,o("button",e({type:"button",onMouseDown:function(e){var r;e.preventDefault(),r=n.id,b(f.filter(function(e){return e.id!==r}))},onMouseEnter:function(){return oe(n.id)},onMouseLeave:function(){return oe(null)},style:e(e({},s.chipRemoveButton),{backgroundColor:re===n.id?"#DBEAFE":"transparent"})},{children:o(a,{size:12})}))]}),n.id)}),o("input",{ref:I,id:"approver-search-input",type:"text",value:k,onChange:function(e){return E(e.target.value)},onFocus:function(){Q(!0),(de.length>0||ce)&&B(!0)},onBlur:function(){return Q(!1)},placeholder:0===f.length?"Search by name or email...":"",style:s.input})]})),D&&(ce||de.length>0)&&o("ul",e({style:s.dropdown},{children:ce?[1,2,3,4].map(function(n){return r("li",e({style:s.skeletonItem},{children:[o("div",{style:s.skeletonLinePrimary}),o("div",{style:s.skeletonLineSecondary})]}),n)}):de.map(function(t){return o("li",{children:r("div",e({onMouseDown:function(e){e.preventDefault(),function(e){var r;b(n(n([],f,!0),[e],!1)),E(""),B(!1),null===(r=I.current)||void 0===r||r.focus()}(t)},onMouseEnter:function(){return X(t.id)},onMouseLeave:function(){return X(null)},style:e(e({},s.checkboxOption),{backgroundColor:V===t.id?"#F1F5F9":"transparent"})},{children:[o("input",{type:"checkbox",checked:!1,onChange:function(){},style:s.checkboxInput}),r("div",{children:[o("p",e({style:s.optionTitle},{children:t.name})),o("p",e({style:s.optionSubtitle},{children:t.email}))]})]}))},t.id)})}))]})),o("label",e({htmlFor:"group-search-input",style:e(e({},s.sectionLabel),{display:"inline-block",marginTop:"0.375rem"})},{children:"Select user group who can approve"})),r("div",e({ref:q,style:s.dropdownWrapper},{children:[r("label",e({htmlFor:"group-search-input",style:e(e({},s.inputShell),{borderColor:K?"#2563EB":"#E2E8F0",boxShadow:K?"0 0 0 1px #2563EB":"none"})},{children:[o(u,{size:14,style:s.searchIcon}),g.map(function(n){return r("span",e({style:s.chip},{children:[n.name,o("button",e({type:"button",onMouseDown:function(e){var r;e.preventDefault(),r=n._id,v(g.filter(function(e){return e._id!==r}))},onMouseEnter:function(){return le(n._id)},onMouseLeave:function(){return le(null)},style:e(e({},s.chipRemoveButton),{backgroundColor:ie===n._id?"#DBEAFE":"transparent"})},{children:o(a,{size:12})}))]}),n._id)}),o("input",{ref:G,id:"group-search-input",type:"text",value:_,onChange:function(e){return T(e.target.value)},onFocus:function(){N(!0)},onBlur:function(){return N(!1)},placeholder:0===g.length?"Search by group name...":"",style:s.input})]})),j&&(me||he.length>0)&&o("ul",e({style:s.dropdown},{children:me?[1,2,3,4].map(function(n){return r("li",e({style:s.skeletonItem},{children:[o("div",{style:s.skeletonLinePrimary}),o("div",{style:s.skeletonLineSecondary})]}),n)}):he.map(function(t){return o("li",{children:r("div",e({onMouseDown:function(e){e.preventDefault(),function(e){var r;v(n(n([],g,!0),[e],!1)),T(""),P(!1),null===(r=G.current)||void 0===r||r.focus()}(t)},onMouseEnter:function(){return ee(t._id)},onMouseLeave:function(){return ee(null)},style:e(e({},s.checkboxOption),{backgroundColor:$===t._id?"#F1F5F9":"transparent"})},{children:[o("input",{type:"checkbox",checked:!1,onChange:function(){},style:s.checkboxInput}),r("div",{children:[o("p",e({style:s.optionTitle},{children:t.name})),o("p",e({style:s.optionSubtitle},{children:t.description}))]})]}))},t._id)})}))]}))]}))};export{m as default};
|
|
2
2
|
//# sourceMappingURL=AddScopeApprovalSearchComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as o,__assign as r,__spreadArray as i}from"tslib";import{jsx as n,jsxs as t,Fragment as l}from"react/jsx-runtime";import{useState as a,useRef as d,useEffect as c}from"react";import{useMutation as s}from"@tanstack/react-query";import{X as p,Loader2 as u}from"lucide-react";import{Toast as m}from"primereact/toast";import{v4 as f}from"uuid";import h from"../components/StationOnboarding/StationAutocomplete.js";import g from"./AddScopeApprovalSearchComponent.js";import v from"../components/ScopeSkeletonLoader.js";import{Input as y}from"@mui/material";import b from"../store/useAuthStore.js";import{useAppSecRolesStore as S}from"../store/useAppSecRolesStore.js";import C from"../store/useEnvStore.js";import{createRuleSet as x}from"../apis/scopeApis.js";import{useLearningTemplateStore as w}from"../store/useLearningTemplateStore.js";import{IL_CONFIG_CONSTANTS as _}from"../config.js";var k=function(k){var A=k.isOpen,R=k.onClose,D=k.onCreate,I=k.hasGlobalRuleSet,q=k.parentId,z=a(""),F=z[0],j=z[1],E=a(""),L=E[0],B=E[1],N=a({}),W=N[0],G=N[1],P=d(null),O=b().user,T=S(function(e){return e.roles}),M=C(function(e){return e.rbacConfig}),K=a(null),U=K[0],H=K[1],J=a("approval_required"),Q=J[0],V=J[1],X=a([]),Y=X[0],Z=X[1],$=a([]),ee=$[0],oe=$[1],re=a(""),ie=re[0],ne=re[1],te=s({mutationFn:function(r){return e(void 0,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return[4,x(r,null!==(e=null==O?void 0:O.accessToken)&&void 0!==e?e:"")];case 1:return[2,o.sent()]}})})},onSuccess:function(r){return e(void 0,void 0,void 0,function(){return o(this,function(e){return console.log("Rule Set Created Successfully",r),[2]})})}}),le=te.data,ae=te.isPending,de=te.mutateAsync;return c(function(){A&&(j(""),B(""),G({}),H(null),V("approval_required"),Z([]),oe([]),ne(""))},[A]),A?ae?n(v,{isLoading:ae}):t("div",r({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[n(m,{ref:P}),t("div",r({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[t("div",r({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[t("div",{children:[n("h2",r({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:"Add Scope"})),n("p",r({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."}))]}),n("button",r({onClick:R,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:n(p,{size:24})}))]})),t("div",r({style:{display:"flex",flexDirection:"column",gap:20}},{children:[t("div",r({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[t("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[n("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),"Scope Name"]})),"Custom"===F?n(h,{value:L,onChange:function(e){if(e.length>50)return B(e.slice(0,50)),void G(function(e){return r(r({},e),{name:"Scope Name must be 50 characters or fewer"})});B(e),G(function(e){return r(r({},e),{name:void 0})})},onStationSelect:function(e){H(e)},style:{border:W.name?"1px solid #8F2C23":void 0}}):n(y,{value:L,onChange:function(e){var o=e.target.value;if(o.length>50)return B(o.slice(0,50)),void G(function(e){return r(r({},e),{name:"Scope Name must be 50 characters or fewer"})});B(o),G(function(e){return r(r({},e),{name:void 0})})},style:{border:"1px solid ".concat(W.name?"#8F2C23":"#F0F2F5")},placeholder:"e.g. Global Learnings"}),W.name&&n("p",r({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:W.name}))]})),t("div",r({style:{display:"flex",flexDirection:"column",gap:12}},{children:[t("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[n("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),"Learning Approval Settings"]})),t("div",r({role:"radio","aria-checked":"approval_required"===Q,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return V("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||V("approval_required")}},{children:[t("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[n("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===Q?"#2563EB":"#CBD5E1")}},{children:"approval_required"===Q&&n("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),n("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:"Approval Required Before Publishing"}))]})),n("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:"Learnings require approval before publishing."}))]})),"approval_required"===Q&&n(g,{selectedApprovers:Y,selectedGroupOfApprovers:ee,onApproversChange:Z,onGroupsChange:oe}),ie&&n("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#8F2C23"}},{children:ie})),t("div",r({role:"radio","aria-checked":"publish_without"===Q,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){V("publish_without"),ne("")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(V("publish_without"),ne(""))}},{children:[t("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[n("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===Q?"#2563EB":"#CBD5E1")}},{children:"publish_without"===Q&&n("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),n("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:"Publish Without Approval"}))]})),n("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:"Learnings can be published directly."}))]}))]})),t("div",r({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[n("button",r({onClick:R,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:ae?.5:1},disabled:ae},{children:"Cancel"})),n("button",r({onClick:function(){return e(void 0,void 0,void 0,function(){var e,r,n,t,l,a,d,c,s,p,u,m;return o(this,function(o){if(e={},L.trim()?L.length>50&&(e.name="Scope Name must be 50 characters or fewer"):e.name="Scope Name is required","approval_required"===Q&&0===Y.length&&0===ee.length&&ne("Please select at least one approver or approver group."),e.name)return G(e),[2];if("approval_required"===Q&&0===Y.length&&0===ee.length)return[2];ne("");try{r="approval_required"===Q,n=w.getState().backwardCompatibility,t=n?{topic:I?"genreRuleSet":"globalRuleSet",customScopeGroupName:_.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:L,parentScopeId:null,customScopeName:L,customScopeId:f(),createByName:(null==O?void 0:O.firstname)||"System",createdBy:(null==O?void 0:O.email)||"system@audacy.com",approvalRequired:r,appsecData:{application:null==M?void 0:M.applicationId,module:null==M?void 0:M.moduleId,roles:i(i([],r?[{users:Y.map(function(e){return e.email}),groups:ee.map(function(e){return e._id}),role:null!==(a=null===(l=T.find(function(e){return"Learning Manager"===e.name}))||void 0===l?void 0:l._id)&&void 0!==a?a:""}]:[],!0),[{users:[null==O?void 0:O.email],groups:[],role:null!==(c=null===(d=T.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===d?void 0:d._id)&&void 0!==c?c:""}],!1)}}:{topic:I?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:L,parentScopeId:null!=q?q:null,scopeName:L,scopeReferenceMetadata:{},applicationMappingId:w.getState().app_integration_id},console.log("Add Scope payload:",t),de(t),D(null===(s=null==le?void 0:le.data)||void 0===s?void 0:s.scopeId),R()}catch(e){console.error("An error occurred during scope creation.",e),null===(p=P.current)||void 0===p||p.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(m=null===(u=null==e?void 0:e.response)||void 0===u?void 0:u.data)||void 0===m?void 0:m.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:ae||"Custom"===F&&!U?.5:1},disabled:ae||"Custom"===F&&!U},{children:ae?t(l,{children:[n(u,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):"Create Scope"}))]}))]}))]}))]})):null};export{k as default};
|
|
1
|
+
import{__awaiter as e,__generator as o,__assign as n,__spreadArray as r}from"tslib";import{jsxs as t,jsx as i,Fragment as a}from"react/jsx-runtime";import{useState as l,useRef as s,useEffect as c}from"react";import{useMutation as d}from"@tanstack/react-query";import{X as u,Loader2 as p}from"lucide-react";import{Toast as m}from"primereact/toast";import{v4 as f}from"uuid";import h from"../components/StationOnboarding/StationAutocomplete.js";import g from"./AddScopeApprovalSearchComponent.js";import v from"../components/ScopeSkeletonLoader.js";import{Input as b}from"@mui/material";import y from"../store/useAuthStore.js";import{useAppSecRolesStore as S}from"../store/useAppSecRolesStore.js";import C from"../store/useEnvStore.js";import{createRuleSet as x,inheritScope as _}from"../apis/scopeApis.js";import{useLearningTemplateStore as w}from"../store/useLearningTemplateStore.js";import{IL_CONFIG_CONSTANTS as k}from"../config.js";import{dt as A}from"../store/useLMSConfigStore.js";import{MIDDLE_DRAWER_ADD_SCOPE_DT_PATH as D,MIDDLE_DRAWER_APPROVAL_SETTINGS_DT_PATH as I}from"../constants.js";var R=function(R){var E=R.isOpen,B=R.onClose,j=R.onCreate,q=R.hasGlobalRuleSet,F=R.parentId,z=R.isILMarketplace,L=void 0!==z&&z,P=R.onCreateMarketplaceDomain,T=R.childType,W=R.parentName,N=l(""),O=N[0],G=N[1],M=l(""),U=M[0],K=M[1],H=l({}),J=H[0],Q=H[1],V=s(null),X=y().user,Y=S(function(e){return e.roles}),Z=C(function(e){return e.rbacConfig}),$=l(!1),ee=$[0],oe=$[1],ne=l(null),re=ne[0],te=ne[1],ie=l("approval_required"),ae=ie[0],le=ie[1],se=l([]),ce=se[0],de=se[1],ue=l([]),pe=ue[0],me=ue[1],fe=l(!1);fe[0];var he=fe[1],ge=L?"SUBSCOPE"===T?"Subdomain Name":"Domain Name":A("".concat(D,".scopeName"),"Scope Name"),ve=d({mutationFn:function(n){return e(void 0,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return[4,x(n,null!==(e=null==X?void 0:X.accessToken)&&void 0!==e?e:"")];case 1:return[2,o.sent()]}})})},onSuccess:function(n){return e(void 0,void 0,void 0,function(){var e,r;return o(this,function(o){return console.log("Rule Set Created Successfully",n),null===(e=V.current)||void 0===e||e.show({severity:"success",summary:"Scope Created",detail:(null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.message)||"Scope created successfully",life:3e3}),[2]})})},onError:function(e){var o,n,r;console.error("Create scope failed",e),null===(o=V.current)||void 0===o||o.show({severity:"error",summary:"Creation Failed",detail:(null===(r=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.message)||"There was an error creating the scope. Please try again."})}});ve.data;var be=ve.isPending,ye=ve.mutateAsync;return c(function(){E&&(G(""),K(""),Q({}),te(null),le("approval_required"),de([]),me([]))},[E]),E?t("div",n({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[i(m,{ref:V}),be||ee?i(v,{isLoading:be||ee}):t("div",n({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[t("div",n({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[t("div",{children:[i("h2",n({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:L?"SUBSCOPE"===T?"Add Subdomain":"Add Domain":q?A("".concat(D,".title"),"Add Scope"):A("".concat(D,".globalTitle"),"Create Global Scope")})),i("p",n({style:{margin:"4px 0 0 0",fontSize:14,fontWeight:400,color:"#666F8D"}},{children:L?W?"This ".concat("SUBSCOPE"===T?"subdomain":"domain"," will be created under '").concat(W,"'."):"This ".concat("SUBSCOPE"===T?"subdomain":"domain"," will be created under the selected parent domain."):q?A("".concat(D,".subtitle"),"This scope will be created under Global scope and will inherit its learnings by default.",{parent:"Global"}):A("".concat(D,".globalSubtitle"),"This will be your Global scope that defines the base learnings shared across all stations.")}))]}),i("button",n({onClick:B,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:i(u,{size:24})}))]})),t("div",n({style:{display:"flex",flexDirection:"column",gap:20}},{children:[t("div",n({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[t("label",n({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[i("span",n({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),ge]})),"Custom"===O?i(h,{value:U,onChange:function(e){if(e.length>50)return K(e.slice(0,50)),void Q(function(e){return n(n({},e),{name:"".concat(ge," must be 50 characters or fewer")})});K(e),Q(function(e){return n(n({},e),{name:void 0})})},onStationSelect:function(e){te(e)},style:{border:J.name?"1px solid #8F2C23":void 0}}):i(b,{value:U,onChange:function(e){var o=e.target.value;if(o.length>50)return K(o.slice(0,50)),void Q(function(e){return n(n({},e),{name:"".concat(ge," must be 50 characters or fewer")})});K(o),Q(function(e){return n(n({},e),{name:void 0})})},style:{border:"1px solid ".concat(J.name?"#8F2C23":"#F0F2F5")},placeholder:L?"e.g. MarketPlace":"e.g. Global Learnings"}),J.name&&i("p",n({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:J.name}))]})),!L&&t("div",n({style:{display:"flex",flexDirection:"column",gap:12}},{children:[t("label",n({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[i("span",n({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("".concat(I,".title"),"Learning Approval Settings")]})),t("div",n({role:"radio","aria-checked":"approval_required"===ae,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return le("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||le("approval_required")}},{children:[t("div",n({style:{display:"flex",alignItems:"center",gap:8}},{children:[i("div",n({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===ae?"#2563EB":"#CBD5E1")}},{children:"approval_required"===ae&&i("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),i("span",n({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("".concat(I,".approvalRequired.title"),"Approval Required Before Publishing")}))]})),i("p",n({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("".concat(I,".approvalRequired.subtitle"),"Learnings require approval before publishing.")}))]})),"approval_required"===ae&&i(g,{selectedApprovers:ce,selectedGroupOfApprovers:pe,onApproversChange:de,onGroupsChange:me}),t("div",n({role:"radio","aria-checked":"publish_without"===ae,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){le("publish_without")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||le("publish_without")}},{children:[t("div",n({style:{display:"flex",alignItems:"center",gap:8}},{children:[i("div",n({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===ae?"#2563EB":"#CBD5E1")}},{children:"publish_without"===ae&&i("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),i("span",n({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("".concat(I,".publishWithoutApproval.title"),"Publish Without Approval")}))]})),i("p",n({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("".concat(I,".publishWithoutApproval.subtitle"),"Learnings can be published directly.")}))]}))]})),t("div",n({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[i("button",n({onClick:B,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:be?.5:1},disabled:be},{children:A("".concat(D,".cancel"),"Cancel")})),i("button",n({onClick:function(){return e(void 0,void 0,void 0,function(){var e,n,t,i,a,l,s,c,d,u,p,m,h,g,v,b,y,S,C,x,A,D;return o(this,function(o){switch(o.label){case 0:if(e={},U.trim()?U.length>50&&(e.name="".concat(ge," must be 50 characters or fewer")):e.name="".concat(ge," is required"),e.name)return Q(e),[2];o.label=1;case 1:return o.trys.push([1,10,11,12]),oe(!0),L?[4,null==P?void 0:P(U)]:[3,3];case 2:return n=o.sent(),j(null==n?void 0:n.scopeId),B(),[2];case 3:return t="approval_required"===ae,i=w.getState().backwardCompatibility,a=ce.length>0||pe.length>0,l=i?{topic:q?"genreRuleSet":"globalRuleSet",customScopeGroupName:k.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:U,parentScopeId:null,customScopeName:U,customScopeId:f(),createByName:(null==X?void 0:X.firstname)||"System",createdBy:(null==X?void 0:X.email)||"system@audacy.com",approvalRequired:t,appsecData:{application:null==Z?void 0:Z.applicationId,module:null==Z?void 0:Z.moduleId,roles:r(r([],t&&a?[{users:ce.map(function(e){return e.email}),groups:pe.map(function(e){return e._id}),role:null!==(m=null===(p=Y.find(function(e){return"Learning Manager"===e.name}))||void 0===p?void 0:p._id)&&void 0!==m?m:""}]:[],!0),[{users:[null==X?void 0:X.email],groups:[],role:null!==(g=null===(h=Y.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===h?void 0:h._id)&&void 0!==g?g:""}],!1)}}:{topic:q?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:U,parentScopeId:null!=F?F:null,scopeName:U,scopeReferenceMetadata:{},scopeType:"Custom",applicationMappingId:w.getState().app_integration_id,approvalRequired:t,appsecData:{application:null==Z?void 0:Z.applicationId,module:null==Z?void 0:Z.moduleId,roles:r(r([],t&&a?[{users:ce.map(function(e){return e.email}),groups:pe.map(function(e){return e._id}),role:null!==(b=null===(v=Y.find(function(e){return"Learning Manager"===e.name}))||void 0===v?void 0:v._id)&&void 0!==b?b:""}]:[],!0),[{users:[null==X?void 0:X.email],groups:[],role:null!==(S=null===(y=Y.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===y?void 0:y._id)&&void 0!==S?S:""}],!1)}},console.log("Add Scope payload:",l),[4,ye(l)];case 4:if(s=o.sent(),c=null===(C=null==s?void 0:s.data)||void 0===C?void 0:C.scopeId,i||!c||!F)return[3,9];he(!0),o.label=5;case 5:return o.trys.push([5,7,8,9]),[4,_({source_scope_id:F,target_scope_id:c,application_mapping_id:w.getState().app_integration_id||"",is_copy_parent_variant_id:!1})];case 6:return o.sent(),[3,9];case 7:return d=o.sent(),console.error("Failed to inherit rules for the new scope:",d),[3,9];case 8:return he(!1),[7];case 9:return j(c),B(),[3,12];case 10:return u=o.sent(),console.error("An error occurred during scope creation.",u),null===(x=V.current)||void 0===x||x.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(D=null===(A=null==u?void 0:u.response)||void 0===A?void 0:A.data)||void 0===D?void 0:D.message)||"There was an error creating the scope. Please try again."}),[3,12];case 11:return oe(!1),[7];case 12: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:be||"Custom"===O&&!re?.5:1},disabled:be||"Custom"===O&&!re},{children:be?t(a,{children:[i(p,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):L?"SUBSCOPE"===T?"Create Subdomain":"Create Domain":A("".concat(D,".submitButton"),"Create Scope")}))]}))]}))]}))]})):null};export{R as default};
|
|
2
2
|
//# sourceMappingURL=AddScopeModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as o,jsx as n}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as o,jsx as n,Fragment as t}from"react/jsx-runtime";import r,{useState as i}from"react";import{Dialog as a,DialogContent as c,DialogContentText as l,DialogActions as d}from"@mui/material";import s from"@mui/icons-material/Check";import p from"@mui/icons-material/CloseRounded";import{X as u,Loader2 as m}from"lucide-react";import{dt as g}from"../store/useLMSConfigStore.js";import{LEARNING_DT_PATH as h}from"../constants.js";var f={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",alignItems:"center",gap:"8px",cursor:"pointer",userSelect:"none",marginTop:"16px"},checkbox:{margin:0,height:"1.125rem",width:"1.125rem",borderRadius:"0.25rem",border:"1px solid #CBD5E1",accentColor:"#DC2626",cursor:"pointer"},checkboxTextWrap:{display:"flex",alignItems:"center"},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}},b=function(b){var x=b.open,y=b.mode,v=b.onClose,C=b.onSubmit,k=b.variantInformation,F=b.ruleTitle,E=b.pendingVariants,S=void 0===E?[]:E,D=b.isPending,j=void 0!==D&&D,w=i(""),T=w[0],B=w[1],M=i(!0),z=M[0],A=M[1],L=i(!1),W=L[0],I=L[1],R=i(!1),P=R[0],_=R[1],H=i(!1),N=H[0],V=H[1],Y=i(!1),q=Y[0],G=Y[1],J=i(!1),K=J[0],O=J[1],Q="undefined"!=typeof document?document.getElementById("rule-template-layout-content"):null,U="reject"===y,X=function(){C(U?{feedback:T,deleteLearning:z}:{}),B(""),A(!1)},Z=function(){B(""),A(!1),v()},$=U?g("".concat(h,".rejectDialog.desc"),"{variant_name} will not be published or applied within the selected scope. You can provide feedback before rejecting."):g("".concat(h,".approveDialog.desc"),"{variant_name} will be published and become active within the selected scope after approval.");return o(a,e({open:x,onClose:Z,container:Q,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:[o("div",e({style:f.header},{children:[n("div",e({style:f.title},{children:"".concat(U?g("".concat(h,".rejectDialog.title"),"Reject Learning"):g("".concat(h,".approveDialog.title"),"Approve Learning"))})),n("button",e({onClick:v,onMouseEnter:function(){return I(!0)},onMouseLeave:function(){return I(!1)},style:e(e({},f.closeButton),{color:W?"#4B5563":"#9CA3AF"})},{children:n(u,{size:24})}))]})),o(c,e({sx:f.dialogContent},{children:[o(l,e({sx:f.description},{children:[!$.includes("{variant_name}")&&o(t,{children:[n("span",e({style:f.descriptionStrong},{children:k}))," "]}),$.split("{variant_name}").map(function(t,i,a){return o(r.Fragment,{children:[t,i<a.length-1&&n("span",e({style:f.descriptionStrong},{children:k}))]},i)})]})),S.length>0&&n("div",{children:S.map(function(t,r){return o("div",e({style:f.variantCard},{children:[o("div",e({style:f.variantCardTitle},{children:[F,S.length>1?" — Variant ".concat(r+1):""]})),t.description&&n("div",e({style:f.variantCardDescription},{children:t.description})),o("div",e({style:f.variantCardMono},{children:[t.whenToApply&&o("div",{children:["WTA — ",t.whenToApply]}),t.whenNotToApply&&o("div",{children:["WNTA — ",t.whenNotToApply]})]}))]}),t.variantId)})}),n(l,e({sx:f.secondaryDescription},{children:U?"":g("".concat(h,".approveDialog.footer"),"Take a moment to check the configuration before moving forward.")})),U&&o("div",e({style:f.rejectSection},{children:[o("div",{children:[n("label",e({htmlFor:"feedback",style:f.feedbackLabel},{children:g("".concat(h,".rejectDialog.feedbackTitle"),"Feedback")})),n("textarea",{id:"feedback",rows:4,value:T,onChange:function(e){return B(e.target.value)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},placeholder:"".concat(g("".concat(h,".rejectDialog.feedbackPlaceholder"),"Add feedback or reason for rejection")),style:e(e({},f.textarea),{borderColor:P?"#EF4444":"#E2E8F0",boxShadow:P?"0 0 0 2px rgba(239, 68, 68, 0.2)":"none"})})]}),o("label",e({style:f.checkboxLabel,onMouseEnter:function(){return V(!0)},onMouseLeave:function(){return V(!1)}},{children:[n("input",{type:"checkbox",checked:z,disabled:!1,onChange:function(e){return A(e.target.checked)},style:f.checkbox}),n("div",e({style:f.checkboxTextWrap},{children:n("span",e({style:e(e({},f.checkboxText),{color:N?"#0F172A":"#1E293B"})},{children:g("".concat(h,".rejectDialog.deleteCheckboxLabel"),"Also delete this learning")}))}))]}))]}))]})),o(d,e({sx:f.actions},{children:[n("button",e({onClick:Z,type:"button",disabled:j,onMouseEnter:function(){return G(!0)},onMouseLeave:function(){return G(!1)},style:e(e({},f.secondaryButton),{backgroundColor:q&&!j?"#F8FAFC":"#FFFFFF",borderColor:q&&!j?"#CBD5E1":"#E2E8F0",opacity:j?.5:1,cursor:j?"not-allowed":"pointer"})},{children:g("".concat(h,".approveDialog.cancel"),"Cancel")})),o("button",U?e({onClick:X,type:"button",disabled:j,onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},style:e(e({},f.primaryButton),{backgroundColor:j?"#EF4444":K?"#DC2626":"#EF4444",opacity:j?.7:1,cursor:j?"not-allowed":"pointer"})},{children:[j?n(m,{size:16,style:{animation:"spin 1s linear infinite"}}):n(p,{sx:f.actionIcon}),j?g("".concat(h,".rejectDialog.loadingText"),"Processing..."):g("".concat(h,".rejectDialog.rejectLearning"),"Reject Learning")]}):e({onClick:X,type:"button",disabled:j,onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},style:e(e({},f.primaryButton),{backgroundColor:j?"#22C55E":K?"#16A34A":"#22C55E",opacity:j?.7:1,cursor:j?"not-allowed":"pointer"})},{children:[j?n(m,{size:16,style:{animation:"spin 1s linear infinite"}}):n(s,{sx:f.actionIcon}),j?g("".concat(h,".approveDialog.loadingText"),"Processing..."):g("".concat(h,".approveDialog.approveLearning"),"Approve Learning")]}))]})),n("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}))};export{b as default};
|
|
2
2
|
//# sourceMappingURL=ApprovalLearningDialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__assign as r}from"tslib";import{jsx as i,jsxs as n,Fragment as o}from"react/jsx-runtime";import{useMemo as l,useCallback as a}from"react";import{Loader2 as s,Lock as u}from"lucide-react";import{useLearningTemplateStore as d}from"../store/useLearningTemplateStore.js";import{findNodeById as c}from"../utils/treeUtils.js";import m from"./RuleHeader.js";import f from"../components/EmptyLearningState.js";import p from"./RuleTierList.js";import{getRuleOverrideHistory as
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as r}from"tslib";import{jsx as i,jsxs as n,Fragment as o}from"react/jsx-runtime";import{useMemo as l,useCallback as a}from"react";import{Loader2 as s,Lock as u}from"lucide-react";import{useLearningTemplateStore as d}from"../store/useLearningTemplateStore.js";import{findNodeById as c}from"../utils/treeUtils.js";import m from"./RuleHeader.js";import f from"../components/EmptyLearningState.js";import p from"./RuleTierList.js";import{getRuleOverrideHistory as g}from"../apis/scopeApis.js";import{usePermissionsStore as h}from"../store/usePermissionsStore.js";import{dt as v}from"../store/useLMSConfigStore.js";var S=function(S){var y,x=S.onAddRule,R=S.onDeleteRule,b=S.onEditRule,D=S.onEditVariant,E=S.onDeleteVariant,j=S.onExportRule,C=S.isExporting,T=S.emptyStateTitle,L=void 0===T?v("emptyStateLearning.title","No learnings have been added !"):T,w=S.emptyStateDesc,I=void 0===w?v("emptyStateLearning.desc","Start by adding learnings that should apply across all stations."):w,N=S.emptyStateButtonText,A=void 0===N?v("emptyStateLearning.createNewLearning","Create New Learning"):N,V=S.onToggleSuccess,B=S.onReorderRules,F=S.onRefreshRuleSets,G=S.setDeleteConfirmationUsedFor,H=S.onCopyToTier,z=d(function(e){return e.currentRules}),k=d(function(e){return e.toggleRuleTier}),U=d(function(e){return e.scopeTreeData}),W=d(function(e){return e.selectedRuleSetId}),M=d(function(e){return e.createdVariantInfo}),O=d(function(e){return e.urlVariantId}),P=h(function(e){return e.isLoading}),_=h(function(e){return e.hasPermission}),Y=W?c((null==U?void 0:U.data)||null,W):null,q=null==Y?void 0:Y.id,J="GLOBAL"===(null==Y?void 0:Y.type)||"Global"===(null==Y?void 0:Y.name),K=Y?{ruleSetId:Y.id,ruleSetName:Y.name,ruleSetDesc:"",ruleCount:null===(y=null==Y?void 0:Y.metrics)||void 0===y?void 0:y.learningsCount}:void 0,Q=_("ilotj.rule.create",q)||_("ilotj.rule.variant.create",q),X=_("ilotj.rule.view",q),Z=l(function(){var e=new Map;return M&&M.forEach(function(t){t.variants.forEach(function(t){return e.set(t.id,t.action)})}),O&&e.set(O,"existing"),e.size>0?e:void 0},[M,O]),$=l(function(){if(M&&z){var e={tier1:"1",tier2:"2",tier_1:"1",tier_2:"2"},t={};return z.forEach(function(e){t[e.id]=e.name}),M.map(function(r){return t[e[r.tierName]]}).filter(Boolean)}},[M,z]),ee=a(function(r,i){return e(void 0,void 0,void 0,function(){var e,r;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(i||"")];case 1:return(e=t.sent())&&e.data?[2,e.data]:[2,null];case 2:throw r=t.sent(),console.error("Failed to fetch override history",r),r;case 3:return[2]}})})},[]);return P?i("div",r({style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center",backgroundColor:"#f9fafb",fontFamily:"Helvetica, Arial, sans-serif"}},{children:n("div",r({style:{display:"flex",flexDirection:"column",alignItems:"center",color:"#4b5563"}},{children:[i(s,{style:{marginBottom:"1rem",height:"3rem",width:"3rem",color:"#007aff",animation:"spin 1s linear infinite"}}),i("p",r({style:{fontSize:"1rem",fontWeight:500,color:"#4b5563"}},{children:"Loading your permissions…"}))]}))})):X?z&&0!==(null==z?void 0:z.length)?n(o,{children:[i(m,{onAddRule:x,onExport:j,isExporting:C,ruleSetName:null==K?void 0:K.ruleSetName,ruleSetDescription:null==K?void 0:K.ruleSetDesc,isGlobal:J,ruleSetId:q}),i(p,{tiers:z,ruleSetId:(null==K?void 0:K.ruleSetId)||"",onToggleTier:k,onDeleteRule:R,isGlobalScope:J,onFetchOverrideHistory:ee,onEditRule:b,onEditVariant:D,onDeleteVariant:E,highlightedVariants:Z,highlightedTierNames:$,onToggleSuccess:V,onReorderRules:B,onRefreshRuleSets:F,setDeleteConfirmationUsedFor:G,onCopyToTier:H})]}):n(o,{children:[i(m,{onAddRule:x,onExport:j,isExporting:C,ruleSetName:null==K?void 0:K.ruleSetName,ruleSetDescription:null==K?void 0:K.ruleSetDesc,isGlobal:J}),i(f,{onCreate:x,title:L,desc:I,button:A,canCreateRule:Q})]}):n(o,{children:[i(m,{onAddRule:x,onExport:j,isExporting:C,ruleSetName:null==K?void 0:K.ruleSetName,ruleSetDescription:null==K?void 0:K.ruleSetDesc,isGlobal:J,ruleSetId:q}),n("div",r({style:{display:"flex",height:"80vh",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem",textAlign:"center",backgroundColor:"#f0f2f5",fontFamily:"Helvetica, Arial, sans-serif"}},{children:[i("div",r({style:{marginBottom:"1.5rem",height:"4rem",width:"4rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",background:"linear-gradient(145deg, #e0e0e0, #ffffff)",boxShadow:"4px 4px 12px rgba(0,0,0,0.05), -4px -4px 12px rgba(255,255,255,0.7)"}},{children:i(u,{style:{height:"2rem",width:"2rem",color:"#8e8e93"}})})),i("h3",r({style:{fontSize:"1.25rem",fontWeight:600,color:"#1c1c1e"}},{children:"Access Denied"})),i("p",r({style:{maxWidth:"22rem",fontSize:"1rem",color:"#636366",lineHeight:1.6,marginBottom:"1rem"}},{children:"You do not have permission to view learnings for this scope."}))]}))]})};export{S as default};
|
|
2
2
|
//# sourceMappingURL=ContentLogic.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as n,jsx as e}from"react/jsx-runtime";import{FileText as c,ChevronUp as o}from"lucide-react";import t from"../styles/RuleAccordion.module.css.js";var a=function(i){var n=i.replace(/_/g," ");return n.charAt(0).toUpperCase()+n.slice(1)},r=function(r){var s=r.metadata,l=r.isOpen,d=r.onToggle,m=r.labelText,p=void 0===m?"Instruction Prompt":m,u=Object.entries(s||{});return n("div",i({className:"".concat(t.conditionBlock," ").concat(t.conditionBlockApply)},{children:[e("div",{className:t.verticalLine}),e("div",{className:t.horizontalLine}),n("div",i({className:t.conditionContent},{children:[e("div",i({className:t.conditionHeader,onClick:d},{children:n("div",i({className:t.conditionIconWrapper},{children:[e("div",i({className:t.conditionIconInstruction},{children:e(c,{size:10,strokeWidth:3})})),e("span",i({className:t.conditionLabel},{children:p})),e("button",i({className:t.conditionToggleButton},{children:e(o,{size:16,className:l?t.chevronOpen:t.chevronClosed})}))]}))})),l&&e("div",i({className:t.conditionItems},{children:e("div",i({className:t.instructionPromptBox},{children:u.map(function(c){var o=c[0],r=c[1];return n("div",i({className:t.instructionPromptEntry},{children:[e("p",i({className:t.instructionPromptKey},{children:a(o)})),e("p",i({className:t.instructionPromptValue},{children:r}))]}),o)})}))})),!l&&e("div",{className:t.collapsedPadding})]}))]}))};export{r as default};
|
|
2
|
+
//# sourceMappingURL=InstructionPromptBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstructionPromptBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|