@e-llm-studio/instant-learning 1.3.0-alpha.18 → 1.3.0-alpha.181

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.
Files changed (1070) hide show
  1. package/README.md +702 -33
  2. package/dist/ComponentRegistry.js +2 -0
  3. package/dist/ComponentRegistry.js.map +1 -0
  4. package/dist/ContinueWithTemplateModal.js +2 -0
  5. package/dist/ContinueWithTemplateModal.js.map +1 -0
  6. package/dist/ContinueWithTemplateModal.module.css.js +2 -0
  7. package/dist/ContinueWithTemplateModal.module.css.js.map +1 -0
  8. package/dist/ILMarketplaceWrapper.js +2 -0
  9. package/dist/ILMarketplaceWrapper.js.map +1 -0
  10. package/dist/ILMarketplaceWrapper.module.css.js +2 -0
  11. package/dist/ILMarketplaceWrapper.module.css.js.map +1 -0
  12. package/dist/api/transport.js +2 -0
  13. package/dist/api/transport.js.map +1 -0
  14. package/dist/cjs/ComponentRegistry.js +2 -0
  15. package/dist/cjs/ComponentRegistry.js.map +1 -0
  16. package/dist/cjs/ContinueWithTemplateModal.js +2 -0
  17. package/dist/cjs/ContinueWithTemplateModal.js.map +1 -0
  18. package/dist/cjs/ContinueWithTemplateModal.module.css.js +2 -0
  19. package/dist/cjs/ContinueWithTemplateModal.module.css.js.map +1 -0
  20. package/dist/cjs/ILMarketplaceWrapper.js +2 -0
  21. package/dist/cjs/ILMarketplaceWrapper.js.map +1 -0
  22. package/dist/cjs/ILMarketplaceWrapper.module.css.js +2 -0
  23. package/dist/cjs/ILMarketplaceWrapper.module.css.js.map +1 -0
  24. package/dist/cjs/api/transport.js +2 -0
  25. package/dist/cjs/api/transport.js.map +1 -0
  26. package/dist/cjs/features/DocumentLearning/DocumentLearning.js +1 -1
  27. package/dist/cjs/features/DocumentLearning/_components/BookLearningForm.js +1 -1
  28. package/dist/cjs/features/DocumentLearning/_components/ChatComponent.js +1 -1
  29. package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
  30. package/dist/cjs/features/IL-OTJ/ILOTJTest.js +1 -1
  31. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
  32. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
  33. package/dist/cjs/features/IL-OTJ/_components/AccordianSection.js +1 -1
  34. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
  35. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -1
  36. package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
  37. package/dist/cjs/features/IL-OTJ/_components/ConflictingReasoningCard.js +1 -1
  38. package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +1 -1
  39. package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +1 -1
  40. package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
  41. package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
  42. package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
  43. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
  44. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
  45. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
  46. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
  47. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
  48. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
  49. package/dist/cjs/features/IL-OTJ/_components/ViewFormUpdateCard.js +1 -1
  50. package/dist/cjs/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.js +1 -1
  51. package/dist/cjs/features/IL-OTJ/_components/_svg/EditPencilIcon.js +2 -0
  52. package/dist/cjs/features/IL-OTJ/_components/_svg/EditPencilIcon.js.map +1 -0
  53. package/dist/cjs/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
  54. package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
  55. package/dist/cjs/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js +1 -1
  56. package/dist/cjs/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
  57. package/dist/cjs/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.js +2 -0
  58. package/dist/cjs/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.js.map +1 -0
  59. package/dist/cjs/features/IL-OTJ/_components/organisms/TextSection/TextSection.js +1 -1
  60. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
  61. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
  62. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
  63. package/dist/cjs/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.js +2 -0
  64. package/dist/cjs/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.js.map +1 -0
  65. package/dist/cjs/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
  66. package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
  67. package/dist/cjs/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
  68. package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.js +2 -0
  69. package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.js.map +1 -0
  70. package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.module.css.js +2 -0
  71. package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.module.css.js.map +1 -0
  72. package/dist/cjs/features/IL-marketplace/components/GuidelineCart.js +2 -0
  73. package/dist/cjs/features/IL-marketplace/components/GuidelineCart.js.map +1 -0
  74. package/dist/cjs/features/IL-marketplace/components/GuidelineCart.module.css.js +2 -0
  75. package/dist/cjs/features/IL-marketplace/components/GuidelineCart.module.css.js.map +1 -0
  76. package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.js +2 -0
  77. package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.js.map +1 -0
  78. package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.module.css.js +2 -0
  79. package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.module.css.js.map +1 -0
  80. package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.js +2 -0
  81. package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.js.map +1 -0
  82. package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.module.css.js +2 -0
  83. package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.module.css.js.map +1 -0
  84. package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.js +2 -0
  85. package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.js.map +1 -0
  86. package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js +2 -0
  87. package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js.map +1 -0
  88. package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.js +2 -0
  89. package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.js.map +1 -0
  90. package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.module.css.js +2 -0
  91. package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.module.css.js.map +1 -0
  92. package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.js +2 -0
  93. package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.js.map +1 -0
  94. package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js +2 -0
  95. package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js.map +1 -0
  96. package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.js +2 -0
  97. package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.js.map +1 -0
  98. package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.module.css.js +2 -0
  99. package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.module.css.js.map +1 -0
  100. package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.js +2 -0
  101. package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.js.map +1 -0
  102. package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.module.css.js +2 -0
  103. package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.module.css.js.map +1 -0
  104. package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.js +2 -0
  105. package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.js.map +1 -0
  106. package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.module.css.js +2 -0
  107. package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.module.css.js.map +1 -0
  108. package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.js +2 -0
  109. package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.js.map +1 -0
  110. package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.module.css.js +2 -0
  111. package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.module.css.js.map +1 -0
  112. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.js +2 -0
  113. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.js.map +1 -0
  114. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js +2 -0
  115. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js.map +1 -0
  116. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryContent.js +2 -0
  117. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryContent.js.map +1 -0
  118. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryTab.js +2 -0
  119. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryTab.js.map +1 -0
  120. package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.js +2 -0
  121. package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.js.map +1 -0
  122. package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.module.css.js +2 -0
  123. package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.module.css.js.map +1 -0
  124. package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.js +2 -0
  125. package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.js.map +1 -0
  126. package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.module.css.js +2 -0
  127. package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.module.css.js.map +1 -0
  128. package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.js +2 -0
  129. package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.js.map +1 -0
  130. package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.module.css.js +2 -0
  131. package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.module.css.js.map +1 -0
  132. package/dist/cjs/features/IL-marketplace/components/GuidelineTooltip.js +2 -0
  133. package/dist/cjs/features/IL-marketplace/components/GuidelineTooltip.js.map +1 -0
  134. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.js +2 -0
  135. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.js.map +1 -0
  136. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.js +2 -0
  137. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.js.map +1 -0
  138. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.js +2 -0
  139. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.js.map +1 -0
  140. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.js +2 -0
  141. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.js.map +1 -0
  142. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.js +2 -0
  143. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.js.map +1 -0
  144. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.module.css.js +2 -0
  145. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.module.css.js.map +1 -0
  146. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.js +2 -0
  147. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.js.map +1 -0
  148. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.module.css.js +2 -0
  149. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.module.css.js.map +1 -0
  150. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.js +2 -0
  151. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.js.map +1 -0
  152. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.module.css.js +2 -0
  153. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.module.css.js.map +1 -0
  154. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.js +2 -0
  155. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.js.map +1 -0
  156. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.module.css.js +2 -0
  157. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.module.css.js.map +1 -0
  158. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.js +2 -0
  159. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.js.map +1 -0
  160. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js +2 -0
  161. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js.map +1 -0
  162. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.module.css.js +2 -0
  163. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.module.css.js.map +1 -0
  164. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.js +2 -0
  165. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.js.map +1 -0
  166. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.module.css.js +2 -0
  167. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.module.css.js.map +1 -0
  168. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.js +2 -0
  169. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.js.map +1 -0
  170. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.js +2 -0
  171. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.js.map +1 -0
  172. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.module.css.js +2 -0
  173. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.module.css.js.map +1 -0
  174. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.js +2 -0
  175. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.js.map +1 -0
  176. package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
  177. package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -0
  178. package/dist/cjs/features/IL-marketplace/components/VersionSelectDropdown.js +2 -0
  179. package/dist/cjs/features/IL-marketplace/components/VersionSelectDropdown.js.map +1 -0
  180. package/dist/cjs/features/IL-marketplace/components/VersionSelectDropdown.module.css.js +2 -0
  181. package/dist/cjs/features/IL-marketplace/components/VersionSelectDropdown.module.css.js.map +1 -0
  182. package/dist/cjs/features/IL-marketplace/constants.js +2 -0
  183. package/dist/cjs/features/IL-marketplace/constants.js.map +1 -0
  184. package/dist/cjs/features/IL-marketplace/hooks/useControllableState.js +2 -0
  185. package/dist/cjs/features/IL-marketplace/hooks/useControllableState.js.map +1 -0
  186. package/dist/cjs/features/IL-marketplace/hooks/useDeleteGuidelineMutation.js +2 -0
  187. package/dist/cjs/features/IL-marketplace/hooks/useDeleteGuidelineMutation.js.map +1 -0
  188. package/dist/cjs/features/IL-marketplace/hooks/useGuidelineSelection.js +2 -0
  189. package/dist/cjs/features/IL-marketplace/hooks/useGuidelineSelection.js.map +1 -0
  190. package/dist/cjs/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.js +2 -0
  191. package/dist/cjs/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.js.map +1 -0
  192. package/dist/cjs/features/IL-marketplace/hooks/useMarketplacePublishILKBData.js +2 -0
  193. package/dist/cjs/features/IL-marketplace/hooks/useMarketplacePublishILKBData.js.map +1 -0
  194. package/dist/cjs/features/IL-marketplace/icons/GuidelineSpinner.js +2 -0
  195. package/dist/cjs/features/IL-marketplace/icons/GuidelineSpinner.js.map +1 -0
  196. package/dist/cjs/features/IL-marketplace/queryClient.js +2 -0
  197. package/dist/cjs/features/IL-marketplace/queryClient.js.map +1 -0
  198. package/dist/cjs/features/IL-marketplace/services/IL-marketplace.api.js +2 -0
  199. package/dist/cjs/features/IL-marketplace/services/IL-marketplace.api.js.map +1 -0
  200. package/dist/cjs/features/IL-marketplace/services/guideline.cart.api.js +2 -0
  201. package/dist/cjs/features/IL-marketplace/services/guideline.cart.api.js.map +1 -0
  202. package/dist/cjs/features/IL-marketplace/services/guideline.core.api.js +2 -0
  203. package/dist/cjs/features/IL-marketplace/services/guideline.core.api.js.map +1 -0
  204. package/dist/cjs/features/IL-marketplace/services/guideline.runtime.config.js +2 -0
  205. package/dist/cjs/features/IL-marketplace/services/guideline.runtime.config.js.map +1 -0
  206. package/dist/cjs/features/IL-marketplace/services/guideline.session.js +2 -0
  207. package/dist/cjs/features/IL-marketplace/services/guideline.session.js.map +1 -0
  208. package/dist/cjs/features/IL-marketplace/services/instant-learning.api.js +2 -0
  209. package/dist/cjs/features/IL-marketplace/services/instant-learning.api.js.map +1 -0
  210. package/dist/cjs/features/IL-marketplace/store/usePublishTemplateStore.js +2 -0
  211. package/dist/cjs/features/IL-marketplace/store/usePublishTemplateStore.js.map +1 -0
  212. package/dist/cjs/features/IL-marketplace/utils/guidelineFiles.js +2 -0
  213. package/dist/cjs/features/IL-marketplace/utils/guidelineFiles.js.map +1 -0
  214. package/dist/cjs/features/IL-marketplace/utils/guidelineOverlay.js +2 -0
  215. package/dist/cjs/features/IL-marketplace/utils/guidelineOverlay.js.map +1 -0
  216. package/dist/cjs/features/IL-marketplace/utils/microfrontend.js +2 -0
  217. package/dist/cjs/features/IL-marketplace/utils/microfrontend.js.map +1 -0
  218. package/dist/cjs/features/IL-marketplace/utils/session.js +2 -0
  219. package/dist/cjs/features/IL-marketplace/utils/session.js.map +1 -0
  220. package/dist/cjs/features/IL-marketplace/utils.js +2 -0
  221. package/dist/cjs/features/IL-marketplace/utils.js.map +1 -0
  222. package/dist/cjs/features/IL-marketplace/workspace/useGuidelineWorkspace.js +2 -0
  223. package/dist/cjs/features/IL-marketplace/workspace/useGuidelineWorkspace.js.map +1 -0
  224. package/dist/cjs/features/IL-marketplace/workspace/workspace.context.js +2 -0
  225. package/dist/cjs/features/IL-marketplace/workspace/workspace.context.js.map +1 -0
  226. package/dist/cjs/features/IL-marketplace/workspace/workspace.runtime.js +2 -0
  227. package/dist/cjs/features/IL-marketplace/workspace/workspace.runtime.js.map +1 -0
  228. package/dist/cjs/features/InstantLearning/_components/ChatComponent.js +1 -1
  229. package/dist/cjs/features/InstantLearning/_components/ContextualChatComponent.js +1 -1
  230. package/dist/cjs/features/InstantLearning/_components/ContextualLearningForm.js +1 -1
  231. package/dist/cjs/features/InstantLearning/_components/LearningDetailsForm.js +1 -1
  232. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js +2 -0
  233. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js.map +1 -0
  234. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.styles.js +2 -0
  235. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.styles.js.map +1 -0
  236. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js +2 -0
  237. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js.map +1 -0
  238. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.styles.js +2 -0
  239. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.styles.js.map +1 -0
  240. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js +2 -0
  241. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js.map +1 -0
  242. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +2 -0
  243. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js.map +1 -0
  244. package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js +2 -0
  245. package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js.map +1 -0
  246. package/dist/cjs/features/LSCGuidelinesCart/api.js +2 -0
  247. package/dist/cjs/features/LSCGuidelinesCart/api.js.map +1 -0
  248. package/dist/cjs/features/LSCGuidelinesCart/endpoints.js +2 -0
  249. package/dist/cjs/features/LSCGuidelinesCart/endpoints.js.map +1 -0
  250. package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +2 -0
  251. package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +1 -0
  252. package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  253. package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
  254. package/dist/cjs/features/LearningManagement/LearningManagementTest.js +2 -0
  255. package/dist/cjs/features/LearningManagement/LearningManagementTest.js.map +1 -0
  256. package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
  257. package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  258. package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.js +1 -1
  259. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
  260. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  261. package/dist/cjs/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
  262. package/dist/cjs/features/LearningManagement/RuleContent/InstructionPromptBlock.js +2 -0
  263. package/dist/cjs/features/LearningManagement/RuleContent/InstructionPromptBlock.js.map +1 -0
  264. package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
  265. package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  266. package/dist/cjs/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
  267. package/dist/cjs/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
  268. package/dist/cjs/features/LearningManagement/RuleContent/TierCard.js +1 -1
  269. package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
  270. package/dist/cjs/features/LearningManagement/ScopeSelector.js +2 -0
  271. package/dist/cjs/features/LearningManagement/ScopeSelector.js.map +1 -0
  272. package/dist/cjs/features/LearningManagement/Sidebar.js +1 -1
  273. package/dist/cjs/features/LearningManagement/StationsContent/StationsContent.js +1 -1
  274. package/dist/cjs/features/LearningManagement/apis/apiConfig.js +1 -1
  275. package/dist/cjs/features/LearningManagement/apis/scopeApis.js +1 -1
  276. package/dist/cjs/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
  277. package/dist/cjs/features/LearningManagement/components/EmptyLearningState.js +1 -1
  278. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
  279. package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +2 -0
  280. package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -0
  281. package/dist/cjs/features/LearningManagement/components/PromptTextEditor.js +2 -0
  282. package/dist/cjs/features/LearningManagement/components/PromptTextEditor.js.map +1 -0
  283. package/dist/cjs/features/LearningManagement/components/ScopeSkeletonLoader.js +1 -1
  284. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeMenu.js +1 -1
  285. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
  286. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
  287. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
  288. package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
  289. package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
  290. package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  291. package/dist/cjs/features/LearningManagement/config.js +1 -1
  292. package/dist/cjs/features/LearningManagement/constants.js +2 -0
  293. package/dist/cjs/features/LearningManagement/constants.js.map +1 -0
  294. package/dist/cjs/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
  295. package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js +1 -1
  296. package/dist/cjs/features/LearningManagement/store/useEnvStore.js +1 -1
  297. package/dist/cjs/features/LearningManagement/store/useExternalWorkflowStore.js +2 -0
  298. package/dist/cjs/features/LearningManagement/store/useExternalWorkflowStore.js.map +1 -0
  299. package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js +1 -1
  300. package/dist/cjs/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
  301. package/dist/cjs/features/LearningManagement/store/usePermissionsStore.js +1 -1
  302. package/dist/cjs/features/LearningManagement/styles/LearningTemplateLayout.module.css.js +1 -1
  303. package/dist/cjs/features/LearningManagement/styles/LearningTemplateManagement.module.css.js +1 -1
  304. package/dist/cjs/features/LearningManagement/styles/PromptTextEditor.module.css.js +2 -0
  305. package/dist/cjs/features/LearningManagement/styles/PromptTextEditor.module.css.js.map +1 -0
  306. package/dist/cjs/features/LearningManagement/styles/RuleAccordion.module.css.js +1 -1
  307. package/dist/cjs/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
  308. package/dist/cjs/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
  309. package/dist/cjs/features/LearningManagement/styles/TierCard.module.css.js +1 -1
  310. package/dist/cjs/features/LearningManagement/utils/learningMetadataUtils.js +2 -0
  311. package/dist/cjs/features/LearningManagement/utils/learningMetadataUtils.js.map +1 -0
  312. package/dist/cjs/features/LearningManagement/utils/treeUtils.js +1 -1
  313. package/dist/cjs/hooks/useAgentFix.js +1 -1
  314. package/dist/cjs/hooks/useAgentSuggestions.js +1 -1
  315. package/dist/cjs/hooks/useAgentValidation.js +1 -1
  316. package/dist/cjs/hooks/useExistingAgentCheck.js +1 -1
  317. package/dist/cjs/hooks/useExistingPromptCheck.js +1 -1
  318. package/dist/cjs/hooks/usePromptFix.js +1 -1
  319. package/dist/cjs/hooks/usePromptSuggestions.js +1 -1
  320. package/dist/cjs/hooks/usePromptValidation.js +1 -1
  321. package/dist/cjs/index.js +1 -1
  322. package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
  323. package/dist/cjs/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
  324. package/dist/cjs/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js +1 -1
  325. package/dist/cjs/schema-driven/BPARenderer.js +2 -0
  326. package/dist/cjs/schema-driven/BPARenderer.js.map +1 -0
  327. package/dist/cjs/schema-driven/FallbackField.js +2 -0
  328. package/dist/cjs/schema-driven/FallbackField.js.map +1 -0
  329. package/dist/cjs/schema-driven/components/ConditionSectionField.js +2 -0
  330. package/dist/cjs/schema-driven/components/ConditionSectionField.js.map +1 -0
  331. package/dist/cjs/schema-driven/components/ConfigSectionField.js +2 -0
  332. package/dist/cjs/schema-driven/components/ConfigSectionField.js.map +1 -0
  333. package/dist/cjs/schema-driven/components/DropdownSectionField.js +2 -0
  334. package/dist/cjs/schema-driven/components/DropdownSectionField.js.map +1 -0
  335. package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js +2 -0
  336. package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js.map +1 -0
  337. package/dist/cjs/schema-driven/components/GroupEditRow.js +2 -0
  338. package/dist/cjs/schema-driven/components/GroupEditRow.js.map +1 -0
  339. package/dist/cjs/schema-driven/components/PromptTextEditorField.js +2 -0
  340. package/dist/cjs/schema-driven/components/PromptTextEditorField.js.map +1 -0
  341. package/dist/cjs/schema-driven/components/ScopeSectionField.js +2 -0
  342. package/dist/cjs/schema-driven/components/ScopeSectionField.js.map +1 -0
  343. package/dist/cjs/schema-driven/components/TextInputField.js +2 -0
  344. package/dist/cjs/schema-driven/components/TextInputField.js.map +1 -0
  345. package/dist/cjs/schema-driven/components/VariantListField.js +2 -0
  346. package/dist/cjs/schema-driven/components/VariantListField.js.map +1 -0
  347. package/dist/cjs/schema-driven/primitives/Accordion.js +2 -0
  348. package/dist/cjs/schema-driven/primitives/Accordion.js.map +1 -0
  349. package/dist/cjs/schema-driven/store/useDynamicFormStore.js +2 -0
  350. package/dist/cjs/schema-driven/store/useDynamicFormStore.js.map +1 -0
  351. package/dist/cjs/schema-driven/utils/PayloadUtils.js +2 -0
  352. package/dist/cjs/schema-driven/utils/PayloadUtils.js.map +1 -0
  353. package/dist/cjs/schema-driven/utils/aiReasoning.js +2 -0
  354. package/dist/cjs/schema-driven/utils/aiReasoning.js.map +1 -0
  355. package/dist/cjs/service/InstantLearningService.js +1 -1
  356. package/dist/cjs/utils/agentGenieAPI.js +1 -1
  357. package/dist/cjs/utils/bookGenieAPI.js +1 -1
  358. package/dist/cjs/utils/instantLearningAPI.js +1 -1
  359. package/dist/features/DocumentLearning/DocumentLearning.js +1 -1
  360. package/dist/features/DocumentLearning/_components/BookLearningForm.js +1 -1
  361. package/dist/features/DocumentLearning/_components/ChatComponent.js +1 -1
  362. package/dist/features/IL-OTJ/ILOTJ.js +1 -1
  363. package/dist/features/IL-OTJ/ILOTJTest.js +1 -1
  364. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
  365. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
  366. package/dist/features/IL-OTJ/_components/AccordianSection.js +1 -1
  367. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
  368. package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -1
  369. package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
  370. package/dist/features/IL-OTJ/_components/ConflictingReasoningCard.js +1 -1
  371. package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
  372. package/dist/features/IL-OTJ/_components/ILPopup.js +1 -1
  373. package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
  374. package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
  375. package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
  376. package/dist/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
  377. package/dist/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
  378. package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
  379. package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
  380. package/dist/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
  381. package/dist/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
  382. package/dist/features/IL-OTJ/_components/ViewFormUpdateCard.js +1 -1
  383. package/dist/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.js +1 -1
  384. package/dist/features/IL-OTJ/_components/_svg/EditPencilIcon.js +2 -0
  385. package/dist/features/IL-OTJ/_components/_svg/EditPencilIcon.js.map +1 -0
  386. package/dist/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
  387. package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
  388. package/dist/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js +1 -1
  389. package/dist/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
  390. package/dist/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.js +2 -0
  391. package/dist/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.js.map +1 -0
  392. package/dist/features/IL-OTJ/_components/organisms/TextSection/TextSection.js +1 -1
  393. package/dist/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
  394. package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
  395. package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
  396. package/dist/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.js +2 -0
  397. package/dist/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.js.map +1 -0
  398. package/dist/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
  399. package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
  400. package/dist/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
  401. package/dist/features/IL-marketplace/components/GuidelineCardMenu.js +2 -0
  402. package/dist/features/IL-marketplace/components/GuidelineCardMenu.js.map +1 -0
  403. package/dist/features/IL-marketplace/components/GuidelineCardMenu.module.css.js +2 -0
  404. package/dist/features/IL-marketplace/components/GuidelineCardMenu.module.css.js.map +1 -0
  405. package/dist/features/IL-marketplace/components/GuidelineCart.js +2 -0
  406. package/dist/features/IL-marketplace/components/GuidelineCart.js.map +1 -0
  407. package/dist/features/IL-marketplace/components/GuidelineCart.module.css.js +2 -0
  408. package/dist/features/IL-marketplace/components/GuidelineCart.module.css.js.map +1 -0
  409. package/dist/features/IL-marketplace/components/GuidelineCartHeader.js +2 -0
  410. package/dist/features/IL-marketplace/components/GuidelineCartHeader.js.map +1 -0
  411. package/dist/features/IL-marketplace/components/GuidelineCartHeader.module.css.js +2 -0
  412. package/dist/features/IL-marketplace/components/GuidelineCartHeader.module.css.js.map +1 -0
  413. package/dist/features/IL-marketplace/components/GuidelineCartItem.js +2 -0
  414. package/dist/features/IL-marketplace/components/GuidelineCartItem.js.map +1 -0
  415. package/dist/features/IL-marketplace/components/GuidelineCartItem.module.css.js +2 -0
  416. package/dist/features/IL-marketplace/components/GuidelineCartItem.module.css.js.map +1 -0
  417. package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.js +2 -0
  418. package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.js.map +1 -0
  419. package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js +2 -0
  420. package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js.map +1 -0
  421. package/dist/features/IL-marketplace/components/GuidelineEmptyState.js +2 -0
  422. package/dist/features/IL-marketplace/components/GuidelineEmptyState.js.map +1 -0
  423. package/dist/features/IL-marketplace/components/GuidelineEmptyState.module.css.js +2 -0
  424. package/dist/features/IL-marketplace/components/GuidelineEmptyState.module.css.js.map +1 -0
  425. package/dist/features/IL-marketplace/components/GuidelineFilterPanel.js +2 -0
  426. package/dist/features/IL-marketplace/components/GuidelineFilterPanel.js.map +1 -0
  427. package/dist/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js +2 -0
  428. package/dist/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js.map +1 -0
  429. package/dist/features/IL-marketplace/components/GuidelineHeader.js +2 -0
  430. package/dist/features/IL-marketplace/components/GuidelineHeader.js.map +1 -0
  431. package/dist/features/IL-marketplace/components/GuidelineHeader.module.css.js +2 -0
  432. package/dist/features/IL-marketplace/components/GuidelineHeader.module.css.js.map +1 -0
  433. package/dist/features/IL-marketplace/components/GuidelineIconButton.js +2 -0
  434. package/dist/features/IL-marketplace/components/GuidelineIconButton.js.map +1 -0
  435. package/dist/features/IL-marketplace/components/GuidelineIconButton.module.css.js +2 -0
  436. package/dist/features/IL-marketplace/components/GuidelineIconButton.module.css.js.map +1 -0
  437. package/dist/features/IL-marketplace/components/GuidelineLandingPage.js +2 -0
  438. package/dist/features/IL-marketplace/components/GuidelineLandingPage.js.map +1 -0
  439. package/dist/features/IL-marketplace/components/GuidelineLandingPage.module.css.js +2 -0
  440. package/dist/features/IL-marketplace/components/GuidelineLandingPage.module.css.js.map +1 -0
  441. package/dist/features/IL-marketplace/components/GuidelineLibrary.js +2 -0
  442. package/dist/features/IL-marketplace/components/GuidelineLibrary.js.map +1 -0
  443. package/dist/features/IL-marketplace/components/GuidelineLibrary.module.css.js +2 -0
  444. package/dist/features/IL-marketplace/components/GuidelineLibrary.module.css.js.map +1 -0
  445. package/dist/features/IL-marketplace/components/GuidelineLibraryCard.js +2 -0
  446. package/dist/features/IL-marketplace/components/GuidelineLibraryCard.js.map +1 -0
  447. package/dist/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js +2 -0
  448. package/dist/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js.map +1 -0
  449. package/dist/features/IL-marketplace/components/GuidelineLibraryContent.js +2 -0
  450. package/dist/features/IL-marketplace/components/GuidelineLibraryContent.js.map +1 -0
  451. package/dist/features/IL-marketplace/components/GuidelineLibraryTab.js +2 -0
  452. package/dist/features/IL-marketplace/components/GuidelineLibraryTab.js.map +1 -0
  453. package/dist/features/IL-marketplace/components/GuidelineProceedButton.js +2 -0
  454. package/dist/features/IL-marketplace/components/GuidelineProceedButton.js.map +1 -0
  455. package/dist/features/IL-marketplace/components/GuidelineProceedButton.module.css.js +2 -0
  456. package/dist/features/IL-marketplace/components/GuidelineProceedButton.module.css.js.map +1 -0
  457. package/dist/features/IL-marketplace/components/GuidelineSelectButton.js +2 -0
  458. package/dist/features/IL-marketplace/components/GuidelineSelectButton.js.map +1 -0
  459. package/dist/features/IL-marketplace/components/GuidelineSelectButton.module.css.js +2 -0
  460. package/dist/features/IL-marketplace/components/GuidelineSelectButton.module.css.js.map +1 -0
  461. package/dist/features/IL-marketplace/components/GuidelineStatusChip.js +2 -0
  462. package/dist/features/IL-marketplace/components/GuidelineStatusChip.js.map +1 -0
  463. package/dist/features/IL-marketplace/components/GuidelineStatusChip.module.css.js +2 -0
  464. package/dist/features/IL-marketplace/components/GuidelineStatusChip.module.css.js.map +1 -0
  465. package/dist/features/IL-marketplace/components/GuidelineTooltip.js +2 -0
  466. package/dist/features/IL-marketplace/components/GuidelineTooltip.js.map +1 -0
  467. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.js +2 -0
  468. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.js.map +1 -0
  469. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.js +2 -0
  470. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.js.map +1 -0
  471. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.js +2 -0
  472. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.js.map +1 -0
  473. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.js +2 -0
  474. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.js.map +1 -0
  475. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.js +2 -0
  476. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.js.map +1 -0
  477. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.module.css.js +2 -0
  478. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.module.css.js.map +1 -0
  479. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.js +2 -0
  480. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.js.map +1 -0
  481. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.module.css.js +2 -0
  482. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.module.css.js.map +1 -0
  483. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.js +2 -0
  484. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.js.map +1 -0
  485. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.module.css.js +2 -0
  486. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.module.css.js.map +1 -0
  487. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.js +2 -0
  488. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.js.map +1 -0
  489. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.module.css.js +2 -0
  490. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.module.css.js.map +1 -0
  491. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.js +2 -0
  492. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.js.map +1 -0
  493. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js +2 -0
  494. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js.map +1 -0
  495. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.module.css.js +2 -0
  496. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.module.css.js.map +1 -0
  497. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.js +2 -0
  498. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.js.map +1 -0
  499. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.module.css.js +2 -0
  500. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.module.css.js.map +1 -0
  501. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.js +2 -0
  502. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.js.map +1 -0
  503. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.js +2 -0
  504. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.js.map +1 -0
  505. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.module.css.js +2 -0
  506. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.module.css.js.map +1 -0
  507. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.js +2 -0
  508. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.js.map +1 -0
  509. package/dist/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
  510. package/dist/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -0
  511. package/dist/features/IL-marketplace/components/VersionSelectDropdown.js +2 -0
  512. package/dist/features/IL-marketplace/components/VersionSelectDropdown.js.map +1 -0
  513. package/dist/features/IL-marketplace/components/VersionSelectDropdown.module.css.js +2 -0
  514. package/dist/features/IL-marketplace/components/VersionSelectDropdown.module.css.js.map +1 -0
  515. package/dist/features/IL-marketplace/constants.js +2 -0
  516. package/dist/features/IL-marketplace/constants.js.map +1 -0
  517. package/dist/features/IL-marketplace/hooks/useControllableState.js +2 -0
  518. package/dist/features/IL-marketplace/hooks/useControllableState.js.map +1 -0
  519. package/dist/features/IL-marketplace/hooks/useDeleteGuidelineMutation.js +2 -0
  520. package/dist/features/IL-marketplace/hooks/useDeleteGuidelineMutation.js.map +1 -0
  521. package/dist/features/IL-marketplace/hooks/useGuidelineSelection.js +2 -0
  522. package/dist/features/IL-marketplace/hooks/useGuidelineSelection.js.map +1 -0
  523. package/dist/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.js +2 -0
  524. package/dist/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.js.map +1 -0
  525. package/dist/features/IL-marketplace/hooks/useMarketplacePublishILKBData.js +2 -0
  526. package/dist/features/IL-marketplace/hooks/useMarketplacePublishILKBData.js.map +1 -0
  527. package/dist/features/IL-marketplace/icons/GuidelineSpinner.js +2 -0
  528. package/dist/features/IL-marketplace/icons/GuidelineSpinner.js.map +1 -0
  529. package/dist/features/IL-marketplace/queryClient.js +2 -0
  530. package/dist/features/IL-marketplace/queryClient.js.map +1 -0
  531. package/dist/features/IL-marketplace/services/IL-marketplace.api.js +2 -0
  532. package/dist/features/IL-marketplace/services/IL-marketplace.api.js.map +1 -0
  533. package/dist/features/IL-marketplace/services/guideline.cart.api.js +2 -0
  534. package/dist/features/IL-marketplace/services/guideline.cart.api.js.map +1 -0
  535. package/dist/features/IL-marketplace/services/guideline.core.api.js +2 -0
  536. package/dist/features/IL-marketplace/services/guideline.core.api.js.map +1 -0
  537. package/dist/features/IL-marketplace/services/guideline.runtime.config.js +2 -0
  538. package/dist/features/IL-marketplace/services/guideline.runtime.config.js.map +1 -0
  539. package/dist/features/IL-marketplace/services/guideline.session.js +2 -0
  540. package/dist/features/IL-marketplace/services/guideline.session.js.map +1 -0
  541. package/dist/features/IL-marketplace/services/instant-learning.api.js +2 -0
  542. package/dist/features/IL-marketplace/services/instant-learning.api.js.map +1 -0
  543. package/dist/features/IL-marketplace/store/usePublishTemplateStore.js +2 -0
  544. package/dist/features/IL-marketplace/store/usePublishTemplateStore.js.map +1 -0
  545. package/dist/features/IL-marketplace/utils/guidelineFiles.js +2 -0
  546. package/dist/features/IL-marketplace/utils/guidelineFiles.js.map +1 -0
  547. package/dist/features/IL-marketplace/utils/guidelineOverlay.js +2 -0
  548. package/dist/features/IL-marketplace/utils/guidelineOverlay.js.map +1 -0
  549. package/dist/features/IL-marketplace/utils/microfrontend.js +2 -0
  550. package/dist/features/IL-marketplace/utils/microfrontend.js.map +1 -0
  551. package/dist/features/IL-marketplace/utils/session.js +2 -0
  552. package/dist/features/IL-marketplace/utils/session.js.map +1 -0
  553. package/dist/features/IL-marketplace/utils.js +2 -0
  554. package/dist/features/IL-marketplace/utils.js.map +1 -0
  555. package/dist/features/IL-marketplace/workspace/useGuidelineWorkspace.js +2 -0
  556. package/dist/features/IL-marketplace/workspace/useGuidelineWorkspace.js.map +1 -0
  557. package/dist/features/IL-marketplace/workspace/workspace.context.js +2 -0
  558. package/dist/features/IL-marketplace/workspace/workspace.context.js.map +1 -0
  559. package/dist/features/IL-marketplace/workspace/workspace.runtime.js +2 -0
  560. package/dist/features/IL-marketplace/workspace/workspace.runtime.js.map +1 -0
  561. package/dist/features/InstantLearning/_components/ChatComponent.js +1 -1
  562. package/dist/features/InstantLearning/_components/ContextualChatComponent.js +1 -1
  563. package/dist/features/InstantLearning/_components/ContextualLearningForm.js +1 -1
  564. package/dist/features/InstantLearning/_components/LearningDetailsForm.js +1 -1
  565. package/dist/features/LSCGuidelinesCart/Cart/Cart.js +2 -0
  566. package/dist/features/LSCGuidelinesCart/Cart/Cart.js.map +1 -0
  567. package/dist/features/LSCGuidelinesCart/Cart/Cart.styles.js +2 -0
  568. package/dist/features/LSCGuidelinesCart/Cart/Cart.styles.js.map +1 -0
  569. package/dist/features/LSCGuidelinesCart/GuidelineCard.js +2 -0
  570. package/dist/features/LSCGuidelinesCart/GuidelineCard.js.map +1 -0
  571. package/dist/features/LSCGuidelinesCart/GuidelineCard.styles.js +2 -0
  572. package/dist/features/LSCGuidelinesCart/GuidelineCard.styles.js.map +1 -0
  573. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js +2 -0
  574. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js.map +1 -0
  575. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +2 -0
  576. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js.map +1 -0
  577. package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js +2 -0
  578. package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js.map +1 -0
  579. package/dist/features/LSCGuidelinesCart/api.js +2 -0
  580. package/dist/features/LSCGuidelinesCart/api.js.map +1 -0
  581. package/dist/features/LSCGuidelinesCart/endpoints.js +2 -0
  582. package/dist/features/LSCGuidelinesCart/endpoints.js.map +1 -0
  583. package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +2 -0
  584. package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +1 -0
  585. package/dist/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  586. package/dist/features/LearningManagement/LearningManagement.js +1 -1
  587. package/dist/features/LearningManagement/LearningManagementTest.js +2 -0
  588. package/dist/features/LearningManagement/LearningManagementTest.js.map +1 -0
  589. package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
  590. package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  591. package/dist/features/LearningManagement/RBAC/AccessPanel.js +1 -1
  592. package/dist/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
  593. package/dist/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  594. package/dist/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
  595. package/dist/features/LearningManagement/RuleContent/InstructionPromptBlock.js +2 -0
  596. package/dist/features/LearningManagement/RuleContent/InstructionPromptBlock.js.map +1 -0
  597. package/dist/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
  598. package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  599. package/dist/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
  600. package/dist/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
  601. package/dist/features/LearningManagement/RuleContent/TierCard.js +1 -1
  602. package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
  603. package/dist/features/LearningManagement/ScopeSelector.js +2 -0
  604. package/dist/features/LearningManagement/ScopeSelector.js.map +1 -0
  605. package/dist/features/LearningManagement/Sidebar.js +1 -1
  606. package/dist/features/LearningManagement/StationsContent/StationsContent.js +1 -1
  607. package/dist/features/LearningManagement/apis/apiConfig.js +1 -1
  608. package/dist/features/LearningManagement/apis/scopeApis.js +1 -1
  609. package/dist/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
  610. package/dist/features/LearningManagement/components/EmptyLearningState.js +1 -1
  611. package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
  612. package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +2 -0
  613. package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -0
  614. package/dist/features/LearningManagement/components/PromptTextEditor.js +2 -0
  615. package/dist/features/LearningManagement/components/PromptTextEditor.js.map +1 -0
  616. package/dist/features/LearningManagement/components/ScopeSkeletonLoader.js +1 -1
  617. package/dist/features/LearningManagement/components/ScopeTree/TreeMenu.js +1 -1
  618. package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
  619. package/dist/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
  620. package/dist/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
  621. package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
  622. package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
  623. package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  624. package/dist/features/LearningManagement/config.js +1 -1
  625. package/dist/features/LearningManagement/constants.js +2 -0
  626. package/dist/features/LearningManagement/constants.js.map +1 -0
  627. package/dist/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
  628. package/dist/features/LearningManagement/queries/useLMSConfigQuery.js +1 -1
  629. package/dist/features/LearningManagement/store/useEnvStore.js +1 -1
  630. package/dist/features/LearningManagement/store/useExternalWorkflowStore.js +2 -0
  631. package/dist/features/LearningManagement/store/useExternalWorkflowStore.js.map +1 -0
  632. package/dist/features/LearningManagement/store/useLMSConfigStore.js +1 -1
  633. package/dist/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
  634. package/dist/features/LearningManagement/store/usePermissionsStore.js +1 -1
  635. package/dist/features/LearningManagement/styles/LearningTemplateLayout.module.css.js +1 -1
  636. package/dist/features/LearningManagement/styles/LearningTemplateManagement.module.css.js +1 -1
  637. package/dist/features/LearningManagement/styles/PromptTextEditor.module.css.js +2 -0
  638. package/dist/features/LearningManagement/styles/PromptTextEditor.module.css.js.map +1 -0
  639. package/dist/features/LearningManagement/styles/RuleAccordion.module.css.js +1 -1
  640. package/dist/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
  641. package/dist/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
  642. package/dist/features/LearningManagement/styles/TierCard.module.css.js +1 -1
  643. package/dist/features/LearningManagement/utils/learningMetadataUtils.js +2 -0
  644. package/dist/features/LearningManagement/utils/learningMetadataUtils.js.map +1 -0
  645. package/dist/features/LearningManagement/utils/treeUtils.js +1 -1
  646. package/dist/hooks/useAgentFix.js +1 -1
  647. package/dist/hooks/useAgentSuggestions.js +1 -1
  648. package/dist/hooks/useAgentValidation.js +1 -1
  649. package/dist/hooks/useExistingAgentCheck.js +1 -1
  650. package/dist/hooks/useExistingPromptCheck.js +1 -1
  651. package/dist/hooks/usePromptFix.js +1 -1
  652. package/dist/hooks/usePromptSuggestions.js +1 -1
  653. package/dist/hooks/usePromptValidation.js +1 -1
  654. package/dist/index.js +1 -1
  655. package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
  656. package/dist/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
  657. package/dist/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js +1 -1
  658. package/dist/schema-driven/BPARenderer.js +2 -0
  659. package/dist/schema-driven/BPARenderer.js.map +1 -0
  660. package/dist/schema-driven/FallbackField.js +2 -0
  661. package/dist/schema-driven/FallbackField.js.map +1 -0
  662. package/dist/schema-driven/components/ConditionSectionField.js +2 -0
  663. package/dist/schema-driven/components/ConditionSectionField.js.map +1 -0
  664. package/dist/schema-driven/components/ConfigSectionField.js +2 -0
  665. package/dist/schema-driven/components/ConfigSectionField.js.map +1 -0
  666. package/dist/schema-driven/components/DropdownSectionField.js +2 -0
  667. package/dist/schema-driven/components/DropdownSectionField.js.map +1 -0
  668. package/dist/schema-driven/components/GlobalSetupAccordionField.js +2 -0
  669. package/dist/schema-driven/components/GlobalSetupAccordionField.js.map +1 -0
  670. package/dist/schema-driven/components/GroupEditRow.js +2 -0
  671. package/dist/schema-driven/components/GroupEditRow.js.map +1 -0
  672. package/dist/schema-driven/components/PromptTextEditorField.js +2 -0
  673. package/dist/schema-driven/components/PromptTextEditorField.js.map +1 -0
  674. package/dist/schema-driven/components/ScopeSectionField.js +2 -0
  675. package/dist/schema-driven/components/ScopeSectionField.js.map +1 -0
  676. package/dist/schema-driven/components/TextInputField.js +2 -0
  677. package/dist/schema-driven/components/TextInputField.js.map +1 -0
  678. package/dist/schema-driven/components/VariantListField.js +2 -0
  679. package/dist/schema-driven/components/VariantListField.js.map +1 -0
  680. package/dist/schema-driven/primitives/Accordion.js +2 -0
  681. package/dist/schema-driven/primitives/Accordion.js.map +1 -0
  682. package/dist/schema-driven/store/useDynamicFormStore.js +2 -0
  683. package/dist/schema-driven/store/useDynamicFormStore.js.map +1 -0
  684. package/dist/schema-driven/utils/PayloadUtils.js +2 -0
  685. package/dist/schema-driven/utils/PayloadUtils.js.map +1 -0
  686. package/dist/schema-driven/utils/aiReasoning.js +2 -0
  687. package/dist/schema-driven/utils/aiReasoning.js.map +1 -0
  688. package/dist/service/InstantLearningService.js +1 -1
  689. package/dist/types/src/ComponentRegistry.d.ts +13 -0
  690. package/dist/types/src/ComponentRegistry.d.ts.map +1 -0
  691. package/dist/types/src/ContinueWithTemplateModal.d.ts +24 -0
  692. package/dist/types/src/ContinueWithTemplateModal.d.ts.map +1 -0
  693. package/dist/types/src/ILMarketplaceMockTest.d.ts +4 -0
  694. package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -0
  695. package/dist/types/src/ILMarketplaceWrapper.d.ts +143 -0
  696. package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -0
  697. package/dist/types/src/PublishToMarketplaceTest.d.ts +3 -0
  698. package/dist/types/src/PublishToMarketplaceTest.d.ts.map +1 -0
  699. package/dist/types/src/api/transport.d.ts +44 -0
  700. package/dist/types/src/api/transport.d.ts.map +1 -0
  701. package/dist/types/src/features/DocumentLearning/DocumentLearning.d.ts.map +1 -1
  702. package/dist/types/src/features/DocumentLearning/_components/BookLearningForm.d.ts.map +1 -1
  703. package/dist/types/src/features/DocumentLearning/_components/LearningDetailsForm.d.ts.map +1 -1
  704. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +2 -2
  705. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
  706. package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts +597 -0
  707. package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
  708. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +38 -17
  709. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
  710. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +13 -1
  711. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -1
  712. package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts +3 -1
  713. package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts.map +1 -1
  714. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
  715. package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts +1 -1
  716. package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
  717. package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
  718. package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts +3 -1
  719. package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts.map +1 -1
  720. package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -1
  721. package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +1 -1
  722. package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.d.ts.map +1 -1
  723. package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts +25 -0
  724. package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts.map +1 -0
  725. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts.map +1 -1
  726. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts.map +1 -1
  727. package/dist/types/src/features/IL-OTJ/_components/ViewFormUpdateCard.d.ts.map +1 -1
  728. package/dist/types/src/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.d.ts.map +1 -1
  729. package/dist/types/src/features/IL-OTJ/_components/_svg/EditPencilIcon.d.ts +7 -0
  730. package/dist/types/src/features/IL-OTJ/_components/_svg/EditPencilIcon.d.ts.map +1 -0
  731. package/dist/types/src/features/IL-OTJ/_components/atoms/Textarea/Textarea.d.ts.map +1 -1
  732. package/dist/types/src/features/IL-OTJ/_components/index.d.ts +2 -0
  733. package/dist/types/src/features/IL-OTJ/_components/index.d.ts.map +1 -1
  734. package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +4 -1
  735. package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +1 -1
  736. package/dist/types/src/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.d.ts +2 -1
  737. package/dist/types/src/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.d.ts.map +1 -1
  738. package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +1 -1
  739. package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +1 -1
  740. package/dist/types/src/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.d.ts +17 -0
  741. package/dist/types/src/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.d.ts.map +1 -0
  742. package/dist/types/src/features/IL-OTJ/_components/organisms/DropdownSection/index.d.ts +2 -0
  743. package/dist/types/src/features/IL-OTJ/_components/organisms/DropdownSection/index.d.ts.map +1 -0
  744. package/dist/types/src/features/IL-OTJ/_components/organisms/TextSection/TextSection.d.ts +1 -1
  745. package/dist/types/src/features/IL-OTJ/_components/organisms/TextSection/TextSection.d.ts.map +1 -1
  746. package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
  747. package/dist/types/src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts +12 -0
  748. package/dist/types/src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts.map +1 -0
  749. package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts +2 -1
  750. package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts.map +1 -1
  751. package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts +6 -0
  752. package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
  753. package/dist/types/src/features/IL-OTJ/helpers/message-rendering-utils.d.ts.map +1 -1
  754. package/dist/types/src/features/IL-marketplace/components/GuidelineCardMenu.d.ts +34 -0
  755. package/dist/types/src/features/IL-marketplace/components/GuidelineCardMenu.d.ts.map +1 -0
  756. package/dist/types/src/features/IL-marketplace/components/GuidelineCart.d.ts +4 -0
  757. package/dist/types/src/features/IL-marketplace/components/GuidelineCart.d.ts.map +1 -0
  758. package/dist/types/src/features/IL-marketplace/components/GuidelineCartHeader.d.ts +14 -0
  759. package/dist/types/src/features/IL-marketplace/components/GuidelineCartHeader.d.ts.map +1 -0
  760. package/dist/types/src/features/IL-marketplace/components/GuidelineCartItem.d.ts +16 -0
  761. package/dist/types/src/features/IL-marketplace/components/GuidelineCartItem.d.ts.map +1 -0
  762. package/dist/types/src/features/IL-marketplace/components/GuidelineConfirmDialog.d.ts +18 -0
  763. package/dist/types/src/features/IL-marketplace/components/GuidelineConfirmDialog.d.ts.map +1 -0
  764. package/dist/types/src/features/IL-marketplace/components/GuidelineEmptyState.d.ts +11 -0
  765. package/dist/types/src/features/IL-marketplace/components/GuidelineEmptyState.d.ts.map +1 -0
  766. package/dist/types/src/features/IL-marketplace/components/GuidelineFilterPanel.d.ts +9 -0
  767. package/dist/types/src/features/IL-marketplace/components/GuidelineFilterPanel.d.ts.map +1 -0
  768. package/dist/types/src/features/IL-marketplace/components/GuidelineHeader.d.ts +4 -0
  769. package/dist/types/src/features/IL-marketplace/components/GuidelineHeader.d.ts.map +1 -0
  770. package/dist/types/src/features/IL-marketplace/components/GuidelineIconButton.d.ts +15 -0
  771. package/dist/types/src/features/IL-marketplace/components/GuidelineIconButton.d.ts.map +1 -0
  772. package/dist/types/src/features/IL-marketplace/components/GuidelineLandingPage.d.ts +4 -0
  773. package/dist/types/src/features/IL-marketplace/components/GuidelineLandingPage.d.ts.map +1 -0
  774. package/dist/types/src/features/IL-marketplace/components/GuidelineLibrary.d.ts +65 -0
  775. package/dist/types/src/features/IL-marketplace/components/GuidelineLibrary.d.ts.map +1 -0
  776. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryCard.d.ts +63 -0
  777. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryCard.d.ts.map +1 -0
  778. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryContent.d.ts +86 -0
  779. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryContent.d.ts.map +1 -0
  780. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryTab.d.ts +26 -0
  781. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryTab.d.ts.map +1 -0
  782. package/dist/types/src/features/IL-marketplace/components/GuidelineProceedButton.d.ts +4 -0
  783. package/dist/types/src/features/IL-marketplace/components/GuidelineProceedButton.d.ts.map +1 -0
  784. package/dist/types/src/features/IL-marketplace/components/GuidelineSelectButton.d.ts +11 -0
  785. package/dist/types/src/features/IL-marketplace/components/GuidelineSelectButton.d.ts.map +1 -0
  786. package/dist/types/src/features/IL-marketplace/components/GuidelineStatusChip.d.ts +9 -0
  787. package/dist/types/src/features/IL-marketplace/components/GuidelineStatusChip.d.ts.map +1 -0
  788. package/dist/types/src/features/IL-marketplace/components/GuidelineTooltip.d.ts +10 -0
  789. package/dist/types/src/features/IL-marketplace/components/GuidelineTooltip.d.ts.map +1 -0
  790. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.d.ts +3 -0
  791. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.d.ts.map +1 -0
  792. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.d.ts +8 -0
  793. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.d.ts.map +1 -0
  794. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.d.ts +3 -0
  795. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.d.ts.map +1 -0
  796. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.d.ts +8 -0
  797. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.d.ts.map +1 -0
  798. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.d.ts +8 -0
  799. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.d.ts.map +1 -0
  800. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.d.ts +4 -0
  801. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.d.ts.map +1 -0
  802. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.d.ts +4 -0
  803. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.d.ts.map +1 -0
  804. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.d.ts +5 -0
  805. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.d.ts.map +1 -0
  806. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.d.ts +3 -0
  807. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.d.ts.map +1 -0
  808. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.types.d.ts +92 -0
  809. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.types.d.ts.map +1 -0
  810. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.d.ts +28 -0
  811. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.d.ts.map +1 -0
  812. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.d.ts +4 -0
  813. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.d.ts.map +1 -0
  814. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.d.ts +12 -0
  815. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.d.ts.map +1 -0
  816. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.d.ts +4 -0
  817. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.d.ts.map +1 -0
  818. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.d.ts +8 -0
  819. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.d.ts.map +1 -0
  820. package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts +24 -0
  821. package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts.map +1 -0
  822. package/dist/types/src/features/IL-marketplace/components/VersionSelectDropdown.d.ts +13 -0
  823. package/dist/types/src/features/IL-marketplace/components/VersionSelectDropdown.d.ts.map +1 -0
  824. package/dist/types/src/features/IL-marketplace/constants.d.ts +182 -0
  825. package/dist/types/src/features/IL-marketplace/constants.d.ts.map +1 -0
  826. package/dist/types/src/features/IL-marketplace/hooks/useControllableState.d.ts +8 -0
  827. package/dist/types/src/features/IL-marketplace/hooks/useControllableState.d.ts.map +1 -0
  828. package/dist/types/src/features/IL-marketplace/hooks/useDeleteGuidelineMutation.d.ts +10 -0
  829. package/dist/types/src/features/IL-marketplace/hooks/useDeleteGuidelineMutation.d.ts.map +1 -0
  830. package/dist/types/src/features/IL-marketplace/hooks/useGuidelineSelection.d.ts +17 -0
  831. package/dist/types/src/features/IL-marketplace/hooks/useGuidelineSelection.d.ts.map +1 -0
  832. package/dist/types/src/features/IL-marketplace/hooks/useGuidelineWorkspaceLegacyBridge.d.ts +6 -0
  833. package/dist/types/src/features/IL-marketplace/hooks/useGuidelineWorkspaceLegacyBridge.d.ts.map +1 -0
  834. package/dist/types/src/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.d.ts +4 -0
  835. package/dist/types/src/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.d.ts.map +1 -0
  836. package/dist/types/src/features/IL-marketplace/hooks/useMarketplacePublishILKBData.d.ts +29 -0
  837. package/dist/types/src/features/IL-marketplace/hooks/useMarketplacePublishILKBData.d.ts.map +1 -0
  838. package/dist/types/src/features/IL-marketplace/icons/GuidelineSpinner.d.ts +7 -0
  839. package/dist/types/src/features/IL-marketplace/icons/GuidelineSpinner.d.ts.map +1 -0
  840. package/dist/types/src/features/IL-marketplace/index.d.ts +41 -0
  841. package/dist/types/src/features/IL-marketplace/index.d.ts.map +1 -0
  842. package/dist/types/src/features/IL-marketplace/queryClient.d.ts +3 -0
  843. package/dist/types/src/features/IL-marketplace/queryClient.d.ts.map +1 -0
  844. package/dist/types/src/features/IL-marketplace/services/IL-marketplace.api.d.ts +154 -0
  845. package/dist/types/src/features/IL-marketplace/services/IL-marketplace.api.d.ts.map +1 -0
  846. package/dist/types/src/features/IL-marketplace/services/guideline.api.d.ts +2 -0
  847. package/dist/types/src/features/IL-marketplace/services/guideline.api.d.ts.map +1 -0
  848. package/dist/types/src/features/IL-marketplace/services/guideline.cart.api.d.ts +28 -0
  849. package/dist/types/src/features/IL-marketplace/services/guideline.cart.api.d.ts.map +1 -0
  850. package/dist/types/src/features/IL-marketplace/services/guideline.chat.d.ts +2 -0
  851. package/dist/types/src/features/IL-marketplace/services/guideline.chat.d.ts.map +1 -0
  852. package/dist/types/src/features/IL-marketplace/services/guideline.content.d.ts +2 -0
  853. package/dist/types/src/features/IL-marketplace/services/guideline.content.d.ts.map +1 -0
  854. package/dist/types/src/features/IL-marketplace/services/guideline.core.api.d.ts +51 -0
  855. package/dist/types/src/features/IL-marketplace/services/guideline.core.api.d.ts.map +1 -0
  856. package/dist/types/src/features/IL-marketplace/services/guideline.runtime.config.d.ts +47 -0
  857. package/dist/types/src/features/IL-marketplace/services/guideline.runtime.config.d.ts.map +1 -0
  858. package/dist/types/src/features/IL-marketplace/services/guideline.session.d.ts +10 -0
  859. package/dist/types/src/features/IL-marketplace/services/guideline.session.d.ts.map +1 -0
  860. package/dist/types/src/features/IL-marketplace/services/instant-learning.api.d.ts +112 -0
  861. package/dist/types/src/features/IL-marketplace/services/instant-learning.api.d.ts.map +1 -0
  862. package/dist/types/src/features/IL-marketplace/services/instant-learning.wishlist.d.ts +8 -0
  863. package/dist/types/src/features/IL-marketplace/services/instant-learning.wishlist.d.ts.map +1 -0
  864. package/dist/types/src/features/IL-marketplace/store/usePublishTemplateStore.d.ts +14 -0
  865. package/dist/types/src/features/IL-marketplace/store/usePublishTemplateStore.d.ts.map +1 -0
  866. package/dist/types/src/features/IL-marketplace/types/add-context.types.d.ts +39 -0
  867. package/dist/types/src/features/IL-marketplace/types/add-context.types.d.ts.map +1 -0
  868. package/dist/types/src/features/IL-marketplace/types/api.types.d.ts +116 -0
  869. package/dist/types/src/features/IL-marketplace/types/api.types.d.ts.map +1 -0
  870. package/dist/types/src/features/IL-marketplace/types/file-item.d.ts +60 -0
  871. package/dist/types/src/features/IL-marketplace/types/file-item.d.ts.map +1 -0
  872. package/dist/types/src/features/IL-marketplace/types/guideline.api.types.d.ts +11 -0
  873. package/dist/types/src/features/IL-marketplace/types/guideline.api.types.d.ts.map +1 -0
  874. package/dist/types/src/features/IL-marketplace/types/guideline.types.d.ts +42 -0
  875. package/dist/types/src/features/IL-marketplace/types/guideline.types.d.ts.map +1 -0
  876. package/dist/types/src/features/IL-marketplace/types.d.ts +432 -0
  877. package/dist/types/src/features/IL-marketplace/types.d.ts.map +1 -0
  878. package/dist/types/src/features/IL-marketplace/utils/addContextHelpers.d.ts +6 -0
  879. package/dist/types/src/features/IL-marketplace/utils/addContextHelpers.d.ts.map +1 -0
  880. package/dist/types/src/features/IL-marketplace/utils/cn.d.ts +3 -0
  881. package/dist/types/src/features/IL-marketplace/utils/cn.d.ts.map +1 -0
  882. package/dist/types/src/features/IL-marketplace/utils/guidelineFiles.d.ts +17 -0
  883. package/dist/types/src/features/IL-marketplace/utils/guidelineFiles.d.ts.map +1 -0
  884. package/dist/types/src/features/IL-marketplace/utils/guidelineOverlay.d.ts +3 -0
  885. package/dist/types/src/features/IL-marketplace/utils/guidelineOverlay.d.ts.map +1 -0
  886. package/dist/types/src/features/IL-marketplace/utils/guidelineSort.d.ts +3 -0
  887. package/dist/types/src/features/IL-marketplace/utils/guidelineSort.d.ts.map +1 -0
  888. package/dist/types/src/features/IL-marketplace/utils/microfrontend.d.ts +13 -0
  889. package/dist/types/src/features/IL-marketplace/utils/microfrontend.d.ts.map +1 -0
  890. package/dist/types/src/features/IL-marketplace/utils/session.d.ts +4 -0
  891. package/dist/types/src/features/IL-marketplace/utils/session.d.ts.map +1 -0
  892. package/dist/types/src/features/IL-marketplace/utils/url.d.ts +2 -0
  893. package/dist/types/src/features/IL-marketplace/utils/url.d.ts.map +1 -0
  894. package/dist/types/src/features/IL-marketplace/utils.d.ts +75 -0
  895. package/dist/types/src/features/IL-marketplace/utils.d.ts.map +1 -0
  896. package/dist/types/src/features/IL-marketplace/workspace/useGuidelineWorkspace.d.ts +44 -0
  897. package/dist/types/src/features/IL-marketplace/workspace/useGuidelineWorkspace.d.ts.map +1 -0
  898. package/dist/types/src/features/IL-marketplace/workspace/workspace.context.d.ts +9 -0
  899. package/dist/types/src/features/IL-marketplace/workspace/workspace.context.d.ts.map +1 -0
  900. package/dist/types/src/features/IL-marketplace/workspace/workspace.runtime.d.ts +12 -0
  901. package/dist/types/src/features/IL-marketplace/workspace/workspace.runtime.d.ts.map +1 -0
  902. package/dist/types/src/features/IL-marketplace/workspace/workspace.selectors.d.ts +5 -0
  903. package/dist/types/src/features/IL-marketplace/workspace/workspace.selectors.d.ts.map +1 -0
  904. package/dist/types/src/features/IL-marketplace/workspace/workspace.types.d.ts +89 -0
  905. package/dist/types/src/features/IL-marketplace/workspace/workspace.types.d.ts.map +1 -0
  906. package/dist/types/src/features/InstantLearning/_components/ContextualLearningForm.d.ts.map +1 -1
  907. package/dist/types/src/features/InstantLearning/_components/LearningDetailsForm.d.ts.map +1 -1
  908. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts +10 -0
  909. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts.map +1 -0
  910. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.styles.d.ts +6 -0
  911. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.styles.d.ts.map +1 -0
  912. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.d.ts +11 -0
  913. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.d.ts.map +1 -0
  914. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.styles.d.ts +6 -0
  915. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.styles.d.ts.map +1 -0
  916. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts +16 -0
  917. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts.map +1 -0
  918. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts +6 -0
  919. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts.map +1 -0
  920. package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts +19 -0
  921. package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts.map +1 -0
  922. package/dist/types/src/features/LSCGuidelinesCart/api.d.ts +4 -0
  923. package/dist/types/src/features/LSCGuidelinesCart/api.d.ts.map +1 -0
  924. package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts +5 -0
  925. package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts.map +1 -0
  926. package/dist/types/src/features/LSCGuidelinesCart/interfacesApi.d.ts +25 -0
  927. package/dist/types/src/features/LSCGuidelinesCart/interfacesApi.d.ts.map +1 -0
  928. package/dist/types/src/features/LSCGuidelinesCart/transformSelectedGuidelineData.d.ts +18 -0
  929. package/dist/types/src/features/LSCGuidelinesCart/transformSelectedGuidelineData.d.ts.map +1 -0
  930. package/dist/types/src/features/LearningManagement/AuditLog/AuditLog.d.ts.map +1 -1
  931. package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +30 -1
  932. package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
  933. package/dist/types/src/features/LearningManagement/LearningManagementTest.d.ts.map +1 -1
  934. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +11 -1
  935. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
  936. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +1 -1
  937. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
  938. package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts +0 -2
  939. package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts.map +1 -1
  940. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts.map +1 -1
  941. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts +3 -0
  942. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +1 -1
  943. package/dist/types/src/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts.map +1 -1
  944. package/dist/types/src/features/LearningManagement/RuleContent/InstructionPromptBlock.d.ts +27 -0
  945. package/dist/types/src/features/LearningManagement/RuleContent/InstructionPromptBlock.d.ts.map +1 -0
  946. package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts.map +1 -1
  947. package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts +1 -0
  948. package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
  949. package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts +2 -0
  950. package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts.map +1 -1
  951. package/dist/types/src/features/LearningManagement/RuleContent/RuleTierList.d.ts.map +1 -1
  952. package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts +1 -0
  953. package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts.map +1 -1
  954. package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts +4 -0
  955. package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts.map +1 -1
  956. package/dist/types/src/features/LearningManagement/ScopeSelector.d.ts +45 -0
  957. package/dist/types/src/features/LearningManagement/ScopeSelector.d.ts.map +1 -0
  958. package/dist/types/src/features/LearningManagement/Sidebar.d.ts.map +1 -1
  959. package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts +1 -0
  960. package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts.map +1 -1
  961. package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts +10 -0
  962. package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts.map +1 -1
  963. package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +42 -6
  964. package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
  965. package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts.map +1 -1
  966. package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts +6 -0
  967. package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts.map +1 -1
  968. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +1 -0
  969. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
  970. package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts +59 -0
  971. package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -0
  972. package/dist/types/src/features/LearningManagement/components/PromptTextEditor.d.ts +44 -0
  973. package/dist/types/src/features/LearningManagement/components/PromptTextEditor.d.ts.map +1 -0
  974. package/dist/types/src/features/LearningManagement/components/ScopeSkeletonLoader.d.ts +4 -0
  975. package/dist/types/src/features/LearningManagement/components/ScopeSkeletonLoader.d.ts.map +1 -1
  976. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeMenu.d.ts.map +1 -1
  977. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts +9 -0
  978. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
  979. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts +2 -0
  980. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map +1 -1
  981. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts.map +1 -1
  982. package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts +13 -0
  983. package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts.map +1 -0
  984. package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +1 -1
  985. package/dist/types/src/features/LearningManagement/constants.d.ts +19 -0
  986. package/dist/types/src/features/LearningManagement/constants.d.ts.map +1 -0
  987. package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +13 -0
  988. package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +1 -1
  989. package/dist/types/src/features/LearningManagement/queries/useApprovalQueries.d.ts +11 -8
  990. package/dist/types/src/features/LearningManagement/queries/useApprovalQueries.d.ts.map +1 -1
  991. package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts +8 -1
  992. package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts.map +1 -1
  993. package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts +2 -0
  994. package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts.map +1 -1
  995. package/dist/types/src/features/LearningManagement/store/useExternalWorkflowStore.d.ts +38 -0
  996. package/dist/types/src/features/LearningManagement/store/useExternalWorkflowStore.d.ts.map +1 -0
  997. package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +157 -0
  998. package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -1
  999. package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts +13 -0
  1000. package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts.map +1 -1
  1001. package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts +2 -1
  1002. package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts.map +1 -1
  1003. package/dist/types/src/features/LearningManagement/types.d.ts +53 -0
  1004. package/dist/types/src/features/LearningManagement/types.d.ts.map +1 -1
  1005. package/dist/types/src/features/LearningManagement/utils/learningMetadataUtils.d.ts +12 -0
  1006. package/dist/types/src/features/LearningManagement/utils/learningMetadataUtils.d.ts.map +1 -0
  1007. package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts +2 -1
  1008. package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts.map +1 -1
  1009. package/dist/types/src/hooks/useAgentFix.d.ts.map +1 -1
  1010. package/dist/types/src/hooks/useAgentSuggestions.d.ts.map +1 -1
  1011. package/dist/types/src/hooks/useAgentValidation.d.ts.map +1 -1
  1012. package/dist/types/src/hooks/useExistingAgentCheck.d.ts.map +1 -1
  1013. package/dist/types/src/hooks/useExistingPromptCheck.d.ts.map +1 -1
  1014. package/dist/types/src/hooks/usePromptFix.d.ts.map +1 -1
  1015. package/dist/types/src/hooks/usePromptSuggestions.d.ts.map +1 -1
  1016. package/dist/types/src/hooks/usePromptValidation.d.ts.map +1 -1
  1017. package/dist/types/src/index.d.ts +47 -0
  1018. package/dist/types/src/index.d.ts.map +1 -1
  1019. package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts +1 -0
  1020. package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts.map +1 -1
  1021. package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
  1022. package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts +1 -0
  1023. package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts.map +1 -1
  1024. package/dist/types/src/schema-driven/BPARenderer.d.ts +14 -0
  1025. package/dist/types/src/schema-driven/BPARenderer.d.ts.map +1 -0
  1026. package/dist/types/src/schema-driven/FallbackField.d.ts +13 -0
  1027. package/dist/types/src/schema-driven/FallbackField.d.ts.map +1 -0
  1028. package/dist/types/src/schema-driven/components/ConditionSectionField.d.ts +3 -0
  1029. package/dist/types/src/schema-driven/components/ConditionSectionField.d.ts.map +1 -0
  1030. package/dist/types/src/schema-driven/components/ConfigSectionField.d.ts +3 -0
  1031. package/dist/types/src/schema-driven/components/ConfigSectionField.d.ts.map +1 -0
  1032. package/dist/types/src/schema-driven/components/DropdownSectionField.d.ts +3 -0
  1033. package/dist/types/src/schema-driven/components/DropdownSectionField.d.ts.map +1 -0
  1034. package/dist/types/src/schema-driven/components/GlobalSetupAccordionField.d.ts +3 -0
  1035. package/dist/types/src/schema-driven/components/GlobalSetupAccordionField.d.ts.map +1 -0
  1036. package/dist/types/src/schema-driven/components/GroupEditRow.d.ts +3 -0
  1037. package/dist/types/src/schema-driven/components/GroupEditRow.d.ts.map +1 -0
  1038. package/dist/types/src/schema-driven/components/PromptTextEditorField.d.ts +3 -0
  1039. package/dist/types/src/schema-driven/components/PromptTextEditorField.d.ts.map +1 -0
  1040. package/dist/types/src/schema-driven/components/ScopeSectionField.d.ts +3 -0
  1041. package/dist/types/src/schema-driven/components/ScopeSectionField.d.ts.map +1 -0
  1042. package/dist/types/src/schema-driven/components/TextInputField.d.ts +3 -0
  1043. package/dist/types/src/schema-driven/components/TextInputField.d.ts.map +1 -0
  1044. package/dist/types/src/schema-driven/components/VariantListField.d.ts +3 -0
  1045. package/dist/types/src/schema-driven/components/VariantListField.d.ts.map +1 -0
  1046. package/dist/types/src/schema-driven/demoSchema.d.ts +13 -0
  1047. package/dist/types/src/schema-driven/demoSchema.d.ts.map +1 -0
  1048. package/dist/types/src/schema-driven/primitives/Accordion.d.ts +10 -0
  1049. package/dist/types/src/schema-driven/primitives/Accordion.d.ts.map +1 -0
  1050. package/dist/types/src/schema-driven/store/useDynamicFormStore.d.ts +19 -0
  1051. package/dist/types/src/schema-driven/store/useDynamicFormStore.d.ts.map +1 -0
  1052. package/dist/types/src/schema-driven/types.d.ts +63 -0
  1053. package/dist/types/src/schema-driven/types.d.ts.map +1 -0
  1054. package/dist/types/src/schema-driven/utils/PayloadUtils.d.ts +55 -0
  1055. package/dist/types/src/schema-driven/utils/PayloadUtils.d.ts.map +1 -0
  1056. package/dist/types/src/schema-driven/utils/aiReasoning.d.ts +5 -0
  1057. package/dist/types/src/schema-driven/utils/aiReasoning.d.ts.map +1 -0
  1058. package/dist/types/src/service/API.d.ts.map +1 -1
  1059. package/dist/types/src/service/GoogleFilePickerService.d.ts.map +1 -1
  1060. package/dist/types/src/service/InstantLearningService.d.ts +12 -1
  1061. package/dist/types/src/service/InstantLearningService.d.ts.map +1 -1
  1062. package/dist/types/src/service/ModelService.d.ts.map +1 -1
  1063. package/dist/types/src/service/SavedDataSetService.d.ts.map +1 -1
  1064. package/dist/types/src/utils/bookGenieAPI.d.ts.map +1 -1
  1065. package/dist/types/src/utils/date.d.ts.map +1 -1
  1066. package/dist/types/src/utils/instantLearningAPI.d.ts.map +1 -1
  1067. package/dist/utils/agentGenieAPI.js +1 -1
  1068. package/dist/utils/bookGenieAPI.js +1 -1
  1069. package/dist/utils/instantLearningAPI.js +1 -1
  1070. package/package.json +42 -18
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as n,__awaiter as t,__generator as r}from"tslib";import{jsx as o,jsxs as s,Fragment as i}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as c}from"react";import{BookOpen as u,Users as d,History as p}from"lucide-react";import{useLearningTemplateStore as m}from"./store/useLearningTemplateStore.js";import{Toast as f}from"primereact/toast";import g from"./styles/LearningTemplateManagement.module.css.js";import v from"./LearningTemplateLayout.js";import h from"./components/EmptyLearningState.js";import S from"./store/useAuthStore.js";import{fetchTiers as y,fetchScopes as b,inheritScope as C,inheritScopeBackwardCompatible as T,createRuleSet as w,renameScope as E,deleteRuleSet as L,requestAccess as I}from"./apis/scopeApis.js";import{QUERY_PARAM_KEYS as D,setQueryParams as A}from"./hooks/useLearningTemplateQueryParams.js";import O from"./components/ConfirmationModal.js";import R from"./components/LearningTemplateManagementSkeleton.js";import{findNodePathById as j}from"./utils/treeUtils.js";import N from"./store/useEnvStore.js";import{useConfigStore as k}from"./store/useConfigStore.js";import{TooltipProvider as M}from"./components/ToolTip.js";import _ from"./components/CreateRuleSetLegacyModal.js";import{usePermissionsStore as P}from"./store/usePermissionsStore.js";import{useAppSecRolesStore as U}from"./store/useAppSecRolesStore.js";import{useGetAppSecRolesQuery as G}from"./queries/useApprovalQueries.js";import{useLMSConfigQuery as B}from"./queries/useLMSConfigQuery.js";import F from"./RuleContent/AddScopeModal.js";import q from"./components/RuleContentSkeleton.js";import x from"./components/ErrorStateDisplay.js";import{useLocation as H}from"react-router-dom";import Q from"./shared/SuccessToastContent.js";import z from"./shared/ErrorToastContent.js";import K from"./RuleContent/RenameScopeModal.js";import{dt as V}from"./store/useLMSConfigStore.js";function W(W){var Y,J,X,Z=this,$=W.userDetails,ee=W.llmStudioUrl,ne=W.audacyBackendUrl,te=W.ilLabels,re=W.config,oe=W.rbacConfig,se=W.auditLogConfig,ie=W.app_integration_id,ae=W.backwardCompatibility,le=void 0!==ae&&ae,ce=m(function(e){return e.selectedRuleSetId}),ue=m(function(e){return e.setSelectedRuleSetId}),de=m(function(e){return e.error}),pe=m(function(e){return e.setError}),me=m(function(e){return e.setStations}),fe=m(function(e){return e.scopeTreeData}),ge=m(function(e){return e.setScopeTreeData}),ve=a({isOpen:!1,type:"GLOBAL"}),he=ve[0],Se=ve[1],ye=a(!1),be=ye[0],Ce=ye[1],Te=a(!1),we=Te[0],Ee=Te[1],Le=a("learnings"),Ie=Le[0],De=Le[1],Ae=a(null),Oe=Ae[0],Re=Ae[1],je=a(null),Ne=je[0],ke=je[1],Me=l(null),_e=l(null),Pe=l(!1),Ue=l(null),Ge=S();Ge.user;var Be=Ge.setUser,Fe=k(),qe=Fe.setConfig,xe=Fe.setIlLabels;console.log("testing",V("middleDrawer.contextMenu.addSubscope",""));var He=function(){try{return H()}catch(e){return{search:""}}}();c(function(){if(!Pe.current){var e=new URLSearchParams(window.location.search),n=e.get(D.RULESET_ID),t=e.get(D.SECTION),r=t&&ln.has(t)?t:"learnings";(null==n?void 0:n.length)&&ue&&De&&(ue(n),De(r),Pe.current=!0)}},[null==He?void 0:He.search,De,ue]);var Qe=P(function(e){return e.fetchPermissions}),ze=P(function(e){return e.hasPermission}),Ke=U(function(e){return e.setRoles}),Ve=N(function(e){return e.appsecRbacUrl})===oe.appsecRbacUrl,We=G(oe.applicationId,Ve).data,Ye=B(null!=ie?ie:""),Je=Ye.isLoading,Xe=Ye.isError,Ze=Ye.refetch;Ye.isSuccess,c(function(){We&&Ke(We.map(function(e){return{_id:e._id,name:e.name}}))},[We,Ke]),c(function(){var e;console.log("userDetails",$),Be($),console.log("llmStudioUrl",ee),console.log("audacyBackendUrl",ne),N.getState().setLlmStudioUrl(ee),N.getState().setAudacyBackendUrl(ne),N.getState().setRbacConfig(oe),N.getState().setAuditLogConfig(se),qe(re),xe(te),m.getState().setAppIntegrationId(null!=ie?ie:null),m.getState().setBackwardCompatibility(le),m.getState().setToken(null!==(e=null==$?void 0:$.accessToken)&&void 0!==e?e:null)},[$,Be,ee,ne,oe,se,re,qe,te,xe,ie,le]),c(function(){(null==$?void 0:$.accessToken)&&ee&&y()},[ie,null==$?void 0:$.accessToken,ee]);var $e=function(n){return void 0===n&&(n=!0),t(Z,void 0,void 0,function(){var t,o,s,i,a,l;return r(this,function(r){switch(r.label){case 0:n&&Ce(!0),pe(null),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,Qe(oe.applicationId)];case 2:return r.sent(),t=function(n){if(!P.getState().hasPermission("ilotj.scope.view",n.id))return null;var r=n.children?n.children.map(function(e){return t(e)}).filter(function(e){return null!==e}):[];return e(e({},n),{children:r})},[4,b(ie,$.accessToken)];case 3:return(o=r.sent())&&o.data&&o.data.data&&(s=o.data.data,Array.isArray(s)&&(s=s.length>0?s[0]:null),s?(i=t(s))?(Re(null),ge({data:i}),_e.current?(ue(_e.current),De("learnings"),_e.current=null):m.getState().selectedRuleSetId||ue(i.id)):(Re(null!==(l=s.id)&&void 0!==l?l:null),ge(null)):(Re(null),ge(null))),[3,6];case 4:return a=r.sent(),console.error("Failed to fetch rule sets or permissions",a),pe("Failed to load data. Please try again later."),[3,6];case 5:return Ce(!1),[7];case 6:return[2]}})})};c(function(){var e;(null===(e=null==$?void 0:$.accessToken)||void 0===e?void 0:e.length)&&Ve?$e(!0):console.warn("Error: Trying to fetch rules without access token",$)},[null==$?void 0:$.accessToken,pe,me,oe.applicationId,Ve]);var en=function(n,o,s){return t(Z,void 0,void 0,function(){var t,o,s,i,a,l,c,u;return r(this,function(r){switch(r.label){case 0:Ee(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,L(n,$.accessToken)];case 2:return r.sent(),m.getState().selectedRuleSetId===n&&(t=m.getState().scopeTreeData,(o=j((null==t?void 0:t.data)||null,n))&&o.length>1&&(s=o[o.length-2],ue(s),De("learnings"))),[4,$e(!0)];case 3:return r.sent(),Se(function(n){return e(e({},n),{isOpen:!1})}),null===(a=Ue.current)||void 0===a||a.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,6];case 4:return i=r.sent(),console.error("An error occurred during scope deletion.",i),null===(l=Ue.current)||void 0===l||l.show({severity:"error",summary:"Delete Failed",detail:(null===(u=null===(c=null==i?void 0:i.response)||void 0===c?void 0:c.data)||void 0===u?void 0:u.message)||"There was an error deleting the scope. Please try again."}),[3,6];case 5:return Ee(!1),[7];case 6:return[2]}})})},nn=fe,tn=Ne?{data:{id:Ne.stationId,name:Ne.stationName,type:"STATION",metrics:{learningsCount:Ne.learningsCount,stationsCount:0},children:[]}}:nn,rn=!!(null==tn?void 0:tn.data);null===(Y=null==tn?void 0:tn.data)||void 0===Y||Y.type;var on=P(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",oe.applicationResourceId||"");if(Je)return o("div",e({className:g.learningManagementContainer},{children:o(q,{})}));if(Xe)return o("div",e({className:g.learningManagementContainer},{children:o(x,{errorMessage:"Failed to load configuration. Please try again.",onRetry:function(){return Ze()},title:"Error Loading Configuration"})}));var sn=n([{type:"GLOBAL",label:"Global",addChildLabel:"".concat(V("middleDrawer.addScope","Add Scope")),addChildType:"SCOPE"},e({type:"SCOPE",label:V("middleDrawer.scope","Scope")},!le&&{addChildLabel:V("middleDrawer.treeMenu.contextMenu.addSubscope","Add Subscope"),addChildType:"SUBSCOPE"})],le?[]:[{type:"SUBSCOPE",label:V("middleDrawer.subScope","Subscope")}],!0),an=[{id:"learnings",label:V("middleDrawer.treeMenu.submenu.learnings","Learnings"),icon:u,badgeKey:"learningsCount"},{id:"access",label:V("middleDrawer.treeMenu.submenu.access","Access"),icon:d},{id:"history",label:V("middleDrawer.treeMenu.submenu.changeHistory","Change History"),icon:p}],ln=new Set(an.map(function(e){return e.id})),cn=Ne?an.filter(function(e){return"stations"!==e.id}):an;return o(M,{children:s("div",e({className:g.learningManagementContainer},{children:[o("div",e({className:g.mainWrapper},{children:be?o(R,{}):de?s("div",e({className:g.errorContainer},{children:[o("div",e({className:g.errorTitle},{children:"Error Loading Data"})),o("p",e({className:g.errorDesc},{children:de})),o("button",e({onClick:function(){return $e(!0)},className:g.tryAgainBtn},{children:"Try Again"}))]})):rn?o(v,{onOpenCreateModal:function(){return Se({isOpen:!0,type:"GLOBAL"})},onAddChild:function(e,n,t){return Se({isOpen:!0,type:n,parentId:e,parentName:t})},onRenameChild:function(e,n){return Se({isOpen:!0,type:"RENAME",scopeId:e,initialName:n})},onDeleteChild:function(e,n,o){return t(Z,void 0,void 0,function(){var t,s,i;return r(this,function(r){switch(r.label){case 0:return t=m.getState().scopeTreeData,s=j((null==t?void 0:t.data)||null,e),i=!!s&&3===s.length,0!==o?[3,2]:[4,en(e)];case 1:return r.sent(),[3,3];case 2:Se({isOpen:!0,type:"DELETE",scopeId:e,initialName:n,isSubscope:i}),r.label=3;case 3:return[2]}})})},canDeleteScope:function(e){return ze("ilotj.scope.delete",e)},canEditScope:function(e){return ze("ilotj.scope.edit",e)},canCreateScope:function(e){return ze("ilotj.scope.create",e)},onSectionSelect:function(e,n){var t;console.log("Section Selected:",{scopeId:e,sectionId:n}),A(((t={})[D.SECTION]="learnings"===n?null:n,t[D.RULESET_ID]=e,t)),De(n),ue(e)},activeSectionId:Ie,scopeTreeData:tn,sectionsConfig:cn,onViewStation:function(e){Me.current=ce,ke(e),De("learnings"),ue(e.stationId)},onRefreshRuleSets:function(e,n){void 0===e&&(e=!0),n&&(_e.current=n),$e(e)},nodeTypesConfig:sn,app_integration_id:ie,token:$.accessToken}):o(h,{onCreate:function(){return Se({isOpen:!0,type:"GLOBAL"})},title:"No Global Scope has been added!",desc:"Start by creating a Global scope to define base learnings that apply across all stations.",button:"Create Global Scope",canCreateRule:on,noAccessTitle:"Access Restricted",noAccessDesc:"You do not have access to create a Global scope for this application.",onRequestAccess:function(){return t(Z,void 0,void 0,function(){var e,n,t,s,i,a,l,c,u;return r(this,function(r){switch(r.label){case 0:if(!(e=(null===(s=null===(t=m.getState().scopeTreeData)||void 0===t?void 0:t.data)||void 0===s?void 0:s.id)||Oe))return null===(i=Ue.current)||void 0===i||i.show({severity:"error",sticky:!1,className:g.errorToast,content:o(z,{message:"Unable to identify the global scope for this access request."})}),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,I(e)];case 2:return r.sent(),null===(a=Ue.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:g.successToast,content:o(Q,{message:"Access request submitted successfully!"})}),[3,4];case 3:return n=r.sent(),null===(l=Ue.current)||void 0===l||l.show({severity:"error",sticky:!1,className:g.errorToast,content:o(z,{message:(null===(u=null===(c=null==n?void 0:n.response)||void 0===c?void 0:c.data)||void 0===u?void 0:u.detail)||"Failed to request access. Please try again."})}),[3,4];case 4:return[2]}})})}})})),o(f,{ref:Ue,pt:{root:{style:{zIndex:9999}}}}),le&&he.isOpen&&"DELETE"!==he.type&&"RENAME"!==he.type?o(_,{isOpen:!0,onClose:function(){return Se(e(e({},he),{isOpen:!1}))},onSubmit:function(n){return t(Z,void 0,void 0,function(){var t,o,s,i,a,l,c,u,d,p,f,g,v,h,S,y,b,E,L,I;return r(this,function(r){switch(r.label){case 0:Ee(!0),t=m.getState().backwardCompatibility,r.label=1;case 1:return r.trys.push([1,12,13,14]),o=void 0,t&&"object"==typeof n?o=n:(s=n,i="SCOPE"===he.type&&he.parentId,a=i?"genreRuleSet":he.type,o={topic:a,scope_reference_id:null,scopeDescription:"demo",parentScopeId:he.parentId||null,scopeName:s,scopeReferenceMetadata:{},applicationMappingId:ie}),[4,w(o,$.accessToken)];case 2:if(l=r.sent(),!(c=null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.scopeId))return[3,10];if(_e.current=c,u=t&&(null===(S=o.topic)||void 0===S?void 0:S.toLowerCase().includes("genre")),d=!t&&"GLOBAL"!==he.type&&he.parentId,!u&&!d)return[3,10];if(!(p=t?null===(b=null===(y=m.getState().scopeTreeData)||void 0===y?void 0:y.data)||void 0===b?void 0:b.id:he.parentId))return[3,10];if(!le)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,T({source_scope_id:p,target_scope_id:c})];case 4:return r.sent(),[3,6];case 5:return f=r.sent(),console.error("Failed to inherit rules for the new scope:",f),[3,6];case 6:return[3,10];case 7:return r.trys.push([7,9,,10]),[4,C({source_scope_id:p,target_scope_id:c,application_mapping_id:ie||"",is_copy_parent_variant_id:!1})];case 8:return r.sent(),[3,10];case 9:return g=r.sent(),console.error("Failed to inherit rules for the new scope:",g),[3,10];case 10:return[4,$e(!0)];case 11:return r.sent(),Se(function(n){return e(e({},n),{isOpen:!1})}),[3,14];case 12:throw v=r.sent(),console.error("An error occurred during scope creation.",v),null===(E=Ue.current)||void 0===E||E.show({severity:"error",summary:"Creation Failed",detail:(null===(I=null===(L=null==v?void 0:v.response)||void 0===L?void 0:L.data)||void 0===I?void 0:I.message)||"There was an error creating the scope. Please try again."}),v;case 13:return Ee(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:rn,canCreateGlobal:on,globalScopeId:null!==(X=null===(J=null==fe?void 0:fe.data)||void 0===J?void 0:J.id)&&void 0!==X?X:null}):s(i,{children:[o(F,{isOpen:he.isOpen&&"DELETE"!==he.type&&"RENAME"!==he.type,onClose:function(){return Se(e(e({},he),{isOpen:!1}))},onCreate:function(e){e&&(_e.current=e),$e(!0)},hasGlobalRuleSet:rn,parentId:he.parentId}),o(K,{isOpen:he.isOpen&&"RENAME"===he.type,onClose:function(){return Se(e(e({},he),{isOpen:!1}))},onSave:function(n){return t(Z,void 0,void 0,function(){var t,s,i,a;return r(this,function(r){switch(r.label){case 0:Ee(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),he.scopeId?[4,E({scope_id:he.scopeId,scope_name:n})]:[2];case 2:return r.sent(),[4,$e(!0)];case 3:return r.sent(),Se(function(n){return e(e({},n),{isOpen:!1})}),[3,6];case 4:throw t=r.sent(),console.error("An error occurred during scope rename.",t),null===(s=Ue.current)||void 0===s||s.show({severity:"error",sticky:!1,className:g.errorToast,content:o(z,{message:(null===(a=null===(i=null==t?void 0:t.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)||"There was an error renaming the scope. Please try again."})}),t;case 5:return Ee(!1),[7];case 6:return[2]}})})},initialName:he.initialName})]}),o(O,{isOpen:he.isOpen&&"DELETE"===he.type,onCancel:function(){return Se(e(e({},he),{isOpen:!1}))},onConfirm:function(){return en(he.scopeId,he.initialName,he.isSubscope)},title:"Delete Scope",description:s(i,{children:["Deleting ",o("span",e({className:g.highlight},{children:he.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:we})]}))})}console.log("learningstest",V("middleDrawer.treeMenu.submenu.learnings"));export{W as default};
1
+ import{__assign as e,__spreadArray as n,__awaiter as t,__generator as r}from"tslib";import{jsx as o,jsxs as i,Fragment as s}from"react/jsx-runtime";import{useState as a,useRef as l,useCallback as c,useEffect as u}from"react";import{applyAxiosConfig as d}from"../../api/transport.js";import{BookOpen as p,Users as m,History as f}from"lucide-react";import{useLearningTemplateStore as v}from"./store/useLearningTemplateStore.js";import{Toast as g}from"primereact/toast";import h from"./styles/LearningTemplateManagement.module.css.js";import S from"./LearningTemplateLayout.js";import y from"./components/EmptyLearningState.js";import C from"./store/useAuthStore.js";import{fetchTiers as b,getILInstance as T,fetchScopes as I,inheritScope as L,inheritScopeBackwardCompatible as A,createRuleSet as E,renameScope as R,deleteRuleSet as O,requestAccess as w}from"./apis/scopeApis.js";import{useRuleTemplateQueryParams as j,setQueryParams as M,QUERY_PARAM_KEYS as N}from"./hooks/useLearningTemplateQueryParams.js";import _ from"./components/ConfirmationModal.js";import D from"./components/LearningTemplateManagementSkeleton.js";import{findNodePathById as k,findNodeById as P}from"./utils/treeUtils.js";import B from"./store/useEnvStore.js";import{useConfigStore as U}from"./store/useConfigStore.js";import{TooltipProvider as q}from"./components/ToolTip.js";import G from"./components/CreateRuleSetLegacyModal.js";import{usePermissionsStore as F}from"./store/usePermissionsStore.js";import{useAppSecRolesStore as x}from"./store/useAppSecRolesStore.js";import{useGetAppSecRolesQuery as H}from"./queries/useApprovalQueries.js";import{useLMSConfigQuery as Q}from"./queries/useLMSConfigQuery.js";import z from"./RuleContent/AddScopeModal.js";import K from"./components/RuleContentSkeleton.js";import V from"./components/ErrorStateDisplay.js";import{useLocation as W,useSearchParams as Y}from"react-router-dom";import J from"./shared/SuccessToastContent.js";import X from"./shared/ErrorToastContent.js";import Z from"./RuleContent/RenameScopeModal.js";import{dt as $,useLMSConfigStore as ee}from"./store/useLMSConfigStore.js";import{MIDDLE_DRAWER_DT_PATH as ne,MIDDLE_DRAWER_CONTEXT_MENU_DT_PATH as te,EMPTY_STATE_DT_PATH as re}from"./constants.js";function oe(oe){var ie,se,ae,le,ce,ue,de,pe,me,fe,ve,ge=this,he=oe.userDetails,Se=oe.llmStudioUrl,ye=oe.audacyBackendUrl,Ce=oe.ilLabels,be=oe.config,Te=oe.rbacConfig,Ie=oe.auditLogConfig,Le=oe.app_integration_id,Ae=oe.backwardCompatibility,Ee=void 0!==Ae&&Ae,Re=oe.cognitiveCompareCompatibility,Oe=void 0!==Re&&Re,we=oe.modeId,je=oe.modeDetails,Me=oe.pluginPayload,Ne=oe.axiosConfig,_e=oe.isILMarketplace,De=oe.guidelineContentProps,ke=oe.treeOverrides,Pe=oe.selectionMode,Be=void 0!==Pe&&Pe;d(Ne);var Ue=[{id:"learnings",label:$("".concat(ne,".treeMenu.submenu.learnings"),"Learnings"),icon:p,badgeKey:"learningsCount"},{id:"access",label:$("".concat(ne,".treeMenu.submenu.access"),"Access"),icon:m},{id:"history",label:$("".concat(ne,".treeMenu.submenu.changeHistory"),"Change History"),icon:f}],qe=(null==ke?void 0:ke.sectionsConfig)?ke.sectionsConfig.filter(function(e){return Ue.some(function(n){return n.id===e.id})}):Ue,Ge=new Set(qe.map(function(e){return e.id})),Fe=null!==(se=null===(ie=qe[0])||void 0===ie?void 0:ie.id)&&void 0!==se?se:"learnings",xe=j().clearLearningParams,He=v(function(e){return e.selectedRuleSetId}),Qe=v(function(e){return e.setSelectedRuleSetId}),ze=v(function(e){return e.setIlInstanceId}),Ke=v(function(e){return e.error}),Ve=v(function(e){return e.setError}),We=v(function(e){return e.setStations}),Ye=v(function(e){return e.scopeTreeData}),Je=v(function(e){return e.setScopeTreeData}),Xe=a({isOpen:!1,type:"GLOBAL"}),Ze=Xe[0],$e=Xe[1],en=a(!1),nn=en[0],tn=en[1],rn=a(!1),on=rn[0],sn=rn[1],an=a(Fe),ln=an[0],cn=an[1],un=a(null),dn=un[0],pn=un[1],mn=a(!1),fn=mn[0],vn=mn[1],gn=a(null),hn=gn[0];gn[1];var Sn=a(!1),yn=Sn[0],Cn=Sn[1],bn=a(!1),Tn=bn[0],In=bn[1];l(null);var Ln=l(null),An=l(!1),En=l(null),Rn=C();Rn.user;var On=Rn.setUser,wn=U(),jn=wn.setConfig,Mn=wn.setIlLabels,Nn=function(){try{return W()}catch(e){return{search:""}}}(),_n=function(){try{return Y()[1]}catch(e){return null}}(),Dn=c(function(e){if(_n){var n=new URLSearchParams(window.location.search);Object.entries(e).forEach(function(e){var t=e[0],r=e[1];null==r||""===r?n.delete(t):n.set(t,r)}),_n(n,{replace:!0})}else M(e)},[_n]);u(function(){if(!An.current){var e=new URLSearchParams(window.location.search),n=e.get(N.RULESET_ID),t=e.get(N.SECTION),r=t&&(null==Ge?void 0:Ge.has(t))?t:Fe;(null==n?void 0:n.length)&&Qe&&cn&&(Qe(n),cn(r),An.current=!0)}},[null==Nn?void 0:Nn.search,cn,Qe]),u(function(){return function(){xe()}},[xe]),u(function(){var e;He&&Dn(((e={})[N.RULESET_ID]=He,e))},[He,Dn]),u(function(){var n;(null==Me?void 0:Me.learningManagement)&&ee.getState().setLMSConfig(e(e({},Me.learningManagement),{agents:null!==(n=Me.agents)&&void 0!==n?n:{}}))},[Me]);var kn=F(function(e){return e.fetchPermissions}),Pn=F(function(e){return e.hasPermission}),Bn=x(function(e){return e.setRoles}),Un=B(function(e){return e.appsecRbacUrl})===Te.appsecRbacUrl,qn=H(Te.applicationId,Un).data,Gn=Q(null!=Le?Le:"",Ee),Fn=Gn.isLoading,xn=Gn.isError,Hn=Gn.refetch;Gn.isSuccess;var Qn=a(0),zn=Qn[0],Kn=Qn[1];u(function(){if(!Ee&&Le&&Se){t(ge,void 0,void 0,function(){var e,n,t,o,i,s,a;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,T(Le)];case 1:return e=r.sent(),(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.ILInstanceId)&&ze(e.data.ILInstanceId),"number"==typeof(n=null===(a=null===(s=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.learningManagement)||void 0===s?void 0:s.scopeAndHierarchy)||void 0===a?void 0:a.maxHierarchyLevels)&&n>0&&Kn(n-1),[3,3];case 2:return t=r.sent(),console.error("Failed to fetch IL instance for hierarchy levels:",t),[3,3];case 3:return[2]}})})}},[Le,Se]),u(function(){qn&&Bn(qn.map(function(e){return{_id:e._id,name:e.name}}))},[qn,Bn]),u(function(){var e;console.log("userDetails",he),On(he),console.log("llmStudioUrl",Se),console.log("audacyBackendUrl",ye),B.getState().setLlmStudioUrl(Se),B.getState().setAudacyBackendUrl(ye),B.getState().setRbacConfig(Te),B.getState().setAuditLogConfig(Ie),B.getState().setBaseModeName((null==je?void 0:je.modeNameFromURL)||null),jn(be),Mn(Ce),v.getState().setAppIntegrationId(null!=Le?Le:null),v.getState().setBackwardCompatibility(Ee),v.getState().setCognitiveCompareCompatibility(null!=Oe&&Oe),v.getState().setIsILMarketplace(null!=_e&&_e),v.getState().setToken(null!==(e=null==he?void 0:he.accessToken)&&void 0!==e?e:null)},[he,On,Se,ye,Te,Ie,be,jn,Ce,Mn,Le,Ee,Oe,_e,je]),u(function(){(null==he?void 0:he.accessToken)&&Se&&(_e||b())},[Le,null==he?void 0:he.accessToken,Se,_e]);var Vn=function(n){return void 0===n&&(n=!0),t(ge,void 0,void 0,function(){var t,o,i,s,a,l,c,u,d,p,m,f;return r(this,function(r){switch(r.label){case 0:n&&tn(!0),Ve(null),r.label=1;case 1:return r.trys.push([1,7,8,9]),[4,kn(Te.applicationId)];case 2:r.sent(),t=function(n){var r=F.getState().hasPermission("ilotj.scope.view",n.id),o=n.children?n.children.map(function(e){return t(e)}).filter(function(e){return null!==e}):[];return r||0!==o.length?e(e({},n),{hasAccess:r,children:o}):null},o=void 0,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,I(Le,he.accessToken)];case 4:return o=r.sent(),[3,6];case 5:if(i=r.sent(),403===(null===(m=null==i?void 0:i.response)||void 0===m?void 0:m.status))return Je(null),pn(Te.applicationResourceId||null),vn(!0),[2];throw i;case 6:return o&&o.data&&o.data.data&&(s=o.data.data,Array.isArray(s)&&(s=s.length>0?s[0]:null),s?(a=t(s))?(pn(null),vn(!1),Je({data:a}),Ln.current?(Qe(Ln.current),cn(Fe),Ln.current=null):(l=v.getState().selectedRuleSetId,c=l?P(a,l):null,l&&c||(u=function(e){if(e.hasAccess)return e;for(var n=0,t=e.children||[];n<t.length;n++){var r=t[n],o=u(r);if(o)return o}return null},d=u(a),Qe(d?d.id:a.id)))):(pn(null!==(f=s.id)&&void 0!==f?f:null),vn(!1),Je(null)):(pn(null),vn(!1),Je(null))),[3,9];case 7:return p=r.sent(),console.error("Failed to fetch rule sets or permissions",p),Ve("Failed to load data. Please try again later."),[3,9];case 8:return tn(!1),[7];case 9:return[2]}})})};u(function(){var e;(null===(e=null==he?void 0:he.accessToken)||void 0===e?void 0:e.length)&&Un?Vn(!0):console.warn("Error: Trying to fetch rules without access token",he)},[null==he?void 0:he.accessToken,Ve,We,Te.applicationId,Un]);var Wn=function(n,o,i){return t(ge,void 0,void 0,function(){var t,o,i,s,a,l,c,u;return r(this,function(r){switch(r.label){case 0:sn(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,O(n,he.accessToken)];case 2:return r.sent(),v.getState().selectedRuleSetId===n&&(t=v.getState().scopeTreeData,(o=k((null==t?void 0:t.data)||null,n))&&o.length>1&&(i=o[o.length-2],Qe(i),cn(Fe))),[4,Vn(!0)];case 3:return r.sent(),$e(function(n){return e(e({},n),{isOpen:!1})}),null===(a=En.current)||void 0===a||a.show({severity:"success",summary:"Deleted Successfully",detail:"The scope was permanently removed."}),[3,6];case 4:return s=r.sent(),console.error("An error occurred during scope deletion.",s),null===(l=En.current)||void 0===l||l.show({severity:"error",summary:"Delete Failed",detail:(null===(u=null===(c=null==s?void 0:s.response)||void 0===c?void 0:c.data)||void 0===u?void 0:u.message)||"There was an error deleting the scope. Please try again."}),[3,6];case 5:return sn(!1),[7];case 6:return[2]}})})},Yn=Ye,Jn=hn?{data:{id:hn.stationId,name:hn.stationName,type:"STATION",metrics:{learningsCount:hn.learningsCount,stationsCount:0},children:[]}}:Yn,Xn=!!(null==Jn?void 0:Jn.data);null===(ae=null==Jn?void 0:Jn.data)||void 0===ae||ae.type;var Zn=F(function(e){return e.hasGlobalPermission})("ilotj.scope.global.create",Te.applicationResourceId||""),$n=function(e){return t(ge,void 0,void 0,function(){var n,t,i,s,a,l,c,u,d,p;return r(this,function(r){switch(r.label){case 0:if(!(n="string"==typeof e?e:(null===(l=null===(a=v.getState().scopeTreeData)||void 0===a?void 0:a.data)||void 0===l?void 0:l.id)||dn)&&!fn)return null===(c=En.current)||void 0===c||c.show({severity:"error",sticky:!1,className:h.errorToast,content:o(X,{message:"Unable to identify the global scope for this access request."})}),[2];Cn(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,w(n,fn)];case 2:return r.sent(),In(!0),null===(u=En.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:h.successToast,content:o(J,{message:"Access request submitted successfully!"})}),[3,5];case 3:return t=r.sent(),i=null===(d=null==t?void 0:t.response)||void 0===d?void 0:d.data,s="GLOBAL_SCOPE_NOT_FOUND"===(null==i?void 0:i.code)?"Unable to identify the global scope for this access request.":(null==i?void 0:i.detail)||(null==i?void 0:i.message)||"Failed to request access. Please try again.",null===(p=En.current)||void 0===p||p.show({severity:"error",sticky:!1,className:h.errorToast,content:o(X,{message:s})}),[3,5];case 4:return Cn(!1),[7];case 5:return[2]}})})};if(Fn)return o("div",e({className:h.learningManagementContainer},{children:o(K,{})}));if(xn)return o("div",e({className:h.learningManagementContainer},{children:o(V,{errorMessage:"Failed to load configuration. Please try again.",onRetry:function(){return Hn()},title:"Error Loading Configuration"})}));var et=n(n([{type:"GLOBAL",label:"Global",addChildLabel:"".concat($("".concat(ne,".addScope"),"Add Scope")),addChildType:"SCOPE"}],Array.from({length:zn},function(){return e({type:"SCOPE",label:$("".concat(ne,".scope"),"Scope")},!Ee&&{addChildLabel:$("".concat(te,".addSubScope"),"Add Subscope"),addChildType:"SUBSCOPE"})}),!0),Ee?[]:[{type:"SUBSCOPE",label:$("".concat(ne,".subScope"),"Subscope")}],!0),nt=Be?Ue.filter(function(e){return"learnings"===e.id}):Ue,tt=hn?nt.filter(function(e){return"stations"!==e.id}):nt,rt=function(e,n){void 0===e&&(e=!0),n&&(Ln.current=n),Vn(e)},ot=function(){return rt(!0)},it=null!==(le=null==ke?void 0:ke.nodeTypesConfig)&&void 0!==le?le:et,st=(null==ke?void 0:ke.onOpenCreateModal)?function(){return ke.onOpenCreateModal(ot)}:function(){return $e({isOpen:!0,type:"GLOBAL"})},at=(null==ke?void 0:ke.onAddChild)?function(e,n,t){return ke.onAddChild(e,n,t,ot)}:function(e,n,t){return $e({isOpen:!0,type:n,parentId:e,parentName:t})},lt=(null==ke?void 0:ke.onRenameChild)?function(e,n){return ke.onRenameChild(e,n,ot)}:function(e,n){return $e({isOpen:!0,type:"RENAME",scopeId:e,initialName:n})},ct=(null==ke?void 0:ke.onDeleteChild)?function(e,n,t){return ke.onDeleteChild(e,n,t,ot)}:function(e,n,o){return t(ge,void 0,void 0,function(){var t,i,s;return r(this,function(r){switch(r.label){case 0:return t=v.getState().scopeTreeData,i=k((null==t?void 0:t.data)||null,e),s=!!i&&3===i.length,0!==o?[3,2]:[4,Wn(e)];case 1:return r.sent(),[3,3];case 2:$e({isOpen:!0,type:"DELETE",scopeId:e,initialName:n,isSubscope:s}),r.label=3;case 3:return[2]}})})},ut=null!==(ce=null==ke?void 0:ke.onSectionSelect)&&void 0!==ce?ce:function(e,n){var t;console.log("Section Selected:",{scopeId:e,sectionId:n}),Dn(((t={})[N.SECTION]=n===Fe?null:n,t)),cn(n),Qe(e),In(!1)},dt=null!==(ue=null==ke?void 0:ke.onRefreshRuleSets)&&void 0!==ue?ue:rt,pt=null!==(de=null==ke?void 0:ke.canCreateScope)&&void 0!==de?de:function(e){return Pn("ilotj.scope.create",e)},mt=null!==(pe=null==ke?void 0:ke.canEditScope)&&void 0!==pe?pe:function(e){return Pn("ilotj.scope.edit",e)},ft=null!==(me=null==ke?void 0:ke.canDeleteScope)&&void 0!==me?me:function(e){return Pn("ilotj.scope.delete",e)};return o(q,{children:i("div",e({className:[h.learningManagementContainer,Be&&h.selectionMode].filter(Boolean).join(" ")},{children:[o("div",e({className:h.mainWrapper},{children:nn?o(D,{}):Ke?i("div",e({className:h.errorContainer},{children:[o("div",e({className:h.errorTitle},{children:"Error Loading Data"})),o("p",e({className:h.errorDesc},{children:Ke})),o("button",e({onClick:function(){return Vn(!0)},className:h.tryAgainBtn},{children:"Try Again"}))]})):Xn?o(S,{onOpenCreateModal:st,onAddChild:at,onRenameChild:lt,onDeleteChild:ct,canDeleteScope:ft,canEditScope:mt,canCreateScope:pt,onSectionSelect:ut,activeSectionId:ln,scopeTreeData:Jn,sectionsConfig:tt,onViewStation:function(e){ut(e.stationId,Fe)},onRefreshRuleSets:dt,nodeTypesConfig:it,app_integration_id:Le,token:he.accessToken,modeId:we,onRequestAccess:$n,isRequestingAccess:yn,isAccessRequested:Tn,selectionMode:Be,isILMarketplace:_e,guidelineContentProps:De}):o(y,{onCreate:function(){return $e({isOpen:!0,type:"GLOBAL"})},title:$("".concat(re,".title"),"No Global Scope has been added!"),desc:$("".concat(re,".desc"),"Start by creating a Global scope to define base learnings that apply across all stations."),button:$("".concat(re,".createGlobalScope"),"Create Global Scope"),canCreateRule:Zn,noAccessTitle:$("".concat(re,".noAccessTitle"),"Access Restricted"),noAccessDesc:$("".concat(re,".noAccessDesc"),"You do not have access for this application."),requestAccessButton:$("".concat(re,".requestAccessButton"),"Request Access"),requestSentButton:$("".concat(re,".requestSentButton"),"Request Sent"),onRequestAccess:$n,isRequestingAccess:yn,isAccessRequested:Tn})})),o(g,{ref:En,pt:{root:{style:{zIndex:9999}}}}),Ee&&Ze.isOpen&&"DELETE"!==Ze.type&&"RENAME"!==Ze.type?o(G,{isOpen:!0,onClose:function(){return $e(e(e({},Ze),{isOpen:!1}))},onSubmit:function(n){return t(ge,void 0,void 0,function(){var t,o,i,s,a,l,c,u,d,p,m,f,g,h,S,y,C,b,T,I;return r(this,function(r){switch(r.label){case 0:sn(!0),t=v.getState().backwardCompatibility,r.label=1;case 1:return r.trys.push([1,12,13,14]),o=void 0,t&&"object"==typeof n?o=n:(i=n,s="SCOPE"===Ze.type&&Ze.parentId,a=s?"genreRuleSet":Ze.type,o={topic:a,scope_reference_id:null,scopeDescription:"demo",parentScopeId:Ze.parentId||null,scopeName:i,scopeReferenceMetadata:{},applicationMappingId:Le}),[4,E(o,he.accessToken)];case 2:if(l=r.sent(),!(c=null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.scopeId))return[3,10];if(Ln.current=c,u=t&&(null===(S=o.topic)||void 0===S?void 0:S.toLowerCase().includes("genre")),d=!t&&"GLOBAL"!==Ze.type&&Ze.parentId,!u&&!d)return[3,10];if(!(p=t?null===(C=null===(y=v.getState().scopeTreeData)||void 0===y?void 0:y.data)||void 0===C?void 0:C.id:Ze.parentId))return[3,10];if(!Ee)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,A({source_scope_id:p,target_scope_id:c})];case 4:return r.sent(),[3,6];case 5:return m=r.sent(),console.error("Failed to inherit rules for the new scope:",m),[3,6];case 6:return[3,10];case 7:return r.trys.push([7,9,,10]),[4,L({source_scope_id:p,target_scope_id:c,application_mapping_id:Le||"",is_copy_parent_variant_id:!1})];case 8:return r.sent(),[3,10];case 9:return f=r.sent(),console.error("Failed to inherit rules for the new scope:",f),[3,10];case 10:return[4,Vn(!0)];case 11:return r.sent(),$e(function(n){return e(e({},n),{isOpen:!1})}),[3,14];case 12:throw g=r.sent(),console.error("An error occurred during scope creation.",g),null===(b=En.current)||void 0===b||b.show({severity:"error",summary:"Creation Failed",detail:(null===(I=null===(T=null==g?void 0:g.response)||void 0===T?void 0:T.data)||void 0===I?void 0:I.message)||"There was an error creating the scope. Please try again."}),g;case 13:return sn(!1),[7];case 14:return[2]}})})},hasGlobalRuleSet:Xn,canCreateGlobal:Zn,globalScopeId:null!==(ve=null===(fe=null==Ye?void 0:Ye.data)||void 0===fe?void 0:fe.id)&&void 0!==ve?ve:null}):i(s,{children:[o(z,{isOpen:Ze.isOpen&&"DELETE"!==Ze.type&&"RENAME"!==Ze.type,onClose:function(){return $e(e(e({},Ze),{isOpen:!1}))},onCreate:function(e){e&&(Ln.current=e),Vn(!0)},hasGlobalRuleSet:Xn,parentId:Ze.parentId,parentName:Ze.parentName,childType:"SUBSCOPE"===Ze.type?"SUBSCOPE":"SCOPE",isILMarketplace:_e}),o(Z,{isOpen:Ze.isOpen&&"RENAME"===Ze.type,onClose:function(){return $e(e(e({},Ze),{isOpen:!1}))},onSave:function(n){return t(ge,void 0,void 0,function(){var t,i,s,a,l,c;return r(this,function(r){switch(r.label){case 0:sn(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),Ze.scopeId?(t=v.getState().backwardCompatibility,i=t?{scope_id:Ze.scopeId,scope_name:n}:{scope_id:Ze.scopeId,scope_type:"Custom",scope_name:n,application_mapping_id:Le},[4,R(i,he.accessToken)]):[2];case 2:return r.sent(),[4,Vn(!0)];case 3:return r.sent(),$e(function(n){return e(e({},n),{isOpen:!1})}),[3,6];case 4:throw s=r.sent(),console.error("An error occurred during scope rename.",s),null===(a=En.current)||void 0===a||a.show({severity:"error",sticky:!1,className:h.errorToast,content:o(X,{message:(null===(c=null===(l=null==s?void 0:s.response)||void 0===l?void 0:l.data)||void 0===c?void 0:c.message)||"There was an error renaming the scope. Please try again."})}),s;case 5:return sn(!1),[7];case 6:return[2]}})})},initialName:Ze.initialName})]}),o(_,{isOpen:Ze.isOpen&&"DELETE"===Ze.type,onCancel:function(){return $e(e(e({},Ze),{isOpen:!1}))},onConfirm:function(){return Wn(Ze.scopeId,Ze.initialName,Ze.isSubscope)},title:"Delete Scope",description:i(s,{children:["Deleting ",o("span",e({className:h.highlight},{children:Ze.initialName||"this scope"}))," will permanently remove all Learnings, Access rules, and Change History inside it. This cannot be undone."]}),confirmText:"Delete",confirmBgColor:"#EF4444",isLoading:on})]}))})}export{oe as default};
2
2
  //# sourceMappingURL=LearningManagement.js.map
