@spotify/backstage-plugin-soundcheck 0.20.0 → 0.22.0

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 (91) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/alpha/integrations.esm.js +1 -1
  3. package/dist/alpha/pages.esm.js +1 -1
  4. package/dist/alpha.d.ts +68 -23
  5. package/dist/api.esm.js +1 -1
  6. package/dist/blueprints/CampaignActionBlueprint.esm.js +2 -0
  7. package/dist/blueprints/IntegrationPageBlueprint.esm.js +1 -1
  8. package/dist/components/AccordionSection/AccordionSection.esm.js +2 -0
  9. package/dist/components/Alert/Alert.esm.js +2 -0
  10. package/dist/components/CampaignPage/CampaignActionsContext.esm.js +2 -0
  11. package/dist/components/CampaignPage/CampaignPageBUI.esm.js +1 -1
  12. package/dist/components/CampaignsPage/CampaignListPageBUI.esm.js +1 -1
  13. package/dist/components/CampaignsPage/EditCampaignView.esm.js +1 -1
  14. package/dist/components/CertificationSidebar/Check.esm.js +1 -1
  15. package/dist/components/CheckForm/FormFields/RuleInput/AddMenuButton.esm.js +1 -1
  16. package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTableBUI.esm.js +1 -1
  17. package/dist/components/CheckPage/CheckPageBUI.esm.js +1 -1
  18. package/dist/components/CheckPage/ExemptionsTableBUI.esm.js +1 -1
  19. package/dist/components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js +1 -1
  20. package/dist/components/CheckTemplatesPage/TemplateCategoryBUI.esm.js +1 -1
  21. package/dist/components/ChecksPage/ChecksListPageBUI.esm.js +1 -1
  22. package/dist/components/ChecksTable/ChecksTable.esm.js +1 -1
  23. package/dist/components/CollectorPage/CollectorFactTableBUI.esm.js +1 -1
  24. package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +1 -1
  25. package/dist/components/CollectorPage/Configurators/Configurator.esm.js +1 -1
  26. package/dist/components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js +1 -1
  27. package/dist/components/CollectorPage/Configurators/SonarQube/utils.esm.js +1 -1
  28. package/dist/components/CollectorsPage/IntegrationLogoBUI.esm.js +1 -1
  29. package/dist/components/CollectorsPage/IntegrationsListPageBUI.esm.js +1 -1
  30. package/dist/components/CreateNewTrackPage/CreateNewTrackPage.esm.js +2 -0
  31. package/dist/components/EmptyState/EmptyStateNoTracks.esm.js +1 -1
  32. package/dist/components/ExpandableSection/ExpandableSection.esm.js +1 -1
  33. package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
  34. package/dist/components/FilterSidebar/useTrackFilterSidebar.esm.js +1 -1
  35. package/dist/components/FilterSidebar/util.esm.js +1 -1
  36. package/dist/components/FormControlledAutocomplete/FormControlledAutocomplete.esm.js +1 -1
  37. package/dist/components/GroupSelectorBUI/GroupSelectorBUI.esm.js +1 -1
  38. package/dist/components/HierarchicalTechInsightsPage/visualizations/hierarchyToNivo.esm.js +1 -1
  39. package/dist/components/Loading/Loading.esm.js +2 -0
  40. package/dist/components/Menus/useCampaignActions.esm.js +1 -1
  41. package/dist/components/RoutingPage/RoutingPageBUI.esm.js +1 -1
  42. package/dist/components/SoundcheckHeader/SoundcheckHeaderBUI.esm.js +1 -1
  43. package/dist/components/SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js +1 -1
  44. package/dist/components/Stepper/Stepper.esm.js +2 -0
  45. package/dist/components/TableRowWithOwner/TableRowWithOwner.esm.js +1 -1
  46. package/dist/components/TechInsights/TechInsightsPageBUI.esm.js +1 -1
  47. package/dist/components/TechInsights/TechInsightsTableBUI.esm.js +1 -1
  48. package/dist/components/TechInsightsExplorerTable/TechInsightsExplorerTable.esm.js +1 -1
  49. package/dist/components/TimePeriodBar/TimePeriodBarBUI.esm.js +1 -1
  50. package/dist/components/TopAndBottomPerformingTeams/TopAndBottomPerformingTeams.esm.js +1 -1
  51. package/dist/components/TopFailingChecksTable/TopFailingChecksTableBUI.esm.js +1 -1
  52. package/dist/components/TrackBuilderPage/TrackBuilderPage.esm.js +2 -0
  53. package/dist/components/TrackBuilderPage/components/CheckItem/CheckItem.esm.js +2 -0
  54. package/dist/components/TrackBuilderPage/components/IntegrationTags/IntegrationTags.esm.js +2 -0
  55. package/dist/components/TrackBuilderPage/components/RunChecksStep/RunChecksStep.esm.js +2 -0
  56. package/dist/components/TrackBuilderPage/components/SelectProviderStep/SelectProviderStep.esm.js +2 -0
  57. package/dist/components/TrackBuilderPage/components/SelectTracksStep/SelectTracksStep.esm.js +2 -0
  58. package/dist/components/TrackBuilderPage/components/TrackAccordion/TrackAccordion.esm.js +2 -0
  59. package/dist/components/TrackBuilderPage/components/TrackBuilderStatus/TrackBuilderStatus.esm.js +2 -0
  60. package/dist/components/TrackBuilderPage/hooks/useTrackBuilderStatus.esm.js +2 -0
  61. package/dist/components/TrackBuilderPage/hooks/useTrackCheckExecutions.esm.js +2 -0
  62. package/dist/components/TrackBuilderPage/utils.esm.js +4 -0
  63. package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js +1 -1
  64. package/dist/components/TrackPage/TrackHistoryChartBUI.esm.js +1 -1
  65. package/dist/components/TrackPage/TrackPageBUI.esm.js +1 -1
  66. package/dist/components/TrackPage/TrackTechInsightsExplorerPage.esm.js +1 -1
  67. package/dist/components/TracksPage/TracksListPageBUI.esm.js +1 -1
  68. package/dist/graphql/generated/index.esm.js +163 -84
  69. package/dist/hooks/catalog/useGetEntityRefs.esm.js +1 -1
  70. package/dist/hooks/filters/useFilters.esm.js +1 -1
  71. package/dist/hooks/graphqlKeys.esm.js +1 -1
  72. package/dist/hooks/tracks/useDeleteTrack.esm.js +1 -1
  73. package/dist/hooks/tracks/useOutOfBoxTracks.esm.js +2 -0
  74. package/dist/hooks/tracks/useSaveOutOfBoxTracks.esm.js +2 -0
  75. package/dist/hooks/tracks/useTracksApplicableToGroup.esm.js +1 -1
  76. package/dist/index.d.ts +30 -2
  77. package/dist/index.esm.js +1 -1
  78. package/dist/routes.esm.js +1 -1
  79. package/dist/utils/facetFilters/utils.esm.js +2 -0
  80. package/package.json +25 -25
  81. package/dist/components/CollapsablePanel/CollapsablePanel.esm.js +0 -2
  82. package/dist/components/TechHealth/Filters/FacetFilter.esm.js +0 -2
  83. package/dist/components/TechHealth/Filters/FilterProvider.esm.js +0 -2
  84. package/dist/components/TechHealth/Filters/Filters.esm.js +0 -2
  85. package/dist/components/TechHealth/Filters/FiltersHeader.esm.js +0 -2
  86. package/dist/components/TechHealth/Filters/FiltersSection.esm.js +0 -2
  87. package/dist/components/TechHealth/Filters/NumberOfDaysFilter.esm.js +0 -2
  88. package/dist/components/TechHealth/Filters/utils.esm.js +0 -2
  89. package/dist/components/TechHealth/Loading/Loading.esm.js +0 -2
  90. package/dist/components/TechHealth/Loading/TechHealthLoading.esm.js +0 -2
  91. /package/dist/{components/TechHealth/Filters → utils/facetFilters}/types.esm.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @spotify/backstage-plugin-soundcheck
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added CampaignActionBlueprint extension point for external plugins to inject actions
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependency `backstage` to `1.48.0`.
12
+ - Updated dependency `@graphql-codegen/add` to `^6.0.0`.
13
+ Updated dependency `@graphql-codegen/cli` to `^6.0.0`.
14
+ Updated dependency `@graphql-codegen/typescript` to `^5.0.0`.
15
+ Updated dependency `@graphql-codegen/typescript-resolvers` to `^5.0.0`.
16
+ Updated dependency `@graphql-codegen/fragment-matcher` to `^6.0.0`.
17
+ Updated dependency `@graphql-codegen/introspection` to `^5.0.0`.
18
+ Updated dependency `@graphql-codegen/typescript-operations` to `^5.0.0`.
19
+ Updated dependency `@graphql-codegen/near-operation-file-preset` to `^4.0.0`.
20
+ - Resolved an issue where, in certain scenarios, the "Configure" button was incorrectly disabled for integrations with a custom No-Code UI.
21
+ - Soundcheck - Fixes an issue that could display entity references instead of names in Soundcheck tables.
22
+ - Fixed an issue where the SonarQube integration displayed an error in the UI after clicking "Configure".
23
+ - Dropdowns in Soundcheck no longer auto select values when hovered over and not clicked
24
+ - Launch Spotify Track Templates feature.
25
+ - Fix Soundcheck track overview filtering for multiple selected owners.
26
+ - Soundcheck - Fixed an issue where the fact-explorer could show an empty fact if fact collection failed.
27
+ - Updated dependencies
28
+ - Updated dependencies
29
+ - Updated dependencies
30
+ - Updated dependencies
31
+ - @spotify/backstage-plugin-core@0.8.15
32
+ - @spotify/backstage-plugin-soundcheck-common@0.21.0
33
+
34
+ ## 0.21.0
35
+
36
+ ### Minor Changes
37
+
38
+ - Removed remnants of the deprecated Tech Health page. Includes changes to config (BREAKING).
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependency `backstage` to `1.47.0`.
43
+ - Soundcheck - Fixes a duplicate and conflicting react-aria dependency.
44
+ - Updated dependencies
45
+ - Updated dependencies
46
+ - Updated dependencies
47
+ - @spotify/backstage-plugin-core@0.8.14
48
+ - @spotify/backstage-plugin-soundcheck-common@0.20.0
49
+
3
50
  ## 0.20.0
