@backstage-community/plugin-servicenow 1.9.0 → 1.11.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 (41) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/alpha/plugin.esm.js.map +1 -1
  3. package/dist/alpha.d.ts +20 -25
  4. package/dist/alpha.esm.js +1 -1
  5. package/dist/api/ServiceNowBackendClient.esm.js.map +1 -1
  6. package/dist/components/Router.esm.js.map +1 -1
  7. package/dist/components/Servicenow/ClosedIcon.esm.js.map +1 -1
  8. package/dist/components/Servicenow/CustomSvgIcon.esm.js.map +1 -1
  9. package/dist/components/Servicenow/EntityServicenowContent.esm.js +1 -1
  10. package/dist/components/Servicenow/EntityServicenowContent.esm.js.map +1 -1
  11. package/dist/components/Servicenow/InProgressIcon.esm.js.map +1 -1
  12. package/dist/components/Servicenow/IncidentsFilter.esm.js.map +1 -1
  13. package/dist/components/Servicenow/IncidentsListColumns.esm.js.map +1 -1
  14. package/dist/components/Servicenow/IncidentsTableBody.esm.js.map +1 -1
  15. package/dist/components/Servicenow/IncidentsTableHeader.esm.js.map +1 -1
  16. package/dist/components/Servicenow/IncidentsTableRow.esm.js.map +1 -1
  17. package/dist/components/Servicenow/ModerateIcon.esm.js.map +1 -1
  18. package/dist/components/Servicenow/index.esm.js +5 -1
  19. package/dist/components/Servicenow/index.esm.js.map +1 -1
  20. package/dist/components/shared-components/IncidentEnumFilter.esm.js.map +1 -1
  21. package/dist/hooks/useDebouncedValue.esm.js.map +1 -1
  22. package/dist/hooks/useQueryArrayFilter.esm.js.map +1 -1
  23. package/dist/hooks/useQueryArrayState.esm.js.map +1 -1
  24. package/dist/hooks/useQueryHelpers.esm.js.map +1 -1
  25. package/dist/hooks/useQueryState.esm.js.map +1 -1
  26. package/dist/hooks/useTranslation.esm.js.map +1 -1
  27. package/dist/hooks/useUserEmail.esm.js.map +1 -1
  28. package/dist/plugin.esm.js.map +1 -1
  29. package/dist/routes.esm.js.map +1 -1
  30. package/dist/translations/de.esm.js.map +1 -1
  31. package/dist/translations/es.esm.js.map +1 -1
  32. package/dist/translations/fr.esm.js.map +1 -1
  33. package/dist/translations/index.esm.js.map +1 -1
  34. package/dist/translations/it.esm.js.map +1 -1
  35. package/dist/translations/ja.esm.js.map +1 -1
  36. package/dist/translations/ref.esm.js.map +1 -1
  37. package/dist/types.esm.js.map +1 -1
  38. package/dist/utils/incidentUtils.esm.js.map +1 -1
  39. package/dist/utils/queryParamsUtils.esm.js.map +1 -1
  40. package/dist/utils/stringUtils.esm.js.map +1 -1
  41. package/package.json +16 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @backstage-community/plugin-servicenow
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8754ccb: Backstage version bump to v1.50.2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [8754ccb]
12
+ - @backstage-community/plugin-servicenow-common@1.10.0
13
+
14
+ ## 1.10.0
15
+
16
+ ### Minor Changes
17
+
18
+ - a229130: Backstage version bump to v1.49.2
19
+
20
+ ### Patch Changes
21
+
22
+ - 0467b33: Updated dependency `@testing-library/react` to `^16.0.0`.
23
+ Updated dependency `@testing-library/dom` to `10.4.1`.
24
+ Updated dependency `@testing-library/jest-dom` to `^6.0.0`.
25
+ - Updated dependencies [a229130]
26
+ - @backstage-community/plugin-servicenow-common@1.9.0
27
+
3
28
  ## 1.9.0
4
29
 
5
30
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.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 {\n ApiBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport {\n serviceNowApiRef,\n ServiceNowBackendClient,\n} from '../api/ServiceNowBackendClient';\n\nimport { isServicenowAvailable } from '@backstage-community/plugin-servicenow-common';\n\n/** @alpha */\nexport const servicenowApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\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\n/**\n * Servicenow entity content that shows an incident table with a\n * filter similar to the catalog table\n * @alpha\n */\nexport const entityServicenowContent = EntityContentBlueprint.make({\n name: 'EntityServicenowContent',\n params: {\n path: 'servicenow',\n title: 'ServiceNow',\n filter: isServicenowAvailable,\n loader: () =>\n import('../components/Servicenow').then(m => (\n <m.EntityServicenowContent />\n )),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'servicenow',\n extensions: [servicenowApi, entityServicenowContent],\n});\n\n/**\n * @alpha\n * Translation resources for the ServiceNow plugin\n */\nexport * from '../translations';\n"],"names":[],"mappings":";;;;;;;AAgCa,MAAA,aAAA,GAAgB,aAAa,IAAK,CAAA;AAAA,EAC7C,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,IACX,GAAK,EAAA,gBAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,QAAU,EAAA,WAAA;AAAA,MACV,WAAa,EAAA;AAAA,KACf;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EAAU,WAAY,EAAA,KAC9C,IAAI,uBAAA,CAAwB,YAAc,EAAA,QAAA,EAAU,WAAW;AAAA,GAClE;AACL,CAAC;AAOY,MAAA,uBAAA,GAA0B,uBAAuB,IAAK,CAAA;AAAA,EACjE,IAAM,EAAA,yBAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,IACN,KAAO,EAAA,YAAA;AAAA,IACP,MAAQ,EAAA,qBAAA;AAAA,IACR,MAAA,EAAQ,MACN,OAAO,uCAA0B,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBACrC,GAAA,CAAA,CAAA,CAAE,uBAAF,EAAA,EAA0B,CAC5B;AAAA;AAEP,CAAC;AAGD,aAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,YAAA;AAAA,EACV,UAAA,EAAY,CAAC,aAAA,EAAe,uBAAuB;AACrD,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.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 {\n ApiBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport {\n serviceNowApiRef,\n ServiceNowBackendClient,\n} from '../api/ServiceNowBackendClient';\n\nimport { isServicenowAvailable } from '@backstage-community/plugin-servicenow-common';\n\n/** @alpha */\nexport const servicenowApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\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\n/**\n * Servicenow entity content that shows an incident table with a\n * filter similar to the catalog table\n * @alpha\n */\nexport const entityServicenowContent = EntityContentBlueprint.make({\n name: 'EntityServicenowContent',\n params: {\n path: 'servicenow',\n title: 'ServiceNow',\n filter: isServicenowAvailable,\n loader: () =>\n import('../components/Servicenow').then(m => (\n <m.EntityServicenowContent />\n )),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'servicenow',\n extensions: [servicenowApi, entityServicenowContent],\n});\n\n/**\n * @alpha\n * Translation resources for the ServiceNow plugin\n */\nexport * from '../translations';\n"],"names":[],"mappings":";;;;;;;AAgCO,MAAM,aAAA,GAAgB,aAAa,IAAA,CAAK;AAAA,EAC7C,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,gBAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,YAAA,EAAc,eAAA;AAAA,MACd,QAAA,EAAU,WAAA;AAAA,MACV,WAAA,EAAa;AAAA,KACf;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAU,WAAA,EAAY,KAC9C,IAAI,uBAAA,CAAwB,YAAA,EAAc,QAAA,EAAU,WAAW;AAAA,GAClE;AACL,CAAC;AAOM,MAAM,uBAAA,GAA0B,uBAAuB,IAAA,CAAK;AAAA,EACjE,IAAA,EAAM,yBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,YAAA;AAAA,IACN,KAAA,EAAO,YAAA;AAAA,IACP,MAAA,EAAQ,qBAAA;AAAA,IACR,MAAA,EAAQ,MACN,OAAO,uCAA0B,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBACtC,GAAA,CAAC,CAAA,CAAE,uBAAA,EAAF,EAA0B,CAC5B;AAAA;AAEP,CAAC;AAGD,aAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,YAAA;AAAA,EACV,UAAA,EAAY,CAAC,aAAA,EAAe,uBAAuB;AACrD,CAAC,CAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _backstage_catalog_model from '@backstage/catalog-model';
3
2
  import * as react from 'react';
4
3
  import * as _backstage_filter_predicates from '@backstage/filter-predicates';
@@ -51,9 +50,7 @@ declare const servicenowApi: _backstage_frontend_plugin_api.OverridableExtension
51
50
  configInput: {};
52
51
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
53
52
  inputs: {};
54
- params: <TApi, TImpl extends TApi, TDeps extends {
55
- [x: string]: unknown;
56
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
53
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
57
54
  }>;
58
55
  /**
59
56
  * Servicenow entity content that shows an incident table with a
@@ -71,9 +68,9 @@ declare const entityServicenowContent: _backstage_frontend_plugin_api.Overridabl
71
68
  icon: string | undefined;
72
69
  };
73
70
  configInput: {
74
- filter?: _backstage_filter_predicates.FilterPredicate | undefined;
75
- title?: string | undefined;
76
71
  path?: string | undefined;
72
+ title?: string | undefined;
73
+ filter?: _backstage_filter_predicates.FilterPredicate | undefined;
77
74
  group?: string | false | undefined;
78
75
  icon?: string | undefined;
79
76
  };
@@ -90,16 +87,16 @@ declare const entityServicenowContent: _backstage_frontend_plugin_api.Overridabl
90
87
  }>;
91
88
  inputs: {};
92
89
  params: {
93
- defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
90
+ defaultPath?: [Error: `Use the 'path' param instead`];
94
91
  path: string;
95
- defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
92
+ defaultTitle?: [Error: `Use the 'title' param instead`];
96
93
  title: string;
97
- defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
98
- group?: (string & {}) | "overview" | "documentation" | "development" | "deployment" | "operation" | "observability" | undefined;
99
- icon?: string | react.ReactElement<any, string | react.JSXElementConstructor<any>> | undefined;
94
+ defaultGroup?: [Error: `Use the 'group' param instead`];
95
+ group?: ("overview" | "documentation" | "development" | "deployment" | "operation" | "observability") | (string & {});
96
+ icon?: string | react.ReactElement;
100
97
  loader: () => Promise<JSX.Element>;
101
- routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
102
- filter?: _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
98
+ routeRef?: _backstage_frontend_plugin_api.RouteRef;
99
+ filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
103
100
  };
104
101
  }>;
105
102
  /** @alpha */
@@ -111,9 +108,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
111
108
  configInput: {};
112
109
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
113
110
  inputs: {};
114
- params: <TApi, TImpl extends TApi, TDeps extends {
115
- [x: string]: unknown;
116
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
111
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
117
112
  }>;
118
113
  "entity-content:servicenow/EntityServicenowContent": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
119
114
  kind: "entity-content";
@@ -126,9 +121,9 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
126
121
  icon: string | undefined;
127
122
  };
128
123
  configInput: {
129
- filter?: _backstage_filter_predicates.FilterPredicate | undefined;
130
- title?: string | undefined;
131
124
  path?: string | undefined;
125
+ title?: string | undefined;
126
+ filter?: _backstage_filter_predicates.FilterPredicate | undefined;
132
127
  group?: string | false | undefined;
133
128
  icon?: string | undefined;
134
129
  };
@@ -145,16 +140,16 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
145
140
  }>;
146
141
  inputs: {};
147
142
  params: {
148
- defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
143
+ defaultPath?: [Error: `Use the 'path' param instead`];
149
144
  path: string;
150
- defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
145
+ defaultTitle?: [Error: `Use the 'title' param instead`];
151
146
  title: string;
152
- defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
153
- group?: (string & {}) | "overview" | "documentation" | "development" | "deployment" | "operation" | "observability" | undefined;
154
- icon?: string | react.ReactElement<any, string | react.JSXElementConstructor<any>> | undefined;
147
+ defaultGroup?: [Error: `Use the 'group' param instead`];
148
+ group?: ("overview" | "documentation" | "development" | "deployment" | "operation" | "observability") | (string & {});
149
+ icon?: string | react.ReactElement;
155
150
  loader: () => Promise<JSX.Element>;
156
- routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
157
- filter?: _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
151
+ routeRef?: _backstage_frontend_plugin_api.RouteRef;
152
+ filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
158
153
  };
159
154
  }>;
160
155
  }>;
package/dist/alpha.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default, entityServicenowContent, servicenowApi } from './alpha/plugin.esm.js';
2
- export { servicenowTranslations } from './translations/index.esm.js';
3
2
  export { servicenowTranslationRef } from './translations/ref.esm.js';
