@spotify/backstage-plugin-soundcheck 0.19.2 → 0.19.4

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 (290) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/config.d.ts +54 -1
  3. package/dist/alpha/integrations.esm.js +1 -1
  4. package/dist/alpha/pages.esm.js +1 -1
  5. package/dist/alpha.d.ts +2 -2
  6. package/dist/api.esm.js +1 -1
  7. package/dist/blueprints/IntegrationPageBlueprint.esm.js +1 -1
  8. package/dist/components/Badges/NoLevelBadge.esm.js +2 -2
  9. package/dist/components/CampaignCreatePage/CampaignCreatePage.esm.js +1 -1
  10. package/dist/components/CampaignForm/CampaignForm.esm.js +1 -1
  11. package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.esm.js +1 -1
  12. package/dist/components/CampaignForm/hooks/useCampaignForm.esm.js +1 -1
  13. package/dist/components/CampaignPage/CampaignPage.esm.js +2 -0
  14. package/dist/components/CampaignPage/CampaignPageBUI.esm.js +2 -0
  15. package/dist/components/CampaignPage/CampaignPageDeprecated.esm.js +2 -0
  16. package/dist/components/CampaignPage/CampaignStatusHistoryChart.esm.js +2 -0
  17. package/dist/components/CampaignPage/CampaignStatusHistoryTile.esm.js +2 -0
  18. package/dist/components/CampaignPage/CampaignStatusTile.esm.js +2 -0
  19. package/dist/components/CampaignPage/CampaignTechInsightsExplorerPage.esm.js +2 -0
  20. package/dist/components/CampaignsPage/CampaignListPage/CampaignListPageDeprecated.esm.js +2 -0
  21. package/dist/components/CampaignsPage/CampaignListPage/CampaignSummaryCard.esm.js +1 -1
  22. package/dist/components/CampaignsPage/CampaignListPageBUI.esm.js +2 -0
  23. package/dist/components/CampaignsPage/CampaignsPage.esm.js +1 -1
  24. package/dist/components/CampaignsPage/EditCampaignView.esm.js +1 -1
  25. package/dist/components/Cards/CheckStatusCard/CheckStatusCard.esm.js +2 -0
  26. package/dist/components/Cards/DescriptionCard/DescriptionCard.esm.js +2 -0
  27. package/dist/components/Cards/HistoricalCheckStatusCard/HistoricalCheckStatusCard.esm.js +2 -0
  28. package/dist/components/Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js +2 -0
  29. package/dist/components/Cards/TrackStatusCard/TrackStatusCard.esm.js +2 -0
  30. package/dist/components/CertificationAccordion/CertificationAccordion.esm.js +1 -1
  31. package/dist/components/CertificationSidebar/CertificationSidebar.esm.js +1 -1
  32. package/dist/components/CertificationSidebar/CertificationSummary.esm.js +1 -1
  33. package/dist/components/CertificationSidebar/Check.esm.js +1 -1
  34. package/dist/components/CertificationSidebar/ExemptionJustificationDialog.esm.js +1 -1
  35. package/dist/components/CertificationSidebar/LevelSummary.esm.js +1 -1
  36. package/dist/components/CertificationsPage/CertificationTab.esm.js +1 -1
  37. package/dist/components/CertificationsPage/CertificationTabs.esm.js +1 -1
  38. package/dist/components/CertificationsPage/CertificationsPage.esm.js +1 -1
  39. package/dist/components/CertificationsPage/Playlist/PlaylistComponent.esm.js +1 -1
  40. package/dist/components/CertificationsPage/Playlist/PlaylistContext.esm.js +1 -1
  41. package/dist/components/CertificationsPage/Playlist/PlaylistSummary.esm.js +1 -1
  42. package/dist/components/Charts/chartUtils.esm.js +1 -1
  43. package/dist/components/CheckCreatePage/CheckCreatePage.esm.js +1 -1
  44. package/dist/components/CheckDetails/CheckDetails.esm.js +1 -1
  45. package/dist/components/CheckDetails/JustificationDetails.esm.js +1 -1
  46. package/dist/components/CheckDetails/ResultStateBox.esm.js +1 -1
  47. package/dist/components/CheckForm/CheckForm.esm.js +1 -1
  48. package/dist/components/CheckForm/FormFields/CheckPathResolverInput.esm.js +1 -1
  49. package/dist/components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js +1 -1
  50. package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
  51. package/dist/components/CheckForm/FormFields/RuleInput/Conditions/useRuleOptions.esm.js +1 -1
  52. package/dist/components/CheckForm/FormFields/RuleInput/RuleInputBox.esm.js +1 -1
  53. package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
  54. package/dist/components/CheckForm/Steps/CheckApplicabilityStep.esm.js +1 -1
  55. package/dist/components/CheckForm/Steps/CheckDetailsStep.esm.js +1 -1
  56. package/dist/components/CheckForm/Steps/CheckRulesStep.esm.js +1 -1
  57. package/dist/components/CheckForm/useCheckForm.esm.js +1 -1
  58. package/dist/components/CheckPage/CheckEditPage.esm.js +1 -1
  59. package/dist/components/CheckPage/CheckEditView.esm.js +1 -1
  60. package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTableBUI.esm.js +2 -0
  61. package/dist/components/CheckPage/CheckPage.esm.js +2 -0
  62. package/dist/components/CheckPage/CheckPageBUI.esm.js +2 -0
  63. package/dist/components/CheckPage/CheckPageDeprecated.esm.js +2 -0
  64. package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +1 -1
  65. package/dist/components/CheckPage/CheckStatusHistoryChartBUI.esm.js +2 -0
  66. package/dist/components/CheckPage/CheckStatusTable.esm.js +1 -1
  67. package/dist/components/CheckPage/CheckStatusTableBUI.esm.js +2 -0
  68. package/dist/components/CheckPage/ExemptionsTableBUI.esm.js +2 -0
  69. package/dist/components/CheckPage/utils.esm.js +1 -1
  70. package/dist/components/CheckSelection/CheckPreview.esm.js +1 -1
  71. package/dist/components/CheckSelection/CheckSelection.esm.js +1 -1
  72. package/dist/components/CheckStatusBar/CheckStatusBar.esm.js +1 -1
  73. package/dist/components/CheckStatusBar/CheckStatusBarBUI.esm.js +2 -0
  74. package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +1 -1
  75. package/dist/components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js +2 -0
  76. package/dist/components/CheckTemplatesPage/CheckTemplatesPageDeprecated.esm.js +2 -0
  77. package/dist/components/CheckTemplatesPage/TemplateCategoryBUI.esm.js +2 -0
  78. package/dist/components/ChecksPage/CheckListPage/CheckListPageDeprecated.esm.js +2 -0
  79. package/dist/components/ChecksPage/CheckListPage/CheckSummaryCard.esm.js +1 -1
  80. package/dist/components/ChecksPage/ChecksListPageBUI.esm.js +2 -0
  81. package/dist/components/ChecksPage/ChecksPage.esm.js +1 -1
  82. package/dist/components/ChecksTable/ChecksTable.esm.js +2 -0
  83. package/dist/components/ChipSelector/ChipSelector.esm.js +2 -0
  84. package/dist/components/CollapsablePanel/CollapsablePanel.esm.js +1 -1
  85. package/dist/components/CollectorPage/CollectorDetailsPage.esm.js +1 -1
  86. package/dist/components/CollectorPage/CollectorDetailsPageBUI.esm.js +2 -0
  87. package/dist/components/CollectorPage/CollectorDetailsPageDeprecated.esm.js +2 -0
  88. package/dist/components/CollectorPage/CollectorFactTable.esm.js +1 -1
  89. package/dist/components/CollectorPage/CollectorFactTableBUI.esm.js +2 -0
  90. package/dist/components/CollectorPage/CollectorPage.esm.js +1 -1
  91. package/dist/components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js +1 -1
  92. package/dist/components/CollectorPage/Configurators/BigQuery/BigQueryConfigurator.esm.js +1 -1
  93. package/dist/components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js +1 -1
  94. package/dist/components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js +1 -1
  95. package/dist/components/CollectorPage/Configurators/DataRegistry/DataRegistryConfigurator.esm.js +1 -1
  96. package/dist/components/CollectorPage/Configurators/Github/CodeScanningAlertsFactDetails.esm.js +1 -1
  97. package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
  98. package/dist/components/CollectorPage/Configurators/Github/SecretScanningAlertsFactDetails.esm.js +1 -1
  99. package/dist/components/CollectorPage/Configurators/Github/SecurityAdvisoriesFactDetails.esm.js +1 -1
  100. package/dist/components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js +1 -1
  101. package/dist/components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js +1 -1
  102. package/dist/components/CollectorPage/Configurators/HTTP/HttpStatusesInput.esm.js +1 -1
  103. package/dist/components/CollectorPage/Configurators/Jira/IssuesFactDetailsComponent.esm.js +2 -0
  104. package/dist/components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js +1 -1
  105. package/dist/components/CollectorPage/Configurators/Jira/utils.esm.js +1 -1
  106. package/dist/components/CollectorPage/Configurators/Jira/validation.esm.js +1 -1
  107. package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js +1 -1
  108. package/dist/components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js +1 -1
  109. package/dist/components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js +1 -1
  110. package/dist/components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js +1 -1
  111. package/dist/components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js +1 -1
  112. package/dist/components/CollectorPage/DependantCheckCard.esm.js +2 -0
  113. package/dist/components/CollectorsPage/CollectorListPage/CollectorListPageDeprecated.esm.js +2 -0
  114. package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
  115. package/dist/components/CollectorsPage/CollectorsPage.esm.js +1 -1
  116. package/dist/components/CollectorsPage/IntegrationLogoBUI.esm.js +2 -0
  117. package/dist/components/CollectorsPage/IntegrationsListPageBUI.esm.js +2 -0
  118. package/dist/components/CustomCell/CustomCell.esm.js +2 -0
  119. package/dist/components/DescriptionCell/DescriptionCell.esm.js +2 -0
  120. package/dist/components/DocLinkButton/DocLinkButton.esm.js +2 -0
  121. package/dist/components/EmptyState/EmptyStateBUI.esm.js +2 -0
  122. package/dist/components/EmptyState/EmptyStateNoCampaigns.esm.js +2 -0
  123. package/dist/components/EmptyState/EmptyStateNoChecks.esm.js +2 -0
  124. package/dist/components/EmptyState/EmptyStateNoTracks.esm.js +2 -0
  125. package/dist/components/EntitiesAutocompletePicker/EntitiesAutocompletePicker.esm.js +1 -1
  126. package/dist/components/EntitySoundcheckCard/Card.esm.js +1 -1
  127. package/dist/components/ExpandableSection/ExpandableSection.esm.js +1 -1
  128. package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
  129. package/dist/components/FactExplorer/FactExplorerDialogBUI.esm.js +2 -0
  130. package/dist/components/FactExplorer/useFactOptions.esm.js +1 -1
  131. package/dist/components/Filter/EntityAutocompletePicker.esm.js +1 -1
  132. package/dist/components/Filter/FilterComponent.esm.js +1 -1
  133. package/dist/components/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
  134. package/dist/components/Filter/KeyValueInputDialog.esm.js +1 -1
  135. package/dist/components/FilterMenu/FilterMenu.esm.js +2 -0
  136. package/dist/components/FilterSidebar/FilterSidebar.esm.js +1 -1
  137. package/dist/components/FilterSidebar/StateFilter.esm.js +1 -1
  138. package/dist/components/FilterSidebar/useTrackFilterSidebar.esm.js +1 -1
  139. package/dist/components/FilterSidebar/util.esm.js +1 -1
  140. package/dist/components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js +1 -1
  141. package/dist/components/FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js +1 -1
  142. package/dist/components/FormControlledAutocomplete/useLabelValueOptions.esm.js +2 -0
  143. package/dist/components/FormMarkdownInput/FormMarkdownInput.esm.js +1 -1
  144. package/dist/components/FormattedPreview/FormattedPreview.esm.js +1 -1
  145. package/dist/components/GroupHierarchySelector/GroupHierarchyGroupInfo.esm.js +1 -1
  146. package/dist/components/GroupHierarchySelector/GroupHierarchySelector.esm.js +1 -1
  147. package/dist/components/GroupSelectorBUI/GroupSelectList.esm.js +2 -0
  148. package/dist/components/GroupSelectorBUI/GroupSelectionHistory.esm.js +2 -0
  149. package/dist/components/GroupSelectorBUI/GroupSelectorBUI.esm.js +2 -0
  150. package/dist/components/GroupSelectorBUI/GroupTag.esm.js +2 -0
  151. package/dist/components/GroupSelectorBUI/useGroupHistory.esm.js +2 -0
  152. package/dist/components/GroupSelectorBUI/usePreviousSelectedGroups.esm.js +2 -0
  153. package/dist/components/HierarchicalTechInsightsPage/HierarchicalTechInsightsPage.esm.js +1 -1
  154. package/dist/components/HierarchicalTechInsightsPage/HierarchyTable.esm.js +1 -1
  155. package/dist/components/HierarchicalTechInsightsPage/SelectedNodeSidebar.esm.js +1 -1
  156. package/dist/components/HierarchicalTechInsightsPage/visualizations/hierarchyToNivo.esm.js +1 -1
  157. package/dist/components/ImportExportPanel/ImportExportPanelBUI.esm.js +2 -0
  158. package/dist/components/ImportExportPanel/{ImportExportPanel.esm.js → ImportExportPanelDeprecated.esm.js} +2 -2
  159. package/dist/components/LevelUpParty/LevelUpParty.esm.js +1 -1
  160. package/dist/components/LevelsTable/CheckRowContent.esm.js +1 -1
  161. package/dist/components/LevelsTable/LevelsTable.esm.js +1 -1
  162. package/dist/components/ListPageCustomActions/ListPageCustomActions.esm.js +2 -0
  163. package/dist/components/LoadingTableSkeleton/LoadingTableSkeleton.esm.js +2 -0
  164. package/dist/components/Menus/SimpleMenu.esm.js +2 -0
  165. package/dist/components/Menus/useCampaignActions.esm.js +2 -0
  166. package/dist/components/Menus/useCheckActions.esm.js +2 -0
  167. package/dist/components/Menus/useTrackActions.esm.js +2 -0
  168. package/dist/components/OverviewPage/OverviewPage.esm.js +1 -1
  169. package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
  170. package/dist/components/OverviewTable/Cell/CheckCellTooltip.esm.js +1 -1
  171. package/dist/components/OverviewTable/Cell/CheckLabelCell.esm.js +1 -1
  172. package/dist/components/OverviewTable/OverviewTable.esm.js +1 -1
  173. package/dist/components/OverviewTable/ResultsTable.esm.js +1 -1
  174. package/dist/components/PageCustomActions/PageCustomActions.esm.js +2 -0
  175. package/dist/components/PassRateTable/PassRateTable.esm.js +1 -1
  176. package/dist/components/QuickstartPage/QuickstartPage.esm.js +2 -2
  177. package/dist/components/RefetchingIndicator/RefetchingIndicator.esm.js +1 -1
  178. package/dist/components/Router.esm.js +1 -1
  179. package/dist/components/RoutingPage/RoutingMainMenu.esm.js +2 -0
  180. package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
  181. package/dist/components/RoutingPage/RoutingPageBUI.esm.js +2 -0
  182. package/dist/components/RoutingPage/RoutingPageDeprecated.esm.js +2 -0
  183. package/dist/components/RoutingPage/RoutingPageWrapper.esm.js +2 -0
  184. package/dist/components/RoutingPage/RoutingPageWrapperBUI.esm.js +2 -0
  185. package/dist/components/RoutingPage/RoutingPageWrapperDeprecated.esm.js +2 -0
  186. package/dist/components/RoutingPage/index.esm.js +1 -1
  187. package/dist/components/SearchFilters/SearchFilters.esm.js +1 -1
  188. package/dist/components/SendCampaignNotificationDialog/SendCampaignNotificationDialog.esm.js +1 -1
  189. package/dist/components/SoundcheckHeader/SoundcheckHeaderBUI.esm.js +2 -0
  190. package/dist/components/SoundcheckMarkdownContent/ComponentRenders.esm.js +1 -1
  191. package/dist/components/SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js +2 -0
  192. package/dist/components/SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js +2 -0
  193. package/dist/components/StatusBar/StatusBar.esm.js +2 -0
  194. package/dist/components/SummaryCard/SummaryCard.esm.js +1 -1
  195. package/dist/components/SummaryCard/SummaryCardActionsMenu.esm.js +1 -1
  196. package/dist/components/TableRowWithOwner/TableRowWithOwner.esm.js +2 -0
  197. package/dist/components/TeamStatusBar/TeamStatusBar.esm.js +1 -1
  198. package/dist/components/TechHealth/Filters/FacetFilter.esm.js +1 -1
  199. package/dist/components/TechHealth/Filters/useFacetOptions.esm.js +1 -1
  200. package/dist/components/TechHealth/Loading/TechHealthLoading.esm.js +1 -1
  201. package/dist/components/TechHealth/TechHealth.esm.js +1 -1
  202. package/dist/components/TechHealthSummary/SummaryAggregationsProvider.esm.js +1 -1
  203. package/dist/components/TechHealthTabs/CampaignResultsTab/CampaignResultsTab.esm.js +1 -1
  204. package/dist/components/TechHealthTabs/CheckResultsTab/CheckResultsTab.esm.js +1 -1
  205. package/dist/components/TechHealthTabs/EntityResultsTab/EntityResultsTab.esm.js +1 -1
  206. package/dist/components/TechHealthTabs/GroupResultsTab/GroupResultsTab.esm.js +1 -1
  207. package/dist/components/TechHealthTabs/NameColumn.esm.js +1 -1
  208. package/dist/components/TechHealthTabs/TrackResultsTab/TrackResultsTab.esm.js +1 -1
  209. package/dist/components/TechInsights/FilterControls.esm.js +1 -1
  210. package/dist/components/TechInsights/SummaryTiles.esm.js +1 -1
  211. package/dist/components/TechInsights/SummaryTilesBUI.esm.js +2 -0
  212. package/dist/components/TechInsights/TechInsightsPage.esm.js +1 -1
  213. package/dist/components/TechInsights/TechInsightsPageBUI.esm.js +2 -0
  214. package/dist/components/TechInsights/TechInsightsPageDeprecated.esm.js +2 -0
  215. package/dist/components/TechInsights/TechInsightsTableBUI.esm.js +2 -0
  216. package/dist/components/TechInsights/TechInsightsTableView.esm.js +1 -1
  217. package/dist/components/TechInsightsExplorerTable/TechInsightsExplorerTable.esm.js +2 -0
  218. package/dist/components/TechInsightsGroupSelector/TechInsightsGroupSelector.esm.js +1 -1
  219. package/dist/components/TimePeriodBar/TimePeriodBar.esm.js +1 -1
  220. package/dist/components/TimePeriodBar/TimePeriodBarBUI.esm.js +2 -0
  221. package/dist/components/TopAndBottomPerformingTeams/TopAndBottomPerformingTeams.esm.js +2 -0
  222. package/dist/components/TopFailingChecksTable/TopFailingChecksTableBUI.esm.js +2 -0
  223. package/dist/components/TrackCreatePage/TrackCreatePage.esm.js +1 -1
  224. package/dist/components/TrackEditPage/TrackEditPage.esm.js +1 -1
  225. package/dist/components/TrackEditPage/TrackEditView.esm.js +1 -1
  226. package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackBadgeTypeSelect/TrackBadgeTypeSelect.esm.js +1 -1
  227. package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
  228. package/dist/components/TrackForm/TrackForm.esm.js +1 -1
  229. package/dist/components/TrackForm/utils/useTrackForm.esm.js +1 -1
  230. package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js +1 -1
  231. package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js +2 -0
  232. package/dist/components/TrackPage/TrackHistoryChart.esm.js +1 -1
  233. package/dist/components/TrackPage/TrackHistoryChartBUI.esm.js +2 -0
  234. package/dist/components/TrackPage/TrackPage.esm.js +1 -1
  235. package/dist/components/TrackPage/TrackPageBUI.esm.js +2 -0
  236. package/dist/components/TrackPage/TrackPageDeprecated.esm.js +2 -0
  237. package/dist/components/TrackPage/TrackStatusBarBUI.esm.js +2 -0
  238. package/dist/components/TrackPage/TrackStatusTableBUI.esm.js +2 -0
  239. package/dist/components/TrackPage/TrackTechInsightsExplorerPage.esm.js +2 -0
  240. package/dist/components/TrackSelection/TrackSelection.esm.js +1 -1
  241. package/dist/components/TracksPage/TrackListPage/TrackListPageDeprecated.esm.js +2 -0
  242. package/dist/components/TracksPage/TrackListPage/TrackSummaryCard.esm.js +1 -1
  243. package/dist/components/TracksPage/TracksListPageBUI.esm.js +2 -0
  244. package/dist/components/TracksPage/TracksPage.esm.js +1 -1
  245. package/dist/graphql/generated/index.esm.js +126 -117
  246. package/dist/hooks/aggregations/useCheckStatus.esm.js +1 -1
  247. package/dist/hooks/catalog/useGetEntityRefs.esm.js +1 -1
  248. package/dist/hooks/catalog/useGetLimitedEntityRefs.esm.js +1 -1
  249. package/dist/hooks/catalog/useProfileImages.esm.js +2 -0
  250. package/dist/hooks/checks/useCheckDetails.esm.js +1 -1
  251. package/dist/hooks/entities/useTrackEntities.esm.js +1 -1
  252. package/dist/hooks/filters/useFilters.esm.js +2 -0
  253. package/dist/hooks/graphqlKeys.esm.js +1 -1
  254. package/dist/hooks/groups/useAllGroups.esm.js +1 -1
  255. package/dist/hooks/groups/useGroupOptions.esm.js +1 -1
  256. package/dist/hooks/groups/useUsersGroupClaims.esm.js +1 -1
  257. package/dist/hooks/heirarchy/useBatchedHierarchicalTrackStatuses.esm.js +1 -1
  258. package/dist/hooks/heirarchy/useGroupHierarchy.esm.js +1 -1
  259. package/dist/hooks/tracks/useRecertifyTrack.esm.js +2 -0
  260. package/dist/hooks/tracks/useTracksApplicableToGroup.esm.js +1 -1
  261. package/dist/hooks/useConfirmationModal.esm.js +1 -1
  262. package/dist/hooks/useLoadTimeReporting.esm.js +2 -0
  263. package/dist/hooks/usePagination.esm.js +2 -0
  264. package/dist/hooks/useSearchName.esm.js +2 -0
  265. package/dist/hooks/useSortTableLocalStorage.esm.js +2 -0
  266. package/dist/routes.esm.js +1 -1
  267. package/dist/utils/charts.esm.js +1 -1
  268. package/dist/utils/formStyles.esm.js +1 -1
  269. package/dist/utils/formatters.esm.js +1 -1
  270. package/dist/utils/helpers.esm.js +1 -1
  271. package/dist/utils/lcpReporting.esm.js +1 -1
  272. package/dist/utils/time.esm.js +1 -1
  273. package/package.json +25 -33
  274. package/dist/components/CampaignInsightsPage/CampaignInsightsPage.esm.js +0 -2
  275. package/dist/components/CampaignInsightsPage/CampaignStatusHistoryTile.esm.js +0 -2
  276. package/dist/components/CampaignInsightsPage/CampaignStatusTile.esm.js +0 -2
  277. package/dist/components/CampaignsPage/CampaignListPage/CampaignListPage.esm.js +0 -2
  278. package/dist/components/CheckPage/CheckInsightsPage.esm.js +0 -2
  279. package/dist/components/ChecksPage/CheckListPage/CheckListPage.esm.js +0 -2
  280. package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js +0 -2
  281. package/dist/components/CollectorsPage/CollectorListPage/CollectorListPage.esm.js +0 -2
  282. package/dist/components/GroupHierarchySelector/usePreviousSelectedGroups.esm.js +0 -2
  283. package/dist/components/SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js +0 -2
  284. package/dist/components/TechInsights/TechInsightsCardsView.esm.js +0 -2
  285. package/dist/components/TechInsights/TrackStatusCard.esm.js +0 -2
  286. package/dist/components/TechInsights/ViewModeControls.esm.js +0 -2
  287. package/dist/components/TechInsights/convertToCommonTrackStatus.esm.js +0 -2
  288. package/dist/components/TracksPage/TrackListPage/TrackListPage.esm.js +0 -2
  289. /package/dist/components/{CampaignInsightsPage → CampaignPage}/DaysRemainingTile.esm.js +0 -0
  290. /package/dist/{components/GroupHierarchySelector → utils}/getAllOwnedEntityCount.esm.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @spotify/backstage-plugin-soundcheck
