@kuadrant/kuadrant-backstage-plugin-frontend 0.0.2-dev-0b744dd → 0.0.2-dev-9be93a3

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 (145) hide show
  1. package/dist/api.esm.js +220 -0
  2. package/dist/api.esm.js.map +1 -0
  3. package/dist/apis.esm.js +15 -0
  4. package/dist/apis.esm.js.map +1 -0
  5. package/dist/components/ApiAccessCard/ApiAccessCard.esm.js +27 -37
  6. package/dist/components/ApiAccessCard/ApiAccessCard.esm.js.map +1 -1
  7. package/dist/components/ApiKeyApprovalPage/ApiKeyApprovalPage.esm.js +10 -0
  8. package/dist/components/ApiKeyApprovalPage/ApiKeyApprovalPage.esm.js.map +1 -0
  9. package/dist/components/ApiKeyApprovalPage/index.esm.js +2 -0
  10. package/dist/components/ApiKeyDetailPage/ApiKeyDetailPage.esm.js +28 -40
  11. package/dist/components/ApiKeyDetailPage/ApiKeyDetailPage.esm.js.map +1 -1
  12. package/dist/components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js +20 -46
  13. package/dist/components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js.map +1 -1
  14. package/dist/components/ApiProductDetailPage/ApiProductDetailPage.esm.js +27 -35
  15. package/dist/components/ApiProductDetailPage/ApiProductDetailPage.esm.js.map +1 -1
  16. package/dist/components/ApiProductDetails/ApiProductDetails.esm.js +13 -3
  17. package/dist/components/ApiProductDetails/ApiProductDetails.esm.js.map +1 -1
  18. package/dist/components/ApiProductInfoCard/ApiProductInfoCard.esm.js +5 -13
  19. package/dist/components/ApiProductInfoCard/ApiProductInfoCard.esm.js.map +1 -1
  20. package/dist/components/ApiProductOpenApiAlert/ApiProductOpenApiAlert.esm.js +7 -10
  21. package/dist/components/ApiProductOpenApiAlert/ApiProductOpenApiAlert.esm.js.map +1 -1
  22. package/dist/components/ApprovalQueueTable/ApprovalQueueTable.esm.js +34 -66
  23. package/dist/components/ApprovalQueueTable/ApprovalQueueTable.esm.js.map +1 -1
  24. package/dist/components/CreateAPIProductDialog/CreateAPIProductDialog.esm.js +143 -58
  25. package/dist/components/CreateAPIProductDialog/CreateAPIProductDialog.esm.js.map +1 -1
  26. package/dist/components/EditAPIKeyDialog/EditAPIKeyDialog.esm.js +8 -18
  27. package/dist/components/EditAPIKeyDialog/EditAPIKeyDialog.esm.js.map +1 -1
  28. package/dist/components/EditAPIProductDialog/EditAPIProductDialog.esm.js +52 -30
  29. package/dist/components/EditAPIProductDialog/EditAPIProductDialog.esm.js.map +1 -1
  30. package/dist/components/EntityApiApprovalTab/EntityApiApprovalTab.esm.js +11 -27
  31. package/dist/components/EntityApiApprovalTab/EntityApiApprovalTab.esm.js.map +1 -1
  32. package/dist/components/KuadrantPage/ApiProductsPage.esm.js +71 -55
  33. package/dist/components/KuadrantPage/ApiProductsPage.esm.js.map +1 -1
  34. package/dist/components/MyApiKeysPage/MyApiKeysPage.esm.js +10 -0
  35. package/dist/components/MyApiKeysPage/MyApiKeysPage.esm.js.map +1 -0
  36. package/dist/components/MyApiKeysPage/index.esm.js +2 -0
  37. package/dist/components/MyApiKeysPage/index.esm.js.map +1 -0
  38. package/dist/components/MyApiKeysTable/MyApiKeysTable.esm.js +51 -57
  39. package/dist/components/MyApiKeysTable/MyApiKeysTable.esm.js.map +1 -1
  40. package/dist/components/RequestAccessDialog/RequestAccessDialog.esm.js +10 -25
  41. package/dist/components/RequestAccessDialog/RequestAccessDialog.esm.js.map +1 -1
  42. package/dist/components/SimpleRequestAccessDialog/SimpleRequestAccessDialog.esm.js +206 -0
  43. package/dist/components/SimpleRequestAccessDialog/SimpleRequestAccessDialog.esm.js.map +1 -0
  44. package/dist/index.d.ts +461 -2
  45. package/dist/index.esm.js +3 -1
  46. package/dist/index.esm.js.map +1 -1
  47. package/dist/plugin.esm.js +11 -4
  48. package/dist/plugin.esm.js.map +1 -1
  49. package/dist/utils/styles.esm.js +44 -5
  50. package/dist/utils/styles.esm.js.map +1 -1
  51. package/dist-scalprum/internal.plugin-kuadrant.8bf02d5482a5a3ed6337.js +2 -0
  52. package/dist-scalprum/internal.plugin-kuadrant.8bf02d5482a5a3ed6337.js.map +1 -0
  53. package/dist-scalprum/plugin-manifest.json +3 -3
  54. package/dist-scalprum/static/2118.82433765.chunk.js +2 -0
  55. package/dist-scalprum/static/2118.82433765.chunk.js.map +1 -0
  56. package/dist-scalprum/static/2967.28e7c7f8.chunk.js +2 -0
  57. package/dist-scalprum/static/2967.28e7c7f8.chunk.js.map +1 -0
  58. package/dist-scalprum/static/369.2374941c.chunk.js +2 -0
  59. package/dist-scalprum/static/369.2374941c.chunk.js.map +1 -0
  60. package/dist-scalprum/static/3947.ff1c25cf.chunk.js +2 -0
  61. package/dist-scalprum/static/3947.ff1c25cf.chunk.js.map +1 -0
  62. package/dist-scalprum/static/3976.cf3ec7be.chunk.js +2 -0
  63. package/dist-scalprum/static/3976.cf3ec7be.chunk.js.map +1 -0
  64. package/dist-scalprum/static/4447.222bb58d.chunk.js +2 -0
  65. package/dist-scalprum/static/4447.222bb58d.chunk.js.map +1 -0
  66. package/dist-scalprum/static/5010.4ef96c87.chunk.js +3 -0
  67. package/dist-scalprum/static/5010.4ef96c87.chunk.js.map +1 -0
  68. package/dist-scalprum/static/5203.e92a3353.chunk.js +2 -0
  69. package/dist-scalprum/static/5203.e92a3353.chunk.js.map +1 -0
  70. package/dist-scalprum/static/6371.6ee1f11d.chunk.js +2 -0
  71. package/dist-scalprum/static/6371.6ee1f11d.chunk.js.map +1 -0
  72. package/dist-scalprum/static/6422.969d9b8c.chunk.js +2 -0
  73. package/dist-scalprum/static/6422.969d9b8c.chunk.js.map +1 -0
  74. package/dist-scalprum/static/6800.a7645f4c.chunk.js +2 -0
  75. package/dist-scalprum/static/6800.a7645f4c.chunk.js.map +1 -0
  76. package/dist-scalprum/static/69.1decc5e8.chunk.js +2 -0
  77. package/dist-scalprum/static/69.1decc5e8.chunk.js.map +1 -0
  78. package/dist-scalprum/static/7005.a9f73153.chunk.js +2 -0
  79. package/dist-scalprum/static/7005.a9f73153.chunk.js.map +1 -0
  80. package/dist-scalprum/static/7270.b0e185f1.chunk.js +2 -0
  81. package/dist-scalprum/static/7270.b0e185f1.chunk.js.map +1 -0
  82. package/dist-scalprum/static/7791.5c1eea8a.chunk.js +2 -0
  83. package/dist-scalprum/static/7791.5c1eea8a.chunk.js.map +1 -0
  84. package/dist-scalprum/static/{6763.d6cd937f.chunk.js → 8563.46f1a3e1.chunk.js} +3 -3
  85. package/dist-scalprum/static/8563.46f1a3e1.chunk.js.map +1 -0
  86. package/dist-scalprum/static/8789.84963cbc.chunk.js +2 -0
  87. package/dist-scalprum/static/8789.84963cbc.chunk.js.map +1 -0
  88. package/dist-scalprum/static/8804.63919453.chunk.js +2 -0
  89. package/dist-scalprum/static/8804.63919453.chunk.js.map +1 -0
  90. package/dist-scalprum/static/9051.db875198.chunk.js +2 -0
  91. package/dist-scalprum/static/9051.db875198.chunk.js.map +1 -0
  92. package/dist-scalprum/static/{2946.a35243f1.chunk.js → 9370.2e9fe34b.chunk.js} +3 -3
  93. package/dist-scalprum/static/9370.2e9fe34b.chunk.js.map +1 -0
  94. package/dist-scalprum/static/9838.5df9b1de.chunk.js +2 -0
  95. package/dist-scalprum/static/9838.5df9b1de.chunk.js.map +1 -0
  96. package/dist-scalprum/static/exposed-PluginRoot.8a8dd91f.chunk.js +2 -0
  97. package/dist-scalprum/static/exposed-PluginRoot.8a8dd91f.chunk.js.map +1 -0
  98. package/package.json +3 -1
  99. package/dist/components/ApiKeysPage/ApiKeysPage.esm.js +0 -43
  100. package/dist/components/ApiKeysPage/ApiKeysPage.esm.js.map +0 -1
  101. package/dist/components/ApiKeysPage/index.esm.js +0 -2
  102. package/dist-scalprum/internal.plugin-kuadrant.114cbbe1d3ddb939d776.js +0 -2
  103. package/dist-scalprum/internal.plugin-kuadrant.114cbbe1d3ddb939d776.js.map +0 -1
  104. package/dist-scalprum/static/2821.0829f14d.chunk.js +0 -2
  105. package/dist-scalprum/static/2821.0829f14d.chunk.js.map +0 -1
  106. package/dist-scalprum/static/2946.a35243f1.chunk.js.map +0 -1
  107. package/dist-scalprum/static/2967.65c51af8.chunk.js +0 -2
  108. package/dist-scalprum/static/2967.65c51af8.chunk.js.map +0 -1
  109. package/dist-scalprum/static/3650.ee76eba9.chunk.js +0 -2
  110. package/dist-scalprum/static/3650.ee76eba9.chunk.js.map +0 -1
  111. package/dist-scalprum/static/3947.7458971d.chunk.js +0 -2
  112. package/dist-scalprum/static/3947.7458971d.chunk.js.map +0 -1
  113. package/dist-scalprum/static/3984.647ef00c.chunk.js +0 -2
  114. package/dist-scalprum/static/3984.647ef00c.chunk.js.map +0 -1
  115. package/dist-scalprum/static/4651.c85cecc4.chunk.js +0 -2
  116. package/dist-scalprum/static/4651.c85cecc4.chunk.js.map +0 -1
  117. package/dist-scalprum/static/4682.75f17114.chunk.js +0 -2
  118. package/dist-scalprum/static/4682.75f17114.chunk.js.map +0 -1
  119. package/dist-scalprum/static/5010.0cd6c959.chunk.js +0 -3
  120. package/dist-scalprum/static/5010.0cd6c959.chunk.js.map +0 -1
  121. package/dist-scalprum/static/5203.b654e8e0.chunk.js +0 -2
  122. package/dist-scalprum/static/5203.b654e8e0.chunk.js.map +0 -1
  123. package/dist-scalprum/static/5453.ecdee66d.chunk.js +0 -2
  124. package/dist-scalprum/static/5453.ecdee66d.chunk.js.map +0 -1
  125. package/dist-scalprum/static/6371.d45f37cc.chunk.js +0 -2
  126. package/dist-scalprum/static/6371.d45f37cc.chunk.js.map +0 -1
  127. package/dist-scalprum/static/6763.d6cd937f.chunk.js.map +0 -1
  128. package/dist-scalprum/static/6800.20f46859.chunk.js +0 -2
  129. package/dist-scalprum/static/6800.20f46859.chunk.js.map +0 -1
  130. package/dist-scalprum/static/6840.1653e6b0.chunk.js +0 -2
  131. package/dist-scalprum/static/6840.1653e6b0.chunk.js.map +0 -1
  132. package/dist-scalprum/static/7236.f3886d59.chunk.js +0 -2
  133. package/dist-scalprum/static/7236.f3886d59.chunk.js.map +0 -1
  134. package/dist-scalprum/static/7791.ac1ac509.chunk.js +0 -2
  135. package/dist-scalprum/static/7791.ac1ac509.chunk.js.map +0 -1
  136. package/dist-scalprum/static/8172.cbe1f2c4.chunk.js +0 -2
  137. package/dist-scalprum/static/8172.cbe1f2c4.chunk.js.map +0 -1
  138. package/dist-scalprum/static/8799.939d14f9.chunk.js +0 -2
  139. package/dist-scalprum/static/8799.939d14f9.chunk.js.map +0 -1
  140. package/dist-scalprum/static/exposed-PluginRoot.ed95fa78.chunk.js +0 -2
  141. package/dist-scalprum/static/exposed-PluginRoot.ed95fa78.chunk.js.map +0 -1
  142. /package/dist/components/{ApiKeysPage → ApiKeyApprovalPage}/index.esm.js.map +0 -0
  143. /package/dist-scalprum/static/{5010.0cd6c959.chunk.js.LICENSE.txt → 5010.4ef96c87.chunk.js.LICENSE.txt} +0 -0
  144. /package/dist-scalprum/static/{6763.d6cd937f.chunk.js.LICENSE.txt → 8563.46f1a3e1.chunk.js.LICENSE.txt} +0 -0
  145. /package/dist-scalprum/static/{2946.a35243f1.chunk.js.LICENSE.txt → 9370.2e9fe34b.chunk.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/7236.f3886d59.chunk.js","mappings":"yIAEIA,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,OAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OAAQ,CACnFC,EAAG,wCACD,OAEJL,EAAQ,EAAUE,C,wECjBH,SAASI,EAASC,EAAIC,QACpB,IAATA,IAAmBA,EAAO,IAC9B,IAAIC,ECDO,SAAoBF,EAAIC,EAAME,QAC5B,IAATF,IAAmBA,EAAO,SACT,IAAjBE,IAA2BA,EAAe,CAAEC,SAAS,IACzD,IAAIC,GAAa,IAAAC,QAAO,GACpBC,GAAY,EAAAC,E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KAAI,MAAO,CAAEwC,UAAWD,EAAQ4G,UAAWnI,SAAUmI,IAClFvG,KAJO,KAsBLN,SACA8I,MAAO,IAAKd,GACZM,uBACAC,8BACGN,IAGPI,IAAmC,IAAA3K,KAAIoJ,EAAqB,CAAEpI,SAAU2J,IACxET,IAA2B,IAAAlK,KAAIgH,EAAA,EAAS,CAAC,IACzB,IAAAhH,KACdwL,EAAA,EACA,CACEhJ,UAAW,IAAWkI,EAAe,CACnC,CAACnI,EAAQiG,WAAYA,EACrB,CAACjG,EAAQmG,oBAAsC,WAAjB2B,IAEhCe,MAAOL,EACP/J,aAGJyJ,IAA2B,IAAAzK,KAAIsJ,EAAA,EAAa,CAAE9G,UAAWgI,EAAkBxJ,SAAUyJ,IACrFN,IAA4B,IAAAnK,KAAI6G,EAAY,IAAKsD,QAErD,C","sources":["webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/Add.js","webpack://internal.plugin-kuadrant/../../node_modules/react-use/esm/useAsync.js","webpack://internal.plugin-kuadrant/../../node_modules/react-use/esm/useAsyncFn.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/Delete.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/plugin-api-docs/node_modules/@backstage/core-components/dist/components/Progress/Progress.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/plugin-api-docs/dist/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.esm.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/ArrowBack.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/node_modules/clsx/dist/clsx.m.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/esm/internal/svg-icons/SuccessOutlined.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/esm/internal/svg-icons/ReportProblemOutlined.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/esm/internal/svg-icons/ErrorOutline.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/esm/internal/svg-icons/InfoOutlined.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/esm/internal/svg-icons/Close.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/lab/esm/Alert/Alert.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/InfoOutlined.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/layout/BottomLink/BottomLink.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/components/LinkButton/LinkButton.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/layout/ErrorBoundary/ErrorBoundary.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/layout/InfoCard/InfoCard.esm.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","import { useEffect } from 'react';\nimport useAsyncFn from './useAsyncFn';\nexport default function useAsync(fn, deps) {\n if (deps === void 0) { deps = []; }\n var _a = useAsyncFn(fn, deps, {\n loading: true,\n }), state = _a[0], callback = _a[1];\n useEffect(function () {\n callback();\n }, [callback]);\n return state;\n}\n","import { __assign } from \"tslib\";\nimport { useCallback, useRef, useState } from 'react';\nimport useMountedState from './useMountedState';\nexport default function useAsyncFn(fn, deps, initialState) {\n if (deps === void 0) { deps = []; }\n if (initialState === void 0) { initialState = { loading: false }; }\n var lastCallId = useRef(0);\n var isMounted = useMountedState();\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var callback = useCallback(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var callId = ++lastCallId.current;\n if (!state.loading) {\n set(function (prevState) { return (__assign(__assign({}, prevState), { loading: true })); });\n }\n return fn.apply(void 0, args).then(function (value) {\n isMounted() && callId === lastCallId.current && set({ value: value, loading: false });\n return value;\n }, function (error) {\n isMounted() && callId === lastCallId.current && set({ error: error, loading: false });\n return error;\n });\n }, deps);\n return [state, callback];\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\n\nexports.default = _default;","import { jsx } from 'react/jsx-runtime';\nimport Box from '@material-ui/core/Box';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport { useTheme } from '@material-ui/core/styles';\nimport { useState, useEffect } from 'react';\n\nfunction Progress(props) {\n const theme = useTheme();\n const [isVisible, setIsVisible] = useState(false);\n useEffect(() => {\n const handle = setTimeout(\n () => setIsVisible(true),\n theme.transitions.duration.short\n );\n return () => clearTimeout(handle);\n }, [theme.transitions.duration.short]);\n return isVisible ? /* @__PURE__ */ jsx(LinearProgress, { ...props, \"data-testid\": \"progress\" }) : /* @__PURE__ */ jsx(Box, { display: \"none\", \"data-testid\": \"progress\" });\n}\n\nexport { Progress };\n//# sourceMappingURL=Progress.esm.js.map\n","import { jsx } from 'react/jsx-runtime';\nimport { Progress } from '@backstage/core-components';\nimport { lazy, Suspense } from 'react';\n\nconst LazyOpenApiDefinition = lazy(\n () => import('./OpenApiDefinition.esm.js').then((m) => ({\n default: m.OpenApiDefinition\n }))\n);\nconst OpenApiDefinitionWidget = (props) => {\n const validSubmitMethods = props.supportedSubmitMethods?.map(\n (method) => method.toLocaleLowerCase()\n );\n return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Progress, {}), children: /* @__PURE__ */ jsx(\n LazyOpenApiDefinition,\n {\n ...props,\n supportedSubmitMethods: validSubmitMethods\n }\n ) });\n};\n\nexport { OpenApiDefinitionWidget };\n//# sourceMappingURL=OpenApiDefinitionWidget.esm.js.map\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n}), 'ArrowBack');\n\nexports.default = _default;","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import * as React from 'react';\nimport { createSvgIcon } from '@material-ui/core/utils';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z\"\n}), 'SuccessOutlined');","import * as React from 'react';\nimport { createSvgIcon } from '@material-ui/core/utils';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z\"\n}), 'ReportProblemOutlined');","import * as React from 'react';\nimport { createSvgIcon } from '@material-ui/core/utils';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'ErrorOutline');","import * as React from 'react';\nimport { createSvgIcon } from '@material-ui/core/utils';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z\"\n}), 'InfoOutlined');","import * as React from 'react';\nimport { createSvgIcon } from '@material-ui/core/utils';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { withStyles, lighten, darken } from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport SuccessOutlinedIcon from '../internal/svg-icons/SuccessOutlined';\nimport ReportProblemOutlinedIcon from '../internal/svg-icons/ReportProblemOutlined';\nimport ErrorOutlineIcon from '../internal/svg-icons/ErrorOutline';\nimport InfoOutlinedIcon from '../internal/svg-icons/InfoOutlined';\nimport CloseIcon from '../internal/svg-icons/Close';\nimport IconButton from '@material-ui/core/IconButton';\nimport { capitalize } from '@material-ui/core/utils';\nexport var styles = function styles(theme) {\n var getColor = theme.palette.type === 'light' ? darken : lighten;\n var getBackgroundColor = theme.palette.type === 'light' ? lighten : darken;\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body2, {\n borderRadius: theme.shape.borderRadius,\n backgroundColor: 'transparent',\n display: 'flex',\n padding: '6px 16px'\n }),\n\n /* Styles applied to the root element if `variant=\"standard\"` and `color=\"success\"`. */\n standardSuccess: {\n color: getColor(theme.palette.success.main, 0.6),\n backgroundColor: getBackgroundColor(theme.palette.success.main, 0.9),\n '& $icon': {\n color: theme.palette.success.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"standard\"` and `color=\"info\"`. */\n standardInfo: {\n color: getColor(theme.palette.info.main, 0.6),\n backgroundColor: getBackgroundColor(theme.palette.info.main, 0.9),\n '& $icon': {\n color: theme.palette.info.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"standard\"` and `color=\"warning\"`. */\n standardWarning: {\n color: getColor(theme.palette.warning.main, 0.6),\n backgroundColor: getBackgroundColor(theme.palette.warning.main, 0.9),\n '& $icon': {\n color: theme.palette.warning.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"standard\"` and `color=\"error\"`. */\n standardError: {\n color: getColor(theme.palette.error.main, 0.6),\n backgroundColor: getBackgroundColor(theme.palette.error.main, 0.9),\n '& $icon': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"success\"`. */\n outlinedSuccess: {\n color: getColor(theme.palette.success.main, 0.6),\n border: \"1px solid \".concat(theme.palette.success.main),\n '& $icon': {\n color: theme.palette.success.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"info\"`. */\n outlinedInfo: {\n color: getColor(theme.palette.info.main, 0.6),\n border: \"1px solid \".concat(theme.palette.info.main),\n '& $icon': {\n color: theme.palette.info.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"warning\"`. */\n outlinedWarning: {\n color: getColor(theme.palette.warning.main, 0.6),\n border: \"1px solid \".concat(theme.palette.warning.main),\n '& $icon': {\n color: theme.palette.warning.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"error\"`. */\n outlinedError: {\n color: getColor(theme.palette.error.main, 0.6),\n border: \"1px solid \".concat(theme.palette.error.main),\n '& $icon': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the root element if `variant=\"filled\"` and `color=\"success\"`. */\n filledSuccess: {\n color: '#fff',\n fontWeight: theme.typography.fontWeightMedium,\n backgroundColor: theme.palette.success.main\n },\n\n /* Styles applied to the root element if `variant=\"filled\"` and `color=\"info\"`. */\n filledInfo: {\n color: '#fff',\n fontWeight: theme.typography.fontWeightMedium,\n backgroundColor: theme.palette.info.main\n },\n\n /* Styles applied to the root element if `variant=\"filled\"` and `color=\"warning\"`. */\n filledWarning: {\n color: '#fff',\n fontWeight: theme.typography.fontWeightMedium,\n backgroundColor: theme.palette.warning.main\n },\n\n /* Styles applied to the root element if `variant=\"filled\"` and `color=\"error\"`. */\n filledError: {\n color: '#fff',\n fontWeight: theme.typography.fontWeightMedium,\n backgroundColor: theme.palette.error.main\n },\n\n /* Styles applied to the icon wrapper element. */\n icon: {\n marginRight: 12,\n padding: '7px 0',\n display: 'flex',\n fontSize: 22,\n opacity: 0.9\n },\n\n /* Styles applied to the message wrapper element. */\n message: {\n padding: '8px 0'\n },\n\n /* Styles applied to the action wrapper element if `action` is provided. */\n action: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8\n }\n };\n};\nvar defaultIconMapping = {\n success: /*#__PURE__*/React.createElement(SuccessOutlinedIcon, {\n fontSize: \"inherit\"\n }),\n warning: /*#__PURE__*/React.createElement(ReportProblemOutlinedIcon, {\n fontSize: \"inherit\"\n }),\n error: /*#__PURE__*/React.createElement(ErrorOutlineIcon, {\n fontSize: \"inherit\"\n }),\n info: /*#__PURE__*/React.createElement(InfoOutlinedIcon, {\n fontSize: \"inherit\"\n })\n};\n\nvar _ref = /*#__PURE__*/React.createElement(CloseIcon, {\n fontSize: \"small\"\n});\n\nvar Alert = /*#__PURE__*/React.forwardRef(function Alert(props, ref) {\n var action = props.action,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$closeText = props.closeText,\n closeText = _props$closeText === void 0 ? 'Close' : _props$closeText,\n color = props.color,\n icon = props.icon,\n _props$iconMapping = props.iconMapping,\n iconMapping = _props$iconMapping === void 0 ? defaultIconMapping : _props$iconMapping,\n onClose = props.onClose,\n _props$role = props.role,\n role = _props$role === void 0 ? 'alert' : _props$role,\n _props$severity = props.severity,\n severity = _props$severity === void 0 ? 'success' : _props$severity,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"action\", \"children\", \"classes\", \"className\", \"closeText\", \"color\", \"icon\", \"iconMapping\", \"onClose\", \"role\", \"severity\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n role: role,\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[\"\".concat(variant).concat(capitalize(color || severity))], className),\n ref: ref\n }, other), icon !== false ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.icon\n }, icon || iconMapping[severity] || defaultIconMapping[severity]) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.message\n }, children), action != null ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.action\n }, action) : null, action == null && onClose ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.action\n }, /*#__PURE__*/React.createElement(IconButton, {\n size: \"small\",\n \"aria-label\": closeText,\n title: closeText,\n color: \"inherit\",\n onClick: onClose\n }, _ref)) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? Alert.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the alert.\n */\n action: PropTypes.node,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Override the default label for the *close popup* icon button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n closeText: PropTypes.string,\n\n /**\n * The main color for the alert. Unless provided, the value is taken from the `severity` prop.\n */\n color: PropTypes.oneOf(['error', 'info', 'success', 'warning']),\n\n /**\n * Override the icon displayed before the children.\n * Unless provided, the icon is mapped to the value of the `severity` prop.\n */\n icon: PropTypes.node,\n\n /**\n * The component maps the `severity` prop to a range of different icons,\n * for instance success to `<SuccessOutlined>`.\n * If you wish to change this mapping, you can provide your own.\n * Alternatively, you can use the `icon` prop to override the icon displayed.\n */\n iconMapping: PropTypes.shape({\n error: PropTypes.node,\n info: PropTypes.node,\n success: PropTypes.node,\n warning: PropTypes.node\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n * When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * The ARIA role attribute of the element.\n */\n role: PropTypes.string,\n\n /**\n * The severity of the alert. This defines the color and icon used.\n */\n severity: PropTypes.oneOf(['error', 'info', 'success', 'warning']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAlert'\n})(Alert);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\"\n}), 'InfoOutlined');\n\nexports.default = _default;","import { jsxs, jsx } from 'react/jsx-runtime';\nimport Box from '@material-ui/core/Box';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport { Link } from '../../components/Link/Link.esm.js';\n\nconst useStyles = makeStyles(\n (theme) => ({\n root: {\n maxWidth: \"fit-content\",\n padding: theme.spacing(2, 2, 2, 2.5)\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle\n },\n arrow: {\n color: theme.palette.textSubtle\n }\n }),\n { name: \"BackstageBottomLink\" }\n);\nfunction BottomLink(props) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n return /* @__PURE__ */ jsxs(Box, { children: [\n /* @__PURE__ */ jsx(Divider, {}),\n /* @__PURE__ */ jsx(Link, { to: link, onClick, underline: \"none\", children: /* @__PURE__ */ jsxs(Box, { display: \"flex\", alignItems: \"center\", className: classes.root, children: [\n /* @__PURE__ */ jsx(Box, { className: classes.boxTitle, fontWeight: \"fontWeightBold\", m: 1, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(\"strong\", { children: title }) }) }),\n /* @__PURE__ */ jsx(ArrowIcon, { className: classes.arrow })\n ] }) })\n ] });\n}\n\nexport { BottomLink };\n//# sourceMappingURL=BottomLink.esm.js.map\n","import { jsx } from 'react/jsx-runtime';\nimport Button$1 from '@material-ui/core/Button';\nimport { forwardRef } from 'react';\nimport { Link } from '../Link/Link.esm.js';\n\nconst LinkWrapper = forwardRef((props, ref) => /* @__PURE__ */ jsx(Link, { ref, ...props, color: \"initial\" }));\nconst LinkButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(Button$1, { ref, component: LinkWrapper, ...props }));\nconst Button = LinkButton;\n\nexport { Button, LinkButton };\n//# sourceMappingURL=LinkButton.esm.js.map\n","import { jsx } from 'react/jsx-runtime';\nimport Typography from '@material-ui/core/Typography';\nimport { Component } from 'react';\nimport { LinkButton } from '../../components/LinkButton/LinkButton.esm.js';\nimport { ErrorPanel } from '../../components/ErrorPanel/ErrorPanel.esm.js';\nimport { coreComponentsTranslationRef } from '../../translation.esm.js';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nconst SlackLink = (props) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === \"string\") {\n return /* @__PURE__ */ jsx(Typography, { children: t(\"errorBoundary.title\", { slackChannel }) });\n } else if (!slackChannel.href) {\n return /* @__PURE__ */ jsx(Typography, { children: t(\"errorBoundary.title\", {\n slackChannel: slackChannel.name\n }) });\n }\n return /* @__PURE__ */ jsx(LinkButton, { to: slackChannel.href, variant: \"contained\", children: slackChannel.name });\n};\nconst ErrorBoundary = class ErrorBoundary2 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n error: void 0,\n errorInfo: void 0\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n if (!error) {\n return children;\n }\n return /* @__PURE__ */ jsx(ErrorPanel, { title: \"Something Went Wrong\", error, children: /* @__PURE__ */ jsx(SlackLink, { slackChannel }) });\n }\n};\n\nexport { ErrorBoundary };\n//# sourceMappingURL=ErrorBoundary.esm.js.map\n","import { jsx, jsxs } from 'react/jsx-runtime';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { BottomLink } from '../BottomLink/BottomLink.esm.js';\nimport { ErrorBoundary } from '../ErrorBoundary/ErrorBoundary.esm.js';\n\nconst useStyles = makeStyles(\n (theme) => ({\n noPadding: {\n padding: 0,\n \"&:last-child\": {\n paddingBottom: 0\n }\n },\n contentAlignBottom: {\n display: \"flex\",\n alignItems: \"self-end\"\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5)\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold\n },\n headerSubheader: {\n paddingTop: theme.spacing(1)\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: \"flex\"\n }\n }),\n { name: \"BackstageInfoCard\" }\n);\nconst CardActionsTopRight = withStyles(\n (theme) => ({\n root: {\n display: \"inline-block\",\n padding: theme.spacing(8, 8, 0, 0),\n float: \"right\"\n }\n }),\n { name: \"BackstageInfoCardCardActionsTopRight\" }\n)(CardActions);\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: \"flex\",\n flexDirection: \"column\"\n },\n fullHeight: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\"\n },\n gridItem: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100% - 10px)\",\n // for pages without content header\n marginBottom: \"10px\",\n breakInside: \"avoid-page\",\n \"@media print\": {\n height: \"auto\"\n }\n }\n },\n cardContent: {\n fullHeight: {\n flex: 1\n },\n gridItem: {\n flex: 1\n }\n }\n};\nfunction InfoCard(props) {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = \"normal\",\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps\n } = props;\n const classes = useStyles();\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach((name) => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name]\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[name]\n };\n });\n }\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n return /* @__PURE__ */ jsxs(\"div\", { \"data-testid\": \"info-card-subheader\", children: [\n subheader && /* @__PURE__ */ jsx(\"div\", { className: classes.subheader, children: subheader }),\n icon\n ] });\n };\n const errProps = errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n return /* @__PURE__ */ jsx(Card, { style: calculatedStyle, className, children: /* @__PURE__ */ jsxs(ErrorBoundary, { ...errProps, children: [\n title && /* @__PURE__ */ jsx(\n CardHeader,\n {\n classes: {\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent\n },\n title,\n subheader: cardSubTitle(),\n action,\n style: { ...headerStyle },\n titleTypographyProps,\n subheaderTypographyProps,\n ...headerProps\n }\n ),\n actionsTopRight && /* @__PURE__ */ jsx(CardActionsTopRight, { children: actionsTopRight }),\n divider && /* @__PURE__ */ jsx(Divider, {}),\n /* @__PURE__ */ jsx(\n CardContent,\n {\n className: classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === \"bottom\"\n }),\n style: calculatedCardStyle,\n children\n }\n ),\n actions && /* @__PURE__ */ jsx(CardActions, { className: actionsClassName, children: actions }),\n deepLink && /* @__PURE__ */ jsx(BottomLink, { ...deepLink })\n ] }) });\n}\n\nexport { InfoCard };\n//# sourceMappingURL=InfoCard.esm.js.map\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_default","default","createElement","d","useAsync","fn","deps","_a","initialState","loading","lastCallId","useRef","isMounted","useMountedState","useState","state","set","callback","useCallback","args","_i","arguments","length","callId","current","prevState","__assign","apply","then","value","error","useAsyncFn","useEffect","Progress","props","theme","useTheme","isVisible","setIsVisible","handle","setTimeout","transitions","duration","short","clearTimeout","jsx","LinearProgress","Box","display","LazyOpenApiDefinition","lazy","m","OpenApiDefinition","OpenApiDefinitionWidget","validSubmitMethods","supportedSubmitMethods","map","method","toLocaleLowerCase","Suspense","fallback","children","r","e","t","f","n","Array","isArray","createSvgIcon","defaultIconMapping","success","SuccessOutlined","fontSize","warning","ReportProblemOutlined","ErrorOutline","info","InfoOutlined","_ref","Close","Alert","ref","action","classes","className","_props$closeText","closeText","color","icon","_props$iconMapping","iconMapping","onClose","_props$role","role","_props$severity","severity","_props$variant","variant","other","Paper","square","elevation","root","concat","capitalize","message","IconButton","size","title","onClick","withStyles","getColor","palette","type","darken","lighten","getBackgroundColor","typography","body2","borderRadius","shape","backgroundColor","padding","standardSuccess","main","standardInfo","standardWarning","standardError","outlinedSuccess","border","outlinedInfo","outlinedWarning","outlinedError","filledSuccess","fontWeight","fontWeightMedium","filledInfo","filledWarning","filledError","marginRight","opacity","alignItems","marginLeft","paddingLeft","name","useStyles","makeStyles","maxWidth","spacing","boxTitle","margin","textSubtle","arrow","BottomLink","link","jsxs","Divider","to","underline","Typography","A","LinkWrapper","forwardRef","LinkButton","Button","component","SlackLink","slackChannel","useTranslationRef","href","ErrorBoundary","Component","constructor","super","this","errorInfo","componentDidCatch","console","setState","render","noPadding","paddingBottom","contentAlignBottom","header","headerTitle","fontWeightBold","headerSubheader","paddingTop","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","height","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","alignContent","headerStyle","headerProps","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","errProps","Card","style","CardHeader","avatar","content","CardContent"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunkinternal_plugin_kuadrant=self.webpackChunkinternal_plugin_kuadrant||[]).push([[7791],{57791:(e,s,i)=>{i.r(s),i.d(s,{ApiProductDetailPage:()=>Y});var t=i(31085),n=i(95478),a=i(49634),l=i(22097),o=i(35015),r=i(86687),c=i(42367),d=i(289),u=i(15831),p=i(37725),h=i(46681),m=i(94641),A=i(96040),x=i(41241),j=i(58837),v=i(10394),y=i(64947),f=i(71677),P=i(29365),b=i(72501),g=i(31653),w=i(38605),k=i(42899),I=i(67720),S=i(61009),N=i(47625),C=i(9719),$=i(54801),T=i(13677),E=i(55735),z=i(75625),D=i(39590),_=i(26997),B=i(63221),U=i(89509),O=i(71255),R=i(46205),F=i(34955),L=i(77318);const H=(0,j.A)(e=>({label:{fontWeight:600,color:e.palette.text.secondary,marginBottom:e.spacing(.5),fontSize:"0.75rem",textTransform:"uppercase"},actionButtons:{display:"flex",gap:e.spacing(1),alignItems:"center"},cardHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:e.spacing(2)},cardActions:{display:"flex",gap:e.spacing(1),alignItems:"center"}})),Y=()=>{var e,s,i,j,Y,J,K,V,W,q,G,M,Q,X,Z,ee,se,ie,te,ne,ae,le,oe,re;const ce=H(),{namespace:de,name:ue}=(0,a.useParams)(),pe=(0,a.useNavigate)(),he=(0,l.useApi)(l.configApiRef),me=(0,l.useApi)(l.fetchApiRef),Ae=(0,l.useApi)(l.alertApiRef),xe=he.getString("backend.baseUrl"),[je,ve]=(0,n.useState)(0),[ye,fe]=(0,n.useState)(!1),[Pe,be]=(0,n.useState)(!1),[ge,we]=(0,n.useState)(!1),[ke,Ie]=(0,n.useState)(0),{allowed:Se}=(0,R.l)(F.v_),{allowed:Ne}=(0,R.l)(F.R_),Ce=Se,{value:$e,loading:Te,error:Ee}=(0,o.A)(async()=>{const e=await me.fetch(`${xe}/api/kuadrant/apiproducts/${de}/${ue}`);if(!e.ok){const s=await(0,L.T)(e);throw new Error(`Failed to fetch API product. ${s}`)}return e.json()},[de,ue,xe,me,ke]),ze=async()=>{var e;if(!$e)return;const s="Published"===(null===(e=$e.spec)||void 0===e?void 0:e.publishStatus)?"Draft":"Published";try{const e=await me.fetch(`${xe}/api/kuadrant/apiproducts/${de}/${ue}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({spec:{publishStatus:s}})});if(!e.ok){const s=await(0,L.T)(e);throw new Error(s)}Ae.post({message:`API Product ${"Published"===s?"published":"unpublished"} successfully`,severity:"success",display:"transient"}),Ie(e=>e+1)}catch(e){const s=e instanceof Error?e.message:"unknown error occurred";Ae.post({message:`Failed to update publish status. ${s}`,severity:"error",display:"transient"})}};if(Te)return(0,t.jsx)(r.k,{});if(Ee||!$e)return(0,t.jsx)(c._,{error:Ee||new Error("API product not found")});const De="Published"===(null===(e=$e.spec)||void 0===e?void 0:e.publishStatus),_e=null===(i=$e.status)||void 0===i||null===(s=i.conditions)||void 0===s?void 0:s.find(e=>"PlanPolicyDiscovered"===e.type),Be=null===(Y=$e.status)||void 0===Y||null===(j=Y.conditions)||void 0===j?void 0:j.find(e=>"AuthPolicyDiscovered"===e.type),Ue=(null===(J=$e.status)||void 0===J?void 0:J.discoveredPlans)||[],Oe=(null===(V=$e.status)||void 0===V||null===(K=V.discoveredAuthScheme)||void 0===K?void 0:K.authentication)||{},Re=Object.values(Oe),Fe=Re.some(e=>e.hasOwnProperty("jwt")),Le=Re.find(e=>e.hasOwnProperty("jwt")),He=(null==Le||null===(W=Le.jwt)||void 0===W?void 0:W.issuerUrl)||"unknown",Ye=(null===(G=$e.status)||void 0===G||null===(q=G.oidcDiscovery)||void 0===q?void 0:q.tokenEndpoint)||"unknown",Je=!(!(null===(Q=$e.status)||void 0===Q||null===(M=Q.openapi)||void 0===M?void 0:M.raw)&&!(null===(Z=$e.spec)||void 0===Z||null===(X=Z.documentation)||void 0===X?void 0:X.openAPISpecURL)),Ke=!!(_e||Be||Ue.length>0);let Ve=1;const We=Je?Ve++:-1,qe=Ke?Ve++:-1,Ge=Fe?Ve++:-1,Me=e=>{if(!e)return"No limits";const s=[];return e.daily&&s.push(`${e.daily}/day`),e.weekly&&s.push(`${e.weekly}/week`),e.monthly&&s.push(`${e.monthly}/month`),e.yearly&&s.push(`${e.yearly}/year`),s.length>0?s.join(", "):"No limits"};return(0,t.jsxs)(d.Y,{themeId:"tool",children:[(0,t.jsx)(u.Y,{title:(null===(ee=$e.spec)||void 0===ee?void 0:ee.displayName)||$e.metadata.name,subtitle:(null===(se=$e.spec)||void 0===se?void 0:se.description)||"",children:(0,t.jsxs)(v.A,{className:ce.actionButtons,children:[(0,t.jsx)(p.N_,{to:"/kuadrant/api-products",children:(0,t.jsx)(y.A,{startIcon:(0,t.jsx)(E.A,{}),children:"Back"})}),Ce&&(0,t.jsx)(y.A,{variant:"outlined",color:De?"default":"primary",onClick:ze,children:De?"Unpublish API product":"Publish API product"}),Se&&(0,t.jsx)(f.Ay,{title:"Edit",children:(0,t.jsx)(P.A,{onClick:()=>fe(!0),size:"small",children:(0,t.jsx)(z.A,{})})}),Ne&&(0,t.jsx)(f.Ay,{title:"Delete",children:(0,t.jsx)(P.A,{onClick:()=>be(!0),size:"small",children:(0,t.jsx)(D.A,{})})})]})}),(0,t.jsxs)(h.U,{children:[(0,t.jsx)(v.A,{mb:2,children:(0,t.jsxs)(m.B,{"aria-label":"breadcrumb",children:[(0,t.jsx)(p.N_,{to:"/kuadrant/api-products",children:"API Products"}),(0,t.jsx)(b.A,{children:(null===(ie=$e.spec)||void 0===ie?void 0:ie.displayName)||$e.metadata.name})]})}),(0,t.jsx)(v.A,{mb:2,children:(0,t.jsxs)(g.A,{value:je,onChange:(e,s)=>ve(s),indicatorColor:"primary",textColor:"primary",children:[(0,t.jsx)(w.A,{label:"Overview"}),Je&&(0,t.jsx)(w.A,{label:"Definition"}),Ke&&(0,t.jsx)(w.A,{label:"Policies"}),Fe&&(0,t.jsx)(w.A,{label:"OIDC"})]})}),0===je&&(0,t.jsxs)(A.n,{title:"API Product",children:[(0,t.jsxs)(v.A,{className:ce.cardHeader,children:[(0,t.jsxs)(v.A,{children:[(0,t.jsx)(b.A,{variant:"caption",className:ce.label,children:"Product Name"}),(0,t.jsx)(b.A,{variant:"h6",children:(null===(te=$e.spec)||void 0===te?void 0:te.displayName)||$e.metadata.name})]}),(0,t.jsxs)(v.A,{className:ce.cardActions,children:[Ce&&(0,t.jsx)(y.A,{variant:"outlined",color:De?"default":"primary",onClick:ze,size:"small",children:De?"Unpublish API product":"Publish API product"}),Se&&(0,t.jsx)(P.A,{onClick:()=>fe(!0),size:"small",children:(0,t.jsx)(z.A,{fontSize:"small"})}),Ne&&(0,t.jsx)(P.A,{onClick:()=>be(!0),size:"small",children:(0,t.jsx)(D.A,{fontSize:"small"})})]})]}),(0,t.jsx)(U.O,{product:$e,showStatus:!0,showCatalogLink:!0})]}),je===We&&Je&&(0,t.jsx)(A.n,{title:"API Definition",children:(null===(ae=$e.status)||void 0===ae||null===(ne=ae.openapi)||void 0===ne?void 0:ne.raw)?(0,t.jsx)(x.S,{definition:$e.status.openapi.raw}):(0,t.jsx)(b.A,{variant:"body2",color:"textSecondary",children:(null===(oe=$e.spec)||void 0===oe||null===(le=oe.documentation)||void 0===le?void 0:le.openAPISpecURL)?(0,t.jsxs)(t.Fragment,{children:["OpenAPI specification not yet synced. View at:"," ",(0,t.jsx)(p.N_,{to:$e.spec.documentation.openAPISpecURL,target:"_blank",children:$e.spec.documentation.openAPISpecURL})]}):"No OpenAPI specification available for this API product."})}),je===qe&&Ke&&(0,t.jsxs)(k.A,{container:!0,spacing:3,children:[(0,t.jsx)(k.A,{item:!0,xs:12,children:(0,t.jsx)(A.n,{title:"Discovered Policies",children:(0,t.jsxs)(k.A,{container:!0,spacing:2,children:[(0,t.jsxs)(k.A,{item:!0,xs:12,md:6,children:[(0,t.jsx)(b.A,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:"Plan Policy"}),_e?(0,t.jsxs)(v.A,{children:[(0,t.jsx)(I.A,{label:"True"===_e.status?"Found":"Not Found",size:"small",style:{backgroundColor:"True"===_e.status?"#4caf50":"#ff9800",color:"#fff",marginBottom:8}}),(0,t.jsx)(b.A,{variant:"body2",children:_e.message||"No details available"})]}):(0,t.jsx)(b.A,{variant:"body2",children:"No plan policy information"})]}),(0,t.jsxs)(k.A,{item:!0,xs:12,md:6,children:[(0,t.jsx)(b.A,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:"Auth Policy"}),Be?(0,t.jsxs)(v.A,{children:[(0,t.jsx)(I.A,{label:"True"===Be.status?"Found":"Not Found",size:"small",style:{backgroundColor:"True"===Be.status?"#4caf50":"#ff9800",color:"#fff",marginBottom:8}}),(0,t.jsx)(b.A,{variant:"body2",children:Be.message||"No details available"})]}):(0,t.jsx)(b.A,{variant:"body2",children:"No auth policy information"})]})]})})}),Ue.length>0&&(0,t.jsx)(k.A,{item:!0,xs:12,children:(0,t.jsxs)(A.n,{title:"Effective Plan Tiers",children:[(0,t.jsx)(b.A,{variant:"body2",color:"textSecondary",paragraph:!0,children:"These tiers are computed from all attached PlanPolicies (including gateway-level policies)."}),(0,t.jsxs)(S.A,{size:"small",children:[(0,t.jsx)(N.A,{children:(0,t.jsxs)(C.A,{children:[(0,t.jsx)($.A,{children:"Tier"}),(0,t.jsx)($.A,{children:"Rate Limits"})]})}),(0,t.jsx)(T.A,{children:Ue.map(e=>(0,t.jsxs)(C.A,{children:[(0,t.jsx)($.A,{children:(0,t.jsx)(I.A,{label:e.tier,size:"small",color:"primary"})}),(0,t.jsx)($.A,{children:Me(e.limits)})]},e.tier))})]})]})})]}),je===Ge&&Fe&&(0,t.jsx)(O.n,{issuerUrl:He,tokenEndpoint:Ye})]}),(0,t.jsx)(_.C,{open:ye,onClose:()=>fe(!1),onSuccess:()=>{fe(!1),Ie(e=>e+1),Ae.post({message:"API Product updated successfully",severity:"success",display:"transient"})},namespace:de||"",name:ue||""}),(0,t.jsx)(B.K,{open:Pe,title:"Delete API Product",description:`Are you sure you want to delete "${(null===(re=$e.spec)||void 0===re?void 0:re.displayName)||$e.metadata.name}"? This action cannot be undone.`,severity:"high",confirmText:$e.metadata.name,deleting:ge,onConfirm:async()=>{if($e){we(!0);try{const e=await me.fetch(`${xe}/api/kuadrant/apiproducts/${de}/${ue}`,{method:"DELETE"});if(!e.ok){const s=await(0,L.T)(e);throw new Error(s)}be(!1),Ae.post({message:"API Product deleted successfully",severity:"success",display:"transient"}),pe("/kuadrant/api-products")}catch(e){const s=e instanceof Error?e.message:"unknown error occurred";Ae.post({message:`Failed to delete API product. ${s}`,severity:"error",display:"transient"})}finally{we(!1)}}},onCancel:()=>be(!1)})]})}}}]);
2
- //# sourceMappingURL=7791.ac1ac509.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/7791.ac1ac509.chunk.js","mappings":"8lBAoDA,MAAMA,GAAYC,EAAAA,EAAAA,GAAYC,IAAW,CACvCC,MAAO,CACLC,WAAY,IACZC,MAAOH,EAAMI,QAAQC,KAAKC,UAC1BC,aAAcP,EAAMQ,QAAQ,IAC5BC,SAAU,UACVC,cAAe,aAEjBC,cAAe,CACbC,QAAS,OACTC,IAAKb,EAAMQ,QAAQ,GACnBM,WAAY,UAEdC,WAAY,CACVH,QAAS,OACTI,eAAgB,gBAChBF,WAAY,aACZP,aAAcP,EAAMQ,QAAQ,IAE9BS,YAAa,CACXL,QAAS,OACTC,IAAKb,EAAMQ,QAAQ,GACnBM,WAAY,aAIHI,EAAuB,K,IAuHdC,EAGQA,EAAAA,EAGAA,EAAAA,EAGJA,EAEJA,EAAAA,EAOF,EACOA,EAAAA,EAGGA,EAAAA,EAAgCA,EAAAA,EAqB/CA,GACGA,GAmCOA,GA0BNA,GAqCNA,GAAAA,GAIIA,GAAAA,GAuHwCA,GA/XvD,MAAMC,GAAUtB,KACV,UAAEuB,GAAS,KAAEC,KAASC,EAAAA,EAAAA,aACtBC,IAAWC,EAAAA,EAAAA,eACXC,IAASC,EAAAA,EAAAA,QAAOC,EAAAA,cAChBC,IAAWF,EAAAA,EAAAA,QAAOG,EAAAA,aAClBC,IAAWJ,EAAAA,EAAAA,QAAOK,EAAAA,aAClBC,GAAaP,GAAOQ,UAAU,oBAE7BC,GAAaC,KAAkBC,EAAAA,EAAAA,UAAS,IACxCC,GAAgBC,KAAqBF,EAAAA,EAAAA,WAAS,IAC9CG,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C,EAAAA,EAAAA,GAAiBJ,GACnC,MAAM,IAAIK,MAAMF,EAClB,CACApB,IAAoB,GACpBV,GAAS2C,KAAK,CACZC,QAAS,mCACTC,SAAU,UACVhE,QAAS,cAEXY,GAAS,yBACX,CAAE,MAAOqC,GACP,MAAMiB,EAAejB,aAAeE,MAAQF,EAAIc,QAAU,yBAC1D5C,GAAS2C,KAAK,CACZC,QAAS,iCAAiCG,IAC1CF,SAAU,QACVhE,QAAS,aAEb,CAAE,QACA+B,IAAY,EACd,CA3BoB,GAsThBuJ,SAAU,IAAMzJ,IAAoB,Q","sources":["webpack://internal.plugin-kuadrant/./src/components/ApiProductDetailPage/ApiProductDetailPage.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { useParams, useNavigate } from \"react-router-dom\";\nimport {\n useApi,\n configApiRef,\n fetchApiRef,\n alertApiRef,\n} from \"@backstage/core-plugin-api\";\nimport { useAsync } from \"react-use\";\nimport {\n Header,\n Page,\n Content,\n Progress,\n ResponseErrorPanel,\n InfoCard,\n Link,\n Breadcrumbs,\n} from \"@backstage/core-components\";\nimport { OpenApiDefinitionWidget } from \"@backstage/plugin-api-docs\";\nimport {\n Box,\n Typography,\n IconButton,\n Tooltip,\n Tabs,\n Tab,\n Button,\n makeStyles,\n Grid,\n Chip,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableRow,\n} from \"@material-ui/core\";\nimport ArrowBackIcon from \"@material-ui/icons/ArrowBack\";\nimport EditIcon from \"@material-ui/icons/Edit\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport { APIProduct } from \"../../types/api-management\";\nimport { EditAPIProductDialog } from \"../EditAPIProductDialog\";\nimport { ConfirmDeleteDialog } from \"../ConfirmDeleteDialog\";\nimport { ApiProductDetails } from \"../ApiProductDetails\";\nimport { OidcProviderCard } from \"../OidcProviderCard\";\nimport { useKuadrantPermission } from \"../../utils/permissions\";\nimport {\n kuadrantApiProductUpdateAllPermission,\n kuadrantApiProductDeleteAllPermission,\n} from \"../../permissions\";\nimport {handleFetchError} from \"../../utils/errors.ts\";\n\nconst useStyles = makeStyles((theme) => ({\n label: {\n fontWeight: 600,\n color: theme.palette.text.secondary,\n marginBottom: theme.spacing(0.5),\n fontSize: '0.75rem',\n textTransform: 'uppercase',\n },\n actionButtons: {\n display: \"flex\",\n gap: theme.spacing(1),\n alignItems: \"center\",\n },\n cardHeader: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n marginBottom: theme.spacing(2),\n },\n cardActions: {\n display: 'flex',\n gap: theme.spacing(1),\n alignItems: 'center',\n },\n}));\n\nexport const ApiProductDetailPage = () => {\n const classes = useStyles();\n const { namespace, name } = useParams<{ namespace: string; name: string }>();\n const navigate = useNavigate();\n const config = useApi(configApiRef);\n const fetchApi = useApi(fetchApiRef);\n const alertApi = useApi(alertApiRef);\n const backendUrl = config.getString(\"backend.baseUrl\");\n\n const [selectedTab, setSelectedTab] = useState(0);\n const [editDialogOpen, setEditDialogOpen] = useState(false);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const [deleting, setDeleting] = useState(false);\n const [refreshKey, setRefreshKey] = useState(0);\n\n const { allowed: canUpdateApiProduct } = useKuadrantPermission(kuadrantApiProductUpdateAllPermission);\n const { allowed: canDeleteApiProduct } = useKuadrantPermission(kuadrantApiProductDeleteAllPermission);\n const canPublishApiProduct = canUpdateApiProduct;\n\n const {\n value: product,\n loading,\n error,\n } = useAsync(async () => {\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/apiproducts/${namespace}/${name}`\n );\n\n if (!response.ok) {\n const err = await handleFetchError(response);\n throw new Error(`Failed to fetch API product. ${err}`);\n }\n\n return response.json() as Promise<APIProduct>;\n }, [namespace, name, backendUrl, fetchApi, refreshKey]);\n\n const handlePublishToggle = async () => {\n if (!product) return;\n const newStatus = product.spec?.publishStatus === \"Published\" ? \"Draft\" : \"Published\";\n try {\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/apiproducts/${namespace}/${name}`,\n {\n method: \"PATCH\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ spec: { publishStatus: newStatus } }),\n }\n );\n if (!response.ok) {\n const err = await handleFetchError(response);\n throw new Error(err);\n }\n alertApi.post({\n message: `API Product ${newStatus === \"Published\" ? \"published\" : \"unpublished\"} successfully`,\n severity: \"success\",\n display: \"transient\",\n });\n setRefreshKey((k) => k + 1);\n } catch (err) {\n const errorMessage = err instanceof Error ? err.message : \"unknown error occurred\";\n alertApi.post({\n message: `Failed to update publish status. ${errorMessage}`,\n severity: \"error\",\n display: \"transient\",\n });\n }\n };\n\n const handleEditSuccess = () => {\n setEditDialogOpen(false);\n setRefreshKey((k) => k + 1);\n alertApi.post({\n message: \"API Product updated successfully\",\n severity: \"success\",\n display: \"transient\",\n });\n };\n\n const handleDelete = async () => {\n if (!product) return;\n setDeleting(true);\n try {\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/apiproducts/${namespace}/${name}`,\n { method: \"DELETE\" }\n );\n if (!response.ok) {\n const err = await handleFetchError(response);\n throw new Error(err);\n }\n setDeleteDialogOpen(false);\n alertApi.post({\n message: \"API Product deleted successfully\",\n severity: \"success\",\n display: \"transient\",\n });\n navigate(\"/kuadrant/api-products\");\n } catch (err) {\n const errorMessage = err instanceof Error ? err.message : \"unknown error occurred\";\n alertApi.post({\n message: `Failed to delete API product. ${errorMessage}`,\n severity: \"error\",\n display: \"transient\",\n });\n } finally {\n setDeleting(false);\n }\n };\n\n if (loading) {\n return <Progress />;\n }\n\n if (error || !product) {\n return (\n <ResponseErrorPanel error={error || new Error(\"API product not found\")} />\n );\n }\n\n const isPublished = product.spec?.publishStatus === \"Published\";\n\n // get policy conditions from status\n const planPolicyCondition = product.status?.conditions?.find(\n (c) => c.type === \"PlanPolicyDiscovered\"\n );\n const authPolicyCondition = product.status?.conditions?.find(\n (c) => c.type === \"AuthPolicyDiscovered\"\n );\n const discoveredPlans = product.status?.discoveredPlans || [];\n\n const authSchemes = product.status?.discoveredAuthScheme?.authentication || {};\n const schemeObjects = Object.values(authSchemes);\n const hasOIDCTab = schemeObjects.some((scheme: any) =>\n scheme.hasOwnProperty(\"jwt\"),\n );\n // Extract JWT issuer from the first JWT scheme\n const jwtScheme = schemeObjects.find((scheme: any) => scheme.hasOwnProperty(\"jwt\"));\n const jwtIssuer = (jwtScheme as any)?.jwt?.issuerUrl || \"unknown\";\n const jwtTokenEndpoint = product.status?.oidcDiscovery?.tokenEndpoint || \"unknown\";\n\n // compute tab indices\n const hasDefinitionTab = !!(product.status?.openapi?.raw || product.spec?.documentation?.openAPISpecURL);\n const hasPoliciesTab = !!(planPolicyCondition || authPolicyCondition || discoveredPlans.length > 0);\n\n let nextIndex = 1; // Overview is always at index 0\n const definitionTabIndex = hasDefinitionTab ? nextIndex++ : -1;\n const policiesTabIndex = hasPoliciesTab ? nextIndex++ : -1;\n const oidcTabIndex = hasOIDCTab ? nextIndex++ : -1;\n\n const formatLimits = (limits: any): string => {\n if (!limits) return \"No limits\";\n const parts: string[] = [];\n if (limits.daily) parts.push(`${limits.daily}/day`);\n if (limits.weekly) parts.push(`${limits.weekly}/week`);\n if (limits.monthly) parts.push(`${limits.monthly}/month`);\n if (limits.yearly) parts.push(`${limits.yearly}/year`);\n return parts.length > 0 ? parts.join(\", \") : \"No limits\";\n };\n\n return (\n <Page themeId=\"tool\">\n <Header\n title={product.spec?.displayName || product.metadata.name}\n subtitle={product.spec?.description || \"\"}\n >\n <Box className={classes.actionButtons}>\n <Link to=\"/kuadrant/api-products\">\n <Button startIcon={<ArrowBackIcon />}>Back</Button>\n </Link>\n {canPublishApiProduct && (\n <Button\n variant=\"outlined\"\n color={isPublished ? \"default\" : \"primary\"}\n onClick={handlePublishToggle}\n >\n {isPublished ? \"Unpublish API product\" : \"Publish API product\"}\n </Button>\n )}\n {canUpdateApiProduct && (\n <Tooltip title=\"Edit\">\n <IconButton onClick={() => setEditDialogOpen(true)} size=\"small\">\n <EditIcon />\n </IconButton>\n </Tooltip>\n )}\n {canDeleteApiProduct && (\n <Tooltip title=\"Delete\">\n <IconButton onClick={() => setDeleteDialogOpen(true)} size=\"small\">\n <DeleteIcon />\n </IconButton>\n </Tooltip>\n )}\n </Box>\n </Header>\n <Content>\n <Box mb={2}>\n <Breadcrumbs aria-label=\"breadcrumb\">\n <Link to=\"/kuadrant/api-products\">API Products</Link>\n <Typography>{product.spec?.displayName || product.metadata.name}</Typography>\n </Breadcrumbs>\n </Box>\n\n <Box mb={2}>\n <Tabs\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n >\n <Tab label=\"Overview\" />\n {hasDefinitionTab && <Tab label=\"Definition\" />}\n {hasPoliciesTab && <Tab label=\"Policies\" />}\n {hasOIDCTab && <Tab label=\"OIDC\" />}\n </Tabs>\n </Box>\n\n {selectedTab === 0 && (\n <InfoCard title=\"API Product\">\n <Box className={classes.cardHeader}>\n <Box>\n <Typography variant=\"caption\" className={classes.label}>\n Product Name\n </Typography>\n <Typography variant=\"h6\">\n {product.spec?.displayName || product.metadata.name}\n </Typography>\n </Box>\n <Box className={classes.cardActions}>\n {canPublishApiProduct && (\n <Button\n variant=\"outlined\"\n color={isPublished ? \"default\" : \"primary\"}\n onClick={handlePublishToggle}\n size=\"small\"\n >\n {isPublished ? \"Unpublish API product\" : \"Publish API product\"}\n </Button>\n )}\n {canUpdateApiProduct && (\n <IconButton onClick={() => setEditDialogOpen(true)} size=\"small\">\n <EditIcon fontSize=\"small\" />\n </IconButton>\n )}\n {canDeleteApiProduct && (\n <IconButton onClick={() => setDeleteDialogOpen(true)} size=\"small\">\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n )}\n </Box>\n </Box>\n\n <ApiProductDetails\n product={product}\n showStatus={true}\n showCatalogLink={true}\n />\n </InfoCard>\n )}\n\n {selectedTab === definitionTabIndex && hasDefinitionTab && (\n <InfoCard title=\"API Definition\">\n {product.status?.openapi?.raw ? (\n <OpenApiDefinitionWidget definition={product.status.openapi.raw} />\n ) : (\n <Typography variant=\"body2\" color=\"textSecondary\">\n {product.spec?.documentation?.openAPISpecURL ? (\n <>\n OpenAPI specification not yet synced. View at:{\" \"}\n <Link to={product.spec.documentation.openAPISpecURL} target=\"_blank\">\n {product.spec.documentation.openAPISpecURL}\n </Link>\n </>\n ) : (\n \"No OpenAPI specification available for this API product.\"\n )}\n </Typography>\n )}\n </InfoCard>\n )}\n\n {selectedTab === policiesTabIndex && hasPoliciesTab && (\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <InfoCard title=\"Discovered Policies\">\n <Grid container spacing={2}>\n <Grid item xs={12} md={6}>\n <Typography variant=\"body2\" color=\"textSecondary\" gutterBottom>\n Plan Policy\n </Typography>\n {planPolicyCondition ? (\n <Box>\n <Chip\n label={planPolicyCondition.status === \"True\" ? \"Found\" : \"Not Found\"}\n size=\"small\"\n style={{\n backgroundColor: planPolicyCondition.status === \"True\" ? \"#4caf50\" : \"#ff9800\",\n color: \"#fff\",\n marginBottom: 8,\n }}\n />\n <Typography variant=\"body2\">\n {planPolicyCondition.message || \"No details available\"}\n </Typography>\n </Box>\n ) : (\n <Typography variant=\"body2\">No plan policy information</Typography>\n )}\n </Grid>\n <Grid item xs={12} md={6}>\n <Typography variant=\"body2\" color=\"textSecondary\" gutterBottom>\n Auth Policy\n </Typography>\n {authPolicyCondition ? (\n <Box>\n <Chip\n label={authPolicyCondition.status === \"True\" ? \"Found\" : \"Not Found\"}\n size=\"small\"\n style={{\n backgroundColor: authPolicyCondition.status === \"True\" ? \"#4caf50\" : \"#ff9800\",\n color: \"#fff\",\n marginBottom: 8,\n }}\n />\n <Typography variant=\"body2\">\n {authPolicyCondition.message || \"No details available\"}\n </Typography>\n </Box>\n ) : (\n <Typography variant=\"body2\">No auth policy information</Typography>\n )}\n </Grid>\n </Grid>\n </InfoCard>\n </Grid>\n\n {discoveredPlans.length > 0 && (\n <Grid item xs={12}>\n <InfoCard title=\"Effective Plan Tiers\">\n <Typography variant=\"body2\" color=\"textSecondary\" paragraph>\n These tiers are computed from all attached PlanPolicies (including gateway-level policies).\n </Typography>\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n <TableCell>Tier</TableCell>\n <TableCell>Rate Limits</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {discoveredPlans.map((plan) => (\n <TableRow key={plan.tier}>\n <TableCell>\n <Chip label={plan.tier} size=\"small\" color=\"primary\" />\n </TableCell>\n <TableCell>{formatLimits(plan.limits)}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </InfoCard>\n </Grid>\n )}\n </Grid>\n )}\n\n {selectedTab === oidcTabIndex && hasOIDCTab && (\n <OidcProviderCard\n issuerUrl={jwtIssuer}\n tokenEndpoint={jwtTokenEndpoint}\n />\n )}\n </Content>\n\n <EditAPIProductDialog\n open={editDialogOpen}\n onClose={() => setEditDialogOpen(false)}\n onSuccess={handleEditSuccess}\n namespace={namespace || \"\"}\n name={name || \"\"}\n />\n\n <ConfirmDeleteDialog\n open={deleteDialogOpen}\n title=\"Delete API Product\"\n description={`Are you sure you want to delete \"${product.spec?.displayName || product.metadata.name}\"? This action cannot be undone.`}\n severity=\"high\"\n confirmText={product.metadata.name}\n deleting={deleting}\n onConfirm={handleDelete}\n onCancel={() => setDeleteDialogOpen(false)}\n />\n </Page>\n );\n};\n"],"names":["useStyles","makeStyles","theme","label","fontWeight","color","palette","text","secondary","marginBottom","spacing","fontSize","textTransform","actionButtons","display","gap","alignItems","cardHeader","justifyContent","cardActions","ApiProductDetailPage","product","classes","namespace","name","useParams","navigate","useNavigate","config","useApi","configApiRef","fetchApi","fetchApiRef","alertApi","alertApiRef","backendUrl","getString","selectedTab","setSelectedTab","useState","editDialogOpen","setEditDialogOpen","deleteDialogOpen","setDeleteDialogOpen","deleting","setDeleting","refreshKey","setRefreshKey","allowed","canUpdateApiProduct","useKuadrantPermission","kuadrantApiProductUpdateAllPermission","canDeleteApiProduct","kuadrantApiProductDeleteAllPermission","canPublishApiProduct","value","loading","error","useAsync","async","response","fetch","ok","err","handleFetchError","Error","json","handlePublishToggle","newStatus","spec","publishStatus","method","headers","body","JSON","stringify","post","message","severity","k","errorMessage","Progress","ResponseErrorPanel","isPublished","planPolicyCondition","status","conditions","find","c","type","authPolicyCondition","discoveredPlans","authSchemes","discoveredAuthScheme","authentication","schemeObjects","Object","values","hasOIDCTab","some","scheme","hasOwnProperty","jwtScheme","jwtIssuer","jwt","issuerUrl","jwtTokenEndpoint","oidcDiscovery","tokenEndpoint","hasDefinitionTab","openapi","raw","documentation","openAPISpecURL","hasPoliciesTab","length","nextIndex","definitionTabIndex","policiesTabIndex","oidcTabIndex","formatLimits","limits","parts","daily","push","weekly","monthly","yearly","join","Page","themeId","Header","title","displayName","metadata","subtitle","description","Box","className","Link","to","Button","startIcon","ArrowBackIcon","variant","onClick","Tooltip","IconButton","size","EditIcon","DeleteIcon","Content","mb","Breadcrumbs","aria-label","Typography","Tabs","onChange","_","newValue","indicatorColor","textColor","Tab","InfoCard","ApiProductDetails","showStatus","showCatalogLink","OpenApiDefinitionWidget","definition","target","Grid","container","item","xs","md","gutterBottom","Chip","style","backgroundColor","paragraph","Table","TableHead","TableRow","TableCell","TableBody","map","plan","tier","OidcProviderCard","EditAPIProductDialog","open","onClose","onSuccess","ConfirmDeleteDialog","confirmText","onConfirm","onCancel"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunkinternal_plugin_kuadrant=self.webpackChunkinternal_plugin_kuadrant||[]).push([[8172],{18466:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.A=o},25467:(e,t,n)=>{n.d(t,{tN:()=>a}),n(31085),n(22097);var r=n(15427);function a(){const e=(0,r.useVersionedContext)("entity-context");if(!e)throw new Error("Entity context is not available");const t=e.atVersion(1);if(!t)throw new Error("EntityContext v1 not available");if(!t.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:t.entity}}(0,r.createVersionedContext)("entity-context")},26343:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(39850),a=n(24586),i=n(89575),o=n(95478),s=n(36274),l=n(7031),c=n(8109),d=o.forwardRef(function(e,t){var n,a=e.classes,l=e.className,d=e.component,h=void 0===d?"li":d,u=e.disableGutters,p=void 0!==u&&u,f=e.ListItemClasses,m=e.role,g=void 0===m?"menuitem":m,v=e.selected,x=e.tabIndex,y=(0,r.A)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==x?x:-1),o.createElement(c.A,(0,i.A)({button:!0,role:g,tabIndex:n,component:h,selected:v,disableGutters:p,classes:(0,i.A)({dense:a.dense},f),className:(0,s.A)(a.root,l,v&&a.selected,!p&&a.gutters),ref:t},y))});const h=(0,l.A)(function(e){return{root:(0,i.A)({},e.typography.body1,(0,a.A)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,i.A)({},e.typography.body2,{minHeight:"auto"})}},{name:"MuiMenuItem"})(d)},32269:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.A=o},35015:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(95478),a=n(85608),i=n(71581);function o(e,t){void 0===t&&(t=[]);var n=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={loading:!1});var o=(0,r.useRef)(0),s=(0,i.A)(),l=(0,r.useState)(n),c=l[0],d=l[1],h=(0,r.useCallback)(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=++o.current;return c.loading||d(function(e){return(0,a.__assign)((0,a.__assign)({},e),{loading:!0})}),e.apply(void 0,t).then(function(e){return s()&&r===o.current&&d({value:e,loading:!1}),e},function(e){return s()&&r===o.current&&d({error:e,loading:!1}),e})},t);return[c,h]}(e,t,{loading:!0}),o=n[0],s=n[1];return(0,r.useEffect)(function(){s()},[s]),o}},37725:(e,t,n)=>{n.d(t,{N_:()=>A});var r=n(31085),a=n(22097),i=n(49203),o=n(37976),s=n(72501),l=n(53373),c=n.n(l),d=n(45250),h=n(95478),u=n(49634),p=n(39330);const f=(0,o.makeStyles)(e=>({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"},externalLinkIcon:{verticalAlign:"bottom",marginLeft:e.spacing(.5)}}),{name:"Link"}),m=()=>{const e=(0,a.useApp)().getSystemIcon("externalLink")||p.A,t=f();return(0,r.jsx)(e,{className:t.externalLinkIcon})},g=e=>/^([a-z+.-]+):/.test(e),v=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,x=window.open;if(x&&!x.__backstage){const e=function(...e){const t=String(e[0]);if(v.test(t))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return x.apply(this,e)};e.__backstage=!0,window.open=e}const y=e=>e instanceof Array?e.map(y).join(" ").trim():"object"==typeof e&&e?y(e?.props?.children):["string","number"].includes(typeof e)?String(e):"",A=(0,h.forwardRef)(({onClick:e,noTrack:t,externalLinkIcon:n,...o},l)=>{const h=f(),p=(0,a.useAnalytics)(),x=function(){const[e]=(0,u.createRoutesFromChildren)((0,r.jsx)(u.Route,{index:!0,element:(0,r.jsx)("div",{})}));return!e.index}()?(e=>{let t=String(e);const n=(()=>{const e=(()=>{try{return(0,a.useApi)(a.configApiRef).getOptionalString("app.baseUrl")}catch{return}})()??"/",{pathname:t}=new URL(e,"http://sample.dev");return(0,d.trimEnd)(t,"/")})(),r=g(t),i=t.startsWith(n);return r||i||(t=n.concat(t)),t})(o.to):o.to,A=y(o.children)||x,b=g(x),k=b&&!!/^https?:/.exec(x);if(v.test(x))throw new Error("Link component rejected javascript: URL as a security precaution");const w=n=>{e?.(n),t||p.captureEvent("click",A,{attributes:{to:x}})};return b?(0,r.jsxs)(i.A,{...k?{target:"_blank",rel:"noopener"}:{},...o,...o["aria-label"]?{"aria-label":`${o["aria-label"]}, Opens in a new window`}:{},ref:l,href:x,onClick:w,className:c()(h.externalLink,o.className),children:[o.children,n&&(0,r.jsx)(m,{}),(0,r.jsx)(s.A,{component:"span",className:h.visuallyHidden,children:", Opens in a new window"})]}):(0,r.jsx)(i.A,{...o,ref:l,component:u.Link,to:x,onClick:w})})},39053:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.A=o},39330:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");t.A=o},52235:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");t.A=o},61524:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");t.A=o},77225:(e,t,n)=>{var r=n(4293),a=n(78920);t.A=void 0;var i=a(n(95478)),o=(0,r(n(74044)).default)(i.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");t.A=o},96040:(e,t,n)=>{n.d(t,{n:()=>S});var r=n(31085),a=n(40703),i=n(59469),o=n(48653),s=n(45685),l=n(37197),c=n(37976),d=n(53373),h=n.n(d),u=n(10394),p=n(72501),f=n(52235),m=n(37725);const g=(0,c.makeStyles)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function v(e){const{link:t,title:n,onClick:a}=e,i=g();return(0,r.jsxs)(u.A,{children:[(0,r.jsx)(l.A,{}),(0,r.jsx)(m.N_,{to:t,onClick:a,underline:"none",children:(0,r.jsxs)(u.A,{display:"flex",alignItems:"center",className:i.root,children:[(0,r.jsx)(u.A,{className:i.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,r.jsx)(p.A,{children:(0,r.jsx)("strong",{children:n})})}),(0,r.jsx)(f.A,{className:i.arrow})]})})]})}var x=n(95478),y=n(64947);const A=(0,x.forwardRef)((e,t)=>(0,r.jsx)(m.N_,{ref:t,...e,color:"initial"})),b=(0,x.forwardRef)((e,t)=>(0,r.jsx)(y.A,{ref:t,component:A,...e}));var k=n(56573),w=n(21006),j=n(75501);const C=e=>{const{slackChannel:t}=e,{t:n}=(0,j.useTranslationRef)(w.O);return t?"string"==typeof t?(0,r.jsx)(p.A,{children:n("errorBoundary.title",{slackChannel:t})}):t.href?(0,r.jsx)(b,{to:t.href,variant:"contained",children:t.name}):(0,r.jsx)(p.A,{children:n("errorBoundary.title",{slackChannel:t.name})}):null},E=class extends x.Component{constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(e,t){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:t}),this.setState({error:e,errorInfo:t})}render(){const{slackChannel:e,children:t}=this.props,{error:n}=this.state;return n?(0,r.jsx)(k.b,{title:"Something Went Wrong",error:n,children:(0,r.jsx)(C,{slackChannel:e})}):t}},I=(0,c.makeStyles)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:e.typography.fontWeightBold},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),L=(0,c.withStyles)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(i.A),N={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function S(e){const{title:t,subheader:n,divider:c=!0,deepLink:d,slackChannel:u,errorBoundaryProps:p,variant:f,alignContent:m="normal",children:g,headerStyle:x,headerProps:y,icon:A,action:b,actionsClassName:k,actions:w,cardClassName:j,actionsTopRight:C,className:S,noPadding:z,titleTypographyProps:_,subheaderTypographyProps:B}=e,R=I();let T={},M={};f&&f.split(/[\s]+/g).forEach(e=>{T={...T,...N.card[e]},M={...M,...N.cardContent[e]}});const H=p||(u?{slackChannel:u}:{});return(0,r.jsx)(a.A,{style:T,className:S,children:(0,r.jsxs)(E,{...H,children:[t&&(0,r.jsx)(s.A,{classes:{root:h()(R.header),title:R.headerTitle,subheader:R.headerSubheader,avatar:R.headerAvatar,action:R.headerAction,content:R.headerContent},title:t,subheader:n||A?(0,r.jsxs)("div",{"data-testid":"info-card-subheader",children:[n&&(0,r.jsx)("div",{className:R.subheader,children:n}),A]}):null,action:b,style:{...x},titleTypographyProps:_,subheaderTypographyProps:B,...y}),C&&(0,r.jsx)(L,{children:C}),c&&(0,r.jsx)(l.A,{}),(0,r.jsx)(o.A,{className:h()(j,{[R.noPadding]:z,[R.contentAlignBottom]:"bottom"===m}),style:M,children:g}),w&&(0,r.jsx)(i.A,{className:k,children:w}),d&&(0,r.jsx)(v,{...d})]})})}}}]);
2
- //# sourceMappingURL=8172.cbe1f2c4.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/8172.cbe1f2c4.chunk.js","mappings":"yIAEIA,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,OAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OA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L,aAChBwC,QAAS7N,EAAQsL,eAEnBnC,QACAoC,UAtBCA,GAAcqB,GAGI,IAAAvE,MAAK,MAAO,CAAE,cAAe,sBAAuBrC,SAAU,CACnFuF,IAA6B,IAAA1G,KAAI,MAAO,CAAE5E,UAAWD,EAAQuL,UAAWvF,SAAUuF,IAClFqB,KAJO,KAsBLC,SACAa,MAAO,IAAKhB,GACZQ,uBACAC,8BACGR,IAGPM,IAAmC,IAAApI,KAAI2G,EAAqB,CAAExF,SAAUiH,IACxEX,IAA2B,IAAAzH,KAAIwE,EAAA,EAAS,CAAC,IACzB,IAAAxE,KACdiJ,EAAA,EACA,CACE7N,UAAW,IAAW+M,EAAe,CACnC,CAAChN,EAAQ8K,WAAYA,EACrB,CAAC9K,EAAQ+K,oBAAsC,WAAjB0B,IAEhCiB,MAAOL,EACPrH,aAGJ+G,IAA2B,IAAAlI,KAAI8G,EAAA,EAAa,CAAE1L,UAAW6M,EAAkB9G,SAAU+G,IACrFR,IAA4B,IAAA1H,KAAIoE,EAAY,IAAKsD,QAErD,C","sources":["webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/Add.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/plugin-catalog-react/dist/hooks/useEntity.esm.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/core/esm/MenuItem/MenuItem.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/Visibility.js","webpack://internal.plugin-kuadrant/../../node_modules/react-use/esm/useAsync.js","webpack://internal.plugin-kuadrant/../../node_modules/react-use/esm/useAsyncFn.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/components/Link/Link.esm.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/Info.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/OpenInNew.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/VisibilityOff.js","webpack://internal.plugin-kuadrant/../../node_modules/@material-ui/icons/Warning.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/layout/BottomLink/BottomLink.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/components/LinkButton/LinkButton.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/layout/ErrorBoundary/ErrorBoundary.esm.js","webpack://internal.plugin-kuadrant/./node_modules/@backstage/core-components/dist/layout/InfoCard/InfoCard.esm.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","import { jsx } from 'react/jsx-runtime';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport { createVersionedContext, useVersionedContext, createVersionedValueMap } from '@backstage/version-bridge';\n\nconst NewEntityContext = createVersionedContext(\n \"entity-context\"\n);\nconst AsyncEntityProvider = (props) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n return /* @__PURE__ */ jsx(NewEntityContext.Provider, { value: createVersionedValueMap({ 1: value }), children: /* @__PURE__ */ jsx(\n AnalyticsContext,\n {\n attributes: {\n ...entity ? { entityRef: stringifyEntityRef(entity) } : void 0\n },\n children\n }\n ) });\n};\nconst EntityProvider = (props) => /* @__PURE__ */ jsx(\n AsyncEntityProvider,\n {\n entity: props.entity,\n loading: !Boolean(props.entity),\n error: void 0,\n refresh: void 0,\n children: props.children\n }\n);\nfunction useEntity() {\n const versionedHolder = useVersionedContext(\n \"entity-context\"\n );\n if (!versionedHolder) {\n throw new Error(\"Entity context is not available\");\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error(\"EntityContext v1 not available\");\n }\n if (!value.entity) {\n throw new Error(\n \"useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.\"\n );\n }\n return { entity: value.entity };\n}\nfunction useAsyncEntity() {\n const versionedHolder = useVersionedContext(\n \"entity-context\"\n );\n if (!versionedHolder) {\n throw new Error(\"Entity context is not available\");\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error(\"EntityContext v1 not available\");\n }\n const { entity, loading, error, refresh } = value;\n return { entity, loading, error, refresh };\n}\n\nexport { AsyncEntityProvider, EntityProvider, useAsyncEntity, useEntity };\n//# sourceMappingURL=useEntity.esm.js.map\n","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListItem from '../ListItem';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, _defineProperty({\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n width: 'auto',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n }, theme.breakpoints.up('sm'), {\n minHeight: 'auto'\n })),\n // TODO v5: remove\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: {},\n\n /* Styles applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Styles applied to the root element if dense. */\n dense: _extends({}, theme.typography.body2, {\n minHeight: 'auto'\n })\n };\n};\nvar MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n ListItemClasses = props.ListItemClasses,\n _props$role = props.role,\n role = _props$role === void 0 ? 'menuitem' : _props$role,\n selected = props.selected,\n tabIndexProp = props.tabIndex,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"ListItemClasses\", \"role\", \"selected\", \"tabIndex\"]);\n\n var tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/React.createElement(ListItem, _extends({\n button: true,\n role: role,\n tabIndex: tabIndex,\n component: component,\n selected: selected,\n disableGutters: disableGutters,\n classes: _extends({\n dense: classes.dense\n }, ListItemClasses),\n className: clsx(classes.root, className, selected && classes.selected, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.propTypes = {\n /**\n * Menu item contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used.\n */\n dense: PropTypes.bool,\n\n /**\n * @ignore\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * `classes` prop applied to the [`ListItem`](/api/list-item/) element.\n */\n ListItemClasses: PropTypes.object,\n\n /**\n * @ignore\n */\n role: PropTypes.string,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMenuItem'\n})(MenuItem);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n}), 'Visibility');\n\nexports.default = _default;","import { useEffect } from 'react';\nimport useAsyncFn from './useAsyncFn';\nexport default function useAsync(fn, deps) {\n if (deps === void 0) { deps = []; }\n var _a = useAsyncFn(fn, deps, {\n loading: true,\n }), state = _a[0], callback = _a[1];\n useEffect(function () {\n callback();\n }, [callback]);\n return state;\n}\n","import { __assign } from \"tslib\";\nimport { useCallback, useRef, useState } from 'react';\nimport useMountedState from './useMountedState';\nexport default function useAsyncFn(fn, deps, initialState) {\n if (deps === void 0) { deps = []; }\n if (initialState === void 0) { initialState = { loading: false }; }\n var lastCallId = useRef(0);\n var isMounted = useMountedState();\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var callback = useCallback(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var callId = ++lastCallId.current;\n if (!state.loading) {\n set(function (prevState) { return (__assign(__assign({}, prevState), { loading: true })); });\n }\n return fn.apply(void 0, args).then(function (value) {\n isMounted() && callId === lastCallId.current && set({ value: value, loading: false });\n return value;\n }, function (error) {\n isMounted() && callId === lastCallId.current && set({ error: error, loading: false });\n return error;\n });\n }, deps);\n return [state, callback];\n}\n","import { jsxs, jsx } from 'react/jsx-runtime';\nimport { useAnalytics, useApp, useApi, configApiRef } from '@backstage/core-plugin-api';\nimport MaterialLink from '@material-ui/core/Link';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport classNames from 'classnames';\nimport { trimEnd } from 'lodash';\nimport { forwardRef } from 'react';\nimport { Link as Link$1, createRoutesFromChildren, Route } from 'react-router-dom';\nimport OpenInNew from '@material-ui/icons/OpenInNew';\n\nfunction isReactRouterBeta() {\n const [obj] = createRoutesFromChildren(/* @__PURE__ */ jsx(Route, { index: true, element: /* @__PURE__ */ jsx(\"div\", {}) }));\n return !obj.index;\n}\nconst useStyles = makeStyles(\n (theme) => ({\n visuallyHidden: {\n clip: \"rect(0 0 0 0)\",\n clipPath: \"inset(50%)\",\n overflow: \"hidden\",\n position: \"absolute\",\n userSelect: \"none\",\n whiteSpace: \"nowrap\",\n height: 1,\n width: 1\n },\n externalLink: {\n position: \"relative\"\n },\n externalLinkIcon: {\n verticalAlign: \"bottom\",\n marginLeft: theme.spacing(0.5)\n }\n }),\n { name: \"Link\" }\n);\nconst ExternalLinkIcon = () => {\n const app = useApp();\n const Icon = app.getSystemIcon(\"externalLink\") || OpenInNew;\n const classes = useStyles();\n return /* @__PURE__ */ jsx(Icon, { className: classes.externalLinkIcon });\n};\nconst isExternalUri = (uri) => /^([a-z+.-]+):/.test(uri);\nconst scriptProtocolPattern = (\n // eslint-disable-next-line no-control-regex\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i\n);\nconst originalWindowOpen = window.open;\nif (originalWindowOpen && !originalWindowOpen.__backstage) {\n const newOpen = function open(...args) {\n const url = String(args[0]);\n if (scriptProtocolPattern.test(url)) {\n throw new Error(\n \"Rejected window.open() with a javascript: URL as a security precaution\"\n );\n }\n return originalWindowOpen.apply(this, args);\n };\n newOpen.__backstage = true;\n window.open = newOpen;\n}\nconst useBaseUrl = () => {\n try {\n const config = useApi(configApiRef);\n return config.getOptionalString(\"app.baseUrl\");\n } catch {\n return void 0;\n }\n};\nconst useBasePath = () => {\n const base = \"http://sample.dev\";\n const url = useBaseUrl() ?? \"/\";\n const { pathname } = new URL(url, base);\n return trimEnd(pathname, \"/\");\n};\nconst useResolvedPath = (uri) => {\n let resolvedPath = String(uri);\n const basePath = useBasePath();\n const external = isExternalUri(resolvedPath);\n const startsWithBasePath = resolvedPath.startsWith(basePath);\n if (!external && !startsWithBasePath) {\n resolvedPath = basePath.concat(resolvedPath);\n }\n return resolvedPath;\n};\nconst getNodeText = (node) => {\n if (node instanceof Array) {\n return node.map(getNodeText).join(\" \").trim();\n }\n if (typeof node === \"object\" && node) {\n return getNodeText(node?.props?.children);\n }\n if ([\"string\", \"number\"].includes(typeof node)) {\n return String(node);\n }\n return \"\";\n};\nconst Link = forwardRef(\n ({ onClick, noTrack, externalLinkIcon, ...props }, ref) => {\n const classes = useStyles();\n const analytics = useAnalytics();\n const to = isReactRouterBeta() ? useResolvedPath(props.to) : props.to;\n const linkText = getNodeText(props.children) || to;\n const external = isExternalUri(to);\n const newWindow = external && !!/^https?:/.exec(to);\n if (scriptProtocolPattern.test(to)) {\n throw new Error(\n \"Link component rejected javascript: URL as a security precaution\"\n );\n }\n const handleClick = (event) => {\n onClick?.(event);\n if (!noTrack) {\n analytics.captureEvent(\"click\", linkText, { attributes: { to } });\n }\n };\n return external ? (\n // External links\n /* @__PURE__ */ jsxs(\n MaterialLink,\n {\n ...newWindow ? { target: \"_blank\", rel: \"noopener\" } : {},\n ...props,\n ...props[\"aria-label\"] ? { \"aria-label\": `${props[\"aria-label\"]}, Opens in a new window` } : {},\n ref,\n href: to,\n onClick: handleClick,\n className: classNames(classes.externalLink, props.className),\n children: [\n props.children,\n externalLinkIcon && /* @__PURE__ */ jsx(ExternalLinkIcon, {}),\n /* @__PURE__ */ jsx(Typography, { component: \"span\", className: classes.visuallyHidden, children: \", Opens in a new window\" })\n ]\n }\n )\n ) : (\n // Interact with React Router for internal links\n /* @__PURE__ */ jsx(\n MaterialLink,\n {\n ...props,\n ref,\n component: Link$1,\n to,\n onClick: handleClick\n }\n )\n );\n }\n);\n\nexport { Link, isExternalUri, isReactRouterBeta, useResolvedPath };\n//# sourceMappingURL=Link.esm.js.map\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\"\n}), 'Info');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z\"\n}), 'OpenInNew');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n}), 'VisibilityOff');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning');\n\nexports.default = _default;","import { jsxs, jsx } from 'react/jsx-runtime';\nimport Box from '@material-ui/core/Box';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport { Link } from '../../components/Link/Link.esm.js';\n\nconst useStyles = makeStyles(\n (theme) => ({\n root: {\n maxWidth: \"fit-content\",\n padding: theme.spacing(2, 2, 2, 2.5)\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle\n },\n arrow: {\n color: theme.palette.textSubtle\n }\n }),\n { name: \"BackstageBottomLink\" }\n);\nfunction BottomLink(props) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n return /* @__PURE__ */ jsxs(Box, { children: [\n /* @__PURE__ */ jsx(Divider, {}),\n /* @__PURE__ */ jsx(Link, { to: link, onClick, underline: \"none\", children: /* @__PURE__ */ jsxs(Box, { display: \"flex\", alignItems: \"center\", className: classes.root, children: [\n /* @__PURE__ */ jsx(Box, { className: classes.boxTitle, fontWeight: \"fontWeightBold\", m: 1, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(\"strong\", { children: title }) }) }),\n /* @__PURE__ */ jsx(ArrowIcon, { className: classes.arrow })\n ] }) })\n ] });\n}\n\nexport { BottomLink };\n//# sourceMappingURL=BottomLink.esm.js.map\n","import { jsx } from 'react/jsx-runtime';\nimport Button$1 from '@material-ui/core/Button';\nimport { forwardRef } from 'react';\nimport { Link } from '../Link/Link.esm.js';\n\nconst LinkWrapper = forwardRef((props, ref) => /* @__PURE__ */ jsx(Link, { ref, ...props, color: \"initial\" }));\nconst LinkButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(Button$1, { ref, component: LinkWrapper, ...props }));\nconst Button = LinkButton;\n\nexport { Button, LinkButton };\n//# sourceMappingURL=LinkButton.esm.js.map\n","import { jsx } from 'react/jsx-runtime';\nimport Typography from '@material-ui/core/Typography';\nimport { Component } from 'react';\nimport { LinkButton } from '../../components/LinkButton/LinkButton.esm.js';\nimport { ErrorPanel } from '../../components/ErrorPanel/ErrorPanel.esm.js';\nimport { coreComponentsTranslationRef } from '../../translation.esm.js';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nconst SlackLink = (props) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === \"string\") {\n return /* @__PURE__ */ jsx(Typography, { children: t(\"errorBoundary.title\", { slackChannel }) });\n } else if (!slackChannel.href) {\n return /* @__PURE__ */ jsx(Typography, { children: t(\"errorBoundary.title\", {\n slackChannel: slackChannel.name\n }) });\n }\n return /* @__PURE__ */ jsx(LinkButton, { to: slackChannel.href, variant: \"contained\", children: slackChannel.name });\n};\nconst ErrorBoundary = class ErrorBoundary2 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n error: void 0,\n errorInfo: void 0\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n if (!error) {\n return children;\n }\n return /* @__PURE__ */ jsx(ErrorPanel, { title: \"Something Went Wrong\", error, children: /* @__PURE__ */ jsx(SlackLink, { slackChannel }) });\n }\n};\n\nexport { ErrorBoundary };\n//# sourceMappingURL=ErrorBoundary.esm.js.map\n","import { jsx, jsxs } from 'react/jsx-runtime';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { BottomLink } from '../BottomLink/BottomLink.esm.js';\nimport { ErrorBoundary } from '../ErrorBoundary/ErrorBoundary.esm.js';\n\nconst useStyles = makeStyles(\n (theme) => ({\n noPadding: {\n padding: 0,\n \"&:last-child\": {\n paddingBottom: 0\n }\n },\n contentAlignBottom: {\n display: \"flex\",\n alignItems: \"self-end\"\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5)\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold\n },\n headerSubheader: {\n paddingTop: theme.spacing(1)\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: \"flex\"\n }\n }),\n { name: \"BackstageInfoCard\" }\n);\nconst CardActionsTopRight = withStyles(\n (theme) => ({\n root: {\n display: \"inline-block\",\n padding: theme.spacing(8, 8, 0, 0),\n float: \"right\"\n }\n }),\n { name: \"BackstageInfoCardCardActionsTopRight\" }\n)(CardActions);\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: \"flex\",\n flexDirection: \"column\"\n },\n fullHeight: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\"\n },\n gridItem: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100% - 10px)\",\n // for pages without content header\n marginBottom: \"10px\",\n breakInside: \"avoid-page\",\n \"@media print\": {\n height: \"auto\"\n }\n }\n },\n cardContent: {\n fullHeight: {\n flex: 1\n },\n gridItem: {\n flex: 1\n }\n }\n};\nfunction InfoCard(props) {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = \"normal\",\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps\n } = props;\n const classes = useStyles();\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach((name) => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name]\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[name]\n };\n });\n }\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n return /* @__PURE__ */ jsxs(\"div\", { \"data-testid\": \"info-card-subheader\", children: [\n subheader && /* @__PURE__ */ jsx(\"div\", { className: classes.subheader, children: subheader }),\n icon\n ] });\n };\n const errProps = errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n return /* @__PURE__ */ jsx(Card, { style: calculatedStyle, className, children: /* @__PURE__ */ jsxs(ErrorBoundary, { ...errProps, children: [\n title && /* @__PURE__ */ jsx(\n CardHeader,\n {\n classes: {\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent\n },\n title,\n subheader: cardSubTitle(),\n action,\n style: { ...headerStyle },\n titleTypographyProps,\n subheaderTypographyProps,\n ...headerProps\n }\n ),\n actionsTopRight && /* @__PURE__ */ jsx(CardActionsTopRight, { children: actionsTopRight }),\n divider && /* @__PURE__ */ jsx(Divider, {}),\n /* @__PURE__ */ jsx(\n CardContent,\n {\n className: classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === \"bottom\"\n }),\n style: calculatedCardStyle,\n children\n }\n ),\n actions && /* @__PURE__ */ jsx(CardActions, { className: actionsClassName, children: actions }),\n deepLink && /* @__PURE__ */ jsx(BottomLink, { ...deepLink })\n ] }) });\n}\n\nexport { InfoCard };\n//# sourceMappingURL=InfoCard.esm.js.map\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_default","default","createElement","d","useEntity","versionedHolder","useVersionedContext","Error","value","atVersion","entity","createVersionedContext","MenuItem","props","ref","tabIndex","classes","className","_props$component","component","_props$disableGutters","disableGutters","ListItemClasses","_props$role","role","selected","tabIndexProp","other","disabled","undefined","button","dense","root","gutters","theme","typography","body1","minHeight","paddingTop","paddingBottom","boxSizing","width","overflow","whiteSpace","breakpoints","up","body2","name","useAsync","fn","deps","_a","initialState","loading","lastCallId","useRef","isMounted","useMountedState","useState","state","set","callback","useCallback","args","_i","arguments","length","callId","current","prevState","__assign","apply","then","error","useAsyncFn","useEffect","useStyles","makeStyles","visuallyHidden","clip","clipPath","position","userSelect","height","externalLink","externalLinkIcon","verticalAlign","marginLeft","spacing","ExternalLinkIcon","Icon","useApp","getSystemIcon","jsx","isExternalUri","uri","test","scriptProtocolPattern","originalWindowOpen","window","open","__backstage","newOpen","url","String","this","getNodeText","node","Array","map","join","trim","children","includes","Link","forwardRef","onClick","noTrack","analytics","useAnalytics","to","obj","createRoutesFromChildren","Route","index","element","isReactRouterBeta","resolvedPath","basePath","useApi","configApiRef","getOptionalString","useBaseUrl","pathname","URL","trimEnd","useBasePath","external","startsWithBasePath","startsWith","concat","useResolvedPath","linkText","newWindow","exec","handleClick","event","captureEvent","attributes","jsxs","target","rel","href","maxWidth","padding","boxTitle","margin","color","palette","textSubtle","arrow","BottomLink","link","title","Box","Divider","underline","display","alignItems","fontWeight","m","Typography","A","LinkWrapper","LinkButton","Button","SlackLink","slackChannel","t","useTranslationRef","variant","ErrorBoundary","Component","constructor","super","errorInfo","componentDidCatch","console","setState","render","noPadding","contentAlignBottom","header","headerTitle","fontWeightBold","headerSubheader","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","withStyles","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","alignContent","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","errProps","Card","style","CardHeader","avatar","content","CardContent"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunkinternal_plugin_kuadrant=self.webpackChunkinternal_plugin_kuadrant||[]).push([[8799],{24170:(e,a,t)=>{t.d(a,{o:()=>i,q:()=>r});const i=e=>e&&e.trim()?e.length>253?"Must be 253 characters or less":/^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/.test(e)?null:"Must be lowercase alphanumeric with hyphens, start and end with alphanumeric":"Name is required",r=e=>{if(!e)return null;try{const a=new URL(e);return["http:","https:"].includes(a.protocol)?null:"Must be a valid HTTP or HTTPS URL"}catch{return"Must be a valid URL"}}},26997:(e,a,t)=>{t.d(a,{C:()=>H});var i=t(31085),r=t(95478),n=t(76891),s=t(61477),l=t(46805),o=t(10394),d=t(72501),c=t(42899),u=t(16249),p=t(34839),h=t(29365),m=t(67720),x=t(71677),A=t(95061),v=t(29635),g=t(86901),j=t(30285),y=t(93453),b=t(64947),f=t(78467),k=t(58837),P=t(89031),S=t(18466),T=t(22097),w=t(84441),I=t(86687),C=t(65867),R=t(24170),$=t(77318);const N=(0,k.A)(e=>({asterisk:{color:"#f44336"},sectionHeader:{display:"flex",alignItems:"center",gap:e.spacing(.5),marginTop:e.spacing(2),marginBottom:e.spacing(1)},infoIcon:{fontSize:18,color:e.palette.text.secondary},tagChip:{marginRight:e.spacing(.5),marginBottom:e.spacing(.5)}})),H=({open:e,onClose:a,onSuccess:t,namespace:k,name:H})=>{const W=N(),L=(0,T.useApi)(T.configApiRef),q=(0,T.useApi)(T.fetchApiRef),z=L.getString("backend.baseUrl"),[M,U]=(0,r.useState)(!1),[E,D]=(0,r.useState)(""),[F,K]=(0,r.useState)(""),[_,B]=(0,r.useState)("v1"),[J,G]=(0,r.useState)("Draft"),[O,V]=(0,r.useState)("manual"),[Q,X]=(0,r.useState)([]),[Y,Z]=(0,r.useState)(null),[ee,ae]=(0,r.useState)(""),[te,ie]=(0,r.useState)(""),[re,ne]=(0,r.useState)(""),[se,le]=(0,r.useState)(""),[oe,de]=(0,r.useState)(""),[ce,ue]=(0,r.useState)([]),[pe,he]=(0,r.useState)(""),[me,xe]=(0,r.useState)(!1),[Ae,ve]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&k&&H&&(U(!0),he(""),q.fetch(`${z}/api/kuadrant/apiproducts/${k}/${H}`).then(async e=>{if(!e.ok){const a=await(0,$.T)(e);throw new Error(`failed to load API product. ${a}`)}return e.json()}).then(e=>{var a,t,i,r;D(e.spec.displayName||""),K(e.spec.description||""),B(e.spec.version||"v1"),G(e.spec.publishStatus||"Draft"),V(e.spec.approvalMode||"manual"),X(e.spec.tags||[]),Z(e.spec.targetRef||null),ie((null===(a=e.spec.contact)||void 0===a?void 0:a.email)||""),ne((null===(t=e.spec.contact)||void 0===t?void 0:t.team)||""),le((null===(i=e.spec.documentation)||void 0===i?void 0:i.docsURL)||""),de((null===(r=e.spec.documentation)||void 0===r?void 0:r.openAPISpecURL)||""),ue(e.status.discoveredPlans||null),ve(null),U(!1)}).catch(e=>{he(e.message||"Failed to load API product"),U(!1)}))},[e,k,H,z,q]),(0,r.useEffect)(()=>{e&&ve(null)},[e]);const ge=()=>{ee.trim()&&!Q.includes(ee.trim())&&(X([...Q,ee.trim()]),ae(""))};return(0,i.jsxs)(n.A,{open:e,onClose:a,maxWidth:"md",fullWidth:!0,children:[(0,i.jsx)(s.A,{children:"Edit API Product"}),(0,i.jsxs)(l.A,{children:[pe&&(0,i.jsx)(w.A,{severity:"error",style:{marginBottom:16},children:pe}),M?(0,i.jsx)(I.k,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{className:W.sectionHeader,children:(0,i.jsx)(d.A,{variant:"subtitle1",children:(0,i.jsx)("strong",{children:"API product info"})})}),(0,i.jsxs)(c.A,{container:!0,spacing:2,children:[(0,i.jsx)(c.A,{item:!0,xs:6,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"API product name",value:E,onChange:e=>D(e.target.value),placeholder:"My API",helperText:"Give a unique name for your API product",margin:"normal",required:!0,disabled:me,InputLabelProps:{classes:{asterisk:W.asterisk}}})}),(0,i.jsx)(c.A,{item:!0,xs:6,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"Resource name",value:H,disabled:!0,helperText:"Kubernetes resource name (immutable)",margin:"normal"})}),(0,i.jsx)(c.A,{item:!0,xs:6,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"Version",value:_,onChange:e=>B(e.target.value),placeholder:"v1",helperText:"Give a version to your API product",margin:"normal",disabled:me})}),(0,i.jsx)(c.A,{item:!0,xs:6,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"Tag",value:ee,onChange:e=>ae(e.target.value),onKeyPress:e=>{"Enter"===e.key&&(e.preventDefault(),ge())},placeholder:"Add tag",helperText:"Add a tag to your API product",margin:"normal",disabled:me,InputProps:{endAdornment:ee?(0,i.jsx)(p.A,{position:"end",children:(0,i.jsx)(h.A,{size:"small",onClick:ge,disabled:me,children:(0,i.jsx)(S.A,{fontSize:"small"})})}):void 0}})}),Q.length>0&&(0,i.jsx)(c.A,{item:!0,xs:12,children:(0,i.jsx)(o.A,{display:"flex",flexWrap:"wrap",children:Q.map(e=>(0,i.jsx)(m.A,{label:e,onDelete:me?void 0:()=>{return a=e,void X(Q.filter(e=>e!==a));var a},size:"small",className:W.tagChip,disabled:me},e))})}),(0,i.jsx)(c.A,{item:!0,xs:12,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"Description",value:F,onChange:e=>K(e.target.value),placeholder:"API description",margin:"normal",multiline:!0,rows:2,required:!0,disabled:me,InputLabelProps:{classes:{asterisk:W.asterisk}}})})]}),(0,i.jsxs)(o.A,{className:W.sectionHeader,children:[(0,i.jsx)(d.A,{variant:"subtitle1",children:(0,i.jsx)("strong",{children:"Associated route"})}),(0,i.jsx)(x.Ay,{title:"The HTTPRoute this API product is associated with",children:(0,i.jsx)(P.A,{className:W.infoIcon})})]}),(0,i.jsxs)(c.A,{container:!0,spacing:2,children:[(0,i.jsx)(c.A,{item:!0,xs:12,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"OpenAPI Spec URL",value:oe,onChange:e=>{return a=e.target.value,de(a),void ve((0,R.q)(a));var a},placeholder:"https://api.example.com/openapi.json",helperText:Ae||"Enter the full path to your API spec file",error:!!Ae,margin:"normal",disabled:me})}),(0,i.jsx)(c.A,{item:!0,xs:12,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"Documentation URL",value:se,onChange:e=>le(e.target.value),placeholder:"https://docs.example.com/api",helperText:"Link to external documentation for this API",margin:"normal",disabled:me})}),Y&&(0,i.jsx)(c.A,{item:!0,xs:12,children:(0,i.jsx)(u.A,{fullWidth:!0,label:"HTTPRoute",value:`${Y.namespace||k}/${Y.name}`,disabled:!0,helperText:"Target HTTPRoute (immutable)",margin:"normal"})})]}),Y&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.A,{className:W.sectionHeader,children:[(0,i.jsx)(d.A,{variant:"subtitle1",children:(0,i.jsx)("strong",{children:"HTTPRoute policies"})}),(0,i.jsx)(x.Ay,{title:"Shows the associated policies and rate limit tiers for the HTTPRoute",children:(0,i.jsx)(P.A,{className:W.infoIcon})})]}),(0,i.jsx)(C.g,{discoveredPlans:ce,alertSeverity:"info",alertMessage:"No PlanPolicy found for this HTTPRoute.",includeTopMargin:!1})]}),(0,i.jsxs)(o.A,{className:W.sectionHeader,children:[(0,i.jsx)(d.A,{variant:"subtitle1",children:(0,i.jsx)("strong",{children:"API Key approval"})}),(0,i.jsx)(x.Ay,{title:"Choose how API key requests are handled for this product",children:(0,i.jsx)(P.A,{className:W.infoIcon})})]}),(0,i.jsx)(A.A,{component:"fieldset",disabled:me,children:(0,i.jsxs)(v.A,{row:!0,value:O,onChange:e=>V(e.target.value),children:[(0,i.jsx)(g.A,{value:"manual",control:(0,i.jsx)(j.A,{color:"primary"}),label:(0,i.jsxs)(o.A,{children:[(0,i.jsx)(d.A,{variant:"body2",children:"Need manual approval"}),(0,i.jsx)(d.A,{variant:"caption",color:"textSecondary",children:"Requires approval for requesting this API"})]})}),(0,i.jsx)(g.A,{value:"automatic",control:(0,i.jsx)(j.A,{color:"primary"}),label:(0,i.jsxs)(o.A,{children:[(0,i.jsx)(d.A,{variant:"body2",children:"Automatic"}),(0,i.jsx)(d.A,{variant:"caption",color:"textSecondary",children:"Keys are created without need to be approved"})]})})]})})]})]}),(0,i.jsxs)(y.A,{children:[(0,i.jsx)(b.A,{onClick:a,disabled:me,children:"Cancel"}),(0,i.jsx)(b.A,{onClick:async()=>{he(""),xe(!0);try{const e={spec:{displayName:E,description:F,version:_,publishStatus:J,approvalMode:O,tags:Q,targetRef:Y,...te||re?{contact:{...te&&{email:te},...re&&{team:re}}}:{},...se||oe?{documentation:{...se&&{docsURL:se},...oe&&{openAPISpecURL:oe}}}:{}}},i=await q.fetch(`${z}/api/kuadrant/apiproducts/${k}/${H}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!i.ok){const e=await(0,$.T)(i);throw new Error(`failed to patch APIProduct. ${e}`)}t(),a()}catch(e){he(e instanceof Error?e.message:String(e))}finally{xe(!1)}},color:"primary",variant:"contained",disabled:me||M||!E||!F||!!Ae,startIcon:me?(0,i.jsx)(f.A,{size:16,color:"inherit"}):void 0,children:me?"Saving...":"Save"})]})]})}},34955:(e,a,t)=>{t.d(a,{Al:()=>s,DS:()=>h,EM:()=>d,FL:()=>n,J:()=>r,KV:()=>g,R_:()=>c,U3:()=>l,dp:()=>p,jH:()=>v,q0:()=>m,uL:()=>A,v_:()=>o,vs:()=>u,z4:()=>x});var i=t(83572);(0,i.i)({name:"kuadrant.planpolicy.create",attributes:{action:"create"}}),(0,i.i)({name:"kuadrant.planpolicy.read",attributes:{action:"read"}}),(0,i.i)({name:"kuadrant.planpolicy.update",attributes:{action:"update"}}),(0,i.i)({name:"kuadrant.planpolicy.delete",attributes:{action:"delete"}});const r=(0,i.i)({name:"kuadrant.planpolicy.list",attributes:{action:"read"}}),n=(0,i.i)({name:"kuadrant.apiproduct.create",attributes:{action:"create"}}),s=((0,i.i)({name:"kuadrant.apiproduct.read.own",attributes:{action:"read"}}),(0,i.i)({name:"kuadrant.apiproduct.read.all",attributes:{action:"read"}})),l=(0,i.i)({name:"kuadrant.apiproduct.update.own",attributes:{action:"update"}}),o=(0,i.i)({name:"kuadrant.apiproduct.update.all",attributes:{action:"update"}}),d=(0,i.i)({name:"kuadrant.apiproduct.delete.own",attributes:{action:"delete"}}),c=(0,i.i)({name:"kuadrant.apiproduct.delete.all",attributes:{action:"delete"}}),u=(0,i.i)({name:"kuadrant.apiproduct.list",attributes:{action:"read"}}),p=(0,i.i)({name:"kuadrant.apikey.create",attributes:{action:"create"},resourceType:"apiproduct"}),h=(0,i.i)({name:"kuadrant.apikey.read.own",attributes:{action:"read"}}),m=((0,i.i)({name:"kuadrant.apikey.read.all",attributes:{action:"read"}}),(0,i.i)({name:"kuadrant.apikey.update.own",attributes:{action:"update"}})),x=(0,i.i)({name:"kuadrant.apikey.update.all",attributes:{action:"update"}}),A=(0,i.i)({name:"kuadrant.apikey.delete.own",attributes:{action:"delete"}}),v=(0,i.i)({name:"kuadrant.apikey.delete.all",attributes:{action:"delete"}}),g=(0,i.i)({name:"kuadrant.apikey.approve",attributes:{action:"update"}})},46205:(e,a,t)=>{t.d(a,{W:()=>n,l:()=>r});var i=t(24217);function r(e,a){const t="resourceType"in e?{permission:e,resourceRef:a}:{permission:e},r=(0,i.J)(t);return{allowed:r.allowed,loading:r.loading,error:r.error}}function n(e,a,t,i){return!!i||!(!t||e!==a)}},63221:(e,a,t)=>{t.d(a,{K:()=>A});var i=t(31085),r=t(95478),n=t(76891),s=t(61477),l=t(10394),o=t(46805),d=t(59461),c=t(72501),u=t(16249),p=t(93453),h=t(64947),m=t(78467),x=t(77225);const A=({open:e,title:a,description:t,confirmText:A,severity:v="normal",deleting:g=!1,onConfirm:j,onCancel:y})=>{const[b,f]=(0,r.useState)("");(0,r.useEffect)(()=>{e||f("")},[e]);const k="high"===v&&A,P=!k||b===A;return(0,i.jsxs)(n.A,{open:e,onClose:g?void 0:y,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsxs)(s.A,{children:["high"===v&&(0,i.jsxs)(l.A,{display:"flex",alignItems:"center",style:{gap:8},children:[(0,i.jsx)(x.A,{color:"error"}),(0,i.jsx)("span",{children:a})]}),"high"!==v&&a]}),(0,i.jsxs)(o.A,{children:[(0,i.jsx)(d.A,{style:{whiteSpace:"pre-line"},children:t}),k&&(0,i.jsxs)(l.A,{mt:2,children:[(0,i.jsxs)(c.A,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:["Type ",(0,i.jsx)("strong",{children:A})," to confirm:"]}),(0,i.jsx)(u.A,{fullWidth:!0,variant:"outlined",size:"small",value:b,onChange:e=>f(e.target.value),disabled:g,autoFocus:!0,placeholder:A})]})]}),(0,i.jsxs)(p.A,{children:[(0,i.jsx)(h.A,{onClick:y,disabled:g,children:"Cancel"}),(0,i.jsx)(h.A,{onClick:()=>{P&&j()},color:"secondary",variant:"contained",disabled:g||!P,startIcon:g?(0,i.jsx)(m.A,{size:16,color:"inherit"}):void 0,children:g?"Deleting...":"Delete"})]})]})}},65867:(e,a,t)=>{t.d(a,{g:()=>d});var i=t(31085),r=(t(95478),t(10394)),n=t(72501),s=t(67720),l=t(54917),o=t(84441);const d=({discoveredPlans:e,alertSeverity:a="warning",alertMessage:t="No PlanPolicy found for this HTTPRoute. API keys and rate limiting may not be available.",includeTopMargin:d=!0})=>{const c=(0,l.A)();return(0,i.jsx)(r.A,{mt:d?1:0,p:2,bgcolor:c.palette.background.default,borderRadius:1,border:`1px solid ${c.palette.divider}`,children:e?(0,i.jsx)(i.Fragment,{children:e.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.A,{variant:"caption",display:"block",gutterBottom:!0,color:"textSecondary",style:{marginTop:8},children:"Available PlanPolicy Tiers:"}),(0,i.jsx)(r.A,{display:"flex",flexWrap:"wrap",mt:1,style:{gap:8},children:e.map((e,a)=>{var t,r,n;const l=(null===(t=e.limits)||void 0===t?void 0:t.daily)?`${e.limits.daily}/day`:(null===(r=e.limits)||void 0===r?void 0:r.monthly)?`${e.limits.monthly}/month`:(null===(n=e.limits)||void 0===n?void 0:n.yearly)?`${e.limits.yearly}/year`:"No limit";return(0,i.jsx)(s.A,{label:`${e.tier}: ${l}`,size:"small",variant:"outlined",color:"primary"},a)})})]}):(0,i.jsx)(n.A,{variant:"caption",color:"textSecondary",children:"No plans defined in this PlanPolicy"})}):(0,i.jsx)(o.A,{severity:a,children:t})})}},77318:(e,a,t)=>{async function i(e){const a=await e.json().catch(()=>({}));switch(e.status){case 400:return a.error||"Invalid request. Please check your input.";case 403:return"Permission denied. Contact your administrator.";case 404:return"Resource not found. It may have been deleted.";case 409:return"Resource already exists or conflicts with existing data.";case 500:return"Server error. Please try again or contact support.";default:return a.error||`Request failed (${e.status})`}}t.d(a,{T:()=>i})}}]);
2
- //# sourceMappingURL=8799.939d14f9.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/8799.939d14f9.chunk.js","mappings":"8JACO,MAAMA,EAA0BC,GAChCA,GAAUA,EAAMC,OAGjBD,EAAME,OAAS,IACV,iCAGY,kCAEHC,KAAKH,GAIhB,KAHE,+EATA,mBAgBEI,EAAeJ,IAC1B,IAAKA,EACH,OAAO,KAGT,IACE,MAAMK,EAAM,IAAIC,IAAIN,GACpB,MAAK,CAAC,QAAS,UAAUO,SAASF,EAAIG,UAG/B,KAFE,mCAGX,CAAE,MACA,MAAO,qBACT,E,sWCDF,MAAMC,GAAYC,EAAAA,EAAAA,GAAYC,IAAW,CACvCC,SAAU,CACRC,MA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EAAAA,EAAKG,cAALH,IAAAA,OAAAA,EAAAA,EAAaM,QACX,GAAGN,EAAKG,OAAOG,cACf,WAER,OACE,SAAC/F,EAAAA,EAAIA,CAEHzB,MAAO,GAAGkH,EAAKO,SAASL,IACxBlG,KAAK,QACLzB,QAAQ,WACRjG,MAAM,WAJD2N,WAWf,SAAC3H,EAAAA,EAAUA,CAACC,QAAQ,UAAUjG,MAAM,gB,SAAgB,2CAMxD,SAAC0F,EAAAA,EAAKA,CAACC,SAAUkD,E,SAAgBC,M,kBC3ElC3E,eAAeG,EAAiBoF,GACrC,MAAMwE,QAAkBxE,EAASlF,OAAOS,MAAM,KAAO,CAAE,IAEvD,OAAQyE,EAAS1E,QACf,KAAK,IACH,OAAOkJ,EAAUxK,OAAS,4CAC5B,KAAK,IACH,MAAO,iDACT,KAAK,IACH,MAAO,gDACT,KAAK,IACH,MAAO,2DACT,KAAK,IACH,MAAO,qDACT,QACE,OAAOwK,EAAUxK,OAAS,mBAAmBgG,EAAS1E,UAE5D,C","sources":["webpack://internal.plugin-kuadrant/./src/utils/validation.ts","webpack://internal.plugin-kuadrant/./src/components/EditAPIProductDialog/EditAPIProductDialog.tsx","webpack://internal.plugin-kuadrant/./src/permissions.ts","webpack://internal.plugin-kuadrant/./src/utils/permissions.ts","webpack://internal.plugin-kuadrant/./src/components/ConfirmDeleteDialog/ConfirmDeleteDialog.tsx","webpack://internal.plugin-kuadrant/./src/components/PlanPolicyDetailsCard/PlanPolicyDetails.tsx","webpack://internal.plugin-kuadrant/./src/utils/errors.ts"],"sourcesContent":["// Kubernetes name validation\nexport const validateKubernetesName = (value: string): string | null => {\n if (!value || !value.trim()) {\n return 'Name is required';\n }\n if (value.length > 253) {\n return 'Must be 253 characters or less';\n }\n\n const dns1123Regex = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/;\n\n if (!dns1123Regex.test(value)) {\n return 'Must be lowercase alphanumeric with hyphens, start and end with alphanumeric';\n }\n\n return null;\n};\n\n// URL validation\nexport const validateURL = (value: string): string | null => {\n if (!value) {\n return null;\n }\n\n try {\n const url = new URL(value);\n if (!['http:', 'https:'].includes(url.protocol)) {\n return 'Must be a valid HTTP or HTTPS URL';\n }\n return null;\n } catch {\n return 'Must be a valid URL';\n }\n};\n","import React, { useState, useEffect } from 'react';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Button,\n TextField,\n Box,\n Typography,\n Chip,\n Grid,\n CircularProgress,\n makeStyles,\n FormControl,\n RadioGroup,\n FormControlLabel,\n Radio,\n Tooltip,\n IconButton,\n InputAdornment,\n} from '@material-ui/core';\nimport InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';\nimport AddIcon from '@material-ui/icons/Add';\nimport { useApi, configApiRef, fetchApiRef } from '@backstage/core-plugin-api';\nimport { Alert } from '@material-ui/lab';\nimport { Progress } from '@backstage/core-components';\nimport { PlanPolicyDetails } from '../PlanPolicyDetailsCard';\nimport { validateURL } from '../../utils/validation';\nimport { handleFetchError } from \"../../utils/errors\";\n\nconst useStyles = makeStyles((theme) => ({\n asterisk: {\n color: '#f44336',\n },\n sectionHeader: {\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(0.5),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(1),\n },\n infoIcon: {\n fontSize: 18,\n color: theme.palette.text.secondary,\n },\n tagChip: {\n marginRight: theme.spacing(0.5),\n marginBottom: theme.spacing(0.5),\n },\n}));\n\ninterface EditAPIProductDialogProps {\n open: boolean;\n onClose: () => void;\n onSuccess: () => void;\n namespace: string;\n name: string;\n}\n\nexport const EditAPIProductDialog = ({ open, onClose, onSuccess, namespace, name }: EditAPIProductDialogProps) => {\n const classes = useStyles();\n const config = useApi(configApiRef);\n const fetchApi = useApi(fetchApiRef);\n const backendUrl = config.getString('backend.baseUrl');\n const [loading, setLoading] = useState(false);\n const [displayName, setDisplayName] = useState('');\n const [description, setDescription] = useState('');\n const [version, setVersion] = useState('v1');\n const [publishStatus, setPublishStatus] = useState<'Draft' | 'Published'>('Draft');\n const [approvalMode, setApprovalMode] = useState<'automatic' | 'manual'>('manual');\n const [tags, setTags] = useState<string[]>([]);\n const [targetRef, setTargetRef] = useState<any>(null);\n const [tagInput, setTagInput] = useState('');\n const [contactEmail, setContactEmail] = useState('');\n const [contactTeam, setContactTeam] = useState('');\n const [docsURL, setDocsURL] = useState('');\n const [openAPISpec, setOpenAPISpec] = useState('');\n const [discoveredPlans, setdiscoveredPlans] = useState([]);\n const [error, setError] = useState('');\n const [saving, setSaving] = useState(false);\n const [openAPISpecError, setOpenAPISpecError] = useState<string | null>(null);\n\n // Load APIProduct data when dialog opens\n useEffect(() => {\n if (open && namespace && name) {\n setLoading(true);\n setError('');\n\n fetchApi.fetch(`${backendUrl}/api/kuadrant/apiproducts/${namespace}/${name}`)\n .then(async res => {\n if (!res.ok) {\n const error = await handleFetchError(res);\n throw new Error(`failed to load API product. ${error}`);\n }\n return res.json();\n })\n .then(data => {\n setDisplayName(data.spec.displayName || '');\n setDescription(data.spec.description || '');\n setVersion(data.spec.version || 'v1');\n setPublishStatus(data.spec.publishStatus || 'Draft');\n setApprovalMode(data.spec.approvalMode || 'manual');\n setTags(data.spec.tags || []);\n setTargetRef(data.spec.targetRef || null);\n setContactEmail(data.spec.contact?.email || '');\n setContactTeam(data.spec.contact?.team || '');\n setDocsURL(data.spec.documentation?.docsURL || '');\n setOpenAPISpec(data.spec.documentation?.openAPISpecURL || '');\n setdiscoveredPlans(data.status.discoveredPlans || null);\n setOpenAPISpecError(null);\n setLoading(false);\n })\n .catch(err => {\n setError(err.message || 'Failed to load API product');\n setLoading(false);\n });\n }\n }, [open, namespace, name, backendUrl, fetchApi]);\n\n useEffect(() => {\n if (open) {\n setOpenAPISpecError(null);\n }\n }, [open]);\n\n const handleOpenAPISpecChange = (value: string) => {\n setOpenAPISpec(value);\n setOpenAPISpecError(validateURL(value));\n };\n\n const handleAddTag = () => {\n if (tagInput.trim() && !tags.includes(tagInput.trim())) {\n setTags([...tags, tagInput.trim()]);\n setTagInput('');\n }\n };\n\n const handleDeleteTag = (tagToDelete: string) => {\n setTags(tags.filter(tag => tag !== tagToDelete));\n };\n\n const handleSave = async () => {\n setError('');\n setSaving(true);\n\n try {\n const patch = {\n spec: {\n displayName,\n description,\n version,\n publishStatus,\n approvalMode,\n tags,\n targetRef,\n ...(contactEmail || contactTeam ? {\n contact: {\n ...(contactEmail && { email: contactEmail }),\n ...(contactTeam && { team: contactTeam }),\n },\n } : {}),\n ...(docsURL || openAPISpec ? {\n documentation: {\n ...(docsURL && { docsURL }),\n ...(openAPISpec && { openAPISpecURL: openAPISpec }),\n },\n } : {}),\n },\n };\n\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/apiproducts/${namespace}/${name}`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(patch),\n }\n );\n\n if (!response.ok) {\n const error = await handleFetchError(response);\n throw new Error(`failed to patch APIProduct. ${error}`);\n }\n\n onSuccess();\n onClose();\n } catch (err) {\n setError(err instanceof Error ? err.message : String(err));\n } finally {\n setSaving(false);\n }\n };\n\n return (\n <Dialog open={open} onClose={onClose} maxWidth=\"md\" fullWidth>\n <DialogTitle>Edit API Product</DialogTitle>\n <DialogContent>\n {error && (\n <Alert severity=\"error\" style={{ marginBottom: 16 }}>\n {error}\n </Alert>\n )}\n {loading ? (\n <Progress />\n ) : (\n <>\n {/* API product info section */}\n <Box className={classes.sectionHeader}>\n <Typography variant=\"subtitle1\"><strong>API product info</strong></Typography>\n </Box>\n <Grid container spacing={2}>\n <Grid item xs={6}>\n <TextField\n fullWidth\n label=\"API product name\"\n value={displayName}\n onChange={e => setDisplayName(e.target.value)}\n placeholder=\"My API\"\n helperText=\"Give a unique name for your API product\"\n margin=\"normal\"\n required\n disabled={saving}\n InputLabelProps={{\n classes: {\n asterisk: classes.asterisk,\n },\n }}\n />\n </Grid>\n <Grid item xs={6}>\n <TextField\n fullWidth\n label=\"Resource name\"\n value={name}\n disabled\n helperText=\"Kubernetes resource name (immutable)\"\n margin=\"normal\"\n />\n </Grid>\n <Grid item xs={6}>\n <TextField\n fullWidth\n label=\"Version\"\n value={version}\n onChange={e => setVersion(e.target.value)}\n placeholder=\"v1\"\n helperText=\"Give a version to your API product\"\n margin=\"normal\"\n disabled={saving}\n />\n </Grid>\n <Grid item xs={6}>\n <TextField\n fullWidth\n label=\"Tag\"\n value={tagInput}\n onChange={e => setTagInput(e.target.value)}\n onKeyPress={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n handleAddTag();\n }\n }}\n placeholder=\"Add tag\"\n helperText=\"Add a tag to your API product\"\n margin=\"normal\"\n disabled={saving}\n InputProps={{\n endAdornment: tagInput ? (\n <InputAdornment position=\"end\">\n <IconButton size=\"small\" onClick={handleAddTag} disabled={saving}>\n <AddIcon fontSize=\"small\" />\n </IconButton>\n </InputAdornment>\n ) : undefined,\n }}\n />\n </Grid>\n {tags.length > 0 && (\n <Grid item xs={12}>\n <Box display=\"flex\" flexWrap=\"wrap\">\n {tags.map(tag => (\n <Chip\n key={tag}\n label={tag}\n onDelete={saving ? undefined : () => handleDeleteTag(tag)}\n size=\"small\"\n className={classes.tagChip}\n disabled={saving}\n />\n ))}\n </Box>\n </Grid>\n )}\n <Grid item xs={12}>\n <TextField\n fullWidth\n label=\"Description\"\n value={description}\n onChange={e => setDescription(e.target.value)}\n placeholder=\"API description\"\n margin=\"normal\"\n multiline\n rows={2}\n required\n disabled={saving}\n InputLabelProps={{\n classes: {\n asterisk: classes.asterisk,\n },\n }}\n />\n </Grid>\n </Grid>\n\n {/* Associated route section */}\n <Box className={classes.sectionHeader}>\n <Typography variant=\"subtitle1\"><strong>Associated route</strong></Typography>\n <Tooltip title=\"The HTTPRoute this API product is associated with\">\n <InfoOutlinedIcon className={classes.infoIcon} />\n </Tooltip>\n </Box>\n <Grid container spacing={2}>\n <Grid item xs={12}>\n <TextField\n fullWidth\n label=\"OpenAPI Spec URL\"\n value={openAPISpec}\n onChange={e => handleOpenAPISpecChange(e.target.value)}\n placeholder=\"https://api.example.com/openapi.json\"\n helperText={openAPISpecError || \"Enter the full path to your API spec file\"}\n error={!!openAPISpecError}\n margin=\"normal\"\n disabled={saving}\n />\n </Grid>\n <Grid item xs={12}>\n <TextField\n fullWidth\n label=\"Documentation URL\"\n value={docsURL}\n onChange={e => setDocsURL(e.target.value)}\n placeholder=\"https://docs.example.com/api\"\n helperText=\"Link to external documentation for this API\"\n margin=\"normal\"\n disabled={saving}\n />\n </Grid>\n {targetRef && (\n <Grid item xs={12}>\n <TextField\n fullWidth\n label=\"HTTPRoute\"\n value={`${targetRef.namespace || namespace}/${targetRef.name}`}\n disabled\n helperText=\"Target HTTPRoute (immutable)\"\n margin=\"normal\"\n />\n </Grid>\n )}\n </Grid>\n\n {/* HTTPRoute policies section */}\n {targetRef && (\n <>\n <Box className={classes.sectionHeader}>\n <Typography variant=\"subtitle1\"><strong>HTTPRoute policies</strong></Typography>\n <Tooltip title=\"Shows the associated policies and rate limit tiers for the HTTPRoute\">\n <InfoOutlinedIcon className={classes.infoIcon} />\n </Tooltip>\n </Box>\n <PlanPolicyDetails\n discoveredPlans={discoveredPlans}\n alertSeverity=\"info\"\n alertMessage=\"No PlanPolicy found for this HTTPRoute.\"\n includeTopMargin={false}\n />\n </>\n )}\n\n {/* API Key approval section */}\n <Box className={classes.sectionHeader}>\n <Typography variant=\"subtitle1\"><strong>API Key approval</strong></Typography>\n <Tooltip title=\"Choose how API key requests are handled for this product\">\n <InfoOutlinedIcon className={classes.infoIcon} />\n </Tooltip>\n </Box>\n <FormControl component=\"fieldset\" disabled={saving}>\n <RadioGroup\n row\n value={approvalMode}\n onChange={e => setApprovalMode(e.target.value as 'automatic' | 'manual')}\n >\n <FormControlLabel\n value=\"manual\"\n control={<Radio color=\"primary\" />}\n label={\n <Box>\n <Typography variant=\"body2\">Need manual approval</Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n Requires approval for requesting this API\n </Typography>\n </Box>\n }\n />\n <FormControlLabel\n value=\"automatic\"\n control={<Radio color=\"primary\" />}\n label={\n <Box>\n <Typography variant=\"body2\">Automatic</Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n Keys are created without need to be approved\n </Typography>\n </Box>\n }\n />\n </RadioGroup>\n </FormControl>\n </>\n )}\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose} disabled={saving}>Cancel</Button>\n <Button\n onClick={handleSave}\n color=\"primary\"\n variant=\"contained\"\n disabled={saving || loading || !displayName || !description || !!openAPISpecError}\n startIcon={saving ? <CircularProgress size={16} color=\"inherit\" /> : undefined}\n >\n {saving ? 'Saving...' : 'Save'}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import { createPermission } from '@backstage/plugin-permission-common';\n\n/**\n * permission definitions for the kuadrant plugin\n *\n * these permissions control access to kuadrant resources and operations.\n * they must match the permissions defined in the backend plugin.\n *\n * permission types:\n * - BasicPermission: standard permission that applies globally\n * - ResourcePermission: permission scoped to specific resource types (e.g., apiproduct)\n *\n * permission patterns:\n * - `.create` - create new resources\n * - `.read` - read resource details\n * - `.read.own` - read only resources owned by the user\n * - `.read.all` - read all resources regardless of ownership\n * - `.update` - modify existing resources\n * - `.delete` - delete resources\n * - `.delete.own` - delete only resources owned by the user\n * - `.delete.all` - delete any resource regardless of ownership\n * - `.list` - list/view collections of resources\n */\n\n// planpolicy permissions\nexport const kuadrantPlanPolicyCreatePermission = createPermission({\n name: 'kuadrant.planpolicy.create',\n attributes: { action: 'create' },\n});\n\nexport const kuadrantPlanPolicyReadPermission = createPermission({\n name: 'kuadrant.planpolicy.read',\n attributes: { action: 'read' },\n});\n\nexport const kuadrantPlanPolicyUpdatePermission = createPermission({\n name: 'kuadrant.planpolicy.update',\n attributes: { action: 'update' },\n});\n\nexport const kuadrantPlanPolicyDeletePermission = createPermission({\n name: 'kuadrant.planpolicy.delete',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantPlanPolicyListPermission = createPermission({\n name: 'kuadrant.planpolicy.list',\n attributes: { action: 'read' },\n});\n\n// apiproduct permissions\n\n/**\n * permission to create new API products\n * granted to api owners and admins\n */\nexport const kuadrantApiProductCreatePermission = createPermission({\n name: 'kuadrant.apiproduct.create',\n attributes: { action: 'create' },\n});\n\n/**\n * permission to read API products owned by the current user\n * for api owners to view their own products\n */\nexport const kuadrantApiProductReadOwnPermission = createPermission({\n name: 'kuadrant.apiproduct.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API products regardless of ownership\n * for platform engineers/admins who need to view all products\n */\nexport const kuadrantApiProductReadAllPermission = createPermission({\n name: 'kuadrant.apiproduct.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to update API products owned by the current user\n * for api owners to modify their own products\n */\nexport const kuadrantApiProductUpdateOwnPermission = createPermission({\n name: 'kuadrant.apiproduct.update.own',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to update any API product regardless of ownership\n * for platform engineers/admins\n */\nexport const kuadrantApiProductUpdateAllPermission = createPermission({\n name: 'kuadrant.apiproduct.update.all',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to delete API products owned by the current user\n * for api owners to remove their own products\n */\nexport const kuadrantApiProductDeleteOwnPermission = createPermission({\n name: 'kuadrant.apiproduct.delete.own',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to delete any API product regardless of ownership\n * for platform engineers/admins\n */\nexport const kuadrantApiProductDeleteAllPermission = createPermission({\n name: 'kuadrant.apiproduct.delete.all',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to list API products\n * backend filters results based on .own vs .all read permissions\n */\nexport const kuadrantApiProductListPermission = createPermission({\n name: 'kuadrant.apiproduct.list',\n attributes: { action: 'read' },\n});\n\n// apikey permissions\n\n/**\n * permission to create API keys (request API access)\n *\n * this is a ResourcePermission scoped to 'apiproduct', allowing\n * fine-grained control over which API products users can request access to.\n *\n * use in frontend: useKuadrantPermission(kuadrantApiKeyCreatePermission)\n * use in backend with resource: { permission, resourceRef: 'apiproduct:namespace/name' }\n */\nexport const kuadrantApiKeyCreatePermission = createPermission({\n name: 'kuadrant.apikey.create',\n attributes: { action: 'create' },\n resourceType: 'apiproduct',\n});\n\n/**\n * permission to read API keys owned by the current user\n * allows users to view their own API keys and request history\n */\nexport const kuadrantApiKeyReadOwnPermission = createPermission({\n name: 'kuadrant.apikey.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API keys regardless of ownership\n * for platform engineers/admins who need to view the approval queue and audit keys\n */\nexport const kuadrantApiKeyReadAllPermission = createPermission({\n name: 'kuadrant.apikey.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to update API keys owned by the current user\n * allows users to edit their own pending requests (change plan tier, use case)\n */\nexport const kuadrantApiKeyUpdateOwnPermission = createPermission({\n name: 'kuadrant.apikey.update.own',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to update any API key regardless of ownership\n * typically granted to API owners and platform engineers for approving/rejecting requests\n */\nexport const kuadrantApiKeyUpdateAllPermission = createPermission({\n name: 'kuadrant.apikey.update.all',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to delete API keys owned by the current user\n * allows users to cancel their own requests or revoke their own access\n */\nexport const kuadrantApiKeyDeleteOwnPermission = createPermission({\n name: 'kuadrant.apikey.delete.own',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to delete any API key regardless of ownership\n * for platform engineers/admins who need to revoke access\n */\nexport const kuadrantApiKeyDeleteAllPermission = createPermission({\n name: 'kuadrant.apikey.delete.all',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to approve/reject API key requests\n * grants access to the approval queue - for API owners and admins only\n * separate from update.own which consumers use to edit their pending requests\n */\nexport const kuadrantApiKeyApprovePermission = createPermission({\n name: 'kuadrant.apikey.approve',\n attributes: { action: 'update' },\n});\n\nexport const kuadrantPermissions = [\n kuadrantPlanPolicyCreatePermission,\n kuadrantPlanPolicyReadPermission,\n kuadrantPlanPolicyUpdatePermission,\n kuadrantPlanPolicyDeletePermission,\n kuadrantPlanPolicyListPermission,\n kuadrantApiProductCreatePermission,\n kuadrantApiProductReadOwnPermission,\n kuadrantApiProductReadAllPermission,\n kuadrantApiProductUpdateOwnPermission,\n kuadrantApiProductUpdateAllPermission,\n kuadrantApiProductDeleteOwnPermission,\n kuadrantApiProductDeleteAllPermission,\n kuadrantApiProductListPermission,\n kuadrantApiKeyCreatePermission,\n kuadrantApiKeyReadOwnPermission,\n kuadrantApiKeyReadAllPermission,\n kuadrantApiKeyUpdateOwnPermission,\n kuadrantApiKeyUpdateAllPermission,\n kuadrantApiKeyDeleteOwnPermission,\n kuadrantApiKeyDeleteAllPermission,\n kuadrantApiKeyApprovePermission,\n];\n","import { usePermission } from '@backstage/plugin-permission-react';\nimport { Permission, ResourcePermission } from '@backstage/plugin-permission-common';\n\n/**\n * result of a permission check including error state\n */\nexport interface PermissionCheckResult {\n allowed: boolean;\n loading: boolean;\n error?: Error;\n}\n\n/**\n * custom hook for checking kuadrant permissions that handles both\n * BasicPermission and ResourcePermission types without type bypasses\n *\n * @param permission - the permission to check\n * @param resourceRef - optional resource reference for ResourcePermissions\n * @returns permission check result with error handling\n *\n * @example\n * // basic permission\n * const { allowed, loading, error } = useKuadrantPermission(\n * kuadrantApiProductListPermission\n * );\n *\n * @example\n * // resource permission\n * const { allowed, loading, error } = useKuadrantPermission(\n * kuadrantApiKeyCreatePermission,\n * 'apiproduct:namespace/name'\n * );\n */\nexport function useKuadrantPermission(\n permission: Permission,\n resourceRef?: string,\n): PermissionCheckResult {\n // construct the permission request based on whether it's a ResourcePermission\n const permissionRequest = 'resourceType' in permission\n ? { permission: permission as ResourcePermission, resourceRef }\n : { permission };\n\n const result = usePermission(permissionRequest as any);\n\n return {\n allowed: result.allowed,\n loading: result.loading,\n error: result.error,\n };\n}\n\n/**\n * helper to determine if a user can delete a specific API key or request\n *\n * @param ownerId - the user id who owns the key/request\n * @param currentUserId - the current user's id\n * @param canDeleteOwn - whether user has permission to delete their own keys\n * @param canDeleteAll - whether user has permission to delete all keys\n * @returns true if user can delete this specific key/request\n */\nexport function canDeleteResource(\n ownerId: string,\n currentUserId: string,\n canDeleteOwn: boolean,\n canDeleteAll: boolean,\n): boolean {\n if (canDeleteAll) return true;\n if (canDeleteOwn && ownerId === currentUserId) return true;\n return false;\n}\n","import React, { useState, useEffect } from 'react';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n Button,\n TextField,\n Typography,\n Box,\n CircularProgress,\n} from '@material-ui/core';\nimport WarningIcon from '@material-ui/icons/Warning';\n\nexport interface ConfirmDeleteDialogProps {\n open: boolean;\n title: string;\n description: string;\n // for dangerous deletes, require typing this text to confirm\n confirmText?: string;\n // severity affects styling - 'high' shows warning icon and requires text confirmation\n severity?: 'normal' | 'high';\n deleting?: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n}\n\nexport const ConfirmDeleteDialog = ({\n open,\n title,\n description,\n confirmText,\n severity = 'normal',\n deleting = false,\n onConfirm,\n onCancel,\n}: ConfirmDeleteDialogProps) => {\n const [inputValue, setInputValue] = useState('');\n\n // reset input when dialog opens/closes\n useEffect(() => {\n if (!open) {\n setInputValue('');\n }\n }, [open]);\n\n const requiresTextConfirmation = severity === 'high' && confirmText;\n const canConfirm = requiresTextConfirmation ? inputValue === confirmText : true;\n\n const handleConfirm = () => {\n if (canConfirm) {\n onConfirm();\n }\n };\n\n return (\n <Dialog\n open={open}\n onClose={deleting ? undefined : onCancel}\n maxWidth=\"sm\"\n fullWidth\n >\n <DialogTitle>\n {severity === 'high' && (\n <Box display=\"flex\" alignItems=\"center\" style={{ gap: 8 }}>\n <WarningIcon color=\"error\" />\n <span>{title}</span>\n </Box>\n )}\n {severity !== 'high' && title}\n </DialogTitle>\n <DialogContent>\n <DialogContentText style={{ whiteSpace: 'pre-line' }}>\n {description}\n </DialogContentText>\n {requiresTextConfirmation && (\n <Box mt={2}>\n <Typography variant=\"body2\" color=\"textSecondary\" gutterBottom>\n Type <strong>{confirmText}</strong> to confirm:\n </Typography>\n <TextField\n fullWidth\n variant=\"outlined\"\n size=\"small\"\n value={inputValue}\n onChange={e => setInputValue(e.target.value)}\n disabled={deleting}\n autoFocus\n placeholder={confirmText}\n />\n </Box>\n )}\n </DialogContent>\n <DialogActions>\n <Button onClick={onCancel} disabled={deleting}>\n Cancel\n </Button>\n <Button\n onClick={handleConfirm}\n color=\"secondary\"\n variant=\"contained\"\n disabled={deleting || !canConfirm}\n startIcon={deleting ? <CircularProgress size={16} color=\"inherit\" /> : undefined}\n >\n {deleting ? 'Deleting...' : 'Delete'}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import React from 'react';\nimport { Box, Typography, Chip, useTheme } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\n\ninterface PlanPolicyDetailsProps {\n discoveredPlans?: Array<{\n tier: string;\n limits?: {\n daily?: number;\n monthly?: number;\n yearly?: number;\n };\n }> | null;\n alertSeverity?: 'warning' | 'info';\n alertMessage?: string;\n includeTopMargin?: boolean;\n}\n\nexport const PlanPolicyDetails: React.FC<PlanPolicyDetailsProps> = ({\n discoveredPlans,\n alertSeverity = 'warning',\n alertMessage = 'No PlanPolicy found for this HTTPRoute. API keys and rate limiting may not be available.',\n includeTopMargin = true,\n}) => {\n const theme = useTheme();\n return (\n <Box\n mt={includeTopMargin ? 1 : 0}\n p={2}\n bgcolor={theme.palette.background.default}\n borderRadius={1}\n border={`1px solid ${theme.palette.divider}`}\n >\n {discoveredPlans ? (\n <>\n {discoveredPlans.length > 0 ? (\n <>\n <Typography\n variant=\"caption\"\n display=\"block\"\n gutterBottom\n color=\"textSecondary\"\n style={{ marginTop: 8 }}\n >\n Available PlanPolicy Tiers:\n </Typography>\n <Box display=\"flex\" flexWrap=\"wrap\" mt={1} style={{ gap: 8 }}>\n {discoveredPlans.map((plan: any, idx: number) => {\n const limitText = plan.limits?.daily\n ? `${plan.limits.daily}/day`\n : plan.limits?.monthly\n ? `${plan.limits.monthly}/month`\n : plan.limits?.yearly\n ? `${plan.limits.yearly}/year`\n : 'No limit';\n\n return (\n <Chip\n key={idx}\n label={`${plan.tier}: ${limitText}`}\n size=\"small\"\n variant=\"outlined\"\n color=\"primary\"\n />\n );\n })}\n </Box>\n </>\n ) : (\n <Typography variant=\"caption\" color=\"textSecondary\">\n No plans defined in this PlanPolicy\n </Typography>\n )}\n </>\n ) : (\n <Alert severity={alertSeverity}>{alertMessage}</Alert>\n )}\n </Box>\n );\n};\n","export async function handleFetchError(response: Response): Promise<string> {\n const errorData = await response.json().catch(() => ({}));\n\n switch (response.status) {\n case 400:\n return errorData.error || 'Invalid request. Please check your input.';\n case 403:\n return 'Permission denied. Contact your administrator.';\n case 404:\n return 'Resource not found. It may have been deleted.';\n case 409:\n return 'Resource already exists or conflicts with existing data.';\n case 500:\n return 'Server error. Please try again or contact support.';\n default:\n return errorData.error || `Request failed (${response.status})`;\n }\n}\n"],"names":["validateKubernetesName","value","trim","length","test","validateURL","url","URL","includes","protocol","useStyles","makeStyles","theme","asterisk","color","sectionHeader","display","alignItems","gap","spacing","marginTop","marginBottom","infoIcon","fontSize","palette","text","secondary","tagChip","marginRight","EditAPIProductDialog","open","onClose","onSuccess","namespace","name","classes","config","useApi","configApiRef","fetchApi","fetchApiRef","backendUrl","getString","loading","setLoading","useState","displayName","setDisplayName","description","setDescription","version","setVersion","publishStatus","setPublishStatus","approvalMode","setApprovalMode","tags","setTags","targetRef","setTargetRef","tagInput","setTagInput","contactEmail","setContactEmail","contactTeam","setContactTeam","docsURL","setDocsURL","openAPISpec","setOpenAPISpec","discoveredPlans","setdiscoveredPlans","error","setError","saving","setSaving","openAPISpecError","setOpenAPISpecError","useEffect","fetch","then","async","res","ok","handleFetchError","Error","json","data","spec","contact","email","team","documentation","openAPISpecURL","status","catch","err","message","handleAddTag","Dialog","maxWidth","fullWidth","DialogTitle","DialogContent","Alert","severity","style","Progress","Box","className","Typography","variant","strong","Grid","container","item","xs","TextField","label","onChange","e","target","placeholder","helperText","margin","required","disabled","InputLabelProps","onKeyPress","key","preventDefault","InputProps","endAdornment","InputAdornment","position","IconButton","size","onClick","AddIcon","undefined","flexWrap","map","tag","Chip","onDelete","handleDeleteTag","tagToDelete","filter","multiline","rows","Tooltip","title","InfoOutlinedIcon","handleOpenAPISpecChange","PlanPolicyDetails","alertSeverity","alertMessage","includeTopMargin","FormControl","component","RadioGroup","row","FormControlLabel","control","Radio","DialogActions","Button","patch","response","method","headers","body","JSON","stringify","String","startIcon","CircularProgress","createPermission","attributes","action","kuadrantPlanPolicyListPermission","kuadrantApiProductCreatePermission","kuadrantApiProductReadAllPermission","kuadrantApiProductUpdateOwnPermission","kuadrantApiProductUpdateAllPermission","kuadrantApiProductDeleteOwnPermission","kuadrantApiProductDeleteAllPermission","kuadrantApiProductListPermission","kuadrantApiKeyCreatePermission","resourceType","kuadrantApiKeyReadOwnPermission","kuadrantApiKeyUpdateOwnPermission","kuadrantApiKeyUpdateAllPermission","kuadrantApiKeyDeleteOwnPermission","kuadrantApiKeyDeleteAllPermission","kuadrantApiKeyApprovePermission","useKuadrantPermission","permission","resourceRef","permissionRequest","result","usePermission","allowed","canDeleteResource","ownerId","currentUserId","canDeleteOwn","canDeleteAll","ConfirmDeleteDialog","confirmText","deleting","onConfirm","onCancel","inputValue","setInputValue","requiresTextConfirmation","canConfirm","WarningIcon","span","DialogContentText","whiteSpace","mt","gutterBottom","autoFocus","useTheme","p","bgcolor","background","default","borderRadius","border","divider","plan","idx","limitText","limits","daily","monthly","yearly","tier","errorData"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunkinternal_plugin_kuadrant=self.webpackChunkinternal_plugin_kuadrant||[]).push([[879],{72627:(e,n,t)=>{t.r(n),t.d(n,{ApiKeyDetailPage:()=>P,ApiKeysPage:()=>u,ApiProductDetailPage:()=>b,ApiProductsPage:()=>d,EntityKuadrantApiAccessCard:()=>l,EntityKuadrantApiApprovalTab:()=>A,EntityKuadrantApiKeyManagementTab:()=>c,EntityKuadrantApiKeysContent:()=>m,EntityKuadrantApiProductInfoContent:()=>s,EntityKuadrantApiProductOpenApiAlert:()=>y,KuadrantPage:()=>p,kuadrantPlugin:()=>r});var a=t(22097);const i=(0,a.createRouteRef)({id:"kuadrant"}),o=(0,a.createSubRouteRef)({id:"kuadrant/resource",parent:i,path:"/:kind/:namespace/:name"}),r=(0,a.createPlugin)({id:"kuadrant",routes:{root:i,resource:o}}),p=r.provide((0,a.createRoutableExtension)({name:"KuadrantPage",component:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(5010),t.e(6763),t.e(3984),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5501),t.e(7976),t.e(8799),t.e(2821)]).then(t.bind(t,80243)).then(e=>e.ApiProductsPage),mountPoint:i})),d=r.provide((0,a.createRoutableExtension)({name:"ApiProductsPage",component:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(5010),t.e(6763),t.e(3984),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5501),t.e(7976),t.e(8799),t.e(2821)]).then(t.bind(t,80243)).then(e=>e.ApiProductsPage),mountPoint:i})),u=r.provide((0,a.createRoutableExtension)({name:"ApiKeysPage",component:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(5010),t.e(6763),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5501),t.e(7976),t.e(6840),t.e(4682)]).then(t.bind(t,14682)).then(e=>e.ApiKeysPage),mountPoint:i})),l=r.provide((0,a.createComponentExtension)({name:"EntityKuadrantApiAccessCard",component:{lazy:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(8172),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5427),t.e(5501),t.e(7976),t.e(5203)]).then(t.bind(t,60441)).then(e=>e.ApiAccessCard)}})),c=r.provide((0,a.createComponentExtension)({name:"EntityKuadrantApiKeyManagementTab",component:{lazy:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(5010),t.e(5478),t.e(484),t.e(1942),t.e(5427),t.e(5501),t.e(7976),t.e(6840),t.e(3650)]).then(t.bind(t,23650)).then(e=>e.ApiKeyManagementTab)}})),m=r.provide((0,a.createComponentExtension)({name:"EntityKuadrantApiKeysContent",component:{lazy:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(5010),t.e(5478),t.e(484),t.e(1942),t.e(5427),t.e(5501),t.e(7976),t.e(6840),t.e(3650)]).then(t.bind(t,23650)).then(e=>e.ApiKeyManagementTab)}})),s=r.provide((0,a.createComponentExtension)({name:"EntityKuadrantApiProductInfoContent",component:{lazy:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4382),t.e(327),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5427),t.e(5501),t.e(7976),t.e(3947),t.e(5453)]).then(t.bind(t,75453)).then(e=>e.ApiProductInfoCard)}})),P=r.provide((0,a.createRoutableExtension)({name:"ApiKeyDetailPage",component:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(7076),t.e(6763),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5501),t.e(7976),t.e(2967)]).then(t.bind(t,72967)).then(e=>e.ApiKeyDetailPage),mountPoint:i})),A=r.provide((0,a.createComponentExtension)({name:"EntityKuadrantApiApprovalTab",component:{lazy:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(5010),t.e(5478),t.e(484),t.e(1942),t.e(5427),t.e(5501),t.e(7976),t.e(6800)]).then(t.bind(t,46800)).then(e=>e.EntityApiApprovalTab)}})),y=r.provide((0,a.createComponentExtension)({name:"EntityKuadrantApiProductOpenApiAlert",component:{lazy:()=>Promise.all([t.e(9400),t.e(2946),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5427),t.e(7976),t.e(6371)]).then(t.bind(t,36371)).then(e=>e.ApiProductOpenApiAlert)}})),b=r.provide((0,a.createRoutableExtension)({name:"ApiProductDetailPage",component:()=>Promise.all([t.e(9400),t.e(2946),t.e(2628),t.e(4611),t.e(4382),t.e(4651),t.e(7076),t.e(5235),t.e(6763),t.e(7236),t.e(5478),t.e(9634),t.e(484),t.e(1942),t.e(5501),t.e(7976),t.e(8799),t.e(3947),t.e(7791)]).then(t.bind(t,57791)).then(e=>e.ApiProductDetailPage),mountPoint:i}))}}]);
2
- //# sourceMappingURL=exposed-PluginRoot.ed95fa78.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/exposed-PluginRoot.ed95fa78.chunk.js","mappings":"0gBAEO,MAAMA,GAAeC,EAAAA,EAAAA,gBAAe,CACzCC,GAAI,aAGOC,GAAmBC,EAAAA,EAAAA,mBAAkB,CAChDF,GAAI,oBACJG,OAAQL,EACRM,KAAM,4BCDKC,GAAiBC,EAAAA,EAAAA,cAAa,CACzCN,GAAI,WACJO,OAAQ,CACNC,KAAMV,EACNW,SAAUR,KAIDS,EAAeL,EAAeM,SACzCC,EAAAA,EAAAA,yBAAwB,CACtBC,KAAM,eACNC,UAAW,IACT,kOAAoCC,KAAKC,GAAKA,EAAEC,iBAClDC,WAAYpB,KAIHmB,EAAkBZ,EAAeM,SAC5CC,EAAAA,EAAAA,yBAAwB,CACtBC,KAAM,kBACNC,UAAW,IACT,kOAAoCC,KAAKC,GAAKA,EAAEC,iBAClDC,WAAYpB,KAIHqB,EAAcd,EAAeM,SACxCC,EAAAA,EAAAA,yBAAwB,CACtBC,KAAM,cACNC,UAAW,IACT,wNAAmCC,KAAKC,GAAKA,EAAEG,aACjDD,WAAYpB,KAIHsB,EAA8Bf,EAAeM,SACxDU,EAAAA,EAAAA,0BAAyB,CACvBR,KAAM,8BACNC,UAAW,CACTQ,KAAM,IACJ,0LAAqCP,KAAKC,GAAKA,EAAEO,mBAK5CC,EAAoCnB,EAAeM,SAC9DU,EAAAA,EAAAA,0BAAyB,CACvBR,KAAM,oCACNC,UAAW,CACTQ,KAAM,IACJ,8MAA2CP,KAAKC,GAAKA,EAAES,yBAMlDC,EAA+BrB,EAAeM,SACzDU,EAAAA,EAAAA,0BAAyB,CACvBR,KAAM,+BACNC,UAAW,CACTQ,KAAM,IACJ,8MAA2CP,KAAKC,GAAKA,EAAES,yBAKlDE,EAAsCtB,EAAeM,SAChEU,EAAAA,EAAAA,0BAAyB,CACvBR,KAAM,sCACNC,UAAW,CACTQ,KAAM,IACJ,+KAA0CP,KAAKC,GAAKA,EAAEY,wBAKjDC,EAAmBxB,EAAeM,SAC7CC,EAAAA,EAAAA,yBAAwB,CACtBC,KAAM,mBACNC,UAAW,IACT,sKAAwCC,KAAKC,GAAKA,EAAEa,kBACtDX,WAAYpB,KAIHgC,EAA+BzB,EAAeM,SACzDU,EAAAA,EAAAA,0BAAyB,CACvBR,KAAM,+BACNC,UAAW,CACTQ,KAAM,IACJ,oMAA4CP,KAAKC,GAAKA,EAAEe,0BAKnDC,EAAuC3B,EAAeM,SACjEU,EAAAA,EAAAA,0BAAyB,CACvBR,KAAM,uCACNC,UAAW,CACTQ,KAAM,IACJ,8HAA8CP,KAAKC,GAAKA,EAAEiB,4BAKrDC,EAAuB7B,EAAeM,SACjDC,EAAAA,EAAAA,yBAAwB,CACtBC,KAAM,uBACNC,UAAW,IACT,kOAA4CC,KAAKC,GAAKA,EAAEkB,sBAC1DhB,WAAYpB,I","sources":["webpack://internal.plugin-kuadrant/./src/routes.ts","webpack://internal.plugin-kuadrant/./src/plugin.ts"],"sourcesContent":["import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'kuadrant',\n});\n\nexport const resourceRouteRef = createSubRouteRef({\n id: 'kuadrant/resource',\n parent: rootRouteRef,\n path: '/:kind/:namespace/:name',\n});\n","import {\n createPlugin,\n createRoutableExtension,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef, resourceRouteRef } from './routes';\n\nexport const kuadrantPlugin = createPlugin({\n id: 'kuadrant',\n routes: {\n root: rootRouteRef,\n resource: resourceRouteRef,\n },\n});\n\nexport const KuadrantPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'KuadrantPage',\n component: () =>\n import('./components/KuadrantPage').then(m => m.ApiProductsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ApiProductsPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiProductsPage',\n component: () =>\n import('./components/KuadrantPage').then(m => m.ApiProductsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ApiKeysPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiKeysPage',\n component: () =>\n import('./components/ApiKeysPage').then(m => m.ApiKeysPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const EntityKuadrantApiAccessCard = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiAccessCard',\n component: {\n lazy: () =>\n import('./components/ApiAccessCard').then(m => m.ApiAccessCard),\n },\n }),\n);\n\nexport const EntityKuadrantApiKeyManagementTab = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiKeyManagementTab',\n component: {\n lazy: () =>\n import('./components/ApiKeyManagementTab').then(m => m.ApiKeyManagementTab),\n },\n }),\n);\n\n// entity content extension for api keys tab\nexport const EntityKuadrantApiKeysContent = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiKeysContent',\n component: {\n lazy: () =>\n import('./components/ApiKeyManagementTab').then(m => m.ApiKeyManagementTab),\n },\n }),\n);\n\nexport const EntityKuadrantApiProductInfoContent = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiProductInfoContent',\n component: {\n lazy: () =>\n import('./components/ApiProductInfoCard').then(m => m.ApiProductInfoCard),\n },\n }),\n);\n\nexport const ApiKeyDetailPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiKeyDetailPage',\n component: () =>\n import('./components/ApiKeyDetailPage').then(m => m.ApiKeyDetailPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const EntityKuadrantApiApprovalTab = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiApprovalTab',\n component: {\n lazy: () =>\n import('./components/EntityApiApprovalTab').then(m => m.EntityApiApprovalTab),\n },\n }),\n);\n\nexport const EntityKuadrantApiProductOpenApiAlert = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiProductOpenApiAlert',\n component: {\n lazy: () =>\n import('./components/ApiProductOpenApiAlert').then(m => m.ApiProductOpenApiAlert),\n },\n }),\n);\n\nexport const ApiProductDetailPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiProductDetailPage',\n component: () =>\n import('./components/ApiProductDetailPage').then(m => m.ApiProductDetailPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":["rootRouteRef","createRouteRef","id","resourceRouteRef","createSubRouteRef","parent","path","kuadrantPlugin","createPlugin","routes","root","resource","KuadrantPage","provide","createRoutableExtension","name","component","then","m","ApiProductsPage","mountPoint","ApiKeysPage","EntityKuadrantApiAccessCard","createComponentExtension","lazy","ApiAccessCard","EntityKuadrantApiKeyManagementTab","ApiKeyManagementTab","EntityKuadrantApiKeysContent","EntityKuadrantApiProductInfoContent","ApiProductInfoCard","ApiKeyDetailPage","EntityKuadrantApiApprovalTab","EntityApiApprovalTab","EntityKuadrantApiProductOpenApiAlert","ApiProductOpenApiAlert","ApiProductDetailPage"],"sourceRoot":""}