@kartverket/backstage-plugin-risk-scorecard 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/PluginRoot.esm.js +3 -3
  2. package/dist/PluginRoot.esm.js.map +1 -1
  3. package/dist/components/common/EditButton.esm.js +2 -2
  4. package/dist/components/common/EditButton.esm.js.map +1 -1
  5. package/dist/components/common/GitPullRequestIcon.esm.js +5 -5
  6. package/dist/components/common/GitPullRequestIcon.esm.js.map +1 -1
  7. package/dist/components/common/Input.esm.js +6 -6
  8. package/dist/components/common/Input.esm.js.map +1 -1
  9. package/dist/components/common/Select.esm.js +6 -6
  10. package/dist/components/common/Select.esm.js.map +1 -1
  11. package/dist/components/common/SopsConfigButton.esm.js +4 -4
  12. package/dist/components/common/SopsConfigButton.esm.js.map +1 -1
  13. package/dist/components/common/Spinner.esm.js +3 -3
  14. package/dist/components/common/Spinner.esm.js.map +1 -1
  15. package/dist/components/riScDialog/MatrixDialog.esm.js +6 -6
  16. package/dist/components/riScDialog/MatrixDialog.esm.js.map +1 -1
  17. package/dist/components/riScDialog/RiScDialog.esm.js +9 -9
  18. package/dist/components/riScDialog/RiScDialog.esm.js.map +1 -1
  19. package/dist/components/riScInfo/MigrationDialog.esm.js +60 -0
  20. package/dist/components/riScInfo/MigrationDialog.esm.js.map +1 -0
  21. package/dist/components/riScInfo/PublishDialog.esm.js +52 -0
  22. package/dist/components/riScInfo/PublishDialog.esm.js.map +1 -0
  23. package/dist/components/riScInfo/RiScInfo.esm.js +7 -7
  24. package/dist/components/riScInfo/RiScInfo.esm.js.map +1 -1
  25. package/dist/components/riScInfo/riScStatus/DifferenceText.esm.js +18 -18
  26. package/dist/components/riScInfo/riScStatus/DifferenceText.esm.js.map +1 -1
  27. package/dist/components/riScInfo/riScStatus/Progress.esm.js +13 -0
  28. package/dist/components/riScInfo/riScStatus/Progress.esm.js.map +1 -0
  29. package/dist/components/riScInfo/riScStatus/RiScDifferenceDialog.esm.js +13 -31
  30. package/dist/components/riScInfo/riScStatus/RiScDifferenceDialog.esm.js.map +1 -1
  31. package/dist/components/riScInfo/riScStatus/RiScStatusComponent.esm.js +87 -131
  32. package/dist/components/riScInfo/riScStatus/RiScStatusComponent.esm.js.map +1 -1
  33. package/dist/components/riScPlugin/RiScPlugin.esm.js +18 -30
  34. package/dist/components/riScPlugin/RiScPlugin.esm.js.map +1 -1
  35. package/dist/components/riskMatrix/AggregatedCost.esm.js +2 -2
  36. package/dist/components/riskMatrix/AggregatedCost.esm.js.map +1 -1
  37. package/dist/components/riskMatrix/EstimatedRiskInfoDialog.esm.js +2 -2
  38. package/dist/components/riskMatrix/EstimatedRiskInfoDialog.esm.js.map +1 -1
  39. package/dist/components/riskMatrix/RiskMatrix.esm.js +6 -6
  40. package/dist/components/riskMatrix/RiskMatrix.esm.js.map +1 -1
  41. package/dist/components/riskMatrix/RiskMatrixScenarioCount.esm.js +8 -8
  42. package/dist/components/riskMatrix/RiskMatrixScenarioCount.esm.js.map +1 -1
  43. package/dist/components/riskMatrix/Tabs.esm.js +6 -6
  44. package/dist/components/riskMatrix/Tabs.esm.js.map +1 -1
  45. package/dist/components/scenarioDrawer/ScenarioDrawer.esm.js +18 -18
  46. package/dist/components/scenarioDrawer/ScenarioDrawer.esm.js.map +1 -1
  47. package/dist/components/scenarioDrawer/components/ActionBox.esm.js +77 -32
  48. package/dist/components/scenarioDrawer/components/ActionBox.esm.js.map +1 -1
  49. package/dist/components/scenarioDrawer/components/ActionFormItem.esm.js +11 -11
  50. package/dist/components/scenarioDrawer/components/ActionFormItem.esm.js.map +1 -1
  51. package/dist/components/scenarioDrawer/components/ActionsSection.esm.js +6 -6
  52. package/dist/components/scenarioDrawer/components/ActionsSection.esm.js.map +1 -1
  53. package/dist/components/scenarioDrawer/components/DeleteConfirmation.esm.js +15 -13
  54. package/dist/components/scenarioDrawer/components/DeleteConfirmation.esm.js.map +1 -1
  55. package/dist/components/scenarioDrawer/components/RiskFormSection.esm.js +8 -8
  56. package/dist/components/scenarioDrawer/components/RiskFormSection.esm.js.map +1 -1
  57. package/dist/components/scenarioDrawer/components/RiskSection.esm.js +8 -8
  58. package/dist/components/scenarioDrawer/components/RiskSection.esm.js.map +1 -1
  59. package/dist/components/scenarioDrawer/components/ScopeFormSection.esm.js +5 -5
  60. package/dist/components/scenarioDrawer/components/ScopeFormSection.esm.js.map +1 -1
  61. package/dist/components/scenarioDrawer/components/ScopeSection.esm.js +8 -8
  62. package/dist/components/scenarioDrawer/components/ScopeSection.esm.js.map +1 -1
  63. package/dist/components/scenarioTable/ScenarioTable.esm.js +37 -28
  64. package/dist/components/scenarioTable/ScenarioTable.esm.js.map +1 -1
  65. package/dist/components/scenarioTable/ScenarioTableRow.esm.js +23 -11
  66. package/dist/components/scenarioTable/ScenarioTableRow.esm.js.map +1 -1
  67. package/dist/components/scenarioWizard/ScenarioWizard.esm.js +18 -18
  68. package/dist/components/scenarioWizard/ScenarioWizard.esm.js.map +1 -1
  69. package/dist/components/scenarioWizard/components/CloseConfirmation.esm.js +2 -2
  70. package/dist/components/scenarioWizard/components/CloseConfirmation.esm.js.map +1 -1
  71. package/dist/components/scenarioWizard/components/ConsequenceTable.esm.js +10 -10
  72. package/dist/components/scenarioWizard/components/ConsequenceTable.esm.js.map +1 -1
  73. package/dist/components/scenarioWizard/components/ProbabilityTable.esm.js +9 -9
  74. package/dist/components/scenarioWizard/components/ProbabilityTable.esm.js.map +1 -1
  75. package/dist/components/scenarioWizard/components/RiskRadioButton.esm.js +3 -3
  76. package/dist/components/scenarioWizard/components/RiskRadioButton.esm.js.map +1 -1
  77. package/dist/components/scenarioWizard/steps/ActionsStep.esm.js +12 -12
  78. package/dist/components/scenarioWizard/steps/ActionsStep.esm.js.map +1 -1
  79. package/dist/components/scenarioWizard/steps/RiskStep.esm.js +2 -2
  80. package/dist/components/scenarioWizard/steps/RiskStep.esm.js.map +1 -1
  81. package/dist/components/scenarioWizard/steps/ScenarioStep.esm.js +5 -5
  82. package/dist/components/scenarioWizard/steps/ScenarioStep.esm.js.map +1 -1
  83. package/dist/components/sopsConfigDialog/AgeKeysComponent.esm.js +9 -9
  84. package/dist/components/sopsConfigDialog/AgeKeysComponent.esm.js.map +1 -1
  85. package/dist/components/sopsConfigDialog/GcpCryptoKeyMenu.esm.js +10 -9
  86. package/dist/components/sopsConfigDialog/GcpCryptoKeyMenu.esm.js.map +1 -1
  87. package/dist/components/sopsConfigDialog/GcpCryptoKeyMenuItem.esm.js +6 -6
  88. package/dist/components/sopsConfigDialog/GcpCryptoKeyMenuItem.esm.js.map +1 -1
  89. package/dist/components/sopsConfigDialog/OpenPullRequestButton.esm.js +4 -4
  90. package/dist/components/sopsConfigDialog/OpenPullRequestButton.esm.js.map +1 -1
  91. package/dist/components/sopsConfigDialog/PublicKeyList.esm.js +8 -8
  92. package/dist/components/sopsConfigDialog/PublicKeyList.esm.js.map +1 -1
  93. package/dist/components/sopsConfigDialog/PullRequestComponent.esm.js +4 -4
  94. package/dist/components/sopsConfigDialog/PullRequestComponent.esm.js.map +1 -1
  95. package/dist/components/sopsConfigDialog/SopsConfigDialog.esm.js +13 -13
  96. package/dist/components/sopsConfigDialog/SopsConfigDialog.esm.js.map +1 -1
  97. package/dist/contexts/RiScContext.esm.js +41 -23
  98. package/dist/contexts/RiScContext.esm.js.map +1 -1
  99. package/dist/contexts/ScenarioContext.esm.js +4 -4
  100. package/dist/contexts/ScenarioContext.esm.js.map +1 -1
  101. package/dist/utils/hooks.esm.js +78 -45
  102. package/dist/utils/hooks.esm.js.map +1 -1
  103. package/dist/utils/translations.esm.js +34 -16
  104. package/dist/utils/translations.esm.js.map +1 -1
  105. package/dist/utils/utilityfunctions.esm.js +28 -25
  106. package/dist/utils/utilityfunctions.esm.js.map +1 -1
  107. package/package.json +1 -1
  108. package/dist/components/common/Icons.esm.js +0 -27
  109. package/dist/components/common/Icons.esm.js.map +0 -1
  110. package/dist/components/scenarioDrawer/components/DeleteActionConfirmation.esm.js +0 -27
  111. package/dist/components/scenarioDrawer/components/DeleteActionConfirmation.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Routes, Route } from 'react-router-dom';
3
3
  import { CacheProvider } from '@emotion/react';
4
4
  import createCache from '@emotion/cache';
@@ -14,8 +14,8 @@ const cache = createCache({
14
14
  key: "css",
15
15
  insertionPoint: emotionInsertionPoint
16
16
  });
17
- const ProvidedPlugin = () => /* @__PURE__ */ React.createElement(CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(RiScProvider, null, /* @__PURE__ */ React.createElement(ScenarioProvider, null, /* @__PURE__ */ React.createElement(RiScPlugin, null))));
18
- const PluginRoot = () => /* @__PURE__ */ React.createElement(Routes, null, /* @__PURE__ */ React.createElement(Route, { path: "/", element: /* @__PURE__ */ React.createElement(ProvidedPlugin, null) }), /* @__PURE__ */ React.createElement(Route, { path: riScRouteRef.path, element: /* @__PURE__ */ React.createElement(ProvidedPlugin, null) }), /* @__PURE__ */ React.createElement(Route, { path: scenarioRouteRef.path, element: /* @__PURE__ */ React.createElement(ProvidedPlugin, null) }));
17
+ const ProvidedPlugin = () => /* @__PURE__ */ React__default.createElement(CacheProvider, { value: cache }, /* @__PURE__ */ React__default.createElement(RiScProvider, null, /* @__PURE__ */ React__default.createElement(ScenarioProvider, null, /* @__PURE__ */ React__default.createElement(RiScPlugin, null))));
18
+ const PluginRoot = () => /* @__PURE__ */ React__default.createElement(Routes, null, /* @__PURE__ */ React__default.createElement(Route, { path: "/", element: /* @__PURE__ */ React__default.createElement(ProvidedPlugin, null) }), /* @__PURE__ */ React__default.createElement(Route, { path: riScRouteRef.path, element: /* @__PURE__ */ React__default.createElement(ProvidedPlugin, null) }), /* @__PURE__ */ React__default.createElement(Route, { path: scenarioRouteRef.path, element: /* @__PURE__ */ React__default.createElement(ProvidedPlugin, null) }));
19
19
 