3
+ export { servicenowTranslations } from './translations/index.esm.js';
4
4
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceNowBackendClient.esm.js","sources":["../../src/api/ServiceNowBackendClient.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 { IncidentPick } from '@backstage-community/plugin-servicenow-common';\nimport {\n createApiRef,\n DiscoveryApi,\n FetchApi,\n IdentityApi,\n} from '@backstage/core-plugin-api';\nimport { IncidentsData, PaginatedIncidentsData } from '../types';\n\nexport interface ServiceNowBackendAPI {\n getIncidents(queryParams: URLSearchParams): Promise<PaginatedIncidentsData>;\n}\n\nexport const serviceNowApiRef = createApiRef<ServiceNowBackendAPI>({\n id: 'plugin.servicenow.service',\n});\n\nexport class ServiceNowBackendClient implements ServiceNowBackendAPI {\n constructor(\n private readonly discoveryApi: DiscoveryApi,\n private readonly fetchApi: FetchApi,\n private readonly identityApi: IdentityApi,\n ) {}\n\n private async fetchFromServiceNow<T>(\n path: string,\n queryParams?: URLSearchParams,\n ): Promise<{ items: T; totalCount: number }> {\n const proxyBase = await this.discoveryApi.getBaseUrl('servicenow');\n const url = `${proxyBase}${path}${queryParams ? `?${queryParams}` : ''}`;\n\n const { token } = await this.identityApi.getCredentials();\n const headers = {\n Authorization: `Bearer ${token}`,\n };\n\n const response = await this.fetchApi.fetch(url, { headers });\n if (!response.ok) {\n let errorBody;\n try {\n errorBody = await response.json();\n } catch (e) {\n throw new Error(\n `ServiceNow API request failed: ${response.status} - Could not parse error response.`,\n );\n }\n\n const errorMessage =\n errorBody?.error?.message ??\n `ServiceNow API request failed: ${response.status}`;\n throw new Error(errorMessage);\n }\n\n return (await response.json()) as { items: T; totalCount: number };\n }\n\n async getIncidents(\n queryParams: URLSearchParams,\n ): Promise<PaginatedIncidentsData> {\n const { items, totalCount } = await this.fetchFromServiceNow<\n IncidentPick[]\n >('/incidents', queryParams);\n\n const incidents = incidentsPickToIncidentsData(items);\n return { incidents, totalCount };\n }\n}\n\nexport function incidentsPickToIncidentsData(\n data: IncidentPick[],\n): IncidentsData[] {\n return data.map(item => ({\n sysId: item.sys_id,\n number: item.number,\n shortDescription: item.short_description,\n description: item.description,\n sysCreatedOn: item.sys_created_on,\n priority: item.priority,\n incidentState: item.incident_state,\n url: item.url,\n }));\n}\n"],"names":[],"mappings":";;AA4BO,MAAM,mBAAmB,YAAmC,CAAA;AAAA,EACjE,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,uBAAwD,CAAA;AAAA,EACnE,WAAA,CACmB,YACA,EAAA,QAAA,EACA,WACjB,EAAA;AAHiB,IAAA,IAAA,CAAA,YAAA,GAAA,YAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AAAA;AAChB,EAEH,MAAc,mBACZ,CAAA,IAAA,EACA,WAC2C,EAAA;AAC3C,IAAA,MAAM,SAAY,GAAA,MAAM,IAAK,CAAA,YAAA,CAAa,WAAW,YAAY,CAAA;AACjE,IAAM,MAAA,GAAA,GAAM,CAAG,EAAA,SAAS,CAAG,EAAA,IAAI,GAAG,WAAc,GAAA,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA;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;AAAA,IACnB,UAAU,IAAK,CAAA,QAAA;AAAA,IACf,eAAe,IAAK,CAAA,cAAA;AAAA,IACpB,KAAK,IAAK,CAAA;AAAA,GACV,CAAA,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"ServiceNowBackendClient.esm.js","sources":["../../src/api/ServiceNowBackendClient.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 { IncidentPick } from '@backstage-community/plugin-servicenow-common';\nimport {\n createApiRef,\n DiscoveryApi,\n FetchApi,\n IdentityApi,\n} from '@backstage/core-plugin-api';\nimport { IncidentsData, PaginatedIncidentsData } from '../types';\n\nexport interface ServiceNowBackendAPI {\n getIncidents(queryParams: URLSearchParams): Promise<PaginatedIncidentsData>;\n}\n\nexport const serviceNowApiRef = createApiRef<ServiceNowBackendAPI>({\n id: 'plugin.servicenow.service',\n});\n\nexport class ServiceNowBackendClient implements ServiceNowBackendAPI {\n constructor(\n private readonly discoveryApi: DiscoveryApi,\n private readonly fetchApi: FetchApi,\n private readonly identityApi: IdentityApi,\n ) {}\n\n private async fetchFromServiceNow<T>(\n path: string,\n queryParams?: URLSearchParams,\n ): Promise<{ items: T; totalCount: number }> {\n const proxyBase = await this.discoveryApi.getBaseUrl('servicenow');\n const url = `${proxyBase}${path}${queryParams ? `?${queryParams}` : ''}`;\n\n const { token } = await this.identityApi.getCredentials();\n const headers = {\n Authorization: `Bearer ${token}`,\n };\n\n const response = await this.fetchApi.fetch(url, { headers });\n if (!response.ok) {\n let errorBody;\n try {\n errorBody = await response.json();\n } catch (e) {\n throw new Error(\n `ServiceNow API request failed: ${response.status} - Could not parse error response.`,\n );\n }\n\n const errorMessage =\n errorBody?.error?.message ??\n `ServiceNow API request failed: ${response.status}`;\n throw new Error(errorMessage);\n }\n\n return (await response.json()) as { items: T; totalCount: number };\n }\n\n async getIncidents(\n queryParams: URLSearchParams,\n ): Promise<PaginatedIncidentsData> {\n const { items, totalCount } = await this.fetchFromServiceNow<\n IncidentPick[]\n >('/incidents', queryParams);\n\n const incidents = incidentsPickToIncidentsData(items);\n return { incidents, totalCount };\n }\n}\n\nexport function incidentsPickToIncidentsData(\n data: IncidentPick[],\n): IncidentsData[] {\n return data.map(item => ({\n sysId: item.sys_id,\n number: item.number,\n shortDescription: item.short_description,\n description: item.description,\n sysCreatedOn: item.sys_created_on,\n priority: item.priority,\n incidentState: item.incident_state,\n url: item.url,\n }));\n}\n"],"names":[],"mappings":";;AA4BO,MAAM,mBAAmB,YAAA,CAAmC;AAAA,EACjE,EAAA,EAAI;AACN,CAAC;AAEM,MAAM,uBAAA,CAAwD;AAAA,EACnE,WAAA,CACmB,YAAA,EACA,QAAA,EACA,WAAA,EACjB;AAHiB,IAAA,IAAA,CAAA,YAAA,GAAA,YAAA;AACA,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AAAA,EAChB;AAAA,EAEH,MAAc,mBAAA,CACZ,IAAA,EACA,WAAA,EAC2C;AAC3C,IAAA,MAAM,SAAA,GAAY,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,YAAY,CAAA;AACjE,IAAA,MAAM,GAAA,GAAM,CAAA,EAAG,SAAS,CAAA,EAAG,IAAI,GAAG,WAAA,GAAc,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA;AAEtE,IAAA,MAAM,EAAE,KAAA,EAAM,GAAI,MAAM,IAAA,CAAK,YAAY,cAAA,EAAe;AACxD,IAAA,MAAM,OAAA,GAAU;AAAA,MACd,aAAA,EA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AAAA,GACZ,CAAE,CAAA;AACJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Router.esm.js","sources":["../../src/components/Router.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 */\nimport { MemoryRouter } from 'react-router-dom';\nimport { EntityServicenowContent } from './Servicenow';\n\n/**\n * separately export the router\n *\n * @public\n */\nexport const Router = () => {\n return (\n <MemoryRouter>\n <EntityServicenowContent />\n </MemoryRouter>\n );\n};\n"],"names":[],"mappings":";;;;AAuBO,MAAM,SAAS,MAAM;AAC1B,EAAA,uBACG,GAAA,CAAA,YAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,uBAAA,EAAA,EAAwB,CAC3B,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Router.esm.js","sources":["../../src/components/Router.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 */\nimport { MemoryRouter } from 'react-router-dom';\nimport { EntityServicenowContent } from './Servicenow';\n\n/**\n * separately export the router\n *\n * @public\n */\nexport const Router = () => {\n return (\n <MemoryRouter>\n <EntityServicenowContent />\n </MemoryRouter>\n );\n};\n"],"names":[],"mappings":";;;;AAuBO,MAAM,SAAS,MAAM;AAC1B,EAAA,uBACE,GAAA,CAAC,YAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,uBAAA,EAAA,EAAwB,CAAA,EAC3B,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ClosedIcon.esm.js","sources":["../../../src/components/Servicenow/ClosedIcon.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 { CustomSvgIcon } from './CustomSvgIcon';\n\nexport const ClosedIcon = (props: any) => (\n <CustomSvgIcon\n viewBox=\"0 0 16 16\"\n path={\n <path d=\"M2.333 8.667c-.278 0-.486-.236-.65-.4-.163-.163-.4-.372-.4-.65s.236-.486.4-.65c.163-.163.372-.4.65-.4h4c.278 0 .486.236.65.4.163.163.4.372.4.65s-.236.486-.4.65c-.163.163-.372.4-.65.4h-4Zm7.333 0c-.278 0-.486-.236-.65-.4-.163-.163-.4-.372-.4-.65s.236-.486.4-.65c.163-.163.372-.4.65-.4h4c.278 0 .486.236.65.4.163.163.4.372.4.65s-.236.486-.4.65c-.163.163-.372.4-.65.4h-4Z\" />\n }\n {...props}\n />\n);\n"],"names":[],"mappings":";;;AAkBa,MAAA,UAAA,GAAa,CAAC,KACzB,qBAAA,GAAA;AAAA,EAAC,aAAA;AAAA,EAAA;AAAA,IACC,OAAQ,EAAA,WAAA;AAAA,IACR,IACE,kBAAA,GAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,kXAAmX,EAAA,CAAA;AAAA,IAE5X,GAAG;AAAA;AACN;;;;"}
1
+ {"version":3,"file":"ClosedIcon.esm.js","sources":["../../../src/components/Servicenow/ClosedIcon.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 { CustomSvgIcon } from './CustomSvgIcon';\n\nexport const ClosedIcon = (props: any) => (\n <CustomSvgIcon\n viewBox=\"0 0 16 16\"\n path={\n <path d=\"M2.333 8.667c-.278 0-.486-.236-.65-.4-.163-.163-.4-.372-.4-.65s.236-.486.4-.65c.163-.163.372-.4.65-.4h4c.278 0 .486.236.65.4.163.163.4.372.4.65s-.236.486-.4.65c-.163.163-.372.4-.65.4h-4Zm7.333 0c-.278 0-.486-.236-.65-.4-.163-.163-.4-.372-.4-.65s.236-.486.4-.65c.163-.163.372-.4.65-.4h4c.278 0 .486.236.65.4.163.163.4.372.4.65s-.236.486-.4.65c-.163.163-.372.4-.65.4h-4Z\" />\n }\n {...props}\n />\n);\n"],"names":[],"mappings":";;;AAkBO,MAAM,UAAA,GAAa,CAAC,KAAA,qBACzB,GAAA;AAAA,EAAC,aAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,kBACE,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,kXAAA,EAAmX,CAAA;AAAA,IAE5X,GAAG;AAAA;AACN;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CustomSvgIcon.esm.js","sources":["../../../src/components/Servicenow/CustomSvgIcon.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 SvgIcon from '@mui/material/SvgIcon';\n\nexport const CustomSvgIcon = ({\n path,\n viewBox = '0 0 24 24',\n ...props\n}: any) => {\n return (\n <SvgIcon viewBox={viewBox} {...props}>\n {path}\n </SvgIcon>\n );\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,IAAA;AAAA,EACA,OAAU,GAAA,WAAA;AAAA,EACV,GAAG;AACL,CAAW,KAAA;AACT,EAAA,uBACG,GAAA,CAAA,OAAA,EAAA,EAAQ,OAAmB,EAAA,GAAG,OAC5B,QACH,EAAA,IAAA,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"CustomSvgIcon.esm.js","sources":["../../../src/components/Servicenow/CustomSvgIcon.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 SvgIcon from '@mui/material/SvgIcon';\n\nexport const CustomSvgIcon = ({\n path,\n viewBox = '0 0 24 24',\n ...props\n}: any) => {\n return (\n <SvgIcon viewBox={viewBox} {...props}>\n {path}\n </SvgIcon>\n );\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,IAAA;AAAA,EACA,OAAA,GAAU,WAAA;AAAA,EACV,GAAG;AACL,CAAA,KAAW;AACT,EAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EAAQ,OAAA,EAAmB,GAAG,OAC5B,QAAA,EAAA,IAAA,EACH,CAAA;AAEJ;;;;"}
@@ -20,7 +20,7 @@ import { useDebouncedValue } from '../../hooks/useDebouncedValue.esm.js';
20
20
  import { useQueryState } from '../../hooks/useQueryState.esm.js';
21
21
  import { useQueryArrayState } from '../../hooks/useQueryArrayState.esm.js';
22
22
  import { serviceNowApiRef } from '../../api/ServiceNowBackendClient.esm.js';
23
- import { useUserEmail } from '../../hooks/useUserEmail.esm.js';
23
+ import useUserEmail from '../../hooks/useUserEmail.esm.js';
24
24
  import { useUpdateQueryParams } from '../../hooks/useQueryHelpers.esm.js';
25
25
  import { useTranslation } from '../../hooks/useTranslation.esm.js';
26
26
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityServicenowContent.esm.js","sources":["../../../src/components/Servicenow/EntityServicenowContent.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 { useEffect, useState, MouseEvent, ChangeEvent, useMemo } from 'react';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport {\n CatalogFilterLayout,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { Table } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TableBody from '@mui/material/TableBody';\nimport TableRow from '@mui/material/TableRow';\nimport TableCell from '@mui/material/TableCell';\nimport TablePagination from '@mui/material/TablePagination';\n\nimport {\n Order,\n SortingOrderEnum,\n} from '@backstage-community/plugin-servicenow-common';\n\nimport { IncidentsFilter } from './IncidentsFilter';\nimport { useIncidentsListColumns } from './IncidentsListColumns';\nimport { IncidentsTableBody } from './IncidentsTableBody';\nimport { IncidentsTableHeader } from './IncidentsTableHeader';\nimport {\n IncidentTableFieldEnum,\n type IncidentsData,\n type IncidentTableField,\n} from '../../types';\nimport { buildIncidentQueryParams } from '../../utils/queryParamsUtils';\nimport { useDebouncedValue } from '../../hooks/useDebouncedValue';\nimport { useQueryState } from '../../hooks/useQueryState';\nimport { useQueryArrayState } from '../../hooks/useQueryArrayState';\nimport { serviceNowApiRef } from '../../api/ServiceNowBackendClient';\nimport useUserEmail from '../../hooks/useUserEmail';\nimport { useUpdateQueryParams } from '../../hooks/useQueryHelpers';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const EntityServicenowContent = () => {\n const { t } = useTranslation();\n const { entity } = useEntity();\n const serviceNowApi = useApi(serviceNowApiRef);\n const incidentsListColumns = useIncidentsListColumns();\n\n const [search, setSearch] = useQueryState<string>('search', '');\n const [input, setInput] = useState(search);\n const debouncedInput = useDebouncedValue(input, 300);\n\n const [order, setOrder] = useQueryState<Order>('order', SortingOrderEnum.Asc);\n const [orderBy, setOrderBy] = useQueryState<IncidentTableField>(\n 'orderBy',\n IncidentTableFieldEnum.Number,\n );\n\n const [rowsPerPage] = useQueryState<number>('limit', 5);\n const [offset, setOffset] = useQueryState<number>('offset', 0);\n const [state] = useQueryArrayState('state', []);\n const [priority] = useQueryArrayState('priority', []);\n\n const pageNumber = Math.floor(offset / rowsPerPage);\n\n const [count, setCount] = useState<number>(0);\n const [incidentsData, setIncidentsData] = useState<IncidentsData[]>([]);\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const updateQueryParams = useUpdateQueryParams();\n\n const servicenowAnnotations = useMemo(() => {\n const annotations = entity.metadata.annotations;\n const snAnnotations: Record<string, string> = {};\n if (annotations) {\n for (const [key, value] of Object.entries(annotations)) {\n if (key.startsWith('servicenow.com/entity-id')) {\n snAnnotations.entityId = value;\n continue;\n }\n if (key.startsWith('servicenow.com/')) {\n const field = key.substring('servicenow.com/'.length);\n snAnnotations[field] = value;\n }\n }\n }\n return snAnnotations;\n }, [entity.metadata.annotations]);\n\n const kind = entity.kind.toLocaleLowerCase('en-US');\n const userEmail = useUserEmail(kind);\n\n const identityApi = useApi(identityApiRef);\n\n useEffect(() => {\n identityApi.getBackstageIdentity().then(identity => {\n if (identity.userEntityRef) {\n localStorage.setItem('userEntityRef', identity.userEntityRef);\n }\n });\n }, [identityApi]);\n\n useEffect(() => {\n if (debouncedInput !== search) {\n setSearch(debouncedInput);\n setOffset(0);\n }\n }, [debouncedInput, search, setSearch, setOffset]);\n\n useEffect(() => {\n async function fetchIncidents() {\n setLoading(true);\n setError(null);\n\n if (!userEmail && Object.keys(servicenowAnnotations).length === 0) {\n setIncidentsData([]);\n setLoading(false);\n return;\n }\n\n try {\n const queryParams = buildIncidentQueryParams({\n limit: rowsPerPage,\n offset,\n order,\n orderBy,\n search: search,\n priority: priority ?? undefined,\n state: state ?? undefined,\n userEmail,\n ...servicenowAnnotations,\n });\n\n const { incidents, totalCount } = await serviceNowApi.getIncidents(\n queryParams,\n );\n setIncidentsData(incidents);\n setCount(totalCount);\n } catch (e) {\n setError((e as Error).message);\n setIncidentsData([]);\n } finally {\n setLoading(false);\n }\n }\n\n fetchIncidents();\n }, [\n rowsPerPage,\n offset,\n order,\n orderBy,\n search,\n serviceNowApi,\n servicenowAnnotations,\n priority,\n state,\n userEmail,\n ]);\n\n const handleRowsPerPageChange = (event: ChangeEvent<HTMLInputElement>) => {\n const newLimit = parseInt(event.target.value, 10);\n updateQueryParams({\n limit: String(newLimit),\n offset: '0',\n });\n };\n\n const handlePageChange = (_event: unknown, page: number) => {\n setOffset(page * rowsPerPage);\n };\n\n const handleRequestSort = (\n _event: MouseEvent<unknown>,\n property: IncidentTableField,\n ) => {\n const isAsc = orderBy === property && order === SortingOrderEnum.Asc;\n setOrder(isAsc ? SortingOrderEnum.Desc : SortingOrderEnum.Asc);\n setOrderBy(property);\n setOffset(0);\n };\n\n const handleSearch = (str: string) => {\n setInput(str);\n };\n\n const IncidentsTableHeaderComponent = () => (\n <IncidentsTableHeader\n order={order}\n orderBy={orderBy}\n onRequestSort={handleRequestSort}\n />\n );\n\n const IncidentsTableBodyComponent = () =>\n loading ? (\n <TableBody>\n <TableRow>\n <TableCell colSpan={incidentsListColumns.length} align=\"center\">\n <Box sx={{ py: 3 }}>\n <CircularProgress />\n </Box>\n </TableCell>\n </TableRow>\n </TableBody>\n ) : (\n <IncidentsTableBody rows={incidentsData} />\n );\n\n const TablePaginationComponent = () => {\n return (\n <TablePagination\n rowsPerPageOptions={[5, 10, 20, 50, 100].map(n => ({\n value: n,\n label: t('table.labelRowsSelect', { count: String(n) }),\n }))}\n component=\"div\"\n sx={{ mr: 1 }}\n count={count ?? 0}\n rowsPerPage={rowsPerPage}\n page={pageNumber}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n labelRowsPerPage={null}\n showFirstButton\n showLastButton\n />\n );\n };\n\n return (\n <Box>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <IncidentsFilter />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n {error ? (\n <Box sx={{ padding: 2, color: 'error.main' }}>\n {t('errors.loadingIncidents', { error })}\n </Box>\n ) : (\n <Table\n data={loading ? [] : incidentsData}\n columns={incidentsListColumns}\n onSearchChange={handleSearch}\n title={\n count === 0\n ? t('page.title')\n : t('page.titleWithCount', { count: String(count) })\n }\n localization={{\n toolbar: { searchPlaceholder: t('table.searchPlaceholder') },\n }}\n components={{\n Header: IncidentsTableHeaderComponent,\n Body: IncidentsTableBodyComponent,\n Pagination: TablePaginationComponent,\n }}\n emptyContent={\n loading ? null : (\n <Box\n data-testid=\"no-incidents-found\"\n sx={{\n padding: 2,\n display: 'flex',\n justif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AAA,aAClB;AAAA,YAEC,YAAE,oBAAoB;AAAA;AAAA,SACzB;AAAA,QAGJ,SAAW,EAAA;AAAA;AAAA,KAGjB,EAAA;AAAA,GAAA,EACF,CACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityServicenowContent.esm.js","sources":["../../../src/components/Servicenow/EntityServicenowContent.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 { useEffect, useState, MouseEvent, ChangeEvent, useMemo } from 'react';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport {\n CatalogFilterLayout,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { Table } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport TableBody from '@mui/material/TableBody';\nimport TableRow from '@mui/material/TableRow';\nimport TableCell from '@mui/material/TableCell';\nimport TablePagination from '@mui/material/TablePagination';\n\nimport {\n Order,\n SortingOrderEnum,\n} from '@backstage-community/plugin-servicenow-common';\n\nimport { IncidentsFilter } from './IncidentsFilter';\nimport { useIncidentsListColumns } from './IncidentsListColumns';\nimport { IncidentsTableBody } from './IncidentsTableBody';\nimport { IncidentsTableHeader } from './IncidentsTableHeader';\nimport {\n IncidentTableFieldEnum,\n type IncidentsData,\n type IncidentTableField,\n} from '../../types';\nimport { buildIncidentQueryParams } from '../../utils/queryParamsUtils';\nimport { useDebouncedValue } from '../../hooks/useDebouncedValue';\nimport { useQueryState } from '../../hooks/useQueryState';\nimport { useQueryArrayState } from '../../hooks/useQueryArrayState';\nimport { serviceNowApiRef } from '../../api/ServiceNowBackendClient';\nimport useUserEmail from '../../hooks/useUserEmail';\nimport { useUpdateQueryParams } from '../../hooks/useQueryHelpers';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const EntityServicenowContent = () => {\n const { t } = useTranslation();\n const { entity } = useEntity();\n const serviceNowApi = useApi(serviceNowApiRef);\n const incidentsListColumns = useIncidentsListColumns();\n\n const [search, setSearch] = useQueryState<string>('search', '');\n const [input, setInput] = useState(search);\n const debouncedInput = useDebouncedValue(input, 300);\n\n const [order, setOrder] = useQueryState<Order>('order', SortingOrderEnum.Asc);\n const [orderBy, setOrderBy] = useQueryState<IncidentTableField>(\n 'orderBy',\n IncidentTableFieldEnum.Number,\n );\n\n const [rowsPerPage] = useQueryState<number>('limit', 5);\n const [offset, setOffset] = useQueryState<number>('offset', 0);\n const [state] = useQueryArrayState('state', []);\n const [priority] = useQueryArrayState('priority', []);\n\n const pageNumber = Math.floor(offset / rowsPerPage);\n\n const [count, setCount] = useState<number>(0);\n const [incidentsData, setIncidentsData] = useState<IncidentsData[]>([]);\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const updateQueryParams = useUpdateQueryParams();\n\n const servicenowAnnotations = useMemo(() => {\n const annotations = entity.metadata.annotations;\n const snAnnotations: Record<string, string> = {};\n if (annotations) {\n for (const [key, value] of Object.entries(annotations)) {\n if (key.startsWith('servicenow.com/entity-id')) {\n snAnnotations.entityId = value;\n continue;\n }\n if (key.startsWith('servicenow.com/')) {\n const field = key.substring('servicenow.com/'.length);\n snAnnotations[field] = value;\n }\n }\n }\n return snAnnotations;\n }, [entity.metadata.annotations]);\n\n const kind = entity.kind.toLocaleLowerCase('en-US');\n const userEmail = useUserEmail(kind);\n\n const identityApi = useApi(identityApiRef);\n\n useEffect(() => {\n identityApi.getBackstageIdentity().then(identity => {\n if (identity.userEntityRef) {\n localStorage.setItem('userEntityRef', identity.userEntityRef);\n }\n });\n }, [identityApi]);\n\n useEffect(() => {\n if (debouncedInput !== search) {\n setSearch(debouncedInput);\n setOffset(0);\n }\n }, [debouncedInput, search, setSearch, setOffset]);\n\n useEffect(() => {\n async function fetchIncidents() {\n setLoading(true);\n setError(null);\n\n if (!userEmail && Object.keys(servicenowAnnotations).length === 0) {\n setIncidentsData([]);\n setLoading(false);\n return;\n }\n\n try {\n const queryParams = buildIncidentQueryParams({\n limit: rowsPerPage,\n offset,\n order,\n orderBy,\n search: search,\n priority: priority ?? undefined,\n state: state ?? undefined,\n userEmail,\n ...servicenowAnnotations,\n });\n\n const { incidents, totalCount } = await serviceNowApi.getIncidents(\n queryParams,\n );\n setIncidentsData(incidents);\n setCount(totalCount);\n } catch (e) {\n setError((e as Error).message);\n setIncidentsData([]);\n } finally {\n setLoading(false);\n }\n }\n\n fetchIncidents();\n }, [\n rowsPerPage,\n offset,\n order,\n orderBy,\n search,\n serviceNowApi,\n servicenowAnnotations,\n priority,\n state,\n userEmail,\n ]);\n\n const handleRowsPerPageChange = (event: ChangeEvent<HTMLInputElement>) => {\n const newLimit = parseInt(event.target.value, 10);\n updateQueryParams({\n limit: String(newLimit),\n offset: '0',\n });\n };\n\n const handlePageChange = (_event: unknown, page: number) => {\n setOffset(page * rowsPerPage);\n };\n\n const handleRequestSort = (\n _event: MouseEvent<unknown>,\n property: IncidentTableField,\n ) => {\n const isAsc = orderBy === property && order === SortingOrderEnum.Asc;\n setOrder(isAsc ? SortingOrderEnum.Desc : SortingOrderEnum.Asc);\n setOrderBy(property);\n setOffset(0);\n };\n\n const handleSearch = (str: string) => {\n setInput(str);\n };\n\n const IncidentsTableHeaderComponent = () => (\n <IncidentsTableHeader\n order={order}\n orderBy={orderBy}\n onRequestSort={handleRequestSort}\n />\n );\n\n const IncidentsTableBodyComponent = () =>\n loading ? (\n <TableBody>\n <TableRow>\n <TableCell colSpan={incidentsListColumns.length} align=\"center\">\n <Box sx={{ py: 3 }}>\n <CircularProgress />\n </Box>\n </TableCell>\n </TableRow>\n </TableBody>\n ) : (\n <IncidentsTableBody rows={incidentsData} />\n );\n\n const TablePaginationComponent = () => {\n return (\n <TablePagination\n rowsPerPageOptions={[5, 10, 20, 50, 100].map(n => ({\n value: n,\n label: t('table.labelRowsSelect', { count: String(n) }),\n }))}\n component=\"div\"\n sx={{ mr: 1 }}\n count={count ?? 0}\n rowsPerPage={rowsPerPage}\n page={pageNumber}\n onPageChange={handlePageChange}\n onRowsPerPageChange={handleRowsPerPageChange}\n labelRowsPerPage={null}\n showFirstButton\n showLastButton\n />\n );\n };\n\n return (\n <Box>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <IncidentsFilter />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n {error ? (\n <Box sx={{ padding: 2, color: 'error.main' }}>\n {t('errors.loadingIncidents', { error })}\n </Box>\n ) : (\n <Table\n data={loading ? [] : incidentsData}\n columns={incidentsListColumns}\n onSearchChange={handleSearch}\n title={\n count === 0\n ? t('page.title')\n : t('page.titleWithCount', { count: String(count) })\n }\n localization={{\n toolbar: { searchPlaceholder: t('table.searchPlaceholder') },\n }}\n components={{\n Header: IncidentsTableHeaderComponent,\n Body: IncidentsTableBodyComponent,\n Pagination: TablePaginationComponent,\n }}\n emptyContent={\n loading ? null : (\n <Box\n data-testid=\"no-incidents-found\"\n sx={{\n padding: 2,\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n {t('table.emptyContent')}\n </Box>\n )\n }\n isLoading={loading}\n />\n )}\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,MAAM,0BAA0B,MAAM;AAC3C,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAC7C,EAAA,MAAM,uBAAu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nB,CAAA;AAAA,oBACA,GAAA,CAAC,oBAAoB,OAAA,EAApB,EACE,kCACC,GAAA,CAAC,GAAA,EAAA,EAAI,IAAI,EAAE,OAAA,EAAS,GAAG,KAAA,EAAO,YAAA,IAC3B,QAAA,EAAA,CAAA,CAAE,yBAAA,EAA2B,EAAE,KAAA,EAAO,GACzC,CAAA,mBAEA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,OAAA,GAAU,EAAC,GAAI,aAAA;AAAA,QACrB,OAAA,EAAS,oBAAA;AAAA,QACT,cAAA,EAAgB,YAAA;AAAA,QAChB,KAAA,EACE,KAAA,KAAU,CAAA,GACN,CAAA,CAAE,YAAY,CAAA,GACd,CAAA,CAAE,qBAAA,EAAuB,EAAE,KAAA,EAAO,MAAA,CAAO,KAAK,GAAG,CAAA;AAAA,QAEvD,YAAA,EAAc;AAAA,UACZ,OAAA,EAAS,EAAE,iBAAA,EAAmB,CAAA,CAAE,yBAAyB,CAAA;AAAE,SAC7D;AAAA,QACA,UAAA,EAAY;AAAA,UACV,MAAA,EAAQ,6BAAA;AAAA,UACR,IAAA,EAAM,2BAAA;AAAA,UACN,UAAA,EAAY;AAAA,SACd;AAAA,QACA,YAAA,EACE,UAAU,IAAA,mBACR,GAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAY,oBAAA;AAAA,YACZ,EAAA,EAAI;AAAA,cACF,OAAA,EAAS,CAAA;AAAA,cACT,OAAA,EAAS,MAAA;AAAA,cACT,cAAA,EAAgB;AAAA,aAClB;AAAA,YAEC,YAAE,oBAAoB;AAAA;AAAA,SACzB;AAAA,QAGJ,SAAA,EAAW;AAAA;AAAA,KACb,EAEJ;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InProgressIcon.esm.js","sources":["../../../src/components/Servicenow/InProgressIcon.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 { CustomSvgIcon } from './CustomSvgIcon';\n\nexport const InProgressIcon = (props: any) => (\n <CustomSvgIcon\n viewBox=\"0 0 16 16\"\n path={\n <path d=\"M7.99992 14.6667C7.08881 14.6667 6.2277 14.4917 5.41658 14.1417C4.60547 13.7917 3.89714 13.3139 3.29159 12.7083C2.68603 12.1028 2.20825 11.3945 1.85825 10.5833C1.50825 9.77223 1.33325 8.91112 1.33325 8.00001C1.33325 7.07779 1.50825 6.2139 1.85825 5.40834C2.20825 4.60279 2.68603 3.89723 3.29159 3.29168C3.89714 2.68612 4.60547 2.20834 5.41658 1.85834C6.2277 1.50834 7.08881 1.33334 7.99992 1.33334C8.18881 1.33334 8.34714 1.39723 8.47492 1.52501C8.6027 1.65279 8.66658 1.81112 8.66658 2.00001C8.66658 2.1889 8.6027 2.34723 8.47492 2.47501C8.34714 2.60279 8.18881 2.66668 7.99992 2.66668C6.52214 2.66668 5.26381 3.18612 4.22492 4.22501C3.18603 5.2639 2.66659 6.52223 2.66659 8.00001C2.66659 9.47779 3.18603 10.7361 4.22492 11.775C5.26381 12.8139 6.52214 13.3333 7.99992 13.3333C9.4777 13.3333 10.736 12.8139 11.7749 11.775C12.8138 10.7361 13.3333 9.47779 13.3333 8.00001C13.3333 7.81112 13.3971 7.65279 13.5249 7.52501C13.6527 7.39723 13.811 7.33334 13.9999 7.33334C14.1888 7.33334 14.3471 7.39723 14.4749 7.52501C14.6027 7.65279 14.6666 7.81112 14.6666 8.00001C14.6666 8.91112 14.4916 9.77223 14.1416 10.5833C13.7916 11.3945 13.3138 12.1028 12.7083 12.7083C12.1027 13.3139 11.3971 13.7917 10.5916 14.1417C9.78603 14.4917 8.92214 14.6667 7.99992 14.6667Z\" />\n }\n {...props}\n />\n);\n"],"names":[],"mappings":";;;AAkBa,MAAA,cAAA,GAAiB,CAAC,KAC7B,qBAAA,GAAA;AAAA,EAAC,aAAA;AAAA,EAAA;AAAA,IACC,OAAQ,EAAA,WAAA;AAAA,IACR,IACE,kBAAA,GAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,uuCAAwuC,EAAA,CAAA;AAAA,IAEjvC,GAAG;AAAA;AACN;;;;"}
1
+ {"version":3,"file":"InProgressIcon.esm.js","sources":["../../../src/components/Servicenow/InProgressIcon.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 { CustomSvgIcon } from './CustomSvgIcon';\n\nexport const InProgressIcon = (props: any) => (\n <CustomSvgIcon\n viewBox=\"0 0 16 16\"\n path={\n <path d=\"M7.99992 14.6667C7.08881 14.6667 6.2277 14.4917 5.41658 14.1417C4.60547 13.7917 3.89714 13.3139 3.29159 12.7083C2.68603 12.1028 2.20825 11.3945 1.85825 10.5833C1.50825 9.77223 1.33325 8.91112 1.33325 8.00001C1.33325 7.07779 1.50825 6.2139 1.85825 5.40834C2.20825 4.60279 2.68603 3.89723 3.29159 3.29168C3.89714 2.68612 4.60547 2.20834 5.41658 1.85834C6.2277 1.50834 7.08881 1.33334 7.99992 1.33334C8.18881 1.33334 8.34714 1.39723 8.47492 1.52501C8.6027 1.65279 8.66658 1.81112 8.66658 2.00001C8.66658 2.1889 8.6027 2.34723 8.47492 2.47501C8.34714 2.60279 8.18881 2.66668 7.99992 2.66668C6.52214 2.66668 5.26381 3.18612 4.22492 4.22501C3.18603 5.2639 2.66659 6.52223 2.66659 8.00001C2.66659 9.47779 3.18603 10.7361 4.22492 11.775C5.26381 12.8139 6.52214 13.3333 7.99992 13.3333C9.4777 13.3333 10.736 12.8139 11.7749 11.775C12.8138 10.7361 13.3333 9.47779 13.3333 8.00001C13.3333 7.81112 13.3971 7.65279 13.5249 7.52501C13.6527 7.39723 13.811 7.33334 13.9999 7.33334C14.1888 7.33334 14.3471 7.39723 14.4749 7.52501C14.6027 7.65279 14.6666 7.81112 14.6666 8.00001C14.6666 8.91112 14.4916 9.77223 14.1416 10.5833C13.7916 11.3945 13.3138 12.1028 12.7083 12.7083C12.1027 13.3139 11.3971 13.7917 10.5916 14.1417C9.78603 14.4917 8.92214 14.6667 7.99992 14.6667Z\" />\n }\n {...props}\n />\n);\n"],"names":[],"mappings":";;;AAkBO,MAAM,cAAA,GAAiB,CAAC,KAAA,qBAC7B,GAAA;AAAA,EAAC,aAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,kBACE,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,uuCAAA,EAAwuC,CAAA;AAAA,IAEjvC,GAAG;AAAA;AACN;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"IncidentsFilter.esm.js","sources":["../../../src/components/Servicenow/IncidentsFilter.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 { useMemo, useCallback } from 'react';\n\nimport { SelectItem } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\n\nimport { IncidentEnumFilter } from '../shared-components/IncidentEnumFilter';\nimport { useIncidentStateMap, usePriorityMap } from '../../utils/incidentUtils';\nimport { useQueryArrayFilter } from '../../hooks/useQueryArrayFilter';\nimport { useUpdateQueryParams } from '../../hooks/useQueryHelpers';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const IncidentsFilter = () => {\n const { t } = useTranslation();\n const stateFilter = useQueryArrayFilter('state');\n const priorityFilter = useQueryArrayFilter('priority');\n const updateQueryParams = useUpdateQueryParams();\n const incidentStateMap = useIncidentStateMap();\n const priorityMap = usePriorityMap();\n\n const stateValue = useMemo(() => stateFilter.current, [stateFilter]);\n const priorityValue = useMemo(() => priorityFilter.current, [priorityFilter]);\n\n const handleStateChange = useCallback(\n (_e: any, value: SelectItem[]) => {\n updateQueryParams({\n state: value.map(v => v.value).join(','),\n offset: '0',\n });\n },\n [updateQueryParams],\n );\n\n const handlePriorityChange = useCallback(\n (_e: any, value: SelectItem[]) => {\n updateQueryParams({\n priority: value.map(v => v.value).join(','),\n offset: '0',\n });\n },\n [updateQueryParams],\n );\n\n return (\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n minWidth: { xs: 200, lg: 'auto' },\n }}\n >\n <IncidentEnumFilter\n label={t('filter.state')}\n filterKey=\"state\"\n dataMap={incidentStateMap}\n value={stateValue}\n onChange={handleStateChange}\n />\n <IncidentEnumFilter\n label={t('filter.priority')}\n filterKey=\"priority\"\n dataMap={priorityMap}\n value={priorityValue}\n onChange={handlePriorityChange}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA4BO,MAAM,kBAAkB,MAAM;AACnC,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAM,MAAA,WAAA,GAAc,oBAAoB,OAAO,CAAA;AAC/C,EAAM,MAAA,cAAA,GAAi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YACC,KAAA,EAAO,EAAE,cAAc,CAAA;AAAA,YACvB,SAAU,EAAA,OAAA;AAAA,YACV,OAAS,EAAA,gBAAA;AAAA,YACT,KAAO,EAAA,UAAA;AAAA,YACP,QAAU,EAAA;AAAA;AAAA,SACZ;AAAA,wBACA,GAAA;AAAA,UAAC,kBAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAO,EAAE,iBAAiB,CAAA;AAAA,YAC1B,SAAU,EAAA,UAAA;AAAA,YACV,OAAS,EAAA,WAAA;AAAA,YACT,KAAO,EAAA,aAAA;AAAA,YACP,QAAU,EAAA;AAAA;AAAA;AACZ;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"IncidentsFilter.esm.js","sources":["../../../src/components/Servicenow/IncidentsFilter.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 { useMemo, useCallback } from 'react';\n\nimport { SelectItem } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\n\nimport { IncidentEnumFilter } from '../shared-components/IncidentEnumFilter';\nimport { useIncidentStateMap, usePriorityMap } from '../../utils/incidentUtils';\nimport { useQueryArrayFilter } from '../../hooks/useQueryArrayFilter';\nimport { useUpdateQueryParams } from '../../hooks/useQueryHelpers';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport const IncidentsFilter = () => {\n const { t } = useTranslation();\n const stateFilter = useQueryArrayFilter('state');\n const priorityFilter = useQueryArrayFilter('priority');\n const updateQueryParams = useUpdateQueryParams();\n const incidentStateMap = useIncidentStateMap();\n const priorityMap = usePriorityMap();\n\n const stateValue = useMemo(() => stateFilter.current, [stateFilter]);\n const priorityValue = useMemo(() => priorityFilter.current, [priorityFilter]);\n\n const handleStateChange = useCallback(\n (_e: any, value: SelectItem[]) => {\n updateQueryParams({\n state: value.map(v => v.value).join(','),\n offset: '0',\n });\n },\n [updateQueryParams],\n );\n\n const handlePriorityChange = useCallback(\n (_e: any, value: SelectItem[]) => {\n updateQueryParams({\n priority: value.map(v => v.value).join(','),\n offset: '0',\n });\n },\n [updateQueryParams],\n );\n\n return (\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n minWidth: { xs: 200, lg: 'auto' },\n }}\n >\n <IncidentEnumFilter\n label={t('filter.state')}\n filterKey=\"state\"\n dataMap={incidentStateMap}\n value={stateValue}\n onChange={handleStateChange}\n />\n <IncidentEnumFilter\n label={t('filter.priority')}\n filterKey=\"priority\"\n dataMap={priorityMap}\n value={priorityValue}\n onChange={handlePriorityChange}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA4BO,MAAM,kBAAkB,MAAM;AACnC,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM,WAAA,GAAc,oBAAoB,OAAO,CAAA;AAC/C,EAAA,MAAM,cAAA,GAAiB,oBAAoB,UAAU,CAAA;AACrD,EAAA,MAAM,oBAAoB,oBAAA,EAAqB;AAC/C,EAAA,MAAM,mBAAmB,mBAAA,EAAoB;AAC7C,EAAA,MAAM,cAAc,cAAA,EAAe;AAEnC,EAAA,MAAM,aAAa,OAAA,CAAQ,MAAM,YAAY,OAAA,EAAS,CAAC,WAAW,CAAC,CAAA;AACnE,EAAA,MAAM,gBAAgB,OAAA,CAAQ,MAAM,eAAe,OAAA,EAAS,CAAC,cAAc,CAAC,CAAA;AAE5E,EAAA,MAAM,iBAAA,GAAoB,WAAA;AAAA,IACxB,CAAC,IAAS,KAAA,KAAwB;AAChC,MAAA,iBAAA,CAAkB;AAAA,QAChB,KAAA,E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 @@
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;;;;"}
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,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAE7B,EAAA,OAAO;AAAA,IACL;AAAA,MACE,EAAA,EAAI,gBAAA;AAAA,MACJ,KAAA,EAAO,EAAE,8BAA8B,CAAA;AAAA,MACvC,OAAO,sBAAA,CAAuB,MAAA;AAAA,MAC9B,IAAA,EAAM;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAA,EAAI,aAAA;AAAA,MACJ,KAAA,EAAO,EAAE,2BAA2B,CAAA;AAAA,MACpC,OAAO,sBAAA,CAAuB,gBAAA;AAAA,MAC9B,IAAA,EAAM;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAA,EAAI,SAAA;AAAA,MACJ,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,MAChC,OAAO,sBAAA,CAAuB,OAAA;AAAA,MAC9B,IAAA,EAAM;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAA,EAAI,UAAA;AAAA,MACJ,KAAA,EAAO,EAAE,wBAAwB,CAAA;AAAA,MACjC,OAAO,sBAAA,CAAuB,QAAA;AAAA,MAC9B,IAAA,EAAM;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAA,EAAI,OAAA;AAAA,MACJ,KAAA,EAAO,EAAE,qBAAqB,CAAA;AAAA,MAC9B,OAAO,sBAAA,CAAuB,aAAA;AAAA,MAC9B,IAAA,EAAM;AAAA,KACR;AAAA,IACA;AAAA,MACE,EAAA,EAAI,SAAA;AAAA,MACJ,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,MAChC,OAAA,EAAS,KAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACF;AACF;;;;"}
@@ -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 { 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;;;;"}
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,kBAAA,GAAqB,CAAC,EAAE,IAAA,EAAK,KAAiC;AACzE,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM,uBAAuB,uBAAA,EAAwB;AAErD,EAAA,IAAI,IAAA,EAAM,SAAS,CAAA,EAAG;AACpB,IAAA,uBACE,GAAA,CAAC,SAAA,EAAA,EAAU,aAAA,EAAY,WAAA,EACpB,eAAK,GAAA,CAAI,CAAA,GAAA,qBACR,GAAA,CAAC,iBAAA,EAAA,EAAkC,IAAA,EAAM,GAAA,EAAA,EAAjB,GAAA,CAAI,KAAkB,CAC/C,CAAA,EACH,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,aACC,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EACC,8BAAC,SAAA,EAAA,EAAU,OAAA,EAAS,qBAAqB,MAAA,EACvC,QAAA,kBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAY,oBAAA;AAAA,MACZ,EAAA,EAAI;AAAA,QACF,CAAA,EAAG,CAAA;AAAA,QACH,OAAA,EAAS,MAAA;AAAA,QACT,cAAA,EAAgB;AAAA,OAClB;AAAA,MAEC,YAAE,oBAAoB;AAAA;AAAA,GACzB,EACF,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -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 { 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;;;;"}
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,CAAA,KAAiC;AAC/B,EAAA,MAAM,uBAAuB,uBAAA,EAAwB;AAErD,EAAA,MAAM,iBAAA,GACJ,CAAC,QAAA,KAAiC,CAAC,KAAA,KAA+B;AAChE,IAAA,aAAA,CAAc,OAAO,QAAQ,CAAA;AAAA,EAC/B,CAAA;AAEF,EAAA,uBACE,GAAA,CAAC,SAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,EAAA,EAAI,EAAE,UAAA,EAAY,KAAA,EAAO,YAAA,EAAc,mBAAA,EAAoB,EAClE,QAAA,EAAA,oBAAA,CAAqB,IAAI,CAAA,MAAA,qBACxB,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MAEC,KAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAQ,QAAA;AAAA,MACR,KAAA,EAAO;AAAA,QACL,UAAA,EAAY,QAAA;AAAA,QACZ,QAAA,EAAU,UAAA;AAAA,QACV,OAAA,EAAS,qBAAA;AAAA,QACT,UAAA,EAAY;AAAA,OACd;AAAA,MACA,aAAA,EAAe,OAAA,KAAY,MAAA,CAAO,KAAA,GAAQ,KAAA,GAAQ,KAAA;AAAA,MAElD,QAAA,kBAAA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UACC,MAAA,EAAQ,YAAY,MAAA,CAAO,KAAA;AAAA,UAC3B,SAAA,EAAW,OAAA,KAAY,MAAA,CAAO,KAAA,GAAQ,KAAA,GAAQ,KAAA;AAAA,UAC9C,SACE,MAAA,CAAO,OAAA,KAAY,QACf,MAAA,GACA,iBAAA,CAAkB,OAAO,KAA2B,CAAA;AAAA,UAE1D,QAAA,EAAU,OAAO,OAAA,KAAY,KAAA;AAAA,UAE5B,QAAA,EAAA,MAAA,CAAO;AAAA;AAAA;AACV,KAAA;AAAA,IAtBK,MAAA,CAAO;AAAA,GAwBf,GACH,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -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 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,E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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;;;;"}
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,cAAA,EAAgB;AAAA,IACd,UAAA,EAAY,QAAA;AAAA,IACZ,QAAA,EAAU;AAAA;AAEd,CAAA,CAAE,CAAA;AAEK,MAAM,iBAAA,GAAoB,CAAC,EAAE,IAAA,EAAK,KAA+B;AACtE,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM,cAAc,cAAA,EAAe;AACnC,EAAA,MAAM,mBAAmB,mBAAA,EAAoB;AAE7C,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAK,IAAA;AAAA,MACL,EAAA,EAAI;AAAA,QACF,QAAA,EAAU,UAAA;AAAA,QACV,kCAAA,EAAoC,EAAE,MAAA,EAAQ,CAAA,EAAE;AAAA,QAChD,YAAA,EAAc;AAAA,OAChB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,WAAU,IAAA,EAAK,KAAA,EAAM,OAAM,SAAA,EAAW,OAAA,CAAQ,cAAA,EACtD,QAAA,EAAA,IAAA,CAAK,MAAA,EACR,CAAA;AAAA,wBACA,GAAA,CAAC,SAAA,EAAA,EAAU,KAAA,EAAM,MAAA,EAAO,WAAW,OAAA,CAAQ,cAAA,EACzC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,OAAO,IAAA,EAAM,WAAA,EAAa,KAAA,EAAK,IAAA,EAAC,WAAU,KAAA,EACjD,QAAA,kBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,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AAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModerateIcon.esm.js","sources":["../../../src/components/Servicenow/ModerateIcon.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 { CustomSvgIcon } from './CustomSvgIcon';\n\nexport const ModerateIcon = (props: any) => (\n <CustomSvgIcon\n viewBox=\"0 0 16 16\"\n path={\n <path d=\"M2.66675 11.3333V9.33332H13.3334V11.3333H2.66675ZM2.66675 6.66666V4.66666H13.3334V6.66666H2.66675Z\" />\n }\n {...props}\n />\n);\n"],"names":[],"mappings":";;;AAkBa,MAAA,YAAA,GAAe,CAAC,KAC3B,qBAAA,GAAA;AAAA,EAAC,aAAA;AAAA,EAAA;AAAA,IACC,OAAQ,EAAA,WAAA;AAAA,IACR,IACE,kBAAA,GAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,oGAAqG,EAAA,CAAA;AAAA,IAE9G,GAAG;AAAA;AACN;;;;"}
1
+ {"version":3,"file":"ModerateIcon.esm.js","sources":["../../../src/components/Servicenow/ModerateIcon.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 { CustomSvgIcon } from './CustomSvgIcon';\n\nexport const ModerateIcon = (props: any) => (\n <CustomSvgIcon\n viewBox=\"0 0 16 16\"\n path={\n <path d=\"M2.66675 11.3333V9.33332H13.3334V11.3333H2.66675ZM2.66675 6.66666V4.66666H13.3334V6.66666H2.66675Z\" />\n }\n {...props}\n />\n);\n"],"names":[],"mappings":";;;AAkBO,MAAM,YAAA,GAAe,CAAC,KAAA,qBAC3B,GAAA;AAAA,EAAC,aAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,kBACE,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,oGAAA,EAAqG,CAAA;AAAA,IAE9G,GAAG;AAAA;AACN;;;;"}
@@ -1,2 +1,6 @@
1
- export { EntityServicenowContent } from './EntityServicenowContent.esm.js';
1
+ import { EntityServicenowContent } from './EntityServicenowContent.esm.js';
2
+
3
+
4
+
5
+ export { EntityServicenowContent };
2
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -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 { 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};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C,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;;;;"}
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,CAAA,KAA+B;AAC7B,EAAA,MAAM,KAAA,GAAsB,MAAA,CAAO,OAAA,CAAQ,OAAO,CAAA,CAAE,GAAA;AAAA,IAClD,CAAC,CAAC,GAAA,EAAK,SAAS,CAAA,MAAO;AAAA,MACrB,KAAA,EAAO,GAAA;AAAA,MACP,OAAO,SAAA,CAAU;AAAA,KACnB;AAAA,GACF;AAEA,EAAA,uBACE,IAAA,CAAC,OAAI,EAAA,EAAI,EAAE,SAAS,MAAA,EAAQ,aAAA,EAAe,UAAS,EAClD,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAI;AAAA,UACF,SAAA,EAAW,SAAA;AAAA,UACX,UAAA,EAAY,MAAA;AAAA,UACZ,QAAA,EAAU,CAAA,KAAA,KAAS,KAAA,CAAM,UAAA,CAAW,KAAA,CAAM,QAAA;AAAA,UAC1C,UAAA,EAAY,CAAA,KAAA,KAAS,KAAA,CAAM,UAAA,CAAW,UAAA;AAAA,UACtC,KAAA,EAAO,CAAA,KAAA,KAAS,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK;AAAA,SACrC;AAAA,QAEC,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAA,EAAQ,IAAA;AAAA,QACR,oBAAA,EAAoB,IAAA;AAAA,QACpB,YAAA,EAAY,KAAA;AAAA,QACZ,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ources":["../../src/hooks/useDebouncedValue.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 */\n\nimport { useState, useEffect } from 'react';\n\nexport function useDebouncedValue<T>(value: T, delay: number): T {\n const [debounced, setDebounced] = useState(value);\n\n useEffect(() => {\n const timer = setTimeout(() => setDebounced(value), delay);\n return () => clearTimeout(timer);\n }, [value, delay]);\n\n return debounced;\n}\n"],"names":[],"mappings":";;AAkBgB,SAAA,iBAAA,CAAqB,OAAU,KAAkB,EAAA;AAC/D,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAEhD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,QAAQ,UAAW,CAAA,MAAM,YAAa,CAAA,KAAK,GAAG,KAAK,CAAA;AACzD,IAAO,OAAA,MAAM,aAAa,KAAK,CAAA;AAAA,GAC9B,EAAA,CAAC,KAAO,EAAA,KAAK,CAAC,CAAA;AAEjB,EAAO,OAAA,SAAA;AACT;;;;"}
1
+ {"version":3,"file":"useDebouncedValue.esm.js","sources":["../../src/hooks/useDebouncedValue.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 */\n\nimport { useState, useEffect } from 'react';\n\nexport function useDebouncedValue<T>(value: T, delay: number): T {\n const [debounced, setDebounced] = useState(value);\n\n useEffect(() => {\n const timer = setTimeout(() => setDebounced(value), delay);\n return () => clearTimeout(timer);\n }, [value, delay]);\n\n return debounced;\n}\n"],"names":[],"mappings":";;AAkBO,SAAS,iBAAA,CAAqB,OAAU,KAAA,EAAkB;AAC/D,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAEhD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,QAAQ,UAAA,CAAW,MAAM,YAAA,CAAa,KAAK,GAAG,KAAK,CAAA;AACzD,IAAA,OAAO,MAAM,aAAa,KAAK,CAAA;AAAA,EACjC,CAAA,EAAG,CAAC,KAAA,EAAO,KAAK,CAAC,CAAA;AAEjB,EAAA,OAAO,SAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryArrayFilter.esm.js","sources":["../../src/hooks/useQueryArrayFilter.ts"],"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 { useMemo, useCallback } from 'react';\nimport { useQueryState } from './useQueryState';\nimport { INCIDENT_STATE_MAP, PRIORITY_MAP } from '../utils/incidentUtils';\nimport { SelectItem } from '@backstage/core-components';\n\nexport const useQueryArrayFilter = (filterName: 'state' | 'priority') => {\n const [raw, setRaw] = useQueryState<string>(filterName, '');\n const [, setOffset] = useQueryState<number>('offset', 0);\n\n const map = filterName === 'state' ? INCIDENT_STATE_MAP : PRIORITY_MAP;\n\n const current: SelectItem[] = useMemo(() => {\n return raw\n .split(',')\n .filter(v => v !== '')\n .map(value => ({\n value,\n label: map[Number(value)]?.label,\n }))\n .filter(item => item.label);\n }, [raw, map]);\n\n const set = useCallback(\n (newValues: (string | number)[]) => {\n const joined = newValues.join(',');\n setRaw(joined);\n setOffset(0);\n },\n [setRaw, setOffset],\n );\n\n const clear = useCallback(() => {\n setRaw('');\n setOffset(0);\n }, [setRaw, setOffset]);\n\n return useMemo(\n () =>\n ({\n current,\n set,\n clear,\n } as const),\n [current, set, clear],\n );\n};\n"],"names":[],"mappings":";;;;AAqBa,MAAA,mBAAA,GAAsB,CAAC,UAAqC,KAAA;AACvE,EAAA,MAAM,CAAC,GAAK,EAAA,MAAM,CAAI,GAAA,aAAA,CAAsB,YAAY,EAAE,CAAA;AAC1D,EAAA,MAAM,GAAG,SAAS,CAAI,GAAA,aAAA,CAAsB,UAAU,CAAC,CAAA;AAEvD,EAAM,MAAA,GAAA,GAAM,UAAe,KAAA,OAAA,GAAU,kBAAqB,GAAA,YAAA;AAE1D,EAAM,MAAA,OAAA,GAAwB,QAAQ,MAAM;AAC1C,IAAO,OAAA,GAAA,CACJ,KAAM,CAAA,GAAG,CACT,CAAA,MAAA,CAAO,OAAK,CAAM,KAAA,EAAE,CACpB,CAAA,GAAA,CAAI,CAAU,KAAA,MAAA;AAAA,MACb,KAAA;AAAA,MACA,KAAO,EAAA,GAAA,CAAI,MAAO,CAAA,KAAK,CAAC,CAAG,EAAA;AAAA,KAC3B,CAAA,CAAA,CACD,MAAO,CAAA,CAAA,IAAA,KAAQ,KAAK,KAAK,CAAA;AAAA,GAC3B,EAAA,CAAC,GAAK,EAAA,GAAG,CAAC,CAAA;AAEb,EAAA,MAAM,GAAM,GAAA,WAAA;AAAA,IACV,CAAC,SAAmC,KAAA;AAClC,MAAM,MAAA,MAAA,GAAS,SAAU,CAAA,IAAA,CAAK,GAAG,CAAA;AACjC,MAAA,MAAA,CAAO,MAAM,CAAA;AACb,MAAA,SAAA,CAAU,CAAC,CAAA;AAAA,KACb;AAAA,IACA,CAAC,QAAQ,SAAS;AAAA,GACpB;AAEA,EAAM,MAAA,KAAA,GAAQ,YAAY,MAAM;AAC9B,IAAA,MAAA,CAAO,EAAE,CAAA;AACT,IAAA,SAAA,CAAU,CAAC,CAAA;AAAA,GACV,EAAA,CAAC,MAAQ,EAAA,SAAS,CAAC,CAAA;AAEtB,EAAO,OAAA,OAAA;AAAA,IACL,OACG;AAAA,MACC,OAAA;AAAA,MACA,GAAA;AAAA,MACA;AAAA,KACF,CAAA;AAAA,IACF,CAAC,OAAS,EAAA,GAAA,EAAK,KAAK;AAAA,GACtB;AACF;;;;"}
1
+ {"version":3,"file":"useQueryArrayFilter.esm.js","sources":["../../src/hooks/useQueryArrayFilter.ts"],"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 { useMemo, useCallback } from 'react';\nimport { useQueryState } from './useQueryState';\nimport { INCIDENT_STATE_MAP, PRIORITY_MAP } from '../utils/incidentUtils';\nimport { SelectItem } from '@backstage/core-components';\n\nexport const useQueryArrayFilter = (filterName: 'state' | 'priority') => {\n const [raw, setRaw] = useQueryState<string>(filterName, '');\n const [, setOffset] = useQueryState<number>('offset', 0);\n\n const map = filterName === 'state' ? INCIDENT_STATE_MAP : PRIORITY_MAP;\n\n const current: SelectItem[] = useMemo(() => {\n return raw\n .split(',')\n .filter(v => v !== '')\n .map(value => ({\n value,\n label: map[Number(value)]?.label,\n }))\n .filter(item => item.label);\n }, [raw, map]);\n\n const set = useCallback(\n (newValues: (string | number)[]) => {\n const joined = newValues.join(',');\n setRaw(joined);\n setOffset(0);\n },\n [setRaw, setOffset],\n );\n\n const clear = useCallback(() => {\n setRaw('');\n setOffset(0);\n }, [setRaw, setOffset]);\n\n return useMemo(\n () =>\n ({\n current,\n set,\n clear,\n } as const),\n [current, set, clear],\n );\n};\n"],"names":[],"mappings":";;;;AAqBO,MAAM,mBAAA,GAAsB,CAAC,UAAA,KAAqC;AACvE,EAAA,MAAM,CAAC,GAAA,EAAK,MAAM,CAAA,GAAI,aAAA,CAAsB,YAAY,EAAE,CAAA;AAC1D,EAAA,MAAM,GAAG,SAAS,CAAA,GAAI,aAAA,CAAsB,UAAU,CAAC,CAAA;AAEvD,EAAA,MAAM,GAAA,GAAM,UAAA,KAAe,OAAA,GAAU,kBAAA,GAAqB,YAAA;AAE1D,EAAA,MAAM,OAAA,GAAwB,QAAQ,MAAM;AAC1C,IAAA,OAAO,GAAA,CACJ,KAAA,CAAM,GAAG,CAAA,CACT,MAAA,CAAO,OAAK,CAAA,KAAM,EAAE,CAAA,CACpB,GAAA,CAAI,CAAA,KAAA,MAAU;AAAA,MACb,KAAA;AAAA,MACA,KAAA,EAAO,GAAA,CAAI,MAAA,CAAO,KAAK,CAAC,CAAA,EAAG;AAAA,KAC7B,CAAE,CAAA,CACD,MAAA,CAAO,CAAA,IAAA,KAAQ,KAAK,KAAK,CAAA;AAAA,EAC9B,CAAA,EAAG,CAAC,GAAA,EAAK,GAAG,CAAC,CAAA;AAEb,EAAA,MAAM,GAAA,GAAM,WAAA;AAAA,IACV,CAAC,SAAA,KAAmC;AAClC,MAAA,MAAM,MAAA,GAAS,SAAA,CAAU,IAAA,CAAK,GAAG,CAAA;AACjC,MAAA,MAAA,CAAO,MAAM,CAAA;AACb,MAAA,SAAA,CAAU,CAAC,CAAA;AAAA,IACb,CAAA;AAAA,IACA,CAAC,QAAQ,SAAS;AAAA,GACpB;AAEA,EAAA,MAAM,KAAA,GAAQ,YAAY,MAAM;AAC9B,IAAA,MAAA,CAAO,EAAE,CAAA;AACT,IAAA,SAAA,CAAU,CAAC,CAAA;AAAA,EACb,CAAA,EAAG,CAAC,MAAA,EAAQ,SAAS,CAAC,CAAA;AAEtB,EAAA,OAAO,OAAA;AAAA,IACL,OACG;AAAA,MACC,OAAA;AAAA,MACA,GAAA;AAAA,MACA;AAAA,KACF,CAAA;AAAA,IACF,CAAC,OAAA,EAAS,GAAA,EAAK,KAAK;AAAA,GACtB;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryArrayState.esm.js","sources":["../../src/hooks/useQueryArrayState.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 { useCallback, useEffect, useState } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nexport function useQueryArrayState(\n key: string,\n defaultValue: string[] = [],\n): [string[], (value: string[]) => void] {\n const [searchParams, setSearchParams] = useSearchParams();\n\n const getArrayFromParam = useCallback((): string[] => {\n const raw = searchParams.get(key);\n return raw ? raw.split(',').filter(Boolean) : defaultValue;\n }, [key, searchParams, defaultValue]);\n\n const [state, setState] = useState<string[]>(() => getArrayFromParam());\n\n useEffect(() => {\n const value = getArrayFromParam();\n setState(prev => {\n const prevRaw = prev.join(',');\n const nextRaw = value.join(',');\n return prevRaw === nextRaw ? prev : value;\n });\n }, [getArrayFromParam]);\n\n const setValue = useCallback(\n (newValue: string[]) => {\n const newRaw = newValue.join(',');\n const currentRaw = searchParams.get(key);\n\n if (currentRaw === newRaw || (!currentRaw && newRaw === '')) return;\n\n setSearchParams(\n prev => {\n const params = new URLSearchParams(prev);\n if (newRaw === '') {\n params.delete(key);\n } else {\n params.set(key, newRaw);\n }\n return params;\n },\n { replace: true },\n );\n\n setState(newValue);\n },\n [key, searchParams, setSearchParams],\n );\n\n return [state, setValue];\n}\n"],"names":[],"mappings":";;;AAkBO,SAAS,kBACd,CAAA,GAAA,EACA,YAAyB,GAAA,EACc,EAAA;AACvC,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,eAAgB,EAAA;AAExD,EAAM,MAAA,iBAAA,GAAoB,YAAY,MAAgB;AACpD,IAAM,MAAA,GAAA,GAAM,YAAa,CAAA,GAAA,CAAI,GAAG,CAAA;AAChC,IAAA,OAAO,MAAM,GAAI,CAAA,KAAA,CAAM,GAAG,CAAE,CAAA,MAAA,CAAO,OAAO,CAAI,GAAA,YAAA;AAAA,GAC7C,EAAA,CAAC,GAAK,EAAA,YAAA,EAAc,YAAY,CAAC,CAAA;AAEpC,EAAA,MAAM,CAAC,KAAO,EAAA,QAAQ,IAAI,QAAmB,CAAA,MAAM,mBAAmB,CAAA;AAEtE,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,QAAQ,iBAAkB,EAAA;AAChC,IAAA,QAAA,CAAS,CAAQ,IAAA,KAAA;AACf,MAAM,MAAA,OAAA,GAAU,IAAK,CAAA,IAAA,CAAK,GAAG,CAAA;AAC7B,MAAM,MAAA,OAAA,GAAU,KAAM,CAAA,IAAA,CAAK,GAAG,CAAA;AAC9B,MAAO,OAAA,OAAA,KAAY,UAAU,IAAO,GAAA,KAAA;AAAA,KACrC,CAAA;AAAA,GACH,EAAG,CAAC,iBAAiB,CAAC,CAAA;AAEtB,EAAA,MAAM,QAAW,GAAA,WAAA;AAAA,IACf,CAAC,QAAuB,KAAA;AACtB,MAAM,MAAA,MAAA,GAAS,QAAS,CAAA,IAAA,CAAK,GAAG,CAAA;AAChC,MAAM,MAAA,UAAA,GAAa,YAAa,CAAA,GAAA,CAAI,GAAG,CAAA;AAEvC,MAAA,IAAI,UAAe,KAAA,MAAA,IAAW,CAAC,UAAA,IAAc,WAAW,EAAK,EAAA;AAE7D,MAAA,eAAA;AAAA,QACE,CAAQ,IAAA,KAAA;AACN,UAAM,MAAA,MAAA,GAAS,IAAI,eAAA,CAAgB,IAAI,CAAA;AACvC,UAAA,IAAI,WAAW,EAAI,EAAA;AACjB,YAAA,MAAA,CAAO,OAAO,GAAG,CAAA;AAAA,WACZ,MAAA;AACL,YAAO,MAAA,CAAA,GAAA,CAAI,KAAK,MAAM,CAAA;AAAA;AAExB,UAAO,OAAA,MAAA;AAAA,SACT;AAAA,QACA,EAAE,SAAS,IAAK;AAAA,OAClB;AAEA,MAAA,QAAA,CAAS,QAAQ,CAAA;AAAA,KACnB;AAAA,IACA,CAAC,GAAK,EAAA,YAAA,EAAc,eAAe;AAAA,GACrC;AAEA,EAAO,OAAA,CAAC,OAAO,QAAQ,CAAA;AACzB;;;;"}
1
+ {"version":3,"file":"useQueryArrayState.esm.js","sources":["../../src/hooks/useQueryArrayState.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 { useCallback, useEffect, useState } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nexport function useQueryArrayState(\n key: string,\n defaultValue: string[] = [],\n): [string[], (value: string[]) => void] {\n const [searchParams, setSearchParams] = useSearchParams();\n\n const getArrayFromParam = useCallback((): string[] => {\n const raw = searchParams.get(key);\n return raw ? raw.split(',').filter(Boolean) : defaultValue;\n }, [key, searchParams, defaultValue]);\n\n const [state, setState] = useState<string[]>(() => getArrayFromParam());\n\n useEffect(() => {\n const value = getArrayFromParam();\n setState(prev => {\n const prevRaw = prev.join(',');\n const nextRaw = value.join(',');\n return prevRaw === nextRaw ? prev : value;\n });\n }, [getArrayFromParam]);\n\n const setValue = useCallback(\n (newValue: string[]) => {\n const newRaw = newValue.join(',');\n const currentRaw = searchParams.get(key);\n\n if (currentRaw === newRaw || (!currentRaw && newRaw === '')) return;\n\n setSearchParams(\n prev => {\n const params = new URLSearchParams(prev);\n if (newRaw === '') {\n params.delete(key);\n } else {\n params.set(key, newRaw);\n }\n return params;\n },\n { replace: true },\n );\n\n setState(newValue);\n },\n [key, searchParams, setSearchParams],\n );\n\n return [state, setValue];\n}\n"],"names":[],"mappings":";;;AAkBO,SAAS,kBAAA,CACd,GAAA,EACA,YAAA,GAAyB,EAAC,EACa;AACvC,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,eAAA,EAAgB;AAExD,EAAA,MAAM,iBAAA,GAAoB,YAAY,MAAgB;AACpD,IAAA,MAAM,GAAA,GAAM,YAAA,CAAa,GAAA,CAAI,GAAG,CAAA;AAChC,IAAA,OAAO,MAAM,GAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,GAAI,YAAA;AAAA,EAChD,CAAA,EAAG,CAAC,GAAA,EAAK,YAAA,EAAc,YAAY,CAAC,CAAA;AAEpC,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,IAAI,QAAA,CAAmB,MAAM,mBAAmB,CAAA;AAEtE,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,QAAQ,iBAAA,EAAkB;AAChC,IAAA,QAAA,CAAS,CAAA,IAAA,KAAQ;AACf,MAAA,MAAM,OAAA,GAAU,IAAA,CAAK,IAAA,CAAK,GAAG,CAAA;AAC7B,MAAA,MAAM,OAAA,GAAU,KAAA,CAAM,IAAA,CAAK,GAAG,CAAA;AAC9B,MAAA,OAAO,OAAA,KAAY,UAAU,IAAA,GAAO,KAAA;AAAA,IACtC,CAAC,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,iBAAiB,CAAC,CAAA;AAEtB,EAAA,MAAM,QAAA,GAAW,WAAA;AAAA,IACf,CAAC,QAAA,KAAuB;AACtB,MAAA,MAAM,MAAA,GAAS,QAAA,CAAS,IAAA,CAAK,GAAG,CAAA;AAChC,MAAA,MAAM,UAAA,GAAa,YAAA,CAAa,GAAA,CAAI,GAAG,CAAA;AAEvC,MAAA,IAAI,UAAA,KAAe,MAAA,IAAW,CAAC,UAAA,IAAc,WAAW,EAAA,EAAK;AAE7D,MAAA,eAAA;AAAA,QACE,CAAA,IAAA,KAAQ;AACN,UAAA,MAAM,MAAA,GAAS,IAAI,eAAA,CAAgB,IAAI,CAAA;AACvC,UAAA,IAAI,WAAW,EAAA,EAAI;AACjB,YAAA,MAAA,CAAO,OAAO,GAAG,CAAA;AAAA,UACnB,CAAA,MAAO;AACL,YAAA,MAAA,CAAO,GAAA,CAAI,KAAK,MAAM,CAAA;AAAA,UACxB;AACA,UAAA,OAAO,MAAA;AAAA,QACT,CAAA;AAAA,QACA,EAAE,SAAS,IAAA;AAAK,OAClB;AAEA,MAAA,QAAA,CAAS,QAAQ,CAAA;AAAA,IACnB,CAAA;AAAA,IACA,CAAC,GAAA,EAAK,YAAA,EAAc,eAAe;AAAA,GACrC;AAEA,EAAA,OAAO,CAAC,OAAO,QAAQ,CAAA;AACzB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryHelpers.esm.js","sources":["../../src/hooks/useQueryHelpers.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 */\n\nimport { useSearchParams } from 'react-router-dom';\n\nexport function useUpdateQueryParams() {\n const [, setSearchParams] = useSearchParams();\n\n return (updates: Record<string, string>) => {\n setSearchParams(\n prev => {\n const params = new URLSearchParams(prev);\n for (const key in updates) {\n if (updates[key] === '') {\n params.delete(key);\n } else {\n params.set(key, updates[key]);\n }\n }\n return params;\n },\n { replace: true },\n );\n };\n}\n"],"names":[],"mappings":";;AAkBO,SAAS,oBAAuB,GAAA;AACrC,EAAA,MAAM,GAAG,eAAe,CAAA,GAAI,eAAgB,EAAA;AAE5C,EAAA,OAAO,CAAC,OAAoC,KAAA;AAC1C,IAAA,eAAA;AAAA,MACE,CAAQ,IAAA,KAAA;AACN,QAAM,MAAA,MAAA,GAAS,IAAI,eAAA,CAAgB,IAAI,CAAA;AACvC,QAAA,KAAA,MAAW,OAAO,OAAS,EAAA;AACzB,UAAI,IAAA,OAAA,CAAQ,GAAG,CAAA,KAAM,EAAI,EAAA;AACvB,YAAA,MAAA,CAAO,OAAO,GAAG,CAAA;AAAA,WACZ,MAAA;AACL,YAAA,MAAA,CAAO,GAAI,CAAA,GAAA,EAAK,OAAQ,CAAA,GAAG,CAAC,CAAA;AAAA;AAC9B;AAEF,QAAO,OAAA,MAAA;AAAA,OACT;AAAA,MACA,EAAE,SAAS,IAAK;AAAA,KAClB;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"useQueryHelpers.esm.js","sources":["../../src/hooks/useQueryHelpers.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 */\n\nimport { useSearchParams } from 'react-router-dom';\n\nexport function useUpdateQueryParams() {\n const [, setSearchParams] = useSearchParams();\n\n return (updates: Record<string, string>) => {\n setSearchParams(\n prev => {\n const params = new URLSearchParams(prev);\n for (const key in updates) {\n if (updates[key] === '') {\n params.delete(key);\n } else {\n params.set(key, updates[key]);\n }\n }\n return params;\n },\n { replace: true },\n );\n };\n}\n"],"names":[],"mappings":";;AAkBO,SAAS,oBAAA,GAAuB;AACrC,EAAA,MAAM,GAAG,eAAe,CAAA,GAAI,eAAA,EAAgB;AAE5C,EAAA,OAAO,CAAC,OAAA,KAAoC;AAC1C,IAAA,eAAA;AAAA,MACE,CAAA,IAAA,KAAQ;AACN,QAAA,MAAM,MAAA,GAAS,IAAI,eAAA,CAAgB,IAAI,CAAA;AACvC,QAAA,KAAA,MAAW,OAAO,OAAA,EAAS;AACzB,UAAA,IAAI,OAAA,CAAQ,GAAG,CAAA,KAAM,EAAA,EAAI;AACvB,YAAA,MAAA,CAAO,OAAO,GAAG,CAAA;AAAA,UACnB,CAAA,MAAO;AACL,YAAA,MAAA,CAAO,GAAA,CAAI,GAAA,EAAK,OAAA,CAAQ,GAAG,CAAC,CAAA;AAAA,UAC9B;AAAA,QACF;AACA,QAAA,OAAO,MAAA;AAAA,MACT,CAAA;AAAA,MACA,EAAE,SAAS,IAAA;AAAK,KAClB;AAAA,EACF,CAAA;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryState.esm.js","sources":["../../src/hooks/useQueryState.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 { useCallback, useEffect, useState } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nexport function useQueryState<T>(\n key: string,\n defaultValue: T,\n): [T, (value: T) => void] {\n const [searchParams, setSearchParams] = useSearchParams();\n\n const getValueFromParams = useCallback(\n (raw: string | null): T => {\n if (typeof defaultValue === 'number') {\n return (raw !== null ? Number(raw) : defaultValue) as T;\n }\n if (typeof defaultValue === 'boolean') {\n return (raw === 'true') as T;\n }\n return (raw ?? defaultValue) as T;\n },\n [defaultValue],\n );\n\n const [state, setState] = useState<T>(() =>\n getValueFromParams(searchParams.get(key)),\n );\n\n useEffect(() => {\n const paramValue = getValueFromParams(searchParams.get(key));\n setState(paramValue);\n }, [getValueFromParams, searchParams, key]);\n\n const setValue = useCallback(\n (newValue: T) => {\n const currentRaw = searchParams.get(key);\n const newRaw = String(newValue);\n\n if (currentRaw === newRaw || (!currentRaw && newRaw === '')) return;\n\n setSearchParams(\n prev => {\n const params = new URLSearchParams(prev);\n\n if (newRaw === '') {\n params.delete(key);\n } else {\n params.set(key, newRaw);\n }\n\n return params;\n },\n { replace: true },\n );\n\n setState(newValue);\n },\n [key, searchParams, setSearchParams],\n );\n\n return [state, setValue];\n}\n"],"names":[],"mappings":";;;AAkBgB,SAAA,aAAA,CACd,KACA,YACyB,EAAA;AACzB,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,eAAgB,EAAA;AAExD,EAAA,MAAM,kBAAqB,GAAA,WAAA;AAAA,IACzB,CAAC,GAA0B,KAAA;AACzB,MAAI,IAAA,OAAO,iBAAiB,QAAU,EAAA;AACpC,QAAA,OAAQ,GAAQ,KAAA,IAAA,GAAO,MAAO,CAAA,GAAG,CAAI,GAAA,YAAA;AAAA;AAEvC,MAAI,IAAA,OAAO,iBAAiB,SAAW,EAAA;AACrC,QAAA,OAAQ,GAAQ,KAAA,MAAA;AAAA;AAElB,MAAA,OAAQ,GAAO,IAAA,YAAA;AAAA,KACjB;AAAA,IACA,CAAC,YAAY;AAAA,GACf;AAEA,EAAM,MAAA,CAAC,KAAO,EAAA,QAAQ,CAAI,GAAA,QAAA;AAAA,IAAY,MACpC,kBAAA,CAAmB,YAAa,CAAA,GAAA,CAAI,GAAG,CAAC;AAAA,GAC1C;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,UAAa,GAAA,kBAAA,CAAmB,YAAa,CAAA,GAAA,CAAI,GAAG,CAAC,CAAA;AAC3D,IAAA,QAAA,CAAS,UAAU,CAAA;AAAA,GAClB,EAAA,CAAC,kBAAoB,EAAA,YAAA,EAAc,GAAG,CAAC,CAAA;AAE1C,EAAA,MAAM,QAAW,GAAA,WAAA;AAAA,IACf,CAAC,QAAgB,KAAA;AACf,MAAM,MAAA,UAAA,GAAa,YAAa,CAAA,GAAA,CAAI,GAAG,CAAA;AACvC,MAAM,MAAA,MAAA,GAAS,OAAO,QAAQ,CAAA;AAE9B,MAAA,IAAI,UAAe,KAAA,MAAA,IAAW,CAAC,UAAA,IAAc,WAAW,EAAK,EAAA;AAE7D,MAAA,eAAA;AAAA,QACE,CAAQ,IAAA,KAAA;AACN,UAAM,MAAA,MAAA,GAAS,IAAI,eAAA,CAAgB,IAAI,CAAA;AAEvC,UAAA,IAAI,WAAW,EAAI,EAAA;AACjB,YAAA,MAAA,CAAO,OAAO,GAAG,CAAA;AAAA,WACZ,MAAA;AACL,YAAO,MAAA,CAAA,GAAA,CAAI,KAAK,MAAM,CAAA;AAAA;AAGxB,UAAO,OAAA,MAAA;AAAA,SACT;AAAA,QACA,EAAE,SAAS,IAAK;AAAA,OAClB;AAEA,MAAA,QAAA,CAAS,QAAQ,CAAA;AAAA,KACnB;AAAA,IACA,CAAC,GAAK,EAAA,YAAA,EAAc,eAAe;AAAA,GACrC;AAEA,EAAO,OAAA,CAAC,OAAO,QAAQ,CAAA;AACzB;;;;"}
1
+ {"version":3,"file":"useQueryState.esm.js","sources":["../../src/hooks/useQueryState.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 { useCallback, useEffect, useState } from 'react';\nimport { useSearchParams } from 'react-router-dom';\n\nexport function useQueryState<T>(\n key: string,\n defaultValue: T,\n): [T, (value: T) => void] {\n const [searchParams, setSearchParams] = useSearchParams();\n\n const getValueFromParams = useCallback(\n (raw: string | null): T => {\n if (typeof defaultValue === 'number') {\n return (raw !== null ? Number(raw) : defaultValue) as T;\n }\n if (typeof defaultValue === 'boolean') {\n return (raw === 'true') as T;\n }\n return (raw ?? defaultValue) as T;\n },\n [defaultValue],\n );\n\n const [state, setState] = useState<T>(() =>\n getValueFromParams(searchParams.get(key)),\n );\n\n useEffect(() => {\n const paramValue = getValueFromParams(searchParams.get(key));\n setState(paramValue);\n }, [getValueFromParams, searchParams, key]);\n\n const setValue = useCallback(\n (newValue: T) => {\n const currentRaw = searchParams.get(key);\n const newRaw = String(newValue);\n\n if (currentRaw === newRaw || (!currentRaw && newRaw === '')) return;\n\n setSearchParams(\n prev => {\n const params = new URLSearchParams(prev);\n\n if (newRaw === '') {\n params.delete(key);\n } else {\n params.set(key, newRaw);\n }\n\n return params;\n },\n { replace: true },\n );\n\n setState(newValue);\n },\n [key, searchParams, setSearchParams],\n );\n\n return [state, setValue];\n}\n"],"names":[],"mappings":";;;AAkBO,SAAS,aAAA,CACd,KACA,YAAA,EACyB;AACzB,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,eAAA,EAAgB;AAExD,EAAA,MAAM,kBAAA,GAAqB,WAAA;AAAA,IACzB,CAAC,GAAA,KAA0B;AACzB,MAAA,IAAI,OAAO,iBAAiB,QAAA,EAAU;AACpC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AAE,SAAS,IAAA;AAAK,OAClB;AAEA,MAAA,QAAA,CAAS,QAAQ,CAAA;AAAA,IACnB,CAAA;AAAA,IACA,CAAC,GAAA,EAAK,YAAA,EAAc,eAAe;AAAA,GACrC;AAEA,EAAA,OAAO,CAAC,OAAO,QAAQ,CAAA;AACzB;;;;"}
@@ -1 +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;;;;"}
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,EAAE,GAAI,iBAAA,CAAkB,wBAAwB,CAAA;AACxD,EAAA,OAAO;AAAA,IACL;AAAA,GAIF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUserEmail.esm.js","sources":["../../src/hooks/useUserEmail.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 */\n\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport { UserEntity } from '@backstage/catalog-model';\nimport { useAsync } from 'react-use';\n\nexport function useUserEmail(kind: string): string | undefined {\n const identityApi = useApi(identityApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const state = useAsync(async () => {\n if (kind !== 'user') return undefined;\n\n const profile = await identityApi.getProfileInfo();\n if (profile?.email) return profile.email;\n\n const identity = await identityApi.getBackstageIdentity();\n const userEntity = (await catalogApi.getEntityByRef(\n identity.userEntityRef,\n )) as UserEntity | undefined;\n return userEntity?.spec?.profile?.email;\n }, [identityApi, catalogApi, kind]);\n\n return state.value;\n}\n\nexport default useUserEmail;\n"],"names":[],"mappings":";;;;AAqBO,SAAS,aAAa,IAAkC,EAAA;AAC7D,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA;AAEvC,EAAM,MAAA,KAAA,GAAQ,SAAS,YAAY;AACjC,IAAI,IAAA,IAAA,KAAS,QAAe,OAAA,MAAA;AAE5B,IAAM,MAAA,OAAA,GAAU,MAAM,WAAA,CAAY,cAAe,EAAA;AACjD,IAAI,IAAA,OAAA,EAAS,KAAO,EAAA,OAAO,OAAQ,CAAA,KAAA;AAEnC,IAAM,MAAA,QAAA,GAAW,MAAM,WAAA,CAAY,oBAAqB,EAAA;AACxD,IAAM,MAAA,UAAA,GAAc,MAAM,UAAW,CAAA,cAAA;AAAA,MACnC,QAAS,CAAA;AAAA,KACX;AACA,IAAO,OAAA,UAAA,EAAY,MAAM,OAAS,EAAA,KAAA;AAAA,GACjC,EAAA,CAAC,WAAa,EAAA,UAAA,EAAY,IAAI,CAAC,CAAA;AAElC,EAAA,OAAO,KAAM,CAAA,KAAA;AACf;;;;"}
1
+ {"version":3,"file":"useUserEmail.esm.js","sources":["../../src/hooks/useUserEmail.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 */\n\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport { UserEntity } from '@backstage/catalog-model';\nimport { useAsync } from 'react-use';\n\nexport function useUserEmail(kind: string): string | undefined {\n const identityApi = useApi(identityApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const state = useAsync(async () => {\n if (kind !== 'user') return undefined;\n\n const profile = await identityApi.getProfileInfo();\n if (profile?.email) return profile.email;\n\n const identity = await identityApi.getBackstageIdentity();\n const userEntity = (await catalogApi.getEntityByRef(\n identity.userEntityRef,\n )) as UserEntity | undefined;\n return userEntity?.spec?.profile?.email;\n }, [identityApi, catalogApi, kind]);\n\n return state.value;\n}\n\nexport default useUserEmail;\n"],"names":[],"mappings":";;;;AAqBO,SAAS,aAAa,IAAA,EAAkC;AAC7D,EAAA,MAAM,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AAEvC,EAAA,MAAM,KAAA,GAAQ,SAAS,YAAY;AACjC,IAAA,IAAI,IAAA,KAAS,QAAQ,OAAO,MAAA;AAE5B,IAAA,MAAM,OAAA,GAAU,MAAM,WAAA,CAAY,cAAA,EAAe;AACjD,IAAA,IAAI,OAAA,EAAS,KAAA,EAAO,OAAO,OAAA,CAAQ,KAAA;AAEnC,IAAA,MAAM,QAAA,GAAW,MAAM,WAAA,CAAY,oBAAA,EAAqB;AACxD,IAAA,MAAM,UAAA,GAAc,MAAM,UAAA,CAAW,cAAA;AAAA,MACnC,QAAA,CAAS;AAAA,KACX;AACA,IAAA,OAAO,UAAA,EAAY,MAAM,OAAA,EAAS,KAAA;AAAA,EACpC,CAAA,EAAG,CAAC,WAAA,EAAa,UAAA,EAAY,IAAI,CAAC,CAAA;AAElC,EAAA,OAAO,KAAA,CAAM,KAAA;AACf;;;;"}
@@ -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 * 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;;;;"}
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.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IAAI;AACF,IAAA,MAAM,CAAA,GAAI,eAAe,cAAc,CAAA;AACvC,IAAA,MAAM,CAAA,GAAI,cAAA,CAAe,kBAAA,CAAmB,MAAM,CAAC,CAAA;AACnD,IAAA,OACE,CAAA,CAAE,KAAK,WAAA,EAAY,KAAM,EAAE,IAAA,CAAK,WAAA,EAAY,IAC5C,CAAA,CAAE,SAAA,CAAU,WAAA,OAAkB,CAAA,CAAE,SAAA,CAAU,aAAY,IACtD,CAAA,CAAE,KAAK,WAAA,EAAY,KAAM,CAAA,CAAE,IAAA,CAAK,WAAA,EAAY;AAAA,EAEhD,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"routes.esm.js","sources":["../src/routes.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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'servicenow',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'servicenow',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1 +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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\n/**\n * de translation for plugin.servicenow.\n * @public\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 Datensätze gefunden',\n 'filter.state': 'Status',\n 'filter.priority': 'Priorität',\n 'priority.critical': 'Kritisch',\n 'priority.high': 'Hoch',\n 'priority.moderate': 'Mäßig',\n 'priority.low': 'Niedrig',\n 'priority.planning': 'Planung',\n 'incidentState.new': 'Neu',\n 'incidentState.inProgress': 'Wird verarbeitet',\n 'incidentState.onHold': 'Angehalten',\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":";;;AAuBA,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,8BAAA;AAAA,IACtB,cAAgB,EAAA,QAAA;AAAA,IAChB,iBAAmB,EAAA,cAAA;AAAA,IACnB,mBAAqB,EAAA,UAAA;AAAA,IACrB,eAAiB,EAAA,MAAA;AAAA,IACjB,mBAAqB,EAAA,aAAA;AAAA,IACrB,cAAgB,EAAA,SAAA;AAAA,IAChB,mBAAqB,EAAA,SAAA;AAAA,IACrB,mBAAqB,EAAA,KAAA;AAAA,IACrB,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,sBAAwB,EAAA,YAAA;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;;;;"}
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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\n/**\n * de translation for plugin.servicenow.\n * @public\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 Datensätze gefunden',\n 'filter.state': 'Status',\n 'filter.priority': 'Priorität',\n 'priority.critical': 'Kritisch',\n 'priority.high': 'Hoch',\n 'priority.moderate': 'Mäßig',\n 'priority.low': 'Niedrig',\n 'priority.planning': 'Planung',\n 'incidentState.new': 'Neu',\n 'incidentState.inProgress': 'Wird verarbeitet',\n 'incidentState.onHold': 'Angehalten',\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":";;;AAuBA,MAAM,0BAA0B,yBAAA,CAA0B;AAAA,EACxD,GAAA,EAAK,wBAAA;AAAA,EACL,QAAA,EAAU;AAAA,IACR,YAAA,EAAc,oBAAA;AAAA,IACd,qBAAA,EAAuB,gCAAA;AAAA,IACvB,yBAAA,EAA2B,QAAA;AAAA,IAC3B,uBAAA,EAAyB,kBAAA;AAAA,IACzB,8BAAA,EAAgC,eAAA;AAAA,IAChC,2BAAA,EAA6B,cAAA;AAAA,IAC7B,uBAAA,EAAyB,UAAA;AAAA,IACzB,wBAAA,EAA0B,cAAA;AAAA,IAC1B,qBAAA,EAAuB,QAAA;AAAA,IACvB,uBAAA,EAAyB,UAAA;AAAA,IACzB,oBAAA,EAAsB,8BAAA;AAAA,IACtB,cAAA,EAAgB,QAAA;AAAA,IAChB,iBAAA,EAAmB,cAAA;AAAA,IACnB,mBAAA,EAAqB,UAAA;AAAA,IACrB,eAAA,EAAiB,MAAA;AAAA,IACjB,mBAAA,EAAqB,aAAA;AAAA,IACrB,cAAA,EAAgB,SAAA;AAAA,IAChB,mBAAA,EAAqB,SAAA;AAAA,IACrB,mBAAA,EAAqB,KAAA;AAAA,IACrB,0BAAA,EAA4B,kBAAA;AAAA,IAC5B,sBAAA,EAAwB,YAAA;AAAA,IACxB,wBAAA,EAA0B,WAAA;AAAA,IAC1B,sBAAA,EAAwB,aAAA;AAAA,IACxB,yBAAA,EAA2B,aAAA;AAAA,IAC3B,yBAAA,EAA2B,8CAAA;AAAA,IAC3B,0BAAA,EAA4B;AAAA;AAEhC,CAAC;;;;"}
@@ -1 +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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\n/**\n * es translation for plugin.servicenow.\n * @public\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 curso',\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":";;;AAuBA,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,oBAAA;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,UAAA;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;;;;"}
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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { servicenowTranslationRef } from './ref';\n\n/**\n * es translation for plugin.servicenow.\n * @public\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 curso',\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":";;;AAuBA,MAAM,0BAA0B,yBAAA,CAA0B;AAAA,EACxD,GAAA,EAAK,wBAAA;AAAA,EACL,QAAA,EAAU;AAAA,IACR,YAAA,EAAc,uBAAA;AAAA,IACd,qBAAA,EAAuB,mCAAA;AAAA,IACvB,yBAAA,EAA2B,QAAA;AAAA,IAC3B,uBAAA,EAAyB,oBAAA;AAAA,IACzB,8BAAA,EAAgC,wBAAA;AAAA,IAChC,2BAAA,EAA6B,gBAAA;AAAA,IAC7B,uBAAA,EAAyB,QAAA;AAAA,IACzB,wBAAA,EAA0B,WAAA;AAAA,IAC1B,qBAAA,EAAuB,QAAA;AAAA,IACvB,uBAAA,EAAyB,UAAA;AAAA,IACzB,oBAAA,EAAsB,6BAAA;AAAA,IACtB,cAAA,EAAgB,QAAA;AAAA,IAChB,iBAAA,EAAmB,WAAA;AAAA,IACnB,mBAAA,EAAqB,YAAA;AAAA,IACrB,eAAA,EAAiB,MAAA;AAAA,IACjB,mBAAA,EAAqB,UAAA;AAAA,IACrB,cAAA,EAAgB,MAAA;AAAA,IAChB,mBAAA,EAAqB,kBAAA;AAAA,IACrB,mBAAA,EAAqB,OAAA;AAAA,IACrB,0BAAA,EAA4B,UAAA;AAAA,IAC5B,sBAAA,EAAwB,WAAA;AAAA,IACxB,wBAAA,EAA0B,UAAA;AAAA,IAC1B,sBAAA,EAAwB,SAAA;AAAA,IACxB,yBAAA,EAA2B,WAAA;AAAA,IAC3B,yBAAA,EAA2B,uCAAA;AAAA,IAC3B,0BAAA,EAA4B;AAAA;AAEhC,CAAC;;;;"}
@@ -1 +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;;;;"}
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,yBAAA,CAA0B;AAAA,EACxD,GAAA,EAAK,wBAAA;AAAA,EACL,QAAA,EAAU;AAAA,IACR,YAAA,EAAc,oBAAA;AAAA,IACd,qBAAA,EAAuB,gCAAA;AAAA,IACvB,yBAAA,EAA2B,YAAA;AAAA,IAC3B,uBAAA,EAAyB,kBAAA;AAAA,IACzB,8BAAA,EAAgC,sBAAA;AAAA,IAChC,2BAAA,EAA6B,aAAA;AAAA,IAC7B,uBAAA,EAAyB,YAAA;AAAA,IACzB,wBAAA,EAA0B,aAAA;AAAA,IAC1B,qBAAA,EAAuB,SAAA;AAAA,IACvB,uBAAA,EAAyB,SAAA;AAAA,IACzB,oBAAA,EAAsB,gCAAA;AAAA,IACtB,cAAA,EAAgB,SAAA;AAAA,IAChB,iBAAA,EAAmB,aAAA;AAAA,IACnB,mBAAA,EAAqB,UAAA;AAAA,IACrB,eAAA,EAAiB,cAAA;AAAA,IACjB,mBAAA,EAAqB,eAAA;AAAA,IACrB,cAAA,EAAgB,OAAA;AAAA,IAChB,mBAAA,EAAqB,eAAA;AAAA,IACrB,mBAAA,EAAqB,SAAA;AAAA,IACrB,0BAAA,EAA4B,UAAA;AAAA,IAC5B,sBAAA,EAAwB,YAAA;AAAA,IACxB,wBAAA,EAA0B,WAAA;AAAA,IAC1B,sBAAA,EAAwB,UAAA;AAAA,IACxB,yBAAA,EAA2B,WAAA;AAAA,IAC3B,yBAAA,EACE,oDAAA;AAAA,IACF,0BAAA,EAA4B;AAAA;AAEhC,CAAC;;;;"}
@@ -1 +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;;;;"}
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,yBAAA,CAA0B;AAAA,EAC9D,GAAA,EAAK,wBAAA;AAAA,EACL,YAAA,EAAc;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;;;;"}
@@ -1 +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;;;;"}
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,yBAAA,CAA0B;AAAA,EACxD,GAAA,EAAK,wBAAA;AAAA,EACL,QAAA,EAAU;AAAA,IACR,YAAA,EAAc,mBAAA;AAAA,IACd,qBAAA,EAAuB,+BAAA;AAAA,IACvB,yBAAA,EAA2B,OAAA;AAAA,IAC3B,uBAAA,EAAyB,iBAAA;AAAA,IACzB,8BAAA,EAAgC,kBAAA;AAAA,IAChC,2BAAA,EAA6B,aAAA;AAAA,IAC7B,uBAAA,EAAyB,QAAA;AAAA,IACzB,wBAAA,EAA0B,aAAA;AAAA,IAC1B,qBAAA,EAAuB,OAAA;AAAA,IACvB,uBAAA,EAAyB,QAAA;AAAA,IACzB,oBAAA,EAAsB,uBAAA;AAAA,IACtB,cAAA,EAAgB,OAAA;AAAA,IAChB,iBAAA,EAAmB,aAAA;AAAA,IACnB,mBAAA,EAAqB,SAAA;AAAA,IACrB,eAAA,EAAiB,MAAA;AAAA,IACjB,mBAAA,EAAqB,UAAA;AAAA,IACrB,cAAA,EAAgB,OAAA;AAAA,IAChB,mBAAA,EAAqB,gBAAA;AAAA,IACrB,mBAAA,EAAqB,OAAA;AAAA,IACrB,0BAAA,EAA4B,UAAA;AAAA,IAC5B,sBAAA,EAAwB,WAAA;AAAA,IACxB,wBAAA,EAA0B,SAAA;AAAA,IAC1B,sBAAA,EAAwB,QAAA;AAAA,IACxB,yBAAA,EAA2B,WAAA;AAAA,IAC3B,yBAAA,EACE,0DAAA;AAAA,IACF,0BAAA,EAA4B;AAAA;AAEhC,CAAC;;;;"}
@@ -1 +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;;;;"}
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,yBAAA,CAA0B;AAAA,EACxD,GAAA,EAAK,wBAAA;AAAA,EACL,QAAA,EAAU;AAAA,IACR,YAAA,EAAc,oCAAA;AAAA,IACd,qBAAA,EAAuB,gDAAA;AAAA,IACvB,yBAAA,EAA2B,cAAA;AAAA,IAC3B,uBAAA,EAAyB,kBAAA;AAAA,IACzB,8BAAA,EAAgC,kDAAA;AAAA,IAChC,2BAAA,EAA6B,cAAA;AAAA,IAC7B,uBAAA,EAAyB,0BAAA;AAAA,IACzB,wBAAA,EAA0B,oBAAA;AAAA,IAC1B,qBAAA,EAAuB,cAAA;AAAA,IACvB,uBAAA,EAAyB,gCAAA;AAAA,IACzB,oBAAA,EAAsB,0EAAA;AAAA,IACtB,cAAA,EAAgB,cAAA;AAAA,IAChB,iBAAA,EAAmB,oBAAA;AAAA,IACnB,mBAAA,EAAqB,sCAAA;AAAA,IACrB,eAAA,EAAiB,QAAA;AAAA,IACjB,mBAAA,EAAqB,QAAA;AAAA,IACrB,cAAA,EAAgB,QAAA;AAAA,IAChB,mBAAA,EAAqB,oBAAA;AAAA,IACrB,mBAAA,EAAqB,cAAA;AAAA,IACrB,0BAAA,EAA4B,oBAAA;AAAA,IAC5B,sBAAA,EAAwB,oBAAA;AAAA,IACxB,wBAAA,EAA0B,0BAAA;AAAA,IAC1B,sBAAA,EAAwB,0BAAA;AAAA,IACxB,yBAAA,EAA2B,gCAAA;AAAA,IAC3B,yBAAA,EAA2B,iGAAA;AAAA,IAC3B,0BAAA,EAA4B;AAAA;AAEhC,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nexport const servicenowMessages = {\n page: {\n title: 'ServiceNow tickets',\n titleWithCount: 'ServiceNow tickets ({{count}})',\n },\n table: {\n searchPlaceholder: 'Search',\n labelRowsSelect: '{{count}} rows',\n columns: {\n incidentNumber: 'Incident Number',\n description: 'Description',\n created: 'Created',\n priority: 'Priority',\n state: 'State',\n actions: 'Actions',\n },\n emptyContent: 'No records found',\n },\n filter: {\n state: 'State',\n priority: 'Priority',\n },\n priority: {\n critical: 'Critical',\n high: 'High',\n moderate: 'Moderate',\n low: 'Low',\n planning: 'Planning',\n },\n incidentState: {\n new: 'New',\n inProgress: 'In Progress',\n onHold: 'On Hold',\n resolved: 'Resolved',\n closed: 'Closed',\n cancelled: 'Cancelled',\n },\n errors: {\n loadingIncidents: 'Error loading incidents: {{error}}',\n },\n actions: {\n openInServicenow: 'Open in ServiceNow',\n },\n};\n\n/**\n * Translation reference for the ServiceNow plugin.\n * @alpha\n */\nexport const servicenowTranslationRef = createTranslationRef({\n id: 'plugin.servicenow',\n messages: servicenowMessages,\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,kBAAqB,GAAA;AAAA,EAChC,IAAM,EAAA;AAAA,IACJ,KAAO,EAAA,oBAAA;AAAA,IACP,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,iBAAmB,EAAA,QAAA;AAAA,IACnB,eAAiB,EAAA,gBAAA;AAAA,IACjB,OAAS,EAAA;AAAA,MACP,cAAgB,EAAA,iBAAA;AAAA,MAChB,WAAa,EAAA,aAAA;AAAA,MACb,OAAS,EAAA,SAAA;AAAA,MACT,QAAU,EAAA,UAAA;AAAA,MACV,KAAO,EAAA,OAAA;AAAA,MACP,OAAS,EAAA;AAAA,KACX;AAAA,IACA,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,OAAA;AAAA,IACP,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,QAAU,EAAA;AAAA,IACR,QAAU,EAAA,UAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,UAAA;AAAA,IACV,GAAK,EAAA,KAAA;AAAA,IACL,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,aAAe,EAAA;AAAA,IACb,GAAK,EAAA,KAAA;AAAA,IACL,UAAY,EAAA,aAAA;AAAA,IACZ,MAAQ,EAAA,SAAA;AAAA,IACR,QAAU,EAAA,UAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,IACR,SAAW,EAAA;AAAA,GACb;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,gBAAkB,EAAA;AAAA,GACpB;AAAA,EACA,OAAS,EAAA;AAAA,IACP,gBAAkB,EAAA;AAAA;AAEtB;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
1
+ {"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nexport const servicenowMessages = {\n page: {\n title: 'ServiceNow tickets',\n titleWithCount: 'ServiceNow tickets ({{count}})',\n },\n table: {\n searchPlaceholder: 'Search',\n labelRowsSelect: '{{count}} rows',\n columns: {\n incidentNumber: 'Incident Number',\n description: 'Description',\n created: 'Created',\n priority: 'Priority',\n state: 'State',\n actions: 'Actions',\n },\n emptyContent: 'No records found',\n },\n filter: {\n state: 'State',\n priority: 'Priority',\n },\n priority: {\n critical: 'Critical',\n high: 'High',\n moderate: 'Moderate',\n low: 'Low',\n planning: 'Planning',\n },\n incidentState: {\n new: 'New',\n inProgress: 'In Progress',\n onHold: 'On Hold',\n resolved: 'Resolved',\n closed: 'Closed',\n cancelled: 'Cancelled',\n },\n errors: {\n loadingIncidents: 'Error loading incidents: {{error}}',\n },\n actions: {\n openInServicenow: 'Open in ServiceNow',\n },\n};\n\n/**\n * Translation reference for the ServiceNow plugin.\n * @alpha\n */\nexport const servicenowTranslationRef = createTranslationRef({\n id: 'plugin.servicenow',\n messages: servicenowMessages,\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,kBAAA,GAAqB;AAAA,EAChC,IAAA,EAAM;AAAA,IACJ,KAAA,EAAO,oBAAA;AAAA,IACP,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,KAAA,EAAO;AAAA,IACL,iBAAA,EAAmB,QAAA;AAAA,IACnB,eAAA,EAAiB,gBAAA;AAAA,IACjB,OAAA,EAAS;AAAA,MACP,cAAA,EAAgB,iBAAA;AAAA,MAChB,WAAA,EAAa,aAAA;AAAA,MACb,OAAA,EAAS,SAAA;AAAA,MACT,QAAA,EAAU,UAAA;AAAA,MACV,KAAA,EAAO,OAAA;AAAA,MACP,OAAA,EAAS;AAAA,KACX;AAAA,IACA,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,OAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,QAAA,EAAU,UAAA;AAAA,IACV,IAAA,EAAM,MAAA;AAAA,IACN,QAAA,EAAU,UAAA;AAAA,IACV,GAAA,EAAK,KAAA;AAAA,IACL,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,aAAA,EAAe;AAAA,IACb,GAAA,EAAK,KAAA;AAAA,IACL,UAAA,EAAY,aAAA;AAAA,IACZ,MAAA,EAAQ,SAAA;AAAA,IACR,QAAA,EAAU,UAAA;AAAA,IACV,MAAA,EAAQ,QAAA;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,gBAAA,EAAkB;AAAA,GACpB;AAAA,EACA,OAAA,EAAS;AAAA,IACP,gBAAA,EAAkB;AAAA;AAEtB;AAMO,MAAM,2BAA2B,oBAAA,CAAqB;AAAA,EAC3D,EAAA,EAAI,mBAAA;AAAA,EACJ,QAAA,EAAU;AACZ,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.esm.js","sources":["../src/types.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 */\n\nimport { IncidentFieldEnum } from '@backstage-community/plugin-servicenow-common';\n\nexport type IncidentsData = {\n sysId: string;\n number: string;\n shortDescription: string;\n description: string;\n sysCreatedOn: string;\n priority: number;\n incidentState: number;\n url: string;\n};\n\nexport type IncidentTableFieldEnumType = Omit<\n typeof IncidentFieldEnum,\n 'Description'\n>;\n\nexport const IncidentTableFieldEnum: IncidentTableFieldEnumType = {\n Created: IncidentFieldEnum.Created,\n IncidentState: IncidentFieldEnum.IncidentState,\n Number: IncidentFieldEnum.Number,\n Priority: IncidentFieldEnum.Priority,\n ShortDescription: IncidentFieldEnum.ShortDescription,\n Url: IncidentFieldEnum.Url,\n};\n\nexport type IncidentTableField =\n (typeof IncidentTableFieldEnum)[keyof typeof IncidentTableFieldEnum];\n\nexport type PaginatedIncidentsData = {\n incidents: IncidentsData[];\n totalCount: number;\n};\n"],"names":[],"mappings":";;AAkCO,MAAM,sBAAqD,GAAA;AAAA,EAChE,SAAS,iBAAkB,CAAA,OAAA;AAAA,EAC3B,eAAe,iBAAkB,CAAA,aAAA;AAAA,EACjC,QAAQ,iBAAkB,CAAA,MAAA;AAAA,EAC1B,UAAU,iBAAkB,CAAA,QAAA;AAAA,EAC5B,kBAAkB,iBAAkB,CAAA,gBAAA;AAAA,EACpC,KAAK,iBAAkB,CAAA;AACzB;;;;"}
1
+ {"version":3,"file":"types.esm.js","sources":["../src/types.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 */\n\nimport { IncidentFieldEnum } from '@backstage-community/plugin-servicenow-common';\n\nexport type IncidentsData = {\n sysId: string;\n number: string;\n shortDescription: string;\n description: string;\n sysCreatedOn: string;\n priority: number;\n incidentState: number;\n url: string;\n};\n\nexport type IncidentTableFieldEnumType = Omit<\n typeof IncidentFieldEnum,\n 'Description'\n>;\n\nexport const IncidentTableFieldEnum: IncidentTableFieldEnumType = {\n Created: IncidentFieldEnum.Created,\n IncidentState: IncidentFieldEnum.IncidentState,\n Number: IncidentFieldEnum.Number,\n Priority: IncidentFieldEnum.Priority,\n ShortDescription: IncidentFieldEnum.ShortDescription,\n Url: IncidentFieldEnum.Url,\n};\n\nexport type IncidentTableField =\n (typeof IncidentTableFieldEnum)[keyof typeof IncidentTableFieldEnum];\n\nexport type PaginatedIncidentsData = {\n incidents: IncidentsData[];\n totalCount: number;\n};\n"],"names":[],"mappings":";;AAkCO,MAAM,sBAAA,GAAqD;AAAA,EAChE,SAAS,iBAAA,CAAkB,OAAA;AAAA,EAC3B,eAAe,iBAAA,CAAkB,aAAA;AAAA,EACjC,QAAQ,iBAAA,CAAkB,MAAA;AAAA,EAC1B,UAAU,iBAAA,CAAkB,QAAA;AAAA,EAC5B,kBAAkB,iBAAA,CAAkB,gBAAA;AAAA,EACpC,KAAK,iBAAA,CAAkB;AACzB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"incidentUtils.esm.js","sources":["../../src/utils/incidentUtils.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 */\nimport { ElementType, useMemo } from 'react';\nimport LabelImportantIcon from '@mui/icons-material/LabelImportant';\nimport KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';\nimport KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';\nimport FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered';\nimport PendingOutlinedIcon from '@mui/icons-material/PendingOutlined';\nimport CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';\nimport PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline';\nimport { ModerateIcon } from '../components/Servicenow/ModerateIcon';\nimport { InProgressIcon } from '../components/Servicenow/InProgressIcon';\nimport { ClosedIcon } from '../components/Servicenow/ClosedIcon';\n\nimport Typography from '@mui/material/Typography';\nimport { useTranslation } from '../hooks/useTranslation';\n\nexport interface StatusData {\n Icon: ElementType;\n color: string;\n label: string;\n transform?: string;\n}\n\nconst iconStyleBase = { marginRight: 8 };\nconst typographyStyleBase = { display: 'flex', alignItems: 'center' };\n\n/**\n * @deprecated Use usePriorityMap hook for translated labels\n */\nexport const PRIORITY_MAP: Record<number, StatusData> = {\n 1: {\n Icon: LabelImportantIcon,\n color: '#C9190B',\n label: 'Critical',\n transform: 'rotate(-90deg)',\n },\n 2: { Icon: KeyboardDoubleArrowUpIcon, color: '#EC7A08', label: 'High' },\n 3: { Icon: ModerateIcon, color: '#F0AB00', label: 'Moderate' },\n 4: { Icon: KeyboardDoubleArrowDownIcon, color: '#2B9AF3', label: 'Low' },\n 5: { Icon: FormatListNumberedIcon, color: '#6A6E73', label: 'Planning' },\n};\n\n/**\n * @deprecated Use useIncidentStateMap hook for translated labels\n */\nexport const INCIDENT_STATE_MAP: Record<number, StatusData> = {\n 1: { Icon: PendingOutlinedIcon, color: '#6A6E73', label: 'New' },\n 2: { Icon: InProgressIcon, color: '#6A6E73', label: 'In Progress' },\n 3: { Icon: PauseCircleOutlineIcon, color: '#6A6E73', label: 'On Hold' },\n 6: { Icon: CheckCircleOutlineIcon, color: '#3E8635', label: 'Resolved' },\n 7: { Icon: ClosedIcon, color: '#6A6E73', label: 'Closed' },\n 8: { Icon: ClosedIcon, color: '#6A6E73', label: 'Cancelled' },\n};\n\n/**\n * Hook to get translated priority map\n */\nexport const usePriorityMap = (): Record<number, StatusData> => {\n const { t } = useTranslation();\n\n return useMemo(\n () => ({\n 1: {\n Icon: LabelImportantIcon,\n color: '#C9190B',\n label: t('priority.critical'),\n transform: 'rotate(-90deg)',\n },\n 2: {\n Icon: KeyboardDoubleArrowUpIcon,\n color: '#EC7A08',\n label: t('priority.high'),\n },\n 3: {\n Icon: ModerateIcon,\n color: '#F0AB00',\n label: t('priority.moderate'),\n },\n 4: {\n Icon: KeyboardDoubleArrowDownIcon,\n color: '#2B9AF3',\n label: t('priority.low'),\n },\n 5: {\n Icon: FormatListNumberedIcon,\n color: '#6A6E73',\n label: t('priority.planning'),\n },\n }),\n [t],\n );\n};\n\n/**\n * Hook to get translated incident state map\n */\nexport const useIncidentStateMap = (): Record<number, StatusData> => {\n const { t } = useTranslation();\n\n return useMemo(\n () => ({\n 1: {\n Icon: PendingOutlinedIcon,\n color: '#6A6E73',\n label: t('incidentState.new'),\n },\n 2: {\n Icon: InProgressIcon,\n color: '#6A6E73',\n label: t('incidentState.inProgress'),\n },\n 3: {\n Icon: PauseCircleOutlineIcon,\n color: '#6A6E73',\n label: t('incidentState.onHold'),\n },\n 6: {\n Icon: CheckCircleOutlineIcon,\n color: '#3E8635',\n label: t('incidentState.resolved'),\n },\n 7: {\n Icon: ClosedIcon,\n color: '#6A6E73',\n label: t('incidentState.closed'),\n },\n 8: {\n Icon: ClosedIcon,\n color: '#6A6E73',\n label: t('incidentState.cancelled'),\n },\n }),\n [t],\n );\n};\n\nexport const renderStatusLabel = (data?: StatusData) => {\n if (!data) return '';\n\n const { Icon, color, label, transform } = data;\n return (\n <Typography variant=\"body2\" style={typographyStyleBase}>\n <Icon\n fontSize=\"small\"\n style={{\n color,\n marginRight: iconStyleBase.marginRight,\n ...(transform ? { transform } : {}),\n }}\n />\n {label}\n </Typography>\n );\n};\n\nexport const getPriorityValue = (priority: number) =>\n renderStatusLabel(PRIORITY_MAP[priority]);\nexport const getIncidentStateValue = (state: number) =>\n renderStatusLabel(INCIDENT_STATE_MAP[state]);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAM,aAAA,GAAgB,EAAE,WAAA,EAAa,CAAE,EAAA;AACvC,MAAM,mBAAsB,GAAA,EAAE,OAAS,EAAA,MAAA,EAAQ,YAAY,QAAS,EAAA;AAK7D,MAAM,YAA2C,GAAA;AAAA,EACtD,CAAG,EAAA;AAAA,IACD,IAAM,EAAA,kBAAA;AAAA,IACN,KAAO,EAAA,SAAA;AAAA,IACP,KAAO,EAAA,UAAA;AAAA,IACP,SAAW,EAAA;AAAA,GACb;AAAA,EACA,GAAG,EAAE,IAAA,EAAM,2BAA2B,KAAO,EAAA,SAAA,EAAW,OAAO,MAAO,EAAA;AAAA,EACtE,GAAG,EAAE,IAAA,EAAM,cAAc,KAAO,EAAA,SAAA,EAAW,OAAO,UAAW,EAAA;AAAA,EAC7D,GAAG,EAAE,IAAA,EAAM,6BAA6B,KAAO,EAAA,SAAA,EAAW,OAAO,KAAM,EAAA;AAAA,EACvE,GAAG,EAAE,IAAA,EAAM,wBAAwB,KAAO,EAAA,SAAA,EAAW,OAAO,UAAW;AACzE;AAKO,MAAM,kBAAiD,GAAA;AAAA,EAC5D,GAAG,EAAE,IAAA,EAAM,qBAAqB,KAAO,EAAA,SAAA,EAAW,OAAO,KAAM,EAAA;AAAA,EAC/D,GAAG,EAAE,IAAA,EAAM,gBAAgB,KAAO,EAAA,SAAA,EAAW,OAAO,aAAc,EAAA;AAAA,EAClE,GAAG,EAAE,IAAA,EAAM,wBAAwB,KAAO,EAAA,SAAA,EAAW,OAAO,SAAU,EAAA;AAAA,EACtE,GAAG,EAAE,IAAA,EAAM,wBAAwB,KAAO,EAAA,SAAA,EAAW,OAAO,UAAW,EAAA;AAAA,EACvE,GAAG,EAAE,IAAA,EAA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AAA,GACH,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"incidentUtils.esm.js","sources":["../../src/utils/incidentUtils.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 */\nimport { ElementType, useMemo } from 'react';\nimport LabelImportantIcon from '@mui/icons-material/LabelImportant';\nimport KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';\nimport KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';\nimport FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered';\nimport PendingOutlinedIcon from '@mui/icons-material/PendingOutlined';\nimport CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';\nimport PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline';\nimport { ModerateIcon } from '../components/Servicenow/ModerateIcon';\nimport { InProgressIcon } from '../components/Servicenow/InProgressIcon';\nimport { ClosedIcon } from '../components/Servicenow/ClosedIcon';\n\nimport Typography from '@mui/material/Typography';\nimport { useTranslation } from '../hooks/useTranslation';\n\nexport interface StatusData {\n Icon: ElementType;\n color: string;\n label: string;\n transform?: string;\n}\n\nconst iconStyleBase = { marginRight: 8 };\nconst typographyStyleBase = { display: 'flex', alignItems: 'center' };\n\n/**\n * @deprecated Use usePriorityMap hook for translated labels\n */\nexport const PRIORITY_MAP: Record<number, StatusData> = {\n 1: {\n Icon: LabelImportantIcon,\n color: '#C9190B',\n label: 'Critical',\n transform: 'rotate(-90deg)',\n },\n 2: { Icon: KeyboardDoubleArrowUpIcon, color: '#EC7A08', label: 'High' },\n 3: { Icon: ModerateIcon, color: '#F0AB00', label: 'Moderate' },\n 4: { Icon: KeyboardDoubleArrowDownIcon, color: '#2B9AF3', label: 'Low' },\n 5: { Icon: FormatListNumberedIcon, color: '#6A6E73', label: 'Planning' },\n};\n\n/**\n * @deprecated Use useIncidentStateMap hook for translated labels\n */\nexport const INCIDENT_STATE_MAP: Record<number, StatusData> = {\n 1: { Icon: PendingOutlinedIcon, color: '#6A6E73', label: 'New' },\n 2: { Icon: InProgressIcon, color: '#6A6E73', label: 'In Progress' },\n 3: { Icon: PauseCircleOutlineIcon, color: '#6A6E73', label: 'On Hold' },\n 6: { Icon: CheckCircleOutlineIcon, color: '#3E8635', label: 'Resolved' },\n 7: { Icon: ClosedIcon, color: '#6A6E73', label: 'Closed' },\n 8: { Icon: ClosedIcon, color: '#6A6E73', label: 'Cancelled' },\n};\n\n/**\n * Hook to get translated priority map\n */\nexport const usePriorityMap = (): Record<number, StatusData> => {\n const { t } = useTranslation();\n\n return useMemo(\n () => ({\n 1: {\n Icon: LabelImportantIcon,\n color: '#C9190B',\n label: t('priority.critical'),\n transform: 'rotate(-90deg)',\n },\n 2: {\n Icon: KeyboardDoubleArrowUpIcon,\n color: '#EC7A08',\n label: t('priority.high'),\n },\n 3: {\n Icon: ModerateIcon,\n color: '#F0AB00',\n label: t('priority.moderate'),\n },\n 4: {\n Icon: KeyboardDoubleArrowDownIcon,\n color: '#2B9AF3',\n label: t('priority.low'),\n },\n 5: {\n Icon: FormatListNumberedIcon,\n color: '#6A6E73',\n label: t('priority.planning'),\n },\n }),\n [t],\n );\n};\n\n/**\n * Hook to get translated incident state map\n */\nexport const useIncidentStateMap = (): Record<number, StatusData> => {\n const { t } = useTranslation();\n\n return useMemo(\n () => ({\n 1: {\n Icon: PendingOutlinedIcon,\n color: '#6A6E73',\n label: t('incidentState.new'),\n },\n 2: {\n Icon: InProgressIcon,\n color: '#6A6E73',\n label: t('incidentState.inProgress'),\n },\n 3: {\n Icon: PauseCircleOutlineIcon,\n color: '#6A6E73',\n label: t('incidentState.onHold'),\n },\n 6: {\n Icon: CheckCircleOutlineIcon,\n color: '#3E8635',\n label: t('incidentState.resolved'),\n },\n 7: {\n Icon: ClosedIcon,\n color: '#6A6E73',\n label: t('incidentState.closed'),\n },\n 8: {\n Icon: ClosedIcon,\n color: '#6A6E73',\n label: t('incidentState.cancelled'),\n },\n }),\n [t],\n );\n};\n\nexport const renderStatusLabel = (data?: StatusData) => {\n if (!data) return '';\n\n const { Icon, color, label, transform } = data;\n return (\n <Typography variant=\"body2\" style={typographyStyleBase}>\n <Icon\n fontSize=\"small\"\n style={{\n color,\n marginRight: iconStyleBase.marginRight,\n ...(transform ? { transform } : {}),\n }}\n />\n {label}\n </Typography>\n );\n};\n\nexport const getPriorityValue = (priority: number) =>\n renderStatusLabel(PRIORITY_MAP[priority]);\nexport const getIncidentStateValue = (state: number) =>\n renderStatusLabel(INCIDENT_STATE_MAP[state]);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAM,aAAA,GAAgB,EAAE,WAAA,EAAa,CAAA,EAAE;AACvC,MAAM,mBAAA,GAAsB,EAAE,OAAA,EAAS,MAAA,EAAQ,YAAY,QAAA,EAAS;AAK7D,MAAM,YAAA,GAA2C;AAAA,EACtD,CAAA,EAAG;AAAA,IACD,IAAA,EAAM,kBAAA;AAAA,IACN,KAAA,EAAO,SAAA;AAAA,IACP,KAAA,EAAO,UAAA;AAAA,IACP,SAAA,EAAW;AAAA,GACb;AAAA,EACA,GAAG,EAAE,IAAA,EAAM,2BAA2B,KAAA,EAAO,SAAA,EAAW,OAAO,MAAA,EAAO;AAAA,EACtE,GAAG,EAAE,IAAA,EAAM,cAAc,KAAA,EAAO,SAAA,EAAW,OAAO,UAAA,EAAW;AAAA,EAC7D,GAAG,EAAE,IAAA,EAAM,6BAA6B,KAAA,EAAO,SAAA,EAAW,OAAO,KAAA,EAAM;AAAA,EACvE,GAAG,EAAE,IAAA,EAAM,wBAAwB,KAAA,E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AC,MAAM,OAAO,EAAA;AAElB,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,KAAA,EAAO,WAAU,GAAI,IAAA;AAC1C,EAAA,uBACE,IAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ,OAAO,mBAAA,EACjC,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,QAAA,EAAS,OAAA;AAAA,QACT,KAAA,EAAO;AAAA,UACL,KAAA;AAAA,UACA,aAAa,aAAA,CAAc,WAAA;AAAA,UAC3B,GAAI,SAAA,GAAY,EAAE,SAAA,KAAc;AAAC;AACnC;AAAA,KACF;AAAA,IACC;AAAA,GAAA,EACH,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"queryParamsUtils.esm.js","sources":["../../src/utils/queryParamsUtils.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 */\n\nimport { IncidentTableField } from '../types';\n\nexport function buildIncidentQueryParams({\n userEmail,\n limit,\n offset,\n order,\n orderBy,\n search,\n priority,\n state,\n ...annotations\n}: {\n limit: number;\n offset: number;\n order: 'asc' | 'desc';\n orderBy: IncidentTableField;\n search?: string;\n priority?: string[];\n state?: string[];\n userEmail?: string;\n [key: string]: any;\n}) {\n const params: Record<string, string> = {\n order,\n orderBy,\n limit: String(limit),\n offset: String(offset),\n };\n\n if (priority?.length) {\n params.priority = `IN${priority.join(',')}`;\n }\n\n if (state?.length) {\n params.state = `IN${state.join(',')}`;\n }\n\n if (search) {\n params.search = search;\n }\n\n if (userEmail) {\n params.userEmail = userEmail;\n }\n\n for (const key in annotations) {\n if (key in annotations) {\n params[key] = annotations[key];\n }\n }\n\n return new URLSearchParams(params);\n}\n"],"names":[],"mappings":"AAkBO,SAAS,wBAAyB,CAAA;AAAA,EACvC,SAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAG;AACL,CAUG,EAAA;AACD,EAAA,MAAM,MAAiC,GAAA;AAAA,IACrC,KAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA,EAAO,OAAO,KAAK,CAAA;AAAA,IACnB,MAAA,EAAQ,OAAO,MAAM;AAAA,GACvB;AAEA,EAAA,IAAI,UAAU,MAAQ,EAAA;AACpB,IAAA,MAAA,CAAO,QAAW,GAAA,CAAA,EAAA,EAAK,QAAS,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA;AAG3C,EAAA,IAAI,OAAO,MAAQ,EAAA;AACjB,IAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,EAAA,EAAK,KAAM,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA;AAGrC,EAAA,IAAI,MAAQ,EAAA;AACV,IAAA,MAAA,CAAO,MAAS,GAAA,MAAA;AAAA;AAGlB,EAAA,IAAI,SAAW,EAAA;AACb,IAAA,MAAA,CAAO,SAAY,GAAA,SAAA;AAAA;AAGrB,EAAA,KAAA,MAAW,OAAO,WAAa,EAAA;AAC7B,IAAA,IAAI,OAAO,WAAa,EAAA;AACtB,MAAO,MAAA,CAAA,GAAG,CAAI,GAAA,WAAA,CAAY,GAAG,CAAA;AAAA;AAC/B;AAGF,EAAO,OAAA,IAAI,gBAAgB,MAAM,CAAA;AACnC;;;;"}
1
+ {"version":3,"file":"queryParamsUtils.esm.js","sources":["../../src/utils/queryParamsUtils.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 */\n\nimport { IncidentTableField } from '../types';\n\nexport function buildIncidentQueryParams({\n userEmail,\n limit,\n offset,\n order,\n orderBy,\n search,\n priority,\n state,\n ...annotations\n}: {\n limit: number;\n offset: number;\n order: 'asc' | 'desc';\n orderBy: IncidentTableField;\n search?: string;\n priority?: string[];\n state?: string[];\n userEmail?: string;\n [key: string]: any;\n}) {\n const params: Record<string, string> = {\n order,\n orderBy,\n limit: String(limit),\n offset: String(offset),\n };\n\n if (priority?.length) {\n params.priority = `IN${priority.join(',')}`;\n }\n\n if (state?.length) {\n params.state = `IN${state.join(',')}`;\n }\n\n if (search) {\n params.search = search;\n }\n\n if (userEmail) {\n params.userEmail = userEmail;\n }\n\n for (const key in annotations) {\n if (key in annotations) {\n params[key] = annotations[key];\n }\n }\n\n return new URLSearchParams(params);\n}\n"],"names":[],"mappings":"AAkBO,SAAS,wBAAA,CAAyB;AAAA,EACvC,SAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAG;AACL,CAAA,EAUG;AACD,EAAA,MAAM,MAAA,GAAiC;AAAA,IACrC,KAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA,EAAO,OAAO,KAAK,CAAA;AAAA,IACnB,MAAA,EAAQ,OAAO,MAAM;AAAA,GACvB;AAEA,EAAA,IAAI,UAAU,MAAA,EAAQ;AACpB,IAAA,MAAA,CAAO,QAAA,GAAW,CAAA,EAAA,EAAK,QAAA,CAAS,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,EAC3C;AAEA,EAAA,IAAI,OAAO,MAAA,EAAQ;AACjB,IAAA,MAAA,CAAO,KAAA,GAAQ,CAAA,EAAA,EAAK,KAAA,CAAM,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,EACrC;AAEA,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,MAAA,CAAO,MAAA,GAAS,MAAA;AAAA,EAClB;AAEA,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,MAAA,CAAO,SAAA,GAAY,SAAA;AAAA,EACrB;AAEA,EAAA,KAAA,MAAW,OAAO,WAAA,EAAa;AAC7B,IAAA,IAAI,OAAO,WAAA,EAAa;AACtB,MAAA,MAAA,CAAO,GAAG,CAAA,GAAI,WAAA,CAAY,GAAG,CAAA;AAAA,IAC/B;AAAA,EACF;AAEA,EAAA,OAAO,IAAI,gBAAgB,MAAM,CAAA;AACnC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"stringUtils.esm.js","sources":["../../src/utils/stringUtils.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 */\n\nexport const convertDateFormat = (created: string) => {\n if (!created) return '';\n\n const date = new Date(created.replace(' ', 'T'));\n\n if (isNaN(date.getTime())) return '';\n\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n};\n"],"names":[],"mappings":"AAgBa,MAAA,iBAAA,GAAoB,CAAC,OAAoB,KAAA;AACpD,EAAI,IAAA,CAAC,SAAgB,OAAA,EAAA;AAErB,EAAA,MAAM,OAAO,IAAI,IAAA,CAAK,QAAQ,OAAQ,CAAA,GAAA,EAAK,GAAG,CAAC,CAAA;AAE/C,EAAA,IAAI,KAAM,CAAA,IAAA,CAAK,OAAQ,EAAC,GAAU,OAAA,EAAA;AAElC,EAAO,OAAA,IAAA,CAAK,mBAAmB,OAAS,EAAA;AAAA,IACtC,IAAM,EAAA,SAAA;AAAA,IACN,KAAO,EAAA,MAAA;AAAA,IACP,GAAK,EAAA;AAAA,GACN,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"stringUtils.esm.js","sources":["../../src/utils/stringUtils.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 */\n\nexport const convertDateFormat = (created: string) => {\n if (!created) return '';\n\n const date = new Date(created.replace(' ', 'T'));\n\n if (isNaN(date.getTime())) return '';\n\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n};\n"],"names":[],"mappings":"AAgBO,MAAM,iBAAA,GAAoB,CAAC,OAAA,KAAoB;AACpD,EAAA,IAAI,CAAC,SAAS,OAAO,EAAA;AAErB,EAAA,MAAM,OAAO,IAAI,IAAA,CAAK,QAAQ,OAAA,CAAQ,GAAA,EAAK,GAAG,CAAC,CAAA;AAE/C,EAAA,IAAI,KAAA,CAAM,IAAA,CAAK,OAAA,EAAS,GAAG,OAAO,EAAA;AAElC,EAAA,OAAO,IAAA,CAAK,mBAAmB,OAAA,EAAS;AAAA,IACtC,IAAA,EAAM,SAAA;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,GAAA,EAAK;AAAA,GACN,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-servicenow",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -59,14 +59,14 @@
59
59
  "postpack": "backstage-cli package postpack"
60
60
  },
61
61
  "dependencies": {
62
- "@backstage-community/plugin-servicenow-common": "^1.8.0",
63
- "@backstage/catalog-model": "^1.7.6",
64
- "@backstage/core-compat-api": "^0.5.8",
65
- "@backstage/core-components": "^0.18.7",
66
- "@backstage/core-plugin-api": "^1.12.3",
67
- "@backstage/frontend-plugin-api": "^0.14.1",
68
- "@backstage/plugin-catalog-react": "^2.0.0",
69
- "@backstage/theme": "^0.7.2",
62
+ "@backstage-community/plugin-servicenow-common": "^1.10.0",
63
+ "@backstage/catalog-model": "^1.8.0",
64
+ "@backstage/core-compat-api": "^0.5.10",
65
+ "@backstage/core-components": "^0.18.9",
66
+ "@backstage/core-plugin-api": "^1.12.5",
67
+ "@backstage/frontend-plugin-api": "^0.16.2",
68
+ "@backstage/plugin-catalog-react": "^2.1.4",
69
+ "@backstage/theme": "^0.7.3",
70
70
  "@mui/icons-material": "^5.15.17",
71
71
  "@mui/lab": "^5.0.0-alpha.153",
72
72
  "@mui/material": "^5.17.1",
@@ -82,15 +82,16 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@axe-core/playwright": "^4.11.0",
85
- "@backstage/cli": "^0.35.4",
86
- "@backstage/core-app-api": "^1.19.5",
87
- "@backstage/dev-utils": "^1.1.20",
88
- "@backstage/frontend-test-utils": "^0.5.0",
89
- "@backstage/test-utils": "^1.7.15",
85
+ "@backstage/cli": "^0.36.1",
86
+ "@backstage/core-app-api": "^1.20.0",
87
+ "@backstage/dev-utils": "^1.1.22",
88
+ "@backstage/frontend-test-utils": "^0.5.2",
89
+ "@backstage/test-utils": "^1.7.17",
90
90
  "@material-ui/core": "^4.12.4",
91
91
  "@playwright/test": "^1.57.0",
92
+ "@testing-library/dom": "^10.4.1",
92
93
  "@testing-library/jest-dom": "^6.0.0",
93
- "@testing-library/react": "^14.0.0",
94
+ "@testing-library/react": "^16.0.0",
94
95
  "@testing-library/user-event": "^14.0.0",
95
96
  "msw": "^1.0.0",
96
97
  "react": "^16.13.1 || ^17.0.0 || ^18.0.0",