@backstage-community/plugin-rbac 1.40.0 → 1.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@ import React__default from 'react';
|
|
|
2
2
|
import TextField from '@mui/material/TextField';
|
|
3
3
|
import Typography from '@mui/material/Typography';
|
|
4
4
|
import { getDefaultRegistry } from '@rjsf/core';
|
|
5
|
-
import { getInnerSchemaForArrayItem } from '@rjsf/utils/lib/schema/getDefaultFormState';
|
|
5
|
+
import { getInnerSchemaForArrayItem } from '@rjsf/utils/lib/schema/getDefaultFormState.js';
|
|
6
6
|
|
|
7
7
|
const CustomArrayField = (props) => {
|
|
8
8
|
const { name, required, schema: sch, formData, onChange } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomArrayField.esm.js","sources":["../../../src/components/ConditionalAccess/CustomArrayField.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 React from 'react';\n\nimport TextField from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport { getDefaultRegistry } from '@rjsf/core';\nimport { FieldProps } from '@rjsf/utils';\nimport { getInnerSchemaForArrayItem } from '@rjsf/utils/lib/schema/getDefaultFormState';\n\nexport const CustomArrayField = (props: FieldProps) => {\n const { name, required, schema: sch, formData, onChange } = props;\n const [fieldVal, setFieldVal] = React.useState<string>(\n formData?.toString() ?? '',\n );\n\n const arrayItemsType = getInnerSchemaForArrayItem(sch).type;\n\n const DefaultArrayField = getDefaultRegistry().fields.ArrayField;\n\n return arrayItemsType === 'string' ? (\n <>\n <TextField\n name={name}\n variant=\"outlined\"\n label={name}\n value={fieldVal}\n onChange={e => {\n const value = e.target.value;\n setFieldVal(value);\n onChange(value ? value.split(',').map(val => val.trim()) : []);\n }}\n required={required}\n placeholder=\"string, string\"\n />\n <Typography variant=\"caption\">\n <Typography\n variant=\"subtitle2\"\n sx={{\n mt: 0.5,\n fontWeight: 500,\n color: theme => `${theme.palette.grey[500]}`,\n }}\n >\n {sch.description ?? ''}\n </Typography>\n </Typography>\n </>\n ) : (\n <DefaultArrayField {...props} />\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAuBa,MAAA,gBAAA,GAAmB,CAAC,KAAsB,KAAA;AACrD,EAAA,MAAM,EAAE,IAAM,EAAA,QAAA,EAAU,QAAQ,GAAK,EAAA,QAAA,EAAU,UAAa,GAAA,KAAA;AAC5D,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAIA,cAAM,CAAA,QAAA;AAAA,IACpC,QAAA,EAAU,UAAc,IAAA;AAAA,GAC1B;AAEA,EAAM,MAAA,cAAA,GAAiB,0BAA2B,CAAA,GAAG,CAAE,CAAA,IAAA;AAEvD,EAAM,MAAA,iBAAA,GAAoB,kBAAmB,EAAA,CAAE,MAAO,CAAA,UAAA;AAEtD,EAAO,OAAA,cAAA,KAAmB,2BAEtBA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,OAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAAA,IAAA;AAAA,MACP,KAAO,EAAA,QAAA;AAAA,MACP,UAAU,CAAK,CAAA,KAAA;AACb,QAAM,MAAA,KAAA,GAAQ,EAAE,MAAO,CAAA,KAAA;AACvB,QAAA,WAAA,CAAY,KAAK,CAAA;AACjB,QAAA,QAAA,CAAS,KAAQ,GAAA,KAAA,CAAM,KAAM,CAAA,GAAG,CAAE,CAAA,GAAA,CAAI,CAAO,GAAA,KAAA,GAAA,CAAI,IAAK,EAAC,CAAI,GAAA,EAAE,CAAA;AAAA,OAC/D;AAAA,MACA,QAAA;AAAA,MACA,WAAY,EAAA;AAAA;AAAA,GAEd,kBAAAA,cAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,SAClB,EAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,WAAA;AAAA,MACR,EAAI,EAAA;AAAA,QACF,EAAI,EAAA,GAAA;AAAA,QACJ,UAAY,EAAA,GAAA;AAAA,QACZ,OAAO,CAAS,KAAA,KAAA,CAAA,EAAG,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA;AAAA;AAC5C,KAAA;AAAA,IAEC,IAAI,WAAe,IAAA;AAAA,GAExB,CACF,CAAA,mBAECA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA,EAAmB,GAAG,KAAO,EAAA,CAAA;AAElC;;;;"}
|
|
1
|
+
{"version":3,"file":"CustomArrayField.esm.js","sources":["../../../src/components/ConditionalAccess/CustomArrayField.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 React from 'react';\n\nimport TextField from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\nimport { getDefaultRegistry } from '@rjsf/core';\nimport { FieldProps } from '@rjsf/utils';\nimport { getInnerSchemaForArrayItem } from '@rjsf/utils/lib/schema/getDefaultFormState.js';\n\nexport const CustomArrayField = (props: FieldProps) => {\n const { name, required, schema: sch, formData, onChange } = props;\n const [fieldVal, setFieldVal] = React.useState<string>(\n formData?.toString() ?? '',\n );\n\n const arrayItemsType = getInnerSchemaForArrayItem(sch).type;\n\n const DefaultArrayField = getDefaultRegistry().fields.ArrayField;\n\n return arrayItemsType === 'string' ? (\n <>\n <TextField\n name={name}\n variant=\"outlined\"\n label={name}\n value={fieldVal}\n onChange={e => {\n const value = e.target.value;\n setFieldVal(value);\n onChange(value ? value.split(',').map(val => val.trim()) : []);\n }}\n required={required}\n placeholder=\"string, string\"\n />\n <Typography variant=\"caption\">\n <Typography\n variant=\"subtitle2\"\n sx={{\n mt: 0.5,\n fontWeight: 500,\n color: theme => `${theme.palette.grey[500]}`,\n }}\n >\n {sch.description ?? ''}\n </Typography>\n </Typography>\n </>\n ) : (\n <DefaultArrayField {...props} />\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAuBa,MAAA,gBAAA,GAAmB,CAAC,KAAsB,KAAA;AACrD,EAAA,MAAM,EAAE,IAAM,EAAA,QAAA,EAAU,QAAQ,GAAK,EAAA,QAAA,EAAU,UAAa,GAAA,KAAA;AAC5D,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAIA,cAAM,CAAA,QAAA;AAAA,IACpC,QAAA,EAAU,UAAc,IAAA;AAAA,GAC1B;AAEA,EAAM,MAAA,cAAA,GAAiB,0BAA2B,CAAA,GAAG,CAAE,CAAA,IAAA;AAEvD,EAAM,MAAA,iBAAA,GAAoB,kBAAmB,EAAA,CAAE,MAAO,CAAA,UAAA;AAEtD,EAAO,OAAA,cAAA,KAAmB,2BAEtBA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,OAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAA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