20
20
  export { PluginRoot };
21
21
  //# sourceMappingURL=PluginRoot.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginRoot.esm.js","sources":["../src/PluginRoot.tsx"],"sourcesContent":["import React from 'react';\nimport { Route, Routes } from 'react-router-dom';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport { RiScPlugin } from './components/riScPlugin/RiScPlugin';\nimport { ScenarioProvider } from './contexts/ScenarioContext';\nimport { riScRouteRef, scenarioRouteRef } from './routes';\nimport { RiScProvider } from './contexts/RiScContext';\n\nconst emotionInsertionPoint = document.createElement('meta');\nemotionInsertionPoint.setAttribute('name', 'emotion-insertion-point');\ndocument.querySelector('head')?.appendChild(emotionInsertionPoint);\n\nconst cache = createCache({\n key: 'css',\n insertionPoint: emotionInsertionPoint,\n});\n\nconst ProvidedPlugin = () => (\n <CacheProvider value={cache}>\n <RiScProvider>\n <ScenarioProvider>\n <RiScPlugin />\n </ScenarioProvider>\n </RiScProvider>\n </CacheProvider>\n);\n\nexport const PluginRoot = () => (\n <Routes>\n <Route path=\"/\" element={<ProvidedPlugin />} />\n <Route path={riScRouteRef.path} element={<ProvidedPlugin />} />\n <Route path={scenarioRouteRef.path} element={<ProvidedPlugin />} />\n </Routes>\n);\n"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,qBAAA,GAAwB,QAAS,CAAA,aAAA,CAAc,MAAM,CAAA;AAC3D,qBAAsB,CAAA,YAAA,CAAa,QAAQ,yBAAyB,CAAA;AACpE,QAAA,CAAS,aAAc,CAAA,MAAM,CAAG,EAAA,WAAA,CAAY,qBAAqB,CAAA;AAEjE,MAAM,QAAQ,WAAY,CAAA;AAAA,EACxB,GAAK,EAAA,KAAA;AAAA,EACL,cAAgB,EAAA;AAClB,CAAC,CAAA;AAED,MAAM,cAAiB,GAAA,sBACpB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EAAc,OAAO,KACpB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,YACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,gBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,IAAA,CACd,CACF,CACF,CAAA;AAGK,MAAM,UAAa,GAAA,sBACvB,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,sCACE,KAAM,EAAA,EAAA,IAAA,EAAK,GAAI,EAAA,OAAA,kBAAU,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAe,CAAI,EAAA,CAAA,sCAC5C,KAAM,EAAA,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAM,OAAS,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,IAAA,CAAA,EAAI,mBAC5D,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAM,IAAM,EAAA,gBAAA,CAAiB,IAAM,EAAA,OAAA,kBAAU,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAe,GAAI,CACnE;;;;"}