2
2
 
3
+ ## 0.19.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependency `backstage` to `1.44.1`.
8
+ - Fixed an issue where collectors page would error if there are incorrectly formatted values.
9
+ - Soundcheck - GQL efficiency updates.
10
+ - Entities Owner filter is searchable by name, title, description.
11
+ - Fixed an issue where a check rule's path was missing in the UI when using a non-default path resolver.
12
+ - Added sunset notice as a dismissible banner on the Soundcheck Tech Health page.
13
+ - Resolved an issue where the "Cannot edit check" warning would occasionally appear after updating a check.
14
+ - More efficient storage and transmission of group hierarchies.
15
+ - Updated dependencies
16
+ - Updated dependencies
17
+ - @spotify/backstage-plugin-core@0.8.11
18
+ - @spotify/backstage-plugin-soundcheck-common@0.19.2
19
+
20
+ ## 0.19.3
21
+
22
+ ### Patch Changes
23
+
24
+ - Support tracks in addition to programs in Soundcheck configs
25
+ - Updated track insights page default sort order to be applicable entity count desc.
26
+ - Added Soundcheck Tech Insights page that provides analytics for tracking software quality metrics across your organization.
27
+ - Added navigation performance metric (page load time on client-side route navigation).
28
+ - Fixed owners filter to support name, title, description on the Check & Track creation pages
29
+ - Removed tooltip from Tech Insights Table bars and displayed Compliance percentage.
30
+ - ** Breaking Changes **: Jira's [Search for issues using JQL](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-get) API was removed for Jira Cloud instances.
31
+ Soundcheck will now fetch `issue-search` fact data from Jira's [Search for issues using JQL enhanced search](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-post) API for Jira Cloud instances.
32
+
33
+ - Updated deprecated API calls for issues-search facts for Jira Cloud instances.
34
+ - Added support for issues-count fact that returns a number of issues matching JQL.
35
+ - Added support for personal access token (bearer token) authentication.
36
+ - Added support for top-level configuration for Jira Fact Collector.
37
+
38
+ - Cleanup unused packages in Soundcheck
39
+ - On-demand track recertification is now available in the UI. This feature allows for the generation
40
+ of historical certification data that accurately reflects the current state of a track.
41
+ - Fixed Check Insights Page History when Status Filters are applied.
42
+ - Fixes some tests.
43
+ - Added total track/campaign count to distinguish from applicable ones on the tech insights page.
44
+ - Removed card view from Tech Insights Page and updated stats cards.
45
+ - Added a filter by status for the entities table on the Campaign insights page.
46
+ - Updated dependencies
47
+ - Updated dependencies
48
+ - Updated dependencies
49
+ - Updated dependencies
50
+ - Updated dependencies
51
+ - Updated dependencies
52
+ - @spotify/backstage-plugin-soundcheck-common@0.19.1
53
+
3
54
  ## 0.19.2
4
55
 
5
56
  ### Patch Changes
package/config.d.ts CHANGED
@@ -1,8 +1,61 @@
1
+ import { EntityFilter } from '@spotify/backstage-plugin-soundcheck-common';
2
+
1
3
  export interface Config {
2
4
  /**
3
5
  * Configuration options for the soundcheck plugin.
4
6
  */
5
7
  soundcheck?: {
8
+ /**
9
+ * Configuration options for soundcheck check results.
10
+ *
11
+ * @visibility frontend
12
+ */
13
+ results?: {
14
+ /**
15
+ * Configuration options for the check result history.
16
+ *
17
+ * @visibility frontend
18
+ */
19
+ history?: {
20
+ /**
21
+ * Flag that enables/disables tracking check result history and recording check result
22
+ * state changes into a check_result_history table. Default value is 'false'.
23
+ *
24
+ * @visibility frontend
25
+ */
26
+ enable?: boolean;
27
+ /**
28
+ * Indicates retention time of the records in check_result_history table in days.
29
+ * Default value is 120 days.
30
+ *
31
+ * @visibility frontend
32
+ */
33
+ retentionTimeInDays?: number;
34
+ };
35
+ };
36
+ /**
37
+ * Configuration options for the certification history.
38
+ *
39
+ * @visibility frontend
40
+ */
41
+ certifications?: {
42
+ history?: {
43
+ /**
44
+ * Flag that enables/disables tracking certification history and recording the level
45
+ * certification changes into a certification_history table. Default value is 'false'.
46
+ *
47
+ * @visibility frontend
48
+ */
49
+ enable?: boolean;
50
+ /**
51
+ * Indicates retention time of the records in certification_history table in days.
52
+ * Default value is 120 days.
53
+ *
54
+ * @visibility frontend
55
+ */
56
+ retentionTimeInDays?: number;
57
+ };
58
+ };
6
59
  /**
7
60
  * @visibility frontend
8
61
  */
@@ -40,7 +93,7 @@ export interface Config {
40
93
  */
41
94
  notifications?: {
42
95
  /**
43
- * Enabled or disable notification on a global level.
96
+ * Enable or disable notifications on a global level.
44
97
  *
45
98
  * @visibility frontend
46
99
  */
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{IntegrationPageBlueprint as t}from"../blueprints/IntegrationPageBlueprint.esm.js";const r=t.make({name:"azure",params:{integrationId:"azure",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"azure"}))}}),o=t.make({name:"bigquery",params:{integrationId:"bigquery",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"bigquery"}))}}),n=t.make({name:"catalog",params:{integrationId:"catalog",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"catalog"}))}}),i=t.make({name:"datadog",params:{integrationId:"datadog",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"datadog"}))}}),l=t.make({name:"data-registry",params:{integrationId:"data-registry",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"data-registry"}))}}),g=t.make({name:"github",params:{integrationId:"github",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"github"}))}}),c=t.make({name:"gitlab",params:{integrationId:"gitlab",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"gitlab"}))}}),m=t.make({name:"http",params:{integrationId:"http",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"http"}))}}),d=t.make({name:"jira",params:{integrationId:"jira",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"jira"}))}}),s=t.make({name:"kubernetes",params:{integrationId:"kubernetes",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"kubernetes"}))}}),I=t.make({name:"newrelic",params:{integrationId:"newrelic",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"newrelic"}))}}),p=t.make({name:"pagerduty",params:{integrationId:"pagerduty",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"pagerduty"}))}}),y=t.make({name:"scm",params:{integrationId:"scm",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"scm"}))}}),u=t.make({name:"sonarqube",params:{integrationId:"sonarqube",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(a=>e(a.CollectorPage,{collectorId:"sonarqube"}))}});export{r as azureIntegration,o as bigqueryIntegration,n as catalogIntegration,l as dataRegistryIntegration,i as datadogIntegration,g as githubIntegration,c as gitlabIntegration,m as httpIntegration,d as jiraIntegration,s as kubernetesIntegration,I as newrelicIntegration,p as pagerdutyIntegration,y as scmIntegration,u as sonarqubeIntegration};
1
+ import{jsx as a}from"react/jsx-runtime";import{IntegrationPageBlueprint as t}from"../blueprints/IntegrationPageBlueprint.esm.js";const r=t.make({name:"azure",params:{integrationId:"azure",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"azure",includeHeader:!0}))}}),o=t.make({name:"bigquery",params:{integrationId:"bigquery",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"bigquery",includeHeader:!0}))}}),n=t.make({name:"catalog",params:{integrationId:"catalog",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"catalog",includeHeader:!0}))}}),i=t.make({name:"datadog",params:{integrationId:"datadog",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"datadog",includeHeader:!0}))}}),l=t.make({name:"data-registry",params:{integrationId:"data-registry",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"data-registry",includeHeader:!0}))}}),d=t.make({name:"github",params:{integrationId:"github",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"github",includeHeader:!0}))}}),c=t.make({name:"gitlab",params:{integrationId:"gitlab",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"gitlab",includeHeader:!0}))}}),g=t.make({name:"http",params:{integrationId:"http",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"http",includeHeader:!0}))}}),m=t.make({name:"jira",params:{integrationId:"jira",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"jira",includeHeader:!0}))}}),s=t.make({name:"kubernetes",params:{integrationId:"kubernetes",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"kubernetes",includeHeader:!0}))}}),I=t.make({name:"newrelic",params:{integrationId:"newrelic",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"newrelic",includeHeader:!0}))}}),p=t.make({name:"pagerduty",params:{integrationId:"pagerduty",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"pagerduty",includeHeader:!0}))}}),u=t.make({name:"scm",params:{integrationId:"scm",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"scm",includeHeader:!0}))}}),y=t.make({name:"sonarqube",params:{integrationId:"sonarqube",loader:async()=>import("../components/CollectorPage/CollectorPage.esm.js").then(e=>a(e.CollectorPage,{collectorId:"sonarqube",includeHeader:!0}))}});export{r as azureIntegration,o as bigqueryIntegration,n as catalogIntegration,l as dataRegistryIntegration,i as datadogIntegration,d as githubIntegration,c as gitlabIntegration,g as httpIntegration,m as jiraIntegration,s as kubernetesIntegration,I as newrelicIntegration,p as pagerdutyIntegration,u as scmIntegration,y as sonarqubeIntegration};
2
2
  //# sourceMappingURL=integrations.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{convertLegacyRouteRef as n,compatWrapper as i}from"@backstage/core-compat-api";import{PageBlueprint as a,createExtensionInput as s,coreExtensionData as t}from"@backstage/frontend-plugin-api";import{integrationIdExtensionDataRef as u}from"../blueprints/IntegrationPageBlueprint.esm.js";import{rootRouteRef as c}from"../routes.esm.js";const f=a.makeWithOverrides({name:"SoundcheckRoutingPage",inputs:{integrations:s([t.routePath,t.reactElement,t.routeRef.optional(),u])},config:{schema:{title:e=>e.string().optional()}},factory(e,{config:g,inputs:m}){return e({routeRef:n(c),path:"/soundcheck",loader:()=>import("../components/RoutingPage/index.esm.js").then(p=>i(r(p.RoutingPage,{title:g.title,integrations:m.integrations.map(o=>({integrationId:o.get(u),routePath:o.get(t.routePath),routeRef:o.get(t.routeRef)}))})))})}}),h=a.make({name:"overview",params:{routeRef:n(c),path:"/soundcheck",loader:()=>import("../components/OverviewPage/index.esm.js").then(e=>i(r(e.OverviewPage,{})))}});export{h as soundcheckOverviewPage,f as soundcheckRoutingPage};
