@backstage-community/plugin-rbac 1.40.1 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/components/Administration.esm.js +2 -2
- package/dist/components/Administration.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/AddNestedConditionButton.esm.js +16 -7
- package/dist/components/ConditionalAccess/AddNestedConditionButton.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ComplexConditionRow.esm.js +40 -38
- package/dist/components/ConditionalAccess/ComplexConditionRow.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ComplexConditionRowButtons.esm.js +34 -32
- package/dist/components/ConditionalAccess/ComplexConditionRowButtons.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ConditionRule.esm.js +2 -2
- package/dist/components/ConditionalAccess/ConditionRule.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ConditionalAccessSidebar.esm.js +63 -53
- package/dist/components/ConditionalAccess/ConditionalAccessSidebar.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ConditionsForm.esm.js +108 -96
- package/dist/components/ConditionalAccess/ConditionsForm.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ConditionsFormRow.esm.js +236 -215
- package/dist/components/ConditionalAccess/ConditionsFormRow.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/ConditionsFormRowFields.esm.js +63 -60
- package/dist/components/ConditionalAccess/ConditionsFormRowFields.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/CriteriaToggleButton.esm.js +5 -5
- package/dist/components/ConditionalAccess/CriteriaToggleButton.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/CustomArrayField.esm.js +32 -30
- package/dist/components/ConditionalAccess/CustomArrayField.esm.js.map +1 -1
- package/dist/components/ConditionalAccess/RulesDropdownOption.esm.js +11 -10
- package/dist/components/ConditionalAccess/RulesDropdownOption.esm.js.map +1 -1
- package/dist/components/CreateRole/AddMembersForm.esm.js +69 -59
- package/dist/components/CreateRole/AddMembersForm.esm.js.map +1 -1
- package/dist/components/CreateRole/AddedMembersTable.esm.js +3 -3
- package/dist/components/CreateRole/AddedMembersTable.esm.js.map +1 -1
- package/dist/components/CreateRole/AddedMembersTableColumn.esm.js +7 -7
- package/dist/components/CreateRole/AddedMembersTableColumn.esm.js.map +1 -1
- package/dist/components/CreateRole/CancelDialog.esm.js +73 -59
- package/dist/components/CreateRole/CancelDialog.esm.js.map +1 -1
- package/dist/components/CreateRole/CreateRolePage.esm.js +23 -20
- package/dist/components/CreateRole/CreateRolePage.esm.js.map +1 -1
- package/dist/components/CreateRole/EditRolePage.esm.js +27 -24
- package/dist/components/CreateRole/EditRolePage.esm.js.map +1 -1
- package/dist/components/CreateRole/MembersDropdownOption.esm.js +34 -24
- package/dist/components/CreateRole/MembersDropdownOption.esm.js.map +1 -1
- package/dist/components/CreateRole/PermissionPoliciesForm.esm.js +39 -26
- package/dist/components/CreateRole/PermissionPoliciesForm.esm.js.map +1 -1
- package/dist/components/CreateRole/PermissionPoliciesFormNestedRow.esm.js +107 -90
- package/dist/components/CreateRole/PermissionPoliciesFormNestedRow.esm.js.map +1 -1
- package/dist/components/CreateRole/PermissionPoliciesFormRow.esm.js +82 -72
- package/dist/components/CreateRole/PermissionPoliciesFormRow.esm.js.map +1 -1
- package/dist/components/CreateRole/PermissionPoliciesFormTable.esm.js +127 -111
- package/dist/components/CreateRole/PermissionPoliciesFormTable.esm.js.map +1 -1
- package/dist/components/CreateRole/PluginsDropdown.esm.js +6 -5
- package/dist/components/CreateRole/PluginsDropdown.esm.js.map +1 -1
- package/dist/components/CreateRole/PluginsDropdownOption.esm.js +21 -18
- package/dist/components/CreateRole/PluginsDropdownOption.esm.js.map +1 -1
- package/dist/components/CreateRole/ReviewStep.esm.js +21 -12
- package/dist/components/CreateRole/ReviewStep.esm.js.map +1 -1
- package/dist/components/CreateRole/ReviewStepTable.esm.js +18 -11
- package/dist/components/CreateRole/ReviewStepTable.esm.js.map +1 -1
- package/dist/components/CreateRole/RoleDetailsForm.esm.js +55 -53
- package/dist/components/CreateRole/RoleDetailsForm.esm.js.map +1 -1
- package/dist/components/CreateRole/RoleForm.esm.js +136 -113
- package/dist/components/CreateRole/RoleForm.esm.js.map +1 -1
- package/dist/components/DownloadUserStatistics.esm.js +5 -5
- package/dist/components/DownloadUserStatistics.esm.js.map +1 -1
- package/dist/components/EditRole.esm.js +6 -6
- package/dist/components/EditRole.esm.js.map +1 -1
- package/dist/components/RbacPage.esm.js +6 -3
- package/dist/components/RbacPage.esm.js.map +1 -1
- package/dist/components/RoleOverview/AboutCard.esm.js +46 -39
- package/dist/components/RoleOverview/AboutCard.esm.js.map +1 -1
- package/dist/components/RoleOverview/MembersCard.esm.js +36 -32
- package/dist/components/RoleOverview/MembersCard.esm.js.map +1 -1
- package/dist/components/RoleOverview/MembersListColumns.esm.js +5 -5
- package/dist/components/RoleOverview/MembersListColumns.esm.js.map +1 -1
- package/dist/components/RoleOverview/PermissionsCard.esm.js +36 -32
- package/dist/components/RoleOverview/PermissionsCard.esm.js.map +1 -1
- package/dist/components/RoleOverview/RoleOverviewPage.esm.js +39 -30
- package/dist/components/RoleOverview/RoleOverviewPage.esm.js.map +1 -1
- package/dist/components/RolesList/DeleteRole.esm.js +6 -6
- package/dist/components/RolesList/DeleteRole.esm.js.map +1 -1
- package/dist/components/RolesList/DeleteRoleDialog.esm.js +128 -92
- package/dist/components/RolesList/DeleteRoleDialog.esm.js.map +1 -1
- package/dist/components/RolesList/RolesList.esm.js +54 -46
- package/dist/components/RolesList/RolesList.esm.js.map +1 -1
- package/dist/components/RolesList/RolesListColumns.esm.js +19 -16
- package/dist/components/RolesList/RolesListColumns.esm.js.map +1 -1
- package/dist/components/RolesList/RolesListToolbar.esm.js +49 -36
- package/dist/components/RolesList/RolesListToolbar.esm.js.map +1 -1
- package/dist/components/Router.esm.js +14 -9
- package/dist/components/Router.esm.js.map +1 -1
- package/dist/components/SnackbarAlert.esm.js +5 -5
- package/dist/components/SnackbarAlert.esm.js.map +1 -1
- package/dist/components/ToastContext.esm.js +5 -4
- package/dist/components/ToastContext.esm.js.map +1 -1
- package/dist/hooks/useMembers.esm.js +2 -2
- package/dist/hooks/useMembers.esm.js.map +1 -1
- package/dist/hooks/usePermissionPolicies.esm.js +4 -4
- package/dist/hooks/usePermissionPolicies.esm.js.map +1 -1
- package/dist/hooks/useRoles.esm.js +9 -7
- package/dist/hooks/useRoles.esm.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/package.json +13 -13
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createElement } from 'react';
|
|
2
3
|
import Typography from '@mui/material/Typography';
|
|
3
4
|
import Checkbox from '@mui/material/Checkbox';
|
|
4
5
|
import Box from '@mui/material/Box';
|
|
@@ -14,7 +15,7 @@ const PluginsDropdownOption = ({
|
|
|
14
15
|
const { label, value } = option;
|
|
15
16
|
const matches = match(label, inputValue, { insideWords: true });
|
|
16
17
|
const parts = parse(label, matches);
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ createElement(
|
|
18
19
|
"li",
|
|
19
20
|
{
|
|
20
21
|
...props,
|
|
@@ -23,27 +24,29 @@ const PluginsDropdownOption = ({
|
|
|
23
24
|
...value === "" ? { borderBottom: `1px solid #D2D2D2` } : {}
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ jsxs(
|
|
27
28
|
Box,
|
|
28
29
|
{
|
|
29
30
|
sx: {
|
|
30
31
|
display: "flex"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
/* @__PURE__ */ React__default.createElement(Checkbox, { style: { marginRight: 8 }, checked: state.selected }),
|
|
34
|
-
/* @__PURE__ */ React__default.createElement(Typography, { component: "span", sx: { marginTop: "0.5rem" } }, parts.map((part) => /* @__PURE__ */ React__default.createElement(
|
|
35
|
-
Typography,
|
|
36
|
-
{
|
|
37
|
-
key: `${part.text}-${label}`,
|
|
38
|
-
component: "span",
|
|
39
|
-
sx: {
|
|
40
|
-
fontWeight: !inputValue || part.highlight ? 400 : 700,
|
|
41
|
-
color: (theme) => theme.palette.text.primary
|
|
42
|
-
},
|
|
43
|
-
"data-testid": option.label
|
|
44
32
|
},
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Checkbox, { style: { marginRight: 8 }, checked: state.selected }),
|
|
35
|
+
/* @__PURE__ */ jsx(Typography, { component: "span", sx: { marginTop: "0.5rem" }, children: parts.map((part) => /* @__PURE__ */ jsx(
|
|
36
|
+
Typography,
|
|
37
|
+
{
|
|
38
|
+
component: "span",
|
|
39
|
+
sx: {
|
|
40
|
+
fontWeight: !inputValue || part.highlight ? 400 : 700,
|
|
41
|
+
color: (theme) => theme.palette.text.primary
|
|
42
|
+
},
|
|
43
|
+
"data-testid": option.label,
|
|
44
|
+
children: part.text
|
|
45
|
+
},
|
|
46
|
+
`${part.text}-${label}`
|
|
47
|
+
)) })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
47
50
|
)
|
|
48
51
|
);
|
|
49
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginsDropdownOption.esm.js","sources":["../../../src/components/CreateRole/PluginsDropdownOption.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"PluginsDropdownOption.esm.js","sources":["../../../src/components/CreateRole/PluginsDropdownOption.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { HTMLAttributes } from 'react';\n\nimport { AutocompleteRenderOptionState } from '@mui/material/Autocomplete';\nimport Typography from '@mui/material/Typography';\nimport Checkbox from '@mui/material/Checkbox';\nimport Box from '@mui/material/Box';\nimport match from 'autosuggest-highlight/match';\nimport parse from 'autosuggest-highlight/parse';\n\nimport { SelectedPlugin } from '../../types';\n\ntype PluginsDropdownOptionProps = {\n option: SelectedPlugin;\n state: AutocompleteRenderOptionState;\n props: HTMLAttributes<HTMLLIElement>;\n};\n\nexport const PluginsDropdownOption = ({\n props,\n option,\n state,\n}: PluginsDropdownOptionProps) => {\n const { inputValue } = state;\n const { label, value } = option;\n const matches = match(label, inputValue, { insideWords: true });\n const parts = parse(label, matches);\n\n return (\n <li\n {...props}\n key={`${label}`}\n style={{\n ...(value === '' ? { borderBottom: `1px solid #D2D2D2` } : {}),\n }}\n >\n <Box\n sx={{\n display: 'flex',\n }}\n >\n <Checkbox style={{ marginRight: 8 }} checked={state.selected} />\n <Typography component=\"span\" sx={{ marginTop: '0.5rem' }}>\n {parts.map(part => (\n <Typography\n key={`${part.text}-${label}`}\n component=\"span\"\n sx={{\n fontWeight: !inputValue || part.highlight ? 400 : 700,\n color: theme => theme.palette.text.primary,\n }}\n data-testid={option.label}\n >\n {part.text}\n </Typography>\n ))}\n </Typography>\n </Box>\n </li>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAgCO,MAAM,wBAAwB,CAAC;AAAA,EACpC,KAAA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AAA,cACA,eAAa,MAAO,CAAA,KAAA;AAAA,cAEnB,QAAK,EAAA,IAAA,CAAA;AAAA,aAAA;AAAA,YARD,CAAG,EAAA,IAAA,CAAK,IAAI,CAAA,CAAA,EAAI,KAAK,CAAA;AAAA,WAU7B,CACH,EAAA;AAAA;AAAA;AAAA;AACF,GACF;AAEJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { StructuredMetadataTable } from '@backstage/core-components';
|
|
3
3
|
import Typography from '@mui/material/Typography';
|
|
4
4
|
import { getPermissionsNumber } from '../../utils/create-role-utils.esm.js';
|
|
@@ -13,8 +13,14 @@ const tableMetadata = (values) => {
|
|
|
13
13
|
values
|
|
14
14
|
)})`;
|
|
15
15
|
return {
|
|
16
|
-
"Name, description, and owner of role": /* @__PURE__ */
|
|
17
|
-
|
|
16
|
+
"Name, description, and owner of role": /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Typography, { sx: { margin: "0px" }, children: values.name }),
|
|
18
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
19
|
+
/* @__PURE__ */ jsx(Typography, { sx: { margin: "0px" }, children: values.description || "-" }),
|
|
20
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
21
|
+
/* @__PURE__ */ jsx(Typography, { sx: { margin: "0px" }, children: values.owner || "-" })
|
|
22
|
+
] }),
|
|
23
|
+
[membersKey]: /* @__PURE__ */ jsx(
|
|
18
24
|
ReviewStepTable,
|
|
19
25
|
{
|
|
20
26
|
rows: values.selectedMembers,
|
|
@@ -22,7 +28,7 @@ const tableMetadata = (values) => {
|
|
|
22
28
|
tableWrapperWidth: 550
|
|
23
29
|
}
|
|
24
30
|
),
|
|
25
|
-
[permissionPoliciesKey]: /* @__PURE__ */
|
|
31
|
+
[permissionPoliciesKey]: /* @__PURE__ */ jsx(
|
|
26
32
|
ReviewStepTable,
|
|
27
33
|
{
|
|
28
34
|
rows: values.permissionPoliciesRows,
|
|
@@ -36,14 +42,17 @@ const ReviewStep = ({
|
|
|
36
42
|
values,
|
|
37
43
|
isEditing
|
|
38
44
|
}) => {
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", { style: { overflow: "auto" }, children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: isEditing ? "Review and save" : "Review and create" }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
StructuredMetadataTable,
|
|
49
|
+
{
|
|
50
|
+
dense: true,
|
|
51
|
+
metadata: tableMetadata(values),
|
|
52
|
+
options: { titleFormat: (key) => key }
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
47
56
|
};
|
|
48
57
|
|
|
49
58
|
export { ReviewStep };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewStep.esm.js","sources":["../../../src/components/CreateRole/ReviewStep.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"ReviewStep.esm.js","sources":["../../../src/components/CreateRole/ReviewStep.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StructuredMetadataTable } from '@backstage/core-components';\n\nimport Typography from '@mui/material/Typography';\n\nimport { getPermissionsNumber } from '../../utils/create-role-utils';\nimport { getMembers } from '../../utils/rbac-utils';\nimport { reviewStepMemebersTableColumns } from './AddedMembersTableColumn';\nimport { ReviewStepTable } from './ReviewStepTable';\nimport { selectedPermissionPoliciesColumn } from './SelectedPermissionPoliciesColumn';\nimport { RoleFormValues } from './types';\n\nconst tableMetadata = (values: RoleFormValues) => {\n const membersKey =\n values.selectedMembers.length > 0\n ? `Users and groups (${getMembers(values.selectedMembers)})`\n : 'Users and groups';\n const permissionPoliciesKey = `Permission policies (${getPermissionsNumber(\n values,\n )})`;\n return {\n 'Name, description, and owner of role': (\n <>\n <Typography sx={{ margin: '0px' }}>{values.name}</Typography>\n <br />\n <Typography sx={{ margin: '0px' }}>\n {values.description || '-'}\n </Typography>\n <br />\n <Typography sx={{ margin: '0px' }}>{values.owner || '-'}</Typography>\n </>\n ),\n [membersKey]: (\n <ReviewStepTable\n rows={values.selectedMembers}\n columns={reviewStepMemebersTableColumns()}\n tableWrapperWidth={550}\n />\n ),\n [permissionPoliciesKey]: (\n <ReviewStepTable\n rows={values.permissionPoliciesRows}\n columns={selectedPermissionPoliciesColumn()}\n tableWrapperWidth={700}\n />\n ),\n };\n};\n\nexport const ReviewStep = ({\n values,\n isEditing,\n}: {\n values: RoleFormValues;\n isEditing: boolean;\n}) => {\n return (\n <div style={{ overflow: 'auto' }}>\n <Typography variant=\"h6\">\n {isEditing ? 'Review and save' : 'Review and create'}\n </Typography>\n <StructuredMetadataTable\n dense\n metadata={tableMetadata(values)}\n options={{ titleFormat: (key: string) => key }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;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AAA,EACzB,MAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAA,4BACG,KAAI,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,QACtB,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,IACjB,EAAA,QAAA,EAAA,SAAA,GAAY,oBAAoB,mBACnC,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,KAAK,EAAA,IAAA;AAAA,QACL,QAAA,EAAU,cAAc,MAAM,CAAA;AAAA,QAC9B,OAAS,EAAA,EAAE,WAAa,EAAA,CAAC,QAAgB,GAAI;AAAA;AAAA;AAC/C,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Fragment } from 'react';
|
|
2
3
|
|
|
3
4
|
const ReviewStepTable = ({
|
|
4
5
|
columns,
|
|
5
6
|
rows,
|
|
6
7
|
tableWrapperWidth
|
|
7
8
|
}) => {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
9
10
|
"div",
|
|
10
11
|
{
|
|
11
12
|
style: {
|
|
12
13
|
maxHeight: "230px",
|
|
13
14
|
overflow: "auto",
|
|
14
15
|
width: `${tableWrapperWidth}px`
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
/* @__PURE__ */ React__default.createElement("table", { style: { width: `${tableWrapperWidth - 50}px` } }, /* @__PURE__ */ React__default.createElement("thead", null, /* @__PURE__ */ React__default.createElement("tr", null, columns.map((col) => /* @__PURE__ */ React__default.createElement("th", { style: { width: "150px" }, key: col.title }, col.title)))), /* @__PURE__ */ React__default.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: rowIndex }, /* @__PURE__ */ React__default.createElement("tr", null, columns.map((rowCol) => /* @__PURE__ */ React__default.createElement(
|
|
18
|
-
"td",
|
|
19
|
-
{
|
|
20
|
-
style: { width: "150px" },
|
|
21
|
-
key: `${rowCol.title}-${rowCol.field}`
|
|
22
16
|
},
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
children: /* @__PURE__ */ jsxs("table", { style: { width: `${tableWrapperWidth - 50}px` }, children: [
|
|
18
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsx("th", { style: { width: "150px" }, children: col.title }, col.title)) }) }),
|
|
19
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx("tr", { children: columns.map((rowCol) => /* @__PURE__ */ jsx(
|
|
21
|
+
"td",
|
|
22
|
+
{
|
|
23
|
+
style: { width: "150px" },
|
|
24
|
+
children: rowCol.render ? rowCol.render(row[rowCol.field]) : row[rowCol.field] || (rowCol.emptyValue ?? "")
|
|
25
|
+
},
|
|
26
|
+
`${rowCol.title}-${rowCol.field}`
|
|
27
|
+
)) }),
|
|
28
|
+
/* @__PURE__ */ jsx("tr", {})
|
|
29
|
+
] }, rowIndex)) })
|
|
30
|
+
] })
|
|
31
|
+
}
|
|
25
32
|
);
|
|
26
33
|
};
|
|
27
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewStepTable.esm.js","sources":["../../../src/components/CreateRole/ReviewStepTable.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"ReviewStepTable.esm.js","sources":["../../../src/components/CreateRole/ReviewStepTable.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Fragment } from 'react';\n\nexport const ReviewStepTable = ({\n columns,\n rows,\n tableWrapperWidth,\n}: {\n columns: any[];\n rows: any[];\n tableWrapperWidth: number;\n}) => {\n return (\n <div\n style={{\n maxHeight: '230px',\n overflow: 'auto',\n width: `${tableWrapperWidth}px`,\n }}\n >\n <table style={{ width: `${tableWrapperWidth - 50}px` }}>\n <thead>\n <tr>\n {columns.map(col => (\n <th style={{ width: '150px' }} key={col.title}>\n {col.title}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, rowIndex) => (\n <Fragment key={rowIndex}>\n <tr>\n {columns.map(rowCol => (\n <td\n style={{ width: '150px' }}\n key={`${rowCol.title}-${rowCol.field}`}\n >\n {rowCol.render\n ? rowCol.render(row[rowCol.field])\n : row[rowCol.field] || (rowCol.emptyValue ?? '')}\n </td>\n ))}\n </tr>\n <tr />\n </Fragment>\n ))}\n </tbody>\n </table>\n </div>\n );\n};\n"],"names":[],"mappings":";;;AAiBO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,OAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAIM,KAAA;AACJ,EACE,uBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,SAAW,EAAA,OAAA;AAAA,QACX,QA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,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import TextField from '@mui/material/TextField';
|
|
3
3
|
|
|
4
4
|
const RoleDetailsForm = ({
|
|
@@ -9,64 +9,66 @@ const RoleDetailsForm = ({
|
|
|
9
9
|
handleBlur,
|
|
10
10
|
handleChange
|
|
11
11
|
}) => {
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
15
|
style: {
|
|
16
16
|
display: "flex",
|
|
17
17
|
flexDirection: "column",
|
|
18
18
|
gap: "20px"
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
19
|
+
},
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
TextField,
|
|
23
|
+
{
|
|
24
|
+
required: true,
|
|
25
|
+
label: "Name",
|
|
26
|
+
variant: "outlined",
|
|
27
|
+
id: "role-name",
|
|
28
|
+
"data-testid": "role-name",
|
|
29
|
+
"aria-labelledby": "name",
|
|
30
|
+
helperText: nameError ?? "Enter name of the role",
|
|
31
|
+
value: name,
|
|
32
|
+
name: "name",
|
|
33
|
+
onChange: handleChange,
|
|
34
|
+
onBlur: handleBlur,
|
|
35
|
+
error: !!nameError
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
TextField,
|
|
40
|
+
{
|
|
41
|
+
label: "Description",
|
|
42
|
+
variant: "outlined",
|
|
43
|
+
helperText: "Enter a brief description about the role (The purpose of the role)",
|
|
44
|
+
value: description,
|
|
45
|
+
"data-testid": "role-description",
|
|
46
|
+
id: "role-description",
|
|
47
|
+
name: "description",
|
|
48
|
+
"aria-labelledby": "description",
|
|
49
|
+
onChange: handleChange,
|
|
50
|
+
onBlur: handleBlur,
|
|
51
|
+
multiline: true
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
TextField,
|
|
56
|
+
{
|
|
57
|
+
label: "Owner",
|
|
58
|
+
variant: "outlined",
|
|
59
|
+
helperText: "Optional: Enter a user or group who will have permission to edit this role and create additional roles. In the next step, specify which users they can assign to their roles and which plugins they can grant access to. If left blank, automatically assigns the author at creation.",
|
|
60
|
+
value: owner,
|
|
61
|
+
"data-testid": "role-owner",
|
|
62
|
+
id: "role-owner",
|
|
63
|
+
name: "owner",
|
|
64
|
+
"aria-labelledby": "owner",
|
|
65
|
+
onChange: handleChange,
|
|
66
|
+
onBlur: handleBlur,
|
|
67
|
+
multiline: true
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
]
|
|
71
|
+
}
|
|
70
72
|
);
|
|
71
73
|
};
|
|
72
74
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleDetailsForm.esm.js","sources":["../../../src/components/CreateRole/RoleDetailsForm.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport
|
|
1
|
+
{"version":3,"file":"RoleDetailsForm.esm.js","sources":["../../../src/components/CreateRole/RoleDetailsForm.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { FocusEventHandler, ChangeEventHandler } from 'react';\n\nimport TextField from '@mui/material/TextField';\n\ntype RoleDetailsFormProps = {\n name: string;\n description?: string;\n owner?: string;\n nameError?: string;\n handleBlur: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n handleChange: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n};\n\nexport const RoleDetailsForm = ({\n name,\n description,\n owner,\n nameError,\n handleBlur,\n handleChange,\n}: RoleDetailsFormProps) => {\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '20px',\n }}\n >\n <TextField\n required\n label=\"Name\"\n variant=\"outlined\"\n id=\"role-name\"\n data-testid=\"role-name\"\n aria-labelledby=\"name\"\n helperText={nameError ?? 'Enter name of the role'}\n value={name}\n name=\"name\"\n onChange={handleChange}\n onBlur={handleBlur}\n error={!!nameError}\n />\n <TextField\n label=\"Description\"\n variant=\"outlined\"\n helperText=\"Enter a brief description about the role (The purpose of the role)\"\n value={description}\n data-testid=\"role-description\"\n id=\"role-description\"\n name=\"description\"\n aria-labelledby=\"description\"\n onChange={handleChange}\n onBlur={handleBlur}\n multiline\n />\n <TextField\n label=\"Owner\"\n variant=\"outlined\"\n helperText=\"Optional: Enter a user or group who will have permission to edit this role and create additional roles. In the next step, specify which users they can assign to their roles and which plugins they can grant access to. If left blank, automatically assigns the author at creation.\"\n value={owner}\n data-testid=\"role-owner\"\n id=\"role-owner\"\n name=\"owner\"\n aria-labelledby=\"owner\"\n onChange={handleChange}\n onBlur={handleBlur}\n multiline\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;AA4BO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAA4B,KAAA;AAC1B,EACE,uBAAA,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,OAAS,EAAA,MAAA;AAAA,QACT,aAAe,EAAA,QAAA;AAAA,QACf,GAAK,EAAA;AAAA,OACP;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,SAAA;AAAA,UAAA;AAAA,YACC,QAAQ,EAAA,IAAA;AAAA,YACR,KAAM,EAAA,MAAA;AAAA,YACN,OAAQ,EAAA,UAAA;AAAA,YACR,EAAG,EAAA,WAAA;AAAA,YACH,aAAY,EAAA,WAAA;AAAA,YACZ,iBAAgB,EAAA,MAAA;AAAA,YAChB,YAAY,SAAa,IAAA,wBAAA;AAAA,YACzB,KAAO,EAAA,IAAA;AAAA,YACP,IAAK,EAAA,MAAA;AAAA,YACL,QAAU,EAAA,YAAA;AAAA,YACV,MAAQ,EAAA,UAAA;AAAA,YACR,KAAA,EAAO,CAAC,CAAC;AAAA;AAAA,SACX;AAAA,wBACA,GAAA;AAAA,UAAC,SAAA;AAAA,UAAA;AAAA,YACC,KAAM,EAAA,aAAA;AAA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