@backstage-community/plugin-servicenow 1.5.0 → 1.6.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +3 -3
  3. package/dist/alpha/plugin.esm.js +1 -0
  4. package/dist/alpha/plugin.esm.js.map +1 -1
  5. package/dist/alpha.d.ts +95 -1
  6. package/dist/alpha.esm.js +3 -1
  7. package/dist/alpha.esm.js.map +1 -1
  8. package/dist/api/ServiceNowBackendClient.esm.js +10 -1
  9. package/dist/api/ServiceNowBackendClient.esm.js.map +1 -1
  10. package/dist/components/Router.esm.js +10 -0
  11. package/dist/components/Router.esm.js.map +1 -0
  12. package/dist/components/Servicenow/EntityServicenowContent.esm.js +35 -17
  13. package/dist/components/Servicenow/EntityServicenowContent.esm.js.map +1 -1
  14. package/dist/components/Servicenow/IncidentsFilter.esm.js +9 -5
  15. package/dist/components/Servicenow/IncidentsFilter.esm.js.map +1 -1
  16. package/dist/components/Servicenow/IncidentsListColumns.esm.js +43 -39
  17. package/dist/components/Servicenow/IncidentsListColumns.esm.js.map +1 -1
  18. package/dist/components/Servicenow/IncidentsTableBody.esm.js +6 -3
  19. package/dist/components/Servicenow/IncidentsTableBody.esm.js.map +1 -1
  20. package/dist/components/Servicenow/IncidentsTableHeader.esm.js +3 -2
  21. package/dist/components/Servicenow/IncidentsTableHeader.esm.js.map +1 -1
  22. package/dist/components/Servicenow/IncidentsTableRow.esm.js +8 -4
  23. package/dist/components/Servicenow/IncidentsTableRow.esm.js.map +1 -1
  24. package/dist/components/shared-components/IncidentEnumFilter.esm.js +2 -3
  25. package/dist/components/shared-components/IncidentEnumFilter.esm.js.map +1 -1
  26. package/dist/hooks/useTranslation.esm.js +13 -0
  27. package/dist/hooks/useTranslation.esm.js.map +1 -0
  28. package/dist/index.d.ts +6 -1
  29. package/dist/index.esm.js +1 -1
  30. package/dist/plugin.esm.js +9 -1
  31. package/dist/plugin.esm.js.map +1 -1
  32. package/dist/translations/de.esm.js +37 -0
  33. package/dist/translations/de.esm.js.map +1 -0
  34. package/dist/translations/es.esm.js +37 -0
  35. package/dist/translations/es.esm.js.map +1 -0
  36. package/dist/translations/fr.esm.js +37 -0
  37. package/dist/translations/fr.esm.js.map +1 -0
  38. package/dist/translations/index.esm.js +16 -0
  39. package/dist/translations/index.esm.js.map +1 -0
  40. package/dist/translations/it.esm.js +37 -0
  41. package/dist/translations/it.esm.js.map +1 -0
  42. package/dist/translations/ja.esm.js +37 -0
  43. package/dist/translations/ja.esm.js.map +1 -0
  44. package/dist/translations/ref.esm.js +53 -0
  45. package/dist/translations/ref.esm.js.map +1 -0
  46. package/dist/utils/incidentUtils.esm.js +75 -3
  47. package/dist/utils/incidentUtils.esm.js.map +1 -1
  48. package/dist/utils/queryParamsUtils.esm.js +7 -5
  49. package/dist/utils/queryParamsUtils.esm.js.map +1 -1
  50. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IncidentsListColumns.esm.js","sources":["../../../src/components/Servicenow/IncidentsListColumns.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { TableColumn } from '@backstage/core-components';\n\nimport { IncidentsData, IncidentTableFieldEnum } from '../../types';\n\nexport const IncidentsListColumns: TableColumn<IncidentsData>[] = [\n {\n id: 'incidentNumber',\n title: 'Incident Number',\n field: IncidentTableFieldEnum.Number,\n type: 'string',\n },\n {\n id: 'description',\n title: 'Description',\n field: IncidentTableFieldEnum.ShortDescription,\n type: 'string',\n },\n {\n id: 'created',\n title: 'Created',\n field: IncidentTableFieldEnum.Created,\n type: 'string',\n },\n {\n id: 'priority',\n title: 'Priority',\n field: IncidentTableFieldEnum.Priority,\n type: 'numeric',\n },\n {\n id: 'state',\n title: 'State',\n field: IncidentTableFieldEnum.IncidentState,\n type: 'datetime',\n },\n {\n id: 'actions',\n title: 'Actions',\n sorting: false,\n type: 'string',\n },\n];\n"],"names":[],"mappings":";;AAmBO,MAAM,oBAAqD,GAAA;AAAA,EAChE;AAAA,IACE,EAAI,EAAA,gBAAA;AAAA,IACJ,KAAO,EAAA,iBAAA;AAAA,IACP,OAAO,sBAAuB,CAAA,MAAA;AAAA,IAC9B,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,EAAI,EAAA,aAAA;AAAA,IACJ,KAAO,EAAA,aAAA;AAAA,IACP,OAAO,sBAAuB,CAAA,gBAAA;AAAA,IAC9B,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,EAAI,EAAA,SAAA;AAAA,IACJ,KAAO,EAAA,SAAA;AAAA,IACP,OAAO,sBAAuB,CAAA,OAAA;AAAA,IAC9B,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,EAAI,EAAA,UAAA;AAAA,IACJ,KAAO,EAAA,UAAA;AAAA,IACP,OAAO,sBAAuB,CAAA,QAAA;AAAA,IAC9B,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,EAAI,EAAA,OAAA;AAAA,IACJ,KAAO,EAAA,OAAA;AAAA,IACP,OAAO,sBAAuB,CAAA,aAAA;AAAA,IAC9B,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,EAAI,EAAA,SAAA;AAAA,IACJ,KAAO,EAAA,SAAA;AAAA,IACP,OAAS,EAAA,KAAA;AAAA,IACT,IAAM,EAAA;AAAA;AAEV;;;;"}
1
+ {"version":3,"file":"IncidentsListColumns.esm.js","sources":["../../../src/components/Servicenow/IncidentsListColumns.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { TableColumn } from '@backstage/core-components';\n\nimport { IncidentsData, IncidentTableFieldEnum } from '../../types';\nimport { useTranslation } from '../../hooks/useTranslation';\n\n/**\n * Hook to get translated incidents list columns\n */\nexport const useIncidentsListColumns = (): TableColumn<IncidentsData>[] => {\n const { t } = useTranslation();\n\n return [\n {\n id: 'incidentNumber',\n title: t('table.columns.incidentNumber'),\n field: IncidentTableFieldEnum.Number,\n type: 'string',\n },\n {\n id: 'description',\n title: t('table.columns.description'),\n field: IncidentTableFieldEnum.ShortDescription,\n type: 'string',\n },\n {\n id: 'created',\n title: t('table.columns.created'),\n field: IncidentTableFieldEnum.Created,\n type: 'string',\n },\n {\n id: 'priority',\n title: t('table.columns.priority'),\n field: IncidentTableFieldEnum.Priority,\n type: 'numeric',\n },\n {\n id: 'state',\n title: t('table.columns.state'),\n field: IncidentTableFieldEnum.IncidentState,\n type: 'datetime',\n },\n {\n id: 'actions',\n title: t('table.columns.actions'),\n sorting: false,\n type: 'string',\n },\n ];\n};\n\n/**\n * @deprecated Use useIncidentsListColumns hook instead\n */\nexport const IncidentsListColumns: TableColumn<IncidentsData>[] = [\n {\n id: 'incidentNumber',\n title: 'Incident Number',\n field: IncidentTableFieldEnum.Number,\n type: 'string',\n },\n {\n id: 'description',\n title: 'Description',\n field: IncidentTableFieldEnum.ShortDescription,\n type: 'string',\n },\n {\n id: 'created',\n title: 'Created',\n field: IncidentTableFieldEnum.Created,\n type: 'string',\n },\n {\n id: 'priority',\n title: 'Priority',\n field: IncidentTableFieldEnum.Priority,\n type: 'numeric',\n },\n {\n id: 'state',\n title: 'State',\n field: IncidentTableFieldEnum.IncidentState,\n type: 'datetime',\n },\n {\n id: 'actions',\n title: 'Actions',\n sorting: false,\n type: 'string',\n },\n];\n"],"names":[],"mappings":";;;AAuBO,MAAM,0BAA0B,MAAoC;AACzE,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAO,OAAA;AAAA,IACL;AAAA,MACE,EAAI,EAAA,gBAAA;AAAA,MACJ,KAAA,EAAO,EAAE,8BAA8B,CAAA;AAAA,MACvC,OAAO,sBAAuB,CAAA,MAAA;AAAA,MAC9B,IAAM,EAAA;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAI,EAAA,aAAA;AAAA,MACJ,KAAA,EAAO,EAAE,2BAA2B,CAAA;AAAA,MACpC,OAAO,sBAAuB,CAAA,gBAAA;AAAA,MAC9B,IAAM,EAAA;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAI,EAAA,SAAA;AAAA,MACJ,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,MAChC,OAAO,sBAAuB,CAAA,OAAA;AAAA,MAC9B,IAAM,EAAA;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAI,EAAA,UAAA;AAAA,MACJ,KAAA,EAAO,EAAE,wBAAwB,CAAA;AAAA,MACjC,OAAO,sBAAuB,CAAA,QAAA;AAAA,MAC9B,IAAM,EAAA;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAI,EAAA,OAAA;AAAA,MACJ,KAAA,EAAO,EAAE,qBAAqB,CAAA;AAAA,MAC9B,OAAO,sBAAuB,CAAA,aAAA;AAAA,MAC9B,IAAM,EAAA;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAI,EAAA,SAAA;AAAA,MACJ,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,MAChC,OAAS,EAAA,KAAA;AAAA,MACT,IAAM,EAAA;AAAA;AACR,GACF;AACF;;;;"}
@@ -3,14 +3,17 @@ import Box from '@mui/material/Box';
3
3
  import TableBody from '@mui/material/TableBody';
4
4
  import TableRow from '@mui/material/TableRow';
5
5
  import TableCell from '@mui/material/TableCell';
6
- import { IncidentsListColumns } from './IncidentsListColumns.esm.js';
6
+ import { useIncidentsListColumns } from './IncidentsListColumns.esm.js';
7
7
  import { IncidentsTableRow } from './IncidentsTableRow.esm.js';
8
+ import { useTranslation } from '../../hooks/useTranslation.esm.js';
8
9
 
9
10
  const IncidentsTableBody = ({ rows }) => {
11
+ const { t } = useTranslation();
12
+ const incidentsListColumns = useIncidentsListColumns();
10
13
  if (rows?.length > 0) {
11
14
  return /* @__PURE__ */ jsx(TableBody, { "data-testid": "incidents", children: rows.map((row) => /* @__PURE__ */ jsx(IncidentsTableRow, { data: row }, row.sysId)) });
12
15
  }
13
- return /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: IncidentsListColumns.length, children: /* @__PURE__ */ jsx(
16
+ return /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: incidentsListColumns.length, children: /* @__PURE__ */ jsx(
14
17
  Box,
15
18
  {
16
19
  "data-testid": "no-incidents-found",
@@ -19,7 +22,7 @@ const IncidentsTableBody = ({ rows }) => {
19
22
  display: "flex",
20
23
  justifyContent: "center"
21
24
  },
22
- children: "No records found"
25
+ children: t("table.emptyContent")
23
26
  }
24
27
  ) }) }) });