4
51
 
5
52
  ### Minor Changes
@@ -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 e}from"react/jsx-runtime";import{IntegrationPageBlueprint as t}from"../blueprints/IntegrationPageBlueprint.esm.js";import"../blueprints/CampaignActionBlueprint.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};
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/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};
1
+ import{jsx as n}from"react/jsx-runtime";import{convertLegacyRouteRef as i,compatWrapper as r}from"@backstage/core-compat-api";import{PageBlueprint as c,createExtensionInput as m,coreExtensionData as e}from"@backstage/frontend-plugin-api";import{integrationIdExtensionDataRef as g}from"../blueprints/IntegrationPageBlueprint.esm.js";import{campaignActionLabelDataRef as p,campaignActionIdDataRef as u,campaignActionHrefDataRef as f}from"../blueprints/CampaignActionBlueprint.esm.js";import{rootRouteRef as s}from"../routes.esm.js";const d=c.makeWithOverrides({name:"SoundcheckRoutingPage",inputs:{integrations:m([e.routePath,e.reactElement,e.routeRef.optional(),g]),campaignActions:m([p,u,f])},factory(o,{config:R,inputs:a}){return o({routeRef:i(s),path:"/soundcheck",loader:()=>import("../components/RoutingPage/RoutingPage.esm.js").then(h=>r(n(h.RoutingPage,{title:R.title,integrations:a.integrations.map(t=>({integrationId:t.get(g),routePath:t.get(e.routePath),routeRef:t.get(e.routeRef)})),campaignActions:a.campaignActions.map(t=>({label:t.get(p),id:t.get(u),href:t.get(f)}))})))})}}),l=c.make({name:"overview",params:{routeRef:i(s),path:"/soundcheck",loader:()=>import("../components/OverviewPage/index.esm.js").then(o=>r(n(o.OverviewPage,{})))}});export{l as soundcheckOverviewPage,d as soundcheckRoutingPage};
2
2
  //# sourceMappingURL=pages.esm.js.map
package/dist/alpha.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as react from 'react';
2
1
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
2
+ import * as react from 'react';
3
3
 
