@backstage-community/plugin-azure-devops 0.6.3 → 0.8.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 (50) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/alpha/plugin.esm.js.map +1 -1
  3. package/dist/alpha.d.ts +12 -12
  4. package/dist/api/AzureDevOpsApi.esm.js.map +1 -1
  5. package/dist/api/AzureDevOpsClient.esm.js.map +1 -1
  6. package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js.map +1 -1
  7. package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js.map +1 -1
  8. package/dist/components/BuildTable/BuildTable.esm.js.map +1 -1
  9. package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js.map +1 -1
  10. package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js.map +1 -1
  11. package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js.map +1 -1
  12. package/dist/components/GitTagTable/GitTagTable.esm.js.map +1 -1
  13. package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js.map +1 -1
  14. package/dist/components/PullRequestTable/PullRequestTable.esm.js.map +1 -1
  15. package/dist/components/PullRequestsPage/PullRequestsPage.esm.js.map +1 -1
  16. package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js.map +1 -1
  17. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js.map +1 -1
  18. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js.map +1 -1
  19. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js.map +1 -1
  20. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js.map +1 -1
  21. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js.map +1 -1
  22. package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js.map +1 -1
  23. package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js.map +1 -1
  24. package/dist/components/PullRequestsPage/lib/filters/allFilter.esm.js.map +1 -1
  25. package/dist/components/PullRequestsPage/lib/filters/assignedToTeamFilter.esm.js.map +1 -1
  26. package/dist/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.esm.js.map +1 -1
  27. package/dist/components/PullRequestsPage/lib/filters/assignedToUserFilter.esm.js.map +1 -1
  28. package/dist/components/PullRequestsPage/lib/filters/createFilter.esm.js.map +1 -1
  29. package/dist/components/PullRequestsPage/lib/filters/createdByTeamFilter.esm.js.map +1 -1
  30. package/dist/components/PullRequestsPage/lib/filters/createdByTeamsFilter.esm.js.map +1 -1
  31. package/dist/components/PullRequestsPage/lib/filters/createdByUserFilter.esm.js.map +1 -1
  32. package/dist/components/PullRequestsPage/lib/filters/types.esm.js.map +1 -1
  33. package/dist/components/PullRequestsPage/lib/hooks/useFilterProcessor.esm.js.map +1 -1
  34. package/dist/components/PullRequestsPage/lib/utils.esm.js.map +1 -1
  35. package/dist/components/ReadmeCard/ReadmeCard.esm.js.map +1 -1
  36. package/dist/hooks/useBuildRuns.esm.js.map +1 -1
  37. package/dist/hooks/useDashboardPullRequests.esm.js.map +1 -1
  38. package/dist/hooks/useGitTags.esm.js.map +1 -1
  39. package/dist/hooks/usePullRequests.esm.js.map +1 -1
  40. package/dist/hooks/useReadme.esm.js.map +1 -1
  41. package/dist/hooks/useUserEmail.esm.js.map +1 -1
  42. package/dist/hooks/useUserTeamIds.esm.js.map +1 -1
  43. package/dist/plugin.esm.js.map +1 -1
  44. package/dist/routes.esm.js.map +1 -1
  45. package/dist/utils/arrayHas.esm.js.map +1 -1
  46. package/dist/utils/equalsIgnoreCase.esm.js.map +1 -1
  47. package/dist/utils/getAnnotationValuesFromEntity.esm.js.map +1 -1
  48. package/dist/utils/getDurationFromDates.esm.js.map +1 -1
  49. package/package.json +24 -15
  50. package/alpha/package.json +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @backstage-community/plugin-azure-devops
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 52190f0: Backstage version bump to v1.34.1
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [52190f0]
12
+ - @backstage-community/plugin-azure-devops-common@0.6.0
13
+
14
+ ## 0.7.0
15
+
16
+ ### Minor Changes
17
+
18
+ - 7ce46dc: Backstage version bump to v1.33.5
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [7ce46dc]
23
+ - @backstage-community/plugin-azure-devops-common@0.5.0
24
+
3
25
  ## 0.6.3
4
26
 