@@ -0,0 +1,2 @@
1
+ import"tslib";import"react/jsx-runtime";import"react";import"../../api/transport.js";import"lucide-react";import"./store/useLearningTemplateStore.js";import"primereact/toast";import"./apis/scopeApis.js";import"./store/usePermissionsStore.js";import"./store/useLMSConfigStore.js";import"./components/ToolTip.js";import"./store/useAuthStore.js";import"@mui/material";import"@mui/icons-material/Check";import"@mui/icons-material/CloseRounded";import{QueryClient as t}from"@tanstack/react-query";import"./store/useEnvStore.js";import"date-fns/format";import"date-fns/isValid";import"date-fns/parseISO";import"framer-motion";import"../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../IL-OTJ/_components/InputDataReasoningCard.js";import"../IL-OTJ/_components/TooltipComponent.js";import"../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../IL-OTJ/store/CitationsContext.js";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"react-icons/bs";import"@radix-ui/react-tooltip";import"react-dom";import"../IL-marketplace/components/GuidelineIconButton.js";import"axios";import"appsec-ui";import"../IL-marketplace/queryClient.js";import"./store/useExternalWorkflowStore.js";import"./store/useAppSecRolesStore.js";import"@e-llm-studio/creative-workspace-ui-component";import"../IL-marketplace/components/LearningManagementWrapper.js";import"../IL-marketplace/store/usePublishTemplateStore.js";import"../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import"../IL-marketplace/workspace/workspace.context.js";import"./store/useConfigStore.js";import"./components/StationOnboarding/InputField.js";import"./config.js";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"./AuditLog/ChangeLogDiff.js";import"./hooks/useLearningTemplateQueryParams.js";import"react-router-dom";new t;
2
+ //# sourceMappingURL=LearningManagementTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LearningManagementTest.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as o,jsx as n}from"react/jsx-runtime";import t from"./RuleContent/RuleContent.js";import i from"./StationsContent/StationsContent.js";import a from"./RBAC/AccessManagementPanel.js";import"appsec-ui";import"./store/useAuthStore.js";import"./store/usePermissionsStore.js";import r from"./store/useEnvStore.js";import s from"./styles/LearningTemplateLayout.module.css.js";import{findNodeById as l}from"./utils/treeUtils.js";import d from"./SidebarWrapper.js";import{useLearningTemplateStore as c}from"./store/useLearningTemplateStore.js";import u from"./components/StationOnboarding/StationOnboardModal.js";import p from"./AuditLog/AuditLog.js";var m=function(m){var f,S,C=m.onOpenCreateModal,v=m.onRefreshRuleSets,g=m.scopeTreeData,h=m.onAddChild,R=m.onRenameChild,j=m.onDeleteChild,A=m.canDeleteScope,D=m.canEditScope,I=m.canCreateScope,M=m.onSectionSelect,O=m.onViewStation,w=m.activeSectionId,y=void 0===w?"learnings":w,L=m.sectionsConfig,T=m.nodeTypesConfig,_=m.app_integration_id,k=m.token,b=c(function(e){return e.isStationModalOpen}),N=c(function(e){return e.setStationModalOpen}),x=c(function(e){return e.selectedRuleSetId}),B=c(function(e){return e.rawAuditRuleData}),E=r(function(e){return e.auditLogConfig});c(function(e){return e.ruleData});var U=x?l((null==g?void 0:g.data)||null,x):null;return Boolean((null===(f=null==g?void 0:g.data)||void 0===f?void 0:f.id)&&x===g.data.id),o("div",e({className:s.container},{children:[n(d,{onOpenCreateModal:C,onRefreshRuleSets:v,scopeTreeData:g,onAddChild:h,onRenameChild:R,onDeleteChild:j,canDeleteScope:A,canEditScope:D,canCreateScope:I,onSectionSelect:M,activeSectionId:y,sectionsConfig:L,nodeTypesConfig:T}),n("div",e({id:"rule-template-layout-content",className:"".concat(s.content," relative flex-1 overflow-hidden")},{children:"stations"===y?n(i,{scopeId:x||"",scopeName:(null==U?void 0:U.name)||"Unknown Scope",stationsCount:null===(S=null==U?void 0:U.metrics)||void 0===S?void 0:S.stationsCount,onViewStation:O}):"access"===y?n(a,{selectedRuleSetId:x,useApplicationModuleForScopeAccess:!1}):"history"===y?(null==E?void 0:E.configId)?n(p,{configId:E.configId,scopeId:x||void 0,scopeName:(null==U?void 0:U.name)||"Unknown Scope",ruleData:B}):null:n(t,{onRefreshRuleSets:v,app_integration_id:_,token:k})})),n(u,{isOpen:b,onClose:function(){N(!1)},onBoardStation:function(e){v(!0,e)},app_integration_id:_,token:k})]}))};export{m as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useEffect as n}from"react";import i from"./RuleContent/RuleContent.js";import s from"./StationsContent/StationsContent.js";import c from"./RBAC/AccessManagementPanel.js";import"appsec-ui";import"../../api/transport.js";import"./store/useAuthStore.js";import"./store/usePermissionsStore.js";import{useLearningTemplateStore as r}from"./store/useLearningTemplateStore.js";import a from"./store/useEnvStore.js";import l from"./styles/LearningTemplateLayout.module.css.js";import{findNodeById as d,mapScopeChildrenToStations as u}from"./utils/treeUtils.js";import p from"./SidebarWrapper.js";import m from"./components/StationOnboarding/StationOnboardModal.js";import f from"./AuditLog/AuditLog.js";import S from"./components/EmptyLearningState.js";import{dt as v}from"./store/useLMSConfigStore.js";import{EMPTY_STATE_DT_PATH as g}from"./constants.js";import{GuidelineLibraryContent as C}from"../IL-marketplace/components/GuidelineLibraryContent.js";var A=function(A){var R,h,j=A.onOpenCreateModal,I=A.onRefreshRuleSets,q=A.scopeTreeData,D=A.onAddChild,M=A.onRenameChild,L=A.onDeleteChild,T=A.canDeleteScope,w=A.canEditScope,O=A.canCreateScope,b=A.onSectionSelect,k=A.onViewStation,y=A.activeSectionId,B=void 0===y?"learnings":y,_=A.sectionsConfig,N=A.nodeTypesConfig,E=A.app_integration_id,U=A.token,x=A.modeId,P=A.onRequestAccess,V=A.isRequestingAccess,Y=A.isAccessRequested,G=A.selectionMode,W=void 0!==G&&G,z=A.isILMarketplace,F=A.children,H=A.guidelineContentProps,J=r(function(e){return e.isStationModalOpen}),K=r(function(e){return e.setStationModalOpen}),Q=r(function(e){return e.isStationOnboardModalTriggered}),X=r(function(e){return e.setIsStationOnboardModalTriggered}),Z=r(function(e){return e.selectedRuleSetId}),$=r(function(e){return e.rawAuditRuleData}),ee=a(function(e){return e.auditLogConfig});r(function(e){return e.ruleData});var te=Z?d((null==q?void 0:q.data)||null,Z):null;return Boolean((null===(R=null==q?void 0:q.data)||void 0===R?void 0:R.id)&&Z===q.data.id),n(function(){Q&&K(!0)},[Q,K,X]),t("div",e({className:"".concat(l.container," ").concat(W?l.containerSelectionMode:"")},{children:[o(p,{onOpenCreateModal:j,onRefreshRuleSets:I,scopeTreeData:q,onAddChild:D,onRenameChild:M,onDeleteChild:L,canDeleteScope:T,canEditScope:w,canCreateScope:O,onSectionSelect:b,activeSectionId:B,sectionsConfig:_,nodeTypesConfig:N}),o("div",e({id:"rule-template-layout-content",className:"".concat(l.content," relative flex-1 overflow-hidden")},{children:"stations"===B?o(s,{scopeId:Z||"",scopeName:(null==te?void 0:te.name)||"Unknown Scope",stationsCount:null===(h=null==te?void 0:te.metrics)||void 0===h?void 0:h.stationsCount,stations:u(te),onViewStation:k}):"access"===B?o(c,{selectedRuleSetId:Z,scopeName:(null==te?void 0:te.name)||"Unknown Scope"}):"history"===B?(null==ee?void 0:ee.configId)?o(f,{configId:ee.configId,scopeId:Z||void 0,scopeName:(null==te?void 0:te.name)||"Unknown Scope",ruleData:$}):null:te&&!1===te.hasAccess?o(S,{onCreate:function(){},title:v("".concat(g,".noAccessTitle"),"Access Restricted"),desc:v("".concat(g,".noAccessDesc"),"You do not have access to view this ".concat(null==te?void 0:te.name," learnings.")),button:"",canCreateRule:!1,noAccessTitle:v("".concat(g,".noAccessTitle"),"Access Restricted"),noAccessDesc:v("".concat(g,".noAccessDesc"),"You do not have access to view this ".concat(null==te?void 0:te.name," learnings.")),requestAccessButton:v("".concat(g,".requestAccessButton"),"Request Access"),requestSentButton:v("".concat(g,".requestSentButton"),"Request Sent"),onRequestAccess:function(){return null==P?void 0:P(Z)},isRequestingAccess:V,isAccessRequested:Y}):F||(z?H?o(C,e({},H)):null:o(i,{onRefreshRuleSets:I,app_integration_id:E,token:U,modeId:x}))})),o(m,{isOpen:J,onClose:function(){K(!1),X(!1)},onBoardStation:function(e){I(!0,e)},app_integration_id:E,token:U})]}))};export{A as default};
2
2
  //# sourceMappingURL=LearningTemplateLayout.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as c,jsx as s}from"react/jsx-runtime";import{useState as o}from"react";import a from"./AccessPanel.js";import t from"../store/useEnvStore.js";import{usePermissionsStore as i}from"../store/usePermissionsStore.js";import l from"./AccessPanel.module.css.js";import{dt as n}from"../store/useLMSConfigStore.js";var r=function(r){var p=r.selectedRuleSetId,d=r.useApplicationModuleForScopeAccess,u=void 0!==d&&d,m=o("scope"),v=m[0],b=m[1],f=t(function(e){return e.rbacConfig}),A=i(function(e){return e.hasPermission}),I=null==f?void 0:f.applicationResourceId,S=(null==f?void 0:f.applicationModuleId)||(null==f?void 0:f.moduleId),h=u?S:null==f?void 0:f.moduleId,j=Boolean(I&&A("ilotj.scope.access.application.view",I));return c("div",e({className:l.accessManagement},{children:[c("div",e({className:l.accessTabs,role:"tablist","aria-label":"Access level"},{children:[s("button",e({type:"button",role:"tab","aria-selected":"scope"===v,className:"".concat(l.accessTab," ").concat("scope"===v?l.accessTabActive:""),onClick:function(){return b("scope")}},{children:n("access.scopeLevelAccess","Scope Level Access")})),s("button",e({type:"button",role:"tab","aria-selected":"application"===v,className:"".concat(l.accessTab," ").concat("application"===v?l.accessTabActive:""),onClick:function(){return b("application")},disabled:!j,title:j?"":"You don't have permission to view application access"},{children:n("access.appLevelAccess","Application Level Access")}))]})),s("div",e({className:l.accessTabPanel,role:"tabpanel"},{children:s(a,"application"===v?{resourceId:I,moduleId:S,accessLevel:"application"}:{ruleSetId:p,moduleId:h,accessLevel:"scope"})}))]}))};export{r as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import n from"./AccessPanel.js";import i from"../store/useEnvStore.js";import s from"./AccessPanel.module.css.js";import{dt as l}from"../store/useLMSConfigStore.js";var r=function(r){var a=r.selectedRuleSetId,c=r.scopeName,d=(null==c?void 0:c.trim())||"Selected",m=i(function(e){return e.rbacConfig});(null==m?void 0:m.applicationModuleId)||null==m||m.moduleId;var p=null==m?void 0:m.moduleId;return t("div",e({className:s.accessManagement},{children:[o("div",e({style:{padding:"24px 24px 0",fontFamily:"Arial, sans-serif"}},{children:t("div",e({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[o("h1",e({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:l("access.title","".concat(d," - Access Management"),{scope_name:d})})),o("p",e({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:l("access.subtitle","Manage users and groups within the ".concat(d," scope."),{scope_name:d})}))]}))})),o("div",e({className:s.accessTabPanel,role:"tabpanel"},{children:o(n,{ruleSetId:a,moduleId:p,mode:"both"})}))]}))};export{r as default};