4
4
  /**
5
5
  * @public
@@ -12,7 +12,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
12
12
  name: "azure";
13
13
  config: {};
14
14
  configInput: {};
15
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
15
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
16
16
  optional: true;
17
17
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
18
18
  inputs: {};
@@ -28,7 +28,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
28
28
  name: "bigquery";
29
29
  config: {};
30
30
  configInput: {};
31
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
31
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
32
32
  optional: true;
33
33
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
34
34
  inputs: {};
@@ -44,7 +44,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
44
44
  name: "catalog";
45
45
  config: {};
46
46
  configInput: {};
47
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
47
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
48
48
  optional: true;
49
49
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
50
50
  inputs: {};
@@ -60,7 +60,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
60
60
  name: "datadog";
61
61
  config: {};
62
62
  configInput: {};
63
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
63
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
64
64
  optional: true;
65
65
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
66
66
  inputs: {};
@@ -76,7 +76,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
76
76
  name: "data-registry";
77
77
  config: {};
78
78
  configInput: {};
79
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
79
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
80
80
  optional: true;
81
81
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
82
82
  inputs: {};
@@ -92,7 +92,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
92
92
  name: "github";
93
93
  config: {};
94
94
  configInput: {};
95
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
95
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
96
96
  optional: true;
97
97
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
98
98
  inputs: {};
@@ -108,7 +108,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
108
108
  name: "gitlab";
109
109
  config: {};
110
110
  configInput: {};
111
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
111
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
112
112
  optional: true;
113
113
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
114
114
  inputs: {};
@@ -124,7 +124,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
124
124
  name: "http";
125
125
  config: {};
126
126
  configInput: {};
127
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
127
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
128
128
  optional: true;
129
129
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
130
130
  inputs: {};
@@ -140,7 +140,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
140
140
  name: "jira";
141
141
  config: {};
142
142
  configInput: {};
143
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
143
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
144
144
  optional: true;
145
145
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
146
146
  inputs: {};
@@ -156,7 +156,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
156
156
  name: "kubernetes";
157
157
  config: {};
158
158
  configInput: {};
159
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
159
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
160
160
  optional: true;
161
161
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
162
162
  inputs: {};
@@ -172,7 +172,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
172
172
  name: "newrelic";
173
173
  config: {};
174
174
  configInput: {};
175
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
175
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
176
176
  optional: true;
177
177
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
178
178
  inputs: {};
@@ -188,7 +188,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
188
188
  name: "pagerduty";
189
189
  config: {};
190
190
  configInput: {};
191
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
191
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
192
192
  optional: true;
193
193
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
194
194
  inputs: {};
@@ -204,7 +204,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
204
204
  name: "scm";
205
205
  config: {};
206
206
  configInput: {};
207
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
207
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
208
208
  optional: true;
209
209
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
210
210
  inputs: {};
@@ -220,7 +220,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
220
220
  name: "sonarqube";
221
221
  config: {};
222
222
  configInput: {};
223
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
223
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
224
224
  optional: true;
225
225
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "soundcheck.integrationId", {}>;
226
226
  inputs: {};
@@ -250,22 +250,43 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
250
250
  }>;
251
251
  "page:soundcheck/SoundcheckRoutingPage": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
252
252
  config: {
253
- title: string | undefined;
254
253
  path: string | undefined;
254
+ title: string | undefined;
255
255
  };
256
256
  configInput: {
257
- title?: string | undefined;
257
+ title?: string | undefined | undefined;
258
258
  path?: string | undefined | undefined;
259
259
  };
260
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
260
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
261
+ optional: true;
262
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {
263
+ optional: true;
264
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
261
265
  optional: true;
262
266
  }>;
263
267
  inputs: {
264
- integrations: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "soundcheck.integrationId", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
268
+ pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
269
+ optional: true;
270
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", {
271
+ optional: true;
272
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
265
273
  optional: true;
266
274
  }>, {
267
275
  singleton: false;
268
276
  optional: false;
277
+ internal: false;
278
+ }>;
279
+ integrations: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "soundcheck.integrationId", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
280
+ optional: true;
281
+ }>, {
282
+ singleton: false;
283
+ optional: false;
284
+ internal: false;
285
+ }>;
286
+ campaignActions: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "soundcheck.campaignAction.label", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "soundcheck.campaignAction.id", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(campaignId: string) => string, "soundcheck.campaignAction.href", {}>, {
287
+ singleton: false;
288
+ optional: false;
289
+ internal: false;
269
290
  }>;
270
291
  };
271
292
  kind: "page";
@@ -273,8 +294,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
273
294
  params: {
274
295
  defaultPath?: [Error: `Use the 'path' param instead`];
275
296
  path: string;
276
- loader: () => Promise<JSX.Element>;
297
+ title?: string;
298
+ icon?: _backstage_frontend_plugin_api.IconElement;
299
+ loader?: () => Promise<react.JSX.Element>;
277
300
  routeRef?: _backstage_frontend_plugin_api.RouteRef;
301
+ noHeader?: boolean;
278
302
  };
279
303
  }>;
280
304
  "page:soundcheck/overview": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
@@ -282,19 +306,40 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
282
306
  name: "overview";
283
307
  config: {
284
308
  path: string | undefined;
309
+ title: string | undefined;
285
310
  };
286
311
  configInput: {
312
+ title?: string | undefined;
287
313
  path?: string | undefined;
288
314
  };
289
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
315
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
316
+ optional: true;
317
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {
318
+ optional: true;
319
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
290
320
  optional: true;
291
321
  }>;
292
- inputs: {};
322
+ inputs: {
323
+ pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
324
+ optional: true;
325
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", {
326
+ optional: true;
327
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
328
+ optional: true;
329
+ }>, {
330
+ singleton: false;
331
+ optional: false;
332
+ internal: false;
333
+ }>;
334
+ };
293
335
  params: {
294
336
  defaultPath?: [Error: `Use the 'path' param instead`];
295
337
  path: string;
296
- loader: () => Promise<JSX.Element>;
338
+ title?: string;
339
+ icon?: _backstage_frontend_plugin_api.IconElement;
340
+ loader?: () => Promise<react.JSX.Element>;
297
341
  routeRef?: _backstage_frontend_plugin_api.RouteRef;
342
+ noHeader?: boolean;
298
343
  };
299
344
  }>;
300
345
  }>;
package/dist/api.esm.js CHANGED
@@ -1,2 +1,2 @@
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=new TextDecoder("utf-8").decode(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};
1
+ import{createApiRef as h}from"@backstage/core-plugin-api";import{GraphQLClient as o}from"graphql-request";import y from"pako";import{getSdk as l}from"./graphql/generated/index.esm.js";const g=h({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 o("/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 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 getOutOfBoxTracks(){return this.#e(async()=>{const{outOfBoxTracks:t}=await this.#t.getOutOfBoxTracks();return t})}async saveOutOfBoxTracks(t){return this.#e(async()=>{const{status:e}=await this.#t.saveOutOfBoxTracks(t);return e})}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),u=>u.charCodeAt(0)),n=y.inflate(r),c=new TextDecoder("utf-8").decode(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
@@ -0,0 +1,2 @@
1
+ import{createExtensionDataRef as t,createExtensionBlueprint as d}from"@backstage/frontend-plugin-api";const a=t().with({id:"soundcheck.campaignAction.label"}),i=t().with({id:"soundcheck.campaignAction.id"}),n=t().with({id:"soundcheck.campaignAction.href"}),p=d({kind:"campaign-action",attachTo:{id:"page:soundcheck/SoundcheckRoutingPage",input:"campaignActions"},output:[a,i,n],dataRefs:{label:a,id:i,href:n},*factory({label:c,id:e,href:o}){yield a(c),yield i(e),yield n(o)}});export{p as CampaignActionBlueprint,n as campaignActionHrefDataRef,i as campaignActionIdDataRef,a as campaignActionLabelDataRef};
2
+ //# sourceMappingURL=CampaignActionBlueprint.esm.js.map
@@ -1,2 +1,2 @@
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/CampaignTechInsightsExplorerPage.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/SoundcheckHeader/SoundcheckHeader.esm.js";import"../components/SoundcheckHeader/SoundcheckHeaderContext.esm.js";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/ChecksPage/ChecksListPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageDeprecated.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/IntegrationsListPageBUI.esm.js";import"../components/OverviewPage/OverviewPageContent.esm.js";import"../components/TechInsights/TechInsightsPageBUI.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/TrackTechInsightsExplorerPage.esm.js";import"../components/TracksPage/TracksListPageBUI.esm.js";import"@spotify/backstage-plugin-core";import"../components/SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.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};
1
+ import{jsx as r}from"react/jsx-runtime";import{compatWrapper as u}from"@backstage/core-compat-api";import{createExtensionDataRef as c,createExtensionBlueprint as l,coreExtensionData as t,ExtensionBoundary as s}from"@backstage/frontend-plugin-api";import{lazy as f}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/CampaignActionsContext.esm.js";import"../components/CampaignPage/CampaignTechInsightsExplorerPage.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/SoundcheckHeader/SoundcheckHeader.esm.js";import"../components/SoundcheckHeader/SoundcheckHeaderContext.esm.js";import"../components/Loading/Loading.esm.js";import"../components/PageWarningMessage/PageWarningMessage.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/ChecksPage/ChecksListPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageBUI.esm.js";import"../components/CheckTemplatesPage/CheckTemplatesPageDeprecated.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/IntegrationsListPageBUI.esm.js";import"../components/CreateNewTrackPage/CreateNewTrackPage.esm.js";import"../components/OverviewPage/OverviewPageContent.esm.js";import"../components/TechInsights/TechInsightsPageBUI.esm.js";import"../components/TrackBuilderPage/TrackBuilderPage.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/TrackTechInsightsExplorerPage.esm.js";import"../components/TracksPage/TracksListPageBUI.esm.js";import"@spotify/backstage-plugin-core";import"../components/SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.esm.js";import{RoutingPageWrapper as g}from"../components/RoutingPage/RoutingPageWrapper.esm.js";const o=c().with({id:"soundcheck.integrationId"}),h=l({kind:"integration",attachTo:{id:"app/routes",input:"routes"},output:[t.routePath,t.reactElement,t.routeRef.optional(),o],dataRefs:{integrationId:o},*factory({integrationId:i,loader:m,path:e,routeRef:p},{node:n}){const a=f(()=>m().then(d=>({default:()=>d})));yield t.routePath(e??`/soundcheck/integrations/${i}/edit`),yield t.reactElement(u(r(s,{node:n,children:r(g,{children:r(a,{})})}))),p&&(yield t.routeRef(p)),yield o(i)}});export{h as IntegrationPageBlueprint,o as integrationIdExtensionDataRef};
2
2
  //# sourceMappingURL=IntegrationPageBlueprint.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsxs as x,jsx as d}from"react/jsx-runtime";import{Accordion as h,AccordionTrigger as m,AccordionPanel as E,Box as f}from"@backstage/ui";import{useState as u,useCallback as g}from"react";const A=({header:c,children:i,panelClassName:l,isExpanded:e,onExpandedChange:r,defaultExpanded:o=!1})=>{const[s,p]=u(o),n=e??s,t=g(a=>{e===void 0&&p(a),r?.(a)},[e,r]);return x(h,{defaultExpanded:o,isExpanded:n,onExpandedChange:()=>t(!n),children:[d(m,{children:c}),n&&d(E,{children:d(f,{className:l,children:i})})]})};export{A as AccordionSection};
2
+ //# sourceMappingURL=AccordionSection.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{makeStyles as b}from"@material-ui/core";import{RiInformationLine as d,RiCheckLine as t,RiErrorWarningLine as m,RiCloseCircleLine as u}from"@remixicon/react";const v={info:{icon:r(d,{}),bg:"var(--bui-bg-primary)",border:"var(--bui-fg-primary)",color:"var(--bui-fg-primary)"},success:{icon:r(t,{}),bg:"var(--bui-bg-success)",border:"var(--bui-fg-success)",color:"var(--bui-fg-success)"},warning:{icon:r(m,{}),bg:"var(--bui-bg-warning)",border:"var(--bui-fg-warning)",color:"var(--bui-fg-warning)"},error:{icon:r(u,{}),bg:"var(--bui-bg-danger)",border:"var(--bui-fg-danger)",color:"var(--bui-fg-danger)"}},f=b(()=>({title:{margin:"0 0 0.5rem",fontWeight:"bold"},description:{margin:0,lineHeight:"var(--bui-space-5)"}})),p=({title:i,children:n,variant:a="info"})=>{const e=f(),{icon:c,bg:s,border:g,color:l}=v[a];return r("div",{role:"alert",style:{margin:"1rem 0",padding:"1rem",backgroundColor:s,border:`1px solid ${g}`,borderRadius:"var(--bui-radius-3)"},children:o("div",{style:{display:"flex",gap:"1rem",alignItems:"flex-start",color:l},children:[r("div",{children:c}),o("div",{children:[i&&r("h4",{className:e.title,children:i}),r("p",{className:e.description,children:n})]})]})})};export{p as Alert};
2
+ //# sourceMappingURL=Alert.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as o,useContext as i}from"react";const n=o([]);function c({actions:r,children:t}){return e(n.Provider,{value:r,children:t})}function a(){return i(n)}export{c as CampaignActionsProvider,a as useExternalCampaignActions};
2
+ //# sourceMappingURL=CampaignActionsContext.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as a,Fragment as $}from"react/jsx-runtime";import{parseEntityRef as we}from"@backstage/catalog-model";import{useRouteRef as F}from"@backstage/core-plugin-api";import{usePermission as Re}from"@backstage/plugin-permission-react";import{Container as b,HeaderPage as Le,Box as c,Flex as Q,Text as g,Grid as N}from"@backstage/ui";import{makeStyles as Fe}from"@material-ui/core";import{toEntityFilterQuery as Ne,soundcheckCampaignReadPermission as Pe}from"@spotify/backstage-plugin-soundcheck-common";import{isEmpty as xe}from"lodash";import{DateTime as S}from"luxon";import{useState as v,useMemo as I,useEffect as J}from"react";import{useParams as Ae,useSearchParams as De}from"react-router-dom";import Oe from"react-use/lib/useDebounce";import He from"react-use/lib/useLocalStorage";import{useCheckStatuses as Me}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{useFilters as je}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 Be}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as Ue}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as Ke}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import{useLCPReporting as Ve}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as _e}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignsPageRouteRef as Ge,campaignOverviewRouteRef as qe,campaignExplorerRouteRef as $e}from"../../routes.esm.js";import{DescriptionCard as Qe}from"../Cards/DescriptionCard/DescriptionCard.esm.js";import{HistoricalTrackStatusCard as Je}from"../Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js";import"../Cards/TrackStatusCard/TrackStatusCard.esm.js";import{ChecksTable as We}from"../ChecksTable/ChecksTable.esm.js";import{ChipSelector as Xe}from"../ChipSelector/ChipSelector.esm.js";import{EmptyStateBUI as W}from"../EmptyState/EmptyStateBUI.esm.js";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Ye}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as Ze,CERTIFICATION_STATUS_MAP as ze}from"../FilterSidebar/util.esm.js";import{LoadingTableSkeleton as ei}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as ii}from"../Menus/SimpleMenu.esm.js";import{useCampaignActions as ti}from"../Menus/useCampaignActions.esm.js";import{PageCustomActions as ri}from"../PageCustomActions/PageCustomActions.esm.js";import{SendCampaignNotificationDialogBUI as ai}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TopFailingChecksTableBUI as oi}from"../TopFailingChecksTable/TopFailingChecksTableBUI.esm.js";import{TrackEntitiesTableBUI as si}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js";import{CampaignStatusCard as ni}from"./CampaignStatusCard.esm.js";const ci=Fe(()=>({container:{marginBottom:"var(--bui-space-12)"},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 0 var(--bui-space-12)",display:"flex",gridGap:"var(--bui-space-4)"}})),u={CHECKS:"Checks",TOP_FAILING_CHECKS:"Top Failing Checks",ENTITIES:"Entities"},mi=()=>{const{owners:m,lifecycles:l,types:d,systems:p,certificationStatuses:P}=Ye(),{campaignId:o}=Ae(),X=F(Ge),[s,E]=De(),[n,x]=v(s.get("search")||""),[A,Y]=v(""),[D,Z]=v(new Set([u.CHECKS])),C=D.values().next().value??u.CHECKS;Oe(()=>{Y(n);const r=new URLSearchParams(s.toString());n?r.set("search",n):r.delete("search"),E(r,{replace:!0})},300,[n]);const O=I(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:o||"",filtersApplied:m.length+l.length+d.length+p.length,ownersFilter:m?.join(",")||"",lifecyclesFilter:l?.join(",")||"",typesFilter:d?.join(",")||"",systemsFilter:p?.join(",")||"",campaignsSearch:A||""}}),[o,m,l,d,p,A]),{reportContentLoaded:H}=_e(O),{reporter:z}=Ve(O),h=ci(),T=I(()=>Ze({lifecycles:l,owners:m,types:d,systems:p}),[l,m,d,p]),{data:ee,isLoading:f,isError:ie}=Be({ids:[o],first:1}),i=ee?.edges?.[0]?.node,{actions:M,showNotificationDialog:j,setShowNotificationDialog:te}=ti(i??void 0),t=i?.track,re=I(()=>t?.levels.flatMap(r=>r.checks),[t?.levels]),ae=Array.from(new Set(t?.levels.flatMap(r=>r.checks).map(r=>r.id)??[])),{data:B,isLoading:oe}=Me({trackId:t?.id,checkIds:ae,filter:T},!!t),se=I(()=>Ne(t?.filter),[t]),{filters:ne,selected:ce,setSelected:me,onRemoveTag:le,selectedTags:de}=je({entityFilterQuery:se,hasCertificationStatusFilters:!0}),{data:U,isLoading:k,isError:pe}=Ue({trackId:t?.id??"",filter:T},!!i),he=S.fromISO(i?.startDate),fe=Math.max(Math.ceil(S.now().diff(he,"days").days),1),{data:K,isLoading:ge,isError:ue}=Ke({trackId:t?.id??"",filter:T,numberOfDays:fe},!!i),w=ie||pe||ue,{loading:Se,allowed:Ce}=Re({permission:Pe,resourceRef:o}),V=z?.getLCPValue();J(()=>{!f&&!k&&H({lcp:V})},[f,k,H,V]);const[y,_]=v(!1),[R,L]=He("campaign-overview-search-params","");J(()=>{!y&&s?.toString()?(R!==s.toString()&&L(s.toString()),_(!0)):y?y&&R!==s.toString()&&L(s.toString()):_(!0)},[s,E,L,R,y]);const ye=r=>{Z(r),x(""),E({},{replace:!0})},be=F(qe),ve=F($e);if(f)return e(b,{className:h.container,children:e(ei,{})});if(!f&&!i)return e(b,{className:h.container,children:e(W,{title:"Campaign not found",body:`There is no campaign with the requested id: ${o}.`})});if(!Se&&!Ce)return e(b,{className:h.container,children:e(W,{title:"Cannot view campaign",body:`No permission to view campaign with the requested id: ${o}.`})});const G=i?.ownerEntityRef,Ie=G?we(G).name:void 0,Ee=S.fromISO(i?.startDate),q=S.fromISO(i?.targetCompletionDate),Te=S.now(),ke=Math.max(Math.ceil(q.diff(Te,"days").days),0);return a($,{children:[e(Le,{title:i?.name,customActions:e(ii,{disabled:!M.length,placement:"left top",menuActions:M,label:"Campaign Actions"}),breadcrumbs:[{label:"Campaigns",href:X()}],tabs:[{id:"overview",label:"Campaign Overview",href:o?be({campaignId:o}):""},{id:"explorer",label:"Tech Insights Explorer",href:o?ve({campaignId:o}):""}]}),a(b,{className:h.container,children:[a(c,{className:h.cards,children:[e(Qe,{description:i?.description??void 0,owner:Ie,isError:w,isLoading:f}),e(ni,{campaign:i,status:U,history:K,isError:w,isLoading:k,children:a($,{children:[a(Q,{align:"baseline",mt:"3",children:[e(g,{as:"h1",variant:"title-medium",weight:"bold",children:ke}),e(g,{variant:"body-small",children:"Days remaining"})]}),a(N.Root,{children:[a(N.Item,{children:[e(c,{children:e(g,{color:"secondary",variant:"body-small",children:"Start date"})}),e(c,{children:e(g,{variant:"body-small",children:Ee.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]}),a(N.Item,{children:[e(c,{children:e(g,{color:"secondary",variant:"body-small",children:"End date"})}),e(c,{children:e(g,{variant:"body-small",children:q.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]})]})]})}),e(Je,{track:i?.track,history:K,isCampaign:!0,isError:w,isLoading:ge})]}),t&&a(c,{children:[a(Q,{justify:"between",children:[e(c,{minWidth:"16rem",children:e(Xe,{options:["Checks","Top Failing Checks","Entities"],selected:D,ariaLabel:"Sections",onSelectionChange:ye})}),e(ri,{searchValue:n,setSearchValue:r=>x(r),filters:ne,selected:ce,setSelected:me,onRemoveTag:le,selectedTags:de,showSearch:C!==u.ENTITIES})]}),a(c,{className:h.tableContent,children:[C===u.CHECKS&&e(We,{trackId:t.id,checks:re,checkStatuses:B,isLoading:f||oe,searchValue:n}),C===u.TOP_FAILING_CHECKS&&e(oi,{track:t,checkStatuses:B,certificationStatus:U?.certificationStatus,searchValue:n}),C===u.ENTITIES&&e(si,{isCampaign:!0,track:t,lifecycles:l,owners:m,types:d,systems:p,certificationStatus:xe(P)?void 0:ze[P[0]],searchValue:n})]})]}),i&&j&&e(ai,{campaign:i,isOpen:j,handleClose:()=>te(!1)})]})]})};export{mi as CampaignPageBUI};
1
+ import{jsx as e,jsxs as o,Fragment as W}from"react/jsx-runtime";import{parseEntityRef as Fe}from"@backstage/catalog-model";import{useRouteRef as R}from"@backstage/core-plugin-api";import{usePermission as Ne}from"@backstage/plugin-permission-react";import{Container as T,HeaderPage as Re,Box as m,Flex as Y,Text as u,Grid as P}from"@backstage/ui";import{makeStyles as Pe}from"@material-ui/core";import{toEntityFilterQuery as xe,soundcheckCampaignReadPermission as Ae}from"@spotify/backstage-plugin-soundcheck-common";import{isEmpty as He}from"lodash";import{DateTime as S}from"luxon";import{useState as b,useMemo as v,useEffect as Z}from"react";import{useParams as Oe,useSearchParams as De}from"react-router-dom";import Ke from"react-use/lib/useDebounce";import _e from"react-use/lib/useLocalStorage";import{useCheckStatuses as Me}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{useFilters as je}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 Be}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as Ge}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as Ue}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import{useLCPReporting as Ve}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as $e}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignsPageRouteRef as qe,campaignOverviewRouteRef as Qe,campaignExplorerRouteRef as We}from"../../routes.esm.js";import{DescriptionCard as Ye}from"../Cards/DescriptionCard/DescriptionCard.esm.js";import{HistoricalTrackStatusCard as Ze}from"../Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js";import"../Cards/TrackStatusCard/TrackStatusCard.esm.js";import{ChecksTable as ze}from"../ChecksTable/ChecksTable.esm.js";import{ChipSelector as Je}from"../ChipSelector/ChipSelector.esm.js";import{EmptyStateBUI as z}from"../EmptyState/EmptyStateBUI.esm.js";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Xe}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as ei,CERTIFICATION_STATUS_MAP as ii}from"../FilterSidebar/util.esm.js";import{LoadingTableSkeleton as ti}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as ri}from"../Menus/SimpleMenu.esm.js";import{useCampaignActions as ai}from"../Menus/useCampaignActions.esm.js";import{PageCustomActions as oi}from"../PageCustomActions/PageCustomActions.esm.js";import{SendCampaignNotificationDialogBUI as si}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TopFailingChecksTableBUI as ni}from"../TopFailingChecksTable/TopFailingChecksTableBUI.esm.js";import{TrackEntitiesTableBUI as ci}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js";import{CampaignStatusCard as mi}from"./CampaignStatusCard.esm.js";const li=Pe(()=>({container:{marginBottom:"var(--bui-space-12)"},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 0 var(--bui-space-12)",display:"flex",gridGap:"var(--bui-space-4)"}})),a={CHECKS:"Checks",TOP_FAILING_CHECKS:"Top Failing Checks",ENTITIES:"Entities"},di={checks:a.CHECKS,"top-failing-checks":a.TOP_FAILING_CHECKS,entities:a.ENTITIES},pi={[a.CHECKS]:"checks",[a.TOP_FAILING_CHECKS]:"top-failing-checks",[a.ENTITIES]:"entities"},hi=()=>{const{owners:l,lifecycles:d,types:p,systems:h,certificationStatuses:x}=Xe(),{campaignId:s}=Oe(),J=R(qe),[n,C]=De(),[c,A]=b(n.get("search")||""),[H,X]=b(""),[O,ee]=b(()=>{const i=n.get("section"),I=i?di[i]:null;return new Set([I??a.CHECKS])}),y=O.values().next().value??a.CHECKS;Ke(()=>{X(c);const i=new URLSearchParams(n.toString());c?i.set("search",c):i.delete("search"),C(i,{replace:!0})},300,[c]);const D=v(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:s||"",filtersApplied:l.length+d.length+p.length+h.length,ownersFilter:l?.join(",")||"",lifecyclesFilter:d?.join(",")||"",typesFilter:p?.join(",")||"",systemsFilter:h?.join(",")||"",campaignsSearch:H||""}}),[s,l,d,p,h,H]),{reportContentLoaded:K}=$e(D),{reporter:ie}=Ve(D),f=li(),k=v(()=>ei({lifecycles:d,owners:l,types:p,systems:h}),[d,l,p,h]),{data:te,isLoading:g,isError:re}=Be({ids:[s],first:1}),t=te?.edges?.[0]?.node,{actions:_,showNotificationDialog:M,setShowNotificationDialog:ae}=ai(t??void 0),r=t?.track,oe=v(()=>r?.levels.flatMap(i=>i.checks),[r?.levels]),se=Array.from(new Set(r?.levels.flatMap(i=>i.checks).map(i=>i.id)??[])),{data:j,isLoading:ne}=Me({trackId:r?.id,checkIds:se,filter:k},!!r),ce=v(()=>xe(r?.filter),[r]),{filters:me,selected:le,setSelected:de,onRemoveTag:pe,selectedTags:he}=je({entityFilterQuery:ce,hasCertificationStatusFilters:!0}),{data:B,isLoading:w,isError:fe}=Ge({trackId:r?.id??"",filter:k},!!t),ge=S.fromISO(t?.startDate),ue=Math.max(Math.ceil(S.now().diff(ge,"days").days),1),{data:G,isLoading:Se,isError:Ce}=Ue({trackId:r?.id??"",filter:k,numberOfDays:ue},!!t),L=re||fe||Ce,{loading:ye,allowed:Ee}=Ne({permission:Ae,resourceRef:s}),U=ie?.getLCPValue();Z(()=>{!g&&!w&&K({lcp:U})},[g,w,K,U]);const[E,V]=b(!1),[F,N]=_e("campaign-overview-search-params","");Z(()=>{!E&&n?.toString()?(F!==n.toString()&&N(n.toString()),V(!0)):E?E&&F!==n.toString()&&N(n.toString()):V(!0)},[n,C,N,F,E]);const Ie=i=>{ee(i),A("");const I=i.values().next().value,Q=I?pi[I]:void 0;Q?C({section:Q},{replace:!0}):C({},{replace:!0})},Te=R(Qe),be=R(We);if(g)return e(T,{className:f.container,children:e(ti,{})});if(!g&&!t)return e(T,{className:f.container,children:e(z,{title:"Campaign not found",body:`There is no campaign with the requested id: ${s}.`})});if(!ye&&!Ee)return e(T,{className:f.container,children:e(z,{title:"Cannot view campaign",body:`No permission to view campaign with the requested id: ${s}.`})});const $=t?.ownerEntityRef,ve=$?Fe($).name:void 0,ke=S.fromISO(t?.startDate),q=S.fromISO(t?.targetCompletionDate),we=S.now(),Le=Math.max(Math.ceil(q.diff(we,"days").days),0);return o(W,{children:[e(Re,{title:t?.name,customActions:e(ri,{disabled:!_.length,placement:"left top",menuActions:_,label:"Campaign Actions"}),breadcrumbs:[{label:"Campaigns",href:J()}],tabs:[{id:"overview",label:"Campaign Overview",href:s?Te({campaignId:s}):""},{id:"explorer",label:"Tech Insights Explorer",href:s?be({campaignId:s}):""}]}),o(T,{className:f.container,children:[o(m,{className:f.cards,children:[e(Ye,{description:t?.description??void 0,owner:ve,isError:L,isLoading:g}),e(mi,{campaign:t,status:B,history:G,isError:L,isLoading:w,children:o(W,{children:[o(Y,{align:"baseline",mt:"3",children:[e(u,{as:"h1",variant:"title-medium",weight:"bold",children:Le}),e(u,{variant:"body-small",children:"Days remaining"})]}),o(P.Root,{children:[o(P.Item,{children:[e(m,{children:e(u,{color:"secondary",variant:"body-small",children:"Start date"})}),e(m,{children:e(u,{variant:"body-small",children:ke.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]}),o(P.Item,{children:[e(m,{children:e(u,{color:"secondary",variant:"body-small",children:"End date"})}),e(m,{children:e(u,{variant:"body-small",children:q.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]})]})]})}),e(Ze,{track:t?.track,history:G,isCampaign:!0,isError:L,isLoading:Se})]}),r&&o(m,{children:[o(Y,{justify:"between",children:[e(m,{minWidth:"16rem",children:e(Je,{options:["Checks","Top Failing Checks","Entities"],selected:O,ariaLabel:"Sections",onSelectionChange:Ie})}),e(oi,{searchValue:c,setSearchValue:i=>A(i),filters:me,selected:le,setSelected:de,onRemoveTag:pe,selectedTags:he,showSearch:y!==a.ENTITIES})]}),o(m,{className:f.tableContent,children:[y===a.CHECKS&&e(ze,{trackId:r.id,checks:oe,checkStatuses:j,isLoading:g||ne,searchValue:c}),y===a.TOP_FAILING_CHECKS&&e(ni,{track:r,checkStatuses:j,certificationStatus:B?.certificationStatus,searchValue:c}),y===a.ENTITIES&&e(ci,{isCampaign:!0,track:r,lifecycles:d,owners:l,types:p,systems:h,certificationStatus:He(x)?void 0:ii[x[0]],searchValue:c})]})]}),t&&M&&e(si,{campaign:t,isOpen:M,handleClose:()=>ae(!1)})]})]})};export{hi as CampaignPageBUI};
2
2
  //# sourceMappingURL=CampaignPageBUI.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as d,Fragment as I}from"react/jsx-runtime";import{useApi as Q,useRouteRef as T}from"@backstage/core-plugin-api";import{entityPresentationApiRef as Y}from"@backstage/plugin-catalog-react";import{usePermission as _}from"@backstage/plugin-permission-react";import{HeaderPage as q,Container as J,Table as X,TableHeader as Z,Column as p,TableBody as ee,TablePagination as te}from"@backstage/ui";import{makeStyles as re}from"@material-ui/core";import{RiCalendarLine as ie}from"@remixicon/react";import{soundcheckCampaignCreatePermission as oe}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as ae,isEmpty as N}from"lodash";import{DateTime as A}from"luxon";import{useState as S,useMemo as l,useCallback as ne,useEffect as me}from"react";import se from"react-use/lib/useDebounce";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 pe}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{usePagination as ce}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useSortSearchParams as de}from"../../hooks/useSortSearchParams.esm.js";import{useProfileImages as le}from"../../hooks/catalog/useProfileImages.esm.js";import{useLCPReporting as ge}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as fe}from"../../hooks/useLoadTimeReporting.esm.js";import{useSearchNameOwner as he}from"../../hooks/useSearchNameOwner.esm.js";import{campaignCreateRouteRef as ue,campaignDetailsRouteRef as we}from"../../routes.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as ye}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoCampaigns as Ce}from"../EmptyState/EmptyStateNoCampaigns.esm.js";import{ListPageCustomActions as Se}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as Pe}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 Re}from"../Menus/useCampaignActions.esm.js";import"@material-ui/icons/AddAlert";import"../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"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import"../FormFieldLabel/FormFieldLabel.esm.js";import"../LoadingIndicator/LoadingIndicator.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import{SendCampaignNotificationDialogBUI as Le}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TableRowWithOwner as ve}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const M=10,De=["name","status","days-remaining","owner"],B=t=>{const m=A.fromISO(t),i=A.now();return Math.max(Math.ceil(m.diff(i,"days").days),0)},ke=({campaign:t,profileImageMap:m})=>{const i=l(()=>t.archived?0:B(t.targetCompletionDate),[t.archived,t.targetCompletionDate]),g=T(we),o=l(()=>t.track.levels.reduce((a,u)=>a+(u.checks?.length??0),0),[t.track.levels]),{actions:f,showNotificationDialog:s,setShowNotificationDialog:h}=Re(t);return d(I,{children:[r(ve,{ownerEntityRef:t.ownerEntityRef,href:g({campaignId:t.id}),profileImageSrc:m[t.ownerEntityRef],menuActions:f,name:t.name??"",description:t.description??"",cells:[{title:t.archived?"Archived":"Active"},{title:`${i} day${i===1?"":"s"} remaining`,icon:r(ie,{size:16})},{title:`${o} Check${o===1?"":"s"}`}]}),t&&s&&r(Le,{campaign:t,isOpen:s,handleClose:()=>h(!1)})]})},Ee=re(()=>({container:{marginBottom:"var(--bui-space-12)"}})),be=()=>{const t=Ee(),{updateSortParams:m,searchParams:i,setSearchParams:g}=de(),[o,f]=S(()=>i.get("search")??""),[s,h]=S(()=>i.get("sortDirection")==="descending"?"descending":"ascending"),[a,u]=S(()=>{const e=i.get("sort");return e&&De.includes(e)?e:""}),{data:P,isLoading:c}=pe({}),R=l(()=>P?.edges?.map(e=>e.node)??[],[P?.edges]),{profileImageMap:O}=le(R.map(e=>e.ownerEntityRef)),L=Q(Y),w=he(R,o),v=l(()=>{if(!a)return w;const e=ae(w,n=>a==="owner"?L.forEntity(n.ownerEntityRef).snapshot.primaryTitle.toLowerCase():a==="status"?n.archived?"archived":"active":a==="days-remaining"?n.archived?-1:B(n.targetCompletionDate):n.name.toLowerCase());return s==="descending"&&e.reverse(),e},[L,a,s,w]),{paginatedItems:y,reset:C,paginationProps:x}=ce({pageParam:"perPage",defaultPageSize:M,items:v});se(()=>{C();const e=new URLSearchParams(i.toString());o?e.set("search",o):e.delete("search"),g(e,{replace:!0})},300,[o]);const H=ne(({direction:e,column:n})=>{const b=String(n);u(b),h(e),C(),m({sort:b,sortDirection:e})},[C,m]),{loading:U,allowed:$}=_({permission:oe}),V=T(ue),D=l(()=>({routeName:"soundcheck-campaigns",additionalAttributes:{}}),[]),{reportContentLoaded:k}=fe(D),{reporter:z}=ge(D),E=z?.getLCPValue();me(()=>{c||k({lcp:E})},[c,k,E]);const j=!c&&!N(y),G=v.length>M,W=!c&&N(y),F=c,K=o?r(ye,{title:"No campaigns found",body:"Your current search term did not return any campaigns. Please try a different search term."}):r(Ce,{});return d(I,{children:[r(q,{customActions:r(Se,{searchValue:o,setSearchValue:f,canCreate:!U&&$,createHref:V()}),title:"Campaigns"}),d(J,{className:t.container,children:[F&&r(Pe,{rowCount:10}),W&&K,j&&d(X,{onSortChange:H,sortDescriptor:{direction:s,column:a},children:[d(Z,{children:[r(p,{allowsSorting:!0,isRowHeader:!0,id:"name",style:{width:"47%"},children:"Name"}),r(p,{allowsSorting:!0,id:"status",style:{width:"10%"},children:"Status"}),r(p,{allowsSorting:!0,id:"days-remaining",style:{width:"15%"},children:"Days Remaining"}),r(p,{id:"checks",style:{width:"10%"},children:"Checks"}),r(p,{id:"owner",allowsSorting:!0,style:{width:"15%"},children:"Campaign Owner"}),r(p,{id:"actions",style:{width:"3%"}})]}),r(ee,{children:y.map(e=>r(ke,{campaign:e,profileImageMap:O??{}},e.id))})]}),G&&r(te,{...x})]})]})};export{be as CampaignListPageBUI};
1
+ import{jsx as i,jsxs as g,Fragment as I}from"react/jsx-runtime";import{useApi as Q,useRouteRef as T}from"@backstage/core-plugin-api";import{entityPresentationApiRef as Y}from"@backstage/plugin-catalog-react";import{usePermission as _}from"@backstage/plugin-permission-react";import{HeaderPage as q,Container as J,TableRoot as X,TableHeader as Z,Column as c,TableBody as ee,TablePagination as te}from"@backstage/ui";import{makeStyles as ie}from"@material-ui/core";import{RiCalendarLine as re}from"@remixicon/react";import{soundcheckCampaignCreatePermission as oe}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as ae,isEmpty as A}from"lodash";import{DateTime as x}from"luxon";import{useState as R,useMemo as l,useCallback as ne,useEffect as me}from"react";import se from"react-use/lib/useDebounce";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 pe}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{usePagination as ce}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useSortSearchParams as de}from"../../hooks/useSortSearchParams.esm.js";import{useProfileImages as ge}from"../../hooks/catalog/useProfileImages.esm.js";import{useLCPReporting as le}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as fe}from"../../hooks/useLoadTimeReporting.esm.js";import{useSearchNameOwner as he}from"../../hooks/useSearchNameOwner.esm.js";import{campaignCreateRouteRef as ue,campaignDetailsRouteRef as Ce}from"../../routes.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as Pe}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoCampaigns as we}from"../EmptyState/EmptyStateNoCampaigns.esm.js";import{ListPageCustomActions as ye}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as Se}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 Re}from"../Menus/useCampaignActions.esm.js";import"@material-ui/icons/AddAlert";import"../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"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import"../FormFieldLabel/FormFieldLabel.esm.js";import"../LoadingIndicator/LoadingIndicator.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import{SendCampaignNotificationDialogBUI as ve}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TableRowWithOwner as Le}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const z=10,Ne=["name","status","days-remaining","owner"],B=t=>{const s=x.fromISO(t),r=x.now();return Math.max(Math.ceil(s.diff(r,"days").days),0)},De=({campaign:t,profileImageMap:s})=>{const r=l(()=>t.archived?0:B(t.targetCompletionDate),[t.archived,t.targetCompletionDate]),h=T(Ce),o=l(()=>t.track.levels.reduce((a,P)=>a+(P.checks?.length??0),0),[t.track.levels]),{actions:u,showNotificationDialog:p,setShowNotificationDialog:C}=Re(t);return g(I,{children:[i(Le,{ownerEntityRef:t.ownerEntityRef,href:h({campaignId:t.id}),profileImageSrc:s[t.ownerEntityRef],menuActions:u,name:t.name??"",description:t.description??"",cells:[{title:t.archived?"Archived":"Active"},{title:`${r} day${r===1?"":"s"} remaining`,icon:i(re,{size:16})},{title:`${o} Check${o===1?"":"s"}`}]}),t&&p&&i(ve,{campaign:t,isOpen:p,handleClose:()=>C(!1)})]})},Ee=ie(()=>({container:{marginBottom:"var(--bui-space-12)"}})),be=()=>{const t=Ee(),{updateSortParams:s,searchParams:r,setSearchParams:h}=de(),[o,u]=R(()=>r.get("search")??""),[p,C]=R(()=>r.get("sortDirection")==="descending"?"descending":"ascending"),[a,P]=R(()=>{const e=r.get("sort");return e&&Ne.includes(e)?e:""}),{data:v,isLoading:d}=pe({}),L=l(()=>v?.edges?.map(e=>e.node)??[],[v?.edges]),{profileImageMap:M}=ge(L.map(e=>e.ownerEntityRef)),N=Q(Y),w=he(L,o),f=l(()=>{if(!a)return w;const e=ae(w,m=>a==="owner"?N.forEntity(m.ownerEntityRef).snapshot.primaryTitle.toLowerCase():a==="status"?m.archived?"archived":"active":a==="days-remaining"?m.archived?-1:B(m.targetCompletionDate):m.name.toLowerCase());return p==="descending"&&e.reverse(),e},[N,a,p,w]),{paginatedItems:y,reset:S,paginationProps:n}=ce({pageParam:"perPage",defaultPageSize:z,items:f});se(()=>{S();const e=new URLSearchParams(r.toString());o?e.set("search",o):e.delete("search"),h(e,{replace:!0})},300,[o]);const O=ne(({direction:e,column:m})=>{const k=String(m);P(k),C(e),S(),s({sort:k,sortDirection:e})},[S,s]),{loading:H,allowed:U}=_({permission:oe}),$=T(ue),D=l(()=>({routeName:"soundcheck-campaigns",additionalAttributes:{}}),[]),{reportContentLoaded:E}=fe(D),{reporter:V}=le(D),b=V?.getLCPValue();me(()=>{d||E({lcp:b})},[d,E,b]);const j=!d&&!A(y),G=f.length>z,W=!d&&A(y),F=d,K=o?i(Pe,{title:"No campaigns found",body:"Your current search term did not return any campaigns. Please try a different search term."}):i(we,{});return g(I,{children:[i(q,{customActions:i(ye,{searchValue:o,setSearchValue:u,canCreate:!H&&U,createHref:$()}),title:"Campaigns"}),g(J,{className:t.container,children:[F&&i(Se,{rowCount:10}),W&&K,j&&g(X,{onSortChange:O,sortDescriptor:{direction:p,column:a},children:[g(Z,{children:[i(c,{allowsSorting:!0,isRowHeader:!0,id:"name",style:{width:"47%"},children:"Name"}),i(c,{allowsSorting:!0,id:"status",style:{width:"10%"},children:"Status"}),i(c,{allowsSorting:!0,id:"days-remaining",style:{width:"15%"},children:"Days Remaining"}),i(c,{id:"checks",style:{width:"10%"},children:"Checks"}),i(c,{id:"owner",allowsSorting:!0,style:{width:"15%"},children:"Campaign Owner"}),i(c,{id:"actions",style:{width:"3%"}})]}),i(ee,{children:y.map(e=>i(De,{campaign:e,profileImageMap:M??{}},e.id))})]}),G&&i(te,{totalCount:f.length,offset:n.offset,hasNextPage:n.offset+n.pageSize<(f.length??0),hasPreviousPage:n.offset>0,onNextPage:n.onNextPage,onPreviousPage:n.onPreviousPage,onPageSizeChange:n.onPageSizeChange,pageSize:n.pageSize})]})]})};export{be as CampaignListPageBUI};
2
2
  //# sourceMappingURL=CampaignListPageBUI.esm.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as o,jsxs as y,Fragment as n}from"react/jsx-runtime";import{useRouteRef as s}from"@backstage/core-plugin-api";import{usePermission as R}from"@backstage/plugin-permission-react";import{HeaderPage as b}from"@backstage/ui";import{soundcheckCampaignUpdatePermission as L}from"@spotify/backstage-plugin-soundcheck-common";import{useEffect as P}from"react";import{useParams as E}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 x}from"../../hooks/campaigns/useUpdateCampaign.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as I}from"../../hooks/useNavigateBack.esm.js";import"react-use/lib/useLocalStorage";import{useGetCampaign as U}from"../../hooks/campaigns/useGetCampaign.esm.js";import{campaignsPageRouteRef as p,campaignDetailsRouteRef as A}from"../../routes.esm.js";import{CampaignForm as D}from"../CampaignForm/CampaignForm.esm.js";import{DocLinkButton as F}from"../DocLinkButton/DocLinkButton.esm.js";import{PageWarningMessage as S}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as j}from"../SoundcheckHeader/useHeader.esm.js";import{Loading as v}from"../TechHealth/Loading/Loading.esm.js";import{EmptyCampaignState as B}from"./CampaignEmptyState.esm.js";const H=()=>{j({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]=I(p),{campaignId:t}=E(),{setIsLoading:e}=w(),{mutateAsync:g,isLoading:a}=x(),{data:f,isLoading:m}=U(t??""),i=f?.edges?.[0]?.node,{loading:u,allowed:r}=R({permission:L,resourceRef:i?.id});P(()=>e(a),[e,a]);const l=s(p),C=s(A);if(!m&&!i)return o(B,{});const h=async k=>{await g(k,{onSuccess:d})};return y(n,{children:[o(b,{title:`Edit ${i?.name??t??"Campaign"}`,breadcrumbs:[{label:"All Campaigns",href:l()},{label:"Details",href:C({campaignId:t??""})}],customActions:o(F,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns/"})}),o(S,{entityId:i?.id,entityName:i?.name??"",showCannotEdit:!u&&!r}),m?o(v,{}):o(n,{children:r&&o(D,{onSave:h,onCancel:c,selectedCampaign:i})})]})};export{H as EditCampaignView};
1
+ import{jsx as o,jsxs as y,Fragment as n}from"react/jsx-runtime";import{useRouteRef as s}from"@backstage/core-plugin-api";import{usePermission as R}from"@backstage/plugin-permission-react";import{HeaderPage as b}from"@backstage/ui";import{soundcheckCampaignUpdatePermission as L}from"@spotify/backstage-plugin-soundcheck-common";import{useEffect as P}from"react";import{useParams as E}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 x}from"../../hooks/campaigns/useUpdateCampaign.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as I}from"../../hooks/useNavigateBack.esm.js";import"react-use/lib/useLocalStorage";import{useGetCampaign as U}from"../../hooks/campaigns/useGetCampaign.esm.js";import{campaignsPageRouteRef as p,campaignDetailsRouteRef as A}from"../../routes.esm.js";import{CampaignForm as D}from"../CampaignForm/CampaignForm.esm.js";import{DocLinkButton as F}from"../DocLinkButton/DocLinkButton.esm.js";import{Loading as S}from"../Loading/Loading.esm.js";import{PageWarningMessage as j}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as v}from"../SoundcheckHeader/useHeader.esm.js";import{EmptyCampaignState as B}from"./CampaignEmptyState.esm.js";const H=()=>{v({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]=I(p),{campaignId:t}=E(),{setIsLoading:e}=w(),{mutateAsync:g,isLoading:a}=x(),{data:f,isLoading:m}=U(t??""),i=f?.edges?.[0]?.node,{loading:u,allowed:r}=R({permission:L,resourceRef:i?.id});P(()=>e(a),[e,a]);const l=s(p),C=s(A);if(!m&&!i)return o(B,{});const h=async k=>{await g(k,{onSuccess:d})};return y(n,{children:[o(b,{title:`Edit ${i?.name??t??"Campaign"}`,breadcrumbs:[{label:"All Campaigns",href:l()},{label:"Details",href:C({campaignId:t??""})}],customActions:o(F,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/campaigns/"})}),o(j,{entityId:i?.id,entityName:i?.name??"",showCannotEdit:!u&&!r}),m?o(S,{}):o(n,{children:r&&o(D,{onSave:h,onCancel:c,selectedCampaign:i})})]})};export{H as EditCampaignView};
2
2
  //# sourceMappingURL=EditCampaignView.esm.js.map