5
27
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n ApiBlueprint,\n createApiFactory,\n PageBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { azureDevOpsApiRef, AzureDevOpsClient } from '../api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { azurePullRequestDashboardRouteRef } from '../routes';\n\n/** @alpha */\nexport const azureDevOpsApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: azureDevOpsApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new AzureDevOpsClient({ discoveryApi, fetchApi }),\n }),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPullRequestPage = PageBlueprint.make({\n params: {\n defaultPath: '/azure-pull-requests',\n routeRef: convertLegacyRouteRef(azurePullRequestDashboardRouteRef),\n loader: () =>\n import('../components/PullRequestsPage').then(m =>\n compatWrapper(<m.PullRequestsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({\n name: 'pipelines',\n params: {\n defaultPath: '/pipelines',\n defaultTitle: 'Pipelines',\n loader: () =>\n import('../components/EntityPageAzurePipelines').then(m =>\n compatWrapper(<m.EntityPageAzurePipelines />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsGitTagsEntityContent = EntityContentBlueprint.make({\n name: 'git-tags',\n params: {\n defaultPath: '/git-tags',\n defaultTitle: 'Git Tags',\n loader: () =>\n import('../components/EntityPageAzureGitTags').then(m =>\n compatWrapper(<m.EntityPageAzureGitTags />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(\n {\n name: 'pull-requests',\n params: {\n defaultPath: '/pull-requests',\n defaultTitle: 'Pull Requests',\n loader: () =>\n import('../components/EntityPageAzurePullRequests').then(m =>\n compatWrapper(<m.EntityPageAzurePullRequests />),\n ),\n },\n },\n);\n\n/** @alpha */\nexport const azureDevOpsReadmeEntityCard = EntityCardBlueprint.make({\n name: 'readme',\n params: {\n loader: async () =>\n import('../components/ReadmeCard').then(m =>\n compatWrapper(<m.ReadmeCard />),\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'azure-devops',\n extensions: [\n azureDevOpsApi,\n azureDevOpsReadmeEntityCard,\n azureDevOpsPipelinesEntityContent,\n azureDevOpsGitTagsEntityContent,\n azureDevOps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sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n ApiBlueprint,\n createApiFactory,\n PageBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { azureDevOpsApiRef, AzureDevOpsClient } from '../api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n EntityCardBlueprint,\n EntityContentBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { azurePullRequestDashboardRouteRef } from '../routes';\n\n/** @alpha */\nexport const azureDevOpsApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: azureDevOpsApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new AzureDevOpsClient({ discoveryApi, fetchApi }),\n }),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPullRequestPage = PageBlueprint.make({\n params: {\n defaultPath: '/azure-pull-requests',\n routeRef: convertLegacyRouteRef(azurePullRequestDashboardRouteRef),\n loader: () =>\n import('../components/PullRequestsPage').then(m =>\n compatWrapper(<m.PullRequestsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPipelinesEntityContent = EntityContentBlueprint.make({\n name: 'pipelines',\n params: {\n defaultPath: '/pipelines',\n defaultTitle: 'Pipelines',\n loader: () =>\n import('../components/EntityPageAzurePipelines').then(m =>\n compatWrapper(<m.EntityPageAzurePipelines />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsGitTagsEntityContent = EntityContentBlueprint.make({\n name: 'git-tags',\n params: {\n defaultPath: '/git-tags',\n defaultTitle: 'Git Tags',\n loader: () =>\n import('../components/EntityPageAzureGitTags').then(m =>\n compatWrapper(<m.EntityPageAzureGitTags />),\n ),\n },\n});\n\n/** @alpha */\nexport const azureDevOpsPullRequestsEntityContent = EntityContentBlueprint.make(\n {\n name: 'pull-requests',\n params: {\n defaultPath: '/pull-requests',\n defaultTitle: 'Pull Requests',\n loader: () =>\n import('../components/EntityPageAzurePullRequests').then(m =>\n compatWrapper(<m.EntityPageAzurePullRequests />),\n ),\n },\n },\n);\n\n/** @alpha */\nexport const azureDevOpsReadmeEntityCard = EntityCardBlueprint.make({\n name: 'readme',\n params: {\n loader: async () =>\n import('../components/ReadmeCard').then(m =>\n compatWrapper(<m.ReadmeCard />),\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'azure-devops',\n extensions: [\n azureDevOpsApi,\n azureDevOpsReadmeEntityCard,\n azureDevOpsPipelinesEntityContent,\n azureDevOpsGitTagsEntityContent,\n azureDevOpsPullRequestsEntityContent,\n azureDevOpsPullRequestPage,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;AAqCa,MAAA,cAAA,GAAiB,aAAa,IAAK,CAAA;AAAA,EAC9C,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,iBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,iBAAkB,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU;AAAA,KACnD;AAAA;AAEL,CAAC;AAGY,MAAA,0BAAA,GAA6B,cAAc,IAAK,CAAA;AAAA,EAC3D,MAAQ,EAAA;AAAA,IACN,WAA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A8B,CAAE;AAAA;AACjD;AACJ;AAEJ;AAGa,MAAA,2BAAA,GAA8B,oBAAoB,IAAK,CAAA;AAAA,EAClE,IAAM,EAAA,QAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,YACN,OAAO,uCAA0B,CAAE,CAAA,IAAA;AAAA,MAAK,OACtC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,UAAA,EAAF,IAAa,CAAE;AAAA;AAChC;AAEN,CAAC;AAGD,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,cAAA;AAAA,EACJ,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,IACA,2BAAA;AAAA,IACA,iCAAA;AAAA,IACA,+BAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as _backstage_catalog_model from '@backstage/catalog-model';
1
+ import * as _backstage_catalog_model_index from '@backstage/catalog-model/index';
2
2
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
3
- import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
+ import * as _backstage_core_plugin_api_index from '@backstage/core-plugin-api/index';
4
4
  import React__default from 'react';
5
5
 
6
6
  /** @alpha */
@@ -10,10 +10,10 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
10
10
  name: undefined;
11
11
  config: {};
12
12
  configInput: {};
13
- output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
13
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api_index.AnyApiFactory, "core.api.factory", {}>;
14
14
  inputs: {};
15
15
  params: {
16
- factory: _backstage_core_plugin_api.AnyApiFactory;
16
+ factory: _backstage_core_plugin_api_index.AnyApiFactory;
17
17
  };
18
18
  }>;
19
19
  "page:azure-devops": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -50,7 +50,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
50
50
  };
51
51
  output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.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", {
52
52
  optional: true;
53
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
53
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
54
54
  optional: true;
55
55
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
56
56
  optional: true;
@@ -61,7 +61,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
61
61
  defaultPath: string;
62
62
  defaultTitle: string;
63
63
  routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
64
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
64
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
65
65
  };
66
66
  }>;
67
67
  "entity-content:azure-devops/git-tags": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -79,7 +79,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
79
79
  };
80
80
  output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.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", {
81
81
  optional: true;
82
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
82
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
83
83
  optional: true;
84
84
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
85
85
  optional: true;
@@ -90,7 +90,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
90
90
  defaultPath: string;
91
91
  defaultTitle: string;
92
92
  routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
93
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
93
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
94
94
  };
95
95
  }>;
96
96
  "entity-content:azure-devops/pull-requests": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -108,7 +108,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
108
108
  };
109
109
  output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.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", {
110
110
  optional: true;
111
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
111
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
112
112
  optional: true;
113
113
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
114
114
  optional: true;
@@ -119,7 +119,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
119
119
  defaultPath: string;
120
120
  defaultTitle: string;
121
121
  routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
122
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
122
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
123
123
  };
124
124
  }>;
125
125
  "entity-card:azure-devops/readme": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -131,7 +131,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
131
131
  configInput: {
132
132
  filter?: string | undefined;
133
133
  };
134
- output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
134
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
135
135
  optional: true;
136
136
  }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
137
137
  optional: true;
@@ -139,7 +139,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
139
139
  inputs: {};
140
140
  params: {
141
141
  loader: () => Promise<JSX.Element>;
142
- filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
142
+ filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
143
143
  };
144
144
  }>;
145
145
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"AzureDevOpsApi.esm.js","sources":["../../src/api/AzureDevOpsApi.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const azureDevOpsApiRef = createApiRef<AzureDevOpsApi>({\n id: 'plugin.azure-devops.service',\n});\n\n/** @public */\nexport interface AzureDevOpsApi {\n getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }>;\n\n getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }>;\n\n getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }>;\n\n getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]>;\n\n getAllTeams(limit?: number): Promise<Team[]>;\n\n getUserTeamIds(userId: string): Promise<string[]>;\n\n getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }>;\n\n getReadme(opts: ReadmeConfig): Promise<Readme>;\n}\n"],"names":[],"mappings":";;AAiCO,MAAM,oBAAoB,YAA6B,CAAA;AAAA,EAC5D,EAAI,EAAA,6BAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"AzureDevOpsApi.esm.js","sources":["../../src/api/AzureDevOpsApi.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const azureDevOpsApiRef = createApiRef<AzureDevOpsApi>({\n id: 'plugin.azure-devops.service',\n});\n\n/** @public */\nexport interface AzureDevOpsApi {\n getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }>;\n\n getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }>;\n\n getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }>;\n\n getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]>;\n\n getAllTeams(limit?: number): Promise<Team[]>;\n\n getUserTeamIds(userId: string): Promise<string[]>;\n\n getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }>;\n\n getReadme(opts: ReadmeConfig): Promise<Readme>;\n}\n"],"names":[],"mappings":";;AAiCO,MAAM,oBAAoB,YAA6B,CAAA;AAAA,EAC5D,EAAI,EAAA;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AzureDevOpsClient.esm.js","sources":["../../src/api/AzureDevOpsClient.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport { AzureDevOpsApi } from './AzureDevOpsApi';\n\n/** @public */\nexport class AzureDevOpsClient implements AzureDevOpsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n public async getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n const urlSegment = `repo-builds/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<RepoBuild[]>(urlSegment);\n return { items };\n }\n\n public async getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }> {\n const queryString = new URLSearchParams();\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `git-tags/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<GitTag[]>(urlSegment);\n return { items };\n }\n\n public async getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (options?.status) {\n queryString.append('status', options.status.toString());\n }\n if (options?.teamsLimit) {\n queryString.append('teamsLimit', options.teamsLimit.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `pull-requests/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<PullRequest[]>(urlSegment);\n return { items };\n }\n\n public getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]> {\n const queryString = new URLSearchParams();\n queryString.append('top', '100');\n if (teamsLimit) {\n queryString.append('teamsLimit', teamsLimit.toString());\n }\n const urlSegment = `dashboard-pull-requests/${projectName}?${queryString}`;\n return this.get<DashboardPullRequest[]>(urlSegment);\n }\n\n public getAllTeams(limit?: number): Promise<Team[]> {\n const queryString = new URLSearchParams();\n if (limit) {\n queryString.append('limit', limit.toString());\n }\n let urlSegment = 'all-teams';\n if (queryString.toString()) {\n urlSegment += `?${queryString}`;\n }\n return this.get<Team[]>(urlSegment);\n }\n\n public getUserTeamIds(userId: string): Promise<string[]> {\n return this.get<string[]>(`users/${userId}/team-ids`);\n }\n\n public async getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }> {\n const queryString = new URLSearchParams();\n queryString.append('entityRef', entityRef);\n if (repoName) {\n queryString.append('repoName', repoName);\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n if (definitionName) {\n const definitionNames = definitionName.split(',');\n if (definitionNames.length > 1) {\n const buildRuns: BuildRun[] = [];\n for (const name of definitionNames) {\n queryString.set('definitionName', name.trim());\n if (options?.top) {\n queryString.set('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n buildRuns.push(...items);\n }\n return { items: buildRuns };\n }\n queryString.append('definitionName', definitionName.trim());\n }\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n return { items };\n }\n\n public async getReadme(opts: ReadmeConfig): Promise<Readme> {\n const queryString = new URLSearchParams();\n if (opts.host) {\n queryString.append('host', opts.host);\n }\n if (opts.org) {\n queryString.append('org', opts.org);\n }\n if (opts.path) {\n queryString.append('path', opts.path);\n }\n queryString.append('entityRef', opts.entityRef);\n return await this.get(\n `readme/${encodeURIComponent(opts.project)}/${encodeURIComponent(\n opts.repo,\n )}?${queryString}`,\n );\n }\n\n private async get<T>(path: string): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('azure-devops')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n"],"names":["urlSegment","items"],"mappings":";;AAkCO,MAAM,iBAA4C,CAAA;AAAA,EACtC,YAAA,CAAA;AAAA,EACA,QAAA,CAAA;AAAA,EAEV,YAAY,OAGhB,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA,CAAA;AAAA,GAC1B;AAAA,EAEA,MAAa,aACX,CAAA,WAAA,EACA,QACA,EAAA,IAAA,EACA,KACA,OACiC,EAAA;AACjC,IAAM,MAAA,WAAA,GAAc,IAAI,eAAgB,EAAA,CAAA;AACxC,IAAA,IAAI,SAAS,GAAK,EAAA;AAChB,MAAA,WAAA,CAAY,MAAO,CAAA,KAAA,EAAO,OAAQ,CAAA,GAAA,CAAI,UAAU,CAAA,CAAA;AAAA,KAClD;AACA,IAAA,IAAI,IAAM,EAAA;AACR,MAAY,WAAA,CAAA,MAAA,CAAO,QAAQ,IAAI,CAAA,CAAA;AAAA,KACjC;AACA,IAAA,IAAI,GAAK,EAAA;AACP,MAAY,WAAA,CAAA,MAAA,CAAO,OAAO,GAAG,CAAA,CAAA;AAAA,KAC/B;AACA,IAAA,MAAM,aAAa,CAAe,YAAA,EAAA,kBAAA;AAAA,MAChC,WAAA;AAAA,KACD,CAAI,CAAA,EAAA,kBAAA,CAAmB,QAAQ,CAAC,IAAI,WAAW,CAAA,CAAA,CAAA;AAEhD,IAAA,MAAM,KAAQ,GAAA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,IAAI,KAAK,GAAK,EAAA;AACZ,MAAY,WAAA,CAAA,MAAA,CAAO,KAAO,EAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AAAA,KACpC;AACA,IAAA,IAAI,KAAK,IAAM,EAAA;AACb,MAAY,WAAA,CAAA,MAAA,CAAO,MAAQ,EAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,KACtC;AACA,IAAY,WAAA,CAAA,MAAA,CAAO,WAAa,EAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAC9C,IAAA,OAAO,MAAM,IAAK,CAAA,GAAA;AAAA,MAChB,CAAU,OAAA,EAAA,kBAAA,CAAmB,IAAK,CAAA,OAAO,CAAC,CAAI,CAAA,EAAA,kBAAA;AAAA,QAC5C,IAAK,CAAA,IAAA;AAAA,OACN,IAAI,WAAW,CAAA,CAAA;AAAA,KAClB,CAAA;AAAA,GACF;AAAA,EAEA,MAAc,IAAO,IAA0B,EAAA;AAC7C,IAAA,MAAM,UAAU,CAAG,EAAA,MAAM,KAAK,YAAa,CAAA,UAAA,CAAW,cAAc,CAAC,CAAA,CAAA,CAAA,CAAA;AACrE,IAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAA,IAAA,EAAM,OAAO,CAAA,CAAA;AAEjC,IAAA,MAAM,WAAW,MAAM,IAAA,CAAK,SAAS,KAAM,CAAA,GAAA,CAAI,UAAU,CAAA,CAAA;AAEzD,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,QAAQ,CAAA,CAAA;AAAA,KACjD;AAEA,IAAA,OAAO,SAAS,IAAK,EAAA,CAAA;AAAA,GACvB;AACF;;;;"}
1
+ {"version":3,"file":"AzureDevOpsClient.esm.js","sources":["../../src/api/AzureDevOpsClient.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BuildRun,\n BuildRunOptions,\n DashboardPullRequest,\n GitTag,\n PullRequest,\n PullRequestOptions,\n Readme,\n ReadmeConfig,\n RepoBuild,\n RepoBuildOptions,\n Team,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport { AzureDevOpsApi } from './AzureDevOpsApi';\n\n/** @public */\nexport class AzureDevOpsClient implements AzureDevOpsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n public async getRepoBuilds(\n projectName: string,\n repoName: string,\n host?: string,\n org?: string,\n options?: RepoBuildOptions,\n ): Promise<{ items: RepoBuild[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n const urlSegment = `repo-builds/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<RepoBuild[]>(urlSegment);\n return { items };\n }\n\n public async getGitTags(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n ): Promise<{ items: GitTag[] }> {\n const queryString = new URLSearchParams();\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `git-tags/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<GitTag[]>(urlSegment);\n return { items };\n }\n\n public async getPullRequests(\n projectName: string,\n repoName: string,\n entityRef: string,\n host?: string,\n org?: string,\n options?: PullRequestOptions,\n ): Promise<{ items: PullRequest[] }> {\n const queryString = new URLSearchParams();\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n if (options?.status) {\n queryString.append('status', options.status.toString());\n }\n if (options?.teamsLimit) {\n queryString.append('teamsLimit', options.teamsLimit.toString());\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n queryString.append('entityRef', entityRef);\n const urlSegment = `pull-requests/${encodeURIComponent(\n projectName,\n )}/${encodeURIComponent(repoName)}?${queryString}`;\n\n const items = await this.get<PullRequest[]>(urlSegment);\n return { items };\n }\n\n public getDashboardPullRequests(\n projectName: string,\n teamsLimit?: number,\n ): Promise<DashboardPullRequest[]> {\n const queryString = new URLSearchParams();\n queryString.append('top', '100');\n if (teamsLimit) {\n queryString.append('teamsLimit', teamsLimit.toString());\n }\n const urlSegment = `dashboard-pull-requests/${projectName}?${queryString}`;\n return this.get<DashboardPullRequest[]>(urlSegment);\n }\n\n public getAllTeams(limit?: number): Promise<Team[]> {\n const queryString = new URLSearchParams();\n if (limit) {\n queryString.append('limit', limit.toString());\n }\n let urlSegment = 'all-teams';\n if (queryString.toString()) {\n urlSegment += `?${queryString}`;\n }\n return this.get<Team[]>(urlSegment);\n }\n\n public getUserTeamIds(userId: string): Promise<string[]> {\n return this.get<string[]>(`users/${userId}/team-ids`);\n }\n\n public async getBuildRuns(\n projectName: string,\n entityRef: string,\n repoName?: string,\n definitionName?: string,\n host?: string,\n org?: string,\n options?: BuildRunOptions,\n ): Promise<{ items: BuildRun[] }> {\n const queryString = new URLSearchParams();\n queryString.append('entityRef', entityRef);\n if (repoName) {\n queryString.append('repoName', repoName);\n }\n if (host) {\n queryString.append('host', host);\n }\n if (org) {\n queryString.append('org', org);\n }\n if (definitionName) {\n const definitionNames = definitionName.split(',');\n if (definitionNames.length > 1) {\n const buildRuns: BuildRun[] = [];\n for (const name of definitionNames) {\n queryString.set('definitionName', name.trim());\n if (options?.top) {\n queryString.set('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n buildRuns.push(...items);\n }\n return { items: buildRuns };\n }\n queryString.append('definitionName', definitionName.trim());\n }\n if (options?.top) {\n queryString.append('top', options.top.toString());\n }\n const urlSegment = `builds/${encodeURIComponent(\n projectName,\n )}?${queryString}`;\n const items = await this.get<BuildRun[]>(urlSegment);\n return { items };\n }\n\n public async getReadme(opts: ReadmeConfig): Promise<Readme> {\n const queryString = new URLSearchParams();\n if (opts.host) {\n queryString.append('host', opts.host);\n }\n if (opts.org) {\n queryString.append('org', opts.org);\n }\n if (opts.path) {\n queryString.append('path', opts.path);\n }\n queryString.append('entityRef', opts.entityRef);\n return await this.get(\n `readme/${encodeURIComponent(opts.project)}/${encodeURIComponent(\n opts.repo,\n )}?${queryString}`,\n );\n }\n\n private async get<T>(path: string): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('azure-devops')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n"],"names":["urlSegment","items"],"mappings":";;AAkCO,MAAM,iBAA4C,CAAA;AAAA,EACtC,YAAA;AAAA,EACA,QAAA;AAAA,EAEV,YAAY,OAGhB,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA;AAAA;AAC1B,EAEA,MAAa,aACX,CAAA,WAAA,EACA,QACA,EAAA,IAAA,EACA,KACA,OACiC,EAAA;AACjC,IAAM,MAAA,WAAA,GAAc,IAAI,eAAgB,EAAA;AACxC,IAAA,IAAI,SAAS,GAAK,EAAA;AA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,KAAK,GAAK,EAAA;AACZ,MAAY,WAAA,CAAA,MAAA,CAAO,KAAO,EAAA,IAAA,CAAK,GAAG,CAAA;AAAA;AAEpC,IAAA,IAAI,KAAK,IAAM,EAAA;AACb,MAAY,WAAA,CAAA,MAAA,CAAO,MAAQ,EAAA,IAAA,CAAK,IAAI,CAAA;AAAA;AAEtC,IAAY,WAAA,CAAA,MAAA,CAAO,WAAa,EAAA,IAAA,CAAK,SAAS,CAAA;AAC9C,IAAA,OAAO,MAAM,IAAK,CAAA,GAAA;AAAA,MAChB,CAAU,OAAA,EAAA,kBAAA,CAAmB,IAAK,CAAA,OAAO,CAAC,CAAI,CAAA,EAAA,kBAAA;AAAA,QAC5C,IAAK,CAAA;AAAA,OACN,IAAI,WAAW,CAAA;AAAA,KAClB;AAAA;AACF,EAEA,MAAc,IAAO,IAA0B,EAAA;AAC7C,IAAA,MAAM,UAAU,CAAG,EAAA,MAAM,KAAK,YAAa,CAAA,UAAA,CAAW,cAAc,CAAC,CAAA,CAAA,CAAA;AACrE,IAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAA,IAAA,EAAM,OAAO,CAAA;AAEjC,IAAA,MAAM,WAAW,MAAM,IAAA,CAAK,SAAS,KAAM,CAAA,GAAA,CAAI,UAAU,CAAA;AAEzD,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,QAAQ,CAAA;AAAA;AAGjD,IAAA,OAAO,SAAS,IAAK,EAAA;AAAA;AAEzB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AzurePipelinesIcon.esm.js","sources":["../../../src/components/AzurePipelinesIcon/AzurePipelinesIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nimport React from 'react';\n\nexport const AzurePipelinesIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32\"\n />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAoBa,MAAA,kBAAA,GAAqB,CAAC,KACjC,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,SAAQ,aAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA,2gBAAA;AAAA,GAAA;AACJ,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA,uHAAA;AAAA,GAAA;AACJ,CACF;;;;"}
1
+ {"version":3,"file":"AzurePipelinesIcon.esm.js","sources":["../../../src/components/AzurePipelinesIcon/AzurePipelinesIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\nimport React from 'react';\n\nexport const AzurePipelinesIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32\"\n />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAoBa,MAAA,kBAAA,GAAqB,CAAC,KACjC,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,SAAQ,aAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA;AAAA;AACJ,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA;AAAA;AACJ,CACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AzurePullRequestsIcon.esm.js","sources":["../../../src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\n/** @public */\nexport const AzurePullRequestsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M128 144v224M288 160l-64-64 64-64\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"96\"\n r=\"48\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"384\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M240 96h84a60 60 0 0160 60v212\"\n />\n </SvgIcon>\n);\n"],"names":[],"mappings":";;;AAoBa,MAAA,qBAAA,GAAwB,CAAC,KACpC,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,SAAQ,aAC1B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,QAAA;AAAA,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AAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA,gCAAA;AAAA,GAAA;AACJ,CACF;;;;"}
1
+ {"version":3,"file":"AzurePullRequestsIcon.esm.js","sources":["../../../src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\n\n/** @public */\nexport const AzurePullRequestsIcon = (props: SvgIconProps) => (\n <SvgIcon {...props} viewBox=\"0 0 512 512\">\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n d=\"M128 144v224M288 160l-64-64 64-64\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"128\"\n cy=\"96\"\n r=\"48\"\n />\n <circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"32\"\n cx=\"384\"\n cy=\"416\"\n r=\"48\"\n />\n <path\n fill=\"none\"\n stroke=\"currentColor\"\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AAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,EAAG,EAAA,KAAA;AAAA,IACH,EAAG,EAAA,KAAA;AAAA,IACH,CAAE,EAAA;AAAA;AACJ,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,IAAK,EAAA,MAAA;AAAA,IACL,MAAO,EAAA,cAAA;AAAA,IACP,aAAc,EAAA,OAAA;AAAA,IACd,cAAe,EAAA,OAAA;AAAA,IACf,WAAY,EAAA,IAAA;AAAA,IACZ,CAAE,EAAA;AAAA;AACJ,CACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"BuildTable.esm.js","sources":["../../../src/components/BuildTable/BuildTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport React from 'react';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyCa,MAAA,uBAAA,GAA0B,CAAC,MAA+B,KAAA;AACrE,EAAA,QAAQ,MAAQ;AAAA,IACd,KAAK,WAAY,CAAA,SAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAS,GAAE,YACd,CAAA,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,kBAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAc,GAAE,sBACnB,CAAA,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,MAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,IAAY,GAAE,SACjB,CAAA,CAAA;AAAA,IAEJ,KAAK,WAAY,CAAA,QAAA;AACf,MAAA,2CACG,UAAW,EAAA,EAAA,SAAA,EAAU,0BACnB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAc,GAAE,W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":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport React from 'react';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items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;AAAA,QACR,QAAU,EAAA,CAAA;AAAA,QACV,4BAA4B,CAAC;AAAA,OAC/B;AAAA,MACA,KAAA,kBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,OAAQ,EAAA,MAAA,EAAO,YAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,kBAAmB,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAM,EAAA,CAAA,kBAC5C,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,4BAAA,EACa,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACtD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAClB;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzureGitTags.esm.js","sources":["../../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport React from 'react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,wCAEV,WAAY,EAAA,IAAA,CAAA;AAAA,GACf,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzureGitTags.esm.js","sources":["../../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport React from 'react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,wCAEV,WAAY,EAAA,IAAA;AAAA,GACf;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzurePipelines.esm.js","sources":["../../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport React from 'react';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBa,MAAA,wBAAA,GAA2B,CAAC,KAAqC,KAAA;AAC5E,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAE7B,EAAM,MAAA,EAAE,OAAO,OAAS,EAAA,KAAA,KAAU,YAAa,CAAA,MAAA,EAAQ,MAAM,YAAY,CAAA,CAAA;AAEzE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA,CAAA;AAAA,GAC5D,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzurePipelines.esm.js","sources":["../../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport React from 'react';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBa,MAAA,wBAAA,GAA2B,CAAC,KAAqC,KAAA;AAC5E,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAM,MAAA,EAAE,OAAO,OAAS,EAAA,KAAA,KAAU,YAAa,CAAA,MAAA,EAAQ,MAAM,YAAY,CAAA;AAEzE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA;AAAA,GAC5D;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzurePullRequests.esm.js","sources":["../../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBa,MAAA,2BAAA,GAA8B,CAAC,KAEtC,KAAA;AACJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,oCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA,CAAA;AAAA,GACtD,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzurePullRequests.esm.js","sources":["../../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBa,MAAA,2BAAA,GAA8B,CAAC,KAEtC,KAAA;AACJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,oCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA;AAAA,GACtD;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GitTagTable.esm.js","sources":["../../../src/components/GitTagTable/GitTagTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EAAA,UAAA,EAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,GAAA,CAAI,QAAQ,EAAK,EAAA,EAAA,GAAA,CAAI,IAAK,CACtC,CAAA;AAAA,GAEJ;AAAA,EACA;AAAA,IACE,KAAO,EAAA,QAAA;AAAA,IACP,KAAO,EAAA,gBAA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EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,0BAAA,EACW,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACpD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS,EAAC;AAAA,KAAA;AAAA,GAClB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GitTagTable.esm.js","sources":["../../../src/components/GitTagTable/GitTagTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EAAA,UAAA,EAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,GAAA,CAAI,QAAQ,EAAK,EAAA,EAAA,GAAA,CAAI,IAAK,CACtC;AAAA,GAEJ;AAAA,EACA;AAAA,IACE,KAAO,EAAA,QAAA;AAAA,IACP,KAAO,EAAA,gBAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EAAA,UAAA,EAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,GAAA,CAAI,cAAc,EAAK,EAAA,EAAA,GAAA,CAAI,cAAe,CACtD;AAAA,GAEJ;AAAA,EACA;AAAA,IACE,KAAO,EAAA,YAAA;AAAA,IACP,KAAO,EAAA,WAAA;AAAA,IACP,KAAO,EAAA;AAAA;AAEX,CAAA;AAEO,MAAM,cAAc,MAAM;AAC/B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,WAAW,MAAM,CAAA;AAEnD,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA;AAAA;AAG3C,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,OAAA;AAAA,MACX,OAAA;AAAA,MACA,OAAS,EAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,QACR,MAAQ,EAAA,IAAA;AAAA,QACR,QAAU,EAAA,CAAA;AAAA,QACV,4BAA4B,CAAC;AAAA,OAC/B;AAAA,MACA,KAAA,kBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,OAAQ,EAAA,MAAA,EAAO,YAAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAM,EAAA,CAAA,kBAC1C,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,0BAAA,EACW,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACpD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAClB;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestStatusButtonGroup.esm.js","sources":["../../../src/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button from '@material-ui/core/Button';\nimport ButtonGroup from '@material-ui/core/ButtonGroup';\n\nimport { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nexport const PullRequestStatusButtonGroup = ({\n status,\n setStatus,\n}: {\n status: PullRequestStatus;\n setStatus: (pullRequestStatus: PullRequestStatus) => void;\n}) => {\n return (\n <ButtonGroup aria-label=\"outlined button group\">\n <Button\n color={status === PullRequestStatus.Active ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Active);\n }}\n >\n Active\n </Button>\n <Button\n color={status === PullRequestStatus.Completed ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Completed);\n }}\n >\n Completed\n </Button>\n <Button\n color={status === PullRequestStatus.Abandoned ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Abandoned);\n }}\n >\n Abandoned\n </Button>\n </ButtonGroup>\n );\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,+BAA+B,CAAC;AAAA,EAC3C,MAAA;AAAA,EACA,SAAA;AACF,CAGM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,WAAY,EAAA,EAAA,YAAA,EAAW,uBACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,MAAA,GAAS,SAAY,GAAA,SAAA;AAAA,MACzD,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,MAAM,CAAA,CAAA;AAAA,OACpC;AAAA,KAAA;AAAA,IACD,QAAA;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,SAAY,GAAA,SAAA;AAAA,MAC5D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA,CAAA;AAAA,OACvC;AAAA,KAAA;AAAA,IACD,WAAA;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,SAAY,GAAA,SAAA;AAAA,MAC5D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA,CAAA;AAAA,OACvC;AAAA,KAAA;AAAA,IACD,WAAA;AAAA,GAGH,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestStatusButtonGroup.esm.js","sources":["../../../src/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button from '@material-ui/core/Button';\nimport ButtonGroup from '@material-ui/core/ButtonGroup';\n\nimport { PullRequestStatus } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nexport const PullRequestStatusButtonGroup = ({\n status,\n setStatus,\n}: {\n status: PullRequestStatus;\n setStatus: (pullRequestStatus: PullRequestStatus) => void;\n}) => {\n return (\n <ButtonGroup aria-label=\"outlined button group\">\n <Button\n color={status === PullRequestStatus.Active ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Active);\n }}\n >\n Active\n </Button>\n <Button\n color={status === PullRequestStatus.Completed ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Completed);\n }}\n >\n Completed\n </Button>\n <Button\n color={status === PullRequestStatus.Abandoned ? 'primary' : 'default'}\n onClick={() => {\n setStatus(PullRequestStatus.Abandoned);\n }}\n >\n Abandoned\n </Button>\n </ButtonGroup>\n );\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,+BAA+B,CAAC;AAAA,EAC3C,MAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,WAAY,EAAA,EAAA,YAAA,EAAW,uBACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,MAAA,GAAS,SAAY,GAAA,SAAA;AAAA,MACzD,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,MAAM,CAAA;AAAA;AACpC,KAAA;AAAA,IACD;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,SAAY,GAAA,SAAA;AAAA,MAC5D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA;AAAA;AACvC,KAAA;AAAA,IACD;AAAA,GAGD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,MAAA,KAAW,iBAAkB,CAAA,SAAA,GAAY,SAAY,GAAA,SAAA;AAAA,MAC5D,SAAS,MAAM;AACb,QAAA,SAAA,CAAU,kBAAkB,SAAS,CAAA;AAAA;AACvC,KAAA;AAAA,IACD;AAAA,GAGH,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestTable.esm.js","sources":["../../../src/components/PullRequestTable/PullRequestTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport {\n PullRequest,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport React, { useState } from 'react';\n\nimport { AzurePullRequestsIcon } from '../AzurePullRequestsIcon';\nimport { DateTime } from 'luxon';\nimport { PullRequestStatusButtonGroup } from '../PullRequestStatusButtonGroup';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { usePullRequests } from '../../hooks/usePullRequests';\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'pullRequestId',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Title',\n field: 'title',\n width: 'auto',\n render: (row: Partial<PullRequest>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.title}</Link>\n {row.isDraft && (\n <Box paddingLeft={1}>\n <Chip\n label=\"Draft\"\n variant=\"outlined\"\n color=\"secondary\"\n size=\"small\"\n />\n </Box>\n )}\n </Box>\n ),\n },\n {\n title: 'Source',\n field: 'sourceRefName',\n width: 'auto',\n },\n {\n title: 'Target',\n field: 'targetRefName',\n width: 'auto',\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n {\n title: 'Created',\n field: 'creationDate',\n width: 'auto',\n render: (row: Partial<PullRequest>) =>\n (row.creationDate\n ? DateTime.fromISO(row.creationDate)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype PullRequestTableProps = {\n defaultLimit?: number;\n};\n\nexport const PullRequestTable = ({ defaultLimit }: PullRequestTableProps) => {\n const [pullRequestStatusState, setPullRequestStatusState] =\n useState<PullRequestStatus>(PullRequestStatus.Active);\n const { entity } = useEntity();\n\n const { items, loading, error } = usePullRequests(\n entity,\n defaultLimit,\n pullRequestStatusState,\n );\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePullRequestsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Pull Requests ({items ? items.length : 0})\n <Box position=\"absolute\" right={320} top={20}>\n <PullRequestStatusButtonGroup\n status={pullRequestStatusState}\n setStatus={setPullRequestStatusState}\n />\n </Box>\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoCA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,IAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,KAAO,EAAA,MAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,MAAA,EAAQ,CAAC,GACP,qBAAA,KAAA,CAAA,aAAA,CAAC,OAAI,OAAQ,EAAA,MAAA,EAAO,UAAW,EAAA,QAAA,EAAA,kBAC5B,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,GAAI,CAAA,IAAA,IAAQ,EAAK,EAAA,EAAA,GAAA,CAAI,KAAM,CAAA,EACpC,IAAI,OACH,oBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,WAAA,EAAa,CAChB,EAAA,kBAAA,KAAA,CAAA,aAAA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AA,CAAC,sBAAmB,KAAc,EAAA,CAAA,CAAA;AAAA,GAC3C;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,OAAA;AAAA,MACX,OAAA;AAAA,MACA,OAAS,EAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,QACR,MAAQ,EAAA,IAAA;AAAA,QACR,QAAU,EAAA,CAAA;AAAA,QACV,4BAA4B,CAAC,OAAA;AAAA,OAC/B;AAAA,MACA,KACE,kBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,OAAA,EAAQ,QAAO,UAAW,EAAA,QAAA,EAAA,kBAC5B,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,KAAO,EAAA,EAAE,QAAU,EAAA,EAAA,IAAM,CAChD,kBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,EAAA,EAAI,CAAG,EAAA,CAAA,EAAE,+BACgB,EAAA,KAAA,GAAQ,MAAM,MAAS,GAAA,CAAA,EAAE,GACvD,kBAAA,KAAA,CAAA,aAAA,CAAC,OAAI,QAAS,EAAA,UAAA,EAAW,KAAO,EAAA,GAAA,EAAK,KAAK,EACxC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,4BAAA;AAAA,QAAA;AAAA,UACC,MAAQ,EAAA,sBAAA;AAAA,UACR,SAAW,EAAA,yBAAA;AAAA,SAAA;AAAA,OAEf,CACF,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS,EAAC;AAAA,KAAA;AAAA,GAClB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestTable.esm.js","sources":["../../../src/components/PullRequestTable/PullRequestTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport {\n PullRequest,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport React, { useState } from 'react';\n\nimport { AzurePullRequestsIcon } from '../AzurePullRequestsIcon';\nimport { DateTime } from 'luxon';\nimport { PullRequestStatusButtonGroup } from '../PullRequestStatusButtonGroup';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { usePullRequests } from '../../hooks/usePullRequests';\n\nconst columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'pullRequestId',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Title',\n field: 'title',\n width: 'auto',\n render: (row: Partial<PullRequest>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.title}</Link>\n {row.isDraft && (\n <Box paddingLeft={1}>\n <Chip\n label=\"Draft\"\n variant=\"outlined\"\n color=\"secondary\"\n size=\"small\"\n />\n </Box>\n )}\n </Box>\n ),\n },\n {\n title: 'Source',\n field: 'sourceRefName',\n width: 'auto',\n },\n {\n title: 'Target',\n field: 'targetRefName',\n width: 'auto',\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n {\n title: 'Created',\n field: 'creationDate',\n width: 'auto',\n render: (row: Partial<PullRequest>) =>\n (row.creationDate\n ? DateTime.fromISO(row.creationDate)\n : DateTime.now()\n ).toRelative(),\n },\n];\n\ntype PullRequestTableProps = {\n defaultLimit?: number;\n};\n\nexport const PullRequestTable = ({ defaultLimit }: PullRequestTableProps) => {\n const [pullRequestStatusState, setPullRequestStatusState] =\n useState<PullRequestStatus>(PullRequestStatus.Active);\n const { entity } = useEntity();\n\n const { items, loading, error } = usePullRequests(\n entity,\n defaultLimit,\n pullRequestStatusState,\n );\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePullRequestsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Pull Requests ({items ? items.length : 0})\n <Box position=\"absolute\" right={320} top={20}>\n <PullRequestStatusButtonGroup\n status={pullRequestStatusState}\n setStatus={setPullRequestStatusState}\n />\n </Box>\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoCA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,IAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,KAAO,EAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,MAAA,EAAQ,CAAC,GACP,qBAAA,KAAA,CAAA,aAAA,CAAC,OAAI,OAAQ,EAAA,MAAA,EAAO,UAAW,EAAA,QAAA,EAAA,kBAC5B,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,GAAI,CAAA,IAAA,IAAQ,EAAK,EAAA,EAAA,GAAA,CAAI,KAAM,CAAA,EACpC,IAAI,OACH,oBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,WAAA,EAAa,CAChB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,OAAA;AAAA,QACN,OAAQ,EAAA,UAAA;AAAA,QACR,KAAM,EAAA,WAAA;AAA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A,IAAA;AAAA,QACR,MAAQ,EAAA,IAAA;AAAA,QACR,QAAU,EAAA,CAAA;AAAA,QACV,4BAA4B,CAAC;AAAA,OAC/B;AAAA,MACA,KACE,kBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,OAAA,EAAQ,QAAO,UAAW,EAAA,QAAA,EAAA,kBAC5B,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,KAAO,EAAA,EAAE,QAAU,EAAA,EAAA,IAAM,CAChD,kBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,EAAA,EAAI,CAAG,EAAA,CAAA,EAAE,+BACgB,EAAA,KAAA,GAAQ,MAAM,MAAS,GAAA,CAAA,EAAE,GACvD,kBAAA,KAAA,CAAA,aAAA,CAAC,OAAI,QAAS,EAAA,UAAA,EAAW,KAAO,EAAA,GAAA,EAAK,KAAK,EACxC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,4BAAA;AAAA,QAAA;AAAA,UACC,MAAQ,EAAA,sBAAA;AAAA,UACR,SAAW,EAAA;AAAA;AAAA,OAEf,CACF,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAClB;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestsPage.esm.js","sources":["../../../src/components/PullRequestsPage/PullRequestsPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n Header,\n Page,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { PullRequestColumnConfig, PullRequestGroup } from './lib/types';\nimport React, { useState } from 'react';\nimport { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils';\nimport { FilterType } from './lib/filters';\nimport { PullRequestGrid } from './lib/PullRequestGrid';\nimport { useDashboardPullRequests } from '../../hooks';\nimport { useFilterProcessor } from './lib/hooks';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { azureDevOpsPullRequestDashboardReadPermission } from '@backstage-community/plugin-azure-devops-common';\n\ntype PullRequestsPageContentProps = {\n pullRequestGroups: PullRequestGroup[] | undefined;\n loading: boolean;\n error?: Error;\n};\n\nconst PullRequestsPageContent = ({\n pullRequestGroups,\n loading,\n error,\n}: PullRequestsPageContentProps) => {\n if (loading && (!pullRequestGroups || pullRequestGroups.length <= 0)) {\n return <Progress />;\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return <PullRequestGrid pullRequestGroups={pullRequestGroups ?? []} />;\n};\n\nconst DEFAULT_COLUMN_CONFIGS: PullRequestColumnConfig[] = [\n {\n title: 'Created by me',\n filters: [{ type: FilterType.CreatedByCurrentUser }],\n simplified: false,\n },\n {\n title: 'Other PRs',\n filters: [{ type: FilterType.All }],\n simplified: true,\n },\n];\n\ntype PullRequestsPageProps = {\n projectName?: string;\n pollingInterval?: number;\n defaultColumnConfigs?: PullRequestColumnConfig[];\n teamsLimit?: number;\n};\n\nexport const PullRequestsPage = (props: PullRequestsPageProps) => {\n const { projectName, pollingInterval, defaultColumnConfigs, teamsLimit } =\n props;\n\n const { pullRequests, loading, error } = useDashboardPullRequests(\n projectName,\n pollingInterval,\n teamsLimit,\n );\n\n const [columnConfigs] = useState(\n defaultColumnConfigs ?? DEFAULT_COLUMN_CONFIGS,\n );\n\n const filterProcessor = useFilterProcessor();\n\n const pullRequestGroupConfigs = getPullRequestGroupConfigs(\n columnConfigs,\n filterProcessor,\n );\n\n const pullRequestGroups = getPullRequestGroups(\n pullRequests,\n pullRequestGroupConfigs,\n );\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"Azure Pull Requests\" />\n <Content>\n <RequirePermission\n permission={azureDevOpsPullRequestDashboardReadPermission}\n >\n <PullRequestsPageContent\n pullRequestGroups={pullRequestGroups}\n loading={loading}\n error={error}\n />\n </RequirePermission>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuCA,MAAM,0BAA0B,CAAC;AAAA,EAC/B,iBAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AACF,CAAoC,KAAA;AAClC,EAAA,IAAI,OAAY,KAAA,CAAC,iBAAqB,IAAA,iBAAA,CAAkB,UAAU,CAAI,CAAA,EAAA;AACpE,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA,CAAA;AAAA,GACnB;AAEA,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA,CAAA;AAAA,GAC3C;AAEA,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,EAAgB,iBAAmB,EAAA,iBAAA,IAAqB,EAAI,EAAA,CAAA,CAAA;AACtE,CAAA,CAAA;AAEA,MAAM,sBAAoD,GAAA;AAAA,EACxD;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,SAAS,CAAC,EAAE,IAAM,EAAA,UAAA,CAAW,sBAAsB,CAAA;AAAA,IACnD,UAAY,EAAA,KAAA;AAAA,GACd;AAAA,EACA;AAAA,IACE,KAAO,EAAA,WAAA;AAAA,IACP,SAAS,CAAC,EAAE,IAAM,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,IAClC,UAAY,EAAA,IAAA;AAAA,GACd;AACF,CAAA,CAAA;AASa,MAAA,gBAAA,GAAmB,CAAC,KAAiC,KAAA;AAChE,EAAA,MAAM,EAAE,WAAA,EAAa,eAAiB,EAAA,oBAAA,EAAsB,YAC1D,GAAA,KAAA,CAAA;AAEF,EAAA,MAAM,EAAE,YAAA,EAAc,OAAS,EAAA,KAAA,EAAU,GAAA,wBAAA;AAAA,IACvC,WAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,GACF,CAAA;AAEA,EAAM,MAAA,CAAC,aAAa,CAAI,GAAA,QAAA;AAAA,IACtB,oBAAwB,IAAA,sBAAA;AAAA,GAC1B,CAAA;AAEA,EAAA,MAAM,kBAAkB,kBAAmB,EAAA,CAAA;AAE3C,EAAA,MAAM,uBAA0B,GAAA,0BAAA;AAAA,IAC9B,aAAA;AAAA,IACA,eAAA;AAAA,GACF,CAAA;AAEA,EAAA,MAAM,iBAAoB,GAAA,oBAAA;AAAA,IACxB,YAAA;AAAA,IACA,uBAAA;AAAA,GACF,CAAA;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,OAAA,EAAQ,MACZ,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAO,KAAM,EAAA,qBAAA,EAAsB,CACpC,kBAAA,KAAA,CAAA,aAAA,CAAC,OACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,6CAAA;AAAA,KAAA;AAAA,oBAEZ,KAAA,CAAA,aAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,iBAAA;AAAA,QACA,OAAA;AAAA,QACA,KAAA;AAAA,OAAA;AAAA,KACF;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestsPage.esm.js","sources":["../../../src/components/PullRequestsPage/PullRequestsPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n Header,\n Page,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { PullRequestColumnConfig, PullRequestGroup } from './lib/types';\nimport React, { useState } from 'react';\nimport { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils';\nimport { FilterType } from './lib/filters';\nimport { PullRequestGrid } from './lib/PullRequestGrid';\nimport { useDashboardPullRequests } from '../../hooks';\nimport { useFilterProcessor } from './lib/hooks';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { azureDevOpsPullRequestDashboardReadPermission } from '@backstage-community/plugin-azure-devops-common';\n\ntype PullRequestsPageContentProps = {\n pullRequestGroups: PullRequestGroup[] | undefined;\n loading: boolean;\n error?: Error;\n};\n\nconst PullRequestsPageContent = ({\n pullRequestGroups,\n loading,\n error,\n}: PullRequestsPageContentProps) => {\n if (loading && (!pullRequestGroups || pullRequestGroups.length <= 0)) {\n return <Progress />;\n }\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return <PullRequestGrid pullRequestGroups={pullRequestGroups ?? []} />;\n};\n\nconst DEFAULT_COLUMN_CONFIGS: PullRequestColumnConfig[] = [\n {\n title: 'Created by me',\n filters: [{ type: FilterType.CreatedByCurrentUser }],\n simplified: false,\n },\n {\n title: 'Other PRs',\n filters: [{ type: FilterType.All }],\n simplified: true,\n },\n];\n\ntype PullRequestsPageProps = {\n projectName?: string;\n pollingInterval?: number;\n defaultColumnConfigs?: PullRequestColumnConfig[];\n teamsLimit?: number;\n};\n\nexport const PullRequestsPage = (props: PullRequestsPageProps) => {\n const { projectName, pollingInterval, defaultColumnConfigs, teamsLimit } =\n props;\n\n const { pullRequests, loading, error } = useDashboardPullRequests(\n projectName,\n pollingInterval,\n teamsLimit,\n );\n\n const [columnConfigs] = useState(\n defaultColumnConfigs ?? DEFAULT_COLUMN_CONFIGS,\n );\n\n const filterProcessor = useFilterProcessor();\n\n const pullRequestGroupConfigs = getPullRequestGroupConfigs(\n columnConfigs,\n filterProcessor,\n );\n\n const pullRequestGroups = getPullRequestGroups(\n pullRequests,\n pullRequestGroupConfigs,\n );\n\n return (\n <Page themeId=\"tool\">\n <Header title=\"Azure Pull Requests\" />\n <Content>\n <RequirePermission\n permission={azureDevOpsPullRequestDashboardReadPermission}\n >\n <PullRequestsPageContent\n pullRequestGroups={pullRequestGroups}\n loading={loading}\n error={error}\n />\n </RequirePermission>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuCA,MAAM,0BAA0B,CAAC;AAAA,EAC/B,iBAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAoC,KAAA;AAClC,EAAA,IAAI,OAAY,KAAA,CAAC,iBAAqB,IAAA,iBAAA,CAAkB,UAAU,CAAI,CAAA,EAAA;AACpE,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA;AAAA;AAGnB,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA;AAAA;AAG3C,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,EAAgB,iBAAmB,EAAA,iBAAA,IAAqB,EAAI,EAAA,CAAA;AACtE,CAAA;AAEA,MAAM,sBAAoD,GAAA;AAAA,EACxD;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,SAAS,CAAC,EAAE,IAAM,EAAA,UAAA,CAAW,sBAAsB,CAAA;AAAA,IACnD,UAAY,EAAA;AAAA,GACd;AAAA,EACA;AAAA,IACE,KAAO,EAAA,WAAA;AAAA,IACP,SAAS,CAAC,EAAE,IAAM,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,IAClC,UAAY,EAAA;AAAA;AAEhB,CAAA;AASa,MAAA,gBAAA,GAAmB,CAAC,KAAiC,KAAA;AAChE,EAAA,MAAM,EAAE,WAAA,EAAa,eAAiB,EAAA,oBAAA,EAAsB,YAC1D,GAAA,KAAA;AAEF,EAAA,MAAM,EAAE,YAAA,EAAc,OAAS,EAAA,KAAA,EAAU,GAAA,wBAAA;AAAA,IACvC,WAAA;AAAA,IACA,eAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAM,MAAA,CAAC,aAAa,CAAI,GAAA,QAAA;AAAA,IACtB,oBAAwB,IAAA;AAAA,GAC1B;AAEA,EAAA,MAAM,kBAAkB,kBAAmB,EAAA;AAE3C,EAAA,MAAM,uBAA0B,GAAA,0BAAA;AAAA,IAC9B,aAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,iBAAoB,GAAA,oBAAA;AAAA,IACxB,YAAA;AAAA,IACA;AAAA,GACF;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,OAAA,EAAQ,MACZ,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAO,KAAM,EAAA,qBAAA,EAAsB,CACpC,kBAAA,KAAA,CAAA,aAAA,CAAC,OACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA;AAAA,KAAA;AAAA,oBAEZ,KAAA,CAAA,aAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,iBAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA;AAAA;AACF,GAEJ,CACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AutoCompleteIcon.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport DoneAllIcon from '@material-ui/icons/DoneAll';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n root: (props: { hasAutoComplete: boolean }) => ({\n color: props.hasAutoComplete\n ? theme.palette.success.main\n : theme.palette.grey[400],\n }),\n}));\n\nexport const AutoCompleteIcon = (props: { hasAutoComplete: boolean }) => {\n const classes = useStyles(props);\n return <DoneAllIcon className={classes.root} />;\n};\n"],"names":[],"mappings":";;;;AAoBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAA,EAAM,CAAC,KAAyC,MAAA;AAAA,IAC9C,KAAA,EAAO,KAAM,CAAA,eAAA,GACT,KAAM,CAAA,OAAA,CAAQ,QAAQ,IACtB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAA;AAAA,GAC5B,CAAA;AACF,CAAE,CAAA,CAAA,CAAA;AAEW,MAAA,gBAAA,GAAmB,CAAC,KAAwC,KAAA;AACvE,EAAM,MAAA,OAAA,GAAU,UAAU,KAAK,CAAA,CAAA;AAC/B,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,SAAW,EAAA,OAAA,CAAQ,IAAM,EAAA,CAAA,CAAA;AAC/C;;;;"}
1
+ {"version":3,"file":"AutoCompleteIcon.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport DoneAllIcon from '@material-ui/icons/DoneAll';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n root: (props: { hasAutoComplete: boolean }) => ({\n color: props.hasAutoComplete\n ? theme.palette.success.main\n : theme.palette.grey[400],\n }),\n}));\n\nexport const AutoCompleteIcon = (props: { hasAutoComplete: boolean }) => {\n const classes = useStyles(props);\n return <DoneAllIcon className={classes.root} />;\n};\n"],"names":[],"mappings":";;;;AAoBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAA,EAAM,CAAC,KAAyC,MAAA;AAAA,IAC9C,KAAA,EAAO,KAAM,CAAA,eAAA,GACT,KAAM,CAAA,OAAA,CAAQ,QAAQ,IACtB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG;AAAA,GAC5B;AACF,CAAE,CAAA,CAAA;AAEW,MAAA,gBAAA,GAAmB,CAAC,KAAwC,KAAA;AACvE,EAAM,MAAA,OAAA,GAAU,UAAU,KAAK,CAAA;AAC/B,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,SAAW,EAAA,OAAA,CAAQ,IAAM,EAAA,CAAA;AAC/C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestCard.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar, Link } from '@backstage/core-components';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\n\nimport { AutoCompleteIcon } from '../AutoCompleteIcon';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { DateTime } from 'luxon';\nimport { PullRequestCardPolicies } from './PullRequestCardPolicies';\nimport { PullRequestCardReviewers } from './PullRequestCardReviewers';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n theme => ({\n card: {\n backgroundColor:\n theme.palette.type === 'dark'\n ? theme.palette.grey[700]\n : theme.palette.common.white,\n },\n cardHeaderSimplified: {\n paddingBottom: theme.spacing(2),\n },\n cardHeaderAction: {\n display: 'flex',\n alignSelf: 'center',\n margin: 0,\n },\n content: {\n display: 'flex',\n flexDirection: 'row',\n },\n policies: {\n flex: 1,\n },\n avatar: { width: '2.5rem', height: '2.5rem' },\n avatarText: { fontSize: '1rem' },\n }),\n { name: 'PullRequestCard' },\n);\n\ntype PullRequestCardProps = {\n pullRequest: DashboardPullRequest;\n simplified?: boolean;\n};\n\nexport const PullRequestCard = ({\n pullRequest,\n simplified,\n}: PullRequestCardProps) => {\n const classes = useStyles();\n\n const title = (\n <Link to={pullRequest.link ?? ''} title={pullRequest.description}>\n {pullRequest.title}\n </Link>\n );\n\n const repoLink = (\n <Link to={pullRequest.repository?.url ?? ''} color=\"inherit\">\n {pullRequest.repository?.name}\n </Link>\n );\n\n const creationDate = pullRequest.creationDate\n ? DateTime.fromISO(pullRequest.creationDate).toRelative()\n : undefined;\n\n const subheader = (\n <Typography component=\"span\">\n {repoLink} · {creationDate}\n </Typography>\n );\n\n const avatar = (\n <Avatar\n displayName={pullRequest.createdBy?.displayName}\n picture={pullRequest.createdBy?.imageUrl}\n classes={{ avatar: classes.avatar, avatarText: classes.avatarText }}\n />\n );\n\n return (\n <Card\n classes={{ root: classes.card }}\n data-pull-request-id={pullRequest.pullRequestId}\n >\n <CardHeader\n avatar={avatar}\n title={title}\n subheader={subheader}\n action={\n <AutoCompleteIcon hasAutoComplete={pullRequest.hasAutoComplete} />\n }\n classes={{\n ...(simplified && { root: classes.cardHeaderSimplified }),\n action: classes.cardHeaderAction,\n }}\n />\n\n {!simplified && (\n <CardContent className={classes.content}>\n {pullRequest.policies && (\n <PullRequestCardPolicies\n policies={pullRequest.policies}\n className={classes.policies}\n />\n )}\n\n {pullRequest.reviewers && (\n <PullRequestCardReviewers reviewers={pullRequest.reviewers} />\n )}\n </CardContent>\n )}\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,eACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAA,GACtB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA,KAAA;AAAA,KAC7B;AAAA,IACA,oBAAsB,EAAA;AAAA,MACpB,aAAA,EAAe,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,KAChC;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,OAAS,EAAA,MAAA;AAAA,MACT,SAAW,EAAA,QAAA;AAAA,MACX,MAAQ,EAAA,CAAA;AAAA,KACV;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,aAAe,EAAA,KAAA;AAAA,KACjB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA,CAAA;AAAA,KACR;AAAA,IACA,MAAQ,EAAA,EAAE,KAAO,EAAA,QAAA,EAAU,QAAQ,QAAS,EAAA;AAAA,IAC5C,UAAA,EAAY,EAAE,QAAA,EAAU,MAAO,EAAA;AA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AAS,EAAA,EAAE,IAAM,EAAA,OAAA,CAAQ,IAAK,EAAA;AAAA,MAC9B,wBAAsB,WAAY,CAAA,aAAA;AAAA,KAAA;AAAA,oBAElC,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,MAAA;AAAA,QACA,KAAA;AAAA,QACA,SAAA;AAAA,QACA,MACE,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,eAAA,EAAiB,YAAY,eAAiB,EAAA,CAAA;AAAA,QAElE,OAAS,EAAA;AAAA,UACP,GAAI,UAAA,IAAc,EAAE,IAAA,EAAM,QAAQ,oBAAqB,EAAA;AAAA,UACvD,QAAQ,OAAQ,CAAA,gBAAA;AAAA,SAClB;AAAA,OAAA;AAAA,KACF;AAAA,IAEC,CAAC,8BACC,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,WAAW,OAAQ,CAAA,OAAA,EAAA,EAC7B,YAAY,QACX,oBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,UAAU,WAAY,CAAA,QAAA;AAAA,QACtB,WAAW,OAAQ,CAAA,QAAA;AAAA,OAAA;AAAA,KACrB,EAGD,YAAY,SACX,oBAAA,KAAA,CAAA,aAAA,CAAC,4BAAyB,SAAW,EAAA,WAAA,CAAY,WAAW,CAEhE,CAAA;AAAA,GAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestCard.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar, Link } from '@backstage/core-components';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\n\nimport { AutoCompleteIcon } from '../AutoCompleteIcon';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { DateTime } from 'luxon';\nimport { PullRequestCardPolicies } from './PullRequestCardPolicies';\nimport { PullRequestCardReviewers } from './PullRequestCardReviewers';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n theme => ({\n card: {\n backgroundColor:\n theme.palette.type === 'dark'\n ? theme.palette.grey[700]\n : theme.palette.common.white,\n },\n cardHeaderSimplified: {\n paddingBottom: theme.spacing(2),\n },\n cardHeaderAction: {\n display: 'flex',\n alignSelf: 'center',\n margin: 0,\n },\n content: {\n display: 'flex',\n flexDirection: 'row',\n },\n policies: {\n flex: 1,\n },\n avatar: { width: '2.5rem', height: '2.5rem' },\n avatarText: { fontSize: '1rem' },\n }),\n { name: 'PullRequestCard' },\n);\n\ntype PullRequestCardProps = {\n pullRequest: DashboardPullRequest;\n simplified?: boolean;\n};\n\nexport const PullRequestCard = ({\n pullRequest,\n simplified,\n}: PullRequestCardProps) => {\n const classes = useStyles();\n\n const title = (\n <Link to={pullRequest.link ?? ''} title={pullRequest.description}>\n {pullRequest.title}\n </Link>\n );\n\n const repoLink = (\n <Link to={pullRequest.repository?.url ?? ''} color=\"inherit\">\n {pullRequest.repository?.name}\n </Link>\n );\n\n const creationDate = pullRequest.creationDate\n ? DateTime.fromISO(pullRequest.creationDate).toRelative()\n : undefined;\n\n const subheader = (\n <Typography component=\"span\">\n {repoLink} · {creationDate}\n </Typography>\n );\n\n const avatar = (\n <Avatar\n displayName={pullRequest.createdBy?.displayName}\n picture={pullRequest.createdBy?.imageUrl}\n classes={{ avatar: classes.avatar, avatarText: classes.avatarText }}\n />\n );\n\n return (\n <Card\n classes={{ root: classes.card }}\n data-pull-request-id={pullRequest.pullRequestId}\n >\n <CardHeader\n avatar={avatar}\n title={title}\n subheader={subheader}\n action={\n <AutoCompleteIcon hasAutoComplete={pullRequest.hasAutoComplete} />\n }\n classes={{\n ...(simplified && { root: classes.cardHeaderSimplified }),\n action: classes.cardHeaderAction,\n }}\n />\n\n {!simplified && (\n <CardContent className={classes.content}>\n {pullRequest.policies && (\n <PullRequestCardPolicies\n policies={pullRequest.policies}\n className={classes.policies}\n />\n )}\n\n {pullRequest.reviewers && (\n <PullRequestCardReviewers reviewers={pullRequest.reviewers} />\n )}\n </CardContent>\n )}\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,eACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAA,GACtB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,KAC7B;AAAA,IACA,oBAAsB,EAAA;AAAA,MACpB,aAAA,EAAe,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,KAChC;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,OAAS,EAAA,MAAA;AAAA,MACT,SAAW,EAAA,QAAA;AAAA,MACX,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,aAAe,EAAA;AAAA,KACjB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA;AAAA,KACR;AAAA,IACA,MAAQ,EAAA,EAAE,KAAO,EAAA,QAAA,EAAU,QAAQ,QAAS,EAAA;AAAA,IAC5C,UAAA,EAAY,EAAE,QAAA,EAAU,MAAO;AAAA,GACjC,CA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AY,CAAA;AAAA,KAAA;AAAA,oBAElC,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,MAAA;AAAA,QACA,KAAA;AAAA,QACA,SAAA;AAAA,QACA,MACE,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,eAAA,EAAiB,YAAY,eAAiB,EAAA,CAAA;AAAA,QAElE,OAAS,EAAA;AAAA,UACP,GAAI,UAAA,IAAc,EAAE,IAAA,EAAM,QAAQ,oBAAqB,EAAA;AAAA,UACvD,QAAQ,OAAQ,CAAA;AAAA;AAClB;AAAA,KACF;AAAA,IAEC,CAAC,8BACC,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,WAAW,OAAQ,CAAA,OAAA,EAAA,EAC7B,YAAY,QACX,oBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,UAAU,WAAY,CAAA,QAAA;AAAA,QACtB,WAAW,OAAQ,CAAA;AAAA;AAAA,KACrB,EAGD,YAAY,SACX,oBAAA,KAAA,CAAA,aAAA,CAAC,4BAAyB,SAAW,EAAA,WAAA,CAAY,WAAW,CAEhE;AAAA,GAEJ;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestCardPolicies.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Policy } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestCardPolicy } from './PullRequestCardPolicy';\nimport React from 'react';\n\ntype PullRequestCardProps = {\n policies: Policy[];\n className: string;\n};\n\nexport const PullRequestCardPolicies = ({\n policies,\n className,\n}: PullRequestCardProps) => (\n <div className={className}>\n {policies.map(policy => (\n <PullRequestCardPolicy key={policy.id} policy={policy} />\n ))}\n </div>\n);\n"],"names":[],"mappings":";;;AAyBO,MAAM,0BAA0B,CAAC;AAAA,EACtC,QAAA;AAAA,EACA,SAAA;AACF,CAAA,qBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SACF,EAAA,EAAA,QAAA,CAAS,GAAI,CAAA,CAAA,MAAA,qBACX,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,GAAK,EAAA,MAAA,CAAO,EAAI,EAAA,MAAA,EAAgB,CACxD,CACH;;;;"}
1
+ {"version":3,"file":"PullRequestCardPolicies.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Policy } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestCardPolicy } from './PullRequestCardPolicy';\nimport React from 'react';\n\ntype PullRequestCardProps = {\n policies: Policy[];\n className: string;\n};\n\nexport const PullRequestCardPolicies = ({\n policies,\n className,\n}: PullRequestCardProps) => (\n <div className={className}>\n {policies.map(policy => (\n <PullRequestCardPolicy key={policy.id} policy={policy} />\n ))}\n </div>\n);\n"],"names":[],"mappings":";;;AAyBO,MAAM,0BAA0B,CAAC;AAAA,EACtC,QAAA;AAAA,EACA;AACF,CAAA,qBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SACF,EAAA,EAAA,QAAA,CAAS,GAAI,CAAA,CAAA,MAAA,qBACX,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,GAAK,EAAA,MAAA,CAAO,EAAI,EAAA,MAAA,EAAgB,CACxD,CACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PullRequestCardPolicy.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Policy,\n PolicyEvaluationStatus,\n PolicyType,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { styled, withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport GroupWorkIcon from '@material-ui/icons/GroupWork';\nimport React from 'react';\nimport WatchLaterIcon from '@material-ui/icons/WatchLater';\n\nconst PolicyRequiredIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyRequiredIcon' },\n)(WatchLaterIcon);\n\nconst PolicyIssueIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.error.main,\n },\n }),\n { name: 'PolicyIssueIcon' },\n)(CancelIcon);\n\nconst PolicyInProgressIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyInProgressIcon' },\n)(GroupWorkIcon);\n\nfunction getPolicyIcon(policy: Policy): React.JSX.Element | null {\n switch (policy.type) {\n case PolicyType.Build:\n switch (policy.status) {\n case PolicyEvaluationStatus.Running:\n return <PolicyInProgressIcon />;\n case PolicyEvaluationStatus.Rejected:\n return <PolicyIssueIcon />;\n case PolicyEvaluationStatus.Queued:\n return <PolicyRequiredIcon />;\n default:\n return null;\n }\n case PolicyType.MinimumReviewers:\n case PolicyType.RequiredReviewers:\n return <PolicyRequiredIcon />;\n case PolicyType.Status:\n case PolicyType.Comments:\n return <PolicyIssueIcon />;\n default:\n return null;\n }\n}\n\nconst PullRequestCardPolicyContainer = styled('div')({\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n});\n\ntype PullRequestCardPolicyProps = {\n policy: Policy;\n};\n\nexport const PullRequestCardPolicy = ({\n policy,\n}: PullRequestCardPolicyProps) => (\n <PullRequestCardPolicyContainer>\n {getPolicyIcon(policy)}{' '}\n <Typography component=\"span\">{policy.text}</Typography>\n </PullRequestCardPolicyContainer>\n);\n"],"names":[],"mappings":";;;;;;;;AA6BA,MAAM,kBAAqB,GAAA,UAAA;AAAA,EACzB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,IAAA;AAAA,KAC5B;AAAA,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oBAAqB,EAAA;AAC/B,CAAA,CAAE,cAAc,CAAA,CAAA;AAEhB,MAAM,eAAkB,GAAA,UAAA;AAAA,EACtB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,KAAM,CAAA,IAAA;AAAA,KAC7B;AAAA,GACF,CAAA;AAAA,EACA,EAAE,MAAM,iBAAkB,EAAA;AAC5B,CAAA,CAAE,UAAU,CAAA,CAAA;AAEZ,MAAM,oBAAuB,GAAA,UAAA;AAAA,EAC3B,CAAU,KAAA,MAAA;AAAA,IACR,IA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AAA,IAAA,EACE,aAAc,CAAA,MAAM,CAAG,EAAA,GAAA,kBACvB,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,MAAA,EAAA,EAAQ,MAAO,CAAA,IAAK,CAC5C;;;;"}
1
+ {"version":3,"file":"PullRequestCardPolicy.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Policy,\n PolicyEvaluationStatus,\n PolicyType,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { styled, withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport GroupWorkIcon from '@material-ui/icons/GroupWork';\nimport React from 'react';\nimport WatchLaterIcon from '@material-ui/icons/WatchLater';\n\nconst PolicyRequiredIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyRequiredIcon' },\n)(WatchLaterIcon);\n\nconst PolicyIssueIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.error.main,\n },\n }),\n { name: 'PolicyIssueIcon' },\n)(CancelIcon);\n\nconst PolicyInProgressIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyInProgressIcon' },\n)(GroupWorkIcon);\n\nfunction getPolicyIcon(policy: Policy): React.JSX.Element | null {\n switch (policy.type) {\n case PolicyType.Build:\n switch (policy.status) {\n case PolicyEvaluationStatus.Running:\n return <PolicyInProgressIcon />;\n case PolicyEvaluationStatus.Rejected:\n return <PolicyIssueIcon />;\n case PolicyEvaluationStatus.Queued:\n return <PolicyRequiredIcon />;\n default:\n return null;\n }\n case PolicyType.MinimumReviewers:\n case PolicyType.RequiredReviewers:\n return <PolicyRequiredIcon />;\n case PolicyType.Status:\n case PolicyType.Comments:\n return <PolicyIssueIcon />;\n default:\n return null;\n }\n}\n\nconst PullRequestCardPolicyContainer = styled('div')({\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n});\n\ntype PullRequestCardPolicyProps = {\n policy: Policy;\n};\n\nexport const PullRequestCardPolicy = ({\n policy,\n}: PullRequestCardPolicyProps) => (\n <PullRequestCardPolicyContainer>\n {getPolicyIcon(policy)}{' '}\n <Typography component=\"span\">{policy.text}</Typography>\n </PullRequestCardPolicyContainer>\n);\n"],"names":[],"mappings":";;;;;;;;AA6BA,MAAM,kBAAqB,GAAA,UAAA;AAAA,EACzB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA;AAAA;AAC5B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oBAAqB;AAC/B,CAAA,CAAE,cAAc,CAAA;AAEhB,MAAM,eAAkB,GAAA,UAAA;AAAA,EACtB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,KAAM,CAAA;AAAA;AAC7B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,iBAAkB;AAC5B,CAAA,CAAE,UAAU,CAAA;AAEZ,MAAM,oBAAuB,GAAA,UAAA;AAAA,EAC3B,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA;AAAA;AAC5B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,sBAAuB;AACjC,CAAA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equestCard/PullRequestCardReviewer.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar } from '@backstage/core-components';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { makeStyles } from '@material-ui/core/styles';\n\ntype PullRequestCardReviewerProps = {\n reviewer: Reviewer;\n};\n\nconst useStyles = makeStyles(\n {\n avatar: {\n width: '2.5rem',\n height: '2.5rem',\n border: '0.3rem solid silver',\n },\n avatarText: {\n fontSize: '1rem',\n },\n },\n { name: 'PullRequestCardReviewer' },\n);\n\nexport const PullRequestCardReviewer = ({\n reviewer,\n}: PullRequestCardReviewerProps) => {\n const classes = useStyles();\n\n return (\n <Avatar\n displayName={reviewer.displayName}\n picture={reviewer.imageUrl}\n classes={classes}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAyBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA,QAAA;AAAA,MACP,MAAQ,EAAA,QAAA;AAAA,MACR,MAAQ,EAAA,qBAAA;AAAA,KACV;AAAA,IACA,UAAY,EAAA;AAAA,MACV,QAAU,EAAA,MAAA;AAAA,KACZ;AAAA,GACF;AAAA,EACA,EAAE,MAAM,yBAA0B,EAAA;AACpC,CAAA,CAAA;AAEO,MAAM,0BAA0B,CAAC;AAAA,EACtC,QAAA;AACF,CAAoC,KAAA;AAClC,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAE1B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAa,QAAS,CAAA,WAAA;AAAA,MACtB,SAAS,QAAS,CAAA,QAAA;AAAA,MAClB,OAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"PullRequestCardReviewer.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar } from '@backstage/core-components';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { makeStyles } from '@material-ui/core/styles';\n\ntype PullRequestCardReviewerProps = {\n reviewer: Reviewer;\n};\n\nconst useStyles = makeStyles(\n {\n avatar: {\n width: '2.5rem',\n height: '2.5rem',\n border: '0.3rem solid silver',\n },\n avatarText: {\n fontSize: '1rem',\n },\n },\n { name: 'PullRequestCardReviewer' },\n);\n\nexport const PullRequestCardReviewer = ({\n reviewer,\n}: PullRequestCardReviewerProps) => {\n const classes = useStyles();\n\n return (\n <Avatar\n displayName={reviewer.displayName}\n picture={reviewer.imageUrl}\n classes={classes}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAyBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA,QAAA;AAAA,MACP,MAAQ,EAAA,QAAA;AAAA,MACR,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,UAAY,EAAA;AAAA,MACV,QAAU,EAAA;AAAA;AACZ,GACF;AAAA,EACA,EAAE,MAAM,yBAA0B;AACpC,CAAA;AAEO,MAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,CAAoC,KAAA;AAClC,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAa,QAAS,CAAA,WAAA;AAAA,MACtB,SAAS,QAAS,CAAA,QAAA;AAAA,MAClB;AAAA;AAAA,GACF;AAEJ;;;;"}