1
+ {"version":3,"file":"PluginRoot.esm.js","sources":["../src/PluginRoot.tsx"],"sourcesContent":["import React from 'react';\nimport { Route, Routes } from 'react-router-dom';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport { RiScPlugin } from './components/riScPlugin/RiScPlugin';\nimport { ScenarioProvider } from './contexts/ScenarioContext';\nimport { riScRouteRef, scenarioRouteRef } from './routes';\nimport { RiScProvider } from './contexts/RiScContext';\n\nconst emotionInsertionPoint = document.createElement('meta');\nemotionInsertionPoint.setAttribute('name', 'emotion-insertion-point');\ndocument.querySelector('head')?.appendChild(emotionInsertionPoint);\n\nconst cache = createCache({\n key: 'css',\n insertionPoint: emotionInsertionPoint,\n});\n\nconst ProvidedPlugin = () => (\n <CacheProvider value={cache}>\n <RiScProvider>\n <ScenarioProvider>\n <RiScPlugin />\n </ScenarioProvider>\n </RiScProvider>\n </CacheProvider>\n);\n\nexport const PluginRoot = () => (\n <Routes>\n <Route path=\"/\" element={<ProvidedPlugin />} />\n <Route path={riScRouteRef.path} element={<ProvidedPlugin />} />\n <Route path={scenarioRouteRef.path} element={<ProvidedPlugin />} />\n </Routes>\n);\n"],"names":["React"],"mappings":";;;;;;;;;AASA,MAAM,qBAAA,GAAwB,QAAS,CAAA,aAAA,CAAc,MAAM,CAAA;AAC3D,qBAAsB,CAAA,YAAA,CAAa,QAAQ,yBAAyB,CAAA;AACpE,QAAA,CAAS,aAAc,CAAA,MAAM,CAAG,EAAA,WAAA,CAAY,qBAAqB,CAAA;AAEjE,MAAM,QAAQ,WAAY,CAAA;AAAA,EACxB,GAAK,EAAA,KAAA;AAAA,EACL,cAAgB,EAAA;AAClB,CAAC,CAAA;AAED,MAAM,cAAiB,GAAA,sBACpBA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EAAc,OAAO,KACpB,EAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,YACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,gBACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,UAAW,EAAA,IAAA,CACd,CACF,CACF,CAAA;AAGK,MAAM,UAAa,GAAA,sBACvBA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,+CACE,KAAM,EAAA,EAAA,IAAA,EAAK,GAAI,EAAA,OAAA,kBAAUA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAe,CAAI,EAAA,CAAA,+CAC5C,KAAM,EAAA,EAAA,IAAA,EAAM,YAAa,CAAA,IAAA,EAAM,OAAS,kBAAAA,cAAA,CAAA,aAAA,CAAC,cAAe,EAAA,IAAA,CAAA,EAAI,mBAC5DA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAM,IAAM,EAAA,gBAAA,CAAiB,IAAM,EAAA,OAAA,kBAAUA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAe,GAAI,CACnE;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { makeStyles, IconButton } from '@material-ui/core';
3
3
  import EditIcon from '@mui/icons-material/Edit';
4
4
 
@@ -9,7 +9,7 @@ const useEditButtonStyle = makeStyles((theme) => ({
9
9
  }));
10
10
  const EditButton = (props) => {
11
11
  const { icon } = useEditButtonStyle();
12
- return /* @__PURE__ */ React.createElement(IconButton, { size: "small", ...props }, /* @__PURE__ */ React.createElement(EditIcon, { className: icon, "aria-label": "Edit" }));
12
+ return /* @__PURE__ */ React__default.createElement(IconButton, { size: "small", ...props }, /* @__PURE__ */ React__default.createElement(EditIcon, { className: icon, "aria-label": "Edit" }));
13
13
  };
14
14
 
15
15
  export { EditButton as default };
@@ -1 +1 @@
1
- {"version":3,"file":"EditButton.esm.js","sources":["../../../src/components/common/EditButton.tsx"],"sourcesContent":["import React from 'react';\nimport {\n IconButton,\n IconButtonProps,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport EditIcon from '@mui/icons-material/Edit';\n\nconst useEditButtonStyle = makeStyles((theme: Theme) => ({\n icon: {\n color: theme.palette.type === 'dark' ? '#fff' : 'rgba(0, 0, 0, 0.54)',\n },\n}));\n\nconst EditButton = (props: IconButtonProps) => {\n const { icon } = useEditButtonStyle();\n\n return (\n <IconButton size=\"small\" {...props}>\n <EditIcon className={icon} aria-label=\"Edit\" />\n </IconButton>\n );\n};\n\nexport default EditButton;\n"],"names":[],"mappings":";;;;AASA,MAAM,kBAAA,GAAqB,UAAW,CAAA,CAAC,KAAkB,MAAA;AAAA,EACvD,IAAM,EAAA;AAAA,IACJ,KAAO,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA;AAAA;AAEpD,CAAE,CAAA,CAAA;AAEI,MAAA,UAAA,GAAa,CAAC,KAA2B,KAAA;AAC7C,EAAM,MAAA,EAAE,IAAK,EAAA,GAAI,kBAAmB,EAAA;AAEpC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,IAAK,EAAA,OAAA,EAAS,GAAG,KAAA,EAAA,kBAC1B,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,SAAW,EAAA,IAAA,EAAM,YAAW,EAAA,MAAA,EAAO,CAC/C,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EditButton.esm.js","sources":["../../../src/components/common/EditButton.tsx"],"sourcesContent":["import React from 'react';\nimport {\n IconButton,\n IconButtonProps,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport EditIcon from '@mui/icons-material/Edit';\n\nconst useEditButtonStyle = makeStyles((theme: Theme) => ({\n icon: {\n color: theme.palette.type === 'dark' ? '#fff' : 'rgba(0, 0, 0, 0.54)',\n },\n}));\n\nconst EditButton = (props: IconButtonProps) => {\n const { icon } = useEditButtonStyle();\n\n return (\n <IconButton size=\"small\" {...props}>\n <EditIcon className={icon} aria-label=\"Edit\" />\n </IconButton>\n );\n};\n\nexport default EditButton;\n"],"names":["React"],"mappings":";;;;AASA,MAAM,kBAAA,GAAqB,UAAW,CAAA,CAAC,KAAkB,MAAA;AAAA,EACvD,IAAM,EAAA;AAAA,IACJ,KAAO,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA;AAAA;AAEpD,CAAE,CAAA,CAAA;AAEI,MAAA,UAAA,GAAa,CAAC,KAA2B,KAAA;AAC7C,EAAM,MAAA,EAAE,IAAK,EAAA,GAAI,kBAAmB,EAAA;AAEpC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,IAAK,EAAA,OAAA,EAAS,GAAG,KAAA,EAAA,kBAC1BA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,SAAW,EAAA,IAAA,EAAM,YAAW,EAAA,MAAA,EAAO,CAC/C,CAAA;AAEJ;;;;"}
@@ -1,8 +1,8 @@
1
1
  import SvgIcon from '@mui/material/SvgIcon';
2
- import React from 'react';
2
+ import React__default from 'react';
3
3
 
4
4
  const GitPullRequestIcon = () => {
5
- return /* @__PURE__ */ React.createElement(
5
+ return /* @__PURE__ */ React__default.createElement(
6
6
  SvgIcon,
7
7
  {
8
8
  version: "1.0",
@@ -12,20 +12,20 @@ const GitPullRequestIcon = () => {
12
12
  viewBox: "0 0 512.000000 512.000000",
13
13
  preserveAspectRatio: "xMidYMid meet"
14
14
  },
15
- /* @__PURE__ */ React.createElement(
15
+ /* @__PURE__ */ React__default.createElement(
16
16
  "g",
17
17
  {
18
18
  transform: "translate(0.000000,512.000000) scale(0.100000,-0.100000)",
19
19
  fill: "#000000",
20
20
  stroke: "none"
21
21
  },
22
- /* @__PURE__ */ React.createElement(
22
+ /* @__PURE__ */ React__default.createElement(
23
23
  "path",
24
24
  {
25
25
  d: "M2735 5104 c-45 -24 -693 -673 -716 -716 -23 -44 -24 -86 -5 -131 8\n-18 168 -185 362 -379 374 -371 373 -371 455 -354 95 19 154 130 115 219 -8\n18 -100 117 -205 222 -105 104 -191 193 -191 198 0 4 262 6 583 5 655 -4 631\n-1 749 -81 73 -49 145 -139 179 -224 22 -54 24 -75 27 -293 2 -129 1 -667 -3\n-1196 l-7 -961 -51 -13 c-113 -29 -244 -116 -334 -222 -242 -285 -225 -705 39\n-969 76 -76 183 -142 284 -175 80 -26 102 -29 224 -29 122 0 144 3 224 29 392\n129 597 565 443 946 -80 197 -257 364 -444 416 l-66 19 7 655 c3 360 7 896 8\n1190 1 520 0 537 -21 615 -70 258 -250 461 -487 551 -138 52 -171 54 -782 54\nl-566 0 191 193 c106 105 196 205 202 220 28 73 4 152 -61 200 -36 27 -114 32\n-153 11z m1565 -3995 c152 -24 275 -131 320 -276 24 -78 25 -138 5 -217 -30\n-113 -114 -213 -223 -264 -50 -24 -69 -27 -162 -27 -93 0 -112 3 -162 27 -67\n31 -147 103 -183 163 -31 53 -55 144 -55 206 0 100 57 222 138 296 42 37 137\n82 194 92 29 5 55 9 58 10 3 0 34 -4 70 -10z"
26
26
  }
27
27
  ),
28
- /* @__PURE__ */ React.createElement(
28
+ /* @__PURE__ */ React__default.createElement(
29
29
  "path",
30
30
  {
31
31
  d: "M810 5033 c-142 -18 -286 -79 -390 -165 -217 -180 -311 -488 -229\n-753 37 -123 85 -202 184 -301 78 -79 103 -98 185 -137 52 -25 110 -48 128\n-52 l32 -7 0 -1098 0 -1099 -32 -9 c-391 -112 -615 -524 -493 -908 35 -112 88\n-197 180 -289 93 -93 160 -135 282 -178 82 -29 98 -31 223 -31 125 0 141 2\n223 31 122 43 189 85 282 178 92 93 136 161 176 278 127 368 -83 787 -453 908\nl-68 22 0 1097 0 1097 68 22 c111 37 190 87 282 180 93 94 142 175 179 296\n116 376 -121 797 -502 895 -77 19 -200 31 -257 23z m130 -324 c152 -24 275\n-131 320 -276 24 -78 25 -138 5 -217 -30 -113 -114 -213 -223 -264 -50 -24\n-69 -27 -162 -27 -93 0 -112 3 -162 27 -67 31 -147 103 -183 163 -31 53 -55\n144 -55 206 0 100 57 222 138 296 42 37 137 82 194 92 29 5 55 9 58 10 3 0 34\n-4 70 -10z m-1 -3599 c152 -25 276 -132 321 -277 24 -78 25 -138 5 -217 -30\n-113 -114 -213 -223 -264 -50 -24 -69 -27 -162 -27 -93 0 -112 3 -162 27 -67\n31 -147 103 -183 163 -31 53 -55 144 -55 206 0 100 57 222 138 296 42 37 137\n82 194 92 29 5 55 9 58 10 3 0 34 -4 69 -9z"
@@ -1 +1 @@
1
- {"version":3,"file":"GitPullRequestIcon.esm.js","sources":["../../../src/components/common/GitPullRequestIcon.tsx"],"sourcesContent":["import SvgIcon from '@mui/material/SvgIcon';\nimport React from 'react';\n\nexport const GitPullRequestIcon = () => {\n return (\n <SvgIcon\n version=\"1.0\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"512.000000pt\"\n height=\"512.000000pt\"\n viewBox=\"0 0 512.000000 512.000000\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <g\n transform=\"translate(0.000000,512.000000) scale(0.100000,-0.100000)\"\n fill=\"#000000\"\n stroke=\"none\"\n >\n <path\n d=\"M2735 5104 c-45 -24 -693 -673 -716 -716 -23 -44 -24 -86 -5 -131 8\n-18 168 -185 362 -379 374 -371 373 -371 455 -354 95 19 154 130 115 219 -8\n18 -100 117 -205 222 -105 104 -191 193 -191 198 0 4 262 6 583 5 655 -4 631\n-1 749 -81 73 -49 145 -139 179 -224 22 -54 24 -75 27 -293 2 -129 1 -667 -3\n-1196 l-7 -961 -51 -13 c-113 -29 -244 -116 -334 -222 -242 -285 -225 -705 39\n-969 76 -76 183 -142 284 -175 80 -26 102 -29 224 -29 122 0 144 3 224 29 392\n129 597 565 443 946 -80 197 -257 364 -444 416 l-66 19 7 655 c3 360 7 896 8\n1190 1 520 0 537 -21 615 -70 258 -250 461 -487 551 -138 52 -171 54 -782 54\nl-566 0 191 193 c106 105 196 205 202 220 28 73 4 152 -61 200 -36 27 -114 32\n-153 11z m1565 -3995 c152 -24 275 -131 320 -276 24 -78 25 -138 5 -217 -30\n-113 -114 -213 -223 -264 -50 -24 -69 -27 -162 -27 -93 0 -112 3 -162 27 -67\n31 -147 103 -183 163 -31 53 -55 144 -55 206 0 100 57 222 138 296 42 37 137\n82 194 92 29 5 55 9 58 10 3 0 34 -4 70 -10z\"\n />\n <path\n d=\"M810 5033 c-142 -18 -286 -79 -390 -165 -217 -180 -311 -488 -229\n-753 37 -123 85 -202 184 -301 78 -79 103 -98 185 -137 52 -25 110 -48 128\n-52 l32 -7 0 -1098 0 -1099 -32 -9 c-391 -112 -615 -524 -493 -908 35 -112 88\n-197 180 -289 93 -93 160 -135 282 -178 82 -29 98 -31 223 -31 125 0 141 2\n223 31 122 43 189 85 282 178 92 93 136 161 176 278 127 368 -83 787 -453 908\nl-68 22 0 1097 0 1097 68 22 c111 37 190 87 282 180 93 94 142 175 179 296\n116 376 -121 797 -502 895 -77 19 -200 31 -257 23z m130 -324 c152 -24 275\n-131 320 -276 24 -78 25 -138 5 -217 -30 -113 -114 -213 -223 -264 -50 -24\n-69 -27 -162 -27 -93 0 -112 3 -162 27 -67 31 -147 103 -183 163 -31 53 -55\n144 -55 206 0 100 57 222 138 296 42 37 137 82 194 92 29 5 55 9 58 10 3 0 34\n-4 70 -10z m-1 -3599 c152 -25 276 -132 321 -277 24 -78 25 -138 5 -217 -30\n-113 -114 -213 -223 -264 -50 -24 -69 -27 -162 -27 -93 0 -112 3 -162 27 -67\n31 -147 103 -183 163 -31 53 -55 144 -55 206 0 100 57 222 138 296 42 37 137\n82 194 92 29 5 55 9 58 10 3 0 34 -4 69 -9z\"\n />\n </g>\n </SvgIcon>\n );\n};\n"],"names":[],"mappings":";;;AAGO,MAAM,qBAAqB,MAAM;AACtC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,KAAA;AAAA,MACR,KAAM,EAAA,4BAAA;AAAA,MACN,KAAM,EAAA,cAAA;AAAA,MACN,MAAO,EAAA,cAAA;AAAA,MACP,OAAQ,EAAA,2BAAA;AAAA,MACR,mBAAoB,EAAA;AAAA,KAAA;AAAA,oBAEpB,KAAA,CAAA,aAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,SAAU,EAAA,0DAAA;AAAA,QACV,IAAK,EAAA,SAAA;AAAA,QACL,MAAO,EAAA;AAAA,OAAA;AAAA,sBAEP,KAAA,CAAA,aAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,CAAE,EAAA;AAAA;AAAA,OAaJ;AAAA,sBACA,KAAA,CAAA,aAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,CAAE,EAAA;AAAA;AAAA;AAcJ;AACF,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"GitPullRequestIcon.esm.js","sources":["../../../src/components/common/GitPullRequestIcon.tsx"],"sourcesContent":["import SvgIcon from '@mui/material/SvgIcon';\nimport React from 'react';\n\nexport const GitPullRequestIcon = () => {\n return (\n <SvgIcon\n version=\"1.0\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"512.000000pt\"\n height=\"512.000000pt\"\n viewBox=\"0 0 512.000000 512.000000\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <g\n transform=\"translate(0.000000,512.000000) scale(0.100000,-0.100000)\"\n fill=\"#000000\"\n stroke=\"none\"\n >\n <path\n d=\"M2735 5104 c-45 -24 -693 -673 -716 -716 -23 -44 -24 -86 -5 -131 8\n-18 168 -185 362 -379 374 -371 373 -371 455 -354 95 19 154 130 115 219 -8\n18 -100 117 -205 222 -105 104 -191 193 -191 198 0 4 262 6 583 5 655 -4 631\n-1 749 -81 73 -49 145 -139 179 -224 22 -54 24 -75 27 -293 2 -129 1 -667 -3\n-1196 l-7 -961 -51 -13 c-113 -29 -244 -116 -334 -222 -242 -285 -225 -705 39\n-969 76 -76 183 -142 284 -175 80 -26 102 -29 224 -29 122 0 144 3 224 29 392\n129 597 565 443 946 -80 197 -257 364 -444 416 l-66 19 7 655 c3 360 7 896 8\n1190 1 520 0 537 -21 615 -70 258 -250 461 -487 551 -138 52 -171 54 -782 54\nl-566 0 191 193 c106 105 196 205 202 220 28 73 4 152 -61 200 -36 27 -114 32\n-153 11z m1565 -3995 c152 -24 275 -131 320 -276 24 -78 25 -138 5 -217 -30\n-113 -114 -213 -223 -264 -50 -24 -69 -27 -162 -27 -93 0 -112 3 -162 27 -67\n31 -147 103 -183 163 -31 53 -55 144 -55 206 0 100 57 222 138 296 42 37 137\n82 194 92 29 5 55 9 58 10 3 0 34 -4 70 -10z\"\n />\n <path\n d=\"M810 5033 c-142 -18 -286 -79 -390 -165 -217 -180 -311 -488 -229\n-753 37 -123 85 -202 184 -301 78 -79 103 -98 185 -137 52 -25 110 -48 128\n-52 l32 -7 0 -1098 0 -1099 -32 -9 c-391 -112 -615 -524 -493 -908 35 -112 88\n-197 180 -289 93 -93 160 -135 282 -178 82 -29 98 -31 223 -31 125 0 141 2\n223 31 122 43 189 85 282 178 92 93 136 161 176 278 127 368 -83 787 -453 908\nl-68 22 0 1097 0 1097 68 22 c111 37 190 87 282 180 93 94 142 175 179 296\n116 376 -121 797 -502 895 -77 19 -200 31 -257 23z m130 -324 c152 -24 275\n-131 320 -276 24 -78 25 -138 5 -217 -30 -113 -114 -213 -223 -264 -50 -24\n-69 -27 -162 -27 -93 0 -112 3 -162 27 -67 31 -147 103 -183 163 -31 53 -55\n144 -55 206 0 100 57 222 138 296 42 37 137 82 194 92 29 5 55 9 58 10 3 0 34\n-4 70 -10z m-1 -3599 c152 -25 276 -132 321 -277 24 -78 25 -138 5 -217 -30\n-113 -114 -213 -223 -264 -50 -24 -69 -27 -162 -27 -93 0 -112 3 -162 27 -67\n31 -147 103 -183 163 -31 53 -55 144 -55 206 0 100 57 222 138 296 42 37 137\n82 194 92 29 5 55 9 58 10 3 0 34 -4 69 -9z\"\n />\n </g>\n </SvgIcon>\n );\n};\n"],"names":["React"],"mappings":";;;AAGO,MAAM,qBAAqB,MAAM;AACtC,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,KAAA;AAAA,MACR,KAAM,EAAA,4BAAA;AAAA,MACN,KAAM,EAAA,cAAA;AAAA,MACN,MAAO,EAAA,cAAA;AAAA,MACP,OAAQ,EAAA,2BAAA;AAAA,MACR,mBAAoB,EAAA;AAAA,KAAA;AAAA,oBAEpBA,cAAA,CAAA,aAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,SAAU,EAAA,0DAAA;AAAA,QACV,IAAK,EAAA,SAAA;AAAA,QACL,MAAO,EAAA;AAAA,OAAA;AAAA,sBAEPA,cAAA,CAAA,aAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,CAAE,EAAA;AAAA;AAAA,OAaJ;AAAA,sBACAA,cAAA,CAAA,aAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,CAAE,EAAA;AAAA;AAAA;AAcJ;AACF,GACF;AAEJ;;;;"}
@@ -2,21 +2,21 @@ import FormControl from '@mui/material/FormControl';
2
2
  import FormHelperText from '@mui/material/FormHelperText';
3
3
  import FormLabel from '@mui/material/FormLabel';
4
4
  import TextField from '@mui/material/TextField';
5
- import React, { forwardRef } from 'react';
5
+ import React__default, { forwardRef } from 'react';
6
6
  import { formLabel, formHelperText } from './typography.esm.js';
7
7
 
8
8
  const Input = forwardRef(
9
9
  ({ label, sublabel, error, helperText, required, ...props }, ref) => {
10
- return /* @__PURE__ */ React.createElement(
10
+ return /* @__PURE__ */ React__default.createElement(
11
11
  FormControl,
12
12
  {
13
13
  sx: { width: "100%", gap: "4px" },
14
14
  error,
15
15
  required
16
16
  },
17
- label && /* @__PURE__ */ React.createElement(FormLabel, { required, sx: formLabel }, label),
18
- sublabel && /* @__PURE__ */ React.createElement(FormHelperText, { sx: formHelperText }, sublabel),
19
- /* @__PURE__ */ React.createElement(
17
+ label && /* @__PURE__ */ React__default.createElement(FormLabel, { required, sx: formLabel }, label),
18
+ sublabel && /* @__PURE__ */ React__default.createElement(FormHelperText, { sx: formHelperText }, sublabel),
19
+ /* @__PURE__ */ React__default.createElement(
20
20
  TextField,
21
21
  {
22
22
  id: "filled-multiline-static",
@@ -35,7 +35,7 @@ const Input = forwardRef(
35
35
  ...props
36
36
  }
37
37
  ),
38
- helperText && /* @__PURE__ */ React.createElement(FormHelperText, null, helperText)
38
+ helperText && /* @__PURE__ */ React__default.createElement(FormHelperText, null, helperText)
39
39
  );
40
40
  }
41
41
  );
@@ -1 +1 @@
1
- {"version":3,"file":"Input.esm.js","sources":["../../../src/components/common/Input.tsx"],"sourcesContent":["import FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport React, { forwardRef } from 'react';\nimport { formHelperText, formLabel } from './typography';\n\ntype Props = TextFieldProps & {\n sublabel?: string;\n};\n\nexport const Input = forwardRef<HTMLInputElement, Props>(\n ({ label, sublabel, error, helperText, required, ...props }, ref) => {\n return (\n <FormControl\n sx={{ width: '100%', gap: '4px' }}\n error={error}\n required={required}\n >\n {label && (\n <FormLabel required={required} sx={formLabel}>\n {label}\n </FormLabel>\n )}\n {sublabel && (\n <FormHelperText sx={formHelperText}>{sublabel}</FormHelperText>\n )}\n <TextField\n id=\"filled-multiline-static\"\n error={error}\n multiline\n fullWidth\n variant=\"outlined\"\n inputRef={ref}\n InputProps={{\n sx: theme => ({\n '&.Mui-disabled': {\n color: theme.palette.mode === 'dark' ? '#FFFFFF80' : '#757575',\n },\n }),\n }}\n {...props}\n />\n {helperText && <FormHelperText>{helperText}</FormHelperText>}\n </FormControl>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;AAWO,MAAM,KAAQ,GAAA,UAAA;AAAA,EACnB,CAAC,EAAE,KAAA,EAAO,QAAU,EAAA,KAAA,EAAO,YAAY,QAAU,EAAA,GAAG,KAAM,EAAA,EAAG,GAAQ,KAAA;AACnE,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA,EAAE,KAAO,EAAA,MAAA,EAAQ,KAAK,KAAM,EAAA;AAAA,QAChC,KAAA;AAAA,QACA;AAAA,OAAA;AAAA,MAEC,yBACE,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAU,QAAoB,EAAA,EAAA,EAAI,aAChC,KACH,CAAA;AAAA,MAED,QACC,oBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,EAAA,EAAI,kBAAiB,QAAS,CAAA;AAAA,sBAEhD,KAAA,CAAA,aAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,EAAG,EAAA,yBAAA;AAAA,UACH,KAAA;AAAA,UACA,SAAS,EAAA,IAAA;AAAA,UACT,SAAS,EAAA,IAAA;AAAA,UACT,OAAQ,EAAA,UAAA;AAAA,UACR,QAAU,EAAA,GAAA;AAAA,UACV,UAAY,EAAA;AAAA,YACV,IAAI,CAAU,KAAA,MAAA;AAAA,cACZ,gBAAkB,EAAA;AAAA,gBAChB,KAAO,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,WAAc,GAAA;AAAA;AACvD,aACF;AAAA,WACF;AAAA,UACC,GAAG;AAAA;AAAA,OACN;AAAA,MACC,UAAA,oBAAe,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAA,EAAgB,UAAW;AAAA,KAC7C;AAAA;AAGN;;;;"}
1
+ {"version":3,"file":"Input.esm.js","sources":["../../../src/components/common/Input.tsx"],"sourcesContent":["import FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport React, { forwardRef } from 'react';\nimport { formHelperText, formLabel } from './typography';\n\ntype Props = TextFieldProps & {\n sublabel?: string;\n};\n\nexport const Input = forwardRef<HTMLInputElement, Props>(\n ({ label, sublabel, error, helperText, required, ...props }, ref) => {\n return (\n <FormControl\n sx={{ width: '100%', gap: '4px' }}\n error={error}\n required={required}\n >\n {label && (\n <FormLabel required={required} sx={formLabel}>\n {label}\n </FormLabel>\n )}\n {sublabel && (\n <FormHelperText sx={formHelperText}>{sublabel}</FormHelperText>\n )}\n <TextField\n id=\"filled-multiline-static\"\n error={error}\n multiline\n fullWidth\n variant=\"outlined\"\n inputRef={ref}\n InputProps={{\n sx: theme => ({\n '&.Mui-disabled': {\n color: theme.palette.mode === 'dark' ? '#FFFFFF80' : '#757575',\n },\n }),\n }}\n {...props}\n />\n {helperText && <FormHelperText>{helperText}</FormHelperText>}\n </FormControl>\n );\n },\n);\n"],"names":["React"],"mappings":";;;;;;;AAWO,MAAM,KAAQ,GAAA,UAAA;AAAA,EACnB,CAAC,EAAE,KAAA,EAAO,QAAU,EAAA,KAAA,EAAO,YAAY,QAAU,EAAA,GAAG,KAAM,EAAA,EAAG,GAAQ,KAAA;AACnE,IACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA,EAAE,KAAO,EAAA,MAAA,EAAQ,KAAK,KAAM,EAAA;AAAA,QAChC,KAAA;AAAA,QACA;AAAA,OAAA;AAAA,MAEC,yBACEA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAU,QAAoB,EAAA,EAAA,EAAI,aAChC,KACH,CAAA;AAAA,MAED,QACC,oBAAAA,cAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,EAAA,EAAI,kBAAiB,QAAS,CAAA;AAAA,sBAEhDA,cAAA,CAAA,aAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,EAAG,EAAA,yBAAA;AAAA,UACH,KAAA;AAAA,UACA,SAAS,EAAA,IAAA;AAAA,UACT,SAAS,EAAA,IAAA;AAAA,UACT,OAAQ,EAAA,UAAA;AAAA,UACR,QAAU,EAAA,GAAA;AAAA,UACV,UAAY,EAAA;AAAA,YACV,IAAI,CAAU,KAAA,MAAA;AAAA,cACZ,gBAAkB,EAAA;AAAA,gBAChB,KAAO,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,WAAc,GAAA;AAAA;AACvD,aACF;AAAA,WACF;AAAA,UACC,GAAG;AAAA;AAAA,OACN;AAAA,MACC,UAAA,oBAAeA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA,IAAA,EAAgB,UAAW;AAAA,KAC7C;AAAA;AAGN;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { useController } from 'react-hook-form';
3
3
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
4
4
  import { pluginRiScTranslationRef } from '../../utils/translations.esm.js';
@@ -32,7 +32,7 @@ const Select = ({
32
32
  control,
33
33
  rules: { required }
34
34
  });
35
- const renderValue = (values) => multiple ? /* @__PURE__ */ React.createElement(
35
+ const renderValue = (values) => multiple ? /* @__PURE__ */ React__default.createElement(
36
36
  Box,
37
37
  {
38
38
  sx: {
@@ -42,7 +42,7 @@ const Select = ({
42
42
  paddingBottom: 0
43
43
  }
44
44
  },
45
- values.map((value) => /* @__PURE__ */ React.createElement(
45
+ values.map((value) => /* @__PURE__ */ React__default.createElement(
46
46
  Chip,
47
47
  {
48
48
  key: value,
@@ -57,7 +57,7 @@ const Select = ({
57
57
  if (Array.isArray(fieldValue)) return fieldValue.includes(optionValue);
58
58
  return fieldValue === optionValue;
59
59
  };
60
- return /* @__PURE__ */ React.createElement(FormControl, { sx: { width: "100%", gap: "4px" } }, label && /* @__PURE__ */ React.createElement(FormLabel, { sx: formLabel, required }, label), sublabel && /* @__PURE__ */ React.createElement(FormHelperText, { sx: formHelperText }, sublabel), /* @__PURE__ */ React.createElement(
60
+ return /* @__PURE__ */ React__default.createElement(FormControl, { sx: { width: "100%", gap: "4px" } }, label && /* @__PURE__ */ React__default.createElement(FormLabel, { sx: formLabel, required }, label), sublabel && /* @__PURE__ */ React__default.createElement(FormHelperText, { sx: formHelperText }, sublabel), /* @__PURE__ */ React__default.createElement(
61
61
  MUISelect,
62
62
  {
63
63
  MenuProps: {
@@ -77,8 +77,8 @@ const Select = ({
77
77
  ...field,
78
78
  ...props
79
79
  },
80
- options.map((option) => /* @__PURE__ */ React.createElement(MenuItem, { key: option.value, value: option.value }, multiple && /* @__PURE__ */ React.createElement(Checkbox, { checked: handleChecked(field.value, option.value) }), /* @__PURE__ */ React.createElement(ListItemText, { primary: option.renderedValue })))
81
- ), error && /* @__PURE__ */ React.createElement(FormHelperText, { error: true }, helperText));
80
+ options.map((option) => /* @__PURE__ */ React__default.createElement(MenuItem, { key: option.value, value: option.value }, multiple && /* @__PURE__ */ React__default.createElement(Checkbox, { checked: handleChecked(field.value, option.value) }), /* @__PURE__ */ React__default.createElement(ListItemText, { primary: option.renderedValue })))
81
+ ), error && /* @__PURE__ */ React__default.createElement(FormHelperText, { error: true }, helperText));
82
82
  };
83
83
 
84
84
  export { Select };
@@ -1 +1 @@
1
- {"version":3,"file":"Select.esm.js","sources":["../../../src/components/common/Select.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Control,\n FieldValues,\n Path,\n PathValue,\n useController,\n} from 'react-hook-form';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\nimport MUISelect, { SelectProps } from '@mui/material/Select';\nimport Checkbox from '@mui/material/Checkbox';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport { formHelperText, formLabel } from './typography';\n\ntype Props<T extends FieldValues> = SelectProps & {\n sublabel?: string;\n helperText?: string;\n control?: Control<T, any>;\n name: Path<T>;\n labelTranslationKey?: string;\n options: { value: string | number; renderedValue: string | number }[];\n};\n\nexport const Select = <T extends FieldValues>({\n label,\n sublabel,\n error,\n helperText,\n required,\n control,\n name,\n multiple,\n labelTranslationKey,\n options,\n ...props\n}: Props<T>) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n const { field } = useController({\n name,\n control,\n rules: { required },\n });\n\n // values er strengt tatt unknown, men da må vi bruke mye ts-ignore for å komme i mål\n const renderValue = (values: any) =>\n multiple ? (\n <Box\n sx={{\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: 0,\n paddingBottom: 0,\n }}\n >\n {values.map((value: string) => (\n <Chip\n key={value}\n label={\n /* @ts-ignore Because ts can't typecheck strings against our keys */\n labelTranslationKey ? t(`${labelTranslationKey}.${value}`) : value\n }\n />\n ))}\n </Box>\n ) : (\n options.find(option => option.value === values)?.renderedValue\n );\n\n const handleChecked = (\n fieldValue: PathValue<T, (string | undefined) & Path<T>>,\n optionValue: Props<T>['options'][0]['value'],\n ) => {\n if (Array.isArray(fieldValue)) return fieldValue.includes(optionValue);\n return fieldValue === optionValue;\n };\n\n return (\n <FormControl sx={{ width: '100%', gap: '4px' }}>\n {label && (\n <FormLabel sx={formLabel} required={required}>\n {label}\n </FormLabel>\n )}\n {sublabel && (\n <FormHelperText sx={formHelperText}>{sublabel}</FormHelperText>\n )}\n\n <MUISelect\n MenuProps={{\n disablePortal: true,\n }}\n variant=\"outlined\"\n renderValue={renderValue}\n multiple={multiple}\n SelectDisplayProps={\n multiple\n ? {\n style: {\n paddingBottom: 8,\n paddingTop: 16,\n minHeight: 40,\n },\n }\n : {}\n }\n inputRef={field.ref}\n {...field}\n {...props}\n >\n {options.map(option => (\n <MenuItem key={option.value} value={option.value}>\n {multiple && (\n <Checkbox checked={handleChecked(field.value, option.value)} />\n )}\n <ListItemText primary={option.renderedValue} />\n </MenuItem>\n ))}\n </MUISelect>\n {error && <FormHelperText error>{helperText}</FormHelperText>}\n </FormControl>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA8BO,MAAM,SAAS,CAAwB;AAAA,EAC5C,KAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,mBAAA;AAAA,EACA,OAAA;AAAA,EACA,GAAG;AACL,CAAgB,KAAA;AACd,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AACxD,EAAM,MAAA,EAAE,KAAM,EAAA,GAAI,aAAc,CAAA;AAAA,IAC9B,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA,EAAO,EAAE,QAAS;AAAA,GACnB,CAAA;AAGD,EAAM,MAAA,WAAA,GAAc,CAAC,MAAA,KACnB,QACE,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,OAAS,EAAA,MAAA;AAAA,QACT,QAAU,EAAA,MAAA;AAAA,QACV,YAAc,EAAA,CAAA;A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,MAEP,UAAU,KAAM,CAAA,GAAA;AAAA,MACf,GAAG,KAAA;AAAA,MACH,GAAG;AAAA,KAAA;AAAA,IAEH,OAAQ,CAAA,GAAA,CAAI,CACX,MAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,QAAS,EAAA,EAAA,GAAA,EAAK,MAAO,CAAA,KAAA,EAAO,KAAO,EAAA,MAAA,CAAO,KACxC,EAAA,EAAA,QAAA,oBACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAS,EAAA,aAAA,CAAc,KAAM,CAAA,KAAA,EAAO,MAAO,CAAA,KAAK,CAAG,EAAA,CAAA,kBAE9D,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,OAAS,EAAA,MAAA,CAAO,aAAe,EAAA,CAC/C,CACD;AAAA,KAEF,KAAS,oBAAA,KAAA,CAAA,aAAA,CAAC,kBAAe,KAAK,EAAA,IAAA,EAAA,EAAE,UAAW,CAC9C,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Select.esm.js","sources":["../../../src/components/common/Select.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Control,\n FieldValues,\n Path,\n PathValue,\n useController,\n} from 'react-hook-form';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\nimport MUISelect, { SelectProps } from '@mui/material/Select';\nimport Checkbox from '@mui/material/Checkbox';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport { formHelperText, formLabel } from './typography';\n\ntype Props<T extends FieldValues> = SelectProps & {\n sublabel?: string;\n helperText?: string;\n control?: Control<T, any>;\n name: Path<T>;\n labelTranslationKey?: string;\n options: { value: string | number; renderedValue: string | number }[];\n};\n\nexport const Select = <T extends FieldValues>({\n label,\n sublabel,\n error,\n helperText,\n required,\n control,\n name,\n multiple,\n labelTranslationKey,\n options,\n ...props\n}: Props<T>) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n const { field } = useController({\n name,\n control,\n rules: { required },\n });\n\n // values er strengt tatt unknown, men da må vi bruke mye ts-ignore for å komme i mål\n const renderValue = (values: any) =>\n multiple ? (\n <Box\n sx={{\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: 0,\n paddingBottom: 0,\n }}\n >\n {values.map((value: string) => (\n <Chip\n key={value}\n label={\n /* @ts-ignore Because ts can't typecheck strings against our keys */\n labelTranslationKey ? t(`${labelTranslationKey}.${value}`) : value\n }\n />\n ))}\n </Box>\n ) : (\n options.find(option => option.value === values)?.renderedValue\n );\n\n const handleChecked = (\n fieldValue: PathValue<T, (string | undefined) & Path<T>>,\n optionValue: Props<T>['options'][0]['value'],\n ) => {\n if (Array.isArray(fieldValue)) return fieldValue.includes(optionValue);\n return fieldValue === optionValue;\n };\n\n return (\n <FormControl sx={{ width: '100%', gap: '4px' }}>\n {label && (\n <FormLabel sx={formLabel} required={required}>\n {label}\n </FormLabel>\n )}\n {sublabel && (\n <FormHelperText sx={formHelperText}>{sublabel}</FormHelperText>\n )}\n\n <MUISelect\n MenuProps={{\n disablePortal: true,\n }}\n variant=\"outlined\"\n renderValue={renderValue}\n multiple={multiple}\n SelectDisplayProps={\n multiple\n ? {\n style: {\n paddingBottom: 8,\n paddingTop: 16,\n minHeight: 40,\n },\n }\n : {}\n }\n inputRef={field.ref}\n {...field}\n {...props}\n >\n {options.map(option => (\n <MenuItem key={option.value} value={option.value}>\n {multiple && (\n <Checkbox checked={handleChecked(field.value, option.value)} />\n )}\n <ListItemText primary={option.renderedValue} />\n </MenuItem>\n ))}\n </MUISelect>\n {error && <FormHelperText error>{helperText}</FormHelperText>}\n </FormControl>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;AA8BO,MAAM,SAAS,CAAwB;AAAA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,CAC9C,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
3
3
  import { pluginRiScTranslationRef } from '../../utils/translations.esm.js';
4
4
  import Button from '@mui/material/Button';
@@ -12,14 +12,14 @@ const SopsConfigButton = ({
12
12
  hasOpenedOnce
13
13
  }) => {
14
14
  const { t } = useTranslationRef(pluginRiScTranslationRef);
15
- return /* @__PURE__ */ React.createElement(
15
+ return /* @__PURE__ */ React__default.createElement(
16
16
  Badge,
17
17
  {
18
18
  color: "error",
19
19
  badgeContent: pullRequestCount,
20
20
  invisible: hasOpenedOnce
21
21
  },
22
- /* @__PURE__ */ React.createElement(
22
+ /* @__PURE__ */ React__default.createElement(
23
23
  Button,
24
24
  {
25
25
  disabled: disable,
@@ -31,7 +31,7 @@ const SopsConfigButton = ({
31
31
  },
32
32
  onClick: handleClick
33
33
  },
34
- /* @__PURE__ */ React.createElement(Settings, null),
34
+ /* @__PURE__ */ React__default.createElement(Settings, null),
35
35
  `${t("sopsConfigDialog.title")}`
36
36
  )
37
37
  );
@@ -1 +1 @@
1
- {"version":3,"file":"SopsConfigButton.esm.js","sources":["../../../src/components/common/SopsConfigButton.tsx"],"sourcesContent":["import React from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport Button from '@mui/material/Button';\nimport Badge from '@mui/material/Badge';\nimport Settings from '@material-ui/icons/Settings';\n\ninterface SopsConfigButtonProps {\n handleClick: () => void;\n disable: boolean;\n pullRequestCount: number;\n hasOpenedOnce: boolean;\n}\n\nexport const SopsConfigButton = ({\n handleClick,\n disable,\n pullRequestCount,\n hasOpenedOnce,\n}: SopsConfigButtonProps) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n return (\n <Badge\n color=\"error\"\n badgeContent={pullRequestCount}\n invisible={hasOpenedOnce}\n >\n <Button\n disabled={disable}\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 1,\n }}\n onClick={handleClick}\n >\n <Settings />\n {`${t('sopsConfigDialog.title')}`}\n </Button>\n </Badge>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAcO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,WAAA;AAAA,EACA,OAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AAExD,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,OAAA;AAAA,MACN,YAAc,EAAA,gBAAA;AAAA,MACd,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEX,KAAA,CAAA,aAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,QAAU,EAAA,OAAA;AAAA,QACV,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,MAAA;AAAA,UACT,aAAe,EAAA,KAAA;AAAA,UACf,UAAY,EAAA,QAAA;AAAA,UACZ,GAAK,EAAA;AAAA,SACP;AAAA,QACA,OAAS,EAAA;AAAA,OAAA;AAAA,0CAER,QAAS,EAAA,IAAA,CAAA;AAAA,MACT,CAAA,EAAG,CAAE,CAAA,wBAAwB,CAAC,CAAA;AAAA;AACjC,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"SopsConfigButton.esm.js","sources":["../../../src/components/common/SopsConfigButton.tsx"],"sourcesContent":["import React from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport Button from '@mui/material/Button';\nimport Badge from '@mui/material/Badge';\nimport Settings from '@material-ui/icons/Settings';\n\ninterface SopsConfigButtonProps {\n handleClick: () => void;\n disable: boolean;\n pullRequestCount: number;\n hasOpenedOnce: boolean;\n}\n\nexport const SopsConfigButton = ({\n handleClick,\n disable,\n pullRequestCount,\n hasOpenedOnce,\n}: SopsConfigButtonProps) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n return (\n <Badge\n color=\"error\"\n badgeContent={pullRequestCount}\n invisible={hasOpenedOnce}\n >\n <Button\n disabled={disable}\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 1,\n }}\n onClick={handleClick}\n >\n <Settings />\n {`${t('sopsConfigDialog.title')}`}\n </Button>\n </Badge>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;AAcO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,WAAA;AAAA,EACA,OAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AAExD,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,OAAA;AAAA,MACN,YAAc,EAAA,gBAAA;AAAA,MACd,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEXA,cAAA,CAAA,aAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,QAAU,EAAA,OAAA;AAAA,QACV,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,MAAA;AAAA,UACT,aAAe,EAAA,KAAA;AAAA,UACf,UAAY,EAAA,QAAA;AAAA,UACZ,GAAK,EAAA;AAAA,SACP;AAAA,QACA,OAAS,EAAA;AAAA,OAAA;AAAA,mDAER,QAAS,EAAA,IAAA,CAAA;AAAA,MACT,CAAA,EAAG,CAAE,CAAA,wBAAwB,CAAC,CAAA;AAAA;AACjC,GACF;AAEJ;;;;"}
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import Box from '@mui/material/Box';
3
3
  import CircularProgress from '@mui/material/CircularProgress';
4
4
 
5
- const Spinner = ({ size }) => /* @__PURE__ */ React.createElement(
5
+ const Spinner = ({ size }) => /* @__PURE__ */ React__default.createElement(
6
6
  Box,
7
7
  {
8
8
  sx: {
@@ -13,7 +13,7 @@ const Spinner = ({ size }) => /* @__PURE__ */ React.createElement(
13
13
  alignItems: "flex-start"
14
14
  }
15
15
  },
16
- /* @__PURE__ */ React.createElement(
16
+ /* @__PURE__ */ React__default.createElement(
17
17
  CircularProgress,
18
18
  {
19
19
  size,
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.esm.js","sources":["../../../src/components/common/Spinner.tsx"],"sourcesContent":["import React from 'react';\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nexport const Spinner = ({ size }: { size?: string | number }) => (\n <Box\n sx={{\n display: 'flex',\n minWidth: '100wh',\n height: '100vh',\n justifyContent: 'center',\n alignItems: 'flex-start',\n }}\n >\n <CircularProgress\n size={size}\n sx={{\n display: 'flex',\n marginTop: '200px',\n }}\n />\n </Box>\n);\n"],"names":[],"mappings":";;;;AAIO,MAAM,OAAU,GAAA,CAAC,EAAE,IAAA,EACxB,qBAAA,KAAA,CAAA,aAAA;AAAA,EAAC,GAAA;AAAA,EAAA;AAAA,IACC,EAAI,EAAA;AAAA,MACF,OAAS,EAAA,MAAA;AAAA,MACT,QAAU,EAAA,OAAA;AAAA,MACV,MAAQ,EAAA,OAAA;AAAA,MACR,cAAgB,EAAA,QAAA;AAAA,MAChB,UAAY,EAAA;AAAA;AACd,GAAA;AAAA,kBAEA,KAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,EAAI,EAAA;AAAA,QACF,OAAS,EAAA,MAAA;AAAA,QACT,SAAW,EAAA;AAAA;AACb;AAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Spinner.esm.js","sources":["../../../src/components/common/Spinner.tsx"],"sourcesContent":["import React from 'react';\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nexport const Spinner = ({ size }: { size?: string | number }) => (\n <Box\n sx={{\n display: 'flex',\n minWidth: '100wh',\n height: '100vh',\n justifyContent: 'center',\n alignItems: 'flex-start',\n }}\n >\n <CircularProgress\n size={size}\n sx={{\n display: 'flex',\n marginTop: '200px',\n }}\n />\n </Box>\n);\n"],"names":["React"],"mappings":";;;;AAIO,MAAM,OAAU,GAAA,CAAC,EAAE,IAAA,EACxB,qBAAAA,cAAA,CAAA,aAAA;AAAA,EAAC,GAAA;AAAA,EAAA;AAAA,IACC,EAAI,EAAA;AAAA,MACF,OAAS,EAAA,MAAA;AAAA,MACT,QAAU,EAAA,OAAA;AAAA,MACV,MAAQ,EAAA,OAAA;AAAA,MACR,cAAgB,EAAA,QAAA;AAAA,MAChB,UAAY,EAAA;AAAA;AACd,GAAA;AAAA,kBAEAA,cAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,EAAI,EAAA;AAAA,QACF,OAAS,EAAA,MAAA;AAAA,QACT,SAAW,EAAA;AAAA;AACb;AAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { ConsequenceTableInfoWithHeaders } from '../scenarioWizard/components/ConsequenceTable.esm.js';
3
3
  import CloseIcon from '@mui/icons-material/Close';
4
4
  import { ProbabilityTableInfoWithHeaders } from '../scenarioWizard/components/ProbabilityTable.esm.js';
@@ -19,7 +19,7 @@ const MatrixDialog = ({
19
19
  close
20
20
  }) => {
21
21
  const { t } = useTranslationRef(pluginRiScTranslationRef);
22
- return /* @__PURE__ */ React.createElement(Dialog, { maxWidth: "lg", open, onClose: close }, /* @__PURE__ */ React.createElement(DialogTitle, null, t("scenarioDrawer.riskMatrixModal.title")), /* @__PURE__ */ React.createElement(
22
+ return /* @__PURE__ */ React__default.createElement(Dialog, { maxWidth: "lg", open, onClose: close }, /* @__PURE__ */ React__default.createElement(DialogTitle, null, t("scenarioDrawer.riskMatrixModal.title")), /* @__PURE__ */ React__default.createElement(
23
23
  IconButton,
24
24
  {
25
25
  "aria-label": "close",
@@ -31,8 +31,8 @@ const MatrixDialog = ({
31
31
  color: (theme) => theme.palette.grey[500]
32
32
  }
33
33
  },
34
- /* @__PURE__ */ React.createElement(CloseIcon, null)
35
- ), /* @__PURE__ */ React.createElement(DialogContent, null, /* @__PURE__ */ React.createElement(
34
+ /* @__PURE__ */ React__default.createElement(CloseIcon, null)
35
+ ), /* @__PURE__ */ React__default.createElement(DialogContent, null, /* @__PURE__ */ React__default.createElement(
36
36
  Typography,
37
37
  {
38
38
  sx: {
@@ -40,13 +40,13 @@ const MatrixDialog = ({
40
40
  }
41
41
  },
42
42
  t("scenarioStepper.initialRiskStep.subtitle")
43
- ), /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Typography, { sx: { ...heading3, paddingBottom: "4px" } }, t("dictionary.probability"))), /* @__PURE__ */ React.createElement(ProbabilityTableInfoWithHeaders, null), /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(
43
+ ), /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(Typography, { sx: { ...heading3, paddingBottom: "4px" } }, t("dictionary.probability"))), /* @__PURE__ */ React__default.createElement(ProbabilityTableInfoWithHeaders, null), /* @__PURE__ */ React__default.createElement(Box, null, /* @__PURE__ */ React__default.createElement(
44
44
  Typography,
45
45
  {
46
46
  sx: { ...heading3, paddingTop: "16px", paddingBottom: "4px" }
47
47
  },
48
48
  t("dictionary.consequence")
49
- )), /* @__PURE__ */ React.createElement(ConsequenceTableInfoWithHeaders, null)), /* @__PURE__ */ React.createElement(DialogActions, null, /* @__PURE__ */ React.createElement(Button, { onClick: close }, t("dictionary.close"))));
49
+ )), /* @__PURE__ */ React__default.createElement(ConsequenceTableInfoWithHeaders, null)), /* @__PURE__ */ React__default.createElement(DialogActions, null, /* @__PURE__ */ React__default.createElement(Button, { onClick: close }, t("dictionary.close"))));
50
50
  };
51
51
 
52
52
  export { MatrixDialog };
@@ -1 +1 @@
1
- {"version":3,"file":"MatrixDialog.esm.js","sources":["../../../src/components/riScDialog/MatrixDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { ConsequenceTableInfoWithHeaders } from '../scenarioWizard/components/ConsequenceTable';\nimport CloseIcon from '@mui/icons-material/Close';\nimport { ProbabilityTableInfoWithHeaders } from '../scenarioWizard/components/ProbabilityTable';\nimport { heading3 } from '../common/typography';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport Box from '@mui/material/Box';\nimport Dialog from '@mui/material/Dialog';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport DialogContent from '@mui/material/DialogContent';\nimport Typography from '@mui/material/Typography';\nimport DialogActions from '@mui/material/DialogActions';\nimport Button from '@mui/material/Button';\n\nexport const MatrixDialog = ({\n open,\n close,\n}: {\n open: boolean;\n close: () => void;\n}) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n return (\n <Dialog maxWidth=\"lg\" open={open} onClose={close}>\n <DialogTitle>{t('scenarioDrawer.riskMatrixModal.title')}</DialogTitle>\n <IconButton\n aria-label=\"close\"\n onClick={close}\n sx={{\n position: 'absolute',\n right: 8,\n top: 8,\n color: theme => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n <DialogContent>\n <Typography\n sx={{\n paddingBottom: '32px',\n }}\n >\n {t('scenarioStepper.initialRiskStep.subtitle')}\n </Typography>\n <Box>\n <Typography sx={{ ...heading3, paddingBottom: '4px' }}>\n {t('dictionary.probability')}\n </Typography>\n </Box>\n <ProbabilityTableInfoWithHeaders />\n <Box>\n <Typography\n sx={{ ...heading3, paddingTop: '16px', paddingBottom: '4px' }}\n >\n {t('dictionary.consequence')}\n </Typography>\n </Box>\n <ConsequenceTableInfoWithHeaders />\n </DialogContent>\n <DialogActions>\n <Button onClick={close}>{t('dictionary.close')}</Button>\n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,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,IAAI,EAAE,GAAG,UAAU,UAAY,EAAA,MAAA,EAAQ,eAAe,KAAM;AAAA,KAAA;AAAA,IAE3D,EAAE,wBAAwB;AAAA,GAE/B,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,+BAAgC,EAAA,IAAA,CACnC,mBACC,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,SAAS,KAAQ,EAAA,EAAA,CAAA,CAAE,kBAAkB,CAAE,CACjD,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"MatrixDialog.esm.js","sources":["../../../src/components/riScDialog/MatrixDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { ConsequenceTableInfoWithHeaders } from '../scenarioWizard/components/ConsequenceTable';\nimport CloseIcon from '@mui/icons-material/Close';\nimport { ProbabilityTableInfoWithHeaders } from '../scenarioWizard/components/ProbabilityTable';\nimport { heading3 } from '../common/typography';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport Box from '@mui/material/Box';\nimport Dialog from '@mui/material/Dialog';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport DialogContent from '@mui/material/DialogContent';\nimport Typography from '@mui/material/Typography';\nimport DialogActions from '@mui/material/DialogActions';\nimport Button from '@mui/material/Button';\n\nexport const MatrixDialog = ({\n open,\n close,\n}: {\n open: boolean;\n close: () => void;\n}) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n return (\n <Dialog maxWidth=\"lg\" open={open} onClose={close}>\n <DialogTitle>{t('scenarioDrawer.riskMatrixModal.title')}</DialogTitle>\n <IconButton\n aria-label=\"close\"\n onClick={close}\n sx={{\n position: 'absolute',\n right: 8,\n top: 8,\n color: theme => theme.palette.grey[500],\n }}\n >\n <CloseIcon />\n </IconButton>\n <DialogContent>\n <Typography\n sx={{\n paddingBottom: '32px',\n }}\n >\n {t('scenarioStepper.initialRiskStep.subtitle')}\n </Typography>\n <Box>\n <Typography sx={{ ...heading3, paddingBottom: '4px' }}>\n {t('dictionary.probability')}\n </Typography>\n </Box>\n <ProbabilityTableInfoWithHeaders />\n <Box>\n <Typography\n sx={{ ...heading3, paddingTop: '16px', paddingBottom: '4px' }}\n >\n {t('dictionary.consequence')}\n </Typography>\n </Box>\n <ConsequenceTableInfoWithHeaders />\n </DialogContent>\n <DialogActions>\n <Button onClick={close}>{t('dictionary.close')}</Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;AAgBO,MAAM,eAAe,CAAC;AAAA,EAC3B,IAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AAExD,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,QAAS,EAAA,IAAA,EAAK,IAAY,EAAA,OAAA,EAAS,KACzC,EAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,WAAa,EAAA,IAAA,EAAA,CAAA,CAAE,sCAAsC,CAAE,CACxD,kBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAW,EAAA,OAAA;AAAA,MACX,OAAS,EAAA,KAAA;AAAA,MACT,EAAI,EAAA;AAAA,QACF,QAAU,EAAA,UAAA;AAAA,QACV,KAAO,EAAA,CAAA;AAAA,QACP,GAAK,EAAA,CAAA;AAAA,QACL,KAAO,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,OAAA,CAAQ,KAAK,GAAG;AAAA;AACxC,KAAA;AAAA,iDAEC,SAAU,EAAA,IAAA;AAAA,GACb,+CACC,aACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,aAAe,EAAA;AAAA;AACjB,KAAA;AAAA,IAEC,EAAE,0CAA0C;AAAA,GAC/C,+CACC,GACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,cAAW,EAAI,EAAA,EAAE,GAAG,QAAU,EAAA,aAAA,EAAe,OAC3C,EAAA,EAAA,CAAA,CAAE,wBAAwB,CAC7B,CACF,mBACCA,cAAA,CAAA,aAAA,CAAA,+BAAA,EAAA,IAAgC,CACjC,kBAAAA,cAAA,CAAA,aAAA,CAAC,GACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,IAAI,EAAE,GAAG,UAAU,UAAY,EAAA,MAAA,EAAQ,eAAe,KAAM;AAAA,KAAA;AAAA,IAE3D,EAAE,wBAAwB;AAAA,GAE/B,CACA,kBAAAA,cAAA,CAAA,aAAA,CAAC,+BAAgC,EAAA,IAAA,CACnC,mBACCA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,kBACEA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,SAAS,KAAQ,EAAA,EAAA,CAAA,CAAE,kBAAkB,CAAE,CACjD,CACF,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React__default, { useState } from 'react';
2
2
  import { emptyRiSc } from '../../utils/utilityfunctions.esm.js';
3
3
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
4
4
  import { pluginRiScTranslationRef } from '../../utils/translations.esm.js';
@@ -53,12 +53,12 @@ const RiScDialog = ({ onClose, dialogState }) => {
53
53
  }
54
54
  onClose();
55
55
  });
56
- return /* @__PURE__ */ React.createElement(Dialog, { open: dialogState !== 0 /* Closed */, onClose }, /* @__PURE__ */ React.createElement(DialogTitle, null, titleTranslation), /* @__PURE__ */ React.createElement(
56
+ return /* @__PURE__ */ React__default.createElement(Dialog, { open: dialogState !== 0 /* Closed */, onClose }, /* @__PURE__ */ React__default.createElement(DialogTitle, null, titleTranslation), /* @__PURE__ */ React__default.createElement(
57
57
  DialogContent,
58
58
  {
59
59
  sx: { display: "flex", flexDirection: "column", gap: "16px" }
60
60
  },
61
- /* @__PURE__ */ React.createElement(
61
+ /* @__PURE__ */ React__default.createElement(
62
62
  Input,
63
63
  {
64
64
  required: true,
@@ -67,7 +67,7 @@ const RiScDialog = ({ onClose, dialogState }) => {
67
67
  label: t("dictionary.title")
68
68
  }
69
69
  ),
70
- /* @__PURE__ */ React.createElement(
70
+ /* @__PURE__ */ React__default.createElement(
71
71
  Input,
72
72
  {
73
73
  required: true,
@@ -78,7 +78,7 @@ const RiScDialog = ({ onClose, dialogState }) => {
78
78
  minRows: 4
79
79
  }
80
80
  ),
81
- dialogState === 2 /* Create */ && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(DialogContentText, null, t("rosDialog.generateInitialDescription")), /* @__PURE__ */ React.createElement(
81
+ dialogState === 2 /* Create */ && /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(DialogContentText, null, t("rosDialog.generateInitialDescription")), /* @__PURE__ */ React__default.createElement(
82
82
  Box,
83
83
  {
84
84
  sx: {
@@ -88,7 +88,7 @@ const RiScDialog = ({ onClose, dialogState }) => {
88
88
  gap: 4
89
89
  }
90
90
  },
91
- /* @__PURE__ */ React.createElement(
91
+ /* @__PURE__ */ React__default.createElement(
92
92
  Typography,
93
93
  {
94
94
  sx: {
@@ -97,15 +97,15 @@ const RiScDialog = ({ onClose, dialogState }) => {
97
97
  },
98
98
  t("rosDialog.generateInitialToggleDescription")
99
99
  ),
100
- /* @__PURE__ */ React.createElement(
100
+ /* @__PURE__ */ React__default.createElement(
101
101
  FormControlLabel,
102
102
  {
103
- control: /* @__PURE__ */ React.createElement(Switch, { onChange: () => handleChangeCreateRiScFrom() }),
103
+ control: /* @__PURE__ */ React__default.createElement(Switch, { onChange: () => handleChangeCreateRiScFrom() }),
104
104
  label: createRiScFrom === 0 /* Scratch */ ? t("dictionary.no") : t("dictionary.yes")
105
105
  }
106
106
  )
107
107
  ))
108
- ), /* @__PURE__ */ React.createElement(DialogActions, { sx: dialogActions }, /* @__PURE__ */ React.createElement(Button, { variant: "contained", onClick: onSubmit, disabled: !isDirty }, t("dictionary.save")), /* @__PURE__ */ React.createElement(Button, { variant: "outlined", onClick: onClose }, t("dictionary.cancel"))));
108
+ ), /* @__PURE__ */ React__default.createElement(DialogActions, { sx: dialogActions }, /* @__PURE__ */ React__default.createElement(Button, { variant: "contained", onClick: onSubmit, disabled: !isDirty }, t("dictionary.save")), /* @__PURE__ */ React__default.createElement(Button, { variant: "outlined", onClick: onClose }, t("dictionary.cancel"))));
109
109
  };
110
110
 
111
111
  export { RiScDialog, RiScDialogStates };
@@ -1 +1 @@
1
- {"version":3,"file":"RiScDialog.esm.js","sources":["../../../src/components/riScDialog/RiScDialog.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { RiSc } from '../../utils/types';\nimport { emptyRiSc } from '../../utils/utilityfunctions';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport { useRiScs } from '../../contexts/RiScContext';\nimport { useForm } from 'react-hook-form';\nimport { Input } from '../common/Input';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogActions from '@mui/material/DialogActions';\nimport { dialogActions } from '../common/mixins';\nimport { DialogContentText } from '@material-ui/core';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Switch from '@mui/material/Switch';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\n\nexport enum RiScDialogStates {\n Closed,\n Edit,\n Create,\n}\n\ninterface RiScDialogProps {\n onClose: () => void;\n dialogState: RiScDialogStates;\n}\n\nenum CreateRiScFrom {\n Scratch,\n Default,\n}\n\nexport const RiScDialog = ({ onClose, dialogState }: RiScDialogProps) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n const { selectedRiSc, createNewRiSc, updateRiSc } = useRiScs();\n\n const {\n register,\n handleSubmit,\n formState: { isDirty, errors },\n } = useForm<RiSc>({\n defaultValues:\n dialogState === RiScDialogStates.Edit\n ? selectedRiSc!.content\n : emptyRiSc(),\n mode: 'onBlur',\n });\n\n const titleTranslation =\n dialogState === RiScDialogStates.Create\n ? t('rosDialog.titleNew')\n : t('rosDialog.titleEdit');\n\n const [createRiScFrom, setCreateRiScFrom] = useState<CreateRiScFrom>(\n CreateRiScFrom.Scratch,\n );\n const handleChangeCreateRiScFrom = () => {\n if (createRiScFrom === CreateRiScFrom.Scratch) {\n setCreateRiScFrom(CreateRiScFrom.Default);\n } else {\n setCreateRiScFrom(CreateRiScFrom.Scratch);\n }\n };\n\n const onSubmit = handleSubmit((data: RiSc) => {\n if (dialogState === RiScDialogStates.Create) {\n createNewRiSc(data, createRiScFrom === CreateRiScFrom.Default);\n } else {\n updateRiSc(data);\n }\n onClose();\n });\n\n return (\n <Dialog open={dialogState !== RiScDialogStates.Closed} onClose={onClose}>\n <DialogTitle>{titleTranslation}</DialogTitle>\n\n <DialogContent\n sx={{ display: 'flex', flexDirection: 'column', gap: '16px' }}\n >\n <Input\n required\n {...register('title', { required: true })}\n error={errors.title !== undefined}\n label={t('dictionary.title')}\n />\n <Input\n required\n {...register('scope', { required: true })}\n label={t('dictionary.scope')}\n sublabel={t('rosDialog.scopeDescription')}\n error={errors.scope !== undefined}\n minRows={4}\n />\n\n {dialogState === RiScDialogStates.Create && (\n <div>\n <DialogContentText>\n {t('rosDialog.generateInitialDescription')}\n </DialogContentText>\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n }}\n >\n <Typography\n sx={{\n fontWeight: 'bold',\n }}\n >\n {t('rosDialog.generateInitialToggleDescription')}\n </Typography>\n <FormControlLabel\n control={\n <Switch onChange={() => handleChangeCreateRiScFrom()} />\n }\n label={\n createRiScFrom === CreateRiScFrom.Scratch\n ? t('dictionary.no')\n : t('dictionary.yes')\n }\n />\n </Box>\n </div>\n )}\n </DialogContent>\n\n <DialogActions sx={dialogActions}>\n <Button variant=\"contained\" onClick={onSubmit} disabled={!isDirty}>\n {t('dictionary.save')}\n </Button>\n <Button variant=\"outlined\" onClick={onClose}>\n {t('dictionary.cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":["RiScDialogStates"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBY,IAAA,gBAAA,qBAAAA,iBAAL,KAAA;AACL,EAAAA,iBAAA,CAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA;AACA,EAAAA,iBAAA,CAAA,iBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAA;AACA,EAAAA,iBAAA,CAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA;AAHU,EAAAA,OAAAA,iBAAAA;AAAA,CAAA,EAAA,gBAAA,IAAA,EAAA;AAgBL,MAAM,UAAa,GAAA,CAAC,EAAE,OAAA,EAAS,aAAmC,KAAA;AACvE,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AACxD,EAAA,MAAM,EAAE,YAAA,EAAc,aAAe,EAAA,UAAA,KAAe,QAAS,EAAA;AAE7D,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA,EAAW,EAAE,OAAA,EAAS,MAAO;AAAA,MAC3B,OAAc,CAAA;AAAA,IAChB,aACE,EAAA,WAAA,KAAgB,CACZ,cAAA,YAAA,CAAc,UACd,SAAU,EAAA;AAAA,IAChB,IAAM,EAAA;AAAA,GACP,CAAA;AAED,EAAA,MAAM,mBACJ,WAAgB,KAAA,CAAA,gBACZ,EAAE,oBAAoB,CA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AA,EAAU,CAAC,OAAA,EAAA,EACvD,CAAE,CAAA,iBAAiB,CACtB,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,OAAQ,EAAA,UAAA,EAAW,OAAS,EAAA,OAAA,EAAA,EACjC,CAAE,CAAA,mBAAmB,CACxB,CACF,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"RiScDialog.esm.js","sources":["../../../src/components/riScDialog/RiScDialog.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { RiSc } from '../../utils/types';\nimport { emptyRiSc } from '../../utils/utilityfunctions';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport { useRiScs } from '../../contexts/RiScContext';\nimport { useForm } from 'react-hook-form';\nimport { Input } from '../common/Input';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogActions from '@mui/material/DialogActions';\nimport { dialogActions } from '../common/mixins';\nimport { DialogContentText } from '@material-ui/core';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Switch from '@mui/material/Switch';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\n\nexport enum RiScDialogStates {\n Closed,\n Edit,\n Create,\n}\n\ninterface RiScDialogProps {\n onClose: () => void;\n dialogState: RiScDialogStates;\n}\n\nenum CreateRiScFrom {\n Scratch,\n Default,\n}\n\nexport const RiScDialog = ({ onClose, dialogState }: RiScDialogProps) => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n const { selectedRiSc, createNewRiSc, updateRiSc } = useRiScs();\n\n const {\n register,\n handleSubmit,\n formState: { isDirty, errors },\n } = useForm<RiSc>({\n defaultValues:\n dialogState === RiScDialogStates.Edit\n ? selectedRiSc!.content\n : emptyRiSc(),\n mode: 'onBlur',\n });\n\n const titleTranslation =\n dialogState === RiScDialogStates.Create\n ? t('rosDialog.titleNew')\n : t('rosDialog.titleEdit');\n\n const [createRiScFrom, setCreateRiScFrom] = useState<CreateRiScFrom>(\n CreateRiScFrom.Scratch,\n );\n const handleChangeCreateRiScFrom = () => {\n if (createRiScFrom === CreateRiScFrom.Scratch) {\n setCreateRiScFrom(CreateRiScFrom.Default);\n } else {\n setCreateRiScFrom(CreateRiScFrom.Scratch);\n }\n };\n\n const onSubmit = handleSubmit((data: RiSc) => {\n if (dialogState === RiScDialogStates.Create) {\n createNewRiSc(data, createRiScFrom === CreateRiScFrom.Default);\n } else {\n updateRiSc(data);\n }\n onClose();\n });\n\n return (\n <Dialog open={dialogState !== RiScDialogStates.Closed} onClose={onClose}>\n <DialogTitle>{titleTranslation}</DialogTitle>\n\n <DialogContent\n sx={{ display: 'flex', flexDirection: 'column', gap: '16px' }}\n >\n <Input\n required\n {...register('title', { required: true })}\n error={errors.title !== undefined}\n label={t('dictionary.title')}\n />\n <Input\n required\n {...register('scope', { required: true })}\n label={t('dictionary.scope')}\n sublabel={t('rosDialog.scopeDescription')}\n error={errors.scope !== undefined}\n minRows={4}\n />\n\n {dialogState === RiScDialogStates.Create && (\n <div>\n <DialogContentText>\n {t('rosDialog.generateInitialDescription')}\n </DialogContentText>\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n }}\n >\n <Typography\n sx={{\n fontWeight: 'bold',\n }}\n >\n {t('rosDialog.generateInitialToggleDescription')}\n </Typography>\n <FormControlLabel\n control={\n <Switch onChange={() => handleChangeCreateRiScFrom()} />\n }\n label={\n createRiScFrom === CreateRiScFrom.Scratch\n ? t('dictionary.no')\n : t('dictionary.yes')\n }\n />\n </Box>\n </div>\n )}\n </DialogContent>\n\n <DialogActions sx={dialogActions}>\n <Button variant=\"contained\" onClick={onSubmit} disabled={!isDirty}>\n {t('dictionary.save')}\n </Button>\n <Button variant=\"outlined\" onClick={onClose}>\n {t('dictionary.cancel')}\n </Button>\n </DialogActions>\n </D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material/Alert';
3
+ import Button from '@mui/material/Button';
4
+ import Dialog from '@mui/material/Dialog';
5
+ import DialogContent from '@mui/material/DialogContent';
6
+ import DialogTitle from '@mui/material/DialogTitle';
7
+ import DialogActions from '@mui/material/DialogActions';
8
+ import Link from '@mui/material/Link';
9
+ import Typography from '@mui/material/Typography';
10
+ import Checkbox from '@mui/material/Checkbox';
11
+ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
12
+ import FormControlLabel from '@mui/material/FormControlLabel';
13
+ import Box from '@mui/material/Box';
14
+ import { pluginRiScTranslationRef } from '../../utils/translations.esm.js';
15
+ import { dialogActions } from '../common/mixins.esm.js';
16
+
17
+ const RiScMigrationDialog = ({
18
+ openDialog,
19
+ handleCancel,
20
+ handleUpdate,
21
+ migrationVersions
22
+ }) => {
23
+ const { t } = useTranslationRef(pluginRiScTranslationRef);
24
+ const [saveMigration, setSaveMigration] = useState(false);
25
+ const handleCheckboxInput = (event) => {
26
+ setSaveMigration(event.target.checked);
27
+ };
28
+ return /* @__PURE__ */ React__default.createElement(Dialog, { open: openDialog }, /* @__PURE__ */ React__default.createElement(DialogTitle, null, t("migrationDialog.title")), /* @__PURE__ */ React__default.createElement(DialogContent, null, /* @__PURE__ */ React__default.createElement(Box, { sx: { marginBottom: "16px" } }, /* @__PURE__ */ React__default.createElement(Typography, null, t("migrationDialog.description"), migrationVersions?.toVersion, " ", t("migrationDialog.description2"), " ", migrationVersions?.fromVersion, t("migrationDialog.description3"), /* @__PURE__ */ React__default.createElement(
29
+ Link,
30
+ {
31
+ underline: "always",
32
+ target: "_blank",
33
+ href: "https://github.com/kartverket/backstage-plugin-risk-scorecard-backend/blob/main/docs/schemaChangelog.md"
34
+ },
35
+ t("migrationDialog.changelog")
36
+ ), " ", t("migrationDialog.description4"))), /* @__PURE__ */ React__default.createElement(Alert, { severity: "info", icon: false }, /* @__PURE__ */ React__default.createElement(
37
+ FormControlLabel,
38
+ {
39
+ control: /* @__PURE__ */ React__default.createElement(
40
+ Checkbox,
41
+ {
42
+ checked: saveMigration,
43
+ onChange: handleCheckboxInput
44
+ }
45
+ ),
46
+ label: t("migrationDialog.checkboxLabel")
47
+ }
48
+ ))), /* @__PURE__ */ React__default.createElement(DialogActions, { sx: dialogActions }, /* @__PURE__ */ React__default.createElement(
49
+ Button,
50
+ {
51
+ variant: "contained",
52
+ onClick: handleUpdate,
53
+ disabled: !saveMigration
54
+ },
55
+ t("dictionary.confirm")
56
+ ), /* @__PURE__ */ React__default.createElement(Button, { variant: "outlined", color: "primary", onClick: handleCancel }, t("dictionary.cancel"))));
57
+ };
58
+
59
+ export { RiScMigrationDialog };
60
+ //# sourceMappingURL=MigrationDialog.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationDialog.esm.js","sources":["../../../src/components/riScInfo/MigrationDialog.tsx"],"sourcesContent":["import React, { ReactComponentElement, useState } from 'react';\nimport Alert from '@mui/material/Alert';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogActions from '@mui/material/DialogActions';\nimport Link from '@mui/material/Link';\nimport Typography from '@mui/material/Typography';\nimport Checkbox from '@mui/material/Checkbox';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Box from '@mui/material/Box';\nimport { pluginRiScTranslationRef } from '../../utils/translations';\nimport { MigrationVersions } from '../../utils/types';\nimport { dialogActions } from '../common/mixins';\n\ninterface RiScMigrationDialogProps {\n openDialog: boolean;\n handleCancel: () => void;\n handleUpdate: () => void;\n migrationVersions?: MigrationVersions;\n}\n\nexport const RiScMigrationDialog = ({\n openDialog,\n handleCancel,\n handleUpdate,\n migrationVersions,\n}: RiScMigrationDialogProps): ReactComponentElement<any> => {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n const [saveMigration, setSaveMigration] = useState<boolean>(false);\n\n const handleCheckboxInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n setSaveMigration(event.target.checked);\n };\n\n return (\n <Dialog open={openDialog}>\n <DialogTitle>{t('migrationDialog.title')}</DialogTitle>\n <DialogContent>\n <Box sx={{ marginBottom: '16px' }}>\n <Typography>\n {t('migrationDialog.description')}\n {migrationVersions?.toVersion} {t('migrationDialog.description2')}{' '}\n {migrationVersions?.fromVersion}\n {t('migrationDialog.description3')}\n <Link\n underline=\"always\"\n target=\"_blank\"\n href=\"https://github.com/kartverket/backstage-plugin-risk-scorecard-backend/blob/main/docs/schemaChangelog.md\"\n >\n {t('migrationDialog.changelog')}\n </Link>{' '}\n {t('migrationDialog.description4')}\n </Typography>\n </Box>\n <Alert severity=\"info\" icon={false}>\n <FormControlLabel\n control={\n <Checkbox\n checked={saveMigration}\n onChange={handleCheckboxInput}\n />\n }\n label={t('migrationDialog.checkboxLabel')}\n />\n </Alert>\n </DialogContent>\n <DialogActions sx={dialogActions}>\n <Button\n variant=\"contained\"\n onClick={handleUpdate}\n disabled={!saveMigration}\n >\n {t('dictionary.confirm')}\n </Button>\n <Button variant=\"outlined\" color=\"primary\" onClick={handleCancel}>\n {t('dictionary.cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;AAwBO,MAAM,sBAAsB,CAAC;AAAA,EAClC,UAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAA4D,KAAA;AAC1D,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AAExD,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,SAAkB,KAAK,CAAA;AAEjE,EAAM,MAAA,mBAAA,GAAsB,CAAC,KAA+C,KAAA;AAC1E,IAAiB,gBAAA,CAAA,KAAA,CAAM,OAAO,OAAO,CAAA;AAAA,GACvC;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,MAAA,EA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