@spotify/backstage-plugin-soundcheck 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as d}from"react/jsx-runtime";import{useRouteRef as s}from"@backstage/core-plugin-api";import{usePermission as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{useRouteRef as s}from"@backstage/core-plugin-api";import{usePermission as n}from"@backstage/plugin-permission-react";import{soundcheckTrackDeletePermission as T,soundcheckTrackUpdatePermission as w}from"@spotify/backstage-plugin-soundcheck-common";import{useCallback as i}from"react";import{useNavigate as y}from"react-router-dom";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{useConfirmationModal as g}from"../../../hooks/useConfirmationModal.esm.js";import{useDeleteTrack as D}from"../../../hooks/tracks/useDeleteTrack.esm.js";import{trackDetailsRouteRef as E,trackEditRouteRef as v}from"../../../routes.esm.js";import{exportTrack as x}from"../../../utils/export.esm.js";import{SummaryCard as C}from"../../SummaryCard/SummaryCard.esm.js";import{TrackMetadata as P}from"./TrackMetadata.esm.js";const b=({summary:r})=>{const{loading:c,allowed:p}=n({permission:T,resourceRef:r.id}),{loading:l,allowed:u}=n({permission:w,resourceRef:r.id}),{showModal:t}=g(),{mutate:e}=D(),o=y(),a=s(E),m=s(v),f=i(async()=>{await t({title:"Delete Track",message:`Are you sure you want to delete track ${r.name}?`})&&e(r.id)},[t,r.id,r.name,e]),k=i(()=>{o(a({trackId:r.id}))},[o,r.id,a]),h=i(()=>{o(m({trackId:r.id}))},[o,r.id,m]),R=i(()=>{x(r)},[r]);return d(C,{title:r.name,description:r.description,children:d(P,{track:r}),handleView:k,handleEdit:r.isEditable&&!l&&u?h:void 0,handleDelete:r.isEditable&&!c&&p?f:void 0,handleExport:R,viewIsPrimaryAction:!0})};export{b as TrackSummaryCard};
|
|
2
2
|
//# sourceMappingURL=TrackSummaryCard.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotify/backstage-plugin-soundcheck",
|
|
3
3
|
"description": "Ensure quality, reliability and alignment of software development with codified checks and guidance.",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.1",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com",
|
|
7
7
|
"main": "./dist/index.esm.js",
|