25
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"IncidentsTableBody.esm.js","sources":["../../../src/components/Servicenow/IncidentsTableBody.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\n\nimport Box from '@mui/material/Box';\nimport TableBody from '@mui/material/TableBody';\nimport TableRow from '@mui/material/TableRow';\nimport TableCell from '@mui/material/TableCell';\n\nimport { IncidentsListColumns } from './IncidentsListColumns';\nimport { IncidentsTableRow } from './IncidentsTableRow';\nimport type { IncidentsData } from '../../types';\n\nexport const IncidentsTableBody = ({ rows }: { rows: IncidentsData[] }) => {\n // TODO: Add loading and error states\n\n if (rows?.length > 0) {\n return (\n <TableBody data-testid=\"incidents\">\n {rows.map(row => (\n <IncidentsTableRow key={row.sysId} data={row} />\n ))}\n </TableBody>\n );\n }\n\n return (\n <TableBody>\n <TableRow>\n <TableCell colSpan={IncidentsListColumns.length}>\n <Box\n data-testid=\"no-incidents-found\"\n sx={{\n p: 2,\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n No records found\n </Box>\n </TableCell>\n </TableRow>\n </TableBody>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAyBO,MAAM,kBAAqB,GAAA,CAAC,EAAE,IAAA,EAAsC,KAAA;AAGzE,EAAI,IAAA,IAAA,EAAM,SAAS,CAAG,EAAA;AACpB,IAAA,uBACG,GAAA,CAAA,SAAA,EAAA,EAAU,aAAY,EAAA,WAAA,EACpB,eAAK,GAAI,CAAA,CAAA,GAAA,qBACP,GAAA,CAAA,iBAAA,EAAA,EAAkC,IAAM,EAAA,GAAA,EAAA,EAAjB,GAAI,CAAA,KAAkB,CAC/C,CACH,EAAA,CAAA;AAAA;AAIJ,EACE,uBAAA,GAAA,CAAC,aACC,QAAC,kBAAA,GAAA,CAAA,QAAA,EAAA,EACC,8BAAC,SAAU,EAAA,EAAA,OAAA,EAAS,qBAAqB,MACvC,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,aAAY,EAAA,oBAAA;AAAA,MACZ,EAAI,EAAA;AAAA,QACF,CAAG,EAAA,CAAA;AAAA,QACH,OAAS,EAAA,MAAA;AAAA,QACT,cAAgB,EAAA;AAAA,OAClB;AAAA,MACD,QAAA,EAAA;AAAA;AAAA,GAED,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"IncidentsTableBody.esm.js","sources":["../../../src/components/Servicenow/IncidentsTableBody.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\n\nimport Box from '@mui/material/Box';\nimport TableBody from '@mui/material/TableBody';\nimport TableRow from '@mui/material/TableRow';\nimport TableCell from '@mui/material/TableCell';\n\nimport { useIncidentsListColumns } from './IncidentsListColumns';\nimport { IncidentsTableRow } from './IncidentsTableRow';\nimport type { IncidentsData } from '../../types';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const IncidentsTableBody = ({ rows }: { rows: IncidentsData[] }) => {\n const { t } = useTranslation();\n const incidentsListColumns = useIncidentsListColumns();\n\n if (rows?.length > 0) {\n return (\n <TableBody data-testid=\"incidents\">\n {rows.map(row => (\n <IncidentsTableRow key={row.sysId} data={row} />\n ))}\n </TableBody>\n );\n }\n\n return (\n <TableBody>\n <TableRow>\n <TableCell colSpan={incidentsListColumns.length}>\n <Box\n data-testid=\"no-incidents-found\"\n sx={{\n p: 2,\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n {t('table.emptyContent')}\n </Box>\n </TableCell>\n </TableRow>\n </TableBody>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA0BO,MAAM,kBAAqB,GAAA,CAAC,EAAE,IAAA,EAAsC,KAAA;AACzE,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,uBAAuB,uBAAwB,EAAA;AAErD,EAAI,IAAA,IAAA,EAAM,SAAS,CAAG,EAAA;AACpB,IAAA,uBACG,GAAA,CAAA,SAAA,EAAA,EAAU,aAAY,EAAA,WAAA,EACpB,eAAK,GAAI,CAAA,CAAA,GAAA,qBACP,GAAA,CAAA,iBAAA,EAAA,EAAkC,IAAM,EAAA,GAAA,EAAA,EAAjB,GAAI,CAAA,KAAkB,CAC/C,CACH,EAAA,CAAA;AAAA;AAIJ,EACE,uBAAA,GAAA,CAAC,aACC,QAAC,kBAAA,GAAA,CAAA,QAAA,EAAA,EACC,8BAAC,SAAU,EAAA,EAAA,OAAA,EAAS,qBAAqB,MACvC,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,aAAY,EAAA,oBAAA;AAAA,MACZ,EAAI,EAAA;AAAA,QACF,CAAG,EAAA,CAAA;AAAA,QACH,OAAS,EAAA,MAAA;AAAA,QACT,cAAgB,EAAA;AAAA,OAClB;AAAA,MAEC,YAAE,oBAAoB;AAAA;AAAA,GACzB,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -3,17 +3,18 @@ import TableCell from '@mui/material/TableCell';
3
3
  import TableHead from '@mui/material/TableHead';
4
4
  import TableRow from '@mui/material/TableRow';
5
5
  import TableSortLabel from '@mui/material/TableSortLabel';
6
- import { IncidentsListColumns } from './IncidentsListColumns.esm.js';
6
+ import { useIncidentsListColumns } from './IncidentsListColumns.esm.js';
7
7
 
8
8
  const IncidentsTableHeader = ({
9
9
  order,
10
10
  orderBy,
11
11
  onRequestSort
12
12
  }) => {
13
+ const incidentsListColumns = useIncidentsListColumns();
13
14
  const createSortHandler = (property) => (event) => {
14
15
  onRequestSort(event, property);
15
16
  };
16
- return /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { sx: { marginLeft: "6px", borderBottom: "1px solid #e0e0e0" }, children: IncidentsListColumns.map((column) => /* @__PURE__ */ jsx(
17
+ return /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { sx: { marginLeft: "6px", borderBottom: "1px solid #e0e0e0" }, children: incidentsListColumns.map((column) => /* @__PURE__ */ jsx(
17
18
  TableCell,
18
19
  {
19
20
  align: "left",
@@ -1 +1 @@
1
- {"version":3,"file":"IncidentsTableHeader.esm.js","sources":["../../../src/components/Servicenow/IncidentsTableHeader.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\n\nimport { MouseEvent } from 'react';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TableSortLabel from '@mui/material/TableSortLabel';\n\nimport type { Order } from '@backstage-community/plugin-servicenow-common';\n\nimport { IncidentsListColumns } from './IncidentsListColumns';\nimport { IncidentTableField } from '../../types';\n\ntype IncidentsTableHeaderProps = {\n order: Order;\n orderBy: IncidentTableField | undefined;\n onRequestSort: (\n event: MouseEvent<unknown>,\n property: IncidentTableField,\n ) => void;\n};\n\nexport const IncidentsTableHeader = ({\n order,\n orderBy,\n onRequestSort,\n}: IncidentsTableHeaderProps) => {\n const createSortHandler =\n (property: IncidentTableField) => (event: MouseEvent<unknown>) => {\n onRequestSort(event, property);\n };\n\n return (\n <TableHead>\n <TableRow sx={{ marginLeft: '6px', borderBottom: '1px solid #e0e0e0' }}>\n {IncidentsListColumns.map(column => (\n <TableCell\n key={column.id as string}\n align=\"left\"\n padding=\"normal\"\n style={{\n lineHeight: '1.5rem',\n fontSize: '0.875rem',\n padding: '24px 16px 24px 20px',\n fontWeight: '700',\n }}\n sortDirection={orderBy === column.field ? order : 'asc'}\n >\n <TableSortLabel\n active={orderBy === column.field}\n direction={orderBy === column.field ? order : 'asc'}\n onClick={\n column.sorting === false\n ? undefined\n : createSortHandler(column.field as IncidentTableField)\n }\n disabled={column.sorting === false}\n >\n {column.title}\n </TableSortLabel>\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAoCO,MAAM,uBAAuB,CAAC;AAAA,EACnC,KAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAiC,KAAA;AAC/B,EAAA,MAAM,iBACJ,GAAA,CAAC,QAAiC,KAAA,CAAC,KAA+B,KAAA;AAChE,IAAA,aAAA,CAAc,OAAO,QAAQ,CAAA;AAAA,GAC/B;AAEF,EAAA,uBACG,GAAA,CAAA,SAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,QAAA,EAAA,EAAS,EAAI,EAAA,EAAE,UAAY,EAAA,KAAA,EAAO,YAAc,EAAA,mBAAA,EAC9C,EAAA,QAAA,EAAA,oBAAA,CAAqB,IAAI,CACxB,MAAA,qBAAA,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MAEC,KAAM,EAAA,MAAA;AAAA,MACN,OAAQ,EAAA,QAAA;AAAA,MACR,KAAO,EAAA;AAAA,QACL,UAAY,EAAA,QAAA;AAAA,QACZ,QAAU,EAAA,UAAA;AAAA,QACV,OAAS,EAAA,qBAAA;AAAA,QACT,UAAY,EAAA;AAAA,OACd;AAAA,MACA,aAAe,EAAA,OAAA,KAAY,MAAO,CAAA,KAAA,GAAQ,KAAQ,GAAA,KAAA;AAAA,MAElD,QAAA,kBAAA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UACC,MAAA,EAAQ,YAAY,MAAO,CAAA,KAAA;AAAA,UAC3B,SAAW,EAAA,OAAA,KAAY,MAAO,CAAA,KAAA,GAAQ,KAAQ,GAAA,KAAA;AAAA,UAC9C,SACE,MAAO,CAAA,OAAA,KAAY,QACf,MACA,GAAA,iBAAA,CAAkB,OAAO,KAA2B,CAAA;AAAA,UAE1D,QAAA,EAAU,OAAO,OAAY,KAAA,KAAA;AAAA,UAE5B,QAAO,EAAA,MAAA,CAAA;AAAA;AAAA;AACV,KAAA;AAAA,IAtBK,MAAO,CAAA;AAAA,GAwBf,GACH,CACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"IncidentsTableHeader.esm.js","sources":["../../../src/components/Servicenow/IncidentsTableHeader.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\n\nimport { MouseEvent } from 'react';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TableSortLabel from '@mui/material/TableSortLabel';\n\nimport type { Order } from '@backstage-community/plugin-servicenow-common';\n\nimport { useIncidentsListColumns } from './IncidentsListColumns';\nimport { IncidentTableField } from '../../types';\n\ntype IncidentsTableHeaderProps = {\n order: Order;\n orderBy: IncidentTableField | undefined;\n onRequestSort: (\n event: MouseEvent<unknown>,\n property: IncidentTableField,\n ) => void;\n};\n\nexport const IncidentsTableHeader = ({\n order,\n orderBy,\n onRequestSort,\n}: IncidentsTableHeaderProps) => {\n const incidentsListColumns = useIncidentsListColumns();\n\n const createSortHandler =\n (property: IncidentTableField) => (event: MouseEvent<unknown>) => {\n onRequestSort(event, property);\n };\n\n return (\n <TableHead>\n <TableRow sx={{ marginLeft: '6px', borderBottom: '1px solid #e0e0e0' }}>\n {incidentsListColumns.map(column => (\n <TableCell\n key={column.id as string}\n align=\"left\"\n padding=\"normal\"\n style={{\n lineHeight: '1.5rem',\n fontSize: '0.875rem',\n padding: '24px 16px 24px 20px',\n fontWeight: '700',\n }}\n sortDirection={orderBy === column.field ? order : 'asc'}\n >\n <TableSortLabel\n active={orderBy === column.field}\n direction={orderBy === column.field ? order : 'asc'}\n onClick={\n column.sorting === false\n ? undefined\n : createSortHandler(column.field as IncidentTableField)\n }\n disabled={column.sorting === false}\n >\n {column.title}\n </TableSortLabel>\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAoCO,MAAM,uBAAuB,CAAC;AAAA,EACnC,KAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAiC,KAAA;AAC/B,EAAA,MAAM,uBAAuB,uBAAwB,EAAA;AAErD,EAAA,MAAM,iBACJ,GAAA,CAAC,QAAiC,KAAA,CAAC,KAA+B,KAAA;AAChE,IAAA,aAAA,CAAc,OAAO,QAAQ,CAAA;AAAA,GAC/B;AAEF,EAAA,uBACG,GAAA,CAAA,SAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,QAAA,EAAA,EAAS,EAAI,EAAA,EAAE,UAAY,EAAA,KAAA,EAAO,YAAc,EAAA,mBAAA,EAC9C,EAAA,QAAA,EAAA,oBAAA,CAAqB,IAAI,CACxB,MAAA,qBAAA,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MAEC,KAAM,EAAA,MAAA;AAAA,MACN,OAAQ,EAAA,QAAA;AAAA,MACR,KAAO,EAAA;AAAA,QACL,UAAY,EAAA,QAAA;AAAA,QACZ,QAAU,EAAA,UAAA;AAAA,QACV,OAAS,EAAA,qBAAA;AAAA,QACT,UAAY,EAAA;AAAA,OACd;AAAA,MACA,aAAe,EAAA,OAAA,KAAY,MAAO,CAAA,KAAA,GAAQ,KAAQ,GAAA,KAAA;AAAA,MAElD,QAAA,kBAAA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UACC,MAAA,EAAQ,YAAY,MAAO,CAAA,KAAA;AAAA,UAC3B,SAAW,EAAA,OAAA,KAAY,MAAO,CAAA,KAAA,GAAQ,KAAQ,GAAA,KAAA;AAAA,UAC9C,SACE,MAAO,CAAA,OAAA,KAAY,QACf,MACA,GAAA,iBAAA,CAAkB,OAAO,KAA2B,CAAA;AAAA,UAE1D,QAAA,EAAU,OAAO,OAAY,KAAA,KAAA;AAAA,UAE5B,QAAO,EAAA,MAAA,CAAA;AAAA;AAAA;AACV,KAAA;AAAA,IAtBK,MAAO,CAAA;AAAA,GAwBf,GACH,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -7,7 +7,8 @@ import { makeStyles } from '@mui/styles';
7
7
  import Tooltip from '@mui/material/Tooltip';
8
8
  import Typography from '@mui/material/Typography';
9
9
  import { convertDateFormat } from '../../utils/stringUtils.esm.js';
10
- import { getPriorityValue, getIncidentStateValue } from '../../utils/incidentUtils.esm.js';
10
+ import { usePriorityMap, useIncidentStateMap, renderStatusLabel } from '../../utils/incidentUtils.esm.js';
11
+ import { useTranslation } from '../../hooks/useTranslation.esm.js';
11
12
 
12
13
  const useStyles = makeStyles(() => ({
13
14
  tableCellStyle: {
@@ -17,6 +18,9 @@ const useStyles = makeStyles(() => ({
17
18
  }));
18
19
  const IncidentsTableRow = ({ data }) => {
19
20
  const classes = useStyles();
21
+ const { t } = useTranslation();
22
+ const priorityMap = usePriorityMap();
23
+ const incidentStateMap = useIncidentStateMap();
20
24
  return /* @__PURE__ */ jsxs(
21
25
  TableRow,
22
26
  {
@@ -42,9 +46,9 @@ const IncidentsTableRow = ({ data }) => {
42
46
  }
43
47
  ) }) }),
44
48
  /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: convertDateFormat(data?.sysCreatedOn) }),
45
- /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: getPriorityValue(data?.priority) }),
46
- /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: getIncidentStateValue(data?.incidentState) }),
47
- /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: /* @__PURE__ */ jsx(IconButton, { onClick: () => window.open(data.url, "_blank"), children: /* @__PURE__ */ jsx(OpenInNewIcon, { fontSize: "small", style: { color: "inherit" } }) }) })
49
+ /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: renderStatusLabel(priorityMap[data?.priority]) }),
50
+ /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: renderStatusLabel(incidentStateMap[data?.incidentState]) }),
51
+ /* @__PURE__ */ jsx(TableCell, { align: "left", className: classes.tableCellStyle, children: /* @__PURE__ */ jsx(Tooltip, { title: t("actions.openInServicenow"), arrow: true, placement: "top", children: /* @__PURE__ */ jsx(IconButton, { onClick: () => window.open(data.url, "_blank"), children: /* @__PURE__ */ jsx(OpenInNewIcon, { fontSize: "small", style: { color: "inherit" } }) }) }) })
48
52
  ]
49
53
  }
50
54
  );
@@ -1 +1 @@
1
- {"version":3,"file":"IncidentsTableRow.esm.js","sources":["../../../src/components/Servicenow/IncidentsTableRow.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\n\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport IconButton from '@mui/material/IconButton';\nimport TableCell from '@mui/material/TableCell';\nimport TableRow from '@mui/material/TableRow';\nimport { makeStyles } from '@mui/styles';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\n\nimport { convertDateFormat } from '../../utils/stringUtils';\nimport {\n getIncidentStateValue,\n getPriorityValue,\n} from '../../utils/incidentUtils';\nimport type { IncidentsData } from '../../types';\n\nconst useStyles = makeStyles(() => ({\n tableCellStyle: {\n lineHeight: '1.5rem',\n fontSize: '0.875rem',\n },\n}));\n\nexport const IncidentsTableRow = ({ data }: { data: IncidentsData }) => {\n const classes = useStyles();\n\n return (\n <TableRow\n hover\n sx={{\n fontSize: '0.875rem',\n '&:last-child td, &:last-child th': { border: 0 },\n borderBottom: '1px solid #e0e0e0',\n }}\n >\n <TableCell component=\"th\" scope=\"row\" className={classes.tableCellStyle}>\n {data.number}\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n <Tooltip title={data?.description} arrow placement=\"top\">\n <Typography\n variant=\"body1\"\n style={{\n maxWidth: 208,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {data?.shortDescription}\n </Typography>\n </Tooltip>\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n {convertDateFormat(data?.sysCreatedOn)}\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n {getPriorityValue(data?.priority)}\n </TableCell>\n\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n {getIncidentStateValue(data?.incidentState)}\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n <IconButton onClick={() => window.open(data.url, '_blank')}>\n <OpenInNewIcon fontSize=\"small\" style={{ color: 'inherit' }} />\n </IconButton>\n </TableCell>\n </TableRow>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA+BA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,cAAgB,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,QAAU,EAAA;AAAA;AAEd,CAAE,CAAA,CAAA;AAEK,MAAM,iBAAoB,GAAA,CAAC,EAAE,IAAA,EAAoC,KAAA;AACtE,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAK,EAAA,IAAA;AAAA,MACL,EAAI,EAAA;AAAA,QACF,QAAU,EAAA,UAAA;AAAA,QACV,kCAAA,EAAoC,EAAE,MAAA,EAAQ,CAAE,EAAA;AAAA,QAChD,YAAc,EAAA;AAAA,OAChB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,SAAA,EAAA,EAAU,WAAU,IAAK,EAAA,KAAA,EAAM,OAAM,SAAW,EAAA,OAAA,CAAQ,cACtD,EAAA,QAAA,EAAA,IAAA,CAAK,MACR,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,SAAA,EAAA,EAAU,KAAM,EAAA,MAAA,EAAO,WAAW,OAAQ,CAAA,cAAA,EACzC,QAAC,kBAAA,GAAA,CAAA,OAAA,EAAA,EAAQ,OAAO,IAAM,EAAA,WAAA,EAAa,KAAK,EAAA,IAAA,EAAC,WAAU,KACjD,EAAA,QAAA,kBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,OAAQ,EAAA,OAAA;AAAA,YACR,KAAO,EAAA;AAAA,cACL,QAAU,EAAA,GAAA;AAAA,cACV,UAAY,EAAA,QAAA;AAAA,cACZ,QAAU,EAAA,QAAA;AAAA,cACV,YAAc,EAAA;AAAA,aAChB;AAAA,YAEC,QAAM,EAAA,IAAA,EAAA;AAAA;AAAA,WAEX,CACF,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,SAAU,EAAA,EAAA,KAAA,EAAM,MAAO,EAAA,SAAA,EAAW,QAAQ,cACxC,EAAA,QAAA,EAAA,iBAAA,CAAkB,IAAM,EAAA,YAAY,CACvC,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,SAAU,EAAA,EAAA,KAAA,EAAM,MAAO,EAAA,SAAA,EAAW,QAAQ,cACxC,EAAA,QAAA,EAAA,gBAAA,CAAiB,IAAM,EAAA,QAAQ,CAClC,EAAA,CAAA;AAAA,wBAEA,GAAA,CAAC,SAAU,EAAA,EAAA,KAAA,EAAM,MAAO,EAAA,SAAA,EAAW,QAAQ,cACxC,EAAA,QAAA,EAAA,qBAAA,CAAsB,IAAM,EAAA,aAAa,CAC5C,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,SAAU,EAAA,EAAA,KAAA,EAAM,MAAO,EAAA,SAAA,EAAW,OAAQ,CAAA,cAAA,EACzC,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,OAAS,EAAA,MAAM,MAAO,CAAA,IAAA,CAAK,IAAK,CAAA,GAAA,EAAK,QAAQ,CAAA,EACvD,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,QAAS,EAAA,OAAA,EAAQ,KAAO,EAAA,EAAE,KAAO,EAAA,SAAA,EAAa,EAAA,CAAA,EAC/D,CACF,EAAA;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"IncidentsTableRow.esm.js","sources":["../../../src/components/Servicenow/IncidentsTableRow.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 */\n\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport IconButton from '@mui/material/IconButton';\nimport TableCell from '@mui/material/TableCell';\nimport TableRow from '@mui/material/TableRow';\nimport { makeStyles } from '@mui/styles';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\n\nimport { convertDateFormat } from '../../utils/stringUtils';\nimport {\n renderStatusLabel,\n usePriorityMap,\n useIncidentStateMap,\n} from '../../utils/incidentUtils';\nimport type { IncidentsData } from '../../types';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nconst useStyles = makeStyles(() => ({\n tableCellStyle: {\n lineHeight: '1.5rem',\n fontSize: '0.875rem',\n },\n}));\n\nexport const IncidentsTableRow = ({ data }: { data: IncidentsData }) => {\n const classes = useStyles();\n const { t } = useTranslation();\n const priorityMap = usePriorityMap();\n const incidentStateMap = useIncidentStateMap();\n\n return (\n <TableRow\n hover\n sx={{\n fontSize: '0.875rem',\n '&:last-child td, &:last-child th': { border: 0 },\n borderBottom: '1px solid #e0e0e0',\n }}\n >\n <TableCell component=\"th\" scope=\"row\" className={classes.tableCellStyle}>\n {data.number}\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n <Tooltip title={data?.description} arrow placement=\"top\">\n <Typography\n variant=\"body1\"\n style={{\n maxWidth: 208,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {data?.shortDescription}\n </Typography>\n </Tooltip>\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n {convertDateFormat(data?.sysCreatedOn)}\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n {renderStatusLabel(priorityMap[data?.priority])}\n </TableCell>\n\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n {renderStatusLabel(incidentStateMap[data?.incidentState])}\n </TableCell>\n <TableCell align=\"left\" className={classes.tableCellStyle}>\n <Tooltip title={t('actions.openInServicenow')} arrow placement=\"top\">\n <IconButton onClick={() => window.open(data.url, '_blank')}>\n <OpenInNewIcon fontSize=\"small\" style={{ color: 'inherit' }} />\n </IconButton>\n </Tooltip>\n </TableCell>\n </TableRow>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAiCA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,cAAgB,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,QAAU,EAAA;AAAA;AAEd,CAAE,CAAA,CAAA;AAEK,MAAM,iBAAoB,GAAA,CAAC,EAAE,IAAA,EAAoC,KAAA;AACtE,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,cAAc,cAAe,EAAA;AACnC,EAAA,MAAM,mBAAmB,mBAAoB,EAAA;AAE7C,EACE,uBAAA,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAK,EAAA,IAAA;AAAA,MACL,EAAI,EAAA;AAAA,QACF,QAAU,EAAA,UAAA;AAAA,QACV,kCAAA,EAAoC,EAAE,MAAA,EAAQ,CAAE,EAAA;AAAA,QAChD,YAAc,EAAA;AAAA,OAChB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,SAAA,EAAA,EAAU,WAAU,IAAK,EAAA,KAAA,EAAM,OAAM,SAAW,EAAA,OAAA,CAAQ,cACtD,EAAA,QAAA,EAAA,IAAA,CAAK,MACR,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,SAAA,EAAA,EAAU,KAAM,EAAA,MAAA,EAAO,WAAW,OAAQ,CAAA,cAAA,EACzC,QAAC,kBAAA,GAAA,CAAA,OAAA,EAAA,EAAQ,OAAO,IAAM,EAAA,WAAA,EAAa,KAAK,EAAA,IAAA,EAAC,WAAU,KACjD,EAAA,QAAA,kBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,OAAQ,EAAA,OAAA;AAAA,YACR,KAAO,EAAA;AAAA,cACL,QAAU,EAAA,GAAA;AAAA,cACV,UAAY,EAAA,QAAA;AAAA,cACZ,QAAU,EAAA,QAAA;AAAA,cACV,YAAc,EAAA;AAAA,aAChB;AAAA,YAEC,QAAM,EAAA,IAAA,EAAA;AAAA;AAAA,WAEX,CACF,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,SAAU,EAAA,EAAA,KAAA,EAAM,MAAO,EAAA,SAAA,EAAW,QAAQ,cACxC,EAAA,QAAA,EAAA,iBAAA,CAAkB,IAAM,EAAA,YAAY,CACvC,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,SAAA,EAAA,EAAU,KAAM,EAAA,MAAA,EAAO,SAAW,EAAA,OAAA,CAAQ,cACxC,EAAA,QAAA,EAAA,iBAAA,CAAkB,WAAY,CAAA,IAAA,EAAM,QAAQ,CAAC,CAChD,EAAA,CAAA;AAAA,wBAEC,GAAA,CAAA,SAAA,EAAA,EAAU,KAAM,EAAA,MAAA,EAAO,SAAW,EAAA,OAAA,CAAQ,cACxC,EAAA,QAAA,EAAA,iBAAA,CAAkB,gBAAiB,CAAA,IAAA,EAAM,aAAa,CAAC,CAC1D,EAAA,CAAA;AAAA,4BACC,SAAU,EAAA,EAAA,KAAA,EAAM,MAAO,EAAA,SAAA,EAAW,QAAQ,cACzC,EAAA,QAAA,kBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,KAAA,EAAO,EAAE,0BAA0B,CAAA,EAAG,OAAK,IAAC,EAAA,SAAA,EAAU,OAC7D,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,OAAS,EAAA,MAAM,OAAO,IAAK,CAAA,IAAA,CAAK,GAAK,EAAA,QAAQ,GACvD,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,QAAS,EAAA,OAAA,EAAQ,OAAO,EAAE,KAAA,EAAO,WAAa,EAAA,CAAA,EAC/D,GACF,CACF,EAAA;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -7,11 +7,10 @@ import CheckBoxIcon from '@mui/icons-material/CheckBox';
7
7
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
8
8
  import InputLabel from '@mui/material/InputLabel';
9
9
  import TextField from '@mui/material/TextField';
10
- import { PRIORITY_MAP, INCIDENT_STATE_MAP, renderStatusLabel } from '../../utils/incidentUtils.esm.js';
10
+ import { renderStatusLabel } from '../../utils/incidentUtils.esm.js';
11
11
 
12
12
  const IncidentEnumFilter = ({
13
13
  label,
14
- filterKey,
15
14
  dataMap,
16
15
  value,
17
16
  onChange
@@ -48,7 +47,7 @@ const IncidentEnumFilter = ({
48
47
  onChange,
49
48
  renderOption: (renderProps, option, { selected }) => {
50
49
  const { key, ...optionProps } = renderProps;
51
- const statusData = filterKey === "priority" ? PRIORITY_MAP[Number(option.value)] : INCIDENT_STATE_MAP[Number(option.value)];
50
+ const statusData = dataMap[Number(option.value)];
52
51
  return /* @__PURE__ */ jsxs("li", { ...optionProps, children: [
53
52
  /* @__PURE__ */ jsx(
54
53
  Checkbox,
@@ -1 +1 @@
1
- {"version":3,"file":"IncidentEnumFilter.esm.js","sources":["../../../src/components/shared-components/IncidentEnumFilter.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 */\n\nimport { SelectItem } from '@backstage/core-components';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport Box from '@mui/material/Box';\nimport Checkbox from '@mui/material/Checkbox';\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport InputLabel from '@mui/material/InputLabel';\nimport TextField from '@mui/material/TextField';\nimport {\n INCIDENT_STATE_MAP,\n PRIORITY_MAP,\n renderStatusLabel,\n} from '../../utils/incidentUtils';\n\ntype SourceMap = Record<number, { label: string }>;\n\nexport interface IncidentEnumFilterProps {\n label: string;\n filterKey: string;\n dataMap: SourceMap;\n value: SelectItem[];\n onChange: (event: any, value: SelectItem[]) => void;\n}\n\nexport const IncidentEnumFilter = ({\n label,\n filterKey,\n dataMap,\n value,\n onChange,\n}: IncidentEnumFilterProps) => {\n const items: SelectItem[] = Object.entries(dataMap).map(\n ([key, itemValue]) => ({\n value: key,\n label: itemValue.label,\n }),\n );\n\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column' }}>\n <InputLabel\n sx={{\n transform: 'initial',\n fontWeight: 'bold',\n fontSize: theme => theme.typography.body2.fontSize,\n fontFamily: theme => theme.typography.fontFamily,\n color: theme => theme.palette.text.primary,\n }}\n >\n {label}\n </InputLabel>\n <Autocomplete\n multiple\n disableCloseOnSelect\n aria-label={label}\n options={items}\n isOptionEqualToValue={(option, val) => option.value === val.value}\n getOptionLabel={option => option.label}\n onChange={onChange}\n renderOption={(renderProps, option, { selected }) => {\n const { key, ...optionProps } = renderProps;\n const statusData =\n filterKey === 'priority'\n ? PRIORITY_MAP[Number(option.value)]\n : INCIDENT_STATE_MAP[Number(option.value)];\n\n return (\n <li key={key} {...optionProps}>\n <Checkbox\n icon={<CheckBoxOutlineBlankIcon fontSize=\"small\" />}\n checkedIcon={<CheckBoxIcon fontSize=\"small\" />}\n checked={selected}\n />\n {renderStatusLabel(statusData)}\n </li>\n );\n }}\n size=\"small\"\n value={value}\n popupIcon={\n <ExpandMoreIcon\n data-testid={`select-${label.toLowerCase().replace(/\\s/g, '-')}`}\n />\n }\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAyCO,MAAM,qBAAqB,CAAC;AAAA,EACjC,KAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAA+B,KAAA;AAC7B,EAAA,MAAM,KAAsB,GAAA,MAAA,CAAO,OAAQ,CAAA,OAAO,CAAE,CAAA,GAAA;AAAA,IAClD,CAAC,CAAC,GAAK,EAAA,SAAS,CAAO,MAAA;AAAA,MACrB,KAAO,EAAA,GAAA;AAAA,MACP,OAAO,SAAU,CAAA;AAAA,KACnB;AAAA,GACF;AAEA,EACE,uBAAA,IAAA,CAAC,OAAI,EAAI,EAAA,EAAE,SAAS,MAAQ,EAAA,aAAA,EAAe,UACzC,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,SAAW,EAAA,SAAA;AAAA,UACX,UAAY,EAAA,MAAA;AAAA,UACZ,QAAU,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,UAAA,CAAW,KAAM,CAAA,QAAA;AAAA,UAC1C,UAAA,EAAY,CAAS,KAAA,KAAA,KAAA,CAAM,UAAW,CAAA,UAAA;AAAA,UACtC,KAAO,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA;AAAA,SACrC;AAAA,QAEC,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAQ,EAAA,IAAA;AAAA,QACR,oBAAoB,EAAA,IAAA;AAAA,QACpB,YAAY,EAAA,KAAA;AAAA,QACZ,OAAS,EAAA,KAAA;AAAA,QACT,sBAAsB,CAAC,MAAA,EAAQ,GAAQ,KAAA,MAAA,CAAO,UAAU,GAAI,CAAA,KAAA;AAAA,QAC5D,cAAA,EAAgB,YAAU,MAAO,CAAA,KAAA;AAAA,QACjC,QAAA;AAAA,QACA,cAAc,CAAC,WAAA,EAAa,MAAQ,EAAA,EAAE,UAAe,KAAA;AACnD,UAAA,MAAM,EAAE,GAAA,EAAK,GAAG,WAAA,EAAgB,GAAA,WAAA;AAChC,UAAA,MAAM,UACJ,GAAA,SAAA,KAAc,UACV,GAAA,YAAA,CAAa,MAAO,CAAA,MAAA,CAAO,KAAK,CAAC,CACjC,GAAA,kBAAA,CAAmB,MAAO,CAAA,MAAA,CAAO,KAAK,CAAC,CAAA;AAE7C,UACE,uBAAA,IAAA,CAAC,IAAc,EAAA,EAAA,GAAG,WAChB,EAAA,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,QAAA;AAAA,cAAA;AAAA,gBACC,IAAM,kBAAA,GAAA,CAAC,wBAAyB,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,gBACjD,WAAa,kBAAA,GAAA,CAAC,YAAa,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,gBAC5C,OAAS,EAAA;AAAA;AAAA,aACX;AAAA,YACC,kBAAkB,UAAU;AAAA,WAAA,EAAA,EANtB,GAOT,CAAA;AAAA,SAEJ;AAAA,QACA,IAAK,EAAA,OAAA;AAAA,QACL,KAAA;AAAA,QACA,SACE,kBAAA,GAAA;AAAA,UAAC,cAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,UAAU,KAAM,CAAA,WAAA,GAAc,OAAQ,CAAA,KAAA,EAAO,GAAG,CAAC,CAAA;AAAA;AAAA,SAChE;AAAA,QAEF,aAAa,CAAU,MAAA,qBAAA,GAAA,CAAC,aAAW,GAAG,MAAA,EAAQ,SAAQ,UAAW,EAAA;AAAA;AAAA;AACnE,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"IncidentEnumFilter.esm.js","sources":["../../../src/components/shared-components/IncidentEnumFilter.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 */\n\nimport { SelectItem } from '@backstage/core-components';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport Box from '@mui/material/Box';\nimport Checkbox from '@mui/material/Checkbox';\nimport CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport InputLabel from '@mui/material/InputLabel';\nimport TextField from '@mui/material/TextField';\nimport { renderStatusLabel, StatusData } from '../../utils/incidentUtils';\n\nexport interface IncidentEnumFilterProps {\n label: string;\n /** @deprecated No longer used, kept for backwards compatibility */\n filterKey?: string;\n dataMap: Record<number, StatusData>;\n value: SelectItem[];\n onChange: (event: any, value: SelectItem[]) => void;\n}\n\nexport const IncidentEnumFilter = ({\n label,\n dataMap,\n value,\n onChange,\n}: IncidentEnumFilterProps) => {\n const items: SelectItem[] = Object.entries(dataMap).map(\n ([key, itemValue]) => ({\n value: key,\n label: itemValue.label,\n }),\n );\n\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column' }}>\n <InputLabel\n sx={{\n transform: 'initial',\n fontWeight: 'bold',\n fontSize: theme => theme.typography.body2.fontSize,\n fontFamily: theme => theme.typography.fontFamily,\n color: theme => theme.palette.text.primary,\n }}\n >\n {label}\n </InputLabel>\n <Autocomplete\n multiple\n disableCloseOnSelect\n aria-label={label}\n options={items}\n isOptionEqualToValue={(option, val) => option.value === val.value}\n getOptionLabel={option => option.label}\n onChange={onChange}\n renderOption={(renderProps, option, { selected }) => {\n const { key, ...optionProps } = renderProps;\n const statusData = dataMap[Number(option.value)];\n\n return (\n <li key={key} {...optionProps}>\n <Checkbox\n icon={<CheckBoxOutlineBlankIcon fontSize=\"small\" />}\n checkedIcon={<CheckBoxIcon fontSize=\"small\" />}\n checked={selected}\n />\n {renderStatusLabel(statusData)}\n </li>\n );\n }}\n size=\"small\"\n value={value}\n popupIcon={\n <ExpandMoreIcon\n data-testid={`select-${label.toLowerCase().replace(/\\s/g, '-')}`}\n />\n }\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoCO,MAAM,qBAAqB,CAAC;AAAA,EACjC,KAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAA+B,KAAA;AAC7B,EAAA,MAAM,KAAsB,GAAA,MAAA,CAAO,OAAQ,CAAA,OAAO,CAAE,CAAA,GAAA;AAAA,IAClD,CAAC,CAAC,GAAK,EAAA,SAAS,CAAO,MAAA;AAAA,MACrB,KAAO,EAAA,GAAA;AAAA,MACP,OAAO,SAAU,CAAA;AAAA,KACnB;AAAA,GACF;AAEA,EACE,uBAAA,IAAA,CAAC,OAAI,EAAI,EAAA,EAAE,SAAS,MAAQ,EAAA,aAAA,EAAe,UACzC,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,SAAW,EAAA,SAAA;AAAA,UACX,UAAY,EAAA,MAAA;AAAA,UACZ,QAAU,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,UAAA,CAAW,KAAM,CAAA,QAAA;AAAA,UAC1C,UAAA,EAAY,CAAS,KAAA,KAAA,KAAA,CAAM,UAAW,CAAA,UAAA;AAAA,UACtC,KAAO,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA;AAAA,SACrC;AAAA,QAEC,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAQ,EAAA,IAAA;AAAA,QACR,oBAAoB,EAAA,IAAA;AAAA,QACpB,YAAY,EAAA,KAAA;AAAA,QACZ,OAAS,EAAA,KAAA;AAAA,QACT,sBAAsB,CAAC,MAAA,EAAQ,GAAQ,KAAA,MAAA,CAAO,UAAU,GAAI,CAAA,KAAA;AAAA,QAC5D,cAAA,EAAgB,YAAU,MAAO,CAAA,KAAA;AAAA,QACjC,QAAA;AAAA,QACA,cAAc,CAAC,WAAA,EAAa,MAAQ,EAAA,EAAE,UAAe,KAAA;AACnD,UAAA,MAAM,EAAE,GAAA,EAAK,GAAG,WAAA,EAAgB,GAAA,WAAA;AAChC,UAAA,MAAM,UAAa,GAAA,OAAA,CAAQ,MAAO,CAAA,MAAA,CAAO,KAAK,CAAC,CAAA;AAE/C,UACE,uBAAA,IAAA,CAAC,IAAc,EAAA,EAAA,GAAG,WAChB,EAAA,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,QAAA;AAAA,cAAA;AAAA,gBACC,IAAM,kBAAA,GAAA,CAAC,wBAAyB,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,gBACjD,WAAa,kBAAA,GAAA,CAAC,YAAa,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,gBAC5C,OAAS,EAAA;AAAA;AAAA,aACX;AAAA,YACC,kBAAkB,UAAU;AAAA,WAAA,EAAA,EANtB,GAOT,CAAA;AAAA,SAEJ;AAAA,QACA,IAAK,EAAA,OAAA;AAAA,QACL,KAAA;AAAA,QACA,SACE,kBAAA,GAAA;AAAA,UAAC,cAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAa,UAAU,KAAM,CAAA,WAAA,GAAc,OAAQ,CAAA,KAAA,EAAO,GAAG,CAAC,CAAA;AAAA;AAAA,SAChE;AAAA,QAEF,aAAa,CAAU,MAAA,qBAAA,GAAA,CAAC,aAAW,GAAG,MAAA,EAAQ,SAAQ,UAAW,EAAA;AAAA;AAAA;AACnE,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,13 @@
1
+ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
2
+ import '../translations/index.esm.js';
3
+ import { servicenowTranslationRef } from '../translations/ref.esm.js';
4
+
5
+ const useTranslation = () => {
6
+ const { t } = useTranslationRef(servicenowTranslationRef);
7
+ return {
8
+ t
9
+ };
10
+ };
11
+
12
+ export { useTranslation };
13
+ //# sourceMappingURL=useTranslation.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTranslation.esm.js","sources":["../../src/hooks/useTranslation.ts"],"sourcesContent":["/*\n * Copyright 2025 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 {\n useTranslationRef,\n TranslationRef,\n} from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from '../translations';\n\ntype ServicenowMessages =\n typeof servicenowTranslationRef extends TranslationRef<\n string,\n infer TMessages extends { [x: string]: string }\n >\n ? TMessages\n : never;\n\n/**\n * Hook to access the ServiceNow plugin translations.\n * @alpha\n */\nexport const useTranslation = (): {\n t: (\n key: keyof ServicenowMessages,\n options?: Record<string, unknown>,\n ) => string;\n} => {\n const { t } = useTranslationRef(servicenowTranslationRef);\n return {\n t: t as unknown as (\n key: keyof ServicenowMessages,\n options?: Record<string, unknown>,\n ) => string,\n };\n};\n"],"names":[],"mappings":";;;;AAiCO,MAAM,iBAAiB,MAKzB;AACH,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AACxD,EAAO,OAAA;AAAA,IACL;AAAA,GAIF;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -16,6 +16,11 @@ declare const servicenowPlugin: _backstage_core_plugin_api.BackstagePlugin<{
16
16
  * @public
17
17
  */
18
18
  declare const EntityServicenowContent: () => react_jsx_runtime.JSX.Element;
19
+ /**
20
+ * A component that wraps the service-now content in a memory router
21
+ * @public
22
+ */
23
+ declare const Router: () => react_jsx_runtime.JSX.Element;
19
24
  /**
20
25
  * @deprecated please use `EntityServicenowCard` instead, this page
21
26
  * might be removed in future releases or replaced with a page
@@ -29,4 +34,4 @@ declare const ServicenowPage: () => react_jsx_runtime.JSX.Element;
29
34
  */
30
35
  declare const isMyProfile: (entity: Entity) => boolean;
31
36
 
32
- export { EntityServicenowContent, ServicenowPage, isMyProfile, servicenowPlugin };
37
+ export { EntityServicenowContent, Router, ServicenowPage, isMyProfile, servicenowPlugin };
package/dist/index.esm.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { isServicenowAvailable } from '@backstage-community/plugin-servicenow-common';
2
- export { EntityServicenowContent, ServicenowPage, isMyProfile, servicenowPlugin } from './plugin.esm.js';
2
+ export { EntityServicenowContent, Router, ServicenowPage, isMyProfile, servicenowPlugin } from './plugin.esm.js';
3
3
  //# sourceMappingURL=index.esm.js.map
@@ -28,6 +28,14 @@ const EntityServicenowContent = servicenowPlugin.provide(
28
28
  }
29
29
  })
30
30
  );
31
+ const Router = servicenowPlugin.provide(
32
+ createComponentExtension({
33
+ name: "Router",
34
+ component: {
35
+ lazy: () => import('./components/Router.esm.js').then((m) => m.Router)
36
+ }
37
+ })
38
+ );
31
39
  const ServicenowPage = EntityServicenowContent;
32
40
  const isMyProfile = (entity) => {
33
41
  const currentUserRef = localStorage.getItem("userEntityRef");
@@ -41,5 +49,5 @@ const isMyProfile = (entity) => {
41
49
  }
42
50
  };
43
51
 
44
- export { EntityServicenowContent, ServicenowPage, isMyProfile, servicenowPlugin };
52
+ export { EntityServicenowContent, Router, ServicenowPage, isMyProfile, servicenowPlugin };
45
53
  //# sourceMappingURL=plugin.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2025 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 {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n Entity,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\n\nimport { rootRouteRef } from './routes';\nimport {\n serviceNowApiRef,\n ServiceNowBackendClient,\n} from './api/ServiceNowBackendClient';\n\n/**\n * Servicenow Plugin\n * @public\n */\nexport const servicenowPlugin = createPlugin({\n id: 'servicenow',\n apis: [\n createApiFactory({\n api: serviceNowApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, fetchApi, identityApi }) =>\n new ServiceNowBackendClient(discoveryApi, fetchApi, identityApi),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Servicenow entity content that shows an incident table with a\n * filter similar to the catalog table\n * @public\n */\nexport const EntityServicenowContent = servicenowPlugin.provide(\n createComponentExtension({\n name: 'EntityServicenowContent',\n component: {\n lazy: () =>\n import('./components/Servicenow').then(m => m.EntityServicenowContent),\n },\n }),\n);\n\n/**\n * @deprecated please use `EntityServicenowCard` instead, this page\n * might be removed in future releases or replaced with a page\n * that lists the incidents assigned to the current user.\n * @public\n */\nexport const ServicenowPage = EntityServicenowContent;\n\n/**\n * Check if the current entity is the logged-in user\n * @public\n */\nexport const isMyProfile = (entity: Entity): boolean => {\n const currentUserRef = localStorage.getItem('userEntityRef');\n if (!currentUserRef) return false;\n\n try {\n const a = parseEntityRef(currentUserRef);\n const b = parseEntityRef(stringifyEntityRef(entity));\n return (\n a.kind.toLowerCase() === b.kind.toLowerCase() &&\n a.namespace.toLowerCase() === b.namespace.toLowerCase() &&\n a.name.toLowerCase() === b.name.toLowerCase()\n );\n } catch {\n return false;\n }\n};\n"],"names":[],"mappings":";;;;;AAuCO,MAAM,mBAAmB,YAAa,CAAA;AAAA,EAC3C,EAAI,EAAA,YAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,gBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA,WAAA;AAAA,QACV,WAAa,EAAA;AAAA,OACf;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EAAU,WAAY,EAAA,KAC9C,IAAI,uBAAA,CAAwB,YAAc,EAAA,QAAA,EAAU,WAAW;AAAA,KAClE;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC;AAOM,MAAM,0BAA0B,gBAAiB,CAAA,OAAA;AAAA,EACtD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,yBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,sCAAyB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,uBAAuB;AAAA;AACzE,GACD;AACH;AAQO,MAAM,cAAiB,GAAA;AAMjB,MAAA,WAAA,GAAc,CAAC,MAA4B,KAAA;AACtD,EAAM,MAAA,cAAA,GAAiB,YAAa,CAAA,OAAA,CAAQ,eAAe,CAAA;AAC3D,EAAI,IAAA,CAAC,gBAAuB,OAAA,KAAA;AAE5B,EAAI,IAAA;AACF,IAAM,MAAA,CAAA,GAAI,eAAe,cAAc,CAAA;AACvC,IAAA,MAAM,CAAI,GAAA,cAAA,CAAe,kBAAmB,CAAA,MAAM,CAAC,CAAA;AACnD,IACE,OAAA,CAAA,CAAE,KAAK,WAAY,EAAA,KAAM,EAAE,IAAK,CAAA,WAAA,EAChC,IAAA,CAAA,CAAE,SAAU,CAAA,WAAA,OAAkB,CAAE,CAAA,SAAA,CAAU,aAC1C,IAAA,CAAA,CAAE,KAAK,WAAY,EAAA,KAAM,CAAE,CAAA,IAAA,CAAK,WAAY,EAAA;AAAA,GAExC,CAAA,MAAA;AACN,IAAO,OAAA,KAAA;AAAA;AAEX;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2025 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 {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n Entity,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\n\nimport { rootRouteRef } from './routes';\nimport {\n serviceNowApiRef,\n ServiceNowBackendClient,\n} from './api/ServiceNowBackendClient';\n\n/**\n * Servicenow Plugin\n * @public\n */\nexport const servicenowPlugin = createPlugin({\n id: 'servicenow',\n apis: [\n createApiFactory({\n api: serviceNowApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, fetchApi, identityApi }) =>\n new ServiceNowBackendClient(discoveryApi, fetchApi, identityApi),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Servicenow entity content that shows an incident table with a\n * filter similar to the catalog table\n * @public\n */\nexport const EntityServicenowContent = servicenowPlugin.provide(\n createComponentExtension({\n name: 'EntityServicenowContent',\n component: {\n lazy: () =>\n import('./components/Servicenow').then(m => m.EntityServicenowContent),\n },\n }),\n);\n\n/**\n * A component that wraps the service-now content in a memory router\n * @public\n */\nexport const Router = servicenowPlugin.provide(\n createComponentExtension({\n name: 'Router',\n component: {\n lazy: () => import('./components/Router').then(m => m.Router),\n },\n }),\n);\n\n/**\n * @deprecated please use `EntityServicenowCard` instead, this page\n * might be removed in future releases or replaced with a page\n * that lists the incidents assigned to the current user.\n * @public\n */\nexport const ServicenowPage = EntityServicenowContent;\n\n/**\n * Check if the current entity is the logged-in user\n * @public\n */\nexport const isMyProfile = (entity: Entity): boolean => {\n const currentUserRef = localStorage.getItem('userEntityRef');\n if (!currentUserRef) return false;\n\n try {\n const a = parseEntityRef(currentUserRef);\n const b = parseEntityRef(stringifyEntityRef(entity));\n return (\n a.kind.toLowerCase() === b.kind.toLowerCase() &&\n a.namespace.toLowerCase() === b.namespace.toLowerCase() &&\n a.name.toLowerCase() === b.name.toLowerCase()\n );\n } catch {\n return false;\n }\n};\n"],"names":[],"mappings":";;;;;AAuCO,MAAM,mBAAmB,YAAa,CAAA;AAAA,EAC3C,EAAI,EAAA,YAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,gBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA,WAAA;AAAA,QACV,WAAa,EAAA;AAAA,OACf;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EAAU,WAAY,EAAA,KAC9C,IAAI,uBAAA,CAAwB,YAAc,EAAA,QAAA,EAAU,WAAW;AAAA,KAClE;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC;AAOM,MAAM,0BAA0B,gBAAiB,CAAA,OAAA;AAAA,EACtD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,yBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,sCAAyB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,uBAAuB;AAAA;AACzE,GACD;AACH;AAMO,MAAM,SAAS,gBAAiB,CAAA,OAAA;AAAA,EACrC,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,QAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,4BAAqB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,MAAM;AAAA;AAC9D,GACD;AACH;AAQO,MAAM,cAAiB,GAAA;AAMjB,MAAA,WAAA,GAAc,CAAC,MAA4B,KAAA;AACtD,EAAM,MAAA,cAAA,GAAiB,YAAa,CAAA,OAAA,CAAQ,eAAe,CAAA;AAC3D,EAAI,IAAA,CAAC,gBAAuB,OAAA,KAAA;AAE5B,EAAI,IAAA;AACF,IAAM,MAAA,CAAA,GAAI,eAAe,cAAc,CAAA;AACvC,IAAA,MAAM,CAAI,GAAA,cAAA,CAAe,kBAAmB,CAAA,MAAM,CAAC,CAAA;AACnD,IACE,OAAA,CAAA,CAAE,KAAK,WAAY,EAAA,KAAM,EAAE,IAAK,CAAA,WAAA,EAChC,IAAA,CAAA,CAAE,SAAU,CAAA,WAAA,OAAkB,CAAE,CAAA,SAAA,CAAU,aAC1C,IAAA,CAAA,CAAE,KAAK,WAAY,EAAA,KAAM,CAAE,CAAA,IAAA,CAAK,WAAY,EAAA;AAAA,GAExC,CAAA,MAAA;AACN,IAAO,OAAA,KAAA;AAAA;AAEX;;;;"}
@@ -0,0 +1,37 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { servicenowTranslationRef } from './ref.esm.js';
3
+
4
+ const servicenowTranslationDe = createTranslationMessages({
5
+ ref: servicenowTranslationRef,
6
+ messages: {
7
+ "page.title": "ServiceNow Tickets",
8
+ "page.titleWithCount": "ServiceNow Tickets ({{count}})",
9
+ "table.searchPlaceholder": "Suchen",
10
+ "table.labelRowsSelect": "{{count}} Zeilen",
11
+ "table.columns.incidentNumber": "Vorfallnummer",
12
+ "table.columns.description": "Beschreibung",
13
+ "table.columns.created": "Erstellt",
14
+ "table.columns.priority": "Priorit\xE4t",
15
+ "table.columns.state": "Status",
16
+ "table.columns.actions": "Aktionen",
17
+ "table.emptyContent": "Keine Eintr\xE4ge gefunden",
18
+ "filter.state": "Status",
19
+ "filter.priority": "Priorit\xE4t",
20
+ "priority.critical": "Kritisch",
21
+ "priority.high": "Hoch",
22
+ "priority.moderate": "Mittel",
23
+ "priority.low": "Niedrig",
24
+ "priority.planning": "Planung",
25
+ "incidentState.new": "Neu",
26
+ "incidentState.inProgress": "In Bearbeitung",
27
+ "incidentState.onHold": "Wartend",
28
+ "incidentState.resolved": "Gel\xF6st",
29
+ "incidentState.closed": "Geschlossen",
30
+ "incidentState.cancelled": "Abgebrochen",
31
+ "errors.loadingIncidents": "Fehler beim Laden der Vorf\xE4lle: {{error}}",
32
+ "actions.openInServicenow": "In ServiceNow \xF6ffnen"
33
+ }
34
+ });
35
+
36
+ export { servicenowTranslationDe as default };
37
+ //# sourceMappingURL=de.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de.esm.js","sources":["../../src/translations/de.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\nconst servicenowTranslationDe = createTranslationMessages({\n ref: servicenowTranslationRef,\n messages: {\n 'page.title': 'ServiceNow Tickets',\n 'page.titleWithCount': 'ServiceNow Tickets ({{count}})',\n 'table.searchPlaceholder': 'Suchen',\n 'table.labelRowsSelect': '{{count}} Zeilen',\n 'table.columns.incidentNumber': 'Vorfallnummer',\n 'table.columns.description': 'Beschreibung',\n 'table.columns.created': 'Erstellt',\n 'table.columns.priority': 'Priorität',\n 'table.columns.state': 'Status',\n 'table.columns.actions': 'Aktionen',\n 'table.emptyContent': 'Keine Einträge gefunden',\n 'filter.state': 'Status',\n 'filter.priority': 'Priorität',\n 'priority.critical': 'Kritisch',\n 'priority.high': 'Hoch',\n 'priority.moderate': 'Mittel',\n 'priority.low': 'Niedrig',\n 'priority.planning': 'Planung',\n 'incidentState.new': 'Neu',\n 'incidentState.inProgress': 'In Bearbeitung',\n 'incidentState.onHold': 'Wartend',\n 'incidentState.resolved': 'Gelöst',\n 'incidentState.closed': 'Geschlossen',\n 'incidentState.cancelled': 'Abgebrochen',\n 'errors.loadingIncidents': 'Fehler beim Laden der Vorfälle: {{error}}',\n 'actions.openInServicenow': 'In ServiceNow öffnen',\n },\n});\n\nexport default servicenowTranslationDe;\n"],"names":[],"mappings":";;;AAkBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,oBAAA;AAAA,IACd,qBAAuB,EAAA,gCAAA;AAAA,IACvB,yBAA2B,EAAA,QAAA;AAAA,IAC3B,uBAAyB,EAAA,kBAAA;AAAA,IACzB,8BAAgC,EAAA,eAAA;AAAA,IAChC,2BAA6B,EAAA,cAAA;AAAA,IAC7B,uBAAyB,EAAA,UAAA;AAAA,IACzB,wBAA0B,EAAA,cAAA;AAAA,IAC1B,qBAAuB,EAAA,QAAA;AAAA,IACvB,uBAAyB,EAAA,UAAA;AAAA,IACzB,oBAAsB,EAAA,4BAAA;AAAA,IACtB,cAAgB,EAAA,QAAA;AAAA,IAChB,iBAAmB,EAAA,cAAA;AAAA,IACnB,mBAAqB,EAAA,UAAA;AAAA,IACrB,eAAiB,EAAA,MAAA;AAAA,IACjB,mBAAqB,EAAA,QAAA;AAAA,IACrB,cAAgB,EAAA,SAAA;AAAA,IAChB,mBAAqB,EAAA,SAAA;AAAA,IACrB,mBAAqB,EAAA,KAAA;AAAA,IACrB,0BAA4B,EAAA,gBAAA;AAAA,IAC5B,sBAAwB,EAAA,SAAA;AAAA,IACxB,wBAA0B,EAAA,WAAA;AAAA,IAC1B,sBAAwB,EAAA,aAAA;AAAA,IACxB,yBAA2B,EAAA,aAAA;AAAA,IAC3B,yBAA2B,EAAA,8CAAA;AAAA,IAC3B,0BAA4B,EAAA;AAAA;AAEhC,CAAC;;;;"}
@@ -0,0 +1,37 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { servicenowTranslationRef } from './ref.esm.js';
3
+
4
+ const servicenowTranslationEs = createTranslationMessages({
5
+ ref: servicenowTranslationRef,
6
+ messages: {
7
+ "page.title": "Tickets de ServiceNow",
8
+ "page.titleWithCount": "Tickets de ServiceNow ({{count}})",
9
+ "table.searchPlaceholder": "Buscar",
10
+ "table.labelRowsSelect": "{{count}} filas",
11
+ "table.columns.incidentNumber": "N\xFAmero de incidente",
12
+ "table.columns.description": "Descripci\xF3n",
13
+ "table.columns.created": "Creado",
14
+ "table.columns.priority": "Prioridad",
15
+ "table.columns.state": "Estado",
16
+ "table.columns.actions": "Acciones",
17
+ "table.emptyContent": "No se encontraron registros",
18
+ "filter.state": "Estado",
19
+ "filter.priority": "Prioridad",
20
+ "priority.critical": "Cr\xEDtica",
21
+ "priority.high": "Alta",
22
+ "priority.moderate": "Moderada",
23
+ "priority.low": "Baja",
24
+ "priority.planning": "Planificaci\xF3n",
25
+ "incidentState.new": "Nuevo",
26
+ "incidentState.inProgress": "En progreso",
27
+ "incidentState.onHold": "En espera",
28
+ "incidentState.resolved": "Resuelto",
29
+ "incidentState.closed": "Cerrado",
30
+ "incidentState.cancelled": "Cancelado",
31
+ "errors.loadingIncidents": "Error al cargar incidentes: {{error}}",
32
+ "actions.openInServicenow": "Abrir en ServiceNow"
33
+ }
34
+ });
35
+
36
+ export { servicenowTranslationEs as default };
37
+ //# sourceMappingURL=es.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\nconst servicenowTranslationEs = createTranslationMessages({\n ref: servicenowTranslationRef,\n messages: {\n 'page.title': 'Tickets de ServiceNow',\n 'page.titleWithCount': 'Tickets de ServiceNow ({{count}})',\n 'table.searchPlaceholder': 'Buscar',\n 'table.labelRowsSelect': '{{count}} filas',\n 'table.columns.incidentNumber': 'Número de incidente',\n 'table.columns.description': 'Descripción',\n 'table.columns.created': 'Creado',\n 'table.columns.priority': 'Prioridad',\n 'table.columns.state': 'Estado',\n 'table.columns.actions': 'Acciones',\n 'table.emptyContent': 'No se encontraron registros',\n 'filter.state': 'Estado',\n 'filter.priority': 'Prioridad',\n 'priority.critical': 'Crítica',\n 'priority.high': 'Alta',\n 'priority.moderate': 'Moderada',\n 'priority.low': 'Baja',\n 'priority.planning': 'Planificación',\n 'incidentState.new': 'Nuevo',\n 'incidentState.inProgress': 'En progreso',\n 'incidentState.onHold': 'En espera',\n 'incidentState.resolved': 'Resuelto',\n 'incidentState.closed': 'Cerrado',\n 'incidentState.cancelled': 'Cancelado',\n 'errors.loadingIncidents': 'Error al cargar incidentes: {{error}}',\n 'actions.openInServicenow': 'Abrir en ServiceNow',\n },\n});\n\nexport default servicenowTranslationEs;\n"],"names":[],"mappings":";;;AAkBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,uBAAA;AAAA,IACd,qBAAuB,EAAA,mCAAA;AAAA,IACvB,yBAA2B,EAAA,QAAA;AAAA,IAC3B,uBAAyB,EAAA,iBAAA;AAAA,IACzB,8BAAgC,EAAA,wBAAA;AAAA,IAChC,2BAA6B,EAAA,gBAAA;AAAA,IAC7B,uBAAyB,EAAA,QAAA;AAAA,IACzB,wBAA0B,EAAA,WAAA;AAAA,IAC1B,qBAAuB,EAAA,QAAA;AAAA,IACvB,uBAAyB,EAAA,UAAA;AAAA,IACzB,oBAAsB,EAAA,6BAAA;AAAA,IACtB,cAAgB,EAAA,QAAA;AAAA,IAChB,iBAAmB,EAAA,WAAA;AAAA,IACnB,mBAAqB,EAAA,YAAA;AAAA,IACrB,eAAiB,EAAA,MAAA;AAAA,IACjB,mBAAqB,EAAA,UAAA;AAAA,IACrB,cAAgB,EAAA,MAAA;AAAA,IAChB,mBAAqB,EAAA,kBAAA;AAAA,IACrB,mBAAqB,EAAA,OAAA;AAAA,IACrB,0BAA4B,EAAA,aAAA;AAAA,IAC5B,sBAAwB,EAAA,WAAA;AAAA,IACxB,wBAA0B,EAAA,UAAA;AAAA,IAC1B,sBAAwB,EAAA,SAAA;AAAA,IACxB,yBAA2B,EAAA,WAAA;AAAA,IAC3B,yBAA2B,EAAA,uCAAA;AAAA,IAC3B,0BAA4B,EAAA;AAAA;AAEhC,CAAC;;;;"}
@@ -0,0 +1,37 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { servicenowTranslationRef } from './ref.esm.js';
3
+
4
+ const servicenowTranslationFr = createTranslationMessages({
5
+ ref: servicenowTranslationRef,
6
+ messages: {
7
+ "page.title": "Tickets ServiceNow",
8
+ "page.titleWithCount": "Tickets ServiceNow ({{count}})",
9
+ "table.searchPlaceholder": "Rechercher",
10
+ "table.labelRowsSelect": "{{count}} lignes",
11
+ "table.columns.incidentNumber": "Num\xE9ro d'incident",
12
+ "table.columns.description": "Description",
13
+ "table.columns.created": "Cr\xE9\xE9",
14
+ "table.columns.priority": "Priorit\xE9",
15
+ "table.columns.state": "\xC9tat",
16
+ "table.columns.actions": "Actions",
17
+ "table.emptyContent": "Aucun enregistrement trouv\xE9",
18
+ "filter.state": "\xC9tat",
19
+ "filter.priority": "Priorit\xE9",
20
+ "priority.critical": "Critique",
21
+ "priority.high": "\xC9lev\xE9e",
22
+ "priority.moderate": "Mod\xE9r\xE9e",
23
+ "priority.low": "Basse",
24
+ "priority.planning": "Planification",
25
+ "incidentState.new": "Nouveau",
26
+ "incidentState.inProgress": "En cours",
27
+ "incidentState.onHold": "En attente",
28
+ "incidentState.resolved": "R\xE9solu",
29
+ "incidentState.closed": "Ferm\xE9",
30
+ "incidentState.cancelled": "Annul\xE9",
31
+ "errors.loadingIncidents": "Erreur lors du chargement des incidents: {{error}}",
32
+ "actions.openInServicenow": "Ouvrir dans ServiceNow"
33
+ }
34
+ });
35
+
36
+ export { servicenowTranslationFr as default };
37
+ //# sourceMappingURL=fr.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\nconst servicenowTranslationFr = createTranslationMessages({\n ref: servicenowTranslationRef,\n messages: {\n 'page.title': 'Tickets ServiceNow',\n 'page.titleWithCount': 'Tickets ServiceNow ({{count}})',\n 'table.searchPlaceholder': 'Rechercher',\n 'table.labelRowsSelect': '{{count}} lignes',\n 'table.columns.incidentNumber': \"Numéro d'incident\",\n 'table.columns.description': 'Description',\n 'table.columns.created': 'Créé',\n 'table.columns.priority': 'Priorité',\n 'table.columns.state': 'État',\n 'table.columns.actions': 'Actions',\n 'table.emptyContent': 'Aucun enregistrement trouvé',\n 'filter.state': 'État',\n 'filter.priority': 'Priorité',\n 'priority.critical': 'Critique',\n 'priority.high': 'Élevée',\n 'priority.moderate': 'Modérée',\n 'priority.low': 'Basse',\n 'priority.planning': 'Planification',\n 'incidentState.new': 'Nouveau',\n 'incidentState.inProgress': 'En cours',\n 'incidentState.onHold': 'En attente',\n 'incidentState.resolved': 'Résolu',\n 'incidentState.closed': 'Fermé',\n 'incidentState.cancelled': 'Annulé',\n 'errors.loadingIncidents':\n 'Erreur lors du chargement des incidents: {{error}}',\n 'actions.openInServicenow': 'Ouvrir dans ServiceNow',\n },\n});\n\nexport default servicenowTranslationFr;\n"],"names":[],"mappings":";;;AAkBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,oBAAA;AAAA,IACd,qBAAuB,EAAA,gCAAA;AAAA,IACvB,yBAA2B,EAAA,YAAA;AAAA,IAC3B,uBAAyB,EAAA,kBAAA;AAAA,IACzB,8BAAgC,EAAA,sBAAA;AAAA,IAChC,2BAA6B,EAAA,aAAA;AAAA,IAC7B,uBAAyB,EAAA,YAAA;AAAA,IACzB,wBAA0B,EAAA,aAAA;AAAA,IAC1B,qBAAuB,EAAA,SAAA;AAAA,IACvB,uBAAyB,EAAA,SAAA;AAAA,IACzB,oBAAsB,EAAA,gCAAA;AAAA,IACtB,cAAgB,EAAA,SAAA;AAAA,IAChB,iBAAmB,EAAA,aAAA;AAAA,IACnB,mBAAqB,EAAA,UAAA;AAAA,IACrB,eAAiB,EAAA,cAAA;AAAA,IACjB,mBAAqB,EAAA,eAAA;AAAA,IACrB,cAAgB,EAAA,OAAA;AAAA,IAChB,mBAAqB,EAAA,eAAA;AAAA,IACrB,mBAAqB,EAAA,SAAA;AAAA,IACrB,0BAA4B,EAAA,UAAA;AAAA,IAC5B,sBAAwB,EAAA,YAAA;AAAA,IACxB,wBAA0B,EAAA,WAAA;AAAA,IAC1B,sBAAwB,EAAA,UAAA;AAAA,IACxB,yBAA2B,EAAA,WAAA;AAAA,IAC3B,yBACE,EAAA,oDAAA;AAAA,IACF,0BAA4B,EAAA;AAAA;AAEhC,CAAC;;;;"}
@@ -0,0 +1,16 @@
1
+ import { createTranslationResource } from '@backstage/core-plugin-api/alpha';
2
+ import { servicenowTranslationRef } from './ref.esm.js';
3
+
4
+ const servicenowTranslations = createTranslationResource({
5
+ ref: servicenowTranslationRef,
6
+ translations: {
7
+ de: () => import('./de.esm.js'),
8
+ fr: () => import('./fr.esm.js'),
9
+ it: () => import('./it.esm.js'),
10
+ es: () => import('./es.esm.js'),
11
+ ja: () => import('./ja.esm.js')
12
+ }
13
+ });
14
+
15
+ export { servicenowTranslationRef, servicenowTranslations };
16
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/translations/index.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationResource } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\n/**\n * Translation resources for the ServiceNow plugin.\n * @alpha\n */\nexport const servicenowTranslations = createTranslationResource({\n ref: servicenowTranslationRef,\n translations: {\n de: () => import('./de'),\n fr: () => import('./fr'),\n it: () => import('./it'),\n es: () => import('./es'),\n ja: () => import('./ja'),\n },\n});\n\nexport { servicenowTranslationRef };\n"],"names":[],"mappings":";;;AAsBO,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EAC9D,GAAK,EAAA,wBAAA;AAAA,EACL,YAAc,EAAA;AAAA,IACZ,EAAA,EAAI,MAAM,OAAO,aAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,aAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,aAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,aAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,aAAM;AAAA;AAE3B,CAAC;;;;"}
@@ -0,0 +1,37 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { servicenowTranslationRef } from './ref.esm.js';
3
+
4
+ const servicenowTranslationIt = createTranslationMessages({
5
+ ref: servicenowTranslationRef,
6
+ messages: {
7
+ "page.title": "Ticket ServiceNow",
8
+ "page.titleWithCount": "Ticket ServiceNow ({{count}})",
9
+ "table.searchPlaceholder": "Cerca",
10
+ "table.labelRowsSelect": "{{count}} righe",
11
+ "table.columns.incidentNumber": "Numero incidente",
12
+ "table.columns.description": "Descrizione",
13
+ "table.columns.created": "Creato",
14
+ "table.columns.priority": "Priorit\xE0",
15
+ "table.columns.state": "Stato",
16
+ "table.columns.actions": "Azioni",
17
+ "table.emptyContent": "Nessun record trovato",
18
+ "filter.state": "Stato",
19
+ "filter.priority": "Priorit\xE0",
20
+ "priority.critical": "Critica",
21
+ "priority.high": "Alta",
22
+ "priority.moderate": "Moderata",
23
+ "priority.low": "Bassa",
24
+ "priority.planning": "Pianificazione",
25
+ "incidentState.new": "Nuovo",
26
+ "incidentState.inProgress": "In corso",
27
+ "incidentState.onHold": "In attesa",
28
+ "incidentState.resolved": "Risolto",
29
+ "incidentState.closed": "Chiuso",
30
+ "incidentState.cancelled": "Annullato",
31
+ "errors.loadingIncidents": "Errore durante il caricamento degli incidenti: {{error}}",
32
+ "actions.openInServicenow": "Apri in ServiceNow"
33
+ }
34
+ });
35
+
36
+ export { servicenowTranslationIt as default };
37
+ //# sourceMappingURL=it.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"it.esm.js","sources":["../../src/translations/it.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\nconst servicenowTranslationIt = createTranslationMessages({\n ref: servicenowTranslationRef,\n messages: {\n 'page.title': 'Ticket ServiceNow',\n 'page.titleWithCount': 'Ticket ServiceNow ({{count}})',\n 'table.searchPlaceholder': 'Cerca',\n 'table.labelRowsSelect': '{{count}} righe',\n 'table.columns.incidentNumber': 'Numero incidente',\n 'table.columns.description': 'Descrizione',\n 'table.columns.created': 'Creato',\n 'table.columns.priority': 'Priorità',\n 'table.columns.state': 'Stato',\n 'table.columns.actions': 'Azioni',\n 'table.emptyContent': 'Nessun record trovato',\n 'filter.state': 'Stato',\n 'filter.priority': 'Priorità',\n 'priority.critical': 'Critica',\n 'priority.high': 'Alta',\n 'priority.moderate': 'Moderata',\n 'priority.low': 'Bassa',\n 'priority.planning': 'Pianificazione',\n 'incidentState.new': 'Nuovo',\n 'incidentState.inProgress': 'In corso',\n 'incidentState.onHold': 'In attesa',\n 'incidentState.resolved': 'Risolto',\n 'incidentState.closed': 'Chiuso',\n 'incidentState.cancelled': 'Annullato',\n 'errors.loadingIncidents':\n 'Errore durante il caricamento degli incidenti: {{error}}',\n 'actions.openInServicenow': 'Apri in ServiceNow',\n },\n});\n\nexport default servicenowTranslationIt;\n"],"names":[],"mappings":";;;AAkBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,mBAAA;AAAA,IACd,qBAAuB,EAAA,+BAAA;AAAA,IACvB,yBAA2B,EAAA,OAAA;AAAA,IAC3B,uBAAyB,EAAA,iBAAA;AAAA,IACzB,8BAAgC,EAAA,kBAAA;AAAA,IAChC,2BAA6B,EAAA,aAAA;AAAA,IAC7B,uBAAyB,EAAA,QAAA;AAAA,IACzB,wBAA0B,EAAA,aAAA;AAAA,IAC1B,qBAAuB,EAAA,OAAA;AAAA,IACvB,uBAAyB,EAAA,QAAA;AAAA,IACzB,oBAAsB,EAAA,uBAAA;AAAA,IACtB,cAAgB,EAAA,OAAA;AAAA,IAChB,iBAAmB,EAAA,aAAA;AAAA,IACnB,mBAAqB,EAAA,SAAA;AAAA,IACrB,eAAiB,EAAA,MAAA;AAAA,IACjB,mBAAqB,EAAA,UAAA;AAAA,IACrB,cAAgB,EAAA,OAAA;AAAA,IAChB,mBAAqB,EAAA,gBAAA;AAAA,IACrB,mBAAqB,EAAA,OAAA;AAAA,IACrB,0BAA4B,EAAA,UAAA;AAAA,IAC5B,sBAAwB,EAAA,WAAA;AAAA,IACxB,wBAA0B,EAAA,SAAA;AAAA,IAC1B,sBAAwB,EAAA,QAAA;AAAA,IACxB,yBAA2B,EAAA,WAAA;AAAA,IAC3B,yBACE,EAAA,0DAAA;AAAA,IACF,0BAA4B,EAAA;AAAA;AAEhC,CAAC;;;;"}
@@ -0,0 +1,37 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { servicenowTranslationRef } from './ref.esm.js';
3
+
4
+ const servicenowTranslationJa = createTranslationMessages({
5
+ ref: servicenowTranslationRef,
6
+ messages: {
7
+ "page.title": "ServiceNow\u30C1\u30B1\u30C3\u30C8",
8
+ "page.titleWithCount": "ServiceNow\u30C1\u30B1\u30C3\u30C8 ({{count}})",
9
+ "table.searchPlaceholder": "\u691C\u7D22",
10
+ "table.labelRowsSelect": "{{count}} \u884C",
11
+ "table.columns.incidentNumber": "\u30A4\u30F3\u30B7\u30C7\u30F3\u30C8\u756A\u53F7",
12
+ "table.columns.description": "\u8AAC\u660E",
13
+ "table.columns.created": "\u4F5C\u6210\u65E5\u6642",
14
+ "table.columns.priority": "\u512A\u5148\u5EA6",
15
+ "table.columns.state": "\u72B6\u614B",
16
+ "table.columns.actions": "\u30A2\u30AF\u30B7\u30E7\u30F3",
17
+ "table.emptyContent": "\u30EC\u30B3\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
18
+ "filter.state": "\u72B6\u614B",
19
+ "filter.priority": "\u512A\u5148\u5EA6",
20
+ "priority.critical": "\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB",
21
+ "priority.high": "\u9AD8",
22
+ "priority.moderate": "\u4E2D",
23
+ "priority.low": "\u4F4E",
24
+ "priority.planning": "\u8A08\u753B\u4E2D",
25
+ "incidentState.new": "\u65B0\u898F",
26
+ "incidentState.inProgress": "\u5BFE\u5FDC\u4E2D",
27
+ "incidentState.onHold": "\u4FDD\u7559\u4E2D",
28
+ "incidentState.resolved": "\u89E3\u6C7A\u6E08\u307F",
29
+ "incidentState.closed": "\u30AF\u30ED\u30FC\u30BA",
30
+ "incidentState.cancelled": "\u30AD\u30E3\u30F3\u30BB\u30EB",
31
+ "errors.loadingIncidents": "\u30A4\u30F3\u30B7\u30C7\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u30A8\u30E9\u30FC: {{error}}",
32
+ "actions.openInServicenow": "ServiceNow\u3067\u958B\u304F"
33
+ }
34
+ });
35
+
36
+ export { servicenowTranslationJa as default };
37
+ //# sourceMappingURL=ja.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\nconst servicenowTranslationJa = createTranslationMessages({\n ref: servicenowTranslationRef,\n messages: {\n 'page.title': 'ServiceNowチケット',\n 'page.titleWithCount': 'ServiceNowチケット ({{count}})',\n 'table.searchPlaceholder': '検索',\n 'table.labelRowsSelect': '{{count}} 行',\n 'table.columns.incidentNumber': 'インシデント番号',\n 'table.columns.description': '説明',\n 'table.columns.created': '作成日時',\n 'table.columns.priority': '優先度',\n 'table.columns.state': '状態',\n 'table.columns.actions': 'アクション',\n 'table.emptyContent': 'レコードが見つかりません',\n 'filter.state': '状態',\n 'filter.priority': '優先度',\n 'priority.critical': 'クリティカル',\n 'priority.high': '高',\n 'priority.moderate': '中',\n 'priority.low': '低',\n 'priority.planning': '計画中',\n 'incidentState.new': '新規',\n 'incidentState.inProgress': '対応中',\n 'incidentState.onHold': '保留中',\n 'incidentState.resolved': '解決済み',\n 'incidentState.closed': 'クローズ',\n 'incidentState.cancelled': 'キャンセル',\n 'errors.loadingIncidents': 'インシデントの読み込みエラー: {{error}}',\n 'actions.openInServicenow': 'ServiceNowで開く',\n },\n});\n\nexport default servicenowTranslationJa;\n"],"names":[],"mappings":";;;AAkBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,oCAAA;AAAA,IACd,qBAAuB,EAAA,gDAAA;AAAA,IACvB,yBAA2B,EAAA,cAAA;AAAA,IAC3B,uBAAyB,EAAA,kBAAA;AAAA,IACzB,8BAAgC,EAAA,kDAAA;AAAA,IAChC,2BAA6B,EAAA,cAAA;AAAA,IAC7B,uBAAyB,EAAA,0BAAA;AAAA,IACzB,wBAA0B,EAAA,oBAAA;AAAA,IAC1B,qBAAuB,EAAA,cAAA;AAAA,IACvB,uBAAyB,EAAA,gCAAA;AAAA,IACzB,oBAAsB,EAAA,0EAAA;AAAA,IACtB,cAAgB,EAAA,cAAA;AAAA,IAChB,iBAAmB,EAAA,oBAAA;AAAA,IACnB,mBAAqB,EAAA,sCAAA;AAAA,IACrB,eAAiB,EAAA,QAAA;AAAA,IACjB,mBAAqB,EAAA,QAAA;AAAA,IACrB,cAAgB,EAAA,QAAA;AAAA,IAChB,mBAAqB,EAAA,oBAAA;AAAA,IACrB,mBAAqB,EAAA,cAAA;AAAA,IACrB,0BAA4B,EAAA,oBAAA;AAAA,IAC5B,sBAAwB,EAAA,oBAAA;AAAA,IACxB,wBAA0B,EAAA,0BAAA;AAAA,IAC1B,sBAAwB,EAAA,0BAAA;AAAA,IACxB,yBAA2B,EAAA,gCAAA;AAAA,IAC3B,yBAA2B,EAAA,iGAAA;AAAA,IAC3B,0BAA4B,EAAA;AAAA;AAEhC,CAAC;;;;"}