2
2
  //# sourceMappingURL=AccessManagementPanel.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import{RbacQueryProvider as r,AppsecProvider as c,AccessListPanel as a}from"appsec-ui";import s from"../store/useAuthStore.js";import{usePermissionsStore as n}from"../store/usePermissionsStore.js";import t from"./AccessPanel.module.css.js";import i from"../store/useEnvStore.js";var u=function(u){var d=u.ruleSetId,p=u.resourceId,l=u.moduleId,m=u.accessLevel,f=void 0===m?"scope":m,v=u.mode,g=void 0===v?"both":v;u.canManageAppAccess;var h=s(function(e){return e.user}),I=i(function(e){return e.rbacConfig}),j=i(function(e){return e.appsecRbacUrl}),A=i(function(e){return e.appsecBaseUrl}),U=null==h?void 0:h.accessToken,b=n(function(e){return e.hasPermission}),P=p||d||void 0,S=Boolean(P),N="application"===f,E=N?"ilotj.scope.access.application":"ilotj.scope.access",G=S&&b("".concat(E,".user.add"),P),k=S&&b("".concat(E,".user.edit"),P),x=S&&b("".concat(E,".user.remove"),P),B=S&&b("".concat(E,".group.add"),P),D=S&&b("".concat(E,".group.edit"),P),M=S&&b("".concat(E,".group.remove"),P);if(!(P&&I&&j&&A))return o("div",e({className:t.accessPanel},{children:o("p",e({className:t.emptyState},{children:"Waiting for access configuration..."}))}));var T=N?I.applicationModuleId||l||I.moduleId:l||I.moduleId;return o("div",e({className:t.accessPanel},{children:o(r,{children:o(c,e({appId:I.applicationName,baseUrl:j,appsecUrl:A,mode:"manage",getAuthToken:function(){return null!=U?U:""}},{children:o(a,{resourceId:P,moduleId:T,mode:g,canAddUser:G,canEditUser:k,canDeleteUser:x,canAddGroup:B,canEditGroup:D,canDeleteGroup:M})}))})}))};export{u as default};
