@red-hat-developer-hub/backstage-plugin-bui-test 0.0.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/README.md +13 -0
- package/dist/components/BUITestPage.esm.js +45 -0
- package/dist/components/BUITestPage.esm.js.map +1 -0
- package/dist/components/CardExample.esm.js +16 -0
- package/dist/components/CardExample.esm.js.map +1 -0
- package/dist/components/FormComponents.esm.js +103 -0
- package/dist/components/FormComponents.esm.js.map +1 -0
- package/dist/components/TableExample.esm.js +184 -0
- package/dist/components/TableExample.esm.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/plugin.esm.js +19 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +8 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# bui-test
|
|
2
|
+
|
|
3
|
+
Welcome to the bui-test plugin!
|
|
4
|
+
|
|
5
|
+
_This plugin was created through the Backstage CLI_
|
|
6
|
+
|
|
7
|
+
## Getting started
|
|
8
|
+
|
|
9
|
+
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/bui-test](http://localhost:3000/bui-test).
|
|
10
|
+
|
|
11
|
+
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
|
|
12
|
+
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
|
|
13
|
+
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { HeaderPage, Container, Tabs, TabPanel } from '@backstage/ui';
|
|
3
|
+
import { useLocation } from 'react-router';
|
|
4
|
+
import { UserSettingsThemeToggle } from '@backstage/plugin-user-settings';
|
|
5
|
+
import { FormComponents } from './FormComponents.esm.js';
|
|
6
|
+
import { TableExample } from './TableExample.esm.js';
|
|
7
|
+
import { CardsExample } from './CardExample.esm.js';
|
|
8
|
+
|
|
9
|
+
const BUITestPage = () => {
|
|
10
|
+
const { pathname } = useLocation();
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
HeaderPage,
|
|
14
|
+
{
|
|
15
|
+
title: "Backstage UI Tests",
|
|
16
|
+
customActions: /* @__PURE__ */ jsx(UserSettingsThemeToggle, {}),
|
|
17
|
+
tabs: [
|
|
18
|
+
{
|
|
19
|
+
id: "form-components",
|
|
20
|
+
label: "Form Components",
|
|
21
|
+
href: "."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "table-example",
|
|
25
|
+
label: "Table Example",
|
|
26
|
+
href: "table-example"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "card-example",
|
|
30
|
+
label: "Card Example",
|
|
31
|
+
href: "card-example"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Tabs, { selectedKey: pathname.split("/")[2] ?? "form-components", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(TabPanel, { id: "form-components", children: /* @__PURE__ */ jsx(FormComponents, {}) }),
|
|
38
|
+
/* @__PURE__ */ jsx(TabPanel, { id: "table-example", children: /* @__PURE__ */ jsx(TableExample, {}) }),
|
|
39
|
+
/* @__PURE__ */ jsx(TabPanel, { id: "card-example", children: /* @__PURE__ */ jsx(CardsExample, {}) })
|
|
40
|
+
] }) })
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { BUITestPage };
|
|
45
|
+
//# sourceMappingURL=BUITestPage.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BUITestPage.esm.js","sources":["../../src/components/BUITestPage.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Container, HeaderPage, TabPanel, Tabs } from '@backstage/ui';\n\nimport { useLocation } from 'react-router';\n\nimport { UserSettingsThemeToggle } from '@backstage/plugin-user-settings';\n\nimport { FormComponents } from './FormComponents';\nimport { TableExample } from './TableExample';\nimport { CardsExample } from './CardExample';\n\nexport const BUITestPage = () => {\n const { pathname } = useLocation();\n\n return (\n <>\n <HeaderPage\n title=\"Backstage UI Tests\"\n customActions={<UserSettingsThemeToggle />}\n tabs={[\n {\n id: 'form-components',\n label: 'Form Components',\n href: '.',\n },\n {\n id: 'table-example',\n label: 'Table Example',\n href: 'table-example',\n },\n {\n id: 'card-example',\n label: 'Card Example',\n href: 'card-example',\n },\n ]}\n />\n <Container>\n <Tabs selectedKey={pathname.split('/')[2] ?? 'form-components'}>\n <TabPanel id=\"form-components\">\n <FormComponents />\n </TabPanel>\n <TabPanel id=\"table-example\">\n <TableExample />\n </TabPanel>\n <TabPanel id=\"card-example\">\n <CardsExample />\n </TabPanel>\n </Tabs>\n </Container>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA0BO,MAAM,cAAc,MAAM;AAC/B,EAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA;AAEjC,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,oBAAA;AAAA,QACN,aAAA,sBAAgB,uBAAwB,EAAA,EAAA,CAAA;AAAA,QACxC,IAAM,EAAA;AAAA,UACJ;AAAA,YACE,EAAI,EAAA,iBAAA;AAAA,YACJ,KAAO,EAAA,iBAAA;AAAA,YACP,IAAM,EAAA;AAAA,WACR;AAAA,UACA;AAAA,YACE,EAAI,EAAA,eAAA;AAAA,YACJ,KAAO,EAAA,eAAA;AAAA,YACP,IAAM,EAAA;AAAA,WACR;AAAA,UACA;AAAA,YACE,EAAI,EAAA,cAAA;AAAA,YACJ,KAAO,EAAA,cAAA;AAAA,YACP,IAAM,EAAA;AAAA;AACR;AACF;AAAA,KACF;AAAA,oBACA,GAAA,CAAC,SACC,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,WAAA,EAAa,QAAS,CAAA,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,IAAK,iBAC3C,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,EAAA,EAAG,iBACX,EAAA,QAAA,kBAAA,GAAA,CAAC,kBAAe,CAClB,EAAA,CAAA;AAAA,0BACC,QAAS,EAAA,EAAA,EAAA,EAAG,eACX,EAAA,QAAA,kBAAA,GAAA,CAAC,gBAAa,CAChB,EAAA,CAAA;AAAA,0BACC,QAAS,EAAA,EAAA,EAAA,EAAG,cACX,EAAA,QAAA,kBAAA,GAAA,CAAC,gBAAa,CAChB,EAAA;AAAA,KAAA,EACF,CACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Card, CardBody } from '@backstage/ui';
|
|
3
|
+
|
|
4
|
+
const CardsExample = () => {
|
|
5
|
+
return /* @__PURE__ */ jsx(Card, { title: "Information card", children: /* @__PURE__ */ jsxs(CardBody, { children: [
|
|
6
|
+
/* @__PURE__ */ jsx("h1", { children: "Headline 1" }),
|
|
7
|
+
/* @__PURE__ */ jsx("h2", { children: "Headline 2" }),
|
|
8
|
+
/* @__PURE__ */ jsx("h3", { children: "Headline 3" }),
|
|
9
|
+
/* @__PURE__ */ jsx("h4", { children: "Headline 4" }),
|
|
10
|
+
/* @__PURE__ */ jsx("h5", { children: "Headline 5" }),
|
|
11
|
+
/* @__PURE__ */ jsx("h6", { children: "Headline 6" })
|
|
12
|
+
] }) });
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { CardsExample };
|
|
16
|
+
//# sourceMappingURL=CardExample.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardExample.esm.js","sources":["../../src/components/CardExample.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Card, CardBody } from '@backstage/ui';\n\nexport const CardsExample = () => {\n return (\n <Card title=\"Information card\">\n <CardBody>\n <h1>Headline 1</h1>\n <h2>Headline 2</h2>\n <h3>Headline 3</h3>\n <h4>Headline 4</h4>\n <h5>Headline 5</h5>\n <h6>Headline 6</h6>\n </CardBody>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,eAAe,MAAM;AAChC,EAAA,uBACG,GAAA,CAAA,IAAA,EAAA,EAAK,KAAM,EAAA,kBAAA,EACV,+BAAC,QACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAG,QAAU,EAAA,YAAA,EAAA,CAAA;AAAA,oBACd,GAAA,CAAC,QAAG,QAAU,EAAA,YAAA,EAAA,CAAA;AAAA,oBACd,GAAA,CAAC,QAAG,QAAU,EAAA,YAAA,EAAA,CAAA;AAAA,oBACd,GAAA,CAAC,QAAG,QAAU,EAAA,YAAA,EAAA,CAAA;AAAA,oBACd,GAAA,CAAC,QAAG,QAAU,EAAA,YAAA,EAAA,CAAA;AAAA,oBACd,GAAA,CAAC,QAAG,QAAU,EAAA,YAAA,EAAA;AAAA,GAAA,EAChB,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Flex, Text, Button, Icon, Checkbox, Switch } from '@backstage/ui';
|
|
3
|
+
|
|
4
|
+
const Buttons = () => {
|
|
5
|
+
const variants = [
|
|
6
|
+
"primary",
|
|
7
|
+
"secondary",
|
|
8
|
+
"tertiary"
|
|
9
|
+
];
|
|
10
|
+
const sizes = [undefined, "small", "medium"];
|
|
11
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", children: variants.map((variant) => /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
12
|
+
/* @__PURE__ */ jsx(Text, { children: variant }),
|
|
13
|
+
sizes.map((size) => /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Button, { variant, size, children: "Button" }),
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
Button,
|
|
17
|
+
{
|
|
18
|
+
iconStart: /* @__PURE__ */ jsx(Icon, { name: "cloud" }),
|
|
19
|
+
variant,
|
|
20
|
+
size,
|
|
21
|
+
children: "Button"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Button,
|
|
26
|
+
{
|
|
27
|
+
iconEnd: /* @__PURE__ */ jsx(Icon, { name: "chevron-right" }),
|
|
28
|
+
variant,
|
|
29
|
+
size,
|
|
30
|
+
children: "Button"
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Button,
|
|
35
|
+
{
|
|
36
|
+
iconStart: /* @__PURE__ */ jsx(Icon, { name: "cloud" }),
|
|
37
|
+
iconEnd: /* @__PURE__ */ jsx(Icon, { name: "chevron-right" }),
|
|
38
|
+
style: {
|
|
39
|
+
width: "200px"
|
|
40
|
+
},
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
children: "Button"
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx(Button, { variant, size, isDisabled: true, children: "Button" }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
Button,
|
|
49
|
+
{
|
|
50
|
+
iconStart: /* @__PURE__ */ jsx(Icon, { name: "cloud" }),
|
|
51
|
+
variant,
|
|
52
|
+
size,
|
|
53
|
+
isDisabled: true,
|
|
54
|
+
children: "Button"
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Button,
|
|
59
|
+
{
|
|
60
|
+
iconEnd: /* @__PURE__ */ jsx(Icon, { name: "chevron-right" }),
|
|
61
|
+
variant,
|
|
62
|
+
size,
|
|
63
|
+
isDisabled: true,
|
|
64
|
+
children: "Button"
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] }, size))
|
|
68
|
+
] }, variant)) });
|
|
69
|
+
};
|
|
70
|
+
const Checkboxes = () => {
|
|
71
|
+
return /* @__PURE__ */ jsxs(Flex, { children: [
|
|
72
|
+
/* @__PURE__ */ jsx(Text, { children: "Checkboxes" }),
|
|
73
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(Checkbox, {}),
|
|
75
|
+
/* @__PURE__ */ jsx(Checkbox, { checked: true }),
|
|
76
|
+
/* @__PURE__ */ jsx(Checkbox, { label: "Checkbox" }),
|
|
77
|
+
/* @__PURE__ */ jsx(Checkbox, { label: "Checkbox", checked: true })
|
|
78
|
+
] })
|
|
79
|
+
] });
|
|
80
|
+
};
|
|
81
|
+
const Switches = () => {
|
|
82
|
+
return /* @__PURE__ */ jsxs(Flex, { children: [
|
|
83
|
+
/* @__PURE__ */ jsx(Text, { children: "Switches" }),
|
|
84
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
85
|
+
/* @__PURE__ */ jsx(Switch, {}),
|
|
86
|
+
/* @__PURE__ */ jsx(Switch, { isSelected: true }),
|
|
87
|
+
/* @__PURE__ */ jsx(Switch, { label: "Switch" }),
|
|
88
|
+
/* @__PURE__ */ jsx(Switch, { label: "Switch", isSelected: true })
|
|
89
|
+
] })
|
|
90
|
+
] });
|
|
91
|
+
};
|
|
92
|
+
const FormComponents = () => {
|
|
93
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Buttons, {}),
|
|
95
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
96
|
+
/* @__PURE__ */ jsx(Checkboxes, {}),
|
|
97
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
98
|
+
/* @__PURE__ */ jsx(Switches, {})
|
|
99
|
+
] });
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export { FormComponents };
|
|
103
|
+
//# sourceMappingURL=FormComponents.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormComponents.esm.js","sources":["../../src/components/FormComponents.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Button,\n ButtonProps,\n Checkbox,\n Flex,\n Icon,\n Switch,\n Text,\n} from '@backstage/ui';\n\nconst Buttons = () => {\n const variants: ButtonProps['variant'][] = [\n 'primary',\n 'secondary',\n 'tertiary',\n ];\n const sizes: ButtonProps['size'][] = [undefined, 'small', 'medium'];\n\n return (\n <Flex direction=\"column\">\n {variants.map(variant => (\n <Flex direction=\"column\" key={variant as string}>\n <Text>{variant as string}</Text>\n {sizes.map(size => (\n <Flex align=\"center\" key={size as string}>\n <Button variant={variant} size={size}>\n Button\n </Button>\n <Button\n iconStart={<Icon name=\"cloud\" />}\n variant={variant}\n size={size}\n >\n Button\n </Button>\n <Button\n iconEnd={<Icon name=\"chevron-right\" />}\n variant={variant}\n size={size}\n >\n Button\n </Button>\n <Button\n iconStart={<Icon name=\"cloud\" />}\n iconEnd={<Icon name=\"chevron-right\" />}\n style={{\n width: '200px',\n }}\n variant={variant}\n size={size}\n >\n Button\n </Button>\n <Button variant={variant} size={size} isDisabled>\n Button\n </Button>\n <Button\n iconStart={<Icon name=\"cloud\" />}\n variant={variant}\n size={size}\n isDisabled\n >\n Button\n </Button>\n <Button\n iconEnd={<Icon name=\"chevron-right\" />}\n variant={variant}\n size={size}\n isDisabled\n >\n Button\n </Button>\n </Flex>\n ))}\n </Flex>\n ))}\n </Flex>\n );\n};\n\nconst Checkboxes = () => {\n return (\n <Flex>\n <Text>Checkboxes</Text>\n <Flex align=\"center\">\n <Checkbox />\n <Checkbox checked />\n <Checkbox label=\"Checkbox\" />\n <Checkbox label=\"Checkbox\" checked />\n </Flex>\n </Flex>\n );\n};\n\nconst Switches = () => {\n return (\n <Flex>\n <Text>Switches</Text>\n <Flex align=\"center\">\n <Switch />\n <Switch isSelected />\n <Switch label=\"Switch\" />\n <Switch label=\"Switch\" isSelected />\n </Flex>\n </Flex>\n );\n};\n\nexport const FormComponents = () => {\n return (\n <div>\n <Buttons />\n <br />\n <Checkboxes />\n <br />\n <Switches />\n </div>\n );\n};\n"],"names":[],"mappings":";;;AA0BA,MAAM,UAAU,MAAM;AACpB,EAAA,MAAM,QAAqC,GAAA;AAAA,I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AA,EAAA,EAAS,KAAM,EAAA,UAAA,EAAW,SAAO,IAAC,EAAA;AAAA,KACrC,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ,CAAA;AAEA,MAAM,WAAW,MAAM;AACrB,EAAA,4BACG,IACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAK,QAAQ,EAAA,UAAA,EAAA,CAAA;AAAA,oBACd,IAAA,CAAC,IAAK,EAAA,EAAA,KAAA,EAAM,QACV,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,MAAO,EAAA,EAAA,CAAA;AAAA,sBACR,GAAA,CAAC,MAAO,EAAA,EAAA,UAAA,EAAU,IAAC,EAAA,CAAA;AAAA,sBACnB,GAAA,CAAC,MAAO,EAAA,EAAA,KAAA,EAAM,QAAS,EAAA,CAAA;AAAA,sBACtB,GAAA,CAAA,MAAA,EAAA,EAAO,KAAM,EAAA,QAAA,EAAS,YAAU,IAAC,EAAA;AAAA,KACpC,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ,CAAA;AAEO,MAAM,iBAAiB,MAAM;AAClC,EAAA,4BACG,KACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,CAAA;AAAA,wBACR,IAAG,EAAA,EAAA,CAAA;AAAA,wBACH,UAAW,EAAA,EAAA,CAAA;AAAA,wBACX,IAAG,EAAA,EAAA,CAAA;AAAA,wBACH,QAAS,EAAA,EAAA;AAAA,GACZ,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Table, TableHeader, Column, TableBody, Row, CellProfile, Cell } from '@backstage/ui';
|
|
3
|
+
|
|
4
|
+
const users = [
|
|
5
|
+
{
|
|
6
|
+
name: {
|
|
7
|
+
first: "Carolyn",
|
|
8
|
+
last: "Moore"
|
|
9
|
+
},
|
|
10
|
+
email: "carolyn.moore@example.com",
|
|
11
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Carolyn"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: {
|
|
15
|
+
first: "Esma",
|
|
16
|
+
last: "Berbero\u011Flu"
|
|
17
|
+
},
|
|
18
|
+
email: "esma.berberoglu@example.com",
|
|
19
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Esma"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: {
|
|
23
|
+
first: "Isabella",
|
|
24
|
+
last: "Rhodes"
|
|
25
|
+
},
|
|
26
|
+
email: "isabella.rhodes@example.com",
|
|
27
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: {
|
|
31
|
+
first: "Derrick",
|
|
32
|
+
last: "Carter"
|
|
33
|
+
},
|
|
34
|
+
email: "derrick.carter@example.com",
|
|
35
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: {
|
|
39
|
+
first: "Mattie",
|
|
40
|
+
last: "Lambert"
|
|
41
|
+
},
|
|
42
|
+
email: "mattie.lambert@example.com",
|
|
43
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Mattie"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: {
|
|
47
|
+
first: "Mijat",
|
|
48
|
+
last: "Raki\u0107"
|
|
49
|
+
},
|
|
50
|
+
email: "mijat.rakic@example.com",
|
|
51
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Mijat"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: {
|
|
55
|
+
first: "Javier",
|
|
56
|
+
last: "Reid"
|
|
57
|
+
},
|
|
58
|
+
email: "javier.reid@example.com",
|
|
59
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Javier"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: {
|
|
63
|
+
first: "Isabella",
|
|
64
|
+
last: "Li"
|
|
65
|
+
},
|
|
66
|
+
email: "isabella.li@example.com",
|
|
67
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: {
|
|
71
|
+
first: "Stephanie",
|
|
72
|
+
last: "Garrett"
|
|
73
|
+
},
|
|
74
|
+
email: "stephanie.garrett@example.com",
|
|
75
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Stephanie"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: {
|
|
79
|
+
first: "Antonia",
|
|
80
|
+
last: "N\xFA\xF1ez"
|
|
81
|
+
},
|
|
82
|
+
email: "antonia.nunez@example.com",
|
|
83
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Antonia"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: {
|
|
87
|
+
first: "Donald",
|
|
88
|
+
last: "Young"
|
|
89
|
+
},
|
|
90
|
+
email: "donald.young@example.com",
|
|
91
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Donald"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: {
|
|
95
|
+
first: "Iegor",
|
|
96
|
+
last: "Holodovskiy"
|
|
97
|
+
},
|
|
98
|
+
email: "iegor.holodovskiy@example.com",
|
|
99
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Iegor"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: {
|
|
103
|
+
first: "Jessica",
|
|
104
|
+
last: "David"
|
|
105
|
+
},
|
|
106
|
+
email: "jessica.david@example.com",
|
|
107
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Jessica"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: {
|
|
111
|
+
first: "Eve",
|
|
112
|
+
last: "Martinez"
|
|
113
|
+
},
|
|
114
|
+
email: "eve.martinez@example.com",
|
|
115
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Eve"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: {
|
|
119
|
+
first: "Caleb",
|
|
120
|
+
last: "Silva"
|
|
121
|
+
},
|
|
122
|
+
email: "caleb.silva@example.com",
|
|
123
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Caleb"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: {
|
|
127
|
+
first: "Marcia",
|
|
128
|
+
last: "Jenkins"
|
|
129
|
+
},
|
|
130
|
+
email: "marcia.jenkins@example.com",
|
|
131
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Marcia"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: {
|
|
135
|
+
first: "Mackenzie",
|
|
136
|
+
last: "Jones"
|
|
137
|
+
},
|
|
138
|
+
email: "mackenzie.jones@example.com",
|
|
139
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Mackenzie"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: {
|
|
143
|
+
first: "Jeremiah",
|
|
144
|
+
last: "Gutierrez"
|
|
145
|
+
},
|
|
146
|
+
email: "jeremiah.gutierrez@example.com",
|
|
147
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Jeremiah"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: {
|
|
151
|
+
first: "Luciara",
|
|
152
|
+
last: "Souza"
|
|
153
|
+
},
|
|
154
|
+
email: "luciara.souza@example.com",
|
|
155
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Luciara"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: {
|
|
159
|
+
first: "Valgi",
|
|
160
|
+
last: "da Cunha"
|
|
161
|
+
},
|
|
162
|
+
email: "valgi.dacunha@example.com",
|
|
163
|
+
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Valgi"
|
|
164
|
+
}
|
|
165
|
+
];
|
|
166
|
+
const TableExample = () => {
|
|
167
|
+
return /* @__PURE__ */ jsxs(Table, { children: [
|
|
168
|
+
/* @__PURE__ */ jsxs(TableHeader, { children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Column, { children: "Avatar" }),
|
|
170
|
+
/* @__PURE__ */ jsx(Column, { isRowHeader: true, children: "Lastname" }),
|
|
171
|
+
/* @__PURE__ */ jsx(Column, { children: "Firstname" }),
|
|
172
|
+
/* @__PURE__ */ jsx(Column, { children: "Email" })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ jsx(TableBody, { children: users.map((user, index) => /* @__PURE__ */ jsxs(Row, { children: [
|
|
175
|
+
/* @__PURE__ */ jsx(CellProfile, { src: user.picture }),
|
|
176
|
+
/* @__PURE__ */ jsx(Cell, { title: user.name.last }),
|
|
177
|
+
/* @__PURE__ */ jsx(Cell, { title: user.name.first }),
|
|
178
|
+
/* @__PURE__ */ jsx(Cell, { title: user.email })
|
|
179
|
+
] }, index)) })
|
|
180
|
+
] });
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export { TableExample };
|
|
184
|
+
//# sourceMappingURL=TableExample.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableExample.esm.js","sources":["../../src/components/TableExample.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Table,\n TableHeader,\n Column,\n TableBody,\n Row,\n Cell,\n CellProfile,\n} from '@backstage/ui';\n\ninterface User {\n name: {\n first: string; // \"Duane\",\n last: string; // \"Reed\"\n };\n email: string; // \"duane.reed@example.com\"\n picture: string; // \"https://api.dicebear.com/6.x/open-peeps/svg?seed=Duane\"\n}\n\nconst users: User[] = [\n {\n name: {\n first: 'Carolyn',\n last: 'Moore',\n },\n email: 'carolyn.moore@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Carolyn',\n },\n {\n name: {\n first: 'Esma',\n last: 'Berberoğlu',\n },\n email: 'esma.berberoglu@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Esma',\n },\n {\n name: {\n first: 'Isabella',\n last: 'Rhodes',\n },\n email: 'isabella.rhodes@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella',\n },\n {\n name: {\n first: 'Derrick',\n last: 'Carter',\n },\n email: 'derrick.carter@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick',\n },\n {\n name: {\n first: 'Mattie',\n last: 'Lambert',\n },\n email: 'mattie.lambert@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mattie',\n },\n {\n name: {\n first: 'Mijat',\n last: 'Rakić',\n },\n email: 'mijat.rakic@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mijat',\n },\n {\n name: {\n first: 'Javier',\n last: 'Reid',\n },\n email: 'javier.reid@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Javier',\n },\n {\n name: {\n first: 'Isabella',\n last: 'Li',\n },\n email: 'isabella.li@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella',\n },\n {\n name: {\n first: 'Stephanie',\n last: 'Garrett',\n },\n email: 'stephanie.garrett@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Stephanie',\n },\n {\n name: {\n first: 'Antonia',\n last: 'Núñez',\n },\n email: 'antonia.nunez@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Antonia',\n },\n {\n name: {\n first: 'Donald',\n last: 'Young',\n },\n email: 'donald.young@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Donald',\n },\n {\n name: {\n first: 'Iegor',\n last: 'Holodovskiy',\n },\n email: 'iegor.holodovskiy@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Iegor',\n },\n {\n name: {\n first: 'Jessica',\n last: 'David',\n },\n email: 'jessica.david@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jessica',\n },\n {\n name: {\n first: 'Eve',\n last: 'Martinez',\n },\n email: 'eve.martinez@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Eve',\n },\n {\n name: {\n first: 'Caleb',\n last: 'Silva',\n },\n email: 'caleb.silva@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Caleb',\n },\n {\n name: {\n first: 'Marcia',\n last: 'Jenkins',\n },\n email: 'marcia.jenkins@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Marcia',\n },\n {\n name: {\n first: 'Mackenzie',\n last: 'Jones',\n },\n email: 'mackenzie.jones@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mackenzie',\n },\n {\n name: {\n first: 'Jeremiah',\n last: 'Gutierrez',\n },\n email: 'jeremiah.gutierrez@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jeremiah',\n },\n {\n name: {\n first: 'Luciara',\n last: 'Souza',\n },\n email: 'luciara.souza@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Luciara',\n },\n {\n name: {\n first: 'Valgi',\n last: 'da Cunha',\n },\n email: 'valgi.dacunha@example.com',\n picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Valgi',\n },\n];\n\nexport const TableExample = () => {\n return (\n <Table>\n <TableHeader>\n <Column>Avatar</Column>\n <Column isRowHeader>Lastname</Column>\n <Column>Firstname</Column>\n <Column>Email</Column>\n </TableHeader>\n <TableBody>\n {users.map((user, index) => (\n <Row key={index}>\n <CellProfile src={user.picture} />\n <Cell title={user.name.last} />\n <Cell title={user.name.first} />\n <Cell title={user.email} />\n </Row>\n ))}\n </TableBody>\n </Table>\n );\n};\n"],"names":[],"mappings":";;;AAmCA,MAAM,KAAgB,GAAA;AAAA,EACpB;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,SAAA;AAAA,MACP,IAAM,EAAA;AAAA,KACR;AAAA,IACA,KAAO,EAAA,2BAAA;AAAA,IACP,OAAS,EAAA;AAAA,GACX;AAAA,EACA;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,MAAA;AAAA,MACP,IAAM,EAAA;AAAA,KACR;AAAA,IACA,KAAO,EAAA,6BAAA;AAAA,IACP,OAAS,EAAA;AAAA,GACX;AAAA,EACA;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,UAAA;AAAA,MACP,IAAM,EAAA;AAAA,KACR;AAAA,IACA,KAAO,EAAA,6BAAA;AAAA,IACP,OAAS,EAAA;AAAA,GACX;AAAA,EACA;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,SAAA;AAAA,MACP,IAAM,EAAA;AAAA,KACR;AAAA,IACA,KAAO,EAAA,4BAAA;AAAA,IACP,OAAS,EAAA;AAAA,GACX;AAAA,EACA;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,QAAA;AAAA,MACP,IAAM,EAAA;AAAA,KACR;AAAA,IACA,KAAO,EAAA,4BAAA;AAAA,IACP,OAAS,EAAA;AAAA,GACX;AAAA,EACA;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,OAAA;AAAA,MACP,IAAM,EAAA;AAAA,KACR;AAAA,IACA,KAAO,EAAA,yBAAA;AAAA,IACP,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AA,CAAA;AAAA,sBACb,GAAA,CAAA,MAAA,EAAA,EAAO,WAAW,EAAA,IAAA,EAAC,QAAQ,EAAA,UAAA,EAAA,CAAA;AAAA,sBAC5B,GAAA,CAAC,UAAO,QAAS,EAAA,WAAA,EAAA,CAAA;AAAA,sBACjB,GAAA,CAAC,UAAO,QAAK,EAAA,OAAA,EAAA;AAAA,KACf,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,aACE,QAAM,EAAA,KAAA,CAAA,GAAA,CAAI,CAAC,IAAM,EAAA,KAAA,0BACf,GACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAC,GAAA,CAAA,WAAA,EAAA,EAAY,GAAK,EAAA,IAAA,CAAK,OAAS,EAAA,CAAA;AAAA,sBAC/B,GAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,IAAA,CAAK,KAAK,IAAM,EAAA,CAAA;AAAA,sBAC5B,GAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,IAAA,CAAK,KAAK,KAAO,EAAA,CAAA;AAAA,sBAC7B,GAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,IAAA,CAAK,KAAO,EAAA;AAAA,KAJjB,EAAA,EAAA,KAKV,CACD,CACH,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
declare const buiTestPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
8
|
+
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
declare const BUITestPage: () => react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { BUITestPage, buiTestPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createPlugin, createRoutableExtension } from '@backstage/core-plugin-api';
|
|
2
|
+
import { rootRouteRef } from './routes.esm.js';
|
|
3
|
+
|
|
4
|
+
const buiTestPlugin = createPlugin({
|
|
5
|
+
id: "bui-test",
|
|
6
|
+
routes: {
|
|
7
|
+
root: rootRouteRef
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const BUITestPage = buiTestPlugin.provide(
|
|
11
|
+
createRoutableExtension({
|
|
12
|
+
name: "BuiTestPage",
|
|
13
|
+
component: () => import('./components/BUITestPage.esm.js').then((m) => m.BUITestPage),
|
|
14
|
+
mountPoint: rootRouteRef
|
|
15
|
+
})
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export { BUITestPage, buiTestPlugin };
|
|
19
|
+
//# sourceMappingURL=plugin.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\n\n/**\n * @public\n */\nexport const buiTestPlugin = createPlugin({\n id: 'bui-test',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * @public\n */\nexport const BUITestPage = buiTestPlugin.provide(\n createRoutableExtension({\n name: 'BuiTestPage',\n component: () =>\n import('./components/BUITestPage').then(m => m.BUITestPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;AA0BO,MAAM,gBAAgB,YAAa,CAAA;AAAA,EACxC,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC;AAKM,MAAM,cAAc,aAAc,CAAA,OAAA;AAAA,EACvC,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,aAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,iCAA0B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,WAAW,CAAA;AAAA,IAC5D,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'bui-test',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@red-hat-developer-hub/backstage-plugin-bui-test",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"main": "dist/index.esm.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public",
|
|
9
|
+
"main": "dist/index.esm.js",
|
|
10
|
+
"types": "dist/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/redhat-developer/rhdh-plugins",
|
|
15
|
+
"directory": "workspaces/theme/plugins/bui-test"
|
|
16
|
+
},
|
|
17
|
+
"backstage": {
|
|
18
|
+
"role": "frontend-plugin",
|
|
19
|
+
"pluginId": "bui-test",
|
|
20
|
+
"pluginPackages": [
|
|
21
|
+
"@red-hat-developer-hub/backstage-plugin-bui-test"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"scripts": {
|
|
26
|
+
"start": "backstage-cli package start",
|
|
27
|
+
"build": "backstage-cli package build",
|
|
28
|
+
"lint": "backstage-cli package lint",
|
|
29
|
+
"test": "backstage-cli package test",
|
|
30
|
+
"clean": "backstage-cli package clean",
|
|
31
|
+
"prepack": "backstage-cli package prepack",
|
|
32
|
+
"postpack": "backstage-cli package postpack"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@backstage/core-plugin-api": "^1.10.9",
|
|
36
|
+
"@backstage/plugin-user-settings": "^0.8.25",
|
|
37
|
+
"@backstage/theme": "^0.6.8",
|
|
38
|
+
"@backstage/ui": "^0.7.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
42
|
+
"react-router": "*"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@backstage/cli": "^0.34.1",
|
|
46
|
+
"@backstage/core-app-api": "^1.18.0",
|
|
47
|
+
"@backstage/dev-utils": "^1.1.13",
|
|
48
|
+
"@backstage/test-utils": "^1.7.11",
|
|
49
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
50
|
+
"@testing-library/react": "^14.0.0",
|
|
51
|
+
"@testing-library/user-event": "^14.0.0",
|
|
52
|
+
"msw": "^1.0.0",
|
|
53
|
+
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"files": [
|
|
56
|
+
"dist"
|
|
57
|
+
],
|
|
58
|
+
"typesVersions": {
|
|
59
|
+
"*": {
|
|
60
|
+
"package.json": [
|
|
61
|
+
"package.json"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"module": "./dist/index.esm.js"
|
|
66
|
+
}
|