1
+ import{jsx as r}from"react/jsx-runtime";import{convertLegacyRouteRef as n,compatWrapper as i}from"@backstage/core-compat-api";import{PageBlueprint as a,createExtensionInput as s,coreExtensionData as t}from"@backstage/frontend-plugin-api";import{integrationIdExtensionDataRef as u}from"../blueprints/IntegrationPageBlueprint.esm.js";import{rootRouteRef as c}from"../routes.esm.js";const f=a.makeWithOverrides({name:"SoundcheckRoutingPage",inputs:{integrations:s([t.routePath,t.reactElement,t.routeRef.optional(),u])},config:{schema:{title:e=>e.string().optional()}},factory(e,{config:g,inputs:m}){return e({routeRef:n(c),path:"/soundcheck",loader:()=>import("../components/RoutingPage/RoutingPage.esm.js").then(p=>i(r(p.RoutingPage,{title:g.title,integrations:m.integrations.map(o=>({integrationId:o.get(u),routePath:o.get(t.routePath),routeRef:o.get(t.routeRef)}))})))})}}),h=a.make({name:"overview",params:{routeRef:n(c),path:"/soundcheck",loader:()=>import("../components/OverviewPage/index.esm.js").then(e=>i(r(e.OverviewPage,{})))}});export{h as soundcheckOverviewPage,f as soundcheckRoutingPage};
2
2
  //# sourceMappingURL=pages.esm.js.map
package/dist/alpha.d.ts CHANGED
@@ -75,7 +75,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
75
75
  defaultTitle?: [Error: `Use the 'title' param instead`];
76
76
  title: string;
77
77
  defaultGroup?: [Error: `Use the 'group' param instead`];
78
- group?: ("operation" | "development" | "documentation" | "deployment" | "overview" | "observability") | (string & {});
78
+ group?: ("operation" | "development" | "overview" | "documentation" | "deployment" | "observability") | (string & {});
79
79
  loader: () => Promise<JSX.Element>;
80
80
  routeRef?: _backstage_frontend_plugin_api.RouteRef;
81
81
  filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
@@ -112,7 +112,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
112
112
  defaultTitle?: [Error: `Use the 'title' param instead`];
113
113
  title: string;
114
114
  defaultGroup?: [Error: `Use the 'group' param instead`];
115
- group?: ("operation" | "development" | "documentation" | "deployment" | "overview" | "observability") | (string & {});
115
+ group?: ("operation" | "development" | "overview" | "documentation" | "deployment" | "observability") | (string & {});
116
116
  loader: () => Promise<JSX.Element>;
117
117
  routeRef?: _backstage_frontend_plugin_api.RouteRef;
118
118
  filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