1
+ import{__assign as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{RbacQueryProvider as o,AppsecProvider as t,AccessListPanel as n}from"appsec-ui";import{getAxiosConfig as s}from"../../../api/transport.js";import a from"../store/useAuthStore.js";import{usePermissionsStore as c}from"../store/usePermissionsStore.js";import{useLearningTemplateStore as i}from"../store/useLearningTemplateStore.js";import u from"./AccessPanel.module.css.js";import d from"../store/useEnvStore.js";var m=function(m){var p=m.ruleSetId,l=m.resourceId,f=m.moduleId,v=m.mode,g=void 0===v?"both":v,h=a(function(e){return e.user}),j=d(function(e){return e.rbacConfig}),b=d(function(e){return e.appsecRbacUrl}),I=d(function(e){return e.appsecBaseUrl}),U=null==h?void 0:h.accessToken,S=c(function(e){return e.hasPermission}),A=i(function(e){return e.backwardCompatibility}),P=l||p||void 0,N=Boolean(P),k="ilotj.scope.access",x=N&&S("".concat(k,".user.add"),P),C=N&&S("".concat(k,".user.edit"),P),E=N&&S("".concat(k,".user.remove"),P),G=N&&S("".concat(k,".group.add"),P),T=N&&S("".concat(k,".group.edit"),P),y=N&&S("".concat(k,".group.remove"),P);if(!(P&&j&&b&&I))return r("div",e({className:u.accessPanel},{children:r("p",e({className:u.emptyState},{children:"Waiting for access configuration..."}))}));var B=f||j.moduleId,D=A?"users":g;return r("div",e({className:u.accessPanel},{children:r(o,{children:r(t,e({appId:j.applicationName,baseUrl:b,appsecUrl:I,mode:"manage",axiosConfig:s(),getAuthToken:function(){return null!=U?U:""}},{children:r(n,{resourceId:P,moduleId:B,mode:D,canAddUser:x,canEditUser:C,canDeleteUser:E,canAddGroup:G,canEditGroup:T,canDeleteGroup:y})}))})}))};export{m as default};
2
2
  //# sourceMappingURL=AccessPanel.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as l}from"react";import{Search as u,X as a}from"lucide-react";import{useApproverSearchQuery as c,useGroupSearchQuery as d}from"../queries/useApprovalQueries.js";var p={root:{marginLeft:"1.5rem"},sectionLabel:{fontSize:"0.875rem",fontWeight:500,color:"#19213D"},requiredMark:{marginRight:"0.25rem",fontSize:"1rem",fontWeight:600,color:"#8F2C23"},dropdownWrapper:{position:"relative",marginTop:"0.375rem"},inputShell:{display:"flex",minHeight:"38px",width:"100%",cursor:"text",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",borderRadius:"0.375rem",border:"1px solid #E2E8F0",padding:"0.375rem 0.5rem",boxSizing:"border-box",transition:"border-color 150ms ease-in-out, box-shadow 150ms ease-in-out"},searchIcon:{flexShrink:0,color:"#9CA3AF"},chip:{display:"flex",alignItems:"center",gap:"0.25rem",borderRadius:"9999px",backgroundColor:"#EFF6FF",padding:"0.125rem 0.625rem",fontSize:"0.75rem",fontWeight:500,color:"#1D4ED8"},chipRemoveButton:{marginLeft:"0.125rem",border:"none",borderRadius:"9999px",background:"transparent",padding:0,cursor:"pointer",outline:"none"},input:{minWidth:"120px",flex:1,border:"none",backgroundColor:"transparent",fontSize:"0.875rem",color:"#19213D",outline:"none"},dropdown:{position:"absolute",zIndex:50,marginTop:"0.25rem",maxHeight:"12rem",width:"100%",overflowY:"auto",borderRadius:"0.375rem",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF",padding:"0.25rem 0",listStyle:"none",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",boxSizing:"border-box"},skeletonItem:{padding:"0.5rem 0.75rem"},skeletonLinePrimary:{height:"1rem",width:"75%",borderRadius:"0.25rem",backgroundColor:"#E5E7EB"},skeletonLineSecondary:{height:"0.75rem",width:"50%",borderRadius:"0.25rem",backgroundColor:"#E5E7EB",marginTop:"0.375rem"},checkboxOption:{display:"flex",alignItems:"center",gap:"0.625rem",width:"100%",padding:"0.5rem 0.75rem",cursor:"pointer",boxSizing:"border-box"},checkboxInput:{width:"14px",height:"14px",flexShrink:0,cursor:"pointer",accentColor:"#2563EB",margin:0},optionTitle:{fontSize:"0.875rem",fontWeight:500,color:"#19213D",margin:0},optionSubtitle:{fontSize:"0.75rem",color:"#666F8D",margin:0}},s=function(s){var m=s.selectedApprovers,h=s.selectedGroupOfApprovers,f=s.onApproversChange,g=s.onGroupsChange,b=o(""),v=b[0],y=b[1],x=o(""),k=x[0],F=x[1],E=o(!1),S=E[0],w=E[1],C=i(null),L=i(null),D=o(""),M=D[0],z=D[1],B=o(""),I=B[0],_=B[1],T=o(!1),A=T[0],R=T[1],W=i(null),q=i(null),O=o(!1),P=O[0],j=O[1],G=o(!1),H=G[0],Q=G[1],Y=o(null),J=Y[0],K=Y[1],N=o(null),U=N[0],V=N[1],X=o(null),Z=X[0],$=X[1],ee=o(null),ne=ee[0],re=ee[1];l(function(){if(!v.trim())return F(""),void w(!1);var e=setTimeout(function(){return F(v)},500);return function(){return clearTimeout(e)}},[v]),l(function(){var e=setTimeout(function(){return _(M)},300);return function(){return clearTimeout(e)}},[M]);var te=c(k),oe=te.data,ie=te.isFetching,le=(oe||[]).filter(function(e){return!m.some(function(n){return n.id===e._id})}).slice(0,10).map(function(e){var n,r,t,o;return{id:e._id,email:null!==(n=e.email)&&void 0!==n?n:"",name:(null===(r=e.firstname)||void 0===r?void 0:r.trim())?"".concat(e.firstname," ").concat(null!==(t=e.lastname)&&void 0!==t?t:"").trim():null!==(o=e.email)&&void 0!==o?o:""}});l(function(){k.trim()&&(ie||le.length>0)&&w(!0)},[ie,le.length,k]);var ue=d(I),ae=ue.data,ce=ue.isFetching,de=(ae||[]).filter(function(e){return!h.some(function(n){return n._id===e._id})}).slice(0,10);l(function(){H&&(ce||de.length>0)&&R(!0)},[ce,de.length,H]),l(function(){var e=function(e){C.current&&!C.current.contains(e.target)&&w(!1),W.current&&!W.current.contains(e.target)&&R(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);return r("div",e({style:p.root},{children:[r("label",e({htmlFor:"approver-search-input",style:p.sectionLabel},{children:[t("span",e({style:p.requiredMark},{children:"*"})),"Select who can Approve"]})),r("div",e({ref:C,style:p.dropdownWrapper},{children:[r("label",e({htmlFor:"approver-search-input",style:e(e({},p.inputShell),{borderColor:P?"#2563EB":"#E2E8F0",boxShadow:P?"0 0 0 1px #2563EB":"none"})},{children:[t(u,{size:14,style:p.searchIcon}),m.map(function(n){return r("span",e({style:p.chip},{children:[n.email,t("button",e({type:"button",onMouseDown:function(e){var r;e.preventDefault(),r=n.id,f(m.filter(function(e){return e.id!==r}))},onMouseEnter:function(){return $(n.id)},onMouseLeave:function(){return $(null)},style:e(e({},p.chipRemoveButton),{backgroundColor:Z===n.id?"#DBEAFE":"transparent"})},{children:t(a,{size:12})}))]}),n.id)}),t("input",{ref:L,id:"approver-search-input",type:"text",value:v,onChange:function(e){return y(e.target.value)},onFocus:function(){j(!0),(le.length>0||ie)&&w(!0)},onBlur:function(){return j(!1)},placeholder:0===m.length?"Search by name or email...":"",style:p.input})]})),S&&(ie||le.length>0)&&t("ul",e({style:p.dropdown},{children:ie?[1,2,3,4].map(function(n){return r("li",e({style:p.skeletonItem},{children:[t("div",{style:p.skeletonLinePrimary}),t("div",{style:p.skeletonLineSecondary})]}),n)}):le.map(function(o){return t("li",{children:r("div",e({onMouseDown:function(e){e.preventDefault(),function(e){var r;f(n(n([],m,!0),[e],!1)),y(""),w(!1),null===(r=L.current)||void 0===r||r.focus()}(o)},onMouseEnter:function(){return K(o.id)},onMouseLeave:function(){return K(null)},style:e(e({},p.checkboxOption),{backgroundColor:J===o.id?"#F1F5F9":"transparent"})},{children:[t("input",{type:"checkbox",checked:!1,onChange:function(){},style:p.checkboxInput}),r("div",{children:[t("p",e({style:p.optionTitle},{children:o.name})),t("p",e({style:p.optionSubtitle},{children:o.email}))]})]}))},o.id)})}))]})),r("label",e({htmlFor:"group-search-input",style:e(e({},p.sectionLabel),{display:"inline-block",marginTop:"0.375rem"})},{children:[t("span",e({style:p.requiredMark},{children:"*"})),"Select user group who can Approve"]})),r("div",e({ref:W,style:p.dropdownWrapper},{children:[r("label",e({htmlFor:"group-search-input",style:e(e({},p.inputShell),{borderColor:H?"#2563EB":"#E2E8F0",boxShadow:H?"0 0 0 1px #2563EB":"none"})},{children:[t(u,{size:14,style:p.searchIcon}),h.map(function(n){return r("span",e({style:p.chip},{children:[n.name,t("button",e({type:"button",onMouseDown:function(e){var r;e.preventDefault(),r=n._id,g(h.filter(function(e){return e._id!==r}))},onMouseEnter:function(){return re(n._id)},onMouseLeave:function(){return re(null)},style:e(e({},p.chipRemoveButton),{backgroundColor:ne===n._id?"#DBEAFE":"transparent"})},{children:t(a,{size:12})}))]}),n._id)}),t("input",{ref:q,id:"group-search-input",type:"text",value:M,onChange:function(e){return z(e.target.value)},onFocus:function(){Q(!0)},onBlur:function(){return Q(!1)},placeholder:0===h.length?"Search by group name...":"",style:p.input})]})),A&&(ce||de.length>0)&&t("ul",e({style:p.dropdown},{children:ce?[1,2,3,4].map(function(n){return r("li",e({style:p.skeletonItem},{children:[t("div",{style:p.skeletonLinePrimary}),t("div",{style:p.skeletonLineSecondary})]}),n)}):de.map(function(o){return t("li",{children:r("div",e({onMouseDown:function(e){e.preventDefault(),function(e){var r;g(n(n([],h,!0),[e],!1)),z(""),R(!1),null===(r=q.current)||void 0===r||r.focus()}(o)},onMouseEnter:function(){return V(o._id)},onMouseLeave:function(){return V(null)},style:e(e({},p.checkboxOption),{backgroundColor:U===o._id?"#F1F5F9":"transparent"})},{children:[t("input",{type:"checkbox",checked:!1,onChange:function(){},style:p.checkboxInput}),r("div",{children:[t("p",e({style:p.optionTitle},{children:o.name})),t("p",e({style:p.optionSubtitle},{children:o.description}))]})]}))},o._id)})}))]}))]}))};export{s as default};
1
+ import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as l}from"react";import{Search as u,X as a}from"lucide-react";import{useApproverSearchQuery as c,useGroupSearchQuery as d}from"../queries/useApprovalQueries.js";import p from"../store/useAuthStore.js";var s={root:{marginLeft:"1.5rem"},sectionLabel:{fontSize:"0.875rem",fontWeight:500,color:"#19213D"},requiredMark:{marginRight:"0.25rem",fontSize:"1rem",fontWeight:600,color:"#8F2C23"},dropdownWrapper:{position:"relative",marginTop:"0.375rem"},inputShell:{display:"flex",minHeight:"38px",width:"100%",cursor:"text",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",borderRadius:"0.375rem",border:"1px solid #E2E8F0",padding:"0.375rem 0.5rem",boxSizing:"border-box",transition:"border-color 150ms ease-in-out, box-shadow 150ms ease-in-out"},searchIcon:{flexShrink:0,color:"#9CA3AF"},chip:{display:"flex",alignItems:"center",gap:"0.25rem",borderRadius:"9999px",backgroundColor:"#EFF6FF",padding:"0.125rem 0.625rem",fontSize:"0.75rem",fontWeight:500,color:"#1D4ED8"},chipRemoveButton:{marginLeft:"0.125rem",border:"none",borderRadius:"9999px",background:"transparent",padding:0,cursor:"pointer",outline:"none"},input:{minWidth:"120px",flex:1,border:"none",backgroundColor:"transparent",fontSize:"0.875rem",color:"#19213D",outline:"none"},dropdown:{position:"absolute",zIndex:50,marginTop:"0.25rem",maxHeight:"12rem",width:"100%",overflowY:"auto",borderRadius:"0.375rem",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF",padding:"0.25rem 0",listStyle:"none",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",boxSizing:"border-box"},skeletonItem:{padding:"0.5rem 0.75rem"},skeletonLinePrimary:{height:"1rem",width:"75%",borderRadius:"0.25rem",backgroundColor:"#E5E7EB"},skeletonLineSecondary:{height:"0.75rem",width:"50%",borderRadius:"0.25rem",backgroundColor:"#E5E7EB",marginTop:"0.375rem"},checkboxOption:{display:"flex",alignItems:"center",gap:"0.625rem",width:"100%",padding:"0.5rem 0.75rem",cursor:"pointer",boxSizing:"border-box"},checkboxInput:{width:"14px",height:"14px",flexShrink:0,cursor:"pointer",accentColor:"#2563EB",margin:0},optionTitle:{fontSize:"0.875rem",fontWeight:500,color:"#19213D",margin:0},optionSubtitle:{fontSize:"0.75rem",color:"#666F8D",margin:0}},m=function(m){var h,f=m.selectedApprovers,g=m.selectedGroupOfApprovers,b=m.onApproversChange,v=m.onGroupsChange,y=p(function(e){return e.user}),x=(null==y?void 0:y.firstname)?"".concat(y.firstname," ").concat(null!==(h=y.lastname)&&void 0!==h?h:"").trim():null==y?void 0:y.email,F=t(""),k=F[0],E=F[1],S=t(""),w=S[0],C=S[1],L=t(!1),D=L[0],B=L[1],z=i(null),I=i(null),M=t(""),_=M[0],T=M[1],R=t(""),A=R[0],W=R[1],O=t(!1),j=O[0],P=O[1],q=i(null),G=i(null),H=t(!1),Y=H[0],Q=H[1],J=t(!1),K=J[0],N=J[1],U=t(null),V=U[0],X=U[1],Z=t(null),$=Z[0],ee=Z[1],ne=t(null),re=ne[0],oe=ne[1],te=t(null),ie=te[0],le=te[1];l(function(){if(!k.trim())return C(""),void B(!1);var e=setTimeout(function(){return C(k)},500);return function(){return clearTimeout(e)}},[k]),l(function(){var e=setTimeout(function(){return W(_)},300);return function(){return clearTimeout(e)}},[_]);var ue=c(w),ae=ue.data,ce=ue.isFetching,de=(ae||[]).filter(function(e){return!f.some(function(n){return n.id===e._id})&&e.email!==(null==y?void 0:y.email)}).slice(0,10).map(function(e){var n,r,o,t;return{id:e._id,email:null!==(n=e.email)&&void 0!==n?n:"",name:(null===(r=e.firstname)||void 0===r?void 0:r.trim())?"".concat(e.firstname," ").concat(null!==(o=e.lastname)&&void 0!==o?o:"").trim():null!==(t=e.email)&&void 0!==t?t:""}});l(function(){w.trim()&&(ce||de.length>0)&&B(!0)},[ce,de.length,w]);var pe=d(A),se=pe.data,me=pe.isFetching,he=(se||[]).filter(function(e){return!g.some(function(n){return n._id===e._id})}).slice(0,10);l(function(){K&&(me||he.length>0)&&P(!0)},[me,he.length,K]),l(function(){var e=function(e){z.current&&!z.current.contains(e.target)&&B(!1),q.current&&!q.current.contains(e.target)&&P(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);return r("div",e({style:s.root},{children:[o("label",e({htmlFor:"approver-search-input",style:s.sectionLabel},{children:"Select who can approve"})),r("div",e({ref:z,style:s.dropdownWrapper},{children:[r("label",e({htmlFor:"approver-search-input",style:e(e({},s.inputShell),{borderColor:Y?"#2563EB":"#E2E8F0",boxShadow:Y?"0 0 0 1px #2563EB":"none"})},{children:[o(u,{size:14,style:s.searchIcon}),(null==y?void 0:y.email)&&r("span",e({style:e(e({},s.chip),{backgroundColor:"#F1F5F9",color:"#64748B"})},{children:[x," (You)"]})),f.map(function(n){return r("span",e({style:s.chip,title:n.email},{children:[n.name||n.email,o("button",e({type:"button",onMouseDown:function(e){var r;e.preventDefault(),r=n.id,b(f.filter(function(e){return e.id!==r}))},onMouseEnter:function(){return oe(n.id)},onMouseLeave:function(){return oe(null)},style:e(e({},s.chipRemoveButton),{backgroundColor:re===n.id?"#DBEAFE":"transparent"})},{children:o(a,{size:12})}))]}),n.id)}),o("input",{ref:I,id:"approver-search-input",type:"text",value:k,onChange:function(e){return E(e.target.value)},onFocus:function(){Q(!0),(de.length>0||ce)&&B(!0)},onBlur:function(){return Q(!1)},placeholder:0===f.length?"Search by name or email...":"",style:s.input})]})),D&&(ce||de.length>0)&&o("ul",e({style:s.dropdown},{children:ce?[1,2,3,4].map(function(n){return r("li",e({style:s.skeletonItem},{children:[o("div",{style:s.skeletonLinePrimary}),o("div",{style:s.skeletonLineSecondary})]}),n)}):de.map(function(t){return o("li",{children:r("div",e({onMouseDown:function(e){e.preventDefault(),function(e){var r;b(n(n([],f,!0),[e],!1)),E(""),B(!1),null===(r=I.current)||void 0===r||r.focus()}(t)},onMouseEnter:function(){return X(t.id)},onMouseLeave:function(){return X(null)},style:e(e({},s.checkboxOption),{backgroundColor:V===t.id?"#F1F5F9":"transparent"})},{children:[o("input",{type:"checkbox",checked:!1,onChange:function(){},style:s.checkboxInput}),r("div",{children:[o("p",e({style:s.optionTitle},{children:t.name})),o("p",e({style:s.optionSubtitle},{children:t.email}))]})]}))},t.id)})}))]})),o("label",e({htmlFor:"group-search-input",style:e(e({},s.sectionLabel),{display:"inline-block",marginTop:"0.375rem"})},{children:"Select user group who can approve"})),r("div",e({ref:q,style:s.dropdownWrapper},{children:[r("label",e({htmlFor:"group-search-input",style:e(e({},s.inputShell),{borderColor:K?"#2563EB":"#E2E8F0",boxShadow:K?"0 0 0 1px #2563EB":"none"})},{children:[o(u,{size:14,style:s.searchIcon}),g.map(function(n){return r("span",e({style:s.chip},{children:[n.name,o("button",e({type:"button",onMouseDown:function(e){var r;e.preventDefault(),r=n._id,v(g.filter(function(e){return e._id!==r}))},onMouseEnter:function(){return le(n._id)},onMouseLeave:function(){return le(null)},style:e(e({},s.chipRemoveButton),{backgroundColor:ie===n._id?"#DBEAFE":"transparent"})},{children:o(a,{size:12})}))]}),n._id)}),o("input",{ref:G,id:"group-search-input",type:"text",value:_,onChange:function(e){return T(e.target.value)},onFocus:function(){N(!0)},onBlur:function(){return N(!1)},placeholder:0===g.length?"Search by group name...":"",style:s.input})]})),j&&(me||he.length>0)&&o("ul",e({style:s.dropdown},{children:me?[1,2,3,4].map(function(n){return r("li",e({style:s.skeletonItem},{children:[o("div",{style:s.skeletonLinePrimary}),o("div",{style:s.skeletonLineSecondary})]}),n)}):he.map(function(t){return o("li",{children:r("div",e({onMouseDown:function(e){e.preventDefault(),function(e){var r;v(n(n([],g,!0),[e],!1)),T(""),P(!1),null===(r=G.current)||void 0===r||r.focus()}(t)},onMouseEnter:function(){return ee(t._id)},onMouseLeave:function(){return ee(null)},style:e(e({},s.checkboxOption),{backgroundColor:$===t._id?"#F1F5F9":"transparent"})},{children:[o("input",{type:"checkbox",checked:!1,onChange:function(){},style:s.checkboxInput}),r("div",{children:[o("p",e({style:s.optionTitle},{children:t.name})),o("p",e({style:s.optionSubtitle},{children:t.description}))]})]}))},t._id)})}))]}))]}))};export{m as default};
2
2
  //# sourceMappingURL=AddScopeApprovalSearchComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as r,__assign as o,__spreadArray as i}from"tslib";import{jsx as t,jsxs as n,Fragment as l}from"react/jsx-runtime";import{useState as a,useRef as d,useEffect as s}from"react";import{useMutation as c}from"@tanstack/react-query";import{X as p,Loader2 as u}from"lucide-react";import{Toast as m}from"primereact/toast";import{v4 as g}from"uuid";import f from"../components/StationOnboarding/StationAutocomplete.js";import h from"./AddScopeApprovalSearchComponent.js";import v from"../components/ScopeSkeletonLoader.js";import{Input as y}from"@mui/material";import S from"../store/useAuthStore.js";import{useAppSecRolesStore as b}from"../store/useAppSecRolesStore.js";import C from"../store/useEnvStore.js";import{createRuleSet as x}from"../apis/scopeApis.js";import{useLearningTemplateStore as D}from"../store/useLearningTemplateStore.js";import{IL_CONFIG_CONSTANTS as w}from"../config.js";import{dt as A}from"../store/useLMSConfigStore.js";var _=function(_){var k=_.isOpen,R=_.onClose,I=_.onCreate,q=_.hasGlobalRuleSet,j=_.parentId,z=a(""),F=z[0],E=z[1],L=a(""),B=L[0],W=L[1],N=a({}),G=N[0],P=N[1],T=d(null),M=S().user,O=b(function(e){return e.roles}),K=C(function(e){return e.rbacConfig}),U=a(null),H=U[0],J=U[1],Q=a("approval_required"),V=Q[0],X=Q[1],Y=a([]),Z=Y[0],$=Y[1],ee=a([]),re=ee[0],oe=ee[1],ie=a(""),te=ie[0],ne=ie[1],le=c({mutationFn:function(o){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,x(o,null!==(e=null==M?void 0:M.accessToken)&&void 0!==e?e:"")];case 1:return[2,r.sent()]}})})},onSuccess:function(o){return e(void 0,void 0,void 0,function(){return r(this,function(e){return console.log("Rule Set Created Successfully",o),[2]})})}});le.data;var ae=le.isPending,de=le.mutateAsync;return s(function(){k&&(E(""),W(""),P({}),J(null),X("approval_required"),$([]),oe([]),ne(""))},[k]),k?ae?t(v,{isLoading:ae}):n("div",o({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[t(m,{ref:T}),n("div",o({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[n("div",o({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[n("div",{children:[t("h2",o({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:A("middleDrawer.addScopeDialog.title","Add Scope")})),t("p",o({style:{margin:"4px 0 0 0",fontSize:14,fontWeight:400,color:"#666F8D"}},{children:A("middleDrawer.addScopeDialog.subtitle","This scope will be created under Global and will inherit its Learnings by default.",{parent:"Global"})}))]}),t("button",o({onClick:R,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:t(p,{size:24})}))]})),n("div",o({style:{display:"flex",flexDirection:"column",gap:20}},{children:[n("div",o({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[n("label",o({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[t("span",o({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("middleDrawer.addScopeDialog.scopeName","Scope Name")]})),"Custom"===F?t(f,{value:B,onChange:function(e){if(e.length>50)return W(e.slice(0,50)),void P(function(e){return o(o({},e),{name:"Scope Name must be 50 characters or fewer"})});W(e),P(function(e){return o(o({},e),{name:void 0})})},onStationSelect:function(e){J(e)},style:{border:G.name?"1px solid #8F2C23":void 0}}):t(y,{value:B,onChange:function(e){var r=e.target.value;if(r.length>50)return W(r.slice(0,50)),void P(function(e){return o(o({},e),{name:"Scope Name must be 50 characters or fewer"})});W(r),P(function(e){return o(o({},e),{name:void 0})})},style:{border:"1px solid ".concat(G.name?"#8F2C23":"#F0F2F5")},placeholder:"e.g. Global Learnings"}),G.name&&t("p",o({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:G.name}))]})),n("div",o({style:{display:"flex",flexDirection:"column",gap:12}},{children:[n("label",o({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[t("span",o({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("middleDrawer.addScopeDialog.learningApprovalSettings.title","Learning Approval Settings")]})),n("div",o({role:"radio","aria-checked":"approval_required"===V,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return X("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||X("approval_required")}},{children:[n("div",o({style:{display:"flex",alignItems:"center",gap:8}},{children:[t("div",o({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===V?"#2563EB":"#CBD5E1")}},{children:"approval_required"===V&&t("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),t("span",o({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("middleDrawer.addScopeDialog.learningApprovalSettings.approvalRequired.title","Approval Required Before Publishing")}))]})),t("p",o({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("middleDrawer.addScopeDialog.learningApprovalSettings.approvalRequired.subtitle","Learnings require approval before publishing.")}))]})),"approval_required"===V&&t(h,{selectedApprovers:Z,selectedGroupOfApprovers:re,onApproversChange:$,onGroupsChange:oe}),te&&t("p",o({style:{margin:0,marginLeft:24,fontSize:12,color:"#8F2C23"}},{children:te})),n("div",o({role:"radio","aria-checked":"publish_without"===V,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){X("publish_without"),ne("")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(X("publish_without"),ne(""))}},{children:[n("div",o({style:{display:"flex",alignItems:"center",gap:8}},{children:[t("div",o({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===V?"#2563EB":"#CBD5E1")}},{children:"publish_without"===V&&t("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),t("span",o({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("middleDrawer.addScopeDialog.learningApprovalSettings.publishWithoutApproval.title","Publish Without Approval")}))]})),t("p",o({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("middleDrawer.addScopeDialog.learningApprovalSettings.publishWithoutApproval.subtitle","Learnings can be published directly.")}))]}))]})),n("div",o({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[t("button",o({onClick:R,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:ae?.5:1},disabled:ae},{children:A("middleDrawer.addScopeDialog.cancel","Cancel")})),t("button",o({onClick:function(){return e(void 0,void 0,void 0,function(){var e,o,t,n,l,a,d,s,c,p,u,m,f,h;return r(this,function(r){switch(r.label){case 0:if(e={},B.trim()?B.length>50&&(e.name="Scope Name must be 50 characters or fewer"):e.name="Scope Name is required","approval_required"===V&&0===Z.length&&0===re.length&&ne("Please select at least one approver or approver group."),e.name)return P(e),[2];if("approval_required"===V&&0===Z.length&&0===re.length)return[2];ne(""),r.label=1;case 1:return r.trys.push([1,3,,4]),o="approval_required"===V,t=D.getState().backwardCompatibility,n=t?{topic:q?"genreRuleSet":"globalRuleSet",customScopeGroupName:w.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:B,parentScopeId:null,customScopeName:B,customScopeId:g(),createByName:(null==M?void 0:M.firstname)||"System",createdBy:(null==M?void 0:M.email)||"system@audacy.com",approvalRequired:o,appsecData:{application:null==K?void 0:K.applicationId,module:null==K?void 0:K.moduleId,roles:i(i([],o?[{users:Z.map(function(e){return e.email}),groups:re.map(function(e){return e._id}),role:null!==(s=null===(d=O.find(function(e){return"Learning Manager"===e.name}))||void 0===d?void 0:d._id)&&void 0!==s?s:""}]:[],!0),[{users:[null==M?void 0:M.email],groups:[],role:null!==(p=null===(c=O.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===c?void 0:c._id)&&void 0!==p?p:""}],!1)}}:{topic:q?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:B,parentScopeId:null!=j?j:null,scopeName:B,scopeReferenceMetadata:{},scopeType:"Custom",applicationMappingId:D.getState().app_integration_id},console.log("Add Scope payload:",n),[4,de(n)];case 2:return l=r.sent(),I(null===(u=null==l?void 0:l.data)||void 0===u?void 0:u.scopeId),R(),[3,4];case 3:return a=r.sent(),console.error("An error occurred during scope creation.",a),null===(m=T.current)||void 0===m||m.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(h=null===(f=null==a?void 0:a.response)||void 0===f?void 0:f.data)||void 0===h?void 0:h.message)||"There was an error creating the scope. Please try again."}),[3,4];case 4:return[2]}})})},style:{display:"flex",alignItems:"center",borderRadius:6,backgroundColor:"#2563EB",padding:"8px 16px",fontSize:14,fontWeight:500,color:"white",border:"none",cursor:"pointer",opacity:ae||"Custom"===F&&!H?.5:1},disabled:ae||"Custom"===F&&!H},{children:ae?n(l,{children:[t(u,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):A("middleDrawer.addScopeDialog.submitButton","Create Scope")}))]}))]}))]}))]})):null};export{_ as default};
1
+ import{__awaiter as e,__generator as o,__assign as r,__spreadArray as t}from"tslib";import{jsxs as n,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as a,useRef as c,useEffect as s}from"react";import{useMutation as d}from"@tanstack/react-query";import{X as u,Loader2 as p}from"lucide-react";import{Toast as m}from"primereact/toast";import{v4 as f}from"uuid";import h from"../components/StationOnboarding/StationAutocomplete.js";import g from"./AddScopeApprovalSearchComponent.js";import v from"../components/ScopeSkeletonLoader.js";import{Input as b}from"@mui/material";import y from"../store/useAuthStore.js";import{useAppSecRolesStore as S}from"../store/useAppSecRolesStore.js";import C from"../store/useEnvStore.js";import{createRuleSet as w,inheritScope as x}from"../apis/scopeApis.js";import{useLearningTemplateStore as _}from"../store/useLearningTemplateStore.js";import{IL_CONFIG_CONSTANTS as k}from"../config.js";import{dt as D,interpolate as A}from"../store/useLMSConfigStore.js";import{MIDDLE_DRAWER_ADD_SCOPE_DT_PATH as R,MIDDLE_DRAWER_APPROVAL_SETTINGS_DT_PATH as I}from"../constants.js";var E=function(E){var B=E.isOpen,j=E.onClose,q=E.onCreate,F=E.hasGlobalRuleSet,L=E.parentId,z=E.isILMarketplace,P=void 0!==z&&z,T=E.childType,W=E.parentName,G=a(""),N=G[0],O=G[1],M=a(""),U=M[0],K=M[1],H=a({}),J=H[0],Q=H[1],V=c(null),X=y().user,Y=S(function(e){return e.roles}),Z=C(function(e){return e.rbacConfig}),$=a(!1),ee=$[0],oe=$[1],re=a(null),te=re[0],ne=re[1],ie=a("approval_required"),le=ie[0],ae=ie[1],ce=a([]),se=ce[0],de=ce[1],ue=a([]),pe=ue[0],me=ue[1],fe=a(!1);fe[0];var he=fe[1],ge=D("middleDrawer.subScope","Subscope"),ve="SUBSCOPE"===T?D("".concat(R,".subScopeName"),"".concat(ge," Name")):D("".concat(R,".scopeName"),"Scope Name"),be=d({mutationFn:function(r){return e(void 0,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return[4,w(r,null!==(e=null==X?void 0:X.accessToken)&&void 0!==e?e:"")];case 1:return[2,o.sent()]}})})},onSuccess:function(r){return e(void 0,void 0,void 0,function(){var e,t;return o(this,function(o){return console.log("Rule Set Created Successfully",r),null===(e=V.current)||void 0===e||e.show({severity:"success",summary:"Scope Created",detail:(null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.message)||"Scope created successfully",life:3e3}),[2]})})},onError:function(e){var o,r,t;console.error("Create scope failed",e),null===(o=V.current)||void 0===o||o.show({severity:"error",summary:"Creation Failed",detail:(null===(t=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.data)||void 0===t?void 0:t.message)||"There was an error creating the scope. Please try again."})}});be.data;var ye=be.isPending,Se=be.mutateAsync;if(s(function(){B&&(O(""),K(""),Q({}),ne(null),ae("approval_required"),de([]),me([]))},[B]),!B)return null;var Ce="SUBSCOPE"===T?D("".concat(R,".subScopeTitle"),D("middleDrawer.addSubScope","Add Subscope")):F?D("".concat(R,".title"),"Add Scope"):D("".concat(R,".globalTitle"),"Create Global Scope"),we="SUBSCOPE"===T?A(D("".concat(R,".subScopeSubtitle"),"This ".concat(ge.toLowerCase()," will be created under {parent} and will inherit its Knowledgebases by default.")),{parent:W||D("middleDrawer.scope","the selected scope")}):F?D("".concat(R,".subtitle"),"This scope will be created under Global scope and will inherit its learnings by default.",{parent:"Global"}):D("".concat(R,".globalSubtitle"),"This will be your Global scope that defines the base learnings shared across all stations."),xe="SUBSCOPE"===T?"Setting up your ".concat(ge,"…"):F?"Setting up your ".concat(D("middleDrawer.scope","Scope"),"…"):"Setting up your Global Scope…";return n("div",r({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[i(m,{ref:V}),ye||ee?i(v,{isLoading:ye||ee,title:xe,subtitle:we}):n("div",r({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[n("div",r({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[n("div",{children:[i("h2",r({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:Ce})),i("p",r({style:{margin:"4px 0 0 0",fontSize:14,fontWeight:400,color:"#666F8D"}},{children:we}))]}),i("button",r({onClick:j,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:i(u,{size:24})}))]})),n("div",r({style:{display:"flex",flexDirection:"column",gap:20}},{children:[n("div",r({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[n("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[i("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),ve]})),"Custom"===N?i(h,{value:U,onChange:function(e){if(e.length>50)return K(e.slice(0,50)),void Q(function(e){return r(r({},e),{name:"".concat(ve," must be 50 characters or fewer")})});K(e),Q(function(e){return r(r({},e),{name:void 0})})},onStationSelect:function(e){ne(e)},style:{border:J.name?"1px solid #8F2C23":void 0}}):i(b,{value:U,onChange:function(e){var o=e.target.value;if(o.length>50)return K(o.slice(0,50)),void Q(function(e){return r(r({},e),{name:"".concat(ve," must be 50 characters or fewer")})});K(o),Q(function(e){return r(r({},e),{name:void 0})})},style:{border:"1px solid ".concat(J.name?"#8F2C23":"#F0F2F5")},placeholder:P?"e.g. MarketPlace":"e.g. Global Learnings"}),J.name&&i("p",r({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:J.name}))]})),!P&&n("div",r({style:{display:"flex",flexDirection:"column",gap:12}},{children:[n("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[i("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),D("".concat(I,".title"),"Learning Approval Settings")]})),n("div",r({role:"radio","aria-checked":"approval_required"===le,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return ae("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||ae("approval_required")}},{children:[n("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[i("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===le?"#2563EB":"#CBD5E1")}},{children:"approval_required"===le&&i("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),i("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:D("".concat(I,".approvalRequired.title"),"Approval Required Before Publishing")}))]})),i("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:D("".concat(I,".approvalRequired.subtitle"),"Learnings require approval before publishing.")}))]})),"approval_required"===le&&i(g,{selectedApprovers:se,selectedGroupOfApprovers:pe,onApproversChange:de,onGroupsChange:me}),n("div",r({role:"radio","aria-checked":"publish_without"===le,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){ae("publish_without")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||ae("publish_without")}},{children:[n("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[i("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===le?"#2563EB":"#CBD5E1")}},{children:"publish_without"===le&&i("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),i("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:D("".concat(I,".publishWithoutApproval.title"),"Publish Without Approval")}))]})),i("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:D("".concat(I,".publishWithoutApproval.subtitle"),"Learnings can be published directly.")}))]}))]})),n("div",r({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[i("button",r({onClick:j,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:ye?.5:1},disabled:ye},{children:D("".concat(R,".cancel"),"Cancel")})),i("button",r({onClick:function(){return e(void 0,void 0,void 0,function(){var e,r,n,i,l,a,c,s,d,u,p,m,h,g,v,b,y,S,C,w,D;return o(this,function(o){switch(o.label){case 0:if(e={},U.trim()?U.length>50&&(e.name="".concat(ve," must be 50 characters or fewer")):e.name="".concat(ve," is required"),e.name)return Q(e),[2];o.label=1;case 1:return o.trys.push([1,8,9,10]),oe(!0),r="approval_required"===le,n=_.getState().backwardCompatibility,i=se.length>0||pe.length>0,l=n?{topic:F?"genreRuleSet":"globalRuleSet",customScopeGroupName:k.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:U,parentScopeId:null,customScopeName:U,customScopeId:f(),createByName:(null==X?void 0:X.firstname)||"System",createdBy:(null==X?void 0:X.email)||"system@audacy.com",approvalRequired:r,appsecData:{application:null==Z?void 0:Z.applicationId,module:null==Z?void 0:Z.moduleId,roles:t(t([],r&&i?[{users:se.map(function(e){return e.email}),groups:pe.map(function(e){return e._id}),role:null!==(p=null===(u=Y.find(function(e){return"Learning Manager"===e.name}))||void 0===u?void 0:u._id)&&void 0!==p?p:""}]:[],!0),[{users:[null==X?void 0:X.email],groups:[],role:null!==(h=null===(m=Y.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===m?void 0:m._id)&&void 0!==h?h:""}],!1)}}:{topic:F?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:U,parentScopeId:null!=L?L:null,scopeName:U,scopeReferenceMetadata:{},scopeType:"Custom",applicationMappingId:_.getState().app_integration_id,approvalRequired:r,appsecData:{application:null==Z?void 0:Z.applicationId,module:null==Z?void 0:Z.moduleId,roles:t(t([],r&&i?[{users:se.map(function(e){return e.email}),groups:pe.map(function(e){return e._id}),role:null!==(v=null===(g=Y.find(function(e){return"Learning Manager"===e.name}))||void 0===g?void 0:g._id)&&void 0!==v?v:""}]:[],!0),[{users:[null==X?void 0:X.email],groups:[],role:null!==(y=null===(b=Y.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===b?void 0:b._id)&&void 0!==y?y:""}],!1)}},console.log("Add Scope payload:",l),[4,Se(l)];case 2:if(a=o.sent(),c=null===(S=null==a?void 0:a.data)||void 0===S?void 0:S.scopeId,n||!c||!L||P)return[3,7];he(!0),o.label=3;case 3:return o.trys.push([3,5,6,7]),[4,x({source_scope_id:L,target_scope_id:c,application_mapping_id:_.getState().app_integration_id||"",is_copy_parent_variant_id:!1})];case 4:return o.sent(),[3,7];case 5:return s=o.sent(),console.error("Failed to inherit rules for the new scope:",s),[3,7];case 6:return he(!1),[7];case 7:return q(c),j(),[3,10];case 8:return d=o.sent(),console.error("An error occurred during scope creation.",d),null===(C=V.current)||void 0===C||C.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(D=null===(w=null==d?void 0:d.response)||void 0===w?void 0:w.data)||void 0===D?void 0:D.message)||"There was an error creating the scope. Please try again."}),[3,10];case 9:return oe(!1),[7];case 10:return[2]}})})},style:{display:"flex",alignItems:"center",borderRadius:6,backgroundColor:"#2563EB",padding:"8px 16px",fontSize:14,fontWeight:500,color:"white",border:"none",cursor:"pointer",opacity:ye||"Custom"===N&&!te?.5:1},disabled:ye||"Custom"===N&&!te},{children:ye?n(l,{children:[i(p,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):P?"SUBSCOPE"===T?"Create Subdomain":"Create Domain":D("".concat(R,".submitButton"),"Create Scope")}))]}))]}))]}))]}))};export{E as default};
2
2
  //# sourceMappingURL=AddScopeModal.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as o,jsx as n}from"react/jsx-runtime";import{useState as r}from"react";import{Dialog as t,DialogContent as i,DialogContentText as a,DialogActions as l}from"@mui/material";import c from"@mui/icons-material/Check";import d from"@mui/icons-material/CloseRounded";import{X as s,Loader2 as p}from"lucide-react";import{dt as u}from"../store/useLMSConfigStore.js";var g={header:{padding:"16px 16px 0",display:"flex",justifyContent:"space-between",alignItems:"center"},title:{color:"#334155",fontSize:"1rem"},closeButton:{border:"none",background:"transparent",padding:0,color:"#9CA3AF",cursor:"pointer",outline:"none",transition:"color 150ms ease-in-out"},dialogContent:{padding:"8px 16px"},description:{color:"#475569",fontSize:"0.875rem",lineHeight:1.625},descriptionStrong:{fontWeight:700,color:"#1E293B"},secondaryDescription:{color:"#475569",fontSize:"0.875rem",marginTop:"8px"},rejectSection:{marginTop:"20px"},feedbackLabel:{display:"block",fontSize:"0.875rem",fontWeight:600,color:"#334155",marginBottom:"6px"},textarea:{width:"100%",fontSize:"0.875rem",color:"#1E293B",padding:"10px",border:"1px solid #E2E8F0",borderRadius:"0.5rem",outline:"none",resize:"none",transition:"border-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box",fontFamily:"inherit"},checkboxLabel:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",cursor:"pointer",userSelect:"none",marginTop:"16px"},checkbox:{margin:0,height:"1.125rem",width:"1.125rem",borderRadius:"0.25rem",border:"1px solid #CBD5E1",accentColor:"#DC2626",cursor:"pointer"},checkboxTextWrap:{display:"flex",alignItems:"center"},checkboxText:{fontSize:"0.875rem",fontWeight:500,color:"#1E293B",transition:"color 150ms ease-in-out"},actions:{padding:"24px",gap:"8px"},secondaryButton:{padding:"8px 20px",fontSize:"0.875rem",fontWeight:500,color:"#475569",border:"1px solid #E2E8F0",borderRadius:"0.5rem",backgroundColor:"#FFFFFF",transition:"background-color 150ms ease-in-out, border-color 150ms ease-in-out",cursor:"pointer"},primaryButton:{display:"inline-flex",alignItems:"center",gap:"0.375rem",padding:"8px 20px",fontSize:"0.875rem",fontWeight:500,color:"#FFFFFF",border:"none",borderRadius:"0.5rem",transition:"background-color 150ms ease-in-out",boxShadow:"none",cursor:"pointer"},actionIcon:{width:"1rem",height:"1rem",fontSize:"1rem"},variantCard:{backgroundColor:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:"10px",padding:"16px 20px",marginTop:"12px"},variantCardTitle:{fontSize:"0.9375rem",fontWeight:700,color:"#111111",marginBottom:"4px"},variantCardDescription:{fontSize:"0.8125rem",color:"#374151",marginBottom:"12px",lineHeight:1.5},variantCardMono:{fontSize:"0.75rem",color:"#4b5563",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",lineHeight:1.6}},m=function(m){var h=m.open,b=m.mode,f=m.onClose,x=m.onSubmit,y=m.variantInformation,v=m.ruleTitle,C=m.pendingVariants,k=void 0===C?[]:C,F=m.isPending,E=void 0!==F&&F,S=r(""),D=S[0],w=S[1],T=r(!0),B=T[0],j=T[1],M=r(!1),z=M[0],A=M[1],L=r(!1),W=L[0],I=L[1],R=r(!1),P=R[0],H=R[1],N=r(!1),V=N[0],Y=N[1],q=r(!1),G=q[0],J=q[1],K="undefined"!=typeof document?document.getElementById("rule-template-layout-content"):null,O="reject"===b,Q=function(){x(O?{feedback:D,deleteLearning:B}:{}),w(""),j(!1)},U=function(){w(""),j(!1),f()};return o(t,e({open:h,onClose:U,container:K,maxWidth:!1,fullWidth:!0,sx:{position:"absolute",inset:0,zIndex:999,"& .MuiBackdrop-root":{position:"absolute"},"& .MuiDialog-container":{alignItems:"center",justifyContent:"center",padding:"24px 16px"},"& .MuiDialog-paper":{width:"100%",maxWidth:"640px",margin:0,borderRadius:"16px"}}},{children:[o("div",e({style:g.header},{children:[n("div",e({style:g.title},{children:"".concat(O?u("learnings.tier.rejectDialog.title","Reject Learning"):u("learnings.tier.approveDialog.title","Approve Learning"))})),n("button",e({onClick:f,onMouseEnter:function(){return A(!0)},onMouseLeave:function(){return A(!1)},style:e(e({},g.closeButton),{color:z?"#4B5563":"#9CA3AF"})},{children:n(s,{size:24})}))]})),o(i,e({sx:g.dialogContent},{children:[o(a,e({sx:g.description},{children:[n("span",e({style:g.descriptionStrong},{children:y}))," ","".concat(O?u("learnings.tier.rejectDialog.desc","will not be published or applied within the selected scope. You can provide feedback before rejecting"):u("learnings.tier.approveDialog.desc","will be published and become active within the selected scope after approval."))]})),k.length>0&&n("div",{children:k.map(function(r,t){return o("div",e({style:g.variantCard},{children:[o("div",e({style:g.variantCardTitle},{children:[v,k.length>1?" — Variant ".concat(t+1):""]})),r.description&&n("div",e({style:g.variantCardDescription},{children:r.description})),o("div",e({style:g.variantCardMono},{children:[r.whenToApply&&o("div",{children:["WTA — ",r.whenToApply]}),r.whenNotToApply&&o("div",{children:["WNTA — ",r.whenNotToApply]})]}))]}),r.variantId)})}),n(a,e({sx:g.secondaryDescription},{children:O?"":u("learnings.tier.approveDialog.footer","Take a moment to check the configuration before moving forward.")})),O&&o("div",e({style:g.rejectSection},{children:[o("div",{children:[n("label",e({htmlFor:"feedback",style:g.feedbackLabel},{children:u("learnings.tier.rejectDialog.feedbackTitle","Feedback")})),n("textarea",{id:"feedback",rows:4,value:D,onChange:function(e){return w(e.target.value)},onFocus:function(){return I(!0)},onBlur:function(){return I(!1)},placeholder:"".concat(u("learnings.tier.rejectDialog.feedbackPlaceholder","Add feedback or reason for rejection")),style:e(e({},g.textarea),{borderColor:W?"#EF4444":"#E2E8F0",boxShadow:W?"0 0 0 2px rgba(239, 68, 68, 0.2)":"none"})})]}),o("label",e({style:g.checkboxLabel,onMouseEnter:function(){return H(!0)},onMouseLeave:function(){return H(!1)}},{children:[n("input",{type:"checkbox",checked:B,disabled:!1,onChange:function(e){return j(e.target.checked)},style:g.checkbox}),n("div",e({style:g.checkboxTextWrap},{children:n("span",e({style:e(e({},g.checkboxText),{color:P?"#0F172A":"#1E293B"})},{children:u("learnings.tier.rejectDialog.deleteCheckboxLabel","Also delete this learning")}))}))]}))]}))]})),o(l,e({sx:g.actions},{children:[n("button",e({onClick:U,type:"button",disabled:E,onMouseEnter:function(){return Y(!0)},onMouseLeave:function(){return Y(!1)},style:e(e({},g.secondaryButton),{backgroundColor:V&&!E?"#F8FAFC":"#FFFFFF",borderColor:V&&!E?"#CBD5E1":"#E2E8F0",opacity:E?.5:1,cursor:E?"not-allowed":"pointer"})},{children:u("learnings.tier.approveDialog.cancel","Cancel")})),o("button",O?e({onClick:Q,type:"button",disabled:E,onMouseEnter:function(){return J(!0)},onMouseLeave:function(){return J(!1)},style:e(e({},g.primaryButton),{backgroundColor:E?"#EF4444":G?"#DC2626":"#EF4444",opacity:E?.7:1,cursor:E?"not-allowed":"pointer"})},{children:[E?n(p,{size:16,style:{animation:"spin 1s linear infinite"}}):n(d,{sx:g.actionIcon}),E?u("learnings.tier.rejectDialog.loadingText","Processing..."):u("learnings.tier.rejectDialog.title","Reject Learning")]}):e({onClick:Q,type:"button",disabled:E,onMouseEnter:function(){return J(!0)},onMouseLeave:function(){return J(!1)},style:e(e({},g.primaryButton),{backgroundColor:E?"#22C55E":G?"#16A34A":"#22C55E",opacity:E?.7:1,cursor:E?"not-allowed":"pointer"})},{children:[E?n(p,{size:16,style:{animation:"spin 1s linear infinite"}}):n(c,{sx:g.actionIcon}),E?u("learnings.tier.approveDialog.loadingText","Processing..."):u("learnings.tier.approveDialog.title","Approve Learning")]}))]})),n("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}))};export{m as default};
1
+ import{__assign as e}from"tslib";import{jsxs as o,jsx as n,Fragment as t}from"react/jsx-runtime";import r,{useState as i}from"react";import{Dialog as a,DialogContent as c,DialogContentText as l,DialogActions as d}from"@mui/material";import s from"@mui/icons-material/Check";import p from"@mui/icons-material/CloseRounded";import{X as u,Loader2 as m}from"lucide-react";import{dt as g}from"../store/useLMSConfigStore.js";import{LEARNING_DT_PATH as h}from"../constants.js";var f={header:{padding:"16px 16px 0",display:"flex",justifyContent:"space-between",alignItems:"center"},title:{color:"#334155",fontSize:"1rem"},closeButton:{border:"none",background:"transparent",padding:0,color:"#9CA3AF",cursor:"pointer",outline:"none",transition:"color 150ms ease-in-out"},dialogContent:{padding:"8px 16px"},description:{color:"#475569",fontSize:"0.875rem",lineHeight:1.625},descriptionStrong:{fontWeight:700,color:"#1E293B"},secondaryDescription:{color:"#475569",fontSize:"0.875rem",marginTop:"8px"},rejectSection:{marginTop:"20px"},feedbackLabel:{display:"block",fontSize:"0.875rem",fontWeight:600,color:"#334155",marginBottom:"6px"},textarea:{width:"100%",fontSize:"0.875rem",color:"#1E293B",padding:"10px",border:"1px solid #E2E8F0",borderRadius:"0.5rem",outline:"none",resize:"none",transition:"border-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box",fontFamily:"inherit"},checkboxLabel:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",cursor:"pointer",userSelect:"none",marginTop:"16px"},checkbox:{margin:0,height:"1.125rem",width:"1.125rem",borderRadius:"0.25rem",border:"1px solid #CBD5E1",accentColor:"#DC2626",cursor:"pointer"},checkboxTextWrap:{display:"flex",alignItems:"center"},checkboxText:{fontSize:"0.875rem",fontWeight:500,color:"#1E293B",transition:"color 150ms ease-in-out"},actions:{padding:"24px",gap:"8px"},secondaryButton:{padding:"8px 20px",fontSize:"0.875rem",fontWeight:500,color:"#475569",border:"1px solid #E2E8F0",borderRadius:"0.5rem",backgroundColor:"#FFFFFF",transition:"background-color 150ms ease-in-out, border-color 150ms ease-in-out",cursor:"pointer"},primaryButton:{display:"inline-flex",alignItems:"center",gap:"0.375rem",padding:"8px 20px",fontSize:"0.875rem",fontWeight:500,color:"#FFFFFF",border:"none",borderRadius:"0.5rem",transition:"background-color 150ms ease-in-out",boxShadow:"none",cursor:"pointer"},actionIcon:{width:"1rem",height:"1rem",fontSize:"1rem"},variantCard:{backgroundColor:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:"10px",padding:"16px 20px",marginTop:"12px"},variantCardTitle:{fontSize:"0.9375rem",fontWeight:700,color:"#111111",marginBottom:"4px"},variantCardDescription:{fontSize:"0.8125rem",color:"#374151",marginBottom:"12px",lineHeight:1.5},variantCardMono:{fontSize:"0.75rem",color:"#4b5563",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",lineHeight:1.6}},b=function(b){var x=b.open,y=b.mode,v=b.onClose,C=b.onSubmit,k=b.variantInformation,F=b.ruleTitle,E=b.pendingVariants,S=void 0===E?[]:E,D=b.isPending,j=void 0!==D&&D,w=i(""),T=w[0],B=w[1],M=i(!0),z=M[0],A=M[1],L=i(!1),W=L[0],I=L[1],R=i(!1),P=R[0],_=R[1],H=i(!1),N=H[0],V=H[1],Y=i(!1),q=Y[0],G=Y[1],J=i(!1),K=J[0],O=J[1],Q="undefined"!=typeof document?document.getElementById("rule-template-layout-content"):null,U="reject"===y,X=function(){C(U?{feedback:T,deleteLearning:z}:{}),B(""),A(!1)},Z=function(){B(""),A(!1),v()},$=U?g("".concat(h,".rejectDialog.desc"),"{variant_name} will not be published or applied within the selected scope. You can provide feedback before rejecting."):g("".concat(h,".approveDialog.desc"),"{variant_name} will be published and become active within the selected scope after approval.");return o(a,e({open:x,onClose:Z,container:Q,maxWidth:!1,fullWidth:!0,sx:{position:"absolute",inset:0,zIndex:999,"& .MuiBackdrop-root":{position:"absolute"},"& .MuiDialog-container":{alignItems:"center",justifyContent:"center",padding:"24px 16px"},"& .MuiDialog-paper":{width:"100%",maxWidth:"640px",margin:0,borderRadius:"16px"}}},{children:[o("div",e({style:f.header},{children:[n("div",e({style:f.title},{children:"".concat(U?g("".concat(h,".rejectDialog.title"),"Reject Learning"):g("".concat(h,".approveDialog.title"),"Approve Learning"))})),n("button",e({onClick:v,onMouseEnter:function(){return I(!0)},onMouseLeave:function(){return I(!1)},style:e(e({},f.closeButton),{color:W?"#4B5563":"#9CA3AF"})},{children:n(u,{size:24})}))]})),o(c,e({sx:f.dialogContent},{children:[o(l,e({sx:f.description},{children:[!$.includes("{variant_name}")&&o(t,{children:[n("span",e({style:f.descriptionStrong},{children:k}))," "]}),$.split("{variant_name}").map(function(t,i,a){return o(r.Fragment,{children:[t,i<a.length-1&&n("span",e({style:f.descriptionStrong},{children:k}))]},i)})]})),S.length>0&&n("div",{children:S.map(function(t,r){return o("div",e({style:f.variantCard},{children:[o("div",e({style:f.variantCardTitle},{children:[F,S.length>1?" — Variant ".concat(r+1):""]})),t.description&&n("div",e({style:f.variantCardDescription},{children:t.description})),o("div",e({style:f.variantCardMono},{children:[t.whenToApply&&o("div",{children:["WTA — ",t.whenToApply]}),t.whenNotToApply&&o("div",{children:["WNTA — ",t.whenNotToApply]})]}))]}),t.variantId)})}),n(l,e({sx:f.secondaryDescription},{children:U?"":g("".concat(h,".approveDialog.footer"),"Take a moment to check the configuration before moving forward.")})),U&&o("div",e({style:f.rejectSection},{children:[o("div",{children:[n("label",e({htmlFor:"feedback",style:f.feedbackLabel},{children:g("".concat(h,".rejectDialog.feedbackTitle"),"Feedback")})),n("textarea",{id:"feedback",rows:4,value:T,onChange:function(e){return B(e.target.value)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},placeholder:"".concat(g("".concat(h,".rejectDialog.feedbackPlaceholder"),"Add feedback or reason for rejection")),style:e(e({},f.textarea),{borderColor:P?"#EF4444":"#E2E8F0",boxShadow:P?"0 0 0 2px rgba(239, 68, 68, 0.2)":"none"})})]}),o("label",e({style:f.checkboxLabel,onMouseEnter:function(){return V(!0)},onMouseLeave:function(){return V(!1)}},{children:[n("input",{type:"checkbox",checked:z,disabled:!1,onChange:function(e){return A(e.target.checked)},style:f.checkbox}),n("div",e({style:f.checkboxTextWrap},{children:n("span",e({style:e(e({},f.checkboxText),{color:N?"#0F172A":"#1E293B"})},{children:g("".concat(h,".rejectDialog.deleteCheckboxLabel"),"Also delete this learning")}))}))]}))]}))]})),o(d,e({sx:f.actions},{children:[n("button",e({onClick:Z,type:"button",disabled:j,onMouseEnter:function(){return G(!0)},onMouseLeave:function(){return G(!1)},style:e(e({},f.secondaryButton),{backgroundColor:q&&!j?"#F8FAFC":"#FFFFFF",borderColor:q&&!j?"#CBD5E1":"#E2E8F0",opacity:j?.5:1,cursor:j?"not-allowed":"pointer"})},{children:g("".concat(h,".approveDialog.cancel"),"Cancel")})),o("button",U?e({onClick:X,type:"button",disabled:j,onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},style:e(e({},f.primaryButton),{backgroundColor:j?"#EF4444":K?"#DC2626":"#EF4444",opacity:j?.7:1,cursor:j?"not-allowed":"pointer"})},{children:[j?n(m,{size:16,style:{animation:"spin 1s linear infinite"}}):n(p,{sx:f.actionIcon}),j?g("".concat(h,".rejectDialog.loadingText"),"Processing..."):g("".concat(h,".rejectDialog.rejectLearning"),"Reject Learning")]}):e({onClick:X,type:"button",disabled:j,onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},style:e(e({},f.primaryButton),{backgroundColor:j?"#22C55E":K?"#16A34A":"#22C55E",opacity:j?.7:1,cursor:j?"not-allowed":"pointer"})},{children:[j?n(m,{size:16,style:{animation:"spin 1s linear infinite"}}):n(s,{sx:f.actionIcon}),j?g("".concat(h,".approveDialog.loadingText"),"Processing..."):g("".concat(h,".approveDialog.approveLearning"),"Approve Learning")]}))]})),n("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}))};export{b as default};
2
2
  //# sourceMappingURL=ApprovalLearningDialog.js.map
@@ -0,0 +1,2 @@
1
+ import{__assign as i}from"tslib";import{jsxs as n,jsx as e}from"react/jsx-runtime";import{FileText as c,ChevronUp as o}from"lucide-react";import t from"../styles/RuleAccordion.module.css.js";var a=function(i){var n=i.replace(/_/g," ");return n.charAt(0).toUpperCase()+n.slice(1)},r=function(r){var s=r.metadata,l=r.isOpen,d=r.onToggle,m=r.labelText,p=void 0===m?"Instruction Prompt":m,u=Object.entries(s||{});return n("div",i({className:"".concat(t.conditionBlock," ").concat(t.conditionBlockApply)},{children:[e("div",{className:t.verticalLine}),e("div",{className:t.horizontalLine}),n("div",i({className:t.conditionContent},{children:[e("div",i({className:t.conditionHeader,onClick:d},{children:n("div",i({className:t.conditionIconWrapper},{children:[e("div",i({className:t.conditionIconInstruction},{children:e(c,{size:10,strokeWidth:3})})),e("span",i({className:t.conditionLabel},{children:p})),e("button",i({className:t.conditionToggleButton},{children:e(o,{size:16,className:l?t.chevronOpen:t.chevronClosed})}))]}))})),l&&e("div",i({className:t.conditionItems},{children:e("div",i({className:t.instructionPromptBox},{children:u.map(function(c){var o=c[0],r=c[1];return n("div",i({className:t.instructionPromptEntry},{children:[e("p",i({className:t.instructionPromptKey},{children:a(o)})),e("p",i({className:t.instructionPromptValue},{children:r}))]}),o)})}))})),!l&&e("div",{className:t.collapsedPadding})]}))]}))};export{r as default};
2
+ //# sourceMappingURL=InstructionPromptBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstructionPromptBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as n,__generator as i}from"tslib";import{jsxs as r,Fragment as o,jsx as t}from"react/jsx-runtime";import{useRef as a,useState as l,useEffect as s}from"react";import{GripVertical as c,ChevronUp as u,ChevronDown as d}from"lucide-react";import{toggleVariant as p}from"../apis/scopeApis.js";import v from"../styles/RuleAccordion.module.css.js";import m from"../styles/CustomTooltip.module.css.js";import g from"./InheritanceBreadcrumb.js";import f from"../components/ConfirmationModal.js";import h from"../components/CustomTooltip.js";import b from"../store/useAuthStore.js";import{usePermissionsStore as j}from"../store/usePermissionsStore.js";import{useLearningTemplateStore as T}from"../store/useLearningTemplateStore.js";import A from"./ApprovalLearningDialog.js";import D from"./ApprovalActionButton.js";import S from"./PendingApprovalChip.js";import{useApproveOrRejectVariantsMutation as C}from"../queries/useApprovalQueries.js";import I from"../store/useEnvStore.js";import{Toast as w}from"primereact/toast";import{dt as y}from"../store/useLMSConfigStore.js";var L=function(L){var N,x,P,O,R,_,B,k,E,M,H,V,z,F=L.rule,G=L.idx,q=L.ruleSetId,Q=L.isOpen,U=L.onToggle,Y=L.onDelete;L.onEdit,L.isGlobalScope;var J=L.deleteButtonLabel,K=void 0===J?"Delete":J;L.editButtonLabel;var W=L.enableLearningRuleLabel,X=void 0===W?"Enable":W,Z=L.disableLearningRuleLabel,$=void 0===Z?"Disable":Z,ee=L.onToggleSuccess,ne=L.dragControls,ie=b.getState().user,re=j(function(e){return e.hasPermission}),oe=re("ilotj.rule.delete",q),te=re("ilotj.rule.enable",q),ae=re("ilotj.rule.disable",q),le=re("ilotj.rule.selfApprove",q),se=re("ilotj.rule.approve",q),ce=re("ilotj.scope.approve",q),ue=re("ilotj.rule.pendingApproval.view",q),de=re("ilotj.rule.variant.pendingApproval.edit",q),pe=le||se||ce||de,ve=ue||pe,me=C(),ge=I(function(e){return e.rbacConfig}),fe=ge?{application:null==ge?void 0:ge.applicationId,scopeLevelModuleId:null!==(N=null==ge?void 0:ge.moduleId)&&void 0!==N?N:"",applicationLevelModuleId:null!==(x=null==ge?void 0:ge.applicationModuleId)&&void 0!==x?x:"",applicationLevelResourceId:null!==(P=null==ge?void 0:ge.applicationResourceId)&&void 0!==P?P:""}:void 0,he=a(null),be=l(!1),je=be[0],Te=be[1],Ae=F.variants&&F.variants.length>0?!F.variants.every(function(e){return!1===e.is_enabled}):!1!==F.is_enabled,De=l(!1),Se=De[0],Ce=De[1],Ie=null===(O=F.variants)||void 0===O?void 0:O.map(function(e){return e.inheritance||[]}).reduce(function(e,n){return n.length>e.length?n:e},[]),we=null===(R=F.variants)||void 0===R?void 0:R.some(function(e){return null==e?void 0:e.isOverridden}),ye=Ae?ae:te;F.inheritance&&F.inheritance.length>0&&(null===(_=F.inheritance)||void 0===_||_.length);var Le=null!==(k=null===(B=F.variants)||void 0===B?void 0:B.length)&&void 0!==k?k:0,Ne=l({isOpen:!1,mode:"approve"}),xe=Ne[0],Pe=Ne[1],Oe=null!==(M=null===(E=F.variants)||void 0===E?void 0:E.filter(function(e){return"pending_approval"===e.approvalStatus}).length)&&void 0!==M?M:0,Re=T(function(e){return e.urlVariantId}),_e=T(function(e){return e.urlApprovalAction}),Be=T(function(e){return e.clearUrlApprovalParams});s(function(){var e;if(Re&&_e){var n=null===(e=F.variants)||void 0===e?void 0:e.find(function(e){return e.variantId===Re});n&&"pending_approval"===(null==n?void 0:n.approvalStatus)&&pe&&(Pe({isOpen:!0,mode:_e}),Be())}},[Re,_e,F.variants,Be,pe]);var ke=function(e,n){e.stopPropagation(),Pe({isOpen:!0,mode:n})},Ee=Q?"".concat(v.accordionHeader," ").concat(v.accordionHeaderOpen):v.accordionHeader;return r(o,{children:[t(w,{ref:he}),t("div",e({className:Ee,onClick:U},{children:r("div",e({className:v.headerContent},{children:[r("div",e({className:v.headerTopRow},{children:[t("div",e({className:v.titleSection},{children:r("div",e({className:v.titleRow},{children:[t("div",e({className:v.dragHandle,title:"Drag to reorder",style:{touchAction:"none"},onPointerDown:function(e){e.stopPropagation(),null==ne||ne.start(e)}},{children:t(c,{size:18})})),r("span",e({className:v.ruleTitle},{children:[G+1,". ",F.ruleTitle]})),F.dataSource&&t("span",e({className:v.dataSourceTag},{children:null===(H=F.dataSource)||void 0===H?void 0:H.tag})),ve&&t(S,{count:Oe}),we&&t(h,e({content:"Inherited from the ".concat((null==Ie?void 0:Ie.length)>=2?Ie[Ie.length-2]:"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:m.customTooltip,sideOffset:5},{children:t("span",e({className:v.overriddenTag},{children:"Overridden"}))})),!Ae&&t("span",e({className:v.learningDisabledPill},{children:"Disabled"}))]}))})),t("div",e({className:v.headerActions},{children:t("div",e({className:v.chevronIcon},{children:t(Q?u:d,{size:20})}))}))]})),r("div",e({className:v.footerRow},{children:[t(g,{inheritance:Ie||[]}),r("div",e({className:v.headerButtonGroup},{children:[ye&&t("button",e({onClick:function(e){return n(void 0,void 0,void 0,function(){return i(this,function(n){return e.stopPropagation(),Te(!0),[2]})})},disabled:Se,className:v.toggleLearningButton},{children:Ae?$:X})),pe&&Oe>1&&r(o,{children:[t(D,{variant:"approve",text:Oe>1?"Approve All":"Approve",onClick:function(e){return ke(e,"approve")}}),t(D,{variant:"reject",text:Oe>1?"Reject All":"Reject",onClick:function(e){return ke(e,"reject")}})]}),oe&&Y&&t("button",e({className:v.deleteButton,onClick:function(e){e.stopPropagation(),null==Y||Y()}},{children:K}))]}))]}))]}))})),t(f,{isOpen:je,title:Ae?y("learnings.tier.disableDialog.title","Disable Learning?"):y("learnings.tier.enableDialog.title","Enable Learning?"),description:Ae?y("learnings.tier.disableDialog.desc","Are you sure you want to disable this learning for {rule_title}?",{rule_title:F.ruleTitle}):y("learnings.tier.enableDialog.desc","Are you sure you want to enable this learning for {rule_title}?",{rule_title:F.ruleTitle}),warning:Ae?y("learnings.tier.disableDialog.warningText","This learning will no longer influence upcoming schedules. You can enable it again anytime."):y("learnings.tier.enableDialog.warningText","This learning will start influencing upcoming schedules again."),confirmText:Ae?y("learnings.tier.disableDialog.deleteText","Disable"):y("learnings.tier.enableDialog.deleteText","Enable"),cancelText:y(Ae?"learnings.tier.disableDialog.cancelText":"learnings.tier.enableDialog.cancelText","Cancel"),loadingText:y(Ae?"learnings.tier.disableDialog.loadingText":"learnings.tier.enableDialog.loadingText","Processing..."),confirmBgColor:Ae?"#DC2626":"#16A34A",onConfirm:function(){return n(void 0,void 0,void 0,function(){var e,n,r;return i(this,function(i){switch(i.label){case 0:Ce(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),0===(e=(null===(r=F.variants)||void 0===r?void 0:r.map(function(e){return e.variantId}))||[]).length&&F.ruleId&&e.push(F.ruleId),null==ie?void 0:ie.email,[4,p(e,!Ae)];case 2:return i.sent(),null==ee||ee(),[3,5];case 3:return n=i.sent(),console.error("Failed to toggle rule variants",n),[3,5];case 4:return Ce(!1),Te(!1),[7];case 5:return[2]}})})},onCancel:function(){return Te(!1)},isLoading:Se}),t(A,{open:xe.isOpen,mode:xe.mode,onClose:function(){return Pe(function(n){return e(e({},n),{isOpen:!1})})},onSubmit:function(n){return function(n){var i,r,o=null!==(r=null===(i=F.variants)||void 0===i?void 0:i.filter(function(e){return"pending_approval"===e.approvalStatus}).map(function(e){return e.variantId}))&&void 0!==r?r:[];o.length&&q&&me.mutate({variantIds:o,status:"approve"===xe.mode?"approved":"rejected",feedback:n.feedback,scopeId:q,appsecData:fe},{onSuccess:function(){var n;Pe(function(n){return e(e({},n),{isOpen:!1})}),null==ee||ee(),null===(n=he.current)||void 0===n||n.show({severity:"success",summary:"".concat(xe.mode," Successfully"),detail:"approve"===xe.mode?"Learning approved successfully":"Learning rejected successfully"})},onError:function(e){var n;console.error("An error occurred during rejecting.",e),null===(n=he.current)||void 0===n||n.show({severity:"error",summary:"".concat(xe.mode," Failed"),detail:"There was an error ".concat("approve"===xe.mode?"approving":"rejecting"," the learning. Please try again.")})}})}(n)},variantInformation:"".concat(F.ruleTitle,"-").concat(Le>1?"Variants":"Variant 1"),ruleTitle:F.ruleTitle,pendingVariants:null!==(z=null===(V=F.variants)||void 0===V?void 0:V.filter(function(e){return"pending_approval"===e.approvalStatus}))&&void 0!==z?z:[],isPending:me.isPending})]})};export{L as default};
1
+ import{__assign as e,__awaiter as n,__generator as o}from"tslib";import{jsxs as i,Fragment as r,jsx as t}from"react/jsx-runtime";import{useRef as a,useState as l,useEffect as c}from"react";import{GripVertical as s,ChevronUp as u,ChevronDown as d}from"lucide-react";import{toggleVariant as p}from"../apis/scopeApis.js";import v from"../styles/RuleAccordion.module.css.js";import m from"../styles/CustomTooltip.module.css.js";import g from"./InheritanceBreadcrumb.js";import f from"../components/ConfirmationModal.js";import h from"../components/CustomTooltip.js";import b from"../store/useAuthStore.js";import{usePermissionsStore as j}from"../store/usePermissionsStore.js";import{useLearningTemplateStore as T}from"../store/useLearningTemplateStore.js";import A from"./ApprovalLearningDialog.js";import D from"./ApprovalActionButton.js";import S from"./PendingApprovalChip.js";import{useApproveOrRejectVariantsMutation as C}from"../queries/useApprovalQueries.js";import I from"../store/useEnvStore.js";import{Toast as w}from"primereact/toast";import{dt as y}from"../store/useLMSConfigStore.js";import{LEARNING_DT_PATH as L}from"../constants.js";var N=function(N){var x,P,O,R,B,_,k,E,M,H,V,z,F,G=N.rule,q=N.idx,Q=N.ruleSetId,U=N.isOpen,Y=N.onToggle,J=N.onDelete;N.onEdit,N.isGlobalScope;var K=N.deleteButtonLabel,W=void 0===K?"Delete":K;N.editButtonLabel;var X=N.enableLearningRuleLabel,Z=void 0===X?"Enable":X,$=N.disableLearningRuleLabel,ee=void 0===$?"Disable":$,ne=N.onToggleSuccess,oe=N.dragControls,ie=b.getState().user,re=j(function(e){return e.hasPermission}),te=re("ilotj.rule.delete",Q),ae=re("ilotj.rule.enable",Q),le=re("ilotj.rule.disable",Q),ce=re("ilotj.rule.selfApprove",Q),se=re("ilotj.rule.approve",Q),ue=re("ilotj.scope.approve",Q),de=re("ilotj.rule.pendingApproval.view",Q),pe=re("ilotj.rule.variant.pendingApproval.edit",Q),ve=ce||se||ue||pe,me=de||ve,ge=C(),fe=I(function(e){return e.rbacConfig}),he=fe?{application:null==fe?void 0:fe.applicationId,scopeLevelModuleId:null!==(x=null==fe?void 0:fe.moduleId)&&void 0!==x?x:"",applicationLevelModuleId:null!==(P=null==fe?void 0:fe.applicationModuleId)&&void 0!==P?P:"",applicationLevelResourceId:null!==(O=null==fe?void 0:fe.applicationResourceId)&&void 0!==O?O:""}:void 0,be=a(null),je=l(!1),Te=je[0],Ae=je[1],De=G.variants&&G.variants.length>0?!G.variants.every(function(e){return!1===e.is_enabled}):!1!==G.is_enabled,Se=l(!1),Ce=Se[0],Ie=Se[1],we=null===(R=G.variants)||void 0===R?void 0:R.map(function(e){return e.inheritance||[]}).reduce(function(e,n){return n.length>e.length?n:e},[]),ye=null===(B=G.variants)||void 0===B?void 0:B.some(function(e){return null==e?void 0:e.isOverridden}),Le=De?le:ae;G.inheritance&&G.inheritance.length>0&&(null===(_=G.inheritance)||void 0===_||_.length);var Ne=null!==(E=null===(k=G.variants)||void 0===k?void 0:k.length)&&void 0!==E?E:0,xe=l({isOpen:!1,mode:"approve"}),Pe=xe[0],Oe=xe[1],Re=null!==(H=null===(M=G.variants)||void 0===M?void 0:M.filter(function(e){return"pending_approval"===e.approvalStatus}).length)&&void 0!==H?H:0,Be=T(function(e){return e.urlVariantId}),_e=T(function(e){return e.urlApprovalAction}),ke=T(function(e){return e.clearUrlApprovalParams});c(function(){var e;if(Be&&_e){var n=null===(e=G.variants)||void 0===e?void 0:e.find(function(e){return e.variantId===Be});n&&"pending_approval"===(null==n?void 0:n.approvalStatus)&&ve&&(Oe({isOpen:!0,mode:_e}),ke())}},[Be,_e,G.variants,ke,ve]);var Ee=function(e,n){e.stopPropagation(),Oe({isOpen:!0,mode:n})},Me=U?"".concat(v.accordionHeader," ").concat(v.accordionHeaderOpen):v.accordionHeader;return i(r,{children:[t(w,{ref:be}),t("div",e({className:Me,onClick:Y},{children:i("div",e({className:v.headerContent},{children:[i("div",e({className:v.headerTopRow},{children:[t("div",e({className:v.titleSection},{children:i("div",e({className:v.titleRow},{children:[t("div",e({className:v.dragHandle,title:"Drag to reorder",style:{touchAction:"none"},onPointerDown:function(e){e.stopPropagation(),null==oe||oe.start(e)}},{children:t(s,{size:18})})),i("span",e({className:v.ruleTitle},{children:[q+1,". ",G.ruleTitle]})),G.dataSource&&t("span",e({className:v.dataSourceTag},{children:null===(V=G.dataSource)||void 0===V?void 0:V.tag})),me&&t(S,{count:Re}),ye&&t(h,e({content:"Inherited from the ".concat((null==we?void 0:we.length)>=2?we[we.length-2]:"parent"," scope and overridden in this scope."),placement:"top",withArrow:!0,contentClassName:m.customTooltip,sideOffset:5},{children:t("span",e({className:v.overriddenTag},{children:"Overridden"}))})),!De&&t("span",e({className:v.learningDisabledPill},{children:"Disabled"}))]}))})),t("div",e({className:v.headerActions},{children:t("div",e({className:v.chevronIcon},{children:t(U?u:d,{size:20})}))}))]})),i("div",e({className:v.footerRow},{children:[t(g,{inheritance:we||[]}),i("div",e({className:v.headerButtonGroup},{children:[Le&&t("button",e({onClick:function(e){return n(void 0,void 0,void 0,function(){return o(this,function(n){return e.stopPropagation(),Ae(!0),[2]})})},disabled:Ce,className:v.toggleLearningButton},{children:De?ee:Z})),ve&&Re>1&&i(r,{children:[t(D,{variant:"approve",text:Re>1?"Approve All":"Approve",onClick:function(e){return Ee(e,"approve")}}),t(D,{variant:"reject",text:Re>1?"Reject All":"Reject",onClick:function(e){return Ee(e,"reject")}})]}),te&&J&&t("button",e({className:v.deleteButton,onClick:function(e){e.stopPropagation(),null==J||J()}},{children:W}))]}))]}))]}))})),t(f,{isOpen:Te,title:De?y("".concat(L,".disableDialog.title"),"Disable Learning?"):y("".concat(L,".enableDialog.title"),"Enable Learning?"),description:De?y("".concat(L,".disableDialog.desc"),"Are you sure you want to disable this learning for ".concat(G.ruleTitle,"?"),{rule_title:G.ruleTitle}):y("".concat(L,".enableDialog.desc"),"Are you sure you want to enable this learning for ".concat(G.ruleTitle,"?"),{rule_title:G.ruleTitle}),warning:De?y("".concat(L,".disableDialog.warningText"),"This learning will no longer influence upcoming schedules. You can enable it again anytime."):y("".concat(L,".enableDialog.warningText"),"This learning will start influencing upcoming schedules again."),confirmText:De?y("".concat(L,".disableDialog.deleteText"),"Disable"):y("".concat(L,".enableDialog.deleteText"),"Enable"),cancelText:y("".concat(L,De?".disableDialog.cancelText":".enableDialog.cancelText"),"Cancel"),loadingText:y("".concat(L,De?".disableDialog.loadingText":".enableDialog.loadingText"),"Processing..."),confirmBgColor:De?"#DC2626":"#16A34A",onConfirm:function(){return n(void 0,void 0,void 0,function(){var e,n,i;return o(this,function(o){switch(o.label){case 0:Ie(!0),o.label=1;case 1:return o.trys.push([1,3,4,5]),0===(e=(null===(i=G.variants)||void 0===i?void 0:i.map(function(e){return e.variantId}))||[]).length&&G.ruleId&&e.push(G.ruleId),null==ie?void 0:ie.email,[4,p(e,!De)];case 2:return o.sent(),null==ne||ne(),[3,5];case 3:return n=o.sent(),console.error("Failed to toggle rule variants",n),[3,5];case 4:return Ie(!1),Ae(!1),[7];case 5:return[2]}})})},onCancel:function(){return Ae(!1)},isLoading:Ce}),t(A,{open:Pe.isOpen,mode:Pe.mode,onClose:function(){return Oe(function(n){return e(e({},n),{isOpen:!1})})},onSubmit:function(n){return function(n){var o,i,r=null!==(i=null===(o=G.variants)||void 0===o?void 0:o.filter(function(e){return"pending_approval"===e.approvalStatus}).map(function(e){return e.variantId}))&&void 0!==i?i:[];r.length&&Q&&ge.mutate({variantIds:r,status:"approve"===Pe.mode?"approved":"rejected",feedback:n.feedback,scopeId:Q,appsecData:he},{onSuccess:function(){var n;Oe(function(n){return e(e({},n),{isOpen:!1})}),null==ne||ne(),null===(n=be.current)||void 0===n||n.show({severity:"success",summary:"".concat(Pe.mode," Successfully"),detail:"approve"===Pe.mode?"Learning approved successfully":"Learning rejected successfully"})},onError:function(e){var n;console.error("An error occurred during rejecting.",e),null===(n=be.current)||void 0===n||n.show({severity:"error",summary:"".concat(Pe.mode," Failed"),detail:"There was an error ".concat("approve"===Pe.mode?"approving":"rejecting"," the learning. Please try again.")})}})}(n)},variantInformation:"".concat(G.ruleTitle,"-").concat(Ne>1?"Variants":"Variant 1"),ruleTitle:G.ruleTitle,pendingVariants:null!==(F=null===(z=G.variants)||void 0===z?void 0:z.filter(function(e){return"pending_approval"===e.approvalStatus}))&&void 0!==F?F:[],isPending:ge.isPending})]})};export{N as default};
2
2
  //# sourceMappingURL=RuleAccordionHeader.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as t,__spreadArray as n,__assign as r}from"tslib";import{jsx as i,jsxs as o,Fragment as l}from"react/jsx-runtime";import{useRef as a,useState as s,useEffect as u}from"react";import{useLearningTemplateStore as c}from"../store/useLearningTemplateStore.js";import d from"../components/EmptyLearningState.js";import{getRulesInRuleSetById as p,exportRuleSet as m,deleteRule as f,deleteQuestion as v,alterQuestionPriority as g}from"../apis/scopeApis.js";import h from"../components/RuleContentSkeleton.js";import{Toast as y}from"primereact/toast";import T from"./ContentLogic.js";import w from"../components/ErrorStateDisplay.js";import C from"../shared/SuccessToastContent.js";import D from"../shared/ErrorToastContent.js";import{findNodeById as S}from"../utils/treeUtils.js";import b from"../styles/LearningContent.module.css.js";import R from"../components/ConfirmationModal.js";import{dt as I}from"../store/useLMSConfigStore.js";import"../../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"lucide-react";import"../../IL-OTJ/_components/InputDataReasoningCard.js";import"../../IL-OTJ/_components/TooltipComponent.js";import"../../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import{CitationProvider as x}from"../../IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"@viswa-test/test-citation";import"../LearningManagement.js";import _ from"../../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";var j=function(j){var L,k=j.noRulesTitle,O=void 0===k?"No rules have been added !":k,M=j.noRulesDesc,N=void 0===M?"Start by adding rules that should apply across all stations.":M,A=j.noRulesButtonText,E=void 0===A?"Create New Rule":A,F=j.deleteRuleSuccessMessage,V=void 0===F?"Rule deleted successfully!":F,P=j.deleteVariantSuccessMessage,B=void 0===P?"Variant deleted successfully!":P,J=j.deleteRuleErrorMessage,U=void 0===J?"Failed to delete rule. Please try again.":J,W=j.deleteVariantErrorMessage,G=void 0===W?"Failed to delete variant. Please try again.":W,q=j.deleteModalTitle,H=void 0===q?"Delete":q,$=j.deleteRuleModalWarning,z=void 0===$?"This will permanently delete the rule configuration.":$,K=j.deleteVariantModalWarning,Q=void 0===K?"This will permanently delete the variant configuration.":K,X=j.deleteConfirmText,Y=void 0===X?"Delete":X,Z=j.onRefreshRuleSets,ee=j.app_integration_id,te=j.token,ne=c(function(e){return e.selectedRuleSetId}),re=c(function(e){return e.scopeTreeData}),ie=c(function(e){return e.sidebarTab}),oe=c(function(e){return e.setInitialRules}),le=c(function(e){return e.currentRules}),ae=c(function(e){return e.setRawAuditRuleData});c(function(e){return e.createdVariantInfo});var se=c(function(e){return e.resetCreatedVariantInfo}),ue=c(function(e){return e.isILModalTriggered}),ce=c(function(e){return e.setIsILModalTriggered}),de=a(null),pe=s(!1),me=pe[0],fe=pe[1],ve=s(null),ge=ve[0],he=ve[1],ye=s(null),Te=ye[0],we=ye[1],Ce=s(null),De=Ce[0],Se=Ce[1],be=s(null),Re=be[0],Ie=be[1],xe=s(!1),_e=xe[0],je=xe[1],Le=s(null),ke=Le[0],Oe=Le[1],Me=s(!1),Ne=Me[0],Ae=Me[1],Ee=s(""),Fe=Ee[0],Ve=Ee[1],Pe=s(null),Be=Pe[0],Je=Pe[1],Ue=s(!1),We=Ue[0],Ge=Ue[1],qe=s(!1),He=qe[0],$e=qe[1],ze=s("ruleDeletion"),Ke=ze[0],Qe=ze[1],Xe=s(null),Ye=Xe[0],Ze=Xe[1],et=s(!1),tt=et[0],nt=et[1],rt=s(!1),it=rt[0],ot=rt[1],lt=c.getState().tiers,at=s(null),st=at[0],ut=at[1],ct=s(null),dt=ct[0],pt=ct[1],mt=s(null),ft=mt[0],vt=mt[1],gt=function(){he(null),we(null),fe(!0),Ie(0)},ht=function(){fe(!1),ce(!1),he(null),we(null),Se(null),Ie(null),$e(!1),ot(!1),yt(),ut(null),pt(null),vt(null),Z&&Z(!1,ne||void 0)};u(function(){yt()},[ne,oe]),u(function(){ue&&fe(!0)},[ue]);var yt=function(i){return void 0===i&&(i=!1),e(void 0,void 0,void 0,function(){var e,o,l,a,s,u,d,m,f,v,g,h,y,T,w,C,D,S,b;return t(this,function(t){switch(t.label){case 0:if(!ne)return oe([]),[2];i||je(!0),Oe(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p(ne,te)];case 2:return e=t.sent(),console.log("response==",e),(null==e?void 0:e.data)&&0!==Object.keys(e.data).length?(ae(e),o=e.data,console.log("rulesData==",o),l=new Set(["ruleSetName","ruleSetDesc","created_at","updated_at","created_by","updated_by"]),a=Array.isArray(o.tiers)?n([],o.tiers,!0).sort(function(e,t){var n,r;return(null!==(n=e.tier_priority)&&void 0!==n?n:0)-(null!==(r=t.tier_priority)&&void 0!==r?r:0)}).map(function(e){return[e.name,e.value]}):Object.entries(o).filter(function(e){var t=e[0],n=e[1];return!l.has(t)&&Array.isArray(n)}),s=a.map(function(e){var t=e[1];return new Set(t.flatMap(function(e){var t,n;return null!==(n=null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return e.link_id}).filter(Boolean))&&void 0!==n?n:[]}))}),u=s.flatMap(function(e){return Array.from(e)}),d=u.reduce(function(e,t){var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e},{}),m=new Set(Object.entries(d).filter(function(e){return e[1]>1}).map(function(e){return e[0]})),f=function(e){return e.map(function(e){var t;return r(r({},e),{variants:null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return r(r({},e),{isLinked:!!e.link_id&&m.has(e.link_id)})})})})},v=a.map(function(e,t){var n,r=e[0],i=e[1],o=lt.find(function(e){return e.tier_name===r}),l=r.replace(/tier(\d+)/i,"tier_$1");return{id:null!==(n=null==o?void 0:o.tier_id)&&void 0!==n?n:String(t+1),name:l.replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),ruleCount:i.length,description:0===t?"".concat(I("tier.subtitle","These are the system-wide learnings applied across all stations.")):"These learnings apply after higher-priority tiers and may refine or relax default behavior.",isOpen:0===t,rules:f(i)}}),(g=c.getState().createdVariantInfo)&&g.length>0?(h=Object.fromEntries(a.map(function(e,t){return[e[0],String(t+1)]})),y=new Set(g.map(function(e){return h[e.tierName]}).filter(Boolean)),T=v.map(function(e){return r(r({},e),{isOpen:e.isOpen||y.has(e.id)})}),oe(T),(w=null===(b=null===(S=null===(D=g[0])||void 0===D?void 0:D.variants)||void 0===S?void 0:S[0])||void 0===b?void 0:b.id)?setTimeout(function(){var e=document.querySelector('[data-variant-id="'.concat(w,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(function(){return se()},1e4)},500):se()):oe(v),[3,5]):(oe([]),[2]);case 3:return C=t.sent(),console.error("Failed to fetch rule details",C),404!==(null==C?void 0:C.status)&&Oe((null==C?void 0:C.message)||"Failed to load rules. Please try again."),oe([]),[3,5];case 4:return i||je(!1),[7];case 5:return[2]}})})},Tt=ne?S((null==re?void 0:re.data)||null,ne):null,wt=Tt?{ruleSetId:Tt.id,ruleSetName:Tt.name,ruleSetDesc:"",ruleCount:null===(L=null==Tt?void 0:Tt.metrics)||void 0===L?void 0:L.learningsCount}:void 0,Ct=Boolean(null==re?void 0:re.data),Dt=Boolean(ne&&!Tt&&Ct),St=function(){if("stations"===ie)return"custom";if(!Tt)return"global";switch(Tt.type){case"GLOBAL":default:return"global";case"SCOPE":return"genre";case"SUBSCOPE":case"Custom":return"custom"}},bt=function(e){var t;if(!e)return i("p",{children:I("learnings.tier.deleteDialog.desc","Are you sure you want to delete this rule? This action cannot be undone.")});var n=null==le?void 0:le.flatMap(function(e){var t;return null!==(t=e.rules)&&void 0!==t?t:[]}).find(function(t){return t.ruleId===e});return i("p",{children:I("learnings.tier.deleteDialog.desc","Are you sure you want to delete {rule_title} rule? This action cannot be undone.",{rule_title:null!==(t=null==n?void 0:n.ruleTitle)&&void 0!==t?t:""})})},Rt={editingRule:ge,editingTier:Te,editingVariants:De,focusedVariantIndex:Re,setFocusedVariantIndex:Ie,triggerAddVariant:He,triggerFixGaps:it,copiedRule:st,copiedSourceTier:dt,copiedTargetTier:ft,initialDraftMessage:Fe,app_integration_id:ee,modeId:"019dde79-0494-78d7-ba5b-54a35d20f0fc"};return wt?o(l,{children:[i(y,{ref:de}),i("div",r({className:b.container},{children:_e?i(h,{}):ke?i(w,{errorMessage:ke,onRetry:yt}):i(T,{onAddRule:gt,onDeleteRule:function(e){Je(e)},onEditRule:function(e,t){he(e),we(t||null),Se(e.variants||null),Ie(null),$e(!0),fe(!0)},onEditVariant:function(e,t,n,r){var i,o,l,a,s=null!==(l=null===(o=null===(i=null==le?void 0:le.find(function(e){return e.name===n}))||void 0===i?void 0:i.rules)||void 0===o?void 0:o.find(function(e){return e.ruleId===t}))&&void 0!==l?l:null==le?void 0:le.flatMap(function(e){return e.rules}).find(function(e){return e.ruleId===t});if(s){var u=null===(a=s.variants)||void 0===a?void 0:a.findIndex(function(t){return t.variantId===e.variantId}),c=void 0!==u&&-1!==u?u:0;he(s),we(n||null),Se(s.variants||null),Ie(c),fe(!0),"resolve_gaps"===r&&ot(!0)}},onDeleteVariant:function(e,t){Ze({variantId:e,ruleId:t})},onExportRule:function(){return e(void 0,void 0,void 0,function(){var e,n,r,o,l,a,s;return t(this,function(t){switch(t.label){case 0:if(!ne)return[2];Ae(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,m(ne)];case 2:return e=t.sent(),n=window.URL.createObjectURL(e),(r=document.createElement("a")).href=n,o=(null==wt?void 0:wt.ruleSetName)?"".concat(wt.ruleSetName.replace(/\s+/g,"_"),"_rules.csv"):"ruleset_".concat(ne,".csv"),r.download=o,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n),null===(a=de.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:b.successToast,content:i(C,{message:"Ruleset exported successfully!"})}),[3,5];case 3:return l=t.sent(),console.error("Export error:",l),null===(s=de.current)||void 0===s||s.show({severity:"error",sticky:!1,className:b.errorToast,content:i(D,{message:l.message||"Failed to export ruleset. Please try again."})}),[3,5];case 4:return Ae(!1),[7];case 5:return[2]}})})},isExporting:Ne,onToggleSuccess:function(){return yt(!0)},onReorderRules:function(n,r,o,l,a){return e(void 0,void 0,void 0,function(){var e,s,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(n,r,o,l,a)];case 1:return t.sent(),yt(!0),null===(s=de.current)||void 0===s||s.show({severity:"success",sticky:!1,life:3e3,className:b.successToast,content:i(C,{message:"Rule order changed successfully. Future rule applications will follow the updated order."})}),[3,3];case 2:return e=t.sent(),console.error("Failed to reorder rules:",e),yt(!0),null===(u=de.current)||void 0===u||u.show({severity:"error",sticky:!1,className:b.errorToast,content:i(D,{message:"Failed to update rule order. Please try again."})}),[3,3];case 3:return[2]}})})},onRefreshRuleSets:Z,setDeleteConfirmationUsedFor:Qe,onCopyToTier:function(e,t,n,r,i){var o,l,a=null===(l=null===(o=null==le?void 0:le.find(function(e){return e.name===r}))||void 0===o?void 0:o.rules)||void 0===l?void 0:l.find(function(e){return e.ruleId===t});if(a){var s=["Add a new learning with the following details:","- Rule Title: ".concat(n),"- Description: ".concat(e.description),"- When to apply: ".concat(e.whenToApply),"- When NOT to apply: ".concat(e.whenNotToApply),"- Tier information: ".concat(i)].join("\n");Ve(s),ut(a),pt(r),vt(i),he(null),we(null),Se(null),Ie(null),fe(!0)}}})})),me&&i(x,{children:i(_,{isOpen:me,onClose:ht,app_integration_id:ee,token:te,mode:"ADD",pluginPayload:r(r({},Rt),{initialScope:St(),ruleSet:wt})})}),i(R,{isOpen:!!Be,title:I("learnings.tier.deleteDialog.title",H),description:bt(Be),warning:I("learnings.tier.deleteDialog.warningText",z),confirmText:I("learnings.tier.deleteDialog.deleteText",Y),cancelText:I("learnings.tier.deleteDialog.cancelText","Cancel"),loadingText:I("learnings.tier.deleteDialog.loadingText","Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,o,l;return t(this,function(t){switch(t.label){case 0:if(!Be)return[2];Ge(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,f(Be)];case 2:return t.sent(),Je(null),null===(n=de.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:b.successToast,content:i(C,{message:V})}),yt(),Z&&Z(!1,ne||void 0),[3,5];case 3:return e=t.sent(),console.error("Failed to delete rule",e),null===(r=de.current)||void 0===r||r.show({severity:"error",sticky:!1,className:b.errorToast,content:i(D,{message:(null===(l=null===(o=null==e?void 0:e.response)||void 0===o?void 0:o.data)||void 0===l?void 0:l.detail)||U})}),[3,5];case 4:return Ge(!1),[7];case 5:return[2]}})})},onCancel:function(){return Je(null)},isLoading:We}),i(R,{isOpen:!!Ye,title:I("learnings.tier.deleteDialog.title",H),description:"variantDeletion"===Ke?i("span",{children:I("learnings.tier.deleteDialog.desc","Are you sure you want to delete this variant? This action cannot be undone.")}):bt((null==Ye?void 0:Ye.ruleId)||null),warning:I("learnings.tier.deleteDialog.warningText","ruleDeletion"===Ke?z:Q),confirmText:I("learnings.tier.deleteDialog.deleteText",Y),cancelText:I("learnings.tier.deleteDialog.cancelText","Cancel"),loadingText:I("learnings.tier.deleteDialog.loadingText","Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,o,l;return t(this,function(t){switch(t.label){case 0:if(!Ye)return[2];nt(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),"ruleDeletion"!==Ke?[3,3]:[4,v(Ye.ruleId)];case 2:return t.sent(),[3,5];case 3:return[4,f(Ye.variantId)];case 4:t.sent(),t.label=5;case 5:return Ze(null),null===(n=de.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:b.successToast,content:i(C,{message:"ruleDeletion"===Ke?V:B})}),yt(),Z&&Z(!1,ne||void 0),[3,8];case 6:return e=t.sent(),console.error("Failed to delete variant",e),null===(r=de.current)||void 0===r||r.show({severity:"error",sticky:!1,className:b.errorToast,content:i(D,{message:(null===(l=null===(o=null==e?void 0:e.response)||void 0===o?void 0:o.data)||void 0===l?void 0:l.detail)||("ruleDeletion"===Ke?U:G)})}),[3,8];case 7:return nt(!1),[7];case 8:return[2]}})})},onCancel:function(){return Ze(null)},isLoading:tt})]}):Dt?i(w,{title:"Scope Not Found",errorMessage:"The selected scope does not exist. Please refresh the page or choose a valid scope.",onRetry:function(){return null==Z?void 0:Z(!0)},retryButtonText:"Refresh"}):o(l,{children:[i(d,{onCreate:gt,title:O,desc:N,button:E}),me&&i(x,{children:i(_,{isOpen:me,onClose:ht,app_integration_id:ee,token:te,mode:"ADD",pluginPayload:r(r({},Rt),{initialScope:St(),ruleSet:wt})})})]})};export{j as default};
1
+ import{__awaiter as e,__generator as t,__spreadArray as n,__assign as r}from"tslib";import{jsx as o,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useRef as a,useState as s,useEffect as u}from"react";import{useLearningTemplateStore as c}from"../store/useLearningTemplateStore.js";import d from"../components/EmptyLearningState.js";import{getRulesInRuleSetById as p,exportRuleSet as m,deleteRule as f,deleteQuestion as v,alterQuestionPriority as g}from"../apis/scopeApis.js";import h from"../components/RuleContentSkeleton.js";import{Toast as T}from"primereact/toast";import y from"./ContentLogic.js";import w from"../components/ErrorStateDisplay.js";import S from"../shared/SuccessToastContent.js";import j from"../shared/ErrorToastContent.js";import{findNodeById as C}from"../utils/treeUtils.js";import I from"../styles/LearningContent.module.css.js";import b from"../components/ConfirmationModal.js";import{dt as R}from"../store/useLMSConfigStore.js";import"../../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"lucide-react";import"../../IL-OTJ/_components/InputDataReasoningCard.js";import"../../IL-OTJ/_components/TooltipComponent.js";import"../../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import{CitationProvider as k}from"../../IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"../../../api/transport.js";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import x from"../../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import{LEARNING_DT_PATH as D,VARIANT_DT_PATH as L,TIER_DT_PATH as _}from"../constants.js";import{useConfigStore as O}from"../store/useConfigStore.js";import"../store/usePermissionsStore.js";import"appsec-ui";import"../store/useAuthStore.js";import"../store/useEnvStore.js";import"react-dom";import"@radix-ui/react-tooltip";import"../components/StationOnboarding/InputField.js";import"../config.js";import"../store/useAppSecRolesStore.js";import"@tanstack/react-query";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"../AuditLog/ChangeLogDiff.js";import"../../IL-marketplace/components/GuidelineIconButton.js";import"axios";import"../hooks/useLearningTemplateQueryParams.js";import"../components/ToolTip.js";import"react-router-dom";import"react-icons/bs";import"../../IL-marketplace/queryClient.js";import"../store/useExternalWorkflowStore.js";import"@e-llm-studio/creative-workspace-ui-component";import"../../IL-marketplace/components/LearningManagementWrapper.js";import"../../IL-marketplace/store/usePublishTemplateStore.js";import"../../IL-marketplace/workspace/workspace.context.js";import"../LearningManagementTest.js";var M=function(M){var A,E=M.noRulesTitle,N=void 0===E?"No rules have been added !":E,V=M.noRulesDesc,F=void 0===V?"Start by adding rules that should apply across all stations.":V,P=M.noRulesButtonText,B=void 0===P?"Create New Rule":P,J=M.deleteRuleSuccessMessage,U=void 0===J?"Rule deleted successfully!":J,W=M.deleteVariantSuccessMessage,q=void 0===W?"Variant deleted successfully!":W,G=M.deleteRuleErrorMessage,H=void 0===G?"Failed to delete rule. Please try again.":G,Q=M.deleteVariantErrorMessage,$=void 0===Q?"Failed to delete variant. Please try again.":Q,z=M.deleteModalTitle,K=void 0===z?"Delete":z,X=M.deleteRuleModalWarning,Y=void 0===X?"This will permanently delete the rule configuration.":X,Z=M.deleteVariantModalWarning,ee=void 0===Z?"This will permanently delete the variant configuration.":Z,te=M.deleteConfirmText,ne=void 0===te?"Delete":te,re=M.onRefreshRuleSets,oe=M.app_integration_id,ie=M.token,le=M.modeId,ae=c(function(e){return e.selectedRuleSetId}),se=c(function(e){return e.scopeTreeData}),ue=c(function(e){return e.sidebarTab}),ce=c(function(e){return e.setInitialRules}),de=c(function(e){return e.currentRules}),pe=c(function(e){return e.setRawAuditRuleData});c(function(e){return e.createdVariantInfo});var me=c(function(e){return e.resetCreatedVariantInfo}),fe=c(function(e){return e.isILModalTriggered}),ve=c(function(e){return e.setIsILModalTriggered}),ge=a(null),he=O.getState().configuration,Te=s(!1),ye=Te[0],we=Te[1],Se=s(null),je=Se[0],Ce=Se[1],Ie=s(null),be=Ie[0],Re=Ie[1],ke=s(null),xe=ke[0],De=ke[1],Le=s(null),_e=Le[0],Oe=Le[1],Me=s(!1),Ae=Me[0],Ee=Me[1],Ne=s(null),Ve=Ne[0],Fe=Ne[1],Pe=s(!1),Be=Pe[0],Je=Pe[1],Ue=s(""),We=Ue[0],qe=Ue[1],Ge=s(null),He=Ge[0],Qe=Ge[1],$e=s(!1),ze=$e[0],Ke=$e[1],Xe=s(!1),Ye=Xe[0],Ze=Xe[1],et=s("ruleDeletion"),tt=et[0],nt=et[1],rt=s(null),ot=rt[0],it=rt[1],lt=s(!1),at=lt[0],st=lt[1],ut=s(!1),ct=ut[0],dt=ut[1],pt=c.getState().tiers,mt=s(null),ft=mt[0],vt=mt[1],gt=s(null),ht=gt[0],Tt=gt[1],yt=s(null),wt=yt[0],St=yt[1],jt=function(){Ce(null),Re(null),vt(null),Tt(null),St(null),qe(""),we(!0),Oe(0)},Ct=function(){we(!1),ve(!1),Ce(null),Re(null),De(null),Oe(null),Ze(!1),dt(!1),It(),vt(null),Tt(null),St(null),qe(""),re&&re(!1,ae||void 0)};u(function(){It()},[ae,ce]),u(function(){fe&&we(!0)},[fe]);var It=function(o){return void 0===o&&(o=!1),e(void 0,void 0,void 0,function(){var e,i,l,a,s,u,d,m,f,v,g,h,T,y,w,S,j,C,I;return t(this,function(t){switch(t.label){case 0:if(!ae)return ce([]),[2];o||Ee(!0),Fe(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p(ae,ie)];case 2:return e=t.sent(),console.log("response==",e),(null==e?void 0:e.data)&&0!==Object.keys(e.data).length?(pe(e),i=e.data,console.log("rulesData==",i),l=new Set(["ruleSetName","ruleSetDesc","created_at","updated_at","created_by","updated_by"]),a=Array.isArray(i.tiers)?n([],i.tiers,!0).sort(function(e,t){var n,r;return(null!==(n=e.tier_priority)&&void 0!==n?n:0)-(null!==(r=t.tier_priority)&&void 0!==r?r:0)}).map(function(e){return[e.name,e.value]}):Object.entries(i).filter(function(e){var t=e[0],n=e[1];return!l.has(t)&&Array.isArray(n)}),s=a.map(function(e){var t=e[1];return new Set(t.flatMap(function(e){var t,n;return null!==(n=null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return e.link_id}).filter(Boolean))&&void 0!==n?n:[]}))}),u=s.flatMap(function(e){return Array.from(e)}),d=u.reduce(function(e,t){var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e},{}),m=new Set(Object.entries(d).filter(function(e){return e[1]>1}).map(function(e){return e[0]})),f=function(e){return e.map(function(e){var t;return r(r({},e),{variants:null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return r(r({},e),{isLinked:!!e.link_id&&m.has(e.link_id)})})})})},v=a.map(function(e,t){var n,r=e[0],o=e[1],i=pt.find(function(e){return e.tier_name===r}),l=r.replace(/tier(\d+)/i,"tier_$1");return{id:null!==(n=null==i?void 0:i.tier_id)&&void 0!==n?n:String(t+1),name:l.replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),ruleCount:o.length,description:0===t?"".concat(R("tier.subtitle","These are the system-wide learnings applied across all stations.")):"These learnings apply after higher-priority tiers and may refine or relax default behavior.",isOpen:0===t,rules:f(o)}}),(g=c.getState().createdVariantInfo)&&g.length>0?(h=Object.fromEntries(a.map(function(e,t){return[e[0],String(t+1)]})),T=new Set(g.map(function(e){return h[e.tierName]}).filter(Boolean)),y=v.map(function(e){return r(r({},e),{isOpen:e.isOpen||T.has(e.id)})}),ce(y),(w=null===(I=null===(C=null===(j=g[0])||void 0===j?void 0:j.variants)||void 0===C?void 0:C[0])||void 0===I?void 0:I.id)?setTimeout(function(){var e=document.querySelector('[data-variant-id="'.concat(w,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(function(){return me()},1e4)},500):me()):ce(v),[3,5]):(ce([]),[2]);case 3:return S=t.sent(),console.error("Failed to fetch rule details",S),404!==(null==S?void 0:S.status)&&Fe((null==S?void 0:S.message)||"Failed to load rules. Please try again."),ce([]),[3,5];case 4:return o||Ee(!1),[7];case 5:return[2]}})})},bt=ae?C((null==se?void 0:se.data)||null,ae):null,Rt=bt?{ruleSetId:bt.id,ruleSetName:bt.name,ruleSetDesc:"",ruleCount:null===(A=null==bt?void 0:bt.metrics)||void 0===A?void 0:A.learningsCount}:void 0,kt=Boolean(null==se?void 0:se.data),xt=Boolean(ae&&!bt&&kt),Dt=function(){if("stations"===ue)return"custom";if(!bt)return"global";switch(bt.type){case"GLOBAL":default:return"global";case"SCOPE":return"genre";case"SUBSCOPE":case"Custom":return"custom"}},Lt=function(e){var t;if(!e)return o("p",{children:R("".concat(_,".deleteDialog.description"),"Are you sure you want to delete this rule? This action cannot be undone.")});var n=null==de?void 0:de.flatMap(function(e){var t;return null!==(t=e.rules)&&void 0!==t?t:[]}).find(function(t){return t.ruleId===e});return o("p",{children:R("".concat(_,".deleteDialog.description"),"Are you sure you want to delete ".concat(null==n?void 0:n.ruleTitle," rule? This action cannot be undone."),{rule_title:null!==(t=null==n?void 0:n.ruleTitle)&&void 0!==t?t:""})})},_t={editingRule:je,editingTier:be,editingVariants:xe,focusedVariantIndex:_e,setFocusedVariantIndex:Oe,triggerAddVariant:Ye,triggerFixGaps:ct,copiedRule:ft,copiedSourceTier:ht,copiedTargetTier:wt,initialDraftMessage:We,app_integration_id:oe,modeId:le};return Rt?i(l,{children:[o(T,{ref:ge}),o("div",r({className:I.container},{children:Ae?o(h,{}):Ve?o(w,{errorMessage:Ve,onRetry:It}):o(y,{onAddRule:jt,onDeleteRule:function(e){Qe(e)},onEditRule:function(e,t){Ce(e),Re(t||null),De(e.variants||null),Oe(null),Ze(!0),we(!0)},onEditVariant:function(e,t,n,r){var o,i,l,a,s=null!==(l=null===(i=null===(o=null==de?void 0:de.find(function(e){return e.name===n}))||void 0===o?void 0:o.rules)||void 0===i?void 0:i.find(function(e){return e.ruleId===t}))&&void 0!==l?l:null==de?void 0:de.flatMap(function(e){return e.rules}).find(function(e){return e.ruleId===t});if(s){var u=null===(a=s.variants)||void 0===a?void 0:a.findIndex(function(t){return t.variantId===e.variantId}),c=void 0!==u&&-1!==u?u:0;Ce(s),Re(n||null),De(s.variants||null),Oe(c),we(!0),"resolve_gaps"===r&&dt(!0)}},onDeleteVariant:function(e,t){it({variantId:e,ruleId:t})},onExportRule:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l,a,s;return t(this,function(t){switch(t.label){case 0:if(!ae)return[2];Je(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,m(ae)];case 2:return e=t.sent(),n=window.URL.createObjectURL(e),(r=document.createElement("a")).href=n,i=(null==Rt?void 0:Rt.ruleSetName)?"".concat(Rt.ruleSetName.replace(/\s+/g,"_"),"_rules.csv"):"ruleset_".concat(ae,".csv"),r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n),null===(a=ge.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:I.successToast,content:o(S,{message:"Ruleset exported successfully!"})}),[3,5];case 3:return l=t.sent(),console.error("Export error:",l),null===(s=ge.current)||void 0===s||s.show({severity:"error",sticky:!1,className:I.errorToast,content:o(j,{message:l.message||"Failed to export ruleset. Please try again."})}),[3,5];case 4:return Je(!1),[7];case 5:return[2]}})})},isExporting:Be,onToggleSuccess:function(){return It(!0)},onReorderRules:function(n,r,i,l,a){return e(void 0,void 0,void 0,function(){var e,s,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(n,r,i,l,a)];case 1:return t.sent(),It(!0),null===(s=ge.current)||void 0===s||s.show({severity:"success",sticky:!1,life:3e3,className:I.successToast,content:o(S,{message:"Rule order changed successfully. Future rule applications will follow the updated order."})}),[3,3];case 2:return e=t.sent(),console.error("Failed to reorder rules:",e),It(!0),null===(u=ge.current)||void 0===u||u.show({severity:"error",sticky:!1,className:I.errorToast,content:o(j,{message:"Failed to update rule order. Please try again."})}),[3,3];case 3:return[2]}})})},onRefreshRuleSets:re,setDeleteConfirmationUsedFor:nt,onCopyToTier:function(e,t,n,r,o){var i,l,a=null===(l=null===(i=null==de?void 0:de.find(function(e){return e.name===r}))||void 0===i?void 0:i.rules)||void 0===l?void 0:l.find(function(e){return e.ruleId===t});if(a){var s=["Add a new learning with the following details:","- Rule Title: ".concat(n),"- Description: ".concat(e.description),"- When to apply: ".concat(e.whenToApply),"- When NOT to apply: ".concat(e.whenNotToApply),"- Tier information: ".concat(o)].join("\n");qe(s),vt(a),Tt(r),St(o),Ce(null),Re(null),De(null),Oe(null),we(!0)}}})})),ye&&o(k,{children:o(x,{isOpen:ye,onClose:Ct,app_integration_id:oe,token:ie,mode:"ADD",config:he,pluginPayload:r(r({},_t),{initialScope:Dt(),ruleSet:Rt})})}),o(b,{isOpen:!!He,title:R("".concat(D,".deleteDialog.title"),K),description:Lt(He),warning:R("".concat(D,".deleteDialog.warningText"),Y),confirmText:R("".concat(D,".deleteDialog.deleteText"),ne),cancelText:R("".concat(D,".deleteDialog.cancelText"),"Cancel"),loadingText:R("".concat(D,".deleteDialog.loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!He)return[2];Ke(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,f(He)];case 2:return t.sent(),Qe(null),null===(n=ge.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:I.successToast,content:o(S,{message:U})}),It(),re&&re(!1,ae||void 0),[3,5];case 3:return e=t.sent(),console.error("Failed to delete rule",e),null===(r=ge.current)||void 0===r||r.show({severity:"error",sticky:!1,className:I.errorToast,content:o(j,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||H})}),[3,5];case 4:return Ke(!1),[7];case 5:return[2]}})})},onCancel:function(){return Qe(null)},isLoading:ze}),o(b,{isOpen:!!ot,title:R("".concat(L,".deleteVariant.title"),K),description:"variantDeletion"===tt?o("span",{children:R("".concat(L,".deleteVariant.desc"),"Are you sure you want to delete this variant? This action cannot be undone.")}):Lt((null==ot?void 0:ot.ruleId)||null),warning:R("".concat(L,".deleteVariant.warningText"),"ruleDeletion"===tt?Y:ee),confirmText:R("".concat(L,".deleteDialog.deleteText"),ne),cancelText:R("".concat(L,".cancelText"),"Cancel"),loadingText:R("".concat(L,".loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!ot)return[2];st(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),"ruleDeletion"!==tt?[3,3]:[4,v(ot.ruleId)];case 2:return t.sent(),[3,5];case 3:return[4,f(ot.variantId)];case 4:t.sent(),t.label=5;case 5:return it(null),null===(n=ge.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:I.successToast,content:o(S,{message:"ruleDeletion"===tt?U:q})}),It(),re&&re(!1,ae||void 0),[3,8];case 6:return e=t.sent(),console.error("Failed to delete variant",e),null===(r=ge.current)||void 0===r||r.show({severity:"error",sticky:!1,className:I.errorToast,content:o(j,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||("ruleDeletion"===tt?H:$)})}),[3,8];case 7:return st(!1),[7];case 8:return[2]}})})},onCancel:function(){return it(null)},isLoading:at})]}):xt?o(w,{title:"Scope Not Found",errorMessage:"The selected scope does not exist. Please refresh the page or choose a valid scope.",onRetry:function(){return null==re?void 0:re(!0)},retryButtonText:"Refresh"}):i(l,{children:[o(d,{onCreate:jt,title:N,desc:F,button:B}),ye&&o(k,{children:o(x,{isOpen:ye,onClose:Ct,app_integration_id:oe,token:ie,mode:"ADD",config:he,pluginPayload:r(r({},_t),{initialScope:Dt(),ruleSet:Rt})})})]})};export{M as default};
2
2
  //# sourceMappingURL=RuleContent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{Download as o,Plus as a}from"lucide-react";import t from"../styles/RuleHeader.module.css.js";import{usePermissionsStore as n}from"../store/usePermissionsStore.js";import{dt as l}from"../store/useLMSConfigStore.js";var s=function(s){var d=s.onAddRule,u=s.onOnboardStation,c=s.onExport,m=s.isExporting,p=void 0!==m&&m,b=s.ruleSetId,f=s.ruleSetName,g=s.ruleSetDescription,v=s.isGlobal,h=void 0!==v&&v,x=s.globalLabel,N=void 0===x?l("learnings.globalLearning.globalLabel","Global Learnings ( Default )"):x;s.addExemptionLabel;var L=s.addNewRuleLabel,S=void 0===L?l("learnings.header.addNewLearningButton","Add New Learning"):L,j=n(function(e){return e.hasPermission});if(!f&&!h)return null;var B=h?N:f,E=j("ilotj.rule.create",b||void 0),R=j("ilotj.rule.variant.create",b||void 0),C=E||R;return r("div",e({className:t.container},{children:[r("div",e({className:t.info},{children:[i("h1",{children:B}),g&&i("p",e({className:t.description},{children:g}))]})),r("div",e({className:t.actions,style:{display:"flex",gap:"8px"}},{children:[c&&r("button",e({onClick:c,disabled:p,className:t.exportButton},{children:[i(o,{size:14}),p?"Exporting...":l("learnings.header.exportButton","Export")]})),C&&d&&r("button",e({onClick:d,className:t.addRuleButton},{children:[i(a,{size:14}),S]})),u&&r("button",e({onClick:u,className:t.addRuleButton},{children:[i(a,{size:14}),"Onboard a station"]}))]}))]}))};export{s as default};
1
+ import{__assign as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import{Download as i,Plus as a}from"lucide-react";import t from"../styles/RuleHeader.module.css.js";import{usePermissionsStore as n}from"../store/usePermissionsStore.js";import{dt as l}from"../store/useLMSConfigStore.js";var s=function(s){var d=s.onAddRule,c=s.onOnboardStation,u=s.onExport,m=s.isExporting,p=void 0!==m&&m,b=s.ruleSetId,v=s.ruleSetName,f=s.ruleSetDescription,g=s.isGlobal,h=void 0!==g&&g,x=s.globalLabel,L=void 0===x?l("learnings.globalLearning.globalLabel","Global Learnings ( Default )"):x;s.addExemptionLabel;var N=s.addNewRuleLabel,S=void 0===N?l("learnings.header.addNewLearningButton","Add New Learning"):N,j=s.onboardStationLabel,B=void 0===j?l("middleDrawer.scopeDisplayLimit.onboardBtn","Onboard a station"):j,E=n(function(e){return e.hasPermission});if(!v&&!h)return null;var R=h?L:v,w=E("ilotj.rule.create",b||void 0),y=E("ilotj.rule.variant.create",b||void 0),C=w||y;return o("div",e({className:t.container},{children:[o("div",e({className:t.info},{children:[r("h1",{children:R}),f&&r("p",e({className:t.description},{children:f}))]})),o("div",e({className:t.actions,style:{display:"flex",gap:"8px"}},{children:[u&&o("button",e({onClick:u,disabled:p,className:t.exportButton},{children:[r(i,{size:14}),p?"Exporting...":l("learnings.header.exportButton","Export")]})),C&&d&&o("button",e({onClick:d,className:t.addRuleButton},{children:[r(a,{size:14}),S]})),c&&o("button",e({onClick:c,className:t.addRuleButton},{children:[r(a,{size:14}),B]}))]}))]}))};export{s as default};
2
2
  //# sourceMappingURL=RuleHeader.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import i from"./TierCard.js";import r from"../styles/RuleTierList.module.css.js";var t=function(t){var n=t.tiers,s=t.onToggleTier,l=t.onDeleteRule,a=t.isGlobalScope,d=void 0!==a&&a,u=t.onFetchOverrideHistory,c=t.onEditRule,h=t.onEditVariant,m=t.onDeleteVariant,g=t.highlightedVariants,T=t.highlightedTierNames,R=t.onToggleSuccess,f=t.onReorderRules,p=t.ruleSetId,v=t.onRefreshRuleSets,S=t.setDeleteConfirmationUsedFor,C=t.onCopyToTier;return o("div",e({className:r.container},{children:o("div",e({className:r.tiersList},{children:n.map(function(e){return e.ruleCount>0&&o(i,{tier:e,allTiers:n,onToggle:function(){return s(e.id)},onDeleteRule:l,isGlobalScope:d,onFetchOverrideHistory:u,onEditRule:c,onEditVariant:h,onDeleteVariant:m,highlightedVariants:g,highlightedTierNames:T,onToggleSuccess:R,onReorderRules:f,scopeId:p,onRefreshRuleSets:v,setDeleteConfirmationUsedFor:S,onCopyToTier:C},e.id)})}))}))};export{t as default};
1
+ import{__assign as e}from"tslib";import{jsx as i}from"react/jsx-runtime";import o from"./TierCard.js";import r from"../styles/RuleTierList.module.css.js";var t=function(t){var n=t.tiers,s=t.onToggleTier,l=t.onDeleteRule,a=t.isGlobalScope,d=void 0!==a&&a,u=t.onFetchOverrideHistory,c=t.onEditRule,h=t.onEditVariant,g=t.onDeleteVariant,m=t.highlightedVariants,T=t.highlightedTierNames,R=t.onToggleSuccess,f=t.onReorderRules,p=t.ruleSetId,v=t.onRefreshRuleSets,S=t.setDeleteConfirmationUsedFor,C=t.onCopyToTier;return i("div",e({className:r.container},{children:i("div",e({className:r.tiersList},{children:n.map(function(e){return e.ruleCount>0&&i(o,{tier:e,allTiers:n,onToggle:function(){return s(e.id)},onDeleteRule:l,isGlobalScope:d,onFetchOverrideHistory:u,onEditRule:c,onEditVariant:h,onDeleteVariant:g,highlightedVariants:m,highlightedTierNames:T,onToggleSuccess:R,onReorderRules:f,scopeId:p,onRefreshRuleSets:v,setDeleteConfirmationUsedFor:S,onCopyToTier:C,singleTier:1==n.length},e.id)})}))}))};export{t as default};
2
2
  //# sourceMappingURL=RuleTierList.js.map