@e-llm-studio/instant-learning 1.3.0-alpha.142 → 1.3.0-alpha.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/IL-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/GuidelineCart.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCart.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/GuidelineCartItem.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.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/GuidelineEmptyState.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.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/GuidelineHeader.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.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/GuidelineLandingPage.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.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/GuidelineLibraryCard.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.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/GuidelineSelectButton.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.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/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 +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/api.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/endpoints.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +2 -0
- package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +1 -0
- package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/cjs/index.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/GuidelineCart.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCart.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/GuidelineCartItem.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineCartItem.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/GuidelineEmptyState.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineEmptyState.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/GuidelineHeader.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineHeader.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/GuidelineLandingPage.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLandingPage.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/GuidelineLibraryCard.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineLibraryCard.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/GuidelineSelectButton.js +2 -0
- package/dist/features/IL-marketplace/components/GuidelineSelectButton.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/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 +1 -1
- package/dist/features/LSCGuidelinesCart/GuidelineCard.js +1 -1
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js +1 -1
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +1 -1
- package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js +1 -1
- package/dist/features/LSCGuidelinesCart/api.js +1 -1
- package/dist/features/LSCGuidelinesCart/endpoints.js +1 -1
- package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +2 -0
- package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +1 -0
- package/dist/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/ILMarketplaceTest.d.ts +3 -0
- package/dist/types/src/ILMarketplaceTest.d.ts.map +1 -0
- 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 +52 -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 +40 -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/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/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 +38 -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 +45 -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 +395 -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 +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts +6 -1
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts +6 -1
- package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/api.d.ts +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/api.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts +1 -0
- package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts.map +1 -1
- 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/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +37 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- 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/SchemaDriven/SchemaDrivenCreateRule.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.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/assets/Search-result(add new).svg.js +0 -2
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js.map +0 -1
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js +0 -2
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js.map +0 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +0 -2
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +0 -1
- package/dist/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/cjs/features/LearningManagement/utils/resizeObserverErrorGuard.js +0 -2
- package/dist/cjs/features/LearningManagement/utils/resizeObserverErrorGuard.js.map +0 -1
- package/dist/cjs/node_modules/@e-llm-studio/audit-log/dist/styles.css.js +0 -2
- package/dist/cjs/node_modules/@e-llm-studio/audit-log/dist/styles.css.js.map +0 -1
- package/dist/cjs/schema-driven/FallbackField.js +0 -2
- package/dist/cjs/schema-driven/FallbackField.js.map +0 -1
- package/dist/cjs/schema-driven/SchemaRenderer.js +0 -2
- package/dist/cjs/schema-driven/SchemaRenderer.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/ConditionSectionAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/ConditionSectionAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/ConfigSectionAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/ConfigSectionAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/GlobalSetupAccordionAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/GlobalSetupAccordionAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/PromptTextEditorAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/PromptTextEditorAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/ScopeSectionAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/ScopeSectionAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/TextInputAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/TextInputAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/adapters/VariantListWrapperAdapter.js +0 -2
- package/dist/cjs/schema-driven/adapters/VariantListWrapperAdapter.js.map +0 -1
- package/dist/cjs/schema-driven/demoSchema.js +0 -2
- package/dist/cjs/schema-driven/demoSchema.js.map +0 -1
- package/dist/cjs/schema-driven/primitives/Accordion.js +0 -2
- package/dist/cjs/schema-driven/primitives/Accordion.js.map +0 -1
- package/dist/cjs/schema-driven/types.js +0 -2
- package/dist/cjs/schema-driven/types.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/SchemaDriven/SchemaDrivenCreateRule.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.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/assets/Search-result(add new).svg.js +0 -2
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js.map +0 -1
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js +0 -2
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js.map +0 -1
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +0 -2
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +0 -1
- package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +0 -2
- package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +0 -1
- package/dist/features/LearningManagement/utils/resizeObserverErrorGuard.js +0 -2
- package/dist/features/LearningManagement/utils/resizeObserverErrorGuard.js.map +0 -1
- package/dist/node_modules/@e-llm-studio/audit-log/dist/styles.css.js +0 -2
- package/dist/node_modules/@e-llm-studio/audit-log/dist/styles.css.js.map +0 -1
- package/dist/schema-driven/FallbackField.js +0 -2
- package/dist/schema-driven/FallbackField.js.map +0 -1
- package/dist/schema-driven/SchemaRenderer.js +0 -2
- package/dist/schema-driven/SchemaRenderer.js.map +0 -1
- package/dist/schema-driven/adapters/ConditionSectionAdapter.js +0 -2
- package/dist/schema-driven/adapters/ConditionSectionAdapter.js.map +0 -1
- package/dist/schema-driven/adapters/ConfigSectionAdapter.js +0 -2
- package/dist/schema-driven/adapters/ConfigSectionAdapter.js.map +0 -1
- package/dist/schema-driven/adapters/GlobalSetupAccordionAdapter.js +0 -2
- package/dist/schema-driven/adapters/GlobalSetupAccordionAdapter.js.map +0 -1
- package/dist/schema-driven/adapters/PromptTextEditorAdapter.js +0 -2
- package/dist/schema-driven/adapters/PromptTextEditorAdapter.js.map +0 -1
- package/dist/schema-driven/adapters/ScopeSectionAdapter.js +0 -2
- package/dist/schema-driven/adapters/ScopeSectionAdapter.js.map +0 -1
- package/dist/schema-driven/adapters/TextInputAdapter.js +0 -2
- package/dist/schema-driven/adapters/TextInputAdapter.js.map +0 -1
- package/dist/schema-driven/adapters/VariantListWrapperAdapter.js +0 -2
- package/dist/schema-driven/adapters/VariantListWrapperAdapter.js.map +0 -1
- package/dist/schema-driven/demoSchema.js +0 -2
- package/dist/schema-driven/demoSchema.js.map +0 -1
- package/dist/schema-driven/primitives/Accordion.js +0 -2
- package/dist/schema-driven/primitives/Accordion.js.map +0 -1
- package/dist/schema-driven/types.js +0 -2
- package/dist/schema-driven/types.js.map +0 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts +0 -11
- package/dist/types/src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts.map +0 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts +0 -12
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts.map +0 -1
- package/dist/types/src/features/LearningManagement/utils/resizeObserverErrorGuard.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/utils/resizeObserverErrorGuard.d.ts.map +0 -1
- package/dist/types/src/schema-driven/FallbackField.d.ts +0 -13
- package/dist/types/src/schema-driven/FallbackField.d.ts.map +0 -1
- package/dist/types/src/schema-driven/SchemaRenderer.d.ts +0 -21
- package/dist/types/src/schema-driven/SchemaRenderer.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/ConditionSectionAdapter.d.ts +0 -11
- package/dist/types/src/schema-driven/adapters/ConditionSectionAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/ConfigSectionAdapter.d.ts +0 -13
- package/dist/types/src/schema-driven/adapters/ConfigSectionAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/GlobalSetupAccordionAdapter.d.ts +0 -5
- package/dist/types/src/schema-driven/adapters/GlobalSetupAccordionAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/PromptTextEditorAdapter.d.ts +0 -13
- package/dist/types/src/schema-driven/adapters/PromptTextEditorAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/ScopeSectionAdapter.d.ts +0 -5
- package/dist/types/src/schema-driven/adapters/ScopeSectionAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/TextInputAdapter.d.ts +0 -18
- package/dist/types/src/schema-driven/adapters/TextInputAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/adapters/VariantListWrapperAdapter.d.ts +0 -17
- package/dist/types/src/schema-driven/adapters/VariantListWrapperAdapter.d.ts.map +0 -1
- package/dist/types/src/schema-driven/demoSchema.d.ts +0 -13
- package/dist/types/src/schema-driven/demoSchema.d.ts.map +0 -1
- package/dist/types/src/schema-driven/primitives/Accordion.d.ts +0 -10
- package/dist/types/src/schema-driven/primitives/Accordion.d.ts.map +0 -1
- package/dist/types/src/schema-driven/types.d.ts +0 -40
- package/dist/types/src/schema-driven/types.d.ts.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/InstantLearning/InstantLearning.js"),t=require("./features/WtaWnta/WtaWnta.js"),r=require("./features/DocumentLearning/DocumentLearning.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/InstantLearning/InstantLearning.js"),t=require("./features/WtaWnta/WtaWnta.js"),r=require("./features/DocumentLearning/DocumentLearning.js"),i=require("./features/IL-OTJ/ILOTJ.js"),n=require("./features/IL-OTJ/_components/atoms/Button/Button.js"),a=require("./features/IL-OTJ/_components/atoms/Dropdown/Dropdown.js"),s=require("./features/IL-OTJ/_components/atoms/Toggle/Toggle.js"),o=require("./features/IL-OTJ/_components/atoms/Textarea/Textarea.js"),u=require("./features/IL-OTJ/_components/molecules/Condition/ConditionList.js"),l=require("./features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js"),p=require("./features/IL-OTJ/_components/molecules/SeperationRow/SeparationRow.js"),d=require("./features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.js"),c=require("./features/IL-OTJ/_components/organisms/TextSection/TextSection.js"),m=require("./features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js"),g=require("./features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js"),x=require("./features/IL-OTJ/_components/templates/TrafficManager/TrafficManagerTemplate.js"),G=require("./features/IL-OTJ/_components/templates/Testing/Testing.js"),L=require("./features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js"),I=require("./features/IL-OTJ/helpers/utils.js"),f=require("./features/IL-OTJ/store/CitationsContext.js"),T=require("./features/IL-OTJ/ILOTJTest.js"),C=require("./features/LearningManagement/LearningManagement.js"),j=require("./features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js");require("./features/LearningManagement/LearningManagementTest.js");var q=require("./features/IL-marketplace/components/GuidelineCart.js"),S=require("./features/IL-marketplace/components/GuidelineCartHeader.js"),k=require("./features/IL-marketplace/components/GuidelineCartItem.js"),O=require("./features/IL-marketplace/components/GuidelineEmptyState.js"),D=require("./features/IL-marketplace/components/GuidelineHeader.js"),W=require("./features/IL-marketplace/components/GuidelineIconButton.js"),y=require("./features/IL-marketplace/components/GuidelineLandingPage.js"),P=require("./features/IL-marketplace/components/GuidelineFilterPanel.js"),F=require("./features/IL-marketplace/components/GuidelineLibrary.js"),M=require("./features/IL-marketplace/components/GuidelineLibraryCard.js"),A=require("./features/IL-marketplace/components/LearningManagementWrapper.js"),_=require("./features/IL-marketplace/components/GuidelineProceedButton.js"),J=require("./features/IL-marketplace/components/GuidelineSelectButton.js"),E=require("./features/IL-marketplace/components/GuidelineCardMenu.js"),B=require("./features/IL-marketplace/components/GuidelineConfirmDialog.js"),b=require("./features/IL-marketplace/hooks/useGuidelineSelection.js"),v=require("./features/IL-marketplace/constants.js"),h=require("./features/IL-marketplace/utils.js"),R=require("./features/IL-marketplace/workspace/workspace.runtime.js"),w=require("./features/IL-marketplace/workspace/useGuidelineWorkspace.js"),H=require("./features/IL-marketplace/services/guideline.session.js"),U=require("./features/IL-marketplace/services/instant-learning.api.js"),V=require("./features/IL-marketplace/utils/guidelineOverlay.js"),N=require("./features/IL-marketplace/utils/guidelineFiles.js"),Q=require("./features/IL-marketplace/services/guideline.cart.api.js"),z=require("./features/IL-marketplace/queryClient.js");exports.InstantLearning=e.default,exports.WtaWnta=t.default,exports.BookLearning=r.default,exports.ILOTJ=i.default,exports.Button=n.Button,exports.Dropdown=a.Dropdown,exports.Toggle=s.Toggle,exports.Textarea=o.Textarea,exports.ConditionList=u.ConditionList,exports.SectionWrapper=l.SectionWrapper,exports.SeparationRow=p.SeparationRow,exports.ConfigSection=d.ConfigSection,exports.TextSection=c.TextSection,exports.ScopeSection=m.ScopeSection,exports.ConditionSection=g.ConditionSection,exports.TrafficManagerTemplate=x.TrafficManagerTemplate,exports.Testing=G.Testing,Object.defineProperty(exports,"TemplateList",{enumerable:!0,get:function(){return L.TemplateList}}),exports.TemplateMap=L.TemplateMap,exports.extractAndParseResponse=I.extractAndParseResponse,exports.extractAndParseWithProperty=I.extractAndParseWithProperty,exports.extractTextFromChildren=I.extractTextFromChildren,exports.extractVariantIds=I.extractVariantIds,exports.parseValidationData=I.parseValidationData,exports.useHeaderObserver=I.useHeaderObserver,exports.CitationProvider=f.CitationProvider,exports.useCitations=f.useCitations,exports.dummyDat=T.dummyDat,exports.getVariantInfo=T.getVariantInfo,exports.LearningManagement=C.default,exports.TeachMePlugin=j.default,exports.TemplateRegistry=j.TemplateRegistry,exports.GuidelineCart=q.GuidelineCart,exports.GuidelineCartHeader=S.GuidelineCartHeader,exports.GuidelineCartItem=k.GuidelineCartItem,exports.GuidelineEmptyState=O.GuidelineEmptyState,exports.GuidelineHeader=D.GuidelineHeader,exports.GuidelineIconButton=W.GuidelineIconButton,exports.GuidelineLandingPage=y.GuidelineLandingPage,exports.GuidelineFilterPanel=P.GuidelineFilterPanel,exports.GuidelineLibrary=F.GuidelineLibrary,exports.GuidelineLibraryCard=M.GuidelineLibraryCard,exports.LearningManagementWrapper=A.LearningManagementWrapper,exports.GuidelineProceedButton=_.GuidelineProceedButton,exports.GuidelineSelectButton=J.GuidelineSelectButton,exports.GuidelineCardMenu=E.GuidelineCardMenu,exports.createGuidelineCardMenuItems=E.createGuidelineCardMenuItems,exports.GuidelineConfirmDialog=B.GuidelineConfirmDialog,exports.useGuidelineSelection=b.useGuidelineSelection,exports.DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE=v.DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE,exports.DEFAULT_GUIDELINE_LABELS=v.DEFAULT_GUIDELINE_LABELS,exports.createGuidelineId=h.createGuidelineId,exports.cx=h.cx,exports.defaultFormatAddedOnLabel=h.defaultFormatAddedOnLabel,exports.getAppIntegrationId=h.getAppIntegrationId,exports.getGuidelineDate=h.getGuidelineDate,exports.getGuidelineDescription=h.getGuidelineDescription,exports.getGuidelineDisplayDescription=h.getGuidelineDisplayDescription,exports.getGuidelineId=h.getGuidelineId,exports.getGuidelineTitle=h.getGuidelineTitle,exports.isInstantLearningGuideline=h.isInstantLearningGuideline,exports.mergeGuidelineLabels=h.mergeGuidelineLabels,exports.getGuidelineWorkspaceActions=R.getGuidelineWorkspaceActions,exports.getGuidelineWorkspaceSnapshot=R.getGuidelineWorkspaceSnapshot,exports.useGuidelineWorkspace=w.useGuidelineWorkspace,exports.useGuidelineWorkspaceActions=w.useGuidelineWorkspaceActions,exports.useOptionalGuidelineWorkspace=w.useOptionalGuidelineWorkspace,exports.useOptionalGuidelineWorkspaceActions=w.useOptionalGuidelineWorkspaceActions,exports.clearGuidelineCartClearPending=H.clearGuidelineCartClearPending,exports.clearInstantLearningGuidelineCartPresent=H.clearInstantLearningGuidelineCartPresent,exports.getGuidelineSessionId=H.getGuidelineSessionId,exports.markGuidelineCartClearPending=H.markGuidelineCartClearPending,exports.rotateGuidelineSessionId=H.rotateGuidelineSessionId,exports.removeInstantLearningGuidelinesFromCart=U.removeInstantLearningGuidelinesFromCart,exports.closeGuidelineOverlayWithSync=V.closeGuidelineOverlayWithSync,exports.dataCartFileToGuidelineFileItem=N.dataCartFileToGuidelineFileItem,exports.getDataCartFilesFromResponse=N.getDataCartFilesFromResponse,exports.isGuidelineDataCartFile=N.isGuidelineDataCartFile,exports.mergeGuidelineFiles=N.mergeGuidelineFiles,exports.syncGuidelineCartWithMemstore=Q.syncGuidelineCartWithMemstore,exports.guidelineQueryClient=z.guidelineQueryClient;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{useRef as t,useEffect as o}from"react";import{Trash2 as i}from"lucide-react";import{cx as l}from"../utils.js";function a(i){var a=i.open,d=i.onClose,u=i.anchorRef,c=i.items,s=i.classNames,m=i.styles,f=t(null);if(o(function(){if(a){var e=function(e){var n=e.target;f.current&&!f.current.contains(n)&&u.current&&!u.current.contains(n)&&d()},n=function(e){"Escape"===e.key&&d()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",n),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",n)}}},[a,d,u]),!a)return null;var b=c.filter(function(e){return!e.hidden});return n("div",e({ref:f,role:"menu",className:l("absolute right-0 top-full z-50 mt-1 min-w-[180px] rounded-[8px] border border-[#EAECF0] bg-white py-1 shadow-[0_4px_16px_rgba(16,24,40,0.12)]",null==s?void 0:s.libraryCardMenu),style:null==m?void 0:m.libraryCardMenu},{children:b.map(function(t){return r("button",e({type:"button",role:"menuitem",disabled:t.disabled,onClick:function(){t.onClick(),d()},className:l("flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-[13px] font-medium transition-colors",t.danger?"text-[#EF4444] hover:bg-[#FEF2F2]":"text-[#344054] hover:bg-[#F9FAFB]",t.disabled&&"cursor-not-allowed opacity-50",t.danger?null==s?void 0:s.libraryCardMenuItemDanger:null==s?void 0:s.libraryCardMenuItem),style:t.danger?null==m?void 0:m.libraryCardMenuItemDanger:null==m?void 0:m.libraryCardMenuItem},{children:[t.icon,n("span",{children:t.label})]}),t.key)})}))}function d(e){var r=e.onDelete,t=e.deleteLabel,o=void 0===t?"Delete":t,l=e.hideDelete,a=void 0!==l&&l;return[{key:"delete",label:o,icon:n(i,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2}),onClick:r,danger:!0,hidden:a}]}export{a as GuidelineCardMenu,d as createGuidelineCardMenuItems};
|
|
2
|
+
//# sourceMappingURL=GuidelineCardMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineCardMenu.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,jsx as l}from"react/jsx-runtime";import{mergeGuidelineLabels as t,getGuidelineId as d,cx as o,defaultFormatAddedOnLabel as n}from"../utils.js";import{GuidelineCartHeader as r}from"./GuidelineCartHeader.js";import{GuidelineCartItem as s}from"./GuidelineCartItem.js";import{GuidelineEmptyState as a}from"./GuidelineEmptyState.js";import{GuidelineProceedButton as c}from"./GuidelineProceedButton.js";function u(u){var m=u.guidelines,p=u.cartGuidelineIds,f=u.selectedGuidelineIds,v=u.onToggleGuideline,y=u.onPreviewGuideline,b=u.onRemoveGuideline,G=u.onProceed,g=u.onAddGuideline,x=u.hideDeleteButton,h=void 0!==x&&x,B=u.proceedDisabledTooltip,N=void 0===B?"Add guideline to proceed":B,L=u.classNames,j=u.styles,w=u.labels,C=u.formatAddedOnLabel,T=void 0===C?n:C,A=t(w),D=p?m.filter(function(e){return p.includes(d(e))}):m,F=D.filter(function(e){return f.includes(d(e))}),I=F.length;return i("aside",e({className:o("flex w-full flex-col rounded-[12px] border border-[#5B2CF4] bg-[#F5F1FF] px-7 py-7 font-[Inter] shadow-[0_1px_4px_rgba(16,24,40,0.04)]",null==L?void 0:L.cart),style:null==j?void 0:j.cart},{children:[l(r,{title:A.cartTitle,description:A.cartDescription,selectedLabel:I>0?A.selectedBadge(I):void 0,addGuidelineLabel:A.addGuidelineLabel,onAddGuideline:g,classNames:L,styles:j}),l("div",e({className:o("mt-8 min-h-[280px] flex-1 overflow-hidden",null==L?void 0:L.cartBody),style:null==j?void 0:j.cartBody},{children:0===D.length?l(a,{title:A.emptyCartTitle,description:A.emptyCartDescription,classNames:L,styles:j}):l("div",e({className:o("max-h-[420px] space-y-4 overflow-y-auto pr-2",null==L?void 0:L.cartList),style:null==j?void 0:j.cartList},{children:D.map(function(e){return l(s,{guideline:e,isSelected:f.includes(d(e)),onToggle:v,onPreview:y,onRemove:b,hideDeleteButton:h,classNames:L,styles:j,formatAddedOnLabel:T},d(e))})}))})),l(c,{label:A.proceedButton,disabled:0===I,onClick:function(){return G(F)},disabledTooltip:N,classNames:L,styles:j})]}))}export{u as GuidelineCart};
|
|
2
|
+
//# sourceMappingURL=GuidelineCart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineCart.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as l}from"react/jsx-runtime";import{Plus as i}from"lucide-react";import{cx as r}from"../utils.js";function d(d){var a=d.title,n=d.description,s=d.selectedLabel,o=d.addGuidelineLabel,c=d.onAddGuideline,u=d.classNames,m=d.styles;return t("div",e({className:r("flex items-start justify-between gap-3",null==u?void 0:u.cartHeader),style:null==m?void 0:m.cartHeader},{children:[t("div",e({className:"min-w-0"},{children:[t("div",e({className:"flex flex-wrap items-center gap-2"},{children:[l("h2",e({className:r("text-[20px] font-semibold leading-7 text-[#1F2937]",null==u?void 0:u.cartTitle),style:null==m?void 0:m.cartTitle},{children:a})),s&&l("span",e({className:r("rounded-full bg-[#E8DDFF] px-2.5 py-1 text-[13px] font-semibold leading-4 text-[#5B2CF4]",null==u?void 0:u.cartSelectedBadge),style:null==m?void 0:m.cartSelectedBadge},{children:s}))]})),l("p",e({className:r("mt-1 text-[13px] leading-5 text-[#475467]",null==u?void 0:u.cartDescription),style:null==m?void 0:m.cartDescription},{children:n}))]})),c&&l("button",e({type:"button",onClick:c,className:r("flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-[8px] border border-[#CDBDFF] bg-white text-[#5B2CF4] transition-colors hover:bg-[#F9F7FF]",null==u?void 0:u.cartAddButton),style:null==m?void 0:m.cartAddButton,"aria-label":o,title:o},{children:l(i,{className:"h-4 w-4",strokeWidth:2.4})}))]}))}export{d as GuidelineCartHeader};
|
|
2
|
+
//# sourceMappingURL=GuidelineCartHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineCartHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{Eye as i,X as n}from"lucide-react";import{getGuidelineId as r,getGuidelineTitle as s,getGuidelineDisplayDescription as o,getGuidelineDate as a,cx as c}from"../utils.js";import{GuidelineIconButton as m}from"./GuidelineIconButton.js";import{GuidelineSelectButton as d}from"./GuidelineSelectButton.js";function u(u){var v=u.guideline,p=u.isSelected,x=u.onToggle,h=u.onPreview,f=u.onRemove,I=u.hideDeleteButton,w=void 0!==I&&I,N=u.classNames,y=u.styles,g=u.formatAddedOnLabel,b=r(v),k=s(v),B=o(v),C=g(a(v));return t("div",e({className:c("rounded-[8px] border border-[#EAECF0] bg-white px-4 py-4 shadow-[0_1px_2px_rgba(16,24,40,0.04)]",null==N?void 0:N.cartItem),style:null==y?void 0:y.cartItem},{children:l("div",e({className:"flex items-start gap-3"},{children:[t(d,{isSelected:p,onClick:function(){return x(b)},classNames:N,styles:y}),l("div",e({className:c("min-w-0 flex-1",null==N?void 0:N.cartItemContent),style:null==y?void 0:y.cartItemContent},{children:[l("div",e({className:c("flex min-w-0 items-start justify-between gap-3",null==N?void 0:N.cartItemTitleRow),style:null==y?void 0:y.cartItemTitleRow},{children:[t("h3",e({className:c("min-w-0 truncate text-[15px] font-semibold leading-5 text-[#1F2937]",null==N?void 0:N.cartItemTitle),style:null==y?void 0:y.cartItemTitle,title:k},{children:k})),l("div",e({className:c("flex flex-shrink-0 items-center gap-2 text-[#64748B]",null==N?void 0:N.cartItemActions),style:null==y?void 0:y.cartItemActions},{children:[t(m,e({slot:"cartItemPreviewButton",label:"Preview ".concat(k),title:"Preview",onClick:function(){return h(v)},classNames:N,styles:y},{children:t(i,{className:"h-4 w-4",strokeWidth:2.2})})),!w&&t(m,e({slot:"cartItemRemoveButton",label:"Remove ".concat(k),title:"Remove",onClick:function(){return f(v)},classNames:N,styles:y},{children:t(n,{className:"h-4 w-4",strokeWidth:2.2})}))]}))]})),t("p",e({className:c("mt-2 truncate text-[13px] leading-5 text-[#344054]",null==N?void 0:N.cartItemDescription),style:null==y?void 0:y.cartItemDescription,title:B},{children:B})),C&&t("p",e({className:c("mt-2 truncate text-[12px] leading-4 text-[#475467]",null==N?void 0:N.cartItemDate),style:null==y?void 0:y.cartItemDate,title:C},{children:C}))]}))]}))}))}export{u as GuidelineCartItem};
|
|
2
|
+
//# sourceMappingURL=GuidelineCartItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineCartItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as o}from"tslib";import{jsx as i,jsxs as e}from"react/jsx-runtime";import{useRef as n,useEffect as l}from"react";import{cx as t}from"../utils.js";function r(r){var a=r.open,d=r.onClose,c=r.onConfirm,s=r.title,m=r.description,u=r.confirmLabel,f=void 0===u?"Confirm":u,g=r.cancelLabel,v=void 0===g?"Cancel":g,p=r.variant,b=void 0===p?"default":p,x=r.loading,D=void 0!==x&&x,y=r.classNames,h=r.styles,C=n(null);return l(function(){if(a){var o=function(o){"Escape"!==o.key||D||d()};return document.addEventListener("keydown",o),function(){return document.removeEventListener("keydown",o)}}},[a,d,D]),a?i("div",o({className:t("fixed inset-0 z-[9999] flex items-center justify-center bg-black/40",null==y?void 0:y.confirmDialogOverlay),style:null==h?void 0:h.confirmDialogOverlay,onClick:function(o){o.target!==o.currentTarget||D||d()}},{children:e("div",o({ref:C,role:"dialog","aria-modal":"true",className:t("w-full max-w-[420px] rounded-[12px] bg-white px-6 py-6 shadow-[0_8px_30px_rgba(0,0,0,0.12)]",null==y?void 0:y.confirmDialog),style:null==h?void 0:h.confirmDialog},{children:[i("h3",o({className:t("text-[16px] font-semibold leading-6 text-[#1F2937]",null==y?void 0:y.confirmDialogTitle),style:null==h?void 0:h.confirmDialogTitle},{children:s})),i("p",o({className:t("mt-2 text-[14px] leading-5 text-[#667085]",null==y?void 0:y.confirmDialogDescription),style:null==h?void 0:h.confirmDialogDescription},{children:m})),e("div",o({className:t("mt-6 flex items-center justify-end gap-3",null==y?void 0:y.confirmDialogActions),style:null==h?void 0:h.confirmDialogActions},{children:[i("button",o({type:"button",onClick:d,disabled:D,className:t("h-10 rounded-[6px] border border-[#D0D5DD] bg-white px-4 text-[14px] font-semibold text-[#344054] transition-colors hover:bg-[#F9FAFB] disabled:opacity-50",null==y?void 0:y.confirmDialogCancelButton),style:null==h?void 0:h.confirmDialogCancelButton},{children:v})),i("button",o({type:"button",onClick:c,disabled:D,className:t("h-10 rounded-[6px] border border-transparent px-4 text-[14px] font-semibold text-white transition-colors disabled:opacity-50","danger"===b?"bg-[#EF4444] hover:bg-[#DC2626]":"bg-[#5B2CF4] hover:bg-[#4C1FE8]",null==y?void 0:y.confirmDialogConfirmButton),style:null==h?void 0:h.confirmDialogConfirmButton},{children:D?"Processing...":f}))]}))]}))})):null}export{r as GuidelineConfirmDialog};
|
|
2
|
+
//# sourceMappingURL=GuidelineConfirmDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineConfirmDialog.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as e,jsx as l}from"react/jsx-runtime";import{cx as r}from"../utils.js";function i(i){var s=i.title,o=i.description,n=i.classNames,c=i.styles;return e("div",t({className:r("flex h-full min-h-[260px] flex-col items-center justify-center rounded-[8px] border border-dashed border-[#CDBDFF] bg-white/70 px-5 text-center",null==n?void 0:n.cartEmptyState),style:null==c?void 0:c.cartEmptyState},{children:[l("p",t({className:r("text-[14px] font-semibold text-[#344054]",null==n?void 0:n.cartEmptyTitle),style:null==c?void 0:c.cartEmptyTitle},{children:s})),l("p",t({className:r("mt-1 text-[13px] leading-5 text-[#667085]",null==n?void 0:n.cartEmptyDescription),style:null==c?void 0:c.cartEmptyDescription},{children:o}))]}))}export{i as GuidelineEmptyState};
|
|
2
|
+
//# sourceMappingURL=GuidelineEmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineEmptyState.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as l,jsxs as t}from"react/jsx-runtime";import{useEffect as n}from"react";import{X as i,Check as o}from"lucide-react";import{cx as r}from"../utils.js";function a(a){var d=a.open,s=a.onClose,c=a.sections,u=a.title,p=void 0===u?"Filters":u,f=a.applyLabel,v=void 0===f?"Apply Filters":f,b=a.cancelLabel,m=void 0===b?"Cancel":b,h=a.closeAriaLabel,x=void 0===h?"Close filters":h,y=a.onApply,P=a.onCancel,C=a.disableActions,g=void 0!==C&&C,N=a.classNames,k=a.styles;return n(function(){if(d){var e=function(e){"Escape"===e.key&&s()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}},[d,s]),d?l("div",e({className:r("fixed inset-0 z-[9999] bg-black/10",null==N?void 0:N.filterPanelOverlay),style:null==k?void 0:k.filterPanelOverlay,role:"presentation",onClick:s},{children:t("aside",e({role:"dialog","aria-modal":"true","aria-label":p,className:r("ml-auto flex h-full w-full max-w-[336px] flex-col bg-white shadow-[-12px_0_32px_rgba(16,24,40,0.12)]",null==N?void 0:N.filterPanel),style:null==k?void 0:k.filterPanel,onClick:function(e){return e.stopPropagation()}},{children:[t("div",e({className:r("flex items-center justify-between border-b border-[#EAECF0] px-6 py-5",null==N?void 0:N.filterPanelHeader),style:null==k?void 0:k.filterPanelHeader},{children:[l("h2",e({className:r("text-[18px] font-semibold leading-7 text-[#344054]",null==N?void 0:N.filterPanelTitle),style:null==k?void 0:k.filterPanelTitle},{children:p})),l("button",e({type:"button",onClick:s,"aria-label":x,className:r("inline-flex h-8 w-8 items-center justify-center rounded-full text-[#667085] transition-colors hover:bg-[#F2F4F7] hover:text-[#344054]",null==N?void 0:N.filterPanelCloseButton),style:null==k?void 0:k.filterPanelCloseButton},{children:l(i,{className:"h-5 w-5"})}))]})),l("div",e({className:r("flex-1 overflow-y-auto px-6 py-6",null==N?void 0:N.filterPanelBody),style:null==k?void 0:k.filterPanelBody},{children:l("div",e({className:"space-y-8"},{children:c.map(function(n){return t("section",e({className:r("space-y-4",null==N?void 0:N.filterPanelSection),style:null==k?void 0:k.filterPanelSection},{children:[l("h3",e({className:r("text-[14px] font-semibold leading-6 text-[#344054]",null==N?void 0:N.filterPanelSectionTitle),style:null==k?void 0:k.filterPanelSectionTitle},{children:n.title})),l("div",e({className:"space-y-3"},{children:n.options.map(function(i){var a=!0===n.singleSelect;return t("label",e({className:r("flex cursor-pointer items-center gap-3 text-[15px] leading-7 text-[#344054]",i.disabled?"cursor-not-allowed opacity-50":"",null==N?void 0:N.filterPanelOption),style:null==k?void 0:k.filterPanelOption},{children:[l("input",{type:"checkbox",checked:i.checked,disabled:i.disabled,onChange:function(e){return l=e.target.checked,a&&l&&n.options.forEach(function(e){e.id!==i.id&&e.checked&&e.onChange(!1)}),void i.onChange(l);var l},className:"peer sr-only"}),l("span",e({"aria-hidden":"true",className:r("mt-1 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-[5px] border transition-colors",i.checked?"border-[#5B2CF4] bg-[#5B2CF4] text-white":"border-[#CBD5E1] bg-white text-transparent hover:border-[#8B5CF6]",i.disabled?"opacity-50":"",null==N?void 0:N.filterPanelCheckbox),style:null==k?void 0:k.filterPanelCheckbox},{children:l(o,{className:"h-3.5 w-3.5",strokeWidth:3.2})})),l("span",e({className:r("min-w-0 flex-1",null==N?void 0:N.filterPanelOptionLabel),style:null==k?void 0:k.filterPanelOptionLabel},{children:i.label}))]}),i.id)})}))]}),n.id)})}))})),t("div",e({className:r("flex items-center justify-end gap-3 border-t border-[#EAECF0] px-6 py-4",null==N?void 0:N.filterPanelActions),style:null==k?void 0:k.filterPanelActions},{children:[l("button",e({type:"button",onClick:null!=P?P:s,disabled:g,className:r("h-[44px] rounded-[8px] border border-[#D0D5DD] bg-white px-5 text-[15px] font-medium text-[#344054] transition-colors hover:bg-[#F9FAFB] disabled:opacity-50",null==N?void 0:N.filterPanelCancelButton),style:null==k?void 0:k.filterPanelCancelButton},{children:m})),l("button",e({type:"button",onClick:y,disabled:g,className:r("h-[44px] rounded-[8px] bg-[#6D5BFF] px-5 text-[15px] font-medium text-white transition-colors hover:bg-[#5B4BE6] disabled:opacity-50",null==N?void 0:N.filterPanelApplyButton),style:null==k?void 0:k.filterPanelApplyButton},{children:v}))]}))]}))})):null}export{a as GuidelineFilterPanel};
|
|
2
|
+
//# sourceMappingURL=GuidelineFilterPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineFilterPanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{ArrowLeft as o,Home as l,ChevronRight as r,X as i}from"lucide-react";import{cx as s}from"../utils.js";var a=function(a){var c=a.breadcrumbItems,u=a.onBack,m=a.onHome,d=a.onClose,h=a.className,x=a.showBackButton,b=a.showHomeIcon,f=void 0===b||b,p=a.classNames,v=a.styles,k=null!=x?x:!!(u&&c.length>1),w=Boolean(m||k&&u);return t("div",e({className:s("flex h-[76px] items-center justify-between border-b border-[#EAECF0] px-9",null==p?void 0:p.headerRoot,h),style:null==v?void 0:v.headerRoot},{children:[t("div",e({className:"flex min-w-0 items-center gap-2 text-[15px] font-semibold text-[#1F2937]"},{children:[k&&u&&n("button",e({type:"button",onClick:u,className:s("inline-flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[8px] text-[#111827] hover:bg-[#F2F4F7]",null==p?void 0:p.backButton),"aria-label":"Back",title:"Back"},{children:n(o,{className:"h-5 w-5",strokeWidth:2.4})})),f&&n("button",e({type:"button",onClick:w?function(){m?m():k&&(null==u||u())}:void 0,className:s("inline-flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[8px]",w?"cursor-pointer hover:bg-[#F2F4F7]":"cursor-default",null==p?void 0:p.homeButton),"aria-label":"Home",title:"Home"},{children:n(l,{className:"h-5 w-5 flex-shrink-0 text-[#8CA0B8]",strokeWidth:2})})),c.map(function(o,l){var i=l===c.length-1,a=f||l>0;return t("div",e({className:s("flex min-w-0 items-center gap-2",null==p?void 0:p.breadcrumbItem)},{children:[a&&n(r,{className:"h-4 w-4 flex-shrink-0 text-[#8CA0B8]",strokeWidth:2}),n("span",e({className:s("truncate",i?"text-[#1F2937]":"text-[#6B7280] cursor-pointer hover:text-[#1F2937]"),onClick:function(){i||null==u||u()}},{children:o}))]}),"".concat(o,"-").concat(l))})]})),d&&n("button",e({type:"button",onClick:d,className:s("inline-flex h-10 w-10 items-center justify-center rounded-[8px] border border-[#CBD5E1] bg-white text-[#111827] hover:bg-[#F8FAFC]",null==p?void 0:p.closeButton),"aria-label":"Close guidelines",title:"Close"},{children:n(i,{className:"h-5 w-5",strokeWidth:2.2})}))]}))};export{a as GuidelineHeader};
|
|
2
|
+
//# sourceMappingURL=GuidelineHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import{forwardRef as r}from"react";import{cx as l}from"../utils.js";var o=r(function(r,o){var i=r.label,s=r.title,n=r.onClick,a=r.children,c=r.slot,m=r.classNames,u=r.styles,f=r.className;return e("button",t({ref:o,type:"button",onClick:n,className:l("flex h-6 w-6 items-center justify-center rounded text-[#667085] transition-colors hover:bg-[#F2F4F7] hover:text-[#344054]",f,null==m?void 0:m[c]),style:null==u?void 0:u[c],"aria-label":i,title:null!=s?s:i},{children:a}))});export{o as GuidelineIconButton};
|
|
2
|
+
//# sourceMappingURL=GuidelineIconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineIconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__spreadArray as n,__awaiter as i,__generator as l}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as r,useEffect as d}from"react";import{CircleHelp as a,ArrowLeft as s,Plus as u,Check as c}from"lucide-react";import{mergeGuidelineLabels as p,getGuidelineId as m,cx as b,defaultFormatAddedOnLabel as f,isInstantLearningGuideline as h,getGuidelineTitle as g,getAppIntegrationId as x}from"../utils.js";import{useGuidelineSelection as v}from"../hooks/useGuidelineSelection.js";import{useControllableState as y}from"../hooks/useControllableState.js";import{GuidelineCart as G}from"./GuidelineCart.js";import{GuidelineFilterPanel as w}from"./GuidelineFilterPanel.js";import{GuidelineLibrary as C}from"./GuidelineLibrary.js";import{GuidelineTooltip as I}from"./GuidelineTooltip.js";import{LearningManagementWrapper as k}from"./LearningManagementWrapper.js";import{registerGuidelinePreviewRequest as T}from"../workspace/workspace.runtime.js";function D(D){var L,N=this,F=D.guidelines,B=D.cartGuidelines,S=D.recentGuidelines,A=D.selectedGuidelineIds,E=D.defaultSelectedGuidelineIds,P=D.cartGuidelineIds,j=D.defaultCartGuidelineIds,U=D.guidelineSections,W=D.onSelectedGuidelineIdsChange,R=D.onCartGuidelineIdsChange,O=D.onToggleGuideline,_=D.onPreviewGuideline,M=D.onRemoveGuideline,V=D.onProceed,q=D.onAddGuideline,z=D.addGuidelineButtons,H=D.onDebugInfoClick,J=D.hideDeleteButton,K=D.className,Q=D.classNames,X=D.styles,Y=D.customIcons,Z=D.subTitleLayout,$=D.labels,ee=D.formatAddedOnLabel,ne=void 0===ee?f:ee,ie=D.initialVisibleCount,le=D.showRecentlyUsedTab,te=D.onEditGuideline,oe=D.onDuplicateGuideline,re=D.onDeleteGuideline,de=D.hideEditOption,ae=D.hideDuplicateOption,se=D.hideDeleteOption,ue=D.instantLearning,ce=D.onExploreILGuideline,pe=D.onProceedSelectedIL,me=D.transformSelectedToILData,be=D.fetchILRBACConfig,fe=D.onTabSelection,he=D.searchProps,ge=D.treeSearchProps,xe=D.filterProps,ve=D.filterPanelProps,ye=D.showDashboardButton,Ge=void 0!==ye&&ye,we=D.onDashboardClick,Ce=D.isLoading,Ie=D.fetchWishlistStatus,ke=D.onWishlistToggle,Te=D.treeSidebarProps,De=p($),Le=null!==(L=null==ue?void 0:ue.maxCartItems)&&void 0!==L?L:1,Ne=r(null),Fe=Ne[0],Be=Ne[1],Se=v({guidelines:F,selectedGuidelineIds:A,defaultSelectedGuidelineIds:E,onSelectedGuidelineIdsChange:W}),Ae=Se.selectedIds,Ee=Se.toggleGuideline,Pe=Se.setSelectedIds,je=y({value:P,defaultValue:null!=j?j:[],onChange:R}),Ue=je[0],We=je[1],Re=null!=B?B:F,Oe=Re.filter(function(e){return Ae.includes(m(e))&&Ue.includes(m(e))}),_e=function(e){var i=Ue.includes(e),l=F.find(function(n){return m(n)===e});return i?(We(function(n){return n.filter(function(n){return n!==e})}),Pe(function(n){return n.filter(function(n){return n!==e})}),void(l&&M(l))):l&&h(l)&&1===Le?(We([e]),Pe([e]),void(null==O||O(e,[e]))):(We(function(i){return l&&h(l)&&Le>0&&i.length>=Le?i:n(n([],i,!0),[e],!1)}),void Pe(function(i){var l=i.includes(e)?i:n(n([],i,!0),[e],!1);return null==O||O(e,l),l}))},Me=function(e){Be(e),null==ce||ce(e)},Ve=function(e){h(e)?Me(e):_(e)};d(function(){return T(function(e){Ve(e)}),function(){T(null)}},[Ve]);return t("div",e({className:b("lsc-guidelines h-full w-full bg-white font-[Inter]",null==Q?void 0:Q.landingRoot,K),style:null==X?void 0:X.landingRoot},{children:[t("main",e({className:b("h-full overflow-auto px-10 py-10",null==Q?void 0:Q.landingContent),style:null==X?void 0:X.landingContent},{children:[t("div",e({className:b("flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between",null==Q?void 0:Q.landingIntroRow),style:null==X?void 0:X.landingIntroRow},{children:[t("div",e({className:b("min-w-0 flex-1",null==Q?void 0:Q.landingIntro),style:null==X?void 0:X.landingIntro},{children:[o("h1",e({className:b("text-[30px] font-bold leading-[38px] text-[#6D35F2]",null==Q?void 0:Q.landingTitle),style:null==X?void 0:X.landingTitle},{children:De.landingTitle})),o("p",e({className:b("mt-2 text-[19px] leading-7 text-[#1F2937]",null==Q?void 0:Q.landingDescription),style:null==X?void 0:X.landingDescription},{children:De.landingDescription})),o(I,e({content:De.landingDebugTooltipContent,side:"right",maxWidth:400},{children:t("button",e({type:"button",onClick:H,className:b("mt-3 inline-flex items-center gap-2 text-[14px] font-medium text-[#53657D] hover:text-[#344054]",null==Q?void 0:Q.landingDebugLink),style:null==X?void 0:X.landingDebugLink},{children:[o("span",{children:De.landingDebugLabel}),o(a,{className:b("h-5 w-5",null==Q?void 0:Q.landingDebugIcon),style:null==X?void 0:X.landingDebugIcon,strokeWidth:2})]}))}))]})),z&&z.length>0?o("div",e({className:b("flex flex-shrink-0 flex-wrap items-center gap-3 sm:ml-auto",null==Q?void 0:Q.landingTopAddButtonGroup),style:null==X?void 0:X.landingTopAddButtonGroup,"data-testid":"lsc-add-guideline-button-group"},{children:z.map(function(n,i){var l;return t("button",e({type:"button",onClick:n.onClick,disabled:n.disabled,"data-testid":"lsc-add-guideline-button-".concat(n.id),className:b("inline-flex h-11 min-w-[200px] flex-shrink-0 items-center justify-center gap-3 rounded-[6px] px-5 text-[15px] font-semibold shadow-[0_1px_2px_rgba(16,24,40,0.08)] transition-colors disabled:cursor-not-allowed disabled:opacity-50",0===i?"bg-[#4438F5] text-white hover:bg-[#392DE8]":"border border-[#4438F5] bg-white text-[#4438F5] hover:bg-[#F8F5FF]",null==Q?void 0:Q.landingTopAddButton),style:null==X?void 0:X.landingTopAddButton},{children:[null!==(l=n.icon)&&void 0!==l?l:o(u,{className:"h-5 w-5 flex-shrink-0",strokeWidth:2.4}),o("span",e({className:"truncate"},{children:n.label}))]}),n.id)})})):q?t("button",e({type:"button",onClick:q,className:b("inline-flex h-11 min-w-[210px] flex-shrink-0 items-center justify-center gap-3 rounded-[6px] bg-[#4438F5] px-5 text-[15px] font-semibold text-white shadow-[0_1px_2px_rgba(16,24,40,0.08)] transition-colors hover:bg-[#392DE8] sm:ml-auto",null==Q?void 0:Q.landingTopAddButton),style:null==X?void 0:X.landingTopAddButton},{children:[o(u,{className:"h-5 w-5 flex-shrink-0",strokeWidth:2.4}),o("span",e({className:"truncate"},{children:De.landingAddGuidelineLabel}))]})):null]})),t("div",e({className:b("mt-12 grid w-full grid-cols-[minmax(0,1fr)_minmax(300px,360px)] items-start gap-6 2xl:grid-cols-[minmax(0,1fr)_minmax(360px,424px)]",null==Q?void 0:Q.landingBody),style:null==X?void 0:X.landingBody},{children:[Fe?function(){var n,i;if(!Fe)return null;var l=g(Fe),r=x(Fe,null==ue?void 0:ue.modeId);m(Fe);var d,a,p=(d=m(Fe),a=Ue.includes(d),t("button",e({type:"button",onClick:function(){return _e(d)},className:b("inline-flex h-10 min-w-[140px] items-center justify-center gap-2 rounded-[6px] border px-4 text-[14px] font-semibold transition-colors",a?"border-transparent bg-[#F3EFFF] text-[#5B2CF4] hover:bg-[#EDE5FF]":"border-[#8B5CF6] bg-white text-[#5B2CF4] hover:bg-[#F8F5FF]")},{children:[o(a?c:u,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2.6}),o("span",e({className:"truncate"},{children:a?De.libraryAddedToCart:De.libraryAddToCart}))]})));return(null==ue?void 0:ue.userDetails)&&ue.baseUrl&&ue.baseWebsocketUrl&&ue.token&&ue.assistantName&&ue.appsecRbacUrl&&ue.appsecBaseUrl&&be?o(k,{userDetails:ue.userDetails,baseUrl:ue.baseUrl,baseWebsocketUrl:ue.baseWebsocketUrl,token:ue.token,assistantName:ue.assistantName,appsecRbacUrl:null!==(n=ue.appsecGranularRbacUrl)&&void 0!==n?n:"",appsecBaseUrl:null!==(i=ue.appsecGranularBaseUrl)&&void 0!==i?i:"",appIntegrationId:r,modeId:ue.modeId,guidelineTitle:l,onBack:function(){return Be(null)},fetchILRBACConfig:be,headerActions:p}):o("div",e({className:"flex min-h-[420px] flex-col rounded-[8px] border border-[#EAECF0] bg-white"},{children:t("div",e({className:"flex items-center gap-3 border-b border-[#EAECF0] px-1 py-3"},{children:[t("button",e({type:"button",onClick:function(){return Be(null)},className:"inline-flex items-center gap-2 rounded-[6px] px-2 py-1 text-[14px] font-medium text-[#344054] hover:bg-[#F9FAFB]"},{children:[o(s,{className:"h-4 w-4",strokeWidth:2}),o("span",{children:"Back"})]})),o("p",e({className:"min-w-0 flex-1 truncate text-[14px] font-semibold text-[#1F2937]"},{children:l})),p]}))}))}():o(C,{guidelines:F,recentGuidelines:S,guidelineSections:U,cartGuidelineIds:Ue,savedTabLabel:De.savedTabLabel,recentTabLabel:De.recentTabLabel,emptyTitle:De.libraryEmptyTitle,emptyDescription:De.libraryEmptyDescription,addToCartLabel:De.libraryAddToCart,addedToCartLabel:De.libraryAddedToCart,selectLabel:De.librarySelect,selectedLabel:De.librarySelected,exploreLabel:De.libraryExplore,showMoreLabel:De.libraryShowMore,showLessLabel:De.libraryShowLess,initialVisibleCount:ie,showRecentlyUsedTab:le,onToggleGuideline:_e,onPreviewGuideline:_,onExploreILGuideline:Me,classNames:Q,styles:X,customIcons:Y,subTitleLayout:Z,onTabSelection:fe,formatAddedOnLabel:ne,onEditGuideline:te,onDuplicateGuideline:oe,onDeleteGuideline:re,hideEditOption:de,hideDuplicateOption:ae,hideDeleteOption:se,searchProps:he,treeSearchProps:ge,filterProps:xe,showDashboardButton:Ge,onDashboardClick:we,isLoading:Ce,instantLearning:ue,fetchWishlistStatus:Ie,onWishlistToggle:ke,treeSidebarProps:Te}),o(G,{guidelines:Re,cartGuidelineIds:Ue,selectedGuidelineIds:Ae,onToggleGuideline:Ee,onPreviewGuideline:Ve,onRemoveGuideline:function(e){var n=m(e);We(function(e){return e.filter(function(e){return e!==n})}),Pe(function(e){return e.filter(function(e){return e!==n})}),M(e)},onProceed:function(){return i(N,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return Oe.some(h)&&pe&&me&&(null==ue?void 0:ue.token)?[4,me(Oe,ue.modeId,ue.token)]:[3,2];case 1:return e=n.sent(),pe(e),[2];case 2:return V(Oe),[2]}})})},hideDeleteButton:J,classNames:Q,styles:X,labels:$,formatAddedOnLabel:ne})]}))]})),ve&&o(w,e({},ve,{classNames:Q,styles:X}))]}))}export{D as GuidelineLandingPage};
|
|
2
|
+
//# sourceMappingURL=GuidelineLandingPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineLandingPage.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as l,jsx as i}from"react/jsx-runtime";import{useState as r,Fragment as t}from"react";import{ChevronRight as a,ChevronLeft as n,Search as o,SlidersHorizontal as d,X as s,LayoutDashboard as c,BookmarkCheck as u}from"lucide-react";import{cx as b,getGuidelineId as p}from"../utils.js";import{GuidelineLibraryCard as m}from"./GuidelineLibraryCard.js";import{GuidelineTooltip as h}from"./GuidelineTooltip.js";import{TreeSidebar as x}from"@e-llm-studio/creative-workspace-ui-component";function v(r){var t=r.classNames,a=r.styles;return l("article",e({className:b("flex min-h-[156px] flex-col rounded-[8px] border border-[#EAECF0] bg-white px-5 py-5 shadow-[0_1px_2px_rgba(16,24,40,0.03)]",null==t?void 0:t.libraryCard),style:null==a?void 0:a.libraryCard},{children:[l("div",e({className:"flex min-w-0 items-start justify-between gap-4"},{children:[l("div",e({className:"min-w-0 flex-1"},{children:[i("div",{className:"h-5 w-3/4 animate-pulse rounded bg-[#E5E7EB]"}),i("div",{className:"mt-2 h-4 w-1/2 animate-pulse rounded bg-[#E5E7EB]"})]})),l("div",e({className:"flex flex-shrink-0 items-center gap-2"},{children:[i("div",{className:"h-8 w-8 animate-pulse rounded bg-[#E5E7EB]"}),i("div",{className:"h-8 w-8 animate-pulse rounded bg-[#E5E7EB]"})]}))]})),l("div",e({className:"mt-6 space-y-2"},{children:[i("div",{className:"h-4 w-full animate-pulse rounded bg-[#E5E7EB]"}),i("div",{className:"h-4 w-2/3 animate-pulse rounded bg-[#E5E7EB]"})]})),l("div",e({className:"mt-auto grid grid-cols-[minmax(0,1fr)_minmax(140px,176px)] items-end gap-3 pt-5"},{children:[l("div",e({className:"flex items-center gap-4"},{children:[i("div",{className:"h-5 w-5 animate-pulse rounded bg-[#E5E7EB]"}),i("div",{className:"h-5 w-5 animate-pulse rounded bg-[#E5E7EB]"})]})),i("div",{className:"h-10 w-full animate-pulse rounded-[6px] bg-[#E5E7EB]"})]}))]}))}function f(f){var y,g,w,E,N,C,D,F=f.guidelines,S=f.guidelineSections,L=f.cartGuidelineIds,B=f.emptyTitle,T=f.emptyDescription,k=f.addToCartLabel,A=f.addedToCartLabel,W=f.selectLabel,I=f.selectedLabel,G=f.exploreLabel;f.showMoreLabel,f.showLessLabel,f.initialVisibleCount,f.showRecentlyUsedTab;var _=f.onToggleGuideline,j=f.onPreviewGuideline,O=f.onExploreILGuideline,P=f.classNames,H=f.styles,M=f.customIcons,R=f.subTitleLayout,U=f.formatAddedOnLabel,V=f.onEditGuideline,q=f.onDuplicateGuideline,z=f.onDeleteGuideline,J=f.hideEditOption,K=f.hideDuplicateOption,Q=f.hideDeleteOption,X=f.onTabSelection,Y=f.searchProps;f.treeSearchProps;var Z=f.filterProps,$=f.showDashboardButton,ee=void 0!==$&&$,le=f.onDashboardClick,ie=f.isLoading,re=f.instantLearning,te=f.fetchWishlistStatus,ae=f.onWishlistToggle,ne=f.treeSidebarProps,oe=f.cartAction,de=r(!1),se=de[0],ce=de[1],ue=function(r){var t,a,n,o=r.id,d=r.isDisabled,s=null!==(t=r.isActive)&&void 0!==t&&t,c=r.title,p=r.count,m=null!==(a=r.description)&&void 0!==a?a:"",x=null!==(n=r.icon)&&void 0!==n?n:i(u,{className:"h-5 w-5 flex-shrink-0",strokeWidth:2}),v=l("button",e({type:"button",onClick:function(){d||null==X||X(o)},disabled:d,className:b("relative inline-flex h-10 items-center gap-2 px-4 text-[14px] font-medium transition-colors",s?"text-[#1F2937] after:absolute after:inset-x-0 after:bottom-0 after:h-[3px] after:rounded-full after:bg-[#6D5BFF]":"text-[#B5BDC8]",s?null==P?void 0:P.libraryTabActive:null==P?void 0:P.libraryTabInactive,null==P?void 0:P.libraryTab),style:e(e({},null==H?void 0:H.libraryTab),s?null==H?void 0:H.libraryTabActive:null==H?void 0:H.libraryTabInactive)},{children:[x,i("span",e({className:"truncate"},{children:c})),"number"==typeof p&&i("span",e({className:b("inline-flex h-5 min-w-5 flex-shrink-0 items-center justify-center rounded-full px-1.5 text-[12px] font-semibold",s?"bg-[#EDE9FE] text-[#5B2CF4]":"bg-[#F2F4F7] text-[#98A2B3]")},{children:p}))]}));return m?i(h,e({content:m,side:"bottom",maxWidth:220},{children:v})):v};return l("section",e({className:b("flex min-h-0 min-w-0 flex-col overflow-hidden",null==P?void 0:P.library),style:null==H?void 0:H.library},{children:[l("div",e({className:b("flex min-w-0 items-end gap-3 border-b border-[#EAECF0]",null==P?void 0:P.libraryTabs),style:null==H?void 0:H.libraryTabs},{children:[i("div",e({className:"flex min-w-0 flex-1 overflow-x-auto"},{children:null==S?void 0:S.map(function(e){return i(t,{children:ue(e)},e.id)})})),oe]})),l("div",e({className:b("border border-[#E3E6EA] rounded-xl flex flex-row min-h-0 min-w-0 flex-1 items-stretch overflow-hidden",null==P?void 0:P.guideLineLibraryContent),style:null==H?void 0:H.guideLineLibraryContent},{children:[ne&&l("div",e({className:b("flex flex-col border-r border-[#E3E6EA] flex-shrink-0 overflow-hidden transition-[width] duration-200 ease-[ease]",se?"w-14":"w-[360px]",null==P?void 0:P.treeSidebarWrapper,se&&(null==P?void 0:P.treeSidebarCollapsedWrapper)),style:e(e({},null==H?void 0:H.treeSidebarWrapper),se&&(null==H?void 0:H.treeSidebarCollapsedWrapper))},{children:[l("div",e({className:b("flex border-b border-[#EAECF0] p-4 items-center min-h-14",se?"justify-center px-0 [border-bottom:none]":"justify-between",null==P?void 0:P.treeSidebarHeading),style:null==H?void 0:H.treeSidebarHeading},{children:[!se&&i("p",e({className:b("text-sm font-medium text-[#344054] m-0",null==P?void 0:P.treeSidebarHeadingText),style:null==H?void 0:H.treeSidebarHeadingText},{children:"Scope"})),i("button",e({type:"button",onClick:function(){return ce(function(e){return!e})},"aria-label":se?"Expand scope sidebar":"Collapse scope sidebar","aria-expanded":!se,title:se?"Expand scope sidebar":"Collapse scope sidebar",className:b("inline-flex w-8 h-8 flex-shrink-0 items-center justify-center p-0 border-0 rounded-md bg-transparent text-[#475467] cursor-pointer",null==P?void 0:P.treeSidebarCollapseButton),style:null==H?void 0:H.treeSidebarCollapseButton},{children:i(se?a:n,{strokeWidth:2,className:b("h-5 w-5",null==P?void 0:P.treeSidebarCollapseIcon),style:null==H?void 0:H.treeSidebarCollapseIcon})}))]})),!se&&i(x,e({},ne))]})),l("div",e({className:b("flex-1 min-h-0 min-w-0 flex flex-col overflow-hidden",null==P?void 0:P.guideLineLibraryCardContainer),style:null==H?void 0:H.guideLineLibraryCardContainer},{children:[(Y||Z||ee)&&l("div",e({className:b("mt-6 flex flex-col gap-3 sm:flex-row sm:items-center",null==P?void 0:P.libraryControls),style:null==H?void 0:H.libraryControls},{children:[Y&&l("label",e({className:b("flex h-11 flex-1 items-center gap-3 rounded-[10px] border border-[#D0D5DD] bg-white px-4 shadow-[0_1px_2px_rgba(16,24,40,0.05)] transition-colors focus-within:border-[#A78BFA] focus-within:ring-2 focus-within:ring-[#F4F0FF]",null==P?void 0:P.librarySearchWrapper),style:null==H?void 0:H.librarySearchWrapper},{children:[i(o,{className:b("h-5 w-5 flex-shrink-0 text-[#98A2B3]",null==P?void 0:P.librarySearchIcon),style:null==H?void 0:H.librarySearchIcon,strokeWidth:2}),i("input",{type:"search",value:Y.value,onChange:function(e){return Y.onChange(e.target.value)},placeholder:null!==(y=Y.placeholder)&&void 0!==y?y:"Search guidelines","aria-label":null!==(g=Y.ariaLabel)&&void 0!==g?g:"Search guidelines",className:b("w-full border-0 bg-transparent p-0 text-[16px] text-[#344054] outline-none placeholder:text-[#667085]",null==P?void 0:P.librarySearchInput),style:null==H?void 0:H.librarySearchInput})]})),Z&&l("div",e({className:b("inline-flex h-11 items-center rounded-[10px] border border-[#D0D5DD] bg-white shadow-[0_1px_2px_rgba(16,24,40,0.05)]",null==P?void 0:P.libraryFilterButton),style:null==H?void 0:H.libraryFilterButton},{children:[l("button",e({type:"button",onClick:Z.onClick,"aria-label":null!==(E=null!==(w=Z.ariaLabel)&&void 0!==w?w:Z.label)&&void 0!==E?E:"Filters",className:"inline-flex h-full items-center gap-2 px-4 text-[16px] font-medium text-[#53657D] transition-colors hover:bg-[#F9FAFB] rounded-l-[10px]"},{children:[null!==(N=Z.icon)&&void 0!==N?N:i(d,{className:b("h-5 w-5 flex-shrink-0",null==P?void 0:P.libraryFilterIcon),style:null==H?void 0:H.libraryFilterIcon,strokeWidth:2}),i("span",{children:null!==(C=Z.label)&&void 0!==C?C:"Filters"}),void 0!==Z.activeCount&&Z.activeCount>0&&i("span",e({className:"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-[#6D5BFF] px-1.5 text-[12px] font-medium text-white"},{children:Z.activeCount}))]})),void 0!==Z.activeCount&&Z.activeCount>0&&Z.onClear&&l("button",e({type:"button",onClick:function(e){var l;e.stopPropagation(),null===(l=Z.onClear)||void 0===l||l.call(Z)},"aria-label":"Clear all filters",className:"inline-flex h-full items-center gap-1.5 border-l border-[#D0D5DD] px-3 text-[14px] font-medium text-[#53657D] transition-colors hover:bg-[#F9FAFB] rounded-r-[10px]"},{children:[i("span",{children:null!==(D=Z.clearLabel)&&void 0!==D?D:"clear all"}),i(s,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2})]}))]})),ee&&l("button",e({type:"button",onClick:le,"aria-label":"Dashboard",className:b("inline-flex h-11 flex-shrink-0 items-center gap-2 rounded-[10px] border border-[#D0D5DD] bg-white px-4 text-[16px] font-medium text-[#53657D] shadow-[0_1px_2px_rgba(16,24,40,0.05)] transition-colors hover:bg-[#F9FAFB]",null==P?void 0:P.libraryDashboardButton),style:null==H?void 0:H.libraryDashboardButton},{children:[i(c,{className:b("h-5 w-5 flex-shrink-0",null==P?void 0:P.libraryDashboardIcon),style:null==H?void 0:H.libraryDashboardIcon,strokeWidth:2}),i("span",{children:"Dashboard"})]}))]})),ie?i("div",e({className:b("mt-6 min-h-0 flex-1 overflow-y-auto pr-2",null==P?void 0:P.libraryScrollArea),style:null==H?void 0:H.libraryScrollArea},{children:i("div",e({className:b("grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),1fr))] gap-5",null==P?void 0:P.libraryGrid),style:null==H?void 0:H.libraryGrid},{children:Array.from({length:4}).map(function(e,l){return i(v,{classNames:P,styles:H},"skeleton-".concat(l))})}))})):0===F.length?l("div",e({className:b("mt-6 flex min-h-[260px] flex-col items-center justify-center rounded-[8px] border border-dashed border-[#CDBDFF] bg-[#FBFAFF] px-6 text-center",null==P?void 0:P.libraryEmptyState),style:null==H?void 0:H.libraryEmptyState},{children:[i("p",e({className:b("text-[15px] font-semibold text-[#344054]",null==P?void 0:P.libraryEmptyTitle),style:null==H?void 0:H.libraryEmptyTitle},{children:B})),i("p",e({className:b("mt-2 max-w-[320px] text-[13px] leading-5 text-[#667085]",null==P?void 0:P.libraryEmptyDescription),style:null==H?void 0:H.libraryEmptyDescription},{children:T}))]})):i("div",e({className:b("mt-6 min-h-0 flex-1 overflow-y-auto pr-2",null==P?void 0:P.libraryScrollArea),style:null==H?void 0:H.libraryScrollArea},{children:i("div",e({className:b("grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),1fr))] gap-5",null==P?void 0:P.libraryGrid),style:null==H?void 0:H.libraryGrid},{children:F.map(function(e){return i(m,{guideline:e,isSelected:L.includes(p(e)),addToCartLabel:k,addedToCartLabel:A,selectLabel:W,selectedLabel:I,exploreLabel:G,onToggle:_,onPreview:j,onExplore:O,onEdit:V,onDuplicate:q,onDelete:z,hideEditOption:J,hideDuplicateOption:K,hideDeleteOption:Q,classNames:P,styles:H,customIcons:M,subTitleLayout:R,formatAddedOnLabel:U,instantLearning:re,fetchWishlistStatus:te,onWishlistToggle:ae},p(e))})}))}))]}))]}))]}))}export{f as GuidelineLibrary};
|
|
2
|
+
//# sourceMappingURL=GuidelineLibrary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineLibrary.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as n,jsxs as l,Fragment as r}from"react/jsx-runtime";import{useRef as a,useState as o,useEffect as s}from"react";import{Check as c,Plus as d,Share as u,Share2 as m,MoreHorizontal as p,Heart as h,Eye as b}from"lucide-react";import{getGuidelineId as f,getGuidelineTitle as v,getGuidelineDisplayDescription as x,getGuidelineDate as y,isInstantLearningGuideline as C,cx as g}from"../utils.js";import{GuidelineIconButton as w}from"./GuidelineIconButton.js";import{createGuidelineCardMenuItems as F,GuidelineCardMenu as N}from"./GuidelineCardMenu.js";import{GuidelineConfirmDialog as D}from"./GuidelineConfirmDialog.js";import{RbacQueryProvider as k,AppsecProvider as B}from"appsec-ui";import{FALLBACK_RBAC_CONFIG as L}from"../constants.js";function E(E){var S,T,_,j,W,A,P,U=this,G=E.guideline,I=E.isSelected,O=E.addToCartLabel,R=E.addedToCartLabel,M=E.selectLabel,H=void 0===M?"Select":M,q=E.selectedLabel,z=void 0===q?"Selected":q,J=E.onToggle,K=E.onPreview,Q=E.onExplore;E.onEdit;var V=E.onDuplicate,X=E.onDelete;E.hideEditOption,E.hideDuplicateOption;var Y=E.hideDeleteOption,Z=void 0!==Y&&Y;E.editOptionLabel,E.duplicateOptionLabel;var $=E.deleteOptionLabel,ee=void 0===$?"Delete":$,te=E.duplicateConfirmTitle,ie=void 0===te?"Duplicate Guideline":te,ne=E.duplicateConfirmDescription,le=E.duplicateConfirmLabel,re=void 0===le?"Duplicate":le,ae=E.deleteConfirmTitle,oe=void 0===ae?"Delete Guideline":ae,se=E.deleteConfirmDescription,ce=E.deleteConfirmLabel,de=void 0===ce?"Delete":ce,ue=E.classNames,me=E.styles,pe=E.customIcons,he=E.subTitleLayout,be=E.instantLearning,fe=E.formatAddedOnLabel;E.fetchWishlistStatus;var ve=E.onWishlistToggle,xe=f(G),ye=v(G),Ce=x(G),ge=fe(y(G)),we=null===(S=G.created_by)||void 0===S?void 0:S.trim(),Fe=[we?"Created by ".concat(we):"",ge].filter(Boolean).join(" • "),Ne=new Date(y(G)||Date.now()),De="template"===he,ke=Ne.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),Be=Ne.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),Le="".concat(ke," at ").concat(Be),Ee=[we?"Created by ".concat(we):"",Le].filter(Boolean).join(" • "),Se=null!==(T=G.category)&&void 0!==T?T:"Requirement AI Template",Te=C(G),_e=!0===G.is_legacy,je=I?null!==(_=null==pe?void 0:pe.selectedIcon)&&void 0!==_?_:n(c,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2.6}):null!==(j=null==pe?void 0:pe.unselectedIcon)&&void 0!==j?j:n(d,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2.6}),We=null!==(W=null==pe?void 0:pe.shareIcon)&&void 0!==W?W:n(u,{className:"h-5 w-5",strokeWidth:2.2}),Ae=Te?H:O,Pe=Te?z:R,Ue=Te?G.topic_name:void 0,Ge=(null===(P=null===(A=G.mode_mappings)||void 0===A?void 0:A[0])||void 0===P?void 0:P.application_integration_id)||xe,Ie=a(null),Oe=o(!1),Re=Oe[0],Me=Oe[1],He=o(!1),qe=He[0],ze=He[1],Je=o(!1),Ke=Je[0],Qe=Je[1],Ve=o(!1),Xe=Ve[0],Ye=Ve[1],Ze=o(!1);Ze[0];var $e=Ze[1],et=o(!!G.is_wishlisted),tt=et[0],it=et[1],nt=o(!1),lt=nt[0],rt=nt[1],at=null!=ne?ne:'Are you sure you want to duplicate "'.concat(ye,'"? A copy will be created with "(1)" appended to the title.'),ot=null!=se?se:'Are you sure you want to delete "'.concat(ye,'"? This action cannot be undone.');s(function(){it(!!G.is_wishlisted)},[G.is_wishlisted]);var st=function(){Te&&Q?Q(G):K(G)},ct=F({onDelete:function(){return Qe(!0)},deleteLabel:ee,hideDelete:Z||!X}),dt=ct.some(function(e){return!e.hidden});return l(r,{children:[l("article",e({onClick:function(e){e.target.closest('button, a, input, select, textarea, [role="button"]')||st()},className:g("flex min-h-[156px] cursor-pointer flex-col rounded-[8px] border border-[#EAECF0] bg-white px-5 py-5 shadow-[0_1px_2px_rgba(16,24,40,0.03)]",null==ue?void 0:ue.libraryCard),style:null==me?void 0:me.libraryCard},{children:[l("div",e({className:g("flex min-w-0 items-start justify-between gap-4",null==ue?void 0:ue.libraryCardHeader),style:null==me?void 0:me.libraryCardHeader},{children:[l("div",e({className:"min-w-0 flex-1"},{children:[l("div",e({className:"flex min-w-0 items-center gap-2"},{children:[_e&&n("span",e({className:"inline-flex h-6 flex-shrink-0 items-center rounded-full border border-[#D0E2FF] bg-[#EFF6FF] px-2.5 text-[12px] font-medium leading-none text-[#2563EB]"},{children:"Legacy"})),n("h3",e({className:g("min-w-0 truncate text-[15px] font-semibold leading-5 text-[#1F2937]",null==ue?void 0:ue.libraryCardTitle),style:null==me?void 0:me.libraryCardTitle,title:ye},{children:ye}))]})),"template"===he?n("p",e({className:g("mt-2 min-w-0 truncate text-[12px] leading-4 text-[#667085]",null==ue?void 0:ue.libraryCardDate),style:null==me?void 0:me.libraryCardDate,title:Ee},{children:Ee})):Fe?n("p",e({className:g("mt-2 min-w-0 truncate text-[12px] leading-4 text-[#667085]",null==ue?void 0:ue.libraryCardDate),style:null==me?void 0:me.libraryCardDate,title:Fe},{children:Fe})):null]})),l("div",e({className:g("flex flex-shrink-0 items-center gap-2 text-[#64748B]",null==ue?void 0:ue.libraryCardActions),style:null==me?void 0:me.libraryCardActions},{children:[Te&&!De&&n(w,e({slot:"shareGuideline",label:"Share ".concat(ye),title:"Share",onClick:function(){return $e(!0)},classNames:ue,styles:me},{children:n(m,{className:"h-4 w-4",strokeWidth:2.2})})),l("div",e({className:"relative"},{children:[n(w,e({slot:"libraryCardMoreButton",label:"More options for ".concat(ye),title:"More options",onClick:function(){return dt?Me(function(e){return!e}):void 0},classNames:ue,styles:me,ref:Ie},{children:n(p,{className:"h-4 w-4",strokeWidth:2.2})})),dt&&n(N,{open:Re,onClose:function(){return Me(!1)},anchorRef:Ie,items:ct,classNames:ue,styles:me})]}))]}))]})),n("p",e({className:g("mt-6 line-clamp-2 min-h-[40px] text-[13px] leading-5 text-[#344054]",null==ue?void 0:ue.libraryCardDescription),style:null==me?void 0:me.libraryCardDescription,title:Ce},{children:Ce})),De&&l("p",e({className:"mt-3 min-w-0 truncate text-[12px] leading-4 text-[#667085]"},{children:["Content Type :"," ",n("span",e({className:"font-semibold text-[#344054]"},{children:Se}))]})),Ue&&l("p",e({className:"mt-5 flex min-w-0 items-center gap-2 text-[12px] leading-4 text-[#475467]"},{children:[n("span",e({className:"flex-shrink-0"},{children:"Topic:"})),n("span",e({className:"min-w-0 truncate rounded-[6px] border border-[#D8C8FF] bg-[#F4EFFF] px-2 py-1 font-medium text-[#4D21F3]"},{children:Ue}))]})),l("div",e({className:g("mt-auto grid grid-cols-[minmax(0,1fr)_minmax(140px,176px)] items-end gap-3 pt-5",null==ue?void 0:ue.libraryCardFooter),style:null==me?void 0:me.libraryCardFooter},Te?{children:[l("div",e({className:"flex items-center gap-4"},{children:[!_e&&n("button",e({type:"button",onClick:function(e){return t(U,void 0,void 0,function(){var t,n;return i(this,function(i){switch(i.label){case 0:if(e.stopPropagation(),!ve||!(null==be?void 0:be.token))return[2];t=!tt,rt(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,ve(Ge,t,be.token)];case 2:return i.sent(),it(t),[3,5];case 3:return n=i.sent(),console.error("Wishlist operation failed:",n),[3,5];case 4:return rt(!1),[7];case 5:return[2]}})})},disabled:lt,className:g("transition-colors focus:outline-none disabled:opacity-50",tt?"text-[#E12D2D]":"text-[#667085] hover:text-[#E12D2D]"),"aria-label":tt?"Remove ".concat(ye," from wishlist"):"Add ".concat(ye," to wishlist")},{children:n(h,{className:g("h-5 w-5",tt?"fill-current":"fill-none"),strokeWidth:2.2})})),n("button",e({type:"button",onClick:st,className:"text-[#667085] hover:text-[#344054]","aria-label":"Preview ".concat(ye),title:"Preview"},{children:n(b,{className:"h-5 w-5",strokeWidth:2.2})})),De&&n("button",e({type:"button",onClick:function(e){e.stopPropagation(),$e(!0)},className:"text-[#667085] hover:text-[#344054]","aria-label":"Share ".concat(ye),title:"Share"},{children:We}))]})),l("button",e({type:"button",onClick:function(){return J(xe)},"aria-pressed":I,className:g("inline-flex h-10 min-w-0 items-center justify-center gap-2 rounded-[6px] border px-4 text-[14px] font-semibold transition-colors",I?"border-transparent bg-[#F3EFFF] text-[#5B2CF4] hover:bg-[#EDE5FF]":"border-[#8B5CF6] bg-white text-[#5B2CF4] hover:bg-[#F8F5FF]",null==ue?void 0:ue.libraryCardSelectButton),style:null==me?void 0:me.libraryCardSelectButton},{children:[je,n("span",e({className:"truncate"},{children:I?Pe:Ae}))]}))]}:{children:[n("div",e({className:"flex items-center gap-4"},{children:n("button",e({type:"button",onClick:st,className:"text-[#667085] hover:text-[#344054]","aria-label":"Preview ".concat(ye),title:"Preview"},{children:n(b,{className:"h-5 w-5",strokeWidth:2.2})}))})),l("button",e({type:"button",onClick:function(){return J(xe)},"aria-pressed":I,className:g("inline-flex h-10 w-full min-w-0 items-center justify-center gap-2 rounded-[6px] border px-4 text-[14px] font-semibold transition-colors",I?"border-transparent bg-[#F3EFFF] text-[#5B2CF4] hover:bg-[#EDE5FF]":"border-[#8B5CF6] bg-white text-[#5B2CF4] hover:bg-[#F8F5FF]",null==ue?void 0:ue.libraryCardSelectButton),style:null==me?void 0:me.libraryCardSelectButton},{children:[je,n("span",e({className:"truncate"},{children:I?Pe:Ae}))]}))]}))]})),n(D,{open:qe,onClose:function(){return ze(!1)},onConfirm:function(){return t(U,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:if(!V)return[2];Ye(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,Promise.resolve(V(G))];case 2:return e.sent(),[3,4];case 3:return Ye(!1),ze(!1),[7];case 4:return[2]}})})},title:ie,description:at,confirmLabel:re,loading:Xe,classNames:ue,styles:me}),n(D,{open:Ke,onClose:function(){return Qe(!1)},onConfirm:function(){return t(U,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:if(!X)return[2];Ye(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,Promise.resolve(X(G))];case 2:return e.sent(),[3,4];case 3:return Ye(!1),Qe(!1),[7];case 4:return[2]}})})},title:oe,description:ot,confirmLabel:de,variant:"danger",loading:Xe,classNames:ue,styles:me}),(null==be?void 0:be.token)&&n(k,{children:n(B,{appId:be.applicationName||L.applicationName,baseUrl:be.appsecGranularRbacUrl||L.appsecRbacUrl,appsecUrl:be.appsecBaseUrl||L.appsecBaseUrl,mode:"manage",getAuthToken:function(){return be.token}})})]})}export{E as GuidelineLibraryCard};
|
|
2
|
+
//# sourceMappingURL=GuidelineLibraryCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineLibraryCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useState as i,useRef as n}from"react";import{ArrowRight as l}from"lucide-react";import{cx as c}from"../utils.js";import{GuidelineSpinner as s}from"../icons/GuidelineSpinner.js";function a(a){var d=a.label,u=a.disabled,m=a.onClick,p=a.disabledTooltip,f=a.classNames,b=a.styles,h=i(!1),x=h[0],v=h[1],g=n(0),w=u||x;return t("button",e({type:"button",onClick:function(){var e=Date.now();x||e-g.current<2e3||(g.current=e,v(!0),m(),setTimeout(function(){v(!1)},2e3))},disabled:w,title:w&&u&&p?p:void 0,className:c("mt-5 flex h-[52px] w-full items-center justify-center gap-2 rounded-[6px] bg-[#5B2CF4] px-4 text-[16px] font-semibold text-white transition-colors hover:bg-[#4C1FE8] disabled:cursor-not-allowed disabled:bg-[#C7B7FF]",null==f?void 0:f.cartProceedButton),style:null==b?void 0:b.cartProceedButton},{children:r(o,x?{children:[t(s,{}),t("span",e({className:"truncate"},{children:"Processing..."}))]}:{children:[t("span",e({className:"truncate"},{children:d})),t(l,{className:c("h-4 w-4 flex-shrink-0",null==f?void 0:f.cartProceedIcon),style:null==b?void 0:b.cartProceedIcon,strokeWidth:2.3})]})}))}export{a as GuidelineProceedButton};
|
|
2
|
+
//# sourceMappingURL=GuidelineProceedButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineProceedButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t}from"react/jsx-runtime";import{Check as r}from"lucide-react";import{cx as i}from"../utils.js";function o(o){var l=o.isSelected,s=o.onClick,n=o.classNames,c=o.styles;return t("button",e({type:"button",onClick:s,"aria-pressed":l,"aria-label":l?"Unselect guideline":"Select guideline",className:i("mt-1 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-[5px] border transition-colors",l?"border-[#5B2CF4] bg-[#5B2CF4] text-white":"border-[#CBD5E1] bg-white text-transparent hover:border-[#8B5CF6]",null==n?void 0:n.cartItemSelectButton),style:null==c?void 0:c.cartItemSelectButton},{children:t(r,{className:"h-3.5 w-3.5",strokeWidth:3.2})}))}export{o as GuidelineSelectButton};
|
|
2
|
+
//# sourceMappingURL=GuidelineSelectButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineSelectButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i}from"tslib";import{jsx as r,jsxs as o}from"react/jsx-runtime";import*as t from"@radix-ui/react-tooltip";function e(e){var d=e.content,n=e.children,l=e.side,a=void 0===l?"top":l,h=e.maxWidth,c=void 0===h?320:h;return r(t.Provider,i({delayDuration:200},{children:o(t.Root,{children:[r(t.Trigger,i({asChild:!0},{children:n})),r(t.Portal,{children:o(t.Content,i({side:a,sideOffset:6,style:{maxWidth:c,zIndex:9999,borderRadius:8,backgroundColor:"#1F2937",padding:"8px 12px",fontSize:12,lineHeight:"18px",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.16)"}},{children:[d,r(t.Arrow,{style:{fill:"#1F2937"},width:10,height:5})]}))})]})}))}export{e as GuidelineTooltip};
|
|
2
|
+
//# sourceMappingURL=GuidelineTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineTooltip.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{ArrowLeft as n}from"lucide-react";import{QueryClient as l,QueryClientProvider as r}from"@tanstack/react-query";import c from"../../LearningManagement/LearningManagement.js";import{getGuidelineRuntimeConfig as d}from"../services/guideline.runtime.config.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"},g=new l,u={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:"auto"},loadingState:{padding:24,fontSize:14,color:"#667085"}};function m(l){var m,h,v=l.userDetails,E=l.baseUrl,_=l.baseWebsocketUrl,I=l.token,T=l.assistantName,S=l.appsecRbacUrl,A=l.appsecBaseUrl,L=l.appIntegrationId,C=l.modeId,U=l.guidelineTitle,b=l.onBack,B=l.fetchILRBACConfig,w=l.headerActions,M=t(null),N=M[0],R=M[1];return p.config.MODEL=null!==(m=d().editorConfig.ilModelName)&&void 0!==m?m:"claude-3.5-sonnet",p.config.BASE_URL="https://".concat(d().editorConfig.egptDomain),p.config.BASE_WEBSOCKET_URL="wss://".concat(d().editorConfig.egptDomain,"/graphql"),p.llmStudioUrl="https://".concat(d().editorConfig.egptDomain),p.audacyBackendUrl=null!==(h=d().editorConfig.audacyUrl)&&void 0!==h?h:"https://dev-audacy-traffic-manager.techo.camp",o(function(){if(L){var i=e(e({},p),{config:e(e({},p.config),{ASSISTANT_NAME:T,BASE_URL:E,BASE_WEBSOCKET_URL:_}),llmStudioUrl:E}),a=e(e({},s),{appsecRbacUrl:S,appsecBaseUrl:A}),t=!1;return R(null),Promise.resolve(B(E,I,L)).then(function(o){var n,l,r,c;if(!t){var d=o?{applicationName:o.application_name,applicationId:o.application_id,moduleId:null===(n=o.module_data)||void 0===n?void 0:n.Scopes,applicationModuleId:null===(l=o.module_data)||void 0===l?void 0:l.General,applicationResourceId:null===(r=o.resource_data)||void 0===r?void 0:r["Learning Management"],appsecRbacUrl:S,appsecBaseUrl:A}:a;R(e(e({},i),{auditLogConfig:{configId:null!==(c=null==o?void 0:o.change_log_config_id)&&void 0!==c?c:f.configId},rbacConfig:d}))}}).catch(function(){t||R(e(e({},i),{auditLogConfig:f,rbacConfig:a}))}),function(){t=!0}}},[L,A,S,T,E,_,B,I]),i(r,e({client:g},{children:a("div",e({style:u.wrapper},{children:[a("div",e({style:u.header},{children:[a("button",e({type:"button",style:u.backButton,onClick:b},{children:[i(n,{size:16,strokeWidth:2}),"Back"]})),U&&i("p",e({style:u.headerTitle},{children:U})),w&&i("div",e({style:u.headerActions},{children:w}))]})),i("div",e({style:u.lmsContainer},{children:N?i(c,e({},N,{userDetails:v,app_integration_id:L,modeId:C}),"lms-explore"):i("p",e({style:u.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
|
+
var e={landingBreadcrumbLabel:"Agent Guidelines",landingTitle:"Set Your Agent's Guidelines",landingDescription:"Add a set of guidelines that shape how your agent behaves, responds, and interprets.",landingDebugLabel:"Know more about debug mode",landingAddGuidelineLabel:"Add New Set of Guidelines",savedTabLabel:"Saved",recentTabLabel:"Recently used",libraryEmptyTitle:"No saved guidelines",libraryEmptyDescription:"Create a new guideline to start building your session rules.",libraryAddToCart:"Add to Cart",libraryAddedToCart:"Added to Cart",librarySelect:"Select",librarySelected:"Selected",libraryExplore:"Explore",libraryShowMore:"Show more guidelines",libraryShowLess:"Show fewer guidelines",cartTitle:"Guideline Cart",cartDescription:"Guidelines added to your current session",emptyCartTitle:"No guidelines added",emptyCartDescription:"Your selected guidelines will appear here.",proceedButton:"Proceed with Selected",addGuidelineLabel:"Add guideline",selectedBadge:function(e){return"".concat(e," Selected")},landingDebugTooltipContent:"Debug Mode is a transparency and control mechanism designed to intercept prompt submissions before they are dispatched to the LLM to help users test and debug with different guidelines rapidly. It serves as an approval gate, allowing users to verify, configure, and approve the guideline payload for a specific query.",createGuidelinesTooltipContent:"Topics are used to optimize guideline ingestion and retrieval. Select the closest matching topic for the best results.",popoverDebugTooltipContent:"Debug Mode is a transparency and control mechanism designed to intercept prompt submissions before they are dispatched to the LLM to help users test and debug with different guidelines rapidly. It serves as an approval gate, allowing users to verify, configure, and approve the guideline payload for a specific query."},t={data:{_id:"",artifactId:"",artifactTitle:"",artifactTitleIDs:[],artifactData:{final_response_gs_url:"",citationsSnapshot:{image_citations:[],appmod_citations:[],audio_citations:[],file_citations:[],web_citations:[],pdf_citations:[],gpt_citations:[]},projectIdSnapshot:"",userStorySnapshot:[],breadCrumbsSnapShot:[],activePageSnapShot:"",aiReasoningsSnapshot:[],dataSources_files:{},knowledgeBaseSnapshot:[],projectAnalyserSummarySnapshot:[],chatHistorySnapshot:[],persistedDataFilesSnapshot:{},risk_gap_items_json:{},selectedCodebasesSnapshot:[],selectedUserStoryTypeSnapshot:""},dataSources_files:{},modeName:"",modeId:null,artifactSubTitle:"",isLoading:!1,widgetName:"user story",userEmail:"",optionalData:{},created_at:"",updated_at:""},counter:{ai_reasoning_id_counter:0,pdf_citation_id_counter:0,section_number:0}},a={applicationName:"Instant Learning Mode",applicationId:"6a329da7232364c90e1b6a00",moduleId:"6a329da7232364c90e1b6a42",applicationModuleId:"6a329da7232364c90e1b6a3e",applicationResourceId:"6a32a08c232364c90e1b6a56",appsecRbacUrl:"https://dev-cw-appsec.techo.camp/granularApi",appsecBaseUrl:"https://dev-cw-appsec.techo.camp"},i={IMAGES:"images",MEETING_RECORDINGS:"meeting-recordings",DOCUMENTS:"documents",STORMEE_CONVERSATIONS:"stormee-conversations",REQUIREMENT_DOCUMENTS:"requirement-documents",CODEBASE_KNOWLEDGE:"codebase-knowledge",GUIDELINES:"guidelines"},o={GUIDELINE:"guideline",CONTEXT:"context"},n={IN_PROGRESS:"In-Progress",INGESTION_COMPLETE:"Completed",INGESTION_FAILED:"Failed"},s="GUIDELINE_SESSION_ID";export{o as ADD_CONTEXT_FILE_TYPES,t as DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE,e as DEFAULT_GUIDELINE_LABELS,a as FALLBACK_RBAC_CONFIG,n as FILE_INGESTION_STATUS,s as GUIDELINE_SESSION_ID,i as SOURCE_IDS};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useState as n,useRef as r,useEffect as t,useCallback as u}from"react";function e(e){var o=e.value,a=e.defaultValue,c=e.onChange,f=n(a),i=f[0],l=f[1],v=void 0!==o,p=v?o:i,d=r(p);t(function(){d.current=p},[p]);var m=u(function(n){var r="function"==typeof n?n(d.current):n;d.current=r,v||l(r),null==c||c(r)},[v,c]);return[p,m]}export{e as useControllableState};
|
|
2
|
+
//# sourceMappingURL=useControllableState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControllableState.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as e}from"tslib";import{useCallback as t,useMemo as n}from"react";import{getGuidelineId as l}from"../utils.js";import{useControllableState as i}from"./useControllableState.js";function u(u){var r=u.guidelines,d=u.selectedGuidelineIds,o=u.defaultSelectedGuidelineIds,s=void 0===o?[]:o,c=u.onSelectedGuidelineIdsChange,f=u.onToggleGuideline,a=i({value:d,defaultValue:s,onChange:c}),g=a[0],m=a[1],G=t(function(t){m(function(n){var l=n.includes(t)?n.filter(function(e){return e!==t}):e(e([],n,!0),[t],!1);return null==f||f(t,l),l})},[f,m]),p=n(function(){return r.filter(function(e){return g.includes(l(e))})},[r,g]);return{selectedIds:g,selectedGuidelines:p,selectedCount:p.length,toggleGuideline:G,setSelectedIds:m}}export{u as useGuidelineSelection};
|
|
2
|
+
//# sourceMappingURL=useGuidelineSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGuidelineSelection.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{cx as s}from"../utils.js";function e(e){var i=e.className;return t("svg",r({className:s("h-4 w-4 animate-spin",i),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},{children:[o("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}))}export{e as GuidelineSpinner};
|
|
2
|
+
//# sourceMappingURL=GuidelineSpinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidelineSpinner.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryClient.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as i}from"tslib";import{SOURCE_IDS as n,ADD_CONTEXT_FILE_TYPES as r,FILE_INGESTION_STATUS as s}from"../constants.js";import{getSessionItem as u,removeSessionItem as o,setSessionItem as d}from"../utils/session.js";import{getGuidelineRuntimeConfig as a}from"./guideline.runtime.config.js";import{mergeGuidelineFiles as l,getDataCartFilesFromResponse as c,isGuidelineDataCartFile as m,dataCartFileToGuidelineFileItem as f}from"../utils/guidelineFiles.js";import{v4 as I}from"uuid";import{getGuidelineSessionId as g}from"./guideline.session.js";import{addConversation as h,uploadChatHistory as p,updateMemstoreArtifacts as _,getDataCart as v}from"./guideline.core.api.js";var G=function(e){return void 0===e&&(e=[]),Array.from(new Set(e.filter(Boolean)))},y=function(e){return e.status===s.INGESTION_COMPLETE||Boolean(e.summary)?s.INGESTION_COMPLETE:e.status||"Pending"},j=function(){var e=u("chatId");return e||null},w=function(e){a().syncChatId(e)},E=function(){return e(void 0,void 0,void 0,function(){var e,i,n,r,s,l,c,m,f;return t(this,function(t){switch(t.label){case 0:if(e=j())return w(e),[2,e];if(!(i=a().getHostContext().userEmail))return[2,null];n=I(),r=[],s=u("projectId")||"",l=new URL(window.location.href).searchParams.get("artifactId")||"",d("chatId",n),w(n),t.label=1;case 1:return t.trys.push([1,4,,5]),[4,p(n,i,r)];case 2:if(c=t.sent().error)throw c;return[4,h(i,n,l,s)];case 3:if(m=t.sent().error)throw m;return[2,n];case 4:return f=t.sent(),console.error("Failed to initialize chat session for guideline memstore sync:",f),o("chatId"),w(null),[2,null];case 5:return[2]}})})},b=function(e){return v(e)},N=function(e){return _(e)},x=function(e){var t=e.guidelines,s=e.cartGuidelineIds,u=e.selectedGuidelineIds,o=new Set(G(s)),d=new Set(G(u).filter(function(e){return o.has(e)})),a={};return t.forEach(function(e){var t,s;if(null==e?void 0:e.id){var u=e.projectId||"unknown-project",l=o.has(e.id),c=l&&d.has(e.id);a[u]||(a[u]=[]),a[u].push({artifact_id:e.id||e.name,instructions:e.instruction||"",status:y(e),metadata:i({projectName:e.projectName,summary:null!==(t=e.summary)&&void 0!==t?t:"",name:e.name,type:e.type,size:e.size,date:e.date,url:e.url,gcsUrl:e.gcsUrl,source:e.source||n.GUIDELINES,isUploaded:Boolean(e.isUploaded),is_guideline_file:!0,is_guideline_text:Boolean(e.is_guideline_text),is_in_cart:l,is_selected:c,file_type:"session_guideline",button_id:e.buttonId||r.GUIDELINE},e.ingestion_job_id?{task_id:e.ingestion_job_id}:{}),category:null!==(s=e.category)&&void 0!==s?s:e.type})}}),Object.entries(a).map(function(e){var t,i=e[0],n=e[1];return(t={})[i]=n,t})},S=function(e){var t=e.guidelines,i=e.cartGuidelineIds,n=e.selectedGuidelineIds,r=e.modeName,s=e.chatId,u=g(),o=a().getHostContext(),d=o.userEmail,l=o.userName,c=o.activeMode,m=s||j();return t.length&&u&&m?{memstore_data:x({guidelines:t,cartGuidelineIds:i,selectedGuidelineIds:n}),session_id:u,request_type:"update",metadata:{supported_formats:{},user_email:d||"",user_name:l||"",mode_name:r||c||""},chat_id:m}:null},C=function(i){var n=i.guidelines,r=i.cartGuidelineIds,s=i.selectedGuidelineIds,u=i.modeName;return e(void 0,void 0,void 0,function(){var i,o,d,I,g,h,p;return t(this,function(_){switch(_.label){case 0:return[4,e(void 0,void 0,void 0,function(){var e,i,n;return t(this,function(t){switch(t.label){case 0:if(!(e=a().getHostContext().userEmail))return[2,[]];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,b({user_email:e,limit:100})];case 2:return i=t.sent(),[2,c(i).filter(m).map(f)];case 3:return n=t.sent(),console.error("Failed to fetch guideline cart before memstore sync:",n),[2,[]];case 4:return[2]}})})];case 1:return i=_.sent(),o=function(e){var t=e.nextCartGuidelineIds,i=e.nextSelectedGuidelineIds,n=G(t),r=new Set(n);return{cartGuidelineIds:n,selectedGuidelineIds:G(i).filter(function(e){return r.has(e)})}}({nextCartGuidelineIds:r,nextSelectedGuidelineIds:s}),d=l(i,n),o.cartGuidelineIds.length>0||o.selectedGuidelineIds.length>0?[4,E()]:[3,3];case 2:return g=_.sent(),[3,4];case 3:g=j(),_.label=4;case 4:return I=g,(h=S({guidelines:d,cartGuidelineIds:o.cartGuidelineIds,selectedGuidelineIds:o.selectedGuidelineIds,modeName:u,chatId:I}))?[4,N(h)]:[2,!0];case 5:return(p=_.sent().error)?(console.error("Failed to sync guideline cart with memstore:",p),[2,!1]):[2,!0]}})})};export{x as buildGuidelineCartMemstoreData,S as buildGuidelineCartMemstorePayload,E as ensureGuidelineMemstoreChatSession,b as getGuidelineDataCart,C as syncGuidelineCartWithMemstore,N as updateGuidelineMemstoreArtifacts};
|
|
2
|
+
//# sourceMappingURL=guideline.cart.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guideline.cart.api.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{getGuidelineRuntimeConfig as a}from"./guideline.runtime.config.js";import"uuid";var t=function(t,r,o){var n;return a().apiAdapter.makeApiRequest(t,r,e(e({},o),{baseURL:null!==(n=null==o?void 0:o.baseURL)&&void 0!==n?n:a().apiBaseUrls.chatManagement}))},r={"Content-Type":"application/json"},o={"Content-Type":"application/x-www-form-urlencoded"},n=function(e){var a;return t("get","/cw_core/memstore/memstore/user_data_cart",{params:{user_email:e.user_email,limit:null!==(a=e.limit)&&void 0!==a?a:10,status:e.status},errorMessage:"Failed to fetch data cart"})},i=function(e){return t("post","/cw_core/memstore/memstore/handle",{data:e,config:{headers:r},errorMessage:"Failed to update memstore"})},s=function(e,a,r){return t("post","/proposals/chats?chat_id=".concat(e,"&email_id=").concat(encodeURIComponent(a)),{data:{streaming_response:r},errorMessage:"Failed to upload ChatHistory"})},d=function(e,a,r,n){var i=new URLSearchParams;return i.append("email",e),i.append("chat_id",a),i.append("artifact_id",r||""),i.append("project_id",n||""),t("put","/user/appsec/addConversation",{data:i.toString(),config:{headers:o,timeout:3e5},errorMessage:"Failed to add conversation"})};export{d as addConversation,n as getDataCart,i as updateMemstoreArtifacts,s as uploadChatHistory};
|
|
2
|
+
//# sourceMappingURL=guideline.core.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guideline.core.api.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guideline.runtime.config.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v4 as n}from"uuid";import{GUIDELINE_SESSION_ID as t}from"../constants.js";import{getSessionItem as o,setSessionItem as i,removeSessionItem as r}from"../utils/session.js";var u="GUIDELINE_CART_CLEARED_PENDING",c="INSTANT_LEARNING_GUIDELINE_CART_PRESENT",E=function(){return o(t)},f=function(){var o="guidelines-".concat(n());return i(t,o),o},s=function(){i(u,"true")},N=function(){r(u)},a=function(n){r(function(n){var t,i=(null==n?void 0:n.trim())||(null===(t=o("chatId"))||void 0===t?void 0:t.trim());return i?"".concat(c,":").concat(i):c}(n))};export{N as clearGuidelineCartClearPending,a as clearInstantLearningGuidelineCartPresent,E as getGuidelineSessionId,s as markGuidelineCartClearPending,f as rotateGuidelineSessionId};
|
|
2
|
+
//# sourceMappingURL=guideline.session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guideline.session.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as n}from"tslib";import{getGuidelineRuntimeConfig as t}from"./guideline.runtime.config.js";var a=function(a){return e(void 0,void 0,void 0,function(){return n(this,function(e){return[2,(n="put",i="/cw_chat_management/cart/guidelines/".concat(encodeURIComponent(a)),r={data:{data:[]},config:{headers:{"Content-Type":"application/json"}},errorMessage:"Failed to remove instant learning guideline from cart",baseURL:t().apiBaseUrls.chatManagement},t().apiAdapter.makeApiRequest(n,i,r))];var n,i,r})})};export{a as removeInstantLearningGuidelinesFromCart};
|
|
2
|
+
//# sourceMappingURL=instant-learning.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instant-learning.api.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i}from"tslib";import{ADD_CONTEXT_FILE_TYPES as e,SOURCE_IDS as t}from"../constants.js";var n=function(i){return(i||"").trim().toLowerCase()},o=function(i){if("boolean"==typeof i)return i;if("string"==typeof i){var e=i.trim().toLowerCase();return"true"===e||"1"===e||"yes"===e}return"number"==typeof i&&1===i},r=function(i){var e,t,n,o,r,l;return[null===(e=null==i?void 0:i.responseData)||void 0===e?void 0:e.files,null==i?void 0:i.files,null===(n=null===(t=null==i?void 0:i.responseData)||void 0===t?void 0:t.responseData)||void 0===n?void 0:n.files,null===(r=null===(o=null==i?void 0:i.responseData)||void 0===o?void 0:o.data)||void 0===r?void 0:r.files,null===(l=null==i?void 0:i.data)||void 0===l?void 0:l.files].find(function(i){return Array.isArray(i)})||[]},l=function(i){var r=i.metadata||{},l=n(r.button_id),s=n(r.file_type),d=n(r.source),a=n(i.category),u=n(r.name);return o(r.is_guideline_file)||l===e.GUIDELINE||s===e.GUIDELINE||"session_guideline"===s||d===t.GUIDELINES||d===e.GUIDELINE||a===t.GUIDELINES||a===e.GUIDELINE||u.endsWith(".json")},s=function(i){var n,r=i.metadata||{},l=r.button_id||e.GUIDELINE,s=o(r.is_in_cart);return{id:i.artifact_id||r.artifact_id||r.gcsUrl||r.url,name:r.name||"Untitled guideline",type:r.type||"document",size:r.file_size_formatted||r.size||"0 KB",date:r.date||"",url:r.url,gcsUrl:r.gcsUrl,source:t.GUIDELINES,summary:null!==(n=r.summary)&&void 0!==n?n:"",projectId:i.project_id,projectName:r.projectName,instruction:i.instructions||"",isUploaded:Boolean(r.isUploaded),status:i.status,buttonId:l,ingestion_job_id:r.task_id,is_guideline_file:!0,is_guideline_text:o(r.is_guideline_text),is_in_cart:s,is_selected:o(r.is_selected)||s,category:i.category,is_legacy:!0,guideline_category:"legacy"}},d=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=new Map;return n.flat().forEach(function(n){var o,l,s,d,a,u,c;(null==n?void 0:n.id)&&r.set(n.id,i(i(i({},r.get(n.id)),n),{source:n.source||t.GUIDELINES,buttonId:n.buttonId||e.GUIDELINE,is_guideline_file:!0,summary:null!==(o=n.summary)&&void 0!==o?o:"",is_in_cart:null!==(d=null!==(l=n.is_in_cart)&&void 0!==l?l:null===(s=r.get(n.id))||void 0===s?void 0:s.is_in_cart)&&void 0!==d&&d,is_selected:null!==(c=null!==(a=n.is_selected)&&void 0!==a?a:null===(u=r.get(n.id))||void 0===u?void 0:u.is_selected)&&void 0!==c&&c}))}),Array.from(r.values())};export{s as dataCartFileToGuidelineFileItem,r as getDataCartFilesFromResponse,l as isGuidelineDataCartFile,d as mergeGuidelineFiles};
|
|
2
|
+
//# sourceMappingURL=guidelineFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidelineFiles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{MF_EVENTS as i}from"./microfrontend.js";import{getGuidelineWorkspaceSnapshot as r}from"../workspace/workspace.runtime.js";var n=function(n){var e;n&&"function"==typeof n.dispatch?n.dispatch(i.SEND_GUIDELINES_DATA,(e=r())?{guidelines:e.guidelines.filter(function(i){return(null==i?void 0:i.id)&&e.cartGuidelineIds.includes(i.id)})}:{guidelines:[]}):console.error("MicroFrontend API is missing or invalid")};export{n as closeGuidelineOverlayWithSync};
|
|
2
|
+
//# sourceMappingURL=guidelineOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidelineOverlay.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microfrontend.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=function(t){try{return sessionStorage.getItem(t)}catch(t){return null}},e=function(t,e){try{sessionStorage.setItem(t,e)}catch(t){}},r=function(t){try{sessionStorage.removeItem(t)}catch(t){}};export{t as getSessionItem,r as removeSessionItem,e as setSessionItem};
|
|
2
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as n}from"tslib";import{DEFAULT_GUIDELINE_LABELS as t}from"./constants.js";var i=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.filter(Boolean).join(" ")},r=function(i){return n(n({},t),i)},e=function(n){return(n.summary||n.instruction||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()||"No description available"},o=function(n){return!1===n.is_legacy},a=function(n){return o(n)&&n.instant_learning_id||n.id},u=function(n){return o(n)&&n.instant_learning_title||n.name},c=function(n){return o(n)&&n.instant_learning_description||e(n)},d=function(n){return o(n)&&n.created_at||n.date},l=function(n,t){var i,r,e,o,a,u=null!==(i=n.mode_mappings)&&void 0!==i?i:[];return t?null!==(a=null===(o=u.find(function(n){return n.mode_id===t}))||void 0===o?void 0:o.application_integration_id)&&void 0!==a?a:"":null!==(e=null===(r=u[0])||void 0===r?void 0:r.application_integration_id)&&void 0!==e?e:""},f=function(n){if(!n)return"";var t=new Date(n);if(Number.isNaN(t.getTime()))return"";var i=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),r=t.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"});return"Added on - ".concat(i," | ").concat(r)},m=function(){return"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"guideline-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2))};export{m as createGuidelineId,i as cx,f as defaultFormatAddedOnLabel,l as getAppIntegrationId,d as getGuidelineDate,e as getGuidelineDescription,c as getGuidelineDisplayDescription,a as getGuidelineId,u as getGuidelineTitle,o as isInstantLearningGuideline,r as mergeGuidelineLabels};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useContext as e,useCallback as t,useMemo as i}from"react";import{GuidelineWorkspaceContext as n,GuidelineWorkspaceInternalContext as r}from"./workspace.context.js";var s=function(){},u=function(){var t=e(n);if(!t)throw new Error("useGuidelineWorkspace must be used within GuidelineWorkspaceProvider");return t},a=function(){return e(n)},d=function(){var t=e(r);if(!t)throw new Error("useGuidelineWorkspaceController must be used within GuidelineWorkspaceProvider");return t},o=function(){return e(r)},c=function(){var e=d(),n=e.state,r=e.dispatch,s=t(function(e){return r({type:"set-active-view",view:e})},[r]),u=t(function(e){return r({type:"set-navigation-history",history:e})},[r]),a=t(function(e){return r({type:"navigate-to-view",view:e})},[r]),o=t(function(){return r({type:"navigate-back"})},[r]),c=t(function(e){return r({type:"set-guidelines",guidelines:e})},[r]),l=t(function(e){return r({type:"set-cart-guideline-ids",ids:e})},[r]),f=t(function(e,t){return r({type:"hydrate-cart-state",cartIds:e,selectedIds:t})},[r]),y=t(function(e){return r({type:"set-selected-guideline-ids",ids:e})},[r]),p=t(function(e){return r({type:"set-selected-ilkb-guidelines-data",data:e})},[r]),v=t(function(e){return r({type:"set-session-added-guideline-ids",ids:e})},[r]),g=t(function(e){return r({type:"set-locally-saved-guideline-files",files:e})},[r]),G=t(function(e){return r({type:"set-last-guideline-cart-mutation-at",value:e})},[r]),w=t(function(e){return r({type:"set-user-confirmed-guidelines",value:e})},[r]),h=t(function(e){return r({type:"set-loading",value:e})},[r]),m=t(function(e){return r({type:"set-error",error:e})},[r]),I=t(function(e){return r({type:"reset",preserveGuidelines:e})},[r]);return i(function(){return{state:n,setActiveView:s,setNavigationHistory:u,navigateToView:a,navigateBack:o,setGuidelines:c,setCartGuidelineIds:l,hydrateCartState:f,setSelectedGuidelineIds:y,setSelectedILKBGuidelinesData:p,setSessionAddedGuidelineIds:v,setLocallySavedGuidelineFiles:g,setLastGuidelineCartMutationAt:G,setUserConfirmedGuidelines:w,setLoading:h,setError:m,reset:I}},[n,s,u,a,o,c,l,f,y,p,v,g,G,w,h,m,I])},l=function(){var e=o(),n=e?e.dispatch:s,r=t(function(e){return n({type:"set-active-view",view:e})},[n]),u=t(function(e){return n({type:"set-navigation-history",history:e})},[n]),a=t(function(e){return n({type:"navigate-to-view",view:e})},[n]),d=t(function(){return n({type:"navigate-back"})},[n]),c=t(function(e){return n({type:"set-guidelines",guidelines:e})},[n]),l=t(function(e){return n({type:"set-cart-guideline-ids",ids:e})},[n]),f=t(function(e,t){return n({type:"hydrate-cart-state",cartIds:e,selectedIds:t})},[n]),y=t(function(e){return n({type:"set-selected-guideline-ids",ids:e})},[n]),p=t(function(e){return n({type:"set-selected-ilkb-guidelines-data",data:e})},[n]),v=t(function(e){return n({type:"set-session-added-guideline-ids",ids:e})},[n]),g=t(function(e){return n({type:"set-locally-saved-guideline-files",files:e})},[n]),G=t(function(e){return n({type:"set-last-guideline-cart-mutation-at",value:e})},[n]),w=t(function(e){return n({type:"set-user-confirmed-guidelines",value:e})},[n]),h=t(function(e){return n({type:"set-loading",value:e})},[n]),m=t(function(e){return n({type:"set-error",error:e})},[n]),I=t(function(e){return n({type:"reset",preserveGuidelines:e})},[n]);return i(function(){return e?{state:e.state,setActiveView:r,setNavigationHistory:u,navigateToView:a,navigateBack:d,setGuidelines:c,setCartGuidelineIds:l,hydrateCartState:f,setSelectedGuidelineIds:y,setSelectedILKBGuidelinesData:p,setSessionAddedGuidelineIds:v,setLocallySavedGuidelineFiles:g,setLastGuidelineCartMutationAt:G,setUserConfirmedGuidelines:w,setLoading:h,setError:m,reset:I}:null},[e,r,u,a,d,c,l,f,y,p,v,g,G,w,h,m,I])};export{u as useGuidelineWorkspace,c as useGuidelineWorkspaceActions,d as useGuidelineWorkspaceController,a as useOptionalGuidelineWorkspace,l as useOptionalGuidelineWorkspaceActions,o as useOptionalGuidelineWorkspaceController};
|
|
2
|
+
//# sourceMappingURL=useGuidelineWorkspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGuidelineWorkspace.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.context.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.runtime.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__spreadArray as t,__assign as e}from"tslib";import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as r,useEffect as c}from"react";import{Check as a,Eye as l,X as o}from"lucide-react";import d from"./Cart.styles.js";function s(t){try{var e=new Date(t),n=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),i=e.toLocaleDateString("en-GB").replace(/\//g,"/");return"Added on - ".concat(n," | ").concat(i)}catch(e){return t}}function h(h){var u=h.items,m=h.onRemove,p=h.onProceed,f=r(new Set),g=f[0],y=f[1];c(function(){1!==u.length?y(function(e){var n=new Set(u.map(function(t){return t.instant_learning_id})),i=new Set(t([],e,!0).filter(function(t){return n.has(t)}));return i.size===e.size?e:i}):y(new Set([u[0].instant_learning_id]))},[u]);var v=u.filter(function(t){return g.has(t.instant_learning_id)});return n("section",e({style:d.cartSection},{children:[n("div",e({style:d.cartHeaderRow},{children:[i("p",e({style:d.cartTitle},{children:"Guideline Cart"})),n("span",e({style:d.cartBadge},{children:[u.length," Added"]}))]})),i("p",e({style:d.cartDescription},{children:u.length>1?"Click items to select them for this session":"Selected for this session"})),i("div",e({style:d.cartBody},{children:i("div",e({style:d.cartList},{children:0===u.length?i("div",e({style:d.emptyState},{children:"No guidelines added yet"})):u.map(function(t){var r=g.has(t.instant_learning_id);return n("div",e({style:r?d.cartItemSelected:d.cartItem,onClick:function(){return e=t.instant_learning_id,void y(function(t){var n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});var e}},{children:[n("div",e({style:d.cartItemTop},{children:[n("div",e({style:d.cartItemTopLeft},{children:[i("span",e({style:r?d.cartCheckbox:d.cartCheckboxEmpty},{children:r&&i(a,{size:12,strokeWidth:3})})),i("p",e({style:d.cartItemName},{children:t.instant_learning_title}))]})),n("div",e({style:d.cartItemIcons},{children:[i(l,{size:16,strokeWidth:2}),i("button",e({type:"button",style:d.removeBtn,onClick:function(e){return function(t,e){t.stopPropagation(),y(function(t){if(!t.has(e))return t;var n=new Set(t);return n.delete(e),n}),m(e)}(e,t.instant_learning_id)}},{children:i(o,{size:16,strokeWidth:2})}))]}))]})),i("p",e({style:d.cartItemDescription},{children:t.instant_learning_description})),i("p",e({style:d.cartItemDate},{children:s(t.created_at)}))]}),t.instant_learning_id)})}))})),i("button",e({type:"button",style:v.length>0?d.proceedButton:d.proceedButtonDisabled,disabled:0===v.length,onClick:function(){return v.length>0&&p(v)}},{children:n("span",{children:["Proceed with Selected",v.length>1?" (".concat(v.length,")"):""]})}))]}))}export{h as Cart,h as default};
|
|
2
2
|
//# sourceMappingURL=Cart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{BookOpen as i,Eye as n,MoreVertical as
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{BookOpen as i,Eye as n,MoreVertical as o,UserCheck as d,Compass as c,Check as l,Plus as s}from"lucide-react";import a from"./GuidelineCard.styles.js";function u(t){try{var e=new Date(t),r=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),i=e.toLocaleDateString("en-GB").replace(/\//g,"/");return"Added on - ".concat(r," | ").concat(i)}catch(e){return t}}function h(h){var p=h.guideline,y=h.inCart,f=h.onToggleCart,m=h.onExplore;return e("div",t({style:a.card},{children:[e("div",t({style:a.cardTop},{children:[e("div",t({style:a.cardTopLeft},{children:[r(i,{size:18,strokeWidth:2,color:"#6D5BFF"}),r("p",t({style:a.cardTitle},{children:p.instant_learning_title}))]})),e("div",t({style:a.cardTopIcons},{children:[r(n,{size:16,strokeWidth:2}),r(o,{size:16,strokeWidth:2}),r(d,{size:16,strokeWidth:2})]}))]})),r("p",t({style:a.cardDescription},{children:p.instant_learning_description})),r("p",t({style:a.cardDate},{children:u(p.created_at)})),e("div",t({style:a.cardActionsRow},{children:[e("button",t({type:"button",style:a.exploreButton,onClick:function(){return null==m?void 0:m(p)}},{children:[r(c,{size:15,strokeWidth:2.4}),r("span",{children:"Explore"})]})),e("button",y?t({type:"button",style:a.cardAddedButton,onClick:function(){return f(p)}},{children:[r(l,{size:16,strokeWidth:2.4}),r("span",{children:"Selected"})]}):t({type:"button",style:a.cardAddButton,onClick:function(){return f(p)}},{children:[r(s,{size:16,strokeWidth:2.4}),r("span",{children:"Select"})]}))]}))]}))}export{h as GuidelineCard,h as default};
|
|
2
2
|
//# sourceMappingURL=GuidelineCard.js.map
|