package/dist/api.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{createApiRef as c}from"@backstage/core-plugin-api";import{GraphQLClient as h}from"graphql-request";import{getSdk as u}from"./graphql/generated/index.esm.js";const y=c({id:"plugin.soundcheck"}),o=i=>"response"in i&&"errors"in i.response,l=i=>"response"in i&&"message"in i.response;class g{#a;#s;#t;constructor(t){this.#a=t.fetchApi,this.#s=t.discoveryApi;const e=new h("/graphql",{fetch:async(a,s)=>{const r=`${await this.#s.getBaseUrl("soundcheck")}${a}`;return this.#a.fetch(r,s)}});this.#t=u(e)}#i=t=>o(t)?t.response?.errors?.[0].message??`${t}`:l(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#i(e)}`)}};async getMultipleTrackStatuses(t){return this.#e(async()=>{const{multipleTrackStatuses:e}=await this.#t.getMultipleTrackStatuses({input:t});return e})}async getAllCertifications(t,e=!1,a=!1){return this.#e(async()=>{const{certifications:s}=await this.#t.getAllCertifications({entityRef:t,includeFilteredChecks:e,includeDraftTracks:a});return s})}async getCertificationDetails(t,e=!1,a=!1){return this.#e(async()=>{const{certifications:s}=await this.#t.getCertificationDetails({entityRef:t,includeFilteredChecks:e,includeDraftTracks:a});return s})}async getCertificationDetailsForTrack(t,e,a){return this.#e(async()=>{const{trackCertification:s}=await this.#t.getCertificationDetailsForTrack({entityRef:t,trackId:e,includeFilteredChecks:a});return s})}async getCheckResultDetails(t,e,a){return this.#e(async()=>{const{checkResult:s}=await this.#t.getCheckResultDetails({entityRef:t,trackId:e,checkId:a});return s})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getTrackOverviewForOwner(t,e,a,s,r){return this.#e(async()=>{const{trackOverviewForOwner:n}=await this.#t.getTrackOverviewForOwner({ownerEntityRef:t,facet:e,first:a,after:s,entitySearch:r});return n})}async getTracks(t){return this.#e(async()=>{const{tracks:e}=await this.#t.getTracks({filter:t});return e})}async getTracksApplicableEntityCount(t,e){return this.#e(async()=>{const{tracks:a}=await this.#t.getTracksApplicableEntityCount({filter:t,groupRef:e});return a?.edges?.map(({node:s})=>({id:s.id,applicableEntityCount:s.applicableEntityCount??0}))})}async getTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.getTrack({id:t});return e})}async createTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.createTrack({input:t});return e})}async updateTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.updateTrack({input:t});return e})}async deleteTrack(t){return this.#e(async()=>{const{trackDeleted:e}=await this.#t.deleteTrack({trackId:t});return e})}async importTracks(t){return this.#e(async()=>{const{status:e}=await this.#t.importTracks({tracks:t});return e})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getCheck(t){return this.#e(async()=>(await this.#t.getCheck({id:t})).check)}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async getExecutableChecks(){return this.#e(async()=>{const{executableChecks:t}=await this.#t.getExecutableChecks();return t})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async importChecks(t){return this.#e(async()=>{const{status:e}=await this.#t.importCheckers({checkers:t});return e})}async setEntityExempt(t){return this.#e(async()=>{const{setEntityExempt:e}=await this.#t.setEntityExempt({input:t});return e})}async setManualCheckResult(t){return this.#e(async()=>await this.#t.setManualCheckResult({input:t}))}async deleteExemption(t,e){return this.#e(async()=>await this.#t.deleteExemption({checkId:t,entityRef:e}))}async getExemption(t,e){return this.#e(async()=>await this.#t.getExemption({checkId:t,entityRef:e}))}async getExemptions(t,e,a,s,r){return this.#e(async()=>await this.#t.getExemptions({checkId:t,first:e,after:a,last:s,before:r}))}async getExemptCheckIds(t,e){return this.#e(async()=>await this.#t.getExemptCheckIds({entityRef:t,trackId:e}))}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:a}=await this.#t.getFactSchemas({collectorId:t,factName:e});return a})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async deleteCollectorConfig(t){return this.#e(async()=>await this.#t.deleteCollectorConfig({collectorId:t}))}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t,e){return this.#e(async()=>{const{campaigns:a}=await this.#t.getCampaigns({filter:t,byTrackIds:e});return a})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async sendCampaignNotification(t){return this.#e(async()=>{const{sendCampaignNotification:e}=await this.#t.sendCampaignNotification({input:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getTrackStatusHistory(t){return this.#e(async()=>(await this.#t.getTrackStatusHistory({input:t})).trackStatusHistory)}async getTrackStatusHistories(t){return this.#e(async()=>(await this.#t.getTrackStatusHistories({input:t})).trackStatusHistories)}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatuses(t){return this.#e(async()=>(await this.#t.getCheckStatuses({input:t})).checkStatuses)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckStatusHistoriesMultiFilter(t){return this.#e(async()=>(await this.#t.getCheckStatusHistoriesMultiFilter({input:t})).checkStatusHistoriesMultiFilter)}async getCheckStatusHistories(t){return this.#e(async()=>(await this.#t.getCheckStatusHistories({input:t})).checkStatusHistories)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}async getSavedViews(t){return this.#e(async()=>await this.#t.getSavedViews({input:t}))}async saveView(t){return this.#e(async()=>{const{saveView:e}=await this.#t.saveView({input:t});return e})}async deleteView(t){return this.#e(async()=>{const{deleteView:e}=await this.#t.deleteView({input:t});return e})}async getPathResolvers(){return this.#e(async()=>{const{pathResolvers:t}=await this.#t.getPathResolvers();return t})}async getCheckTemplates(){return this.#e(async()=>{const{checkerTemplates:t}=await this.#t.getCheckTemplates();return t})}async getFact(t){return this.#e(async()=>{const{fact:e}=await this.#t.getFact(t);return e})}async getGroupTypeHierarchy(){return this.#e(async()=>{const{groupTypeHierarchy:t}=await this.#t.getGroupTypeHierarchy();return t})}async getGroupHierarchy(t,e,a){return this.#e(async()=>{const{groupHierarchy:s}=await this.#t.getGroupHierarchy({groupRef:t,ownedEntitiesFilter:e,includeParent:a});return s})}async getHierarchicalTrackStatus(t,e){return this.#e(async()=>{const{hierarchicalTrackStatus:a}=await this.#t.getHierarchicalTrackStatus({trackId:t,groupRef:e});return a})}async getHierarchicalTrackStatuses(t,e){return this.#e(async()=>{const{hierarchicalTrackStatuses:a}=await this.#t.getHierarchicalTrackStatuses({trackIds:t,groupRef:e});return a})}async recordLoadTime(t){return this.#e(async()=>await this.#t.recordLoadTime({input:{routeName:t.routeName,loadTimeMs:t.loadTimeMs,additionalAttributes:t.additionalAttributes}}))}}export{g as SoundcheckApi,y as soundcheckApiRef};
1
+ import{createApiRef as u}from"@backstage/core-plugin-api";import{GraphQLClient as y}from"graphql-request";import o from"pako";import{getSdk as l}from"./graphql/generated/index.esm.js";const g=u({id:"plugin.soundcheck"}),k=i=>"response"in i&&"errors"in i.response,p=i=>"response"in i&&"message"in i.response;class w{#a;#s;#t;constructor(t){this.#a=t.fetchApi,this.#s=t.discoveryApi;const e=new y("/graphql",{fetch:async(a,s)=>{const r=`${await this.#s.getBaseUrl("soundcheck")}${a}`;return this.#a.fetch(r,s)}});this.#t=l(e)}#r=t=>k(t)?t.response?.errors?.[0].message??`${t}`:p(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#r(e)}`)}};async getMultipleTrackStatuses(t){return this.#e(async()=>{const{multipleTrackStatuses:e}=await this.#t.getMultipleTrackStatuses({input:t});return e})}async getAllCertifications(t,e=!1,a=!1){return this.#e(async()=>{const{certifications:s}=await this.#t.getAllCertifications({entityRef:t,includeFilteredChecks:e,includeDraftTracks:a});return s})}async getCertificationDetails(t,e=!1,a=!1){return this.#e(async()=>{const{certifications:s}=await this.#t.getCertificationDetails({entityRef:t,includeFilteredChecks:e,includeDraftTracks:a});return s})}async getCertificationDetailsForTrack(t,e,a){return this.#e(async()=>{const{trackCertification:s}=await this.#t.getCertificationDetailsForTrack({entityRef:t,trackId:e,includeFilteredChecks:a});return s})}async getCheckResultDetails(t,e,a){return this.#e(async()=>{const{checkResult:s}=await this.#t.getCheckResultDetails({entityRef:t,trackId:e,checkId:a});return s})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getTrackOverviewForOwner(t,e,a,s,r){return this.#e(async()=>{const{trackOverviewForOwner:n}=await this.#t.getTrackOverviewForOwner({ownerEntityRef:t,facet:e,first:a,after:s,entitySearch:r});return n})}async getTracks(t){return this.#e(async()=>{const{tracks:e}=await this.#t.getTracks({filter:t});return e})}async getTracksApplicableEntityCount(t,e){return this.#e(async()=>{const{tracks:a}=await this.#t.getTracksApplicableEntityCount({filter:t,groupRef:e});return a?.edges?.map(({node:s})=>({id:s.id,applicableEntityCount:s.applicableEntityCount??0}))})}async getTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.getTrack({id:t});return e})}async createTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.createTrack({input:t});return e})}async updateTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.updateTrack({input:t});return e})}async deleteTrack(t){return this.#e(async()=>{const{trackDeleted:e}=await this.#t.deleteTrack({trackId:t});return e})}async importTracks(t){return this.#e(async()=>{const{status:e}=await this.#t.importTracks({tracks:t});return e})}async recertifyTrack(t,e,a){return this.#e(async()=>{const{trackRecertified:s}=await this.#t.recertifyTrack({trackId:t,numberOfDays:e,loggedInUserRef:a});return s})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getCheck(t){return this.#e(async()=>(await this.#t.getCheck({id:t})).check)}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async getExecutableChecks(){return this.#e(async()=>{const{executableChecks:t}=await this.#t.getExecutableChecks();return t})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async importChecks(t){return this.#e(async()=>{const{status:e}=await this.#t.importCheckers({checkers:t});return e})}async setEntityExempt(t){return this.#e(async()=>{const{setEntityExempt:e}=await this.#t.setEntityExempt({input:t});return e})}async setManualCheckResult(t){return this.#e(async()=>await this.#t.setManualCheckResult({input:t}))}async deleteExemption(t,e){return this.#e(async()=>await this.#t.deleteExemption({checkId:t,entityRef:e}))}async getExemption(t,e){return this.#e(async()=>await this.#t.getExemption({checkId:t,entityRef:e}))}async getExemptions(t,e,a,s,r){return this.#e(async()=>await this.#t.getExemptions({checkId:t,first:e,after:a,last:s,before:r}))}async getExemptCheckIds(t,e){return this.#e(async()=>await this.#t.getExemptCheckIds({entityRef:t,trackId:e}))}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:a}=await this.#t.getFactSchemas({collectorId:t,factName:e});return a})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async deleteCollectorConfig(t){return this.#e(async()=>await this.#t.deleteCollectorConfig({collectorId:t}))}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t,e){return this.#e(async()=>{const{campaigns:a}=await this.#t.getCampaigns({filter:t,byTrackIds:e});return a})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async sendCampaignNotification(t){return this.#e(async()=>{const{sendCampaignNotification:e}=await this.#t.sendCampaignNotification({input:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getTrackStatusHistory(t){return this.#e(async()=>(await this.#t.getTrackStatusHistory({input:t})).trackStatusHistory)}async getTrackStatusHistories(t){return this.#e(async()=>(await this.#t.getTrackStatusHistories({input:t})).trackStatusHistories)}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatuses(t){return this.#e(async()=>(await this.#t.getCheckStatuses({input:t})).checkStatuses)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckStatusHistoriesMultiFilter(t){return this.#e(async()=>(await this.#t.getCheckStatusHistoriesMultiFilter({input:t})).checkStatusHistoriesMultiFilter)}async getCheckStatusHistories(t){return this.#e(async()=>(await this.#t.getCheckStatusHistories({input:t})).checkStatusHistories)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}async getSavedViews(t){return this.#e(async()=>await this.#t.getSavedViews({input:t}))}async saveView(t){return this.#e(async()=>{const{saveView:e}=await this.#t.saveView({input:t});return e})}async deleteView(t){return this.#e(async()=>{const{deleteView:e}=await this.#t.deleteView({input:t});return e})}async getPathResolvers(){return this.#e(async()=>{const{pathResolvers:t}=await this.#t.getPathResolvers();return t})}async getCheckTemplates(){return this.#e(async()=>{const{checkerTemplates:t}=await this.#t.getCheckTemplates();return t})}async getFact(t){return this.#e(async()=>{const{fact:e}=await this.#t.getFact(t);return e})}async getGroupTypeHierarchy(){return this.#e(async()=>{const{groupTypeHierarchy:t}=await this.#t.getGroupTypeHierarchy();return t})}async getGroupHierarchy(t,e,a){return this.#e(async()=>{const{groupHierarchy:s}=await this.#t.getGroupHierarchy({groupRef:t,ownedEntitiesFilter:e,includeParent:a}),r=Uint8Array.from(atob(s.hierarchy),h=>h.charCodeAt(0)),n=o.inflate(r),c=String.fromCharCode(...n);return{hierarchy:JSON.parse(c)}})}async getHierarchicalTrackStatus(t,e){return this.#e(async()=>{const{hierarchicalTrackStatus:a}=await this.#t.getHierarchicalTrackStatus({trackId:t,groupRef:e});return a})}async getHierarchicalTrackStatuses(t,e){return this.#e(async()=>{const{hierarchicalTrackStatuses:a}=await this.#t.getHierarchicalTrackStatuses({trackIds:t,groupRef:e});return a})}async recordLoadTime(t){return this.#e(async()=>await this.#t.recordLoadTime({input:{metricType:t.metricType,routeName:t.routeName,loadTimeMs:t.loadTimeMs,additionalAttributes:t.additionalAttributes}}))}}export{w as SoundcheckApi,g as soundcheckApiRef};
2
2
  //# sourceMappingURL=api.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as o}from"react/jsx-runtime";import{compatWrapper as c}from"@backstage/core-compat-api";import{createExtensionDataRef as s,createExtensionBlueprint as g,coreExtensionData as t,ExtensionBoundary as l}from"@backstage/frontend-plugin-api";import{lazy as f}from"react";import{RoutingPageWrapper as m}from"../components/RoutingPage/RoutingPage.esm.js";const e=s().with({id:"soundcheck.integrationId"}),h=g({kind:"integration",attachTo:[{id:"page:soundcheck/SoundcheckRoutingPage",input:"integrations"},{id:"app/routes",input:"routes"}],output:[t.routePath,t.reactElement,t.routeRef.optional(),e],dataRefs:{integrationId:e},*factory({integrationId:n,loader:r,path:a,routeRef:i},{node:d}){const p=f(()=>r().then(u=>({default:()=>u})));yield t.routePath(a??`/soundcheck/integrations/${n}/edit`),yield t.reactElement(c(o(l,{node:d,children:o(m,{children:o(p,{})})}))),i&&(yield t.routeRef(i)),yield e(n)}});export{h as IntegrationPageBlueprint,e as integrationIdExtensionDataRef};
1
+ import{jsx as i}from"react/jsx-runtime";import{compatWrapper as u}from"@backstage/core-compat-api";import{createExtensionDataRef as c,createExtensionBlueprint as s,coreExtensionData as t,ExtensionBoundary as g}from"@backstage/frontend-plugin-api";import{lazy as l}from"react";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@backstage/ui";import"@spotify/backstage-plugin-soundcheck-common";import"react-helmet";import"react-router-dom";import"../routes.esm.js";import"../components/CampaignPage/CampaignPageBUI.esm.js";import"../components/CampaignPage/CampaignPageDeprecated.esm.js";import"../components/CampaignPage/CampaignTechInsightsExplorerPage.esm.js";import"../utils/filters.esm.js";import"../components/SoundcheckHeader/SoundcheckHeader.esm.js";import"../components/SoundcheckHeader/SoundcheckHeaderContext.esm.js";import"../components/CampaignsPage/CampaignListPage/CampaignListPageDeprecated.esm.js";import"../components/CampaignsPage/CampaignListPage/CampaignTypes.esm.js";import"../components/CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import"../components/CampaignsPage/CampaignListPageBUI.esm.js";import"../contexts/TrackFormContext.esm.js";import"../contexts/CheckFormContext.esm.js";import"../contexts/CampaignFormContext.esm.js";import"../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../api.esm.js";import"../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../hooks/useSoundcheckAlert.esm.js";import"../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import"../components/CampaignForm/CampaignForm.esm.js";import"@remixicon/react";import"../components/PageWarningMessage/PageWarningMessage.esm.js";import"../components/TechHealth/Loading/Loading.esm.js";import"../components/CampaignsPage/CampaignEmptyState.esm.js";import"uuid";import"@backstage/core-components";import"react-hook-form";import"../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../components/SoundcheckDialog/SoundcheckDialog.esm.js";import"../components/FactExplorer/FactExplorer.esm.js";import"../components/FactExplorer/FactExplorerContext.esm.js";import"../components/FormStepper/FormStepper.esm.js";import"../components/CheckForm/FormFields/CheckNameInput/CheckNameInput.esm.js";import"../components/CheckForm/FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../components/FormMarkdownInput/FormMarkdownInput.esm.js";import"../components/CheckForm/utils/checkFormUtils.esm.js";import"../components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"../components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js";import"../components/CheckForm/FormFields/RuleInput/RuleInputBox.esm.js";import"../components/CheckForm/FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"../components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"../components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/styles.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"../components/CheckForm/FormFields/RuleInput/Conditions/ConditionList.esm.js";import"../components/CheckForm/FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"../components/CheckForm/FormFields/CheckPathResolverInput.esm.js";import"../components/CheckForm/Steps/CheckDetailsStep.esm.js";import"../components/CheckForm/Steps/CheckRulesStep.esm.js";import"../components/CheckForm/Steps/CheckApplicabilityStep.esm.js";import"../components/CheckForm/Steps/CheckReviewStep.esm.js";import"../components/CheckForm/types/ExpressionType.esm.js";import"../components/Frequency/types.esm.js";import"../components/Frequency/util.esm.js";import"../components/Frequency/FrequencyComponent.esm.js";import"../components/CheckForm/types/Path.esm.js";import"@hookform/resolvers/zod";import"../components/CheckForm/utils/validation.esm.js";import"../components/LoadingIndicator/LoadingIndicator.esm.js";import"../components/CheckPage/CheckPageBUI.esm.js";import"../components/CheckPage/CheckPageDeprecated.esm.js";import"../components/ChecksPage/CheckListPage/CheckListPageDeprecated.esm.js";import"../components/ChecksPage/ChecksListPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageDeprecated.esm.js";import"../components/RoutingPage/RoutingMainMenu.esm.js";import"../components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js";import"../components/CollectorPage/Configurators/BigQuery/BigQueryConfigurator.esm.js";import"../components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js";import"../components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js";import"../components/CollectorPage/Configurators/DataRegistry/DataRegistryConfigurator.esm.js";import"../components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js";import"../components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js";import"../components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js";import"../components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js";import"../components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js";import"../components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js";import"../components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js";import"../components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js";import"../components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js";import"../components/CollectorPage/CollectorDetailsPageBUI.esm.js";import"../components/CollectorPage/CollectorDetailsPageDeprecated.esm.js";import"../components/CollectorsPage/CollectorsPage.esm.js";import"../components/OverviewPage/OverviewPageContent.esm.js";import"../components/TechHealth/TechHealth.esm.js";import"../components/TechInsights/TechInsightsPageBUI.esm.js";import"../components/TechInsights/TechInsightsPageDeprecated.esm.js";import"lodash";import"../components/Filter/FilterComponent.esm.js";import"../components/TrackForm/Steps/LevelsStep/LevelsStepNew.esm.js";import"../components/TrackForm/Steps/TrackDetailsStep/TrackDetailsStep.esm.js";import"../components/TrackForm/utils/validation.esm.js";import"../graphql/generated/index.esm.js";import"../components/TrackPage/TrackPageBUI.esm.js";import"../components/TrackPage/TrackPageDeprecated.esm.js";import"../components/TrackPage/TrackTechInsightsExplorerPage.esm.js";import"../components/TracksPage/TrackListPage/TrackListPageDeprecated.esm.js";import"js-yaml";import"../components/SummaryCard/SummaryCard.esm.js";import"../components/TracksPage/TrackListPage/TrackMetadata.esm.js";import"../components/TracksPage/TracksListPageBUI.esm.js";import"@spotify/backstage-plugin-core";import"../components/SoundcheckHeader/SoundcheckHeaderBUI.esm.js";import"../components/SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.esm.js";import"../components/RoutingPage/RoutingPageDeprecated.esm.js";import{RoutingPageWrapper as f}from"../components/RoutingPage/RoutingPageWrapper.esm.js";const o=c().with({id:"soundcheck.integrationId"}),h=s({kind:"integration",attachTo:[{id:"page:soundcheck/SoundcheckRoutingPage",input:"integrations"},{id:"app/routes",input:"routes"}],output:[t.routePath,t.reactElement,t.routeRef.optional(),o],dataRefs:{integrationId:o},*factory({integrationId:r,loader:m,path:e,routeRef:p},{node:n}){const a=l(()=>m().then(d=>({default:()=>d})));yield t.routePath(e??`/soundcheck/integrations/${r}/edit`),yield t.reactElement(u(i(g,{node:n,children:i(f,{children:i(a,{})})}))),p&&(yield t.routeRef(p)),yield o(r)}});export{h as IntegrationPageBlueprint,o as integrationIdExtensionDataRef};
2
2
  //# sourceMappingURL=IntegrationPageBlueprint.esm.js.map
@@ -1,6 +1,6 @@
1
- import{jsx as t}from"react/jsx-runtime";import{makeStyles as a}from"@material-ui/core";import i from"classnames";import{SoundcheckMarkdownContent as s}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"@backstage/core-components";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import{BaseBadge as m}from"./BaseBadge.esm.js";const d=`
1
+ import{jsx as t}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import l from"classnames";import{SoundcheckMarkdownContentDeprecated as m}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"@backstage/core-components";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";import{BaseBadge as s}from"./BaseBadge.esm.js";const p=`
2
2
  **No Level / Not Certified**
3
3
 
4
4
  Pass all checks within a level to earn a certification badge.
5
- `,p=a(o=>({root:{borderColor:o.palette.text.disabled,borderStyle:"dashed",color:o.palette.text.disabled}})),c=({className:o,showTooltip:e,size:r="small"})=>{const l=p();return t(m,{className:i(o,l.root),size:r,label:"NL",tooltip:e?t(s,{content:d}):null})};export{c as NoLevelBadge};
5
+ `,c=i(o=>({root:{borderColor:o.palette.text.disabled,borderStyle:"dashed",color:o.palette.text.disabled}})),d=({className:o,showTooltip:e,size:r="small"})=>{const a=c();return t(s,{className:l(o,a.root),size:r,label:"NL",tooltip:e?t(m,{content:p}):null})};export{d as NoLevelBadge};
6
6
  //# sourceMappingURL=NoLevelBadge.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as o}from"react/jsx-runtime";import{useEffect as s}from"react";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{CampaignFormProvider as i,useCampaignFormContext as c}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import{useCreateCampaign as g}from"../../hooks/campaigns/useCreateCampaign.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as f}from"../../hooks/useNavigateBack.esm.js";import{campaignsPageRouteRef as d}from"../../routes.esm.js";import{CampaignForm as u}from"../CampaignForm/CampaignForm.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as C}from"../SoundcheckHeader/useHeader.esm.js";const l=()=>{const{setIsLoading:t}=c(),{mutateAsync:m,isLoading:r}=g();s(()=>{t(r)},[t,r]);const[a,e]=f(d),p=async n=>{await m(n,{onSuccess:e})};return C({title:"Create a Campaign",description:"Create, monitor, and manage software updates or system transitions.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns"}),o(i,{children:o(u,{onSave:p,onCancel:a})})},h=()=>o(i,{children:o(l,{})});export{h as CampaignCreatePage};
1
+ import{jsxs as c,Fragment as g,jsx as o}from"react/jsx-runtime";import{useRouteRef as u}from"@backstage/core-plugin-api";import{Box as f,HeaderPage as d}from"@backstage/ui";import{useEffect as C}from"react";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{CampaignFormProvider as i,useCampaignFormContext as l}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import{useCreateCampaign as h}from"../../hooks/campaigns/useCreateCampaign.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as k}from"../../hooks/useNavigateBack.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{useFeatureFlag as b}from"../../hooks/useFeatureFlag.esm.js";import{campaignsPageRouteRef as m}from"../../routes.esm.js";import{CampaignForm as F}from"../CampaignForm/CampaignForm.esm.js";import{DocLinkButton as x}from"../DocLinkButton/DocLinkButton.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as y}from"../SoundcheckHeader/useHeader.esm.js";const L=()=>{const{setIsLoading:t}=l(),{mutateAsync:r,isLoading:e}=h();C(()=>{t(e)},[t,e]);const[a,s]=k(m),p=async n=>{await r(n,{onSuccess:s})};return y({title:"Create a Campaign",description:"Create, monitor, and manage software updates or system transitions.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns"}),o(i,{children:o(F,{onSave:p,onCancel:a})})},P=()=>{const t=b("backstage-ui"),r=u(m);return c(g,{children:[t&&o(f,{children:o(d,{title:"Create Campaign",breadcrumbs:[{label:"All Campaigns",href:r()}],customActions:o(x,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns/"})})}),o(i,{children:o(L,{})})]})};export{P as CampaignCreatePage};
2
2
  //# sourceMappingURL=CampaignCreatePage.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as d}from"react/jsx-runtime";import{Content as b}from"@backstage/core-components";import{FormProvider as y}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as x}from"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{useFeatureFlag as N}from"../../hooks/useFeatureFlag.esm.js";import{formStyles as k}from"../../utils/formStyles.esm.js";import{FormFilterSection as M}from"../FormFilterSection/FormFilterSection.esm.js";import{FormStepper as L}from"../FormStepper/FormStepper.esm.js";import{useCampaignForm as V}from"./hooks/useCampaignForm.esm.js";import{CampaignDetailsStep as v}from"./Steps/CampaignDetailsStep/CampaignDetailsStep.esm.js";import{CampaignTrackStepNew as A}from"./Steps/CampaignTrackStepNew.esm.js";import{CampaignMilestonesStep as D}from"./Steps/CampaignMilestonesStep.esm.js";import{StepNameMapping as E}from"./types/CampaignFormTypes.esm.js";import{CAMPAIGN_FIELDS as O}from"./utils/campaignFormUtils.esm.js";var c=(t=>(t.Details="Enter campaign details",t.Checks="Add checks",t.Entities="Choose the affected entities (Optional)",t.Milestones="Set campaign milestones",t))(c||{});const I=({onSave:t,onCancel:f,selectedCampaign:r})=>{const g=k(),{isLoading:i,isReadOnly:S}=x(),{formMethods:o,onSubmit:a}=V(t,r),{getValues:u,control:n,formState:{errors:m},handleSubmit:l,trigger:C}=o,s=u(),F=s.detailsStep.startDate;N("debugMode")&&console.log(s);const p=[{label:"Enter campaign details",content:()=>e(v,{control:n,isLoading:i,disabled:!1,errors:m.detailsStep,startDate:F})},{label:"Add checks",content:()=>e(d,{children:e(A,{})})},{label:"Set campaign milestones",content:()=>e(D,{control:n,isLoading:i,disabled:!1,errors:m.milestonesStep})},{label:"Choose the affected entities (Optional)",content:()=>e(M,{name:"filtersStep.filter",keyValueFilterName:"filtersStep.keyValueFilter",description:O.filter.description,excludeFilterName:"filtersStep.excludeFilter",excludeKeyValueFilterName:"filtersStep.excludeKeyValueFilter"})}],h=r?[...Array(p.length).keys()]:[0];return e(d,{children:e(b,{className:g.formWrapper,children:e(y,{...o,children:e("form",{onSubmit:l(a),children:e(L,{onClose:f,handleSubmit:l,trigger:C,onSubmit:a,initialVisited:h,stepNameMap:E,steps:p,isLoading:i,isReadOnly:S,saveButtonText:"Save Campaign"})})})})})};export{I as CampaignForm,c as CampaignStepLabel};
1
+ import{jsx as e,Fragment as d}from"react/jsx-runtime";import{Content as k}from"@backstage/core-components";import{FormProvider as x}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as N}from"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{useFeatureFlag as f}from"../../hooks/useFeatureFlag.esm.js";import{formStyles as M}from"../../utils/formStyles.esm.js";import{FormFilterSection as V}from"../FormFilterSection/FormFilterSection.esm.js";import{FormStepper as L}from"../FormStepper/FormStepper.esm.js";import{useCampaignForm as v}from"./hooks/useCampaignForm.esm.js";import{CampaignDetailsStep as A}from"./Steps/CampaignDetailsStep/CampaignDetailsStep.esm.js";import{CampaignTrackStepNew as D}from"./Steps/CampaignTrackStepNew.esm.js";import{CampaignMilestonesStep as E}from"./Steps/CampaignMilestonesStep.esm.js";import{StepNameMapping as O}from"./types/CampaignFormTypes.esm.js";import{CAMPAIGN_FIELDS as I}from"./utils/campaignFormUtils.esm.js";var g=(t=>(t.Details="Enter campaign details",t.Checks="Add checks",t.Entities="Choose the affected entities (Optional)",t.Milestones="Set campaign milestones",t))(g||{});const B=({onSave:t,onCancel:S,selectedCampaign:r})=>{const o=M(),{isLoading:i,isReadOnly:u}=N(),{formMethods:a,onSubmit:m}=v(t,r),{getValues:C,control:n,formState:{errors:l},handleSubmit:s,trigger:F}=a,p=C(),h=p.detailsStep.startDate,b=f("backstage-ui");f("debugMode")&&console.log(p);const c=[{label:"Enter campaign details",content:()=>e(A,{control:n,isLoading:i,disabled:!1,errors:l.detailsStep,startDate:h})},{label:"Add checks",content:()=>e(d,{children:e(D,{})})},{label:"Set campaign milestones",content:()=>e(E,{control:n,isLoading:i,disabled:!1,errors:l.milestonesStep})},{label:"Choose the affected entities (Optional)",content:()=>e(V,{name:"filtersStep.filter",keyValueFilterName:"filtersStep.keyValueFilter",description:I.filter.description,excludeFilterName:"filtersStep.excludeFilter",excludeKeyValueFilterName:"filtersStep.excludeKeyValueFilter"})}],y=r?[...Array(c.length).keys()]:[0];return e(d,{children:e(k,{className:b?o.formWrapperBUI:o.formWrapper,children:e(x,{...a,children:e("form",{onSubmit:s(m),children:e(L,{onClose:S,handleSubmit:s,trigger:F,onSubmit:m,initialVisited:y,stepNameMap:O,steps:c,isLoading:i,isReadOnly:u,saveButtonText:"Save Campaign"})})})})})};export{B as CampaignForm,g as CampaignStepLabel};
2
2
  //# sourceMappingURL=CampaignForm.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as l,jsx as o}from"react/jsx-runtime";import{makeStyles as g,Typography as m}from"@material-ui/core";import{uniqBy as h}from"lodash";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import"react";import{useLoggedInUser as v}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as x}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as y}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as w}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{CAMPAIGN_FIELDS as b}from"../../utils/campaignFormUtils.esm.js";const C=g(e=>({helperText:{marginLeft:0},selectField:{display:"flex",flexDirection:"column",gap:e.spacing(1),marginBottom:e.spacing(2)},fieldContainer:{width:"250px"}})),F=({control:e,errors:p,isLoading:s,disabled:d})=>{const t=C(),{owner:n}=b.details,{options:c}=x(),{user:f,userEntityRef:r}=v();let i=h(c?.map(a=>({value:a.ref,label:a.name})),"value");const u=w(i);return r&&(i=[{value:r,label:f?.metadata.name??r},...i]),l("div",{className:t.selectField,children:[l("header",{children:[o(m,{variant:"subtitle2",children:n.name}),o(m,{variant:"caption",children:n.description})]}),o("div",{className:t.fieldContainer,children:o(y,{name:"detailsStep.ownerEntityRef",control:e,placeholder:"Owner",freeSolo:!1,disabled:d||s,helperText:p?.ownerEntityRef?.message??void 0,...u})})]})};export{F as CampaignOwnerField};
1
+ import{jsxs as m,jsx as i}from"react/jsx-runtime";import{makeStyles as g,Typography as p}from"@material-ui/core";import{uniqBy as h}from"lodash";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import"react";import{useLoggedInUser as v}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as x}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as y}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelValueOptions as w}from"../../../FormControlledAutocomplete/useLabelValueOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{CAMPAIGN_FIELDS as b}from"../../utils/campaignFormUtils.esm.js";const C=g(e=>({helperText:{marginLeft:0},selectField:{display:"flex",flexDirection:"column",gap:e.spacing(1),marginBottom:e.spacing(2)},fieldContainer:{width:"250px"}})),F=({control:e,errors:s,isLoading:d,disabled:c})=>{const n=C(),{owner:a}=b.details,{options:f}=x(),{user:l,userEntityRef:r}=v();let t=h(f?.map(o=>({value:o.ref,label:o.name,description:o.description})),"value");const u=w(t);return r&&(t=[{value:r,label:l?.metadata.name??r,description:l?.metadata.description},...t]),m("div",{className:n.selectField,children:[m("header",{children:[i(p,{variant:"subtitle2",children:a.name}),i(p,{variant:"caption",children:a.description})]}),i("div",{className:n.fieldContainer,children:i(y,{name:"detailsStep.ownerEntityRef",control:e,placeholder:"Owner",freeSolo:!1,disabled:c||d,helperText:s?.ownerEntityRef?.message??void 0,...u})})]})};export{F as CampaignOwnerField};
2
2
  //# sourceMappingURL=CampaignOwnerField.esm.js.map
@@ -1,2 +1,2 @@
1
- import{zodResolver as s}from"@hookform/resolvers/zod";import{useMemo as n}from"react";import{useForm as u}from"react-hook-form";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as f}from"../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{useGetChecksMap as c}from"../../../hooks/tracks/useGetChecksMap.esm.js";import{DEFAULT_FORM_VALUES as g}from"../utils/campaignFormUtils.esm.js";import{campaignFormSchema as l}from"../utils/validation.esm.js";import{mapCampaignToFormValues as C,mapCampaignFormDataToCampaignInput as d}from"./utils.esm.js";const F=(r,o)=>{const a=n(()=>o?C(o):g,[o]),t=u({defaultValues:a,mode:"onChange",resolver:s(l)}),{showModal:e}=f(),{checksMap:i}=c();return{formMethods:t,onSubmit:async m=>{if(!await e({title:"Save Campaign",message:`Are you sure you want to save campaign: ${m.detailsStep.name}?`,error:!1}))return;const p=d(m,o,i);r(p)}}};export{F as useCampaignForm};
1
+ import{zodResolver as s}from"@hookform/resolvers/zod";import{useMemo as n}from"react";import{useForm as u}from"react-hook-form";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as f}from"../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{useGetChecksMap as c}from"../../../hooks/tracks/useGetChecksMap.esm.js";import{DEFAULT_FORM_VALUES as g}from"../utils/campaignFormUtils.esm.js";import{campaignFormSchema as l}from"../utils/validation.esm.js";import{mapCampaignToFormValues as C,mapCampaignFormDataToCampaignInput as d}from"./utils.esm.js";const F=(r,o)=>{const a=n(()=>o?C(o):g,[o]),t=u({defaultValues:a,mode:"onChange",resolver:s(l)}),{showModal:e}=f(),{checksMap:i}=c();return{formMethods:t,onSubmit:async m=>{if(!await e({title:"Save Campaign",message:`Are you sure you want to save campaign: ${m.detailsStep.name}?`,error:!1}))return;const p=d(m,o,i);r(p)}}};export{F as useCampaignForm};
2
2
  //# sourceMappingURL=useCampaignForm.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as a}from"react/jsx-runtime";import{useFeatureFlag as e}from"../../hooks/useFeatureFlag.esm.js";import{CampaignPageBUI as m}from"./CampaignPageBUI.esm.js";import{CampaignPageDeprecated as r}from"./CampaignPageDeprecated.esm.js";const o=()=>e("backstage-ui")?a(m,{}):a(r,{});export{o as CampaignPage};
2
+ //# sourceMappingURL=CampaignPage.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as r,Fragment as B}from"react/jsx-runtime";import{parseEntityRef as he}from"@backstage/catalog-model";import{useRouteRef as w}from"@backstage/core-plugin-api";import{Box as o,HeaderPage as ue,Flex as G,Text as f,Grid as F}from"@backstage/ui";import{makeStyles as ge}from"@material-ui/core";import{toEntityFilterQuery as Se}from"@spotify/backstage-plugin-soundcheck-common";import{isEmpty as Ce}from"lodash";import{DateTime as S}from"luxon";import{useState as b,useMemo as v,useEffect as K}from"react";import{useParams as ye,useSearchParams as be}from"react-router-dom";import ve from"react-use/lib/useDebounce";import ke from"react-use/lib/useLocalStorage";import{useCheckStatuses as Ie}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{useFilters as Te}from"../../hooks/filters/useFilters.esm.js";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as Ee}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as we}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as Fe}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import{useLCPReporting as Re}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as Le}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignsPageRouteRef as Pe,campaignOverviewRouteRef as xe,campaignExplorerRouteRef as Ae}from"../../routes.esm.js";import{DescriptionCard as Ne}from"../Cards/DescriptionCard/DescriptionCard.esm.js";import{HistoricalTrackStatusCard as He}from"../Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js";import{TrackStatusCard as Me}from"../Cards/TrackStatusCard/TrackStatusCard.esm.js";import{ChecksTable as Oe}from"../ChecksTable/ChecksTable.esm.js";import{ChipSelector as je}from"../ChipSelector/ChipSelector.esm.js";import{EmptyStateBUI as De}from"../EmptyState/EmptyStateBUI.esm.js";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Ue}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as Ve,CERTIFICATION_STATUS_MAP as Be}from"../FilterSidebar/util.esm.js";import{LoadingTableSkeleton as Ge}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as Ke}from"../Menus/SimpleMenu.esm.js";import{useCampaignActions as _e}from"../Menus/useCampaignActions.esm.js";import{PageCustomActions as $e}from"../PageCustomActions/PageCustomActions.esm.js";import{TopFailingChecksTableBUI as Qe}from"../TopFailingChecksTable/TopFailingChecksTableBUI.esm.js";import{TrackEntitiesTableBUI as qe}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js";const We=ge(()=>({emptyContainer:{padding:"var(--bui-space-1)"},container:{padding:"0 var(--bui-space-1) var(--bui-space-6)"},tables:{margin:"0 var(--bui-space-2)"},tableContent:{margin:"var(--bui-space-3) 0 0"},tabPanel:{padding:"var(--bui-space-6) 0 0"},tabs:{margin:"0 0 var(--bui-space-12)"},cards:{margin:"0 var(--bui-space-2) var(--bui-space-12)",display:"flex",gridGap:"var(--bui-space-4)"}})),C={CHECKS:"Checks",TOP_FAILING_CHECKS:"Top Failing Checks",ENTITIES:"Entities"},ze=()=>{const{owners:m,lifecycles:l,types:d,systems:p,certificationStatuses:R}=Ue(),{campaignId:s}=ye(),_=w(Pe),[n,k]=be(),[c,$]=b(n.get("search")||""),[L,Q]=b(""),[P,q]=b(new Set([C.CHECKS])),I=P.values().next().value??C.CHECKS;ve(()=>{Q(c);const a=new URLSearchParams(n.toString());c?a.set("search",c):a.delete("search"),k(a,{replace:!0})},300,[c]);const x=v(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:s||"",filtersApplied:m.length+l.length+d.length+p.length,ownersFilter:m?.join(",")||"",lifecyclesFilter:l?.join(",")||"",typesFilter:d?.join(",")||"",systemsFilter:p?.join(",")||"",campaignsSearch:L||""}}),[s,m,l,d,p,L]),{reportContentLoaded:A}=Le(x),{reporter:W}=Re(x),h=We(),T=v(()=>Ve({lifecycles:l,owners:m,types:d,systems:p}),[l,m,d,p]),{data:z,isLoading:u}=Ee({ids:[s],first:1}),i=z?.edges?.[0]?.node,N=_e(i??void 0),t=i?.track,J=v(()=>t?.levels.flatMap(a=>a.checks),[t?.levels]),X=Array.from(new Set(t?.levels.flatMap(a=>a.checks).map(a=>a.id)??[])),{data:H,isLoading:Y}=Ie({trackId:t?.id,checkIds:X,filter:T},!!t),Z=v(()=>Se(t?.filter),[t]),{filters:ee,selected:te,setSelected:ie,onRemoveTag:ae,selectedTags:re}=Te({entityFilterQuery:Z,hasCertificationStatusFilters:!0}),{data:M,isLoading:O}=we({trackId:t?.id??"",filter:T},!!i),oe=S.fromISO(i?.startDate),se=Math.max(Math.ceil(S.now().diff(oe,"days").days),1),{data:ne}=Fe({trackId:t?.id??"",filter:T,numberOfDays:se},!!i),j=W?.getLCPValue();K(()=>{!u&&!O&&A({lcp:j})},[u,O,A,j]);const[y,D]=b(!1),[g,E]=ke("campaign-overview-search-params","");K(()=>{!y&&n?.toString()?(g!==n.toString()&&E(n.toString()),D(!0)):!y&&g?(k(new URLSearchParams(g)),D(!0)):y&&g!==n.toString()&&E(n.toString())},[n,k,E,g,y]);const ce=w(xe),me=w(Ae);if(u)return e(Ge,{});if(!u&&!i)return e(o,{className:h.emptyContainer,children:e(De,{title:"Campaign not found",body:`There is no campaign with the requested id: ${s}.`})});const U=i?.ownerEntityRef,le=U?he(U).name:void 0,de=S.fromISO(i?.startDate),V=S.fromISO(i?.targetCompletionDate),pe=S.now(),fe=Math.max(Math.ceil(V.diff(pe,"days").days),0);return r(B,{children:[e(o,{children:e(ue,{title:i?.name,customActions:e(Ke,{disabled:!N.length,placement:"left top",menuActions:N,label:"Campaign Actions"}),breadcrumbs:[{label:"Campaigns",href:_()}],tabs:[{id:"overview",label:"Campaign Overview",href:s?ce({campaignId:s}):""},{id:"explorer",label:"Tech Insights Explorer",href:s?me({campaignId:s}):""}]})}),r(o,{className:h.container,children:[r(o,{className:h.cards,children:[e(Ne,{description:i?.description??void 0,owner:le}),e(Me,{track:t??void 0,status:M,isCampaign:!0,children:r(B,{children:[r(G,{align:"baseline",mt:"3",children:[e(f,{as:"h1",variant:"title-medium",weight:"bold",children:fe}),e(f,{variant:"body-small",children:"Days remaining"})]}),r(F.Root,{children:[r(F.Item,{children:[e(o,{children:e(f,{color:"secondary",variant:"body-small",children:"Start date"})}),e(o,{children:e(f,{variant:"body-small",children:de.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]}),r(F.Item,{children:[e(o,{children:e(f,{color:"secondary",variant:"body-small",children:"End date"})}),e(o,{children:e(f,{variant:"body-small",children:V.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]})]})]})}),e(He,{track:i?.track,history:ne,isCampaign:!0})]}),t&&r(o,{className:h.tables,children:[r(G,{justify:"between",children:[e(o,{minWidth:"16rem",children:e(je,{options:["Checks","Top Failing Checks","Entities"],selected:P,ariaLabel:"Sections",onSelectionChange:q})}),e($e,{searchValue:c,setSearchValue:a=>$(a),filters:ee,selected:te,setSelected:ie,onRemoveTag:ae,selectedTags:re})]}),r(o,{className:h.tableContent,children:[I===C.CHECKS&&e(Oe,{trackId:t.id,checks:J,checkStatuses:H,isLoading:u||Y,searchValue:c}),I===C.TOP_FAILING_CHECKS&&e(Qe,{track:t,checkStatuses:H,certificationStatus:M?.certificationStatus,searchValue:c}),I===C.ENTITIES&&e(qe,{isCampaign:!0,track:t,lifecycles:l,owners:m,types:d,systems:p,certificationStatus:Ce(R)?void 0:Be[R[0]],searchValue:c})]})]})]})]})};export{ze as CampaignPageBUI};
2
+ //# sourceMappingURL=CampaignPageBUI.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as i,jsxs as n,Fragment as ne}from"react/jsx-runtime";import{useRouteRef as re,useApi as se,configApiRef as ce}from"@backstage/core-plugin-api";import{EntityRefLink as le}from"@backstage/plugin-catalog-react";import{usePermission as y}from"@backstage/plugin-permission-react";import{makeStyles as me,Button as pe,Box as s,Typography as D,Divider as de,Tabs as ge,Tab as C}from"@material-ui/core";import{soundcheckCampaignReadPermission as fe,soundcheckCampaignUpdatePermission as he,soundcheckCampaignNotificationsCreatePermission as ue,toEntityFilterQuery as ye}from"@spotify/backstage-plugin-soundcheck-common";import{isEmpty as Ce}from"lodash";import{useMemo as d,useState as ke,useCallback as Se,useEffect as be}from"react";import{useParams as Te,useNavigate as we}from"react-router-dom";import{useCheckStatuses as ve}from"../../hooks/aggregations/useCheckStatuses.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as Fe}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as xe}from"../../hooks/aggregations/useCertificationStatus.esm.js";import"react-use/lib/useLocalStorage";import{useLCPReporting as Le}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as Ne}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignEditRouteRef as Re}from"../../routes.esm.js";import{FilterSidebar as Ae}from"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Be}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as Ee,CERTIFICATION_STATUS_MAP as De}from"../FilterSidebar/util.esm.js";import{LevelsTable as Ie}from"../LevelsTable/LevelsTable.esm.js";import{LoadingIndicator as Pe}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as je}from"../PageWarningMessage/PageWarningMessage.esm.js";import{SendCampaignNotificationDialog as Oe}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialog.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as Me}from"../SoundcheckHeader/useHeader.esm.js";import{SoundcheckMarkdownContentDeprecated as ze}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"@backstage/core-components";import"react-markdown";import"rehype-raw";import"remark-gfm";import"../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";import{TopFailingChecksTable as He}from"../TopFailingChecksTable/TopFailingChecksTable.esm.js";import{TrackEntitiesTable as We}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js";import{CampaignStatusHistoryTile as _e}from"./CampaignStatusHistoryTile.esm.js";import{CampaignStatusTile as $e}from"./CampaignStatusTile.esm.js";import{DaysRemainingTile as Ue}from"./DaysRemainingTile.esm.js";const Ve=me(e=>({root:{height:"100%",background:e.palette.background.default,display:"flex",width:"100%",borderTop:`1px solid ${e.palette.divider}`},progressContainer:{flex:1,borderBottom:`1px solid ${e.palette.divider}`,padding:e.spacing(2)},campaignContainerContent:{paddingTop:e.spacing(1),paddingBottom:e.spacing(1),backgroundColor:e.palette.background.paper},editButton:{marginLeft:"auto"},notificationButton:{marginRight:e.spacing(1)},checksContainer:{},entitiesContainer:{marginTop:e.spacing(3)},headerDescription:{fontSize:e.typography.body2.fontSize,margin:e.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},content:{paddingTop:0,flex:1},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}},sectionTitle:{paddingBottom:e.spacing(1)},chartSection:{flex:1,flexBasis:"auto",minWidth:320,display:"flex",flexDirection:"column",height:"100%"},title:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${e.typography.h5.fontSize}px`,cursor:"default",marginBottom:e.spacing(2)},divider:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},tabs:{padding:e.spacing(2,2,0,2)},contentArea:{flex:1,padding:e.spacing(0,2)},tableArea:{margin:e.spacing(1,0,2)}})),Ge=()=>{const{owners:e,lifecycles:l,types:m,systems:p,certificationStatuses:k,stagedLifecycles:I,setStagedLifecycles:P,stagedOwners:j,setStagedOwners:O,stagedTypes:M,setStagedTypes:z,stagedSystems:H,setStagedSystems:W,stagedCertificationStatuses:S,setStagedCertificationStatuses:_,hasFilterChanges:$,handleApplyFilters:U,handleClearFilters:V}=Be(),{campaignId:r}=Te(),b=d(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:r||"",filtersApplied:e.length+l.length+m.length+p.length,ownersFilter:e?.join(",")||"",lifecyclesFilter:l?.join(",")||"",typesFilter:m?.join(",")||"",systemsFilter:p?.join(",")||""}}),[r,e,l,m,p]),{reportContentLoaded:T}=Ne(b),{reporter:G}=Le(b),t=Ve(),f=d(()=>Ee({lifecycles:l,owners:e,types:m,systems:p}),[l,e,m,p]),[h,Q]=ke("checks"),q=Se((c,oe)=>{Q(oe)},[]),{data:J,isLoading:g}=Fe({ids:[r],first:1}),o=J?.edges?.[0]?.node,a=o?.track,{loading:K,allowed:X}=y({permission:fe,resourceRef:r}),{loading:w,allowed:v}=y({permission:he,resourceRef:r}),Y=Array.from(new Set(a?.levels.flatMap(c=>c.checks).map(c=>c.id)??[])),{data:F,isLoading:u}=ve({trackId:a?.id,checkIds:Y,filter:f},!!a),x=we(),L=re(Re),Z=d(()=>a?.ownerEntityRef?i(le,{color:"inherit",entityRef:a.ownerEntityRef,className:t.ownerLink}):null,[a?.ownerEntityRef,t.ownerLink]),N=se(ce).getOptionalBoolean("soundcheck.notifications.enabled"),{loading:R,allowed:A}=y({permission:ue}),{data:ee,isLoading:B}=xe({trackId:a?.id??"",filter:f},!!o),ie=d(()=>n(ne,{children:[N&&!R&&A&&o&&i(Oe,{campaign:o,buttonClass:t.notificationButton}),!w&&v&&a?.isEditable?i(pe,{className:t.editButton,variant:"contained",color:"primary",onClick:()=>{x(L({campaignId:r}))},children:"Edit Campaign"}):null]}),[N,R,A,o,t.notificationButton,t.editButton,w,v,a?.isEditable,x,L,r]),te=d(()=>a?.description?i(ze,{className:t.headerDescription,content:a.description}):null,[t.headerDescription,a?.description]);Me({title:a?.name,description:te,customSubtitle:Z,sectionRight:ie});const ae=d(()=>ye(a?.filter),[a]),E=G?.getLCPValue();return be(()=>{!g&&!u&&!B&&T({lcp:E})},[g,u,B,T,E]),n("div",{children:[i(je,{entityName:"track",entityId:r,showNotFound:!g&&!o,showCannotView:!K&&!X}),g&&i(Pe,{}),a&&n("div",{className:t.root,children:[i(s,{children:i(Ae,{trackFilter:ae,stagedTypes:M,stagedLifecycles:I,stagedOwners:j,stagedSystems:H,stagedCertificationStatus:S?S[0]:"",onTypesChange:z,onLifecyclesChange:P,onOwnersChange:O,onSystemsChange:W,onCertificationStatusChange:c=>_(c?[c]:[]),onApplyFilters:U,onClearFilters:V,hasFilterChanges:$})}),n(s,{className:t.content,children:[i("div",{className:t.progressContainer,children:n(s,{display:"flex",marginTop:2,children:[n(s,{display:"flex",flexDirection:"column",marginRight:3,minWidth:320,children:[i(D,{className:t.title,children:"Current Status"}),i($e,{campaign:o,filter:f}),i(de,{className:t.divider}),i(Ue,{campaign:o})]}),n(s,{className:t.chartSection,children:[i(D,{className:t.title,children:"Historical Status"}),i(_e,{campaign:o,filter:f})]})]})}),i(s,{className:t.tabs,children:n(ge,{value:h,onChange:q,indicatorColor:"primary",textColor:"primary",children:[i(C,{label:"Checks",value:"checks"}),i(C,{label:"Top Failing Checks",value:"topFailingChecks"}),i(C,{label:"Entities",value:"entities"})]})}),n(s,{className:t.contentArea,children:[h==="checks"&&i("div",{className:t.tableArea,children:i(Ie,{track:a,checkStatuses:F,isLoading:g||u,hideLevel:!0})}),h==="entities"&&i(s,{marginTop:1,children:i(We,{track:a,lifecycles:l,owners:e,types:m,systems:p,certificationStatus:Ce(k)?void 0:De[k[0]]})}),h==="topFailingChecks"&&i("div",{className:t.tableArea,children:i(He,{track:a,checkStatuses:F,certificationStatus:ee?.certificationStatus,hideLevel:!0})})]})]})]})]})};export{Ge as CampaignPageDeprecated};
2
+ //# sourceMappingURL=CampaignPageDeprecated.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{Box as a}from"@backstage/ui";import{makeStyles as m}from"@material-ui/core/styles";import{useMemo as n}from"react";import{ResponsiveContainer as p}from"recharts";import{AreaChart as c}from"../AreaChart/AreaChart.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as d}from"../EmptyState/EmptyStateBUI.esm.js";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../routes.esm.js";const f=m(()=>({container:{height:190,overflow:"hidden"}}));function l({history:r}){const s=f(),i=r?.certificationStatusHistory.numberOfEntities??0,e=n(()=>i>0?r?.certificationStatusHistory.history.map(t=>({date:t.date,Passed:Math.round(t.statusByLevel[0].passed/i*100)})):[],[i,r]);if(!e?.length){const t=i>0?"No Historical Data":"No Applicable Entities";return o(a,{children:o(d,{title:t,body:`${t} for this campaign.`})})}return o(a,{className:s.container,children:o(p,{debounce:1,children:o(c,{data:e,categories:["Passed"],categoryColors:{Passed:"var(--bui-fg-success)"},index:"date",minValue:0,maxValue:100,showLegend:!1})})})}export{l as CampaignStatusHistoryChart};
2
+ //# sourceMappingURL=CampaignStatusHistoryChart.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as i}from"react/jsx-runtime";import{useTheme as h,Box as m}from"@material-ui/core";import{makeStyles as f}from"@material-ui/core/styles";import{DateTime as n}from"luxon";import{useMemo as u}from"react";import{ResponsiveContainer as g}from"recharts";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatusHistory as y}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{AreaChart as x}from"../AreaChart/AreaChart.esm.js";import{LineChartPlaceholder as S}from"../Charts/LineChart/LineChartPlaceholder.esm.js";const C=f(t=>({card:{display:"flex",flexDirection:"column",width:"100%",height:290},title:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${t.typography.h5.fontSize}px`,cursor:"default"},content:{padding:t.spacing(1,2,1,0),width:"100%",height:"100%"}}));function H({campaign:t,filter:p}){const c=h(),r=C(),d=n.fromISO(t.startDate),l=Math.max(Math.ceil(n.now().diff(d,"days").days),1),{data:o}=y({trackId:t.track.id,filter:p,numberOfDays:l},!!t),e=o?.certificationStatusHistory.numberOfEntities??0,a=u(()=>e>0?o?.certificationStatusHistory.history.map(s=>({date:s.date,Passed:Math.round(s.statusByLevel[0].passed/e*100)})):[],[e,o]);return i(g,{height:290,debounce:1,children:i(m,{className:r.card,children:i(m,{className:r.content,children:a?.length?i(x,{data:a,categories:["Passed"],categoryColors:{Passed:c.palette.success.main},index:"date",minValue:0,maxValue:100,showLegend:!1}):i(S,{height:290,text:e>0?"No Historical Data":"No Applicable Entities"})})})})}export{H as CampaignStatusHistoryTile};
2
+ //# sourceMappingURL=CampaignStatusHistoryTile.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useTheme as S,Box as i,Grid as b,Typography as f}from"@material-ui/core";import{makeStyles as B}from"@material-ui/core/styles";import I from"@material-ui/icons/TrendingDown";import k from"@material-ui/icons/TrendingFlat";import R from"@material-ui/icons/TrendingUp";import{DateTime as N}from"luxon";import{useMemo as T}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as w}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as L}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{compactNumberFormatter as g}from"../../utils/formatters.esm.js";import{CategoryBar as j}from"../CategoryBar/CategoryBar.esm.js";import{LoadingIndicator as M}from"../LoadingIndicator/LoadingIndicator.esm.js";const C=B(e=>({card:{display:"flex",flexDirection:"column"},content:{padding:0,display:"flex",margin:0,gap:e.spacing(1)},item:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(.5)},legendDash:{width:e.spacing(2),height:e.spacing(1),borderRadius:e.spacing(.375),marginRight:e.spacing(1)},category:{display:"flex",alignItems:"center",flex:1,marginRight:e.spacing(2)}}));function v({label:e,value:l,total:a,color:m,valueFormatter:c}){const p=C();return s(b,{item:!0,xs:12,className:p.item,children:[s(i,{className:p.category,children:[t("span",{className:p.legendDash,style:{backgroundColor:m}}),t(f,{children:e})]}),a&&s(f,{children:[c(l)," of ",c(a)," (",Math.round(l/a*100),"%)"]})]})}function H({campaign:e,filter:l}){const a=S(),m=C(),{data:c,isLoading:p}=w({trackId:e.track.id,filter:l},!0),r=c?.certificationStatus.statusByLevel[0],D=Math.max(Math.ceil(N.now().diff(N.fromISO(e.startDate),"days").days),1),{data:u}=L({trackId:e.track.id,filter:l,numberOfDays:D},!!e),o=c?.certificationStatus.numberOfEntities??0,d=T(()=>{if(o===void 0||u===void 0||r===void 0)return;const x=(u.certificationStatusHistory.history[0]?.statusByLevel[0].passed??0)/o*100;return r.passed/o*100-x},[u,r,o]);let h=k,y="inherit",n;return d&&(n=`${d.toFixed(0)}% since campaign start`,d<=-1?(h=I,n=`-${n}`,y="error"):d>=1&&(h=R,n=`+${n}`,y="primary")),p?t(i,{className:m.card,children:t(M,{})}):t(i,{className:m.card,children:r?t(i,{className:m.content,children:s(i,{width:"100%",children:[t(j,{data:r,valueFormatter:g,categories:["passed","failed","notReported"],categoryFormatter:x=>x.replace(/\b\w/g,F=>F.toUpperCase()),colors:[a.palette.success.main,a.palette.error.main,a.palette.text.disabled]}),t(i,{paddingTop:"12px",children:s(b,{container:!0,spacing:2,children:[t(v,{label:"Passing",value:r.passed,total:o,color:a.palette.success.main,valueFormatter:g}),t(v,{label:"Failing",value:r.failed,total:o,color:a.palette.error.main,valueFormatter:g}),t(v,{label:"Not Reported",value:r.notReported,total:o,color:a.palette.text.disabled,valueFormatter:g}),!!d&&s(i,{display:"flex",alignItems:"center",paddingTop:"12px",children:[t(h,{color:y}),t(f,{style:{marginLeft:a.spacing(1)},children:n})]})]})})]})}):t(i,{margin:"auto",minHeight:125,display:"flex",flexDirection:"column",justifyContent:"center",children:t(f,{style:{marginBottom:8},variant:"subtitle1",children:"No Data"})})})}export{H as CampaignStatusTile};
2
+ //# sourceMappingURL=CampaignStatusTile.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as c,Fragment as M}from"react/jsx-runtime";import{useRouteRef as C,useApi as U}from"@backstage/core-plugin-api";import{entityPresentationApiRef as q}from"@backstage/plugin-catalog-react";import{Box as m,HeaderPage as V,Flex as $,SearchField as z}from"@backstage/ui";import{makeStyles as J}from"@material-ui/core";import{useState as x,useMemo as y,useEffect as K}from"react";import{useParams as Q,useSearchParams as W}from"react-router-dom";import X from"react-use/lib/useDebounce";import{useGroupHierarchy as Y}from"../../hooks/heirarchy/useGroupHierarchy.esm.js";import{useHierarchicalTrackStatus as Z}from"../../hooks/heirarchy/useHierarchicalTrackStatus.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as _}from"../../hooks/campaigns/useGetCampaigns.esm.js";import{useGetAllTracks as ee}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import{useLCPReporting as re}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ie}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignsPageRouteRef as ae,campaignOverviewRouteRef as te,campaignExplorerRouteRef as oe}from"../../routes.esm.js";import{EmptyStateBUI as me}from"../EmptyState/EmptyStateBUI.esm.js";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as ne}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import"../FilterSidebar/util.esm.js";import{hierarchyToNivo as se}from"../HierarchicalTechInsightsPage/visualizations/hierarchyToNivo.esm.js";import{LoadingTableSkeleton as pe}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as ce}from"../Menus/SimpleMenu.esm.js";import{useCampaignActions as le}from"../Menus/useCampaignActions.esm.js";import{TechInsightsExplorerTable as de}from"../TechInsightsExplorerTable/TechInsightsExplorerTable.esm.js";import{TechInsightsGroupSelector as ge}from"../TechInsightsGroupSelector/TechInsightsGroupSelector.esm.js";import{TopAndBottomPerformingTeams as fe}from"../TopAndBottomPerformingTeams/TopAndBottomPerformingTeams.esm.js";const ue=J(()=>({emptyContainer:{padding:"var(--bui-space-1)"},container:{padding:"0 var(--bui-space-1) var(--bui-space-6)"},teams:{margin:"0 var(--bui-space-2) var(--bui-space-12)"},tables:{margin:"0 var(--bui-space-2)"},tableContent:{margin:"var(--bui-space-3) 0 0"},filters:{width:"25rem",marginLeft:"auto"}})),he=()=>{const{owners:l,lifecycles:d,types:g,systems:f}=ne(),a=ue(),{campaignId:r}=Q(),[u,F]=W(),[n,N]=x(u.get("search")||""),t=u.get("group"),[T,E]=x(""),j=C(ae);X(()=>{E(n);const i=new URLSearchParams(u.toString());n?i.set("search",n):i.delete("search"),F(i,{replace:!0})},300,[n]);const I=y(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:r||"",filtersApplied:l.length+d.length+g.length+f.length,ownersFilter:l?.join(",")||"",lifecyclesFilter:d?.join(",")||"",typesFilter:g?.join(",")||"",systemsFilter:f?.join(",")||"",campaignsSearch:T||""}}),[r,l,d,g,f,T]),{reportContentLoaded:R}=ie(I),{reporter:G}=re(I),{data:B,isLoading:s}=_({ids:[r],first:1}),h=B?.edges?.[0]?.node,L=le(h??void 0),o=h?.track,k=U(q),{data:A}=ee({}),b=y(()=>A?.edges.find(i=>i.node.id===o?.id)?.node,[A?.edges,o?.id]),{data:P,isLoading:v}=Y(t||void 0,{enabled:!!t&&!!o?.id&&!!b,ownedEntitiesFilter:b?.filter??void 0}),{data:S,isLoading:p}=Z({trackId:o?.id??"",groupRef:t??"",skip:!o?.id}),H=y(()=>{if(!t)return;const i=P?.[t];return i?se(i,S||null,()=>"var(--bui-fg-primary)",k,void 0):void 0},[P,k,t,S]),w=G?.getLCPValue();K(()=>{!s&&!v&&!p&&R({lcp:w})},[s,v,p,R,w]);const O=C(te),D=C(oe);return s?e(pe,{}):!s&&!h?e(m,{className:a.emptyContainer,children:e(me,{title:"Campaign not found",body:`There is no campaign with the requested id: ${r}.`})}):c(M,{children:[e(m,{children:e(V,{title:o?.name,customActions:e(ce,{disabled:!L.length,placement:"left top",menuActions:L,label:"Campaign Actions"}),breadcrumbs:[{label:"Campaigns",href:j()}],tabs:[{id:"overview",label:"Campaign Overview",href:r?O({campaignId:r}):""},{id:"explorer",label:"Tech Insights Explorer",href:r?D({campaignId:r}):""}]})}),c(m,{className:a.container,children:[e(m,{className:a.teams,children:e(fe,{trackStatus:S??void 0,isLoading:p,campaignId:r})}),c(m,{className:a.tables,children:[c($,{align:"center",gap:"3",className:a.filters,children:[e(ge,{}),e(z,{value:n,onChange:N,"aria-label":"Search",placeholder:"Search"})]}),e(m,{className:a.tableContent,children:e(de,{tableData:H,isLoading:v||p,trackId:b?.id,campaignId:r})})]})]})]})};export{he as CampaignTechInsightsExplorerPage};
2
+ //# sourceMappingURL=CampaignTechInsightsExplorerPage.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as a,jsxs as y}from"react/jsx-runtime";import{useRouteRef as J,useApi as K,featureFlagsApiRef as Q}from"@backstage/core-plugin-api";import{usePermission as U}from"@backstage/plugin-permission-react";import{makeStyles as X,Grid as i,Button as Y}from"@material-ui/core";import{soundcheckCampaignCreatePermission as Z}from"@spotify/backstage-plugin-soundcheck-common";import{useState as t,useMemo as _,useEffect as A}from"react";import{useNavigate as ee}from"react-router-dom";import ae from"react-use/lib/useDebounce";import{useGetCampaignOwners as re}from"../../../hooks/campaigns/useGetCampaignOwners.esm.js";import{useGetCampaigns as ie}from"../../../hooks/campaigns/useGetCampaigns.esm.js";import{useLCPReporting as te}from"../../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ne}from"../../../hooks/useLoadTimeReporting.esm.js";import{campaignCreateRouteRef as oe}from"../../../routes.esm.js";import{FilterDefault as C}from"../../../utils/filters.esm.js";import{EmptyState as se}from"../../EmptyState/EmptyState.esm.js";import"../../EmptyState/EmptyStateBUI.esm.js";import"@remixicon/react";import{Pagination as me}from"../../Pagination/Pagination.esm.js";import{SearchFilters as pe}from"../../SearchFilters/SearchFilters.esm.js";import{EmptyCampaignState as le}from"../CampaignEmptyState.esm.js";import{CampaignsOverviewSkeleton as ce}from"./CampaignsOverviewSkeleton.esm.js";import{CampaignSummaryCard as ge}from"./CampaignSummaryCard.esm.js";import de from"./useArchiveConfirmationModal.esm.js";var B=(e=>(e.title="No campaigns found",e.description="No campaigns matched your search. Consider changing search term and filters.",e))(B||{});const ue=X(e=>({headerButtons:{display:"flex",gap:e.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:e.spacing(0,0,1)},container:{padding:e.spacing(3),gap:e.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5)}})),he=({campaignsPerPage:e,currentCursor:F})=>{const[o,P]=t(F),[d,R]=t(""),[s,k]=t(""),[m,L]=t(C.Alpha),[p,O]=t(C.Owner),[l,T]=t(C.Status),v=_(()=>({routeName:"soundcheck-campaigns",additionalAttributes:{campaignsPerPage:e,pageCursor:o||"",sortOrder:m||"",ownerFilter:p||"",statusFilter:l||"",nameSearch:s||""}}),[e,o,m,p,s,l]),{reportContentLoaded:S}=ne(v),{reporter:j}=te(v),c=ue(),{data:D,isLoading:u}=re();ae(()=>{k(d)},500,[d]);const{loading:E,allowed:G}=U({permission:Z}),{data:h,isLoading:n}=ie({ids:void 0,first:e,after:o,orderAlphabetical:m,searchByOwner:p,searchByName:s,searchByStatus:l}),I=ee(),W=J(oe),H=()=>I(W()),f=h?.edges.map(r=>r.node),[N,w]=t([]);A(()=>{P(void 0),w([])},[s]);const b=K(Q),M=!b.getRegisteredFlags().find(r=>r.name==="soundcheck-enable-campaigns")||b.isActive("soundcheck-enable-campaigns"),V=!G||!M,q=r=>{L(r.target.value)},z=r=>{O(r.target.value)},$=r=>{T(r.target.value)},x=j?.getLCPValue();if(A(()=>{!n&&!u&&S({lcp:x})},[n,u,S,x]),!n&&!f)return a(le,{});let g;return n?g=a(ce,{}):f?.length?g=f.map(r=>a(i,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":"result",children:a(de,{children:a(ge,{campaign:r})})},r.id)):g=a(i,{xs:12,item:!0,role:"listitem","aria-label":"result",children:a(se,{title:"No campaigns found",description:"No campaigns matched your search. Consider changing search term and filters."})}),y(i,{container:!0,direction:"row",className:c.container,children:[y(i,{container:!0,className:c.header,children:[a(pe,{searchPlaceholder:"Search Available Campaigns",isLoading:n||u,searchTerm:d,setSearchTerm:R,filterAlpha:m,handleAlphabeticalFilterChange:q,filterOwner:p,handleOwnerFilterChange:z,filterStatus:l,handleStatusFilterChange:$,owners:D}),a(i,{item:!0,xs:4,className:c.headerButtons,children:!E&&a(Y,{disabled:V,variant:"contained",color:"primary",onClick:H,className:c.createButton,children:"Create Campaign"})})]}),a(i,{container:!0,spacing:4,role:"list","aria-label":"campaigns",children:g}),(h?.pageInfo.hasNextPage||N?.length>0)&&a(i,{item:!0,xs:12,children:a(me,{response:h,listingsPerPage:e,cursor:o,setCursor:P,prevCursors:N,setPrevCursors:w,labelPerPageDropdown:"Campaigns Per Page:",urlRoute:"campaigns?campaignsPerPage="})})]})};export{he as CampaignListPageDeprecated,B as CampaignNoResults};
2
+ //# sourceMappingURL=CampaignListPageDeprecated.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as p}from"react/jsx-runtime";import{useRouteRef as c}from"@backstage/core-plugin-api";import{usePermission as l}from"@backstage/plugin-permission-react";import{soundcheckCampaignUpdatePermission as P,soundcheckCampaignDeletePermission as x}from"@spotify/backstage-plugin-soundcheck-common";import{useCallback as b}from"react";import{useNavigate as I}from"react-router-dom";import{v4 as L}from"uuid";import{BadgeVariant as S}from"../../../graphql/generated/index.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../../hooks/useSoundcheckAlert.esm.js";import{useArchiveCampaign as T}from"../../../hooks/campaigns/useArchiveCampaign.esm.js";import{useDeleteCampaign as U}from"../../../hooks/campaigns/useDeleteCampaign.esm.js";import{useCreateTrack as N}from"../../../hooks/tracks/useCreateTrack.esm.js";import{useConfirmationModal as V}from"../../../hooks/useConfirmationModal.esm.js";import{campaignDetailsRouteRef as $,campaignEditRouteRef as j}from"../../../routes.esm.js";import{SummaryCard as B}from"../../SummaryCard/SummaryCard.esm.js";import{CampaignMetadata as q}from"./CampaignMetadata.esm.js";import{useArchiveConfirmationModal as z}from"./useArchiveConfirmationModal.esm.js";const F=({campaign:a})=>{const{id:u,name:f,description:g,ownerEntityRef:v,archived:h}=a,y=c($),C=c(j),r=I(),t=a.archived,{showModal:m}=V(),{showArchiveModal:w}=z(),{mutate:R}=N(),{mutate:n}=U(),{mutate:k}=T(),{loading:A,allowed:D}=l({permission:P,resourceRef:a.id}),{loading:d,allowed:s}=l({permission:x,resourceRef:a.id}),E=b(async()=>{await m({title:"Delete Campaign",message:`Are you sure you want to delete campaign ${a.name}?`})&&n(a.id)},[m,n,a.id,a.name]),M=()=>{const{track:e}=a,o={id:L(),ownerEntityRef:e.ownerEntityRef,description:e.description??"",name:e.name,documentationURL:e.documentationURL,type:"standard",levels:e.levels.map(i=>({checks:i.checks,description:i.description,name:i.name,ordinal:i.ordinal})),filter:e.filter??void 0,exclude:e.exclude??void 0,badgeType:e.badge?.variant===S.Status?"status":"medal",draft:e.draft??!1};R(o)};return p(B,{title:f??u,description:g,viewIsPrimaryAction:!0,children:(v||h)&&p(q,{campaign:a}),handleView:()=>r(y({campaignId:a.id})),handleEdit:!A&&D&&!t?()=>r(C({campaignId:a.id})):void 0,handleDelete:!d&&s?E:void 0,handleArchive:!d&&s&&!t?async()=>{const{saveTrack:e,confirmed:o}=await w({title:"Archive Campaign",message:`Are you sure you want to archive campaign ${a.name}?`});o&&(e&&M(),k(a.id))}:void 0})};export{F as CampaignSummaryCard};
1
+ import{jsx as p}from"react/jsx-runtime";import{useRouteRef as c}from"@backstage/core-plugin-api";import{usePermission as l}from"@backstage/plugin-permission-react";import{soundcheckCampaignUpdatePermission as P,soundcheckCampaignDeletePermission as x}from"@spotify/backstage-plugin-soundcheck-common";import{useCallback as b}from"react";import{useNavigate as I}from"react-router-dom";import{v4 as L}from"uuid";import{BadgeVariant as S}from"../../../graphql/generated/index.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../../hooks/useSoundcheckAlert.esm.js";import{useArchiveCampaign as T}from"../../../hooks/campaigns/useArchiveCampaign.esm.js";import{useDeleteCampaign as U}from"../../../hooks/campaigns/useDeleteCampaign.esm.js";import{useCreateTrack as N}from"../../../hooks/tracks/useCreateTrack.esm.js";import{useConfirmationModal as V}from"../../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import{campaignDetailsRouteRef as $,campaignEditRouteRef as j}from"../../../routes.esm.js";import{SummaryCard as B}from"../../SummaryCard/SummaryCard.esm.js";import{CampaignMetadata as q}from"./CampaignMetadata.esm.js";import{useArchiveConfirmationModal as z}from"./useArchiveConfirmationModal.esm.js";const F=({campaign:a})=>{const{id:u,name:f,description:g,ownerEntityRef:v,archived:h}=a,y=c($),C=c(j),r=I(),t=a.archived,{showModal:m}=V(),{showArchiveModal:w}=z(),{mutate:R}=N(),{mutate:n}=U(),{mutate:k}=T(),{loading:A,allowed:D}=l({permission:P,resourceRef:a.id}),{loading:d,allowed:s}=l({permission:x,resourceRef:a.id}),E=b(async()=>{await m({title:"Delete Campaign",message:`Are you sure you want to delete campaign ${a.name}?`})&&n(a.id)},[m,n,a.id,a.name]),M=()=>{const{track:i}=a,o={id:L(),ownerEntityRef:i.ownerEntityRef,description:i.description??"",name:i.name,documentationURL:i.documentationURL,type:"standard",levels:i.levels.map(e=>({checks:e.checks,description:e.description,name:e.name,ordinal:e.ordinal})),filter:i.filter??void 0,exclude:i.exclude??void 0,badgeType:i.badge?.variant===S.Status?"status":"medal",draft:i.draft??!1};R(o)};return p(B,{title:f??u,description:g,viewIsPrimaryAction:!0,children:(v||h)&&p(q,{campaign:a}),handleView:()=>r(y({campaignId:a.id})),handleEdit:!A&&D&&!t?()=>r(C({campaignId:a.id})):void 0,handleDelete:!d&&s?E:void 0,handleArchive:!d&&s&&!t?async()=>{const{saveTrack:i,confirmed:o}=await w({title:"Archive Campaign",message:`Are you sure you want to archive campaign ${a.name}?`});o&&(i&&M(),k(a.id))}:void 0})};export{F as CampaignSummaryCard};
2
2
  //# sourceMappingURL=CampaignSummaryCard.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as t,jsxs as l,Fragment as G}from"react/jsx-runtime";import{useApi as U,useRouteRef as L}from"@backstage/core-plugin-api";import{entityPresentationApiRef as F}from"@backstage/plugin-catalog-react";import{usePermission as W}from"@backstage/plugin-permission-react";import{Box as b,HeaderPage as Y,Table as q,TableHeader as J,Column as n,TableBody as K,TablePagination as Q}from"@backstage/ui";import{makeStyles as X}from"@material-ui/core";import{RiCalendarLine as Z}from"@remixicon/react";import{soundcheckCampaignCreatePermission as _}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as ee,isEmpty as I}from"lodash";import{DateTime as k}from"luxon";import{useState as y,useMemo as p,useEffect as te}from"react";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as re}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{useSearchName as ie}from"../../hooks/useSearchName.esm.js";import{usePagination as ae}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useProfileImages as oe}from"../../hooks/catalog/useProfileImages.esm.js";import{useLCPReporting as ne}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as me}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignCreateRouteRef as se,campaignDetailsRouteRef as pe}from"../../routes.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as ce}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoCampaigns as de}from"../EmptyState/EmptyStateNoCampaigns.esm.js";import{ListPageCustomActions as le}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as ge}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import"../Menus/SimpleMenu.esm.js";import"js-yaml";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{useCampaignActions as fe}from"../Menus/useCampaignActions.esm.js";import{TableRowWithOwner as ue}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const A=10,he=X(()=>({container:{padding:"0 var(--bui-space-3) var(--bui-space-6)"},emptySpacing:{margin:"var(--bui-space-3) 0"}})),E=e=>{const m=k.fromISO(e),a=k.now();return Math.max(Math.ceil(m.diff(a,"days").days),0)},ye=({campaign:e,profileImageMap:m})=>{const a=p(()=>e.archived?0:E(e.targetCompletionDate),[e.archived,e.targetCompletionDate]),g=L(pe),i=p(()=>e.track.levels.reduce((c,d)=>c+(d.checks?.length??0),0),[e.track.levels]),f=fe(e);return t(ue,{ownerEntityRef:e.ownerEntityRef,href:g({campaignId:e.id}),profileImageSrc:m[e.ownerEntityRef],menuActions:f,name:e.name??"",description:e.description??"",cells:[{title:e.archived?"Archived":"Active"},{title:`${a} day${a===1?"":"s"} remaining`,icon:t(Z,{size:16})},{title:`${i} Check${i===1?"":"s"}`}]})},we=()=>{const[e,m]=y(""),[a,g]=y("ascending"),[i,f]=y(""),c=he(),{data:d,isLoading:s}=re({}),w=p(()=>d?.edges?.map(r=>r.node)??[],[d?.edges]),{profileImageMap:T}=oe(w.map(r=>r.ownerEntityRef)),u=ie({items:w,searchTerm:e}),C=U(F),S=p(()=>{if(!i)return u;const r=ee(u,o=>i==="owner"?C.forEntity(o.ownerEntityRef).snapshot.primaryTitle.toLowerCase():i==="status"?o.archived?"archived":"active":i==="days-remaining"?o.archived?-1:E(o.targetCompletionDate):o.name.toLowerCase());return a==="descending"&&r.reverse(),r},[C,i,a,u]),{paginatedItems:h,reset:D,paginationProps:N}=ae({pageParam:"perPage",defaultPageSize:A,items:S}),{loading:M,allowed:x}=W({permission:_}),B=L(se),R=p(()=>({routeName:"soundcheck-campaigns",additionalAttributes:{}}),[]),{reportContentLoaded:v}=me(R),{reporter:H}=ne(R),P=H?.getLCPValue();te(()=>{s||v({lcp:P})},[s,v,P]);const $=!s&&!I(h),O=S.length>A,V=!s&&I(h),z=s,j=e?t(ce,{title:"No campaigns found",body:"Your current search term did not return any campaigns. Please try a different search term."}):t(de,{});return l(G,{children:[t(b,{children:t(Y,{customActions:t(le,{searchValue:e,setSearchValue:r=>{D(),m(r)},canCreate:!M&&x,createHref:B()}),title:"Campaigns"})}),l(b,{className:c.container,children:[z&&t(ge,{rowCount:10}),V&&t("div",{className:c.emptySpacing,children:j}),$&&l(q,{onSortChange:({direction:r,column:o})=>{f(String(o)),g(r)},sortDescriptor:{direction:a,column:i},children:[l(J,{children:[t(n,{allowsSorting:!0,isRowHeader:!0,id:"name",style:{width:"48%"},children:"Name"}),t(n,{allowsSorting:!0,id:"status",style:{width:"10%"},children:"Status"}),t(n,{allowsSorting:!0,id:"days-remaining",style:{width:"15%"},children:"Days Remaining"}),t(n,{id:"checks",style:{width:"10%"},children:"Checks"}),t(n,{allowsSorting:!0,id:"owner",style:{width:"15%"},children:"Campaign Owner"}),t(n,{style:{width:"2%"}})]}),t(K,{children:h.map(r=>t(ye,{campaign:r,profileImageMap:T??{}},r.id))})]}),O&&t(Q,{...N})]})]})};export{we as CampaignListPageBUI};
2
+ //# sourceMappingURL=CampaignListPageBUI.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{useSearchParams as t}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{CampaignFormProvider as e}from"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{useLCPReporting as a}from"../../hooks/useLCPReporting.esm.js";import{RESULTS_PER_PAGE as p}from"../../utils/filters.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useSetHeaderDefault as n}from"../SoundcheckHeader/useHeader.esm.js";import{CampaignListPage as s}from"./CampaignListPage/CampaignListPage.esm.js";import"./CampaignListPage/CampaignTypes.esm.js";const g=()=>{const[o]=t(),i=o.get("campaignsPerPage"),m=i?parseInt(i,10):p;return n(),a({routeName:"soundcheck-campaigns",additionalAttributes:{campaignsPerPage:m.toString()}}),r(e,{children:r("div",{children:r(s,{campaignsPerPage:m})})})};export{g as CampaignsPage};
1
+ import{jsx as r}from"react/jsx-runtime";import{useSearchParams as t}from"react-router-dom";import{useFeatureFlag as o}from"../../hooks/useFeatureFlag.esm.js";import{RESULTS_PER_PAGE as i}from"../../utils/filters.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useSetHeaderDefault as p}from"../SoundcheckHeader/useHeader.esm.js";import{CampaignListPageDeprecated as s}from"./CampaignListPage/CampaignListPageDeprecated.esm.js";import"./CampaignListPage/CampaignTypes.esm.js";import g from"./CampaignListPage/useArchiveConfirmationModal.esm.js";import{CampaignListPageBUI as n}from"./CampaignListPageBUI.esm.js";const P=()=>{const[a]=t(),e=a.get("campaignsPerPage"),m=e?parseInt(e,10):i;return p(),o("backstage-ui")?r(g,{children:r(n,{})}):r(s,{campaignsPerPage:m})};export{P as CampaignsPage};
2
2
  //# sourceMappingURL=CampaignsPage.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as i,jsxs as l,Fragment as r}from"react/jsx-runtime";import{usePermission as C}from"@backstage/plugin-permission-react";import{soundcheckCampaignUpdatePermission as h}from"@spotify/backstage-plugin-soundcheck-common";import{useEffect as y}from"react";import{useParams as k}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as L}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useUpdateCampaign as P}from"../../hooks/campaigns/useUpdateCampaign.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as w}from"../../hooks/useNavigateBack.esm.js";import{useGetCampaign as x}from"../../hooks/campaigns/useGetCampaign.esm.js";import{campaignsPageRouteRef as E}from"../../routes.esm.js";import{CampaignForm as U}from"../CampaignForm/CampaignForm.esm.js";import{PageWarningMessage as F}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as I}from"../SoundcheckHeader/useHeader.esm.js";import{Loading as R}from"../TechHealth/Loading/Loading.esm.js";import{EmptyCampaignState as S}from"./CampaignEmptyState.esm.js";const j=()=>{I({title:"Update Campaign",description:"Update your campaign, including schedule, milestones, and other associated details.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns"});const[n,p]=w(E),{campaignId:s}=k(),{setIsLoading:t}=L(),{mutateAsync:c,isLoading:e}=P(),{data:d,isLoading:m}=x(s??""),o=d?.edges?.[0]?.node,{loading:g,allowed:a}=C({permission:h,resourceRef:o?.id});if(y(()=>t(e),[t,e]),!m&&!o)return i(S,{});const f=async u=>{await c(u,{onSuccess:p})};return l(r,{children:[i(F,{entityId:o?.id,entityName:o?.name??"",showCannotEdit:!g&&!a}),m?i(R,{}):i(r,{children:a&&i(U,{onSave:f,onCancel:n,selectedCampaign:o})})]})};export{j as EditCampaignView};
1
+ import{jsx as o,jsxs as b,Fragment as s}from"react/jsx-runtime";import{useRouteRef as n}from"@backstage/core-plugin-api";import{usePermission as R}from"@backstage/plugin-permission-react";import{Box as L,HeaderPage as P}from"@backstage/ui";import{soundcheckCampaignUpdatePermission as x}from"@spotify/backstage-plugin-soundcheck-common";import{useEffect as E}from"react";import{useParams as F}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as w}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useUpdateCampaign as I}from"../../hooks/campaigns/useUpdateCampaign.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as U}from"../../hooks/useNavigateBack.esm.js";import"react-use/lib/useLocalStorage";import{useGetCampaign as A}from"../../hooks/campaigns/useGetCampaign.esm.js";import{useFeatureFlag as B}from"../../hooks/useFeatureFlag.esm.js";import{campaignsPageRouteRef as p,campaignDetailsRouteRef as D}from"../../routes.esm.js";import{CampaignForm as S}from"../CampaignForm/CampaignForm.esm.js";import{DocLinkButton as j}from"../DocLinkButton/DocLinkButton.esm.js";import{PageWarningMessage as v}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as H}from"../SoundcheckHeader/useHeader.esm.js";import{Loading as N}from"../TechHealth/Loading/Loading.esm.js";import{EmptyCampaignState as G}from"./CampaignEmptyState.esm.js";const M=()=>{H({title:"Update Campaign",description:"Update your campaign, including schedule, milestones, and other associated details.",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns"});const[c,d]=U(p),{campaignId:t}=F(),{setIsLoading:e}=w(),{mutateAsync:g,isLoading:a}=I(),{data:f,isLoading:m}=A(t??""),i=f?.edges?.[0]?.node,{loading:u,allowed:r}=R({permission:x,resourceRef:i?.id});E(()=>e(a),[e,a]);const l=B("backstage-ui"),h=n(p),C=n(D);if(!m&&!i)return o(G,{});const k=async y=>{await g(y,{onSuccess:d})};return b(s,{children:[l&&o(L,{children:o(P,{title:`Edit ${i?.name??t??"Campaign"}`,breadcrumbs:[{label:"All Campaigns",href:h()},{label:"Details",href:C({campaignId:t??""})}],customActions:o(j,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns/"})})}),o(v,{entityId:i?.id,entityName:i?.name??"",showCannotEdit:!u&&!r}),m?o(N,{}):o(s,{children:r&&o(S,{onSave:k,onCancel:c,selectedCampaign:i})})]})};export{M as EditCampaignView};
2
2
  //# sourceMappingURL=EditCampaignView.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsxs as s,jsx as t}from"react/jsx-runtime";import{Card as a,CardHeader as o,Text as c,CardBody as d,Flex as i}from"@backstage/ui";import{CheckStatusTableBUI as m}from"../../CheckPage/CheckStatusTableBUI.esm.js";import"../../CheckStatusBar/CheckStatusBar.esm.js";import{CheckStatusBarBUI as n}from"../../CheckStatusBar/CheckStatusBarBUI.esm.js";const h=({status:r,states:e})=>s(a,{children:[t(o,{children:t(c,{color:"secondary",children:"Current Status"})}),t(d,{children:s(i,{direction:"column",gap:"6",children:[t(n,{status:r,states:e}),t(m,{checkStatus:r,states:e})]})})]});export{h as CheckStatusCard};
2
+ //# sourceMappingURL=CheckStatusCard.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,Fragment as d,jsx as r}from"react/jsx-runtime";import{Card as l,CardHeader as m,Text as n,CardBody as a,Box as t,CardFooter as s,TagGroup as p,Tag as h}from"@backstage/ui";import{makeStyles as x}from"@material-ui/core";import{RiUserLine as f}from"@remixicon/react";import"../../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"@backstage/core-components";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import{SoundcheckMarkdownContentBUI as B}from"../../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";const C=x(()=>({scrollBox:{overflow:"auto"}})),w=({description:i,owner:o})=>{const c=C();return e(l,{children:[i&&e(d,{children:[r(m,{children:r(n,{color:"secondary",children:"Description"})}),r(a,{children:r(t,{className:c.scrollBox,style:{maxHeight:o?"6.3rem":"11rem"},children:r(B,{content:i})})})]}),o&&e(s,{children:[r(t,{mb:"3",children:r(n,{color:"secondary",children:"Owner"})}),r(p,{"aria-label":"Owner",children:r(h,{icon:r(f,{}),children:o})})]})]})};export{w as DescriptionCard};
2
+ //# sourceMappingURL=DescriptionCard.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useApi as d,configApiRef as m}from"@backstage/core-plugin-api";import{Card as f,CardHeader as l,Flex as h,Text as p,CardBody as u}from"@backstage/ui";import{makeStyles as y}from"@material-ui/core";import{CheckStatusHistoryChartBUI as k}from"../../CheckPage/CheckStatusHistoryChartBUI.esm.js";import{TimePeriodBarBUI as I}from"../../TimePeriodBar/TimePeriodBarBUI.esm.js";const C=y(()=>({cardBody:{marginTop:"var(--bui-space-1)"}})),b=({checkId:t,trackId:i,filter:a,states:o,numberOfDays:c})=>{const s=C(),n=d(m).getOptionalNumber("soundcheck.certifications.history.retentionTimeInDays");return e(f,{children:[r(l,{children:e(h,{align:"center",justify:"between",children:[r(p,{color:"secondary",children:"Historical Status"}),r(I,{maxNumberOfDays:n})]})}),r(u,{className:s.cardBody,children:r(k,{checkId:t,trackId:i,filter:a,states:o,numberOfDays:c})})]})};export{b as HistoricalCheckStatusCard};
2
+ //# sourceMappingURL=HistoricalCheckStatusCard.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useApi as d,configApiRef as l}from"@backstage/core-plugin-api";import{Text as c,Card as p,CardHeader as y,Flex as f,CardBody as h}from"@backstage/ui";import{makeStyles as u}from"@material-ui/core";import{CampaignStatusHistoryChart as g}from"../../CampaignPage/CampaignStatusHistoryChart.esm.js";import{LoadingTableSkeleton as k}from"../../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{TimePeriodBarBUI as C}from"../../TimePeriodBar/TimePeriodBarBUI.esm.js";import{TrackHistoryChartBUI as T}from"../../TrackPage/TrackHistoryChartBUI.esm.js";const x=u(()=>({cardBody:{marginTop:"var(--bui-space-1)"}})),B=({track:a,history:o,isError:s,isCampaign:t})=>{const n=x(),m=d(l).getOptionalNumber("soundcheck.certifications.history.retentionTimeInDays");let i=r(T,{track:a,history:o});return t?i=r(g,{history:o}):s&&(i=r(c,{color:"warning",children:"Failed to load track data."})),!a||!o?r(k,{}):e(p,{children:[r(y,{children:e(f,{align:"center",justify:"between",children:[r(c,{color:"secondary",children:"Historical Status"}),!t&&r(C,{maxNumberOfDays:m})]})}),r(h,{className:n.cardBody,children:i})]})};export{B as HistoricalTrackStatusCard};
2
+ //# sourceMappingURL=HistoricalTrackStatusCard.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsxs as r,jsx as t}from"react/jsx-runtime";import{Card as o,CardHeader as e,Text as n,CardBody as d,Flex as m}from"@backstage/ui";import{TrackStatusBarBUI as u}from"../../TrackPage/TrackStatusBarBUI.esm.js";import{TrackStatusTableBUI as l}from"../../TrackPage/TrackStatusTableBUI.esm.js";const p=({track:a,status:i,children:c,isCampaign:s})=>r(o,{children:[t(e,{children:t(n,{color:"secondary",children:"Current Status"})}),r(d,{children:[r(m,{direction:"column",gap:"6",children:[t(u,{track:a,status:i?.certificationStatus}),t(l,{track:a,status:i?.certificationStatus,isCampaign:s})]}),c]})]});export{p as TrackStatusCard};
2
+ //# sourceMappingURL=TrackStatusCard.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as i,jsxs as u}from"react/jsx-runtime";import{useEntity as g}from"@backstage/plugin-catalog-react";import{styled as o,Accordion as h,AccordionSummary as b,AccordionDetails as k,makeStyles as y,Box as R}from"@material-ui/core";import x from"@material-ui/icons/ExpandMore";import{useRef as v}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCertificationDetailsForTrack as I}from"../../hooks/certifications/useCertificationDetailsForTrack.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{AlertPanel as L}from"../AlertPanel/AlertPanel.esm.js";import"../CertificationSidebar/CertificationSidebar.esm.js";import{CertificationSummary as T}from"../CertificationSidebar/CertificationSummary.esm.js";import{CertificationSidebarSkeleton as C}from"../CertificationSidebar/skeletons/CertificationSidebarSkeleton.esm.js";import"@material-ui/lab";import{CertificationLevel as S}from"../CertificationSidebar/CertificationLevel.esm.js";const A=o(h)(({theme:t})=>({margin:"0",border:`1px solid ${t.palette.divider}`,borderRadius:0,"&.Mui-expanded":{borderRadius:0},"&:first-child":{borderTopLeftRadius:0,borderTopRightRadius:0},"&:last-child":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&:not(:first-child)":{borderTop:`1px solid ${t.palette.divider}`},"&:not(:last-child)":{marginBottom:t.spacing(1)}})),B=o(({...t})=>i(b,{classes:{content:"content",expanded:"expanded"},...t}))(({theme:t})=>({borderRadius:0,paddingTop:0,paddingLeft:0,paddingRight:t.spacing(1),"& > .content":{margin:"0 !important",padding:"0 !important"},"& > .content.expanded":{margin:"0 !important",padding:"0 !important"}})),E=o(k)(()=>({margin:"0 !important",borderRadius:0,padding:0})),d=y(()=>({sidebar:{width:"100%"}})),D=({playlistId:t,trackId:e,checkId:n})=>{const c=d(),{entity:m}=g(),p=v(null),{data:r,isLoading:s,isError:l}=I(m,e);if(l)return i("div",{children:i(R,{padding:2,children:i(L,{severity:"error",title:"Error loading certification"})})});if(s||!e)return i(C,{});if(!r)return null;const f=r.track.type==="campaign";return u(A,{ref:p,defaultExpanded:!0,elevation:0,children:[i(B,{expandIcon:i(x,{}),"aria-controls":"certification-content",id:"certification-summary",children:i(T,{name:r.track.name,badge:r.track.badge,description:r.track.description,documentationUrl:r.track.documentationURL,trackType:r.track.type})}),i(E,{children:i("div",{className:c.sidebar,children:r?.levels.map(a=>i(S,{level:a,checkId:n,trackId:e,playlistId:t,isCampaign:f},a.ordinal))})})]})};export{D as CertificationAccordion,d as useStyles};
1
+ import{jsx as i,jsxs as u}from"react/jsx-runtime";import{useEntity as g}from"@backstage/plugin-catalog-react";import{styled as o,Accordion as h,AccordionSummary as b,AccordionDetails as k,makeStyles as y,Box as R}from"@material-ui/core";import x from"@material-ui/icons/ExpandMore";import{useRef as v}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCertificationDetailsForTrack as I}from"../../hooks/certifications/useCertificationDetailsForTrack.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"react-use/lib/useLocalStorage";import{AlertPanel as L}from"../AlertPanel/AlertPanel.esm.js";import"../CertificationSidebar/CertificationSidebar.esm.js";import{CertificationSummary as T}from"../CertificationSidebar/CertificationSummary.esm.js";import{CertificationSidebarSkeleton as C}from"../CertificationSidebar/skeletons/CertificationSidebarSkeleton.esm.js";import"@material-ui/lab";import{CertificationLevel as S}from"../CertificationSidebar/CertificationLevel.esm.js";const A=o(h)(({theme:t})=>({margin:"0",border:`1px solid ${t.palette.divider}`,borderRadius:0,"&.Mui-expanded":{borderRadius:0},"&:first-child":{borderTopLeftRadius:0,borderTopRightRadius:0},"&:last-child":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&:not(:first-child)":{borderTop:`1px solid ${t.palette.divider}`},"&:not(:last-child)":{marginBottom:t.spacing(1)}})),B=o(({...t})=>i(b,{classes:{content:"content",expanded:"expanded"},...t}))(({theme:t})=>({borderRadius:0,paddingTop:0,paddingLeft:0,paddingRight:t.spacing(1),"& > .content":{margin:"0 !important",padding:"0 !important"},"& > .content.expanded":{margin:"0 !important",padding:"0 !important"}})),E=o(k)(()=>({margin:"0 !important",borderRadius:0,padding:0})),d=y(()=>({sidebar:{width:"100%"}})),D=({playlistId:t,trackId:e,checkId:n})=>{const c=d(),{entity:m}=g(),p=v(null),{data:r,isLoading:s,isError:l}=I(m,e);if(l)return i("div",{children:i(R,{padding:2,children:i(L,{severity:"error",title:"Error loading certification"})})});if(s||!e)return i(C,{});if(!r)return null;const f=r.track.type==="campaign";return u(A,{ref:p,defaultExpanded:!0,elevation:0,children:[i(B,{expandIcon:i(x,{}),"aria-controls":"certification-content",id:"certification-summary",children:i(T,{name:r.track.name,badge:r.track.badge,description:r.track.description,documentationUrl:r.track.documentationURL,trackType:r.track.type})}),i(E,{children:i("div",{className:c.sidebar,children:r?.levels.map(a=>i(S,{level:a,checkId:n,trackId:e,playlistId:t,isCampaign:f},a.ordinal))})})]})};export{D as CertificationAccordion,d as useStyles};
2
2
  //# sourceMappingURL=CertificationAccordion.esm.js.map