@techdocs/cli 0.0.0-nightly-20260306031014 → 0.0.0-nightly-20260307030244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -4
- package/dist/embedded-app/.config-schema.json +70 -70
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{123.d45a6081.chunk.js → 123.7f1a19ae.chunk.js} +1 -1
- package/dist/embedded-app/static/{1659.7ed9d7a7.chunk.js → 1659.e3bc74f2.chunk.js} +1 -1
- package/dist/embedded-app/static/{4587.01ab4137.chunk.js → 4587.d7f8c840.chunk.js} +1 -1
- package/dist/embedded-app/static/639.c2c92f37.chunk.js +5 -0
- package/dist/embedded-app/static/639.c2c92f37.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.90e54728.js +523 -0
- package/dist/embedded-app/static/main.90e54728.js.map +1 -0
- package/dist/embedded-app/static/{runtime.bcb80e35.js → runtime.ad7548f4.js} +2 -2
- package/dist/embedded-app/static/{runtime.bcb80e35.js.map → runtime.ad7548f4.js.map} +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/639.6d4b8d5f.chunk.js +0 -5
- package/dist/embedded-app/static/639.6d4b8d5f.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.ee78bbaa.js +0 -523
- package/dist/embedded-app/static/main.ee78bbaa.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20260307030244
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 70fc178: Migrated from deprecated `findPaths` to `targetPaths` and `findOwnPaths` from `@backstage/cli-common`.
|
|
8
8
|
- de62a9d: Upgraded `commander` dependency from `^12.0.0` to `^14.0.3` across all CLI packages.
|
|
9
9
|
- Updated dependencies
|
|
10
|
-
- @backstage/cli-common@0.0.0-nightly-
|
|
11
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
12
|
-
- @backstage/backend-defaults@0.0.0-nightly-
|
|
10
|
+
- @backstage/cli-common@0.0.0-nightly-20260307030244
|
|
11
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20260307030244
|
|
12
|
+
- @backstage/backend-defaults@0.0.0-nightly-20260307030244
|
|
13
13
|
- @backstage/catalog-model@1.7.6
|
|
14
14
|
- @backstage/config@1.3.6
|
|
15
15
|
|
|
@@ -1215,6 +1215,52 @@
|
|
|
1215
1215
|
},
|
|
1216
1216
|
"packageName": "@backstage/backend-plugin-api"
|
|
1217
1217
|
},
|
|
1218
|
+
{
|
|
1219
|
+
"path": "../../plugins/auth-backend-module-guest-provider/config.d.ts",
|
|
1220
|
+
"value": {
|
|
1221
|
+
"type": "object",
|
|
1222
|
+
"properties": {
|
|
1223
|
+
"auth": {
|
|
1224
|
+
"description": "Configuration options for the auth plugin",
|
|
1225
|
+
"type": "object",
|
|
1226
|
+
"properties": {
|
|
1227
|
+
"providers": {
|
|
1228
|
+
"type": "object",
|
|
1229
|
+
"properties": {
|
|
1230
|
+
"guest": {
|
|
1231
|
+
"type": "object",
|
|
1232
|
+
"properties": {
|
|
1233
|
+
"userEntityRef": {
|
|
1234
|
+
"description": "The entity reference to use for the guest user.",
|
|
1235
|
+
"default": "user:development/guest",
|
|
1236
|
+
"type": "string"
|
|
1237
|
+
},
|
|
1238
|
+
"ownershipEntityRefs": {
|
|
1239
|
+
"description": "A list of entity references to user for ownership of the guest user if the user\n is not found in the catalog.",
|
|
1240
|
+
"default": "[userEntityRef]",
|
|
1241
|
+
"type": "array",
|
|
1242
|
+
"items": {
|
|
1243
|
+
"type": "string"
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
"dangerouslyAllowOutsideDevelopment": {
|
|
1247
|
+
"description": "Allow users to sign in with the guest provider outside of their development environments.",
|
|
1248
|
+
"type": "boolean"
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
"required": [
|
|
1256
|
+
"providers"
|
|
1257
|
+
]
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1261
|
+
},
|
|
1262
|
+
"packageName": "@backstage/plugin-auth-backend-module-guest-provider"
|
|
1263
|
+
},
|
|
1218
1264
|
{
|
|
1219
1265
|
"path": "../../plugins/auth-backend/config.d.ts",
|
|
1220
1266
|
"value": {
|
|
@@ -1420,52 +1466,6 @@
|
|
|
1420
1466
|
},
|
|
1421
1467
|
"packageName": "@backstage/plugin-auth-backend"
|
|
1422
1468
|
},
|
|
1423
|
-
{
|
|
1424
|
-
"path": "../../plugins/auth-backend-module-guest-provider/config.d.ts",
|
|
1425
|
-
"value": {
|
|
1426
|
-
"type": "object",
|
|
1427
|
-
"properties": {
|
|
1428
|
-
"auth": {
|
|
1429
|
-
"description": "Configuration options for the auth plugin",
|
|
1430
|
-
"type": "object",
|
|
1431
|
-
"properties": {
|
|
1432
|
-
"providers": {
|
|
1433
|
-
"type": "object",
|
|
1434
|
-
"properties": {
|
|
1435
|
-
"guest": {
|
|
1436
|
-
"type": "object",
|
|
1437
|
-
"properties": {
|
|
1438
|
-
"userEntityRef": {
|
|
1439
|
-
"description": "The entity reference to use for the guest user.",
|
|
1440
|
-
"default": "user:development/guest",
|
|
1441
|
-
"type": "string"
|
|
1442
|
-
},
|
|
1443
|
-
"ownershipEntityRefs": {
|
|
1444
|
-
"description": "A list of entity references to user for ownership of the guest user if the user\n is not found in the catalog.",
|
|
1445
|
-
"default": "[userEntityRef]",
|
|
1446
|
-
"type": "array",
|
|
1447
|
-
"items": {
|
|
1448
|
-
"type": "string"
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
"dangerouslyAllowOutsideDevelopment": {
|
|
1452
|
-
"description": "Allow users to sign in with the guest provider outside of their development environments.",
|
|
1453
|
-
"type": "boolean"
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
},
|
|
1460
|
-
"required": [
|
|
1461
|
-
"providers"
|
|
1462
|
-
]
|
|
1463
|
-
}
|
|
1464
|
-
},
|
|
1465
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1466
|
-
},
|
|
1467
|
-
"packageName": "@backstage/plugin-auth-backend-module-guest-provider"
|
|
1468
|
-
},
|
|
1469
1469
|
{
|
|
1470
1470
|
"path": "../backend-app-api/config.d.ts",
|
|
1471
1471
|
"value": {
|
|
@@ -1565,6 +1565,30 @@
|
|
|
1565
1565
|
},
|
|
1566
1566
|
"packageName": "@backstage/backend-app-api"
|
|
1567
1567
|
},
|
|
1568
|
+
{
|
|
1569
|
+
"path": "../../plugins/events-node/config.d.ts",
|
|
1570
|
+
"value": {
|
|
1571
|
+
"type": "object",
|
|
1572
|
+
"properties": {
|
|
1573
|
+
"events": {
|
|
1574
|
+
"type": "object",
|
|
1575
|
+
"properties": {
|
|
1576
|
+
"useEventBus": {
|
|
1577
|
+
"description": "Whether to use the event bus API in the events plugin backend to\ndistribute events across multiple instances when publishing and\nsubscribing to events.\n\nThe default is 'auto', which means means that the event bus API will be\nused if it's available, but will be disabled if the events backend\nreturns a 404.\n\nIf set to 'never', the events service will only ever publish events\nlocally to the same instance, while if set to 'always', the event bus API\nwill never be disabled, even if the events backend returns a 404.",
|
|
1578
|
+
"enum": [
|
|
1579
|
+
"always",
|
|
1580
|
+
"auto",
|
|
1581
|
+
"never"
|
|
1582
|
+
],
|
|
1583
|
+
"type": "string"
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
},
|
|
1588
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1589
|
+
},
|
|
1590
|
+
"packageName": "@backstage/plugin-events-node"
|
|
1591
|
+
},
|
|
1568
1592
|
{
|
|
1569
1593
|
"path": "../backend-defaults/config.d.ts",
|
|
1570
1594
|
"value": {
|
|
@@ -3274,30 +3298,6 @@
|
|
|
3274
3298
|
},
|
|
3275
3299
|
"packageName": "@backstage/backend-defaults"
|
|
3276
3300
|
},
|
|
3277
|
-
{
|
|
3278
|
-
"path": "../../plugins/events-node/config.d.ts",
|
|
3279
|
-
"value": {
|
|
3280
|
-
"type": "object",
|
|
3281
|
-
"properties": {
|
|
3282
|
-
"events": {
|
|
3283
|
-
"type": "object",
|
|
3284
|
-
"properties": {
|
|
3285
|
-
"useEventBus": {
|
|
3286
|
-
"description": "Whether to use the event bus API in the events plugin backend to\ndistribute events across multiple instances when publishing and\nsubscribing to events.\n\nThe default is 'auto', which means means that the event bus API will be\nused if it's available, but will be disabled if the events backend\nreturns a 404.\n\nIf set to 'never', the events service will only ever publish events\nlocally to the same instance, while if set to 'always', the event bus API\nwill never be disabled, even if the events backend returns a 404.",
|
|
3287
|
-
"enum": [
|
|
3288
|
-
"always",
|
|
3289
|
-
"auto",
|
|
3290
|
-
"never"
|
|
3291
|
-
],
|
|
3292
|
-
"type": "string"
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3295
|
-
}
|
|
3296
|
-
},
|
|
3297
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
3298
|
-
},
|
|
3299
|
-
"packageName": "@backstage/plugin-events-node"
|
|
3300
|
-
},
|
|
3301
3301
|
{
|
|
3302
3302
|
"path": "../../plugins/auth-backend-module-google-provider/config.d.ts",
|
|
3303
3303
|
"value": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="color-scheme" content="light dark"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="color-scheme" content="light dark"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.ad7548f4.js"></script><script defer="defer" src="/static/module-material-ui.04de94f5.js"></script><script defer="defer" src="/static/module-lodash.c8595dcc.js"></script><script defer="defer" src="/static/module-react-aria.4a2c1c52.js"></script><script defer="defer" src="/static/module-ajv.ac283755.js"></script><script defer="defer" src="/static/module-mui.9c07ad9e.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.d049c8fc.js"></script><script defer="defer" src="/static/module-parse5.94980036.js"></script><script defer="defer" src="/static/module-zod.60f202c8.js"></script><script defer="defer" src="/static/module-react-dom.c631e87d.js"></script><script defer="defer" src="/static/module-react-hook-form.1d49754b.js"></script><script defer="defer" src="/static/module-i18next.c154323c.js"></script><script defer="defer" src="/static/module-remixicon.e05879ad.js"></script><script defer="defer" src="/static/module-remix-run.0c80eb31.js"></script><script defer="defer" src="/static/vendor.3485c2d8.js"></script><script defer="defer" src="/static/main.90e54728.js"></script><link href="/static/main.4889723f.css" rel="stylesheet"><script type="backstage.io/config">[
|
|
2
2
|
{
|
|
3
3
|
"context": "app-config.yaml",
|
|
4
4
|
"data": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
color="#5bbad5"
|
|
44
44
|
/>
|
|
45
45
|
<title><%= config.getString('app.title') %></title>
|
|
46
|
-
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.
|
|
46
|
+
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.ad7548f4.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.04de94f5.js"></script><script defer src="<%= publicPath %>/static/module-lodash.c8595dcc.js"></script><script defer src="<%= publicPath %>/static/module-react-aria.4a2c1c52.js"></script><script defer src="<%= publicPath %>/static/module-ajv.ac283755.js"></script><script defer src="<%= publicPath %>/static/module-mui.9c07ad9e.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.d049c8fc.js"></script><script defer src="<%= publicPath %>/static/module-parse5.94980036.js"></script><script defer src="<%= publicPath %>/static/module-zod.60f202c8.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.c631e87d.js"></script><script defer src="<%= publicPath %>/static/module-react-hook-form.1d49754b.js"></script><script defer src="<%= publicPath %>/static/module-i18next.c154323c.js"></script><script defer src="<%= publicPath %>/static/module-remixicon.e05879ad.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.0c80eb31.js"></script><script defer src="<%= publicPath %>/static/vendor.3485c2d8.js"></script><script defer src="<%= publicPath %>/static/main.90e54728.js"></script><link href="<%= publicPath %>/static/main.4889723f.css" rel="stylesheet"></head>
|
|
47
47
|
<body>
|
|
48
48
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
49
49
|
<div id="root"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"0.0.0-nightly-
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"0.0.0-nightly-20260307030244","description":"The Backstage plugin for browsing the Backstage catalog","backstage":{"role":"frontend-plugin","pluginId":"catalog","pluginPackages":["@backstage/plugin-catalog","@backstage/plugin-catalog-backend","@backstage/plugin-catalog-common","@backstage/plugin-catalog-node","@backstage/plugin-catalog-react"]},"publishConfig":{"access":"public"},"keywords":["backstage"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/catalog"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.ts","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.ts"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:*","@backstage/catalog-model":"workspace:*","@backstage/core-compat-api":"workspace:*","@backstage/core-components":"workspace:*","@backstage/core-plugin-api":"workspace:*","@backstage/errors":"workspace:*","@backstage/frontend-plugin-api":"workspace:*","@backstage/integration-react":"workspace:*","@backstage/plugin-catalog-common":"workspace:*","@backstage/plugin-catalog-react":"workspace:*","@backstage/plugin-permission-react":"workspace:*","@backstage/plugin-scaffolder-common":"workspace:*","@backstage/plugin-search-common":"workspace:*","@backstage/plugin-search-react":"workspace:*","@backstage/plugin-techdocs-common":"workspace:*","@backstage/plugin-techdocs-react":"workspace:*","@backstage/types":"workspace:*","@backstage/ui":"workspace:*","@backstage/version-bridge":"workspace:*","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@mui/utils":"^5.14.15","classnames":"^2.3.1","dataloader":"^2.0.0","history":"^5.0.0","lodash":"^4.17.21","pluralize":"^8.0.0","react-helmet":"6.1.0","react-use":"^17.2.4","zen-observable":"^0.10.0"},"devDependencies":{"@backstage/cli":"workspace:*","@backstage/core-app-api":"workspace:*","@backstage/dev-utils":"workspace:*","@backstage/frontend-test-utils":"workspace:*","@backstage/plugin-permission-common":"workspace:*","@backstage/test-utils":"workspace:*","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/pluralize":"^0.0.33","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2","swr":"^2.2.5"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1659"],{23494(e){e.exports=JSON.parse('{"name":"@backstage/plugin-techdocs","version":"0.0.0-nightly-
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1659"],{23494(e){e.exports=JSON.parse('{"name":"@backstage/plugin-techdocs","version":"0.0.0-nightly-20260307030244","description":"The Backstage plugin that renders technical documentation for your components","backstage":{"role":"frontend-plugin","pluginId":"techdocs","pluginPackages":["@backstage/plugin-techdocs","@backstage/plugin-techdocs-backend","@backstage/plugin-techdocs-common","@backstage/plugin-techdocs-node","@backstage/plugin-techdocs-react"]},"publishConfig":{"access":"public"},"keywords":["backstage","techdocs"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/techdocs"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.tsx","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.tsx"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:*","@backstage/catalog-model":"workspace:*","@backstage/config":"workspace:*","@backstage/core-components":"workspace:*","@backstage/core-plugin-api":"workspace:*","@backstage/errors":"workspace:*","@backstage/frontend-plugin-api":"workspace:*","@backstage/integration":"workspace:*","@backstage/integration-react":"workspace:*","@backstage/plugin-auth-react":"workspace:*","@backstage/plugin-catalog-react":"workspace:*","@backstage/plugin-search-common":"workspace:*","@backstage/plugin-search-react":"workspace:*","@backstage/plugin-techdocs-common":"workspace:*","@backstage/plugin-techdocs-react":"workspace:*","@backstage/theme":"workspace:*","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@material-ui/styles":"^4.10.0","@microsoft/fetch-event-source":"^2.0.1","dompurify":"^3.3.2","git-url-parse":"^15.0.0","lodash":"^4.17.21","react-helmet":"6.1.0","react-use":"^17.2.4"},"devDependencies":{"@backstage/cli":"workspace:*","@backstage/core-app-api":"workspace:*","@backstage/dev-utils":"workspace:*","@backstage/plugin-catalog":"workspace:*","@backstage/plugin-techdocs-module-addons-contrib":"workspace:*","@backstage/test-utils":"workspace:*","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/dompurify":"^3.0.0","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["4587"],{20534(e){e.exports=JSON.parse('{"name":"@backstage/plugin-app","version":"0.0.0-nightly-
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["4587"],{20534(e){e.exports=JSON.parse('{"name":"@backstage/plugin-app","version":"0.0.0-nightly-20260307030244","backstage":{"role":"frontend-plugin","pluginId":"app","pluginPackages":["@backstage/plugin-app","@backstage/plugin-app-backend","@backstage/plugin-app-node","@backstage/plugin-app-react"]},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/app"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.ts","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.ts"],"package.json":["package.json"]}},"files":["dist"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/core-components":"workspace:*","@backstage/core-plugin-api":"workspace:*","@backstage/frontend-plugin-api":"workspace:*","@backstage/integration-react":"workspace:*","@backstage/plugin-app-react":"workspace:*","@backstage/plugin-permission-react":"workspace:*","@backstage/theme":"workspace:*","@backstage/types":"workspace:*","@backstage/ui":"workspace:*","@backstage/version-bridge":"workspace:*","@material-ui/core":"^4.9.13","@material-ui/icons":"^4.9.1","@material-ui/lab":"^4.0.0-alpha.61","@react-hookz/web":"^24.0.0","react-use":"^17.2.4","zod":"^3.25.76"},"devDependencies":{"@backstage/cli":"workspace:*","@backstage/dev-utils":"workspace:*","@backstage/frontend-defaults":"workspace:*","@backstage/frontend-test-utils":"workspace:*","@backstage/test-utils":"workspace:*","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/react":"^18.0.0","msw":"^1.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}}}')}}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["639"],{71906(e,t,a){a.d(t,{EntityLabelsCard:()=>eE});var r=a(31085),l=a(22845),s=a(28180),i=a(64947),o=a(72501),n=a(58837),c=a(4809),u=a(50010),d=a(89595);let b=`metadata:
|
|
2
|
+
name: example
|
|
3
|
+
labels:
|
|
4
|
+
javaVersion: 1.2.3`,h=(0,n.A)(e=>({code:{borderRadius:6,margin:e.spacing(2,0),background:"dark"===e.palette.type?"#444":e.palette.common.white}}),{name:"PluginCatalogEntityLabelsEmptyState"});function p(){let e=h(),{t}=(0,d.i)(u.W);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{variant:"body1",children:t("entityLabelsCard.emptyDescription")}),(0,r.jsx)("div",{className:e.code,children:(0,r.jsx)(c.z,{text:b,language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})}),(0,r.jsx)(i.A,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#labels-optional",children:t("entityLabelsCard.readMoreButtonTitle")})]})}var m=a(69749),g=a(12860),f=a(2686),v=a(68133),x=a(48119);let C={"bui-Table":"kHZPXvGYPYAGYFhf","bui-TableHeader":"oifZQr6gC_QyhRzd","bui-TableHead":"X8xcDL8E6rIYbeSR","bui-TableHeadSelection":"ae9pE72Zc07f8L6W","bui-TableHeadContent":"d_1Lwe7cMab7Y7x8","bui-TableHeadSortButton":"U0p16BfATSMI0pZa","bui-TableBody":"RevIL7d7UeIjyBcV","bui-TableRow":"kPJhRwYa5RAAhwxF","bui-TableCell":"lBJ1evBwz18CSuEb","bui-TableCellSelection":"waN8m81er3MmoNwQ","bui-TableCellContentWrapper":"AQrmv2_3dWQm8mkC","bui-TableCellIcon":"pZfxgqebmIQNGPFo","bui-TableCellContent":"VL_PIHABTKklOpWr","bui-TableCellProfile":"qco3EFeJwhQRop02"},S=(0,x.p)()({styles:C,classNames:{root:"bui-Table"},propDefs:{stale:{dataAttribute:!0}}}),N=(0,x.p)()({styles:C,classNames:{root:"bui-TableHeader",headSelection:"bui-TableHeadSelection"},propDefs:{columns:{},children:{}}}),P=(0,x.p)()({styles:C,classNames:{root:"bui-TableBody"},propDefs:{}}),j=(0,x.p)()({styles:C,analytics:!0,classNames:{root:"bui-TableRow",cell:"bui-TableCell",cellSelection:"bui-TableCellSelection"},propDefs:{columns:{},children:{},href:{},noTrack:{}}}),y=(0,x.p)()({styles:C,classNames:{root:"bui-TableHead",headContent:"bui-TableHeadContent",headSortButton:"bui-TableHeadSortButton"},propDefs:{children:{},className:{}}});(0,x.p)()({styles:C,classNames:{root:"bui-TableCell"},propDefs:{className:{}}});let w=(0,x.p)()({styles:C,classNames:{root:"bui-TableCell",cellContentWrapper:"bui-TableCellContentWrapper",cellContent:"bui-TableCellContent",cellIcon:"bui-TableCellIcon"},propDefs:{title:{},description:{},color:{default:"primary"},leadingIcon:{},href:{},className:{}}});(0,x.p)()({styles:C,classNames:{root:"bui-TableCell",cellContentWrapper:"bui-TableCellContentWrapper",cellContent:"bui-TableCellContent"},propDefs:{src:{},name:{},href:{},description:{},color:{default:"primary"},className:{}}});let T=e=>{let{ownProps:t,restProps:a}=(0,v.Z)(w,e),{classes:l,title:s,description:i,color:o,leadingIcon:n,href:c}=t;return(0,r.jsx)(f.fh,{className:l.root,...a,children:(0,r.jsxs)("div",{className:l.cellContentWrapper,children:[n&&(0,r.jsx)("div",{className:l.cellIcon,children:n}),(0,r.jsxs)("div",{className:l.cellContent,children:[c?(0,r.jsx)(g.N,{href:c,variant:"body-medium",color:o,truncate:!0,title:s,children:s}):(0,r.jsx)(m.E,{as:"p",variant:"body-medium",color:o,truncate:!0,title:s,children:s}),i&&(0,r.jsx)(m.E,{variant:"body-medium",color:"secondary",truncate:!0,title:i,children:i})]})]})})};T.displayName="CellText";var k=a(14041);function z(e,t,a){let[r,l]=(0,k.useState)(e);return[void 0!==t?t:r,(0,k.useCallback)(e=>{void 0===t&&l(e),a&&a(e)},[t,a])]}function L(e){let t=(0,k.useRef)(e);return t.current=e,(0,k.useCallback)((...e)=>t.current(...e),[])}function I(e){return"number"==typeof e?e:e.value}function A(e){let{pageSize:t,pageSizeOptions:a}=e;if(!a)return t??20;let r=I(a[0]);return void 0===t?r:a.some(e=>I(e)===t)?t:(console.warn(`useTable: pageSize ${t} is not in pageSizeOptions, using ${r} instead`),r)}let D=Symbol("firstPage");class F{cache=new Map;get(e){return this.cache.get(e)}getOrCreate(e){let t=this.cache.get(e);if(t)return t;let a={data:void 0,nextCursor:void 0,prevCursor:void 0};return this.cache.set(e,a),a}clear(){this.cache.clear()}getTargetCursor(e,t,a){if("mount"===e)return E(a);if("reset"===e)return D;if("refresh"===e)return t;let r=this.cache.get(t);if(r)return"next"===e?r.nextCursor:r.prevCursor}linkEntryToSource(e,t,a){"next"===t?e.prevCursor=a:"prev"===t&&(e.nextCursor=a)}}function E(e){return void 0===e?D:e}function R(e){return e===D?void 0:e}function M(e){let{getData:t,initialCurrentCursor:a}=e,[r,l]=(0,k.useState)(()=>E(a)),s=(0,k.useRef)(new F).current,[i,o]=(0,k.useState)(!0),[n,c]=(0,k.useState)(void 0),[u,d]=(0,k.useState)(void 0),b=(0,k.useRef)(null),h=s.get(r),p=h?.data,m=h?.nextCursor!==void 0,g=h?.prevCursor!==void 0,f=(0,k.useCallback)(async e=>{let i=s.getTargetCursor(e,r,a);if(!i)return;let n=s.get(i);if(n?.data!==void 0)return void l(i);let u=s.getOrCreate(i);s.linkEntryToSource(u,e,r),l(i),b.current&&b.current.abort();let h=new AbortController;b.current=h,o(!0),c(void 0);try{let e=await t({cursor:R(i),signal:h.signal});if(h.signal.aborted)return;u.data=e.data,void 0===u.nextCursor&&void 0!==e.nextCursor&&(u.nextCursor=e.nextCursor),void 0===u.prevCursor&&void 0!==e.prevCursor&&(u.prevCursor=e.prevCursor),void 0!==e.totalCount&&d(e.totalCount),o(!1)}catch(e){if(h.signal.aborted)return;c(e instanceof Error?e:Error(String(e))),o(!1)}},[t,a,r,s]);(0,k.useEffect)(()=>(f("mount"),()=>{b.current&&b.current.abort()}),[]);let v=(0,k.useCallback)(()=>{if(i)return;let e=s.get(r);e?.nextCursor&&f("next")},[i,r,f,s]),x=(0,k.useCallback)(()=>{if(i)return;let e=s.get(r);e?.prevCursor&&f("prev")},[i,r,f,s]),C=(0,k.useCallback)(e=>{b.current&&b.current.abort(),s.clear(),f(e?.keepCurrentCursor?"refresh":"reset")},[f,s]);return{loading:i,error:n,data:p,totalCount:u,currentCursor:R(r),hasPreviousPage:g,onPreviousPage:x,hasNextPage:m,onNextPage:v,reload:C}}function W(e,t,a,r=200){let l=(0,k.useRef)({query:e,pageSize:t});(0,k.useEffect)(()=>{let s=l.current;if(s.query!==e||s.pageSize!==t){l.current={query:e,pageSize:t};let s=setTimeout(a,r);return()=>clearTimeout(s)}},[e,t,a,r])}var Z=a(13507);let B=e=>{let{ownProps:t,restProps:a,dataAttributes:l}=(0,v.Z)(S,e);return(0,r.jsx)(f.XI,{className:t.classes.root,"aria-label":"Data table","aria-busy":t.stale,...l,...a})};var H=a(18907),O=a(1477);let _=(0,x.p)()({styles:{"bui-Checkbox":"hJtmqCNU8SMp97Lu","bui-CheckboxIndicator":"AsCZ8LTTAs5lRnNR"},classNames:{root:"bui-Checkbox",indicator:"bui-CheckboxIndicator"},propDefs:{selected:{dataAttribute:!0},indeterminate:{dataAttribute:!0},children:{},className:{}}});var $=a(63690);let V=(0,k.forwardRef)((e,t)=>{let{ownProps:a,restProps:l,dataAttributes:s}=(0,v.Z)(_,e),{classes:i,children:o}=a;return(0,r.jsx)(O.Sc,{ref:t,className:i.root,...s,...l,children:({isIndeterminate:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:i.indicator,children:e?(0,r.jsx)($.oev,{size:12}):(0,r.jsx)($.s0,{size:12})}),o]})})}),q=e=>{let{ownProps:t,restProps:a}=(0,v.Z)(y,e),{classes:l,children:s}=t;return(0,r.jsx)(f.VP,{className:l.root,...a,children:({allowsSorting:e})=>(0,r.jsxs)("div",{className:l.headContent,children:[s,e&&(0,r.jsx)("span",{"aria-hidden":"true",className:l.headSortButton,children:(0,r.jsx)($.avw,{size:16})})]})})};var Q=a(73880);let Y=e=>{let{selectionBehavior:t,selectionMode:a}=(0,f.mz)(),{ownProps:l,restProps:s}=(0,v.Z)(N,e),{classes:i,columns:o,children:n}=l;return(0,r.jsxs)(f.A0,{className:i.root,...s,children:["toggle"===t&&"multiple"===a&&(0,r.jsx)(q,{width:40,minWidth:40,maxWidth:40,className:i.headSelection,children:(0,r.jsx)(Q.s,{justify:"center",align:"center",children:(0,r.jsx)(V,{slot:"selection",children:(0,r.jsx)(r.Fragment,{})})})}),(0,r.jsx)(H.pM,{items:o,children:n})]})},K=e=>{let{ownProps:t,restProps:a}=(0,v.Z)(P,e);return(0,r.jsx)(f.BF,{className:t.classes.root,...a})};var J=a(91282),G=a(83511),X=a(54357);function U(e){let{ownProps:t,restProps:a,analytics:l}=(0,v.Z)(j,e),{classes:s,columns:i,children:o,href:n}=t,c=!!n&&!(0,J.i)(n),{selectionBehavior:u,selectionMode:d}=(0,f.mz)(),b=(0,r.jsxs)(r.Fragment,{children:["toggle"===u&&"multiple"===d&&(0,r.jsx)(f.fh,{className:(0,X.A)(s.cell,s.cellSelection),children:(0,r.jsx)(Q.s,{justify:"center",align:"center",children:(0,r.jsx)(V,{slot:"selection",children:(0,r.jsx)(r.Fragment,{})})})}),(0,r.jsx)(H.pM,{items:i,children:o})]});return(0,r.jsx)(G.$7,{href:n,children:(0,r.jsx)(f.fI,{href:n,className:s.root,"data-react-aria-pressable":c?"true":void 0,...a,onAction:()=>{a.onAction?.(),n&&l.captureEvent("click",n,{attributes:{to:String(n)}})},children:b})})}var ee=a(60621),et=a(75331);let ea=(0,x.p)()({styles:{"bui-ButtonIcon":"oswl8eimGwGMv65g","bui-ButtonIconContent":"nupI988ZoWQXN2ow","bui-ButtonIconSpinner":"S0ip8O7B0EhQCtAt","bui-spin":"wvp018_1ftcIUJUQ"},classNames:{root:"bui-ButtonIcon",content:"bui-ButtonIconContent",spinner:"bui-ButtonIconSpinner"},bg:"consumer",propDefs:{size:{dataAttribute:!0,default:"small"},variant:{dataAttribute:!0,default:"primary"},loading:{dataAttribute:!0},icon:{},className:{}}}),er=(0,k.forwardRef)((e,t)=>{let{ownProps:a,restProps:l,dataAttributes:s}=(0,v.Z)(ea,e),{classes:i,icon:o,loading:n}=a;return(0,r.jsx)(ee.$,{className:i.root,ref:t,isPending:n,...s,...l,children:({isPending:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:i.content,children:o}),e&&(0,r.jsx)(et.z,{"aria-label":"Loading",isIndeterminate:!0,className:i.spinner,children:(0,r.jsx)($.xNY,{"aria-hidden":"true"})})]})})});er.displayName="ButtonIcon";var el=a(42750),es=a(85024);let ei={"bui-Select":"fl_o2cRttX8vIo5j","bui-SelectPopover":"xRoZ59Ta50wTyFbP","bui-SelectTrigger":"f6xSegNfnDAA591f","bui-SelectTriggerChevron":"hey3g7_Ll4EtTJdE","bui-SelectValue":"EOuke6Cxn9cos7ok","bui-SelectItemIndicator":"LiF4f9w5zcb_V5q_","bui-SelectList":"wCPzC0hbf30wVMOp","bui-SelectItem":"Mn7kwp0_L8g4rWcf","bui-SelectItemLabel":"sG8NrKzlnq4NyoHP","bui-SelectSearchWrapper":"af0jN5t2MnkzSKwM","bui-SelectSearch":"MAcGzHfmHVw4bkcS","bui-SelectSearchClear":"Qm0LMYJXqDozSs4J","bui-SelectNoResults":"mai_FHtvkacjqFtg"},eo=(0,x.p)()({styles:ei,classNames:{root:"bui-Select",popover:"bui-SelectPopover"},propDefs:{icon:{},size:{dataAttribute:!0,default:"small"},options:{},searchable:{},searchPlaceholder:{},label:{},secondaryLabel:{},description:{},isRequired:{},className:{}}}),en=(0,x.p)()({styles:ei,classNames:{root:"bui-SelectTrigger",chevron:"bui-SelectTriggerChevron",value:"bui-SelectValue"},bg:"consumer",propDefs:{icon:{}}}),ec=(0,x.p)()({styles:ei,classNames:{root:"bui-SelectSearchWrapper",search:"bui-SelectSearch",searchClear:"bui-SelectSearchClear"},propDefs:{searchable:{},searchPlaceholder:{default:"Search..."},options:{}}}),eu=(0,x.p)()({styles:ei,classNames:{root:"bui-SelectList",item:"bui-SelectItem",itemIndicator:"bui-SelectItemIndicator",itemLabel:"bui-SelectItemLabel",noResults:"bui-SelectNoResults"},propDefs:{options:{}}}),ed=(0,x.p)()({styles:{"bui-Popover":"c6K43dAXzUIQYTPO","bui-PopoverArrow":"nWNOVN9SSAkDCJc4","bui-PopoverContent":"ndXnur8atSwrX9tW"},classNames:{root:"bui-Popover",arrow:"bui-PopoverArrow",content:"bui-PopoverContent"},propDefs:{children:{},hideArrow:{},className:{}}});var eb=a(36753);let eh=(0,x.p)()({styles:{"bui-FieldLabelWrapper":"QCxpyIls6to9Bn5w","bui-FieldLabel":"qjnrgCeKosN0HGNG","bui-FieldSecondaryLabel":"VAD8KU3Enrs4kH_k","bui-FieldDescription":"KsFBKeDCTE86ZANx"},classNames:{root:"bui-FieldLabelWrapper",label:"bui-FieldLabel",secondaryLabel:"bui-FieldSecondaryLabel",description:"bui-FieldDescription"},propDefs:{label:{},secondaryLabel:{},description:{},htmlFor:{},id:{},className:{}}}),ep=(0,k.forwardRef)((e,t)=>{let{ownProps:a,restProps:l}=(0,v.Z)(eh,e),{classes:s,label:i,secondaryLabel:o,description:n,htmlFor:c,id:u}=a;return i?(0,r.jsxs)("div",{className:s.root,...l,ref:t,children:[i&&(0,r.jsxs)(eb.J,{className:s.label,htmlFor:c,id:u,children:[i,o&&(0,r.jsxs)("span",{"aria-hidden":"true",className:s.secondaryLabel,children:["(",o,")"]})]}),n&&(0,r.jsx)("div",{className:s.description,children:n})]}):null});ep.displayName="FieldLabel";var em=a(97035);let eg=(0,x.p)()({styles:{"bui-FieldError":"Ai9iNkHuNwQ8kqsz"},classNames:{root:"bui-FieldError"},propDefs:{className:{}}}),ef=(0,k.forwardRef)((e,t)=>{let{ownProps:a,restProps:l}=(0,v.Z)(eg,e),{classes:s}=a;return(0,r.jsx)(em.b,{className:s.root,ref:t,...l})});function ev(e){let{ownProps:t,dataAttributes:a}=(0,v.Z)(en,e),{classes:l,icon:s}=t;return(0,r.jsxs)(ee.$,{className:l.root,...a,children:[s,(0,r.jsx)(el.yv,{className:l.value}),(0,r.jsx)("div",{className:l.chevron,children:(0,r.jsx)($.eQr,{"aria-hidden":"true"})})]})}ef.displayName="FieldError";var ex=a(33466),eC=a(62837),eS=a(21143),eN=a(19080),eP=a(88009),ej=a(40844);let ey=()=>{let{ownProps:e}=(0,v.Z)(eu,{}),{classes:t}=e;return(0,r.jsx)("div",{className:t.noResults,children:"No results found."})};function ew(e){let{ownProps:t}=(0,v.Z)(eu,e),{classes:a,options:l}=t;return(0,r.jsx)(eP.qF,{className:a.root,renderEmptyState:()=>(0,r.jsx)(ey,{}),children:l?.map(e=>(0,r.jsxs)(eP.nh,{id:e.value,textValue:e.label,className:a.item,isDisabled:e.disabled,children:[(0,r.jsx)("div",{className:a.itemIndicator,children:(0,r.jsx)($.s0,{})}),(0,r.jsx)(ej.E,{slot:"label",className:a.itemLabel,children:e.label})]},e.value))})}function eT(e){let{contains:t}=(0,eN.U)({sensitivity:"base"}),{ownProps:a}=(0,v.Z)(ec,e),{classes:l,searchable:s,searchPlaceholder:i,options:o}=a;return s?(0,r.jsxs)(ex.jT,{filter:t,children:[(0,r.jsxs)(eC.L,{autoFocus:!0,className:l.root,"aria-label":i,children:[(0,r.jsx)(eS.p,{placeholder:i,className:l.search}),(0,r.jsx)(ee.$,{className:l.searchClear,children:(0,r.jsx)($.qFd,{})})]}),(0,r.jsx)(ew,{options:o})]}):(0,r.jsx)(ew,{options:o})}let ek=(0,k.forwardRef)((e,t)=>{let{ownProps:a,restProps:l,dataAttributes:s}=(0,v.Z)(eo,{placeholder:"Select an option",...e}),{ownProps:i}=(0,v.Z)(ed,{}),{classes:o,label:n,description:c,options:u,icon:d,searchable:b,searchPlaceholder:h,isRequired:p,secondaryLabel:m}=a,g=l["aria-label"],f=l["aria-labelledby"];return(0,k.useEffect)(()=>{n||g||f||console.warn("Select requires either a visible label, aria-label, or aria-labelledby for accessibility")},[n,g,f]),(0,r.jsxs)(el.l6,{className:o.root,...s,ref:t,...l,children:[(0,r.jsx)(ep,{label:n,secondaryLabel:m||(p?"Required":null),description:c}),(0,r.jsx)(ev,{icon:d}),(0,r.jsx)(ef,{}),(0,r.jsx)(es.A,{className:(0,X.A)(i.classes.root,o.popover),...s,children:(0,r.jsx)(eT,{searchable:b,searchPlaceholder:h,options:u})})]})});ek.displayName="Select";let ez=(0,x.p)()({styles:{"bui-TablePagination":"Z_Iagacz0F1YYG04","bui-TablePaginationLeft":"N_pRbW6lVsY4Hdgf","bui-TablePaginationRight":"qXYnm03BkEcKl1FA","bui-TablePaginationSelect":"plzZlLJyZhc3wn3s"},classNames:{root:"bui-TablePagination",left:"bui-TablePaginationLeft",right:"bui-TablePaginationRight",select:"bui-TablePaginationSelect"},propDefs:{pageSize:{},pageSizeOptions:{default:[{label:"Show 5 results",value:5},{label:"Show 10 results",value:10},{label:"Show 20 results",value:20},{label:"Show 30 results",value:30},{label:"Show 40 results",value:40},{label:"Show 50 results",value:50}]},offset:{},totalCount:{},hasNextPage:{},hasPreviousPage:{},onNextPage:{},onPreviousPage:{},onPageSizeChange:{},showPageSizeOptions:{default:!0},getLabel:{}}});function eL(e){return"number"==typeof e?e:e.value}function eI(e){let{ownProps:t}=(0,v.Z)(ez,e),{classes:a,pageSize:l,pageSizeOptions:s,offset:i,totalCount:o,hasNextPage:n,hasPreviousPage:c,onNextPage:u,onPreviousPage:d,onPageSizeChange:b,showPageSizeOptions:h,getLabel:p}=t,g=(0,Z.Bi)(),f=(0,k.useMemo)(()=>s.length>0&&"number"==typeof s[0]?s.map(e=>({label:`Show ${e} results`,value:e})):s,[s]),x=(0,k.useMemo)(()=>{if(s.some(e=>eL(e)===l))return l;let e=eL(s[0]);return console.warn(`TablePagination: pageSize ${l} is not in pageSizeOptions, using ${e} instead`),e},[l,s]),C=void 0!==o&&0!==o,S=`${o} items`;if(p)S=p({pageSize:x,offset:i,totalCount:o});else if(void 0!==i){let e=i+1,t=Math.min(i+x,o??0);S=`${e} - ${t} of ${o}`}return(0,r.jsxs)("div",{className:a.root,children:[(0,r.jsx)("div",{className:a.left,children:h&&(0,r.jsx)(ek,{name:"pageSize",size:"small","aria-label":"Select table page size",options:f.map(e=>({label:e.label,value:String(e.value)})),defaultValue:x.toString(),onChange:e=>{let t=Number(e);b?.(t)},className:a.select})}),(0,r.jsxs)("div",{className:a.right,children:[C&&(0,r.jsx)(m.E,{as:"p",variant:"body-medium",id:g,children:S}),(0,r.jsx)(er,{variant:"secondary",size:"small",onClick:d,isDisabled:!c,icon:(0,r.jsx)($.vMW,{}),"aria-label":"Previous table page","aria-describedby":C?g:void 0}),(0,r.jsx)(er,{variant:"secondary",size:"small",onClick:u,isDisabled:!n,icon:(0,r.jsx)($.ye6,{}),"aria-label":"Next table page","aria-describedby":C?g:void 0})]})]})}let eA=(0,x.p)()({styles:{"bui-VisuallyHidden":"OoBjYfKAfnY5kPsk"},classNames:{root:"bui-VisuallyHidden"},propDefs:{className:{}}}),eD=e=>{let{ownProps:t,restProps:a}=(0,v.Z)(eA,e),{classes:l}=t;return(0,r.jsx)("div",{className:l.root,...a})};function eF({columnConfig:e,data:t,loading:a=!1,isStale:l=!1,error:s,pagination:i,sort:o,rowConfig:n,selection:c,emptyState:u,className:d,style:b}){let h=(0,Z.Bi)(),p=(0,k.useMemo)(()=>e.filter(e=>!e.isHidden),[e]),m=function({data:e,rowConfig:t}){return(0,k.useMemo)(()=>{if(e&&"function"!=typeof t&&t?.getIsDisabled)return e.reduce((e,a)=>(t.getIsDisabled?.(a)&&e.add(String(a.id)),e),new Set)},[e,t])}({data:t,rowConfig:n}),{mode:g,selected:v,behavior:x,onSelectionChange:C}=c||{};if(a&&!t)return(0,r.jsx)("div",{className:d,style:b,children:"Loading..."});if(s)return(0,r.jsxs)("div",{className:d,style:b,children:["Error: ",s.message]});let S=function(e,t,a){if(!a||"none"===e.type)return"";let{pageSize:r,offset:l,totalCount:s,getLabel:i}=e;if(t)return"Loading table data.";let o="Table page loaded. ";if(i)o+=i({pageSize:r,offset:l,totalCount:s});else if(void 0!==l){let e=l+1,t=Math.min(l+r,s??0);o+=`Showing ${e} to ${t} of ${s}`}return o}(i,l,void 0!==t),N=e.some(e=>null!=e.width||null!=e.minWidth||null!=e.maxWidth||null!=e.defaultWidth)?e=>(0,r.jsx)(f.tk,{children:e}):e=>(0,r.jsx)(r.Fragment,{children:e});return(0,r.jsxs)("div",{className:d,style:b,children:[(0,r.jsx)(eD,{"aria-live":"polite",id:h,children:S}),N((0,r.jsxs)(B,{selectionMode:g,selectionBehavior:x,selectedKeys:v,onSelectionChange:C,sortDescriptor:o?.descriptor??void 0,onSortChange:o?.onSortChange,disabledKeys:m,stale:l,"aria-describedby":h,children:[(0,r.jsx)(Y,{columns:p,children:e=>e.header?e.header():(0,r.jsx)(q,{id:e.id,isRowHeader:e.isRowHeader,allowsSorting:e.isSortable,width:e.width,defaultWidth:e.defaultWidth,minWidth:e.minWidth,maxWidth:e.maxWidth,children:e.label})}),(0,r.jsx)(K,{items:t,dependencies:[p],renderEmptyState:u?()=>(0,r.jsx)(Q.s,{p:"3",children:u}):void 0,children:e=>{let a=t?.indexOf(e)??-1;return"function"==typeof n?n({item:e,index:a}):(0,r.jsx)(U,{id:String(e.id),columns:p,href:n?.getHref?.(e),onAction:n?.onClick?()=>n?.onClick?.(e):void 0,children:t=>t.cell(e)})}})]})),"page"===i.type&&(0,r.jsx)(eI,{pageSize:i.pageSize,pageSizeOptions:i.pageSizeOptions,offset:i.offset,totalCount:i.totalCount,hasNextPage:i.hasNextPage,hasPreviousPage:i.hasPreviousPage,onNextPage:i.onNextPage,onPreviousPage:i.onPreviousPage,onPageSizeChange:i.onPageSizeChange,showPageSizeOptions:i.showPageSizeOptions,getLabel:i.getLabel})]})}let eE=e=>{let{title:t}=e,{entity:a}=(0,l.tN)(),{t:i}=(0,d.i)(u.W),o=a?.metadata?.labels,n=(0,k.useMemo)(()=>[{id:"key",label:i("entityLabelsCard.columnKeyLabel"),isRowHeader:!0,cell:e=>(0,r.jsx)(T,{title:e.key})},{id:"value",label:i("entityLabelsCard.columnValueLabel"),cell:e=>(0,r.jsx)(T,{title:e.value})}],[i]),{tableProps:c}=function(e){let t,a=function(e){let[t,a]=z(e.initialSort??null,e.sort,e.onSortChange),[r,l]=z(e.initialFilter,e.filter,e.onFilterChange),[s,i]=z(e.initialSearch??"",e.search,e.onSearchChange);return(0,k.useMemo)(()=>({sort:t,setSort:a,filter:r,setFilter:l,search:s,setSearch:i}),[t,a,r,l,s,i])}(e),r=(0,k.useRef)(e.mode);if(r.current!==e.mode)throw Error(`useTable mode cannot change from '${r.current}' to '${e.mode}'. The mode must remain stable for the lifetime of the component.`);if("complete"===e.mode)t=function(e,t){let{data:a,getData:r=()=>[],paginationOptions:l={},sortFn:s,filterFn:i,searchFn:o}=e,{initialOffset:n=0}=l,c=A(l),u=L(r),{sort:d,filter:b,search:h}=t,[p,m]=(0,k.useState)([]),[g,f]=(0,k.useState)(!a),[v,x]=(0,k.useState)(void 0),[C,S]=(0,k.useState)(0),[N,P]=(0,k.useState)(n),[j,y]=(0,k.useState)(c);(0,k.useEffect)(()=>{if(a)return;let e=!1;return f(!0),x(void 0),(async()=>{try{let t=u(),a=t instanceof Promise?await t:t;e||(m(a),f(!1))}catch(t){e||(x(t instanceof Error?t:Error(String(t))),f(!1))}})(),()=>{e=!0}},[a,u,C]);let w=(0,k.useRef)(t);(0,k.useEffect)(()=>{w.current!==t&&(w.current=t,P(0))},[t]);let T=(0,k.useMemo)(()=>a??p,[a,p]),z=(0,k.useMemo)(()=>{let e=[...T];return void 0!==b&&i&&(e=i(e,b)),h&&o&&(e=o(e,h)),d&&s&&(e=s(e,d)),e},[T,d,b,h,i,o,s]),I=z.length,D=(0,k.useMemo)(()=>z.slice(N,N+j),[z,N,j]),F=N+j<I,E=N>0,R=(0,k.useCallback)(()=>{N+j<I&&P(N+j)},[N,j,I]),M=(0,k.useCallback)(()=>{N>0&&P(Math.max(0,N-j))},[N,j]);return{data:D,loading:g,error:v,totalCount:I,offset:N,pageSize:j,hasNextPage:F,hasPreviousPage:E,onNextPage:R,onPreviousPage:M,onPageSizeChange:(0,k.useCallback)(e=>{y(e),P(0)},[]),reload:(0,k.useCallback)(()=>{P(0),S(e=>e+1)},[])}}(e,a);else if("offset"===e.mode)t=function(e,t){let{getData:a,paginationOptions:r={}}=e,{initialOffset:l=0}=r,s=A(r),i=L(a),{sort:o,filter:n,search:c}=t,[u,d]=(0,k.useState)(s),b=M({getData:(0,k.useCallback)(async({cursor:e,signal:t})=>{let a=e??0,r=await i({offset:a,pageSize:u,sort:o,filter:n,search:c,signal:t}),l=a>0?Math.max(0,a-u):void 0,s=a+u<r.totalCount?a+u:void 0;return{data:r.data,prevCursor:l,nextCursor:s,totalCount:r.totalCount}},[i,u,o,n,c]),initialCurrentCursor:l>0?l:void 0});W(t,u,b.reload);let h=(0,k.useCallback)(e=>d(e),[]);return{data:b.data,loading:b.loading,error:b.error,totalCount:b.totalCount,offset:b.currentCursor??0,pageSize:u,hasNextPage:b.hasNextPage,hasPreviousPage:b.hasPreviousPage,onNextPage:b.onNextPage,onPreviousPage:b.onPreviousPage,onPageSizeChange:h,reload:b.reload}}(e,a);else if("cursor"===e.mode)t=function(e,t){let{getData:a,paginationOptions:r={}}=e,l=A(r),s=L(a),{sort:i,filter:o,search:n}=t,[c,u]=(0,k.useState)(l),d=M({getData:(0,k.useCallback)(async({cursor:e,signal:t})=>{let a=await s({cursor:e,pageSize:c,sort:i,filter:o,search:n,signal:t});return{data:a.data,prevCursor:a.prevCursor,nextCursor:a.nextCursor,totalCount:a.totalCount}},[s,c,i,o,n])});W(t,c,d.reload);let b=(0,k.useCallback)(e=>u(e),[]);return{data:d.data,loading:d.loading,error:d.error,totalCount:d.totalCount,offset:void 0,pageSize:c,hasNextPage:d.hasNextPage,hasPreviousPage:d.hasPreviousPage,onNextPage:d.onNextPage,onPreviousPage:d.onPreviousPage,onPageSizeChange:b,reload:d.reload}}(e,a);else throw Error("Invalid mode");return{tableProps:function(e,t,a={}){let{showPageSizeOptions:r=!0,pageSizeOptions:l,onPageSizeChange:s,onNextPage:i,onPreviousPage:o,getLabel:n}=a,c=(0,k.useRef)(e.data);e.data&&(c.current=e.data);let u=e.data??c.current,d=e.loading&&void 0!==u,b=(0,k.useMemo)(()=>({type:"page",pageSize:e.pageSize,pageSizeOptions:l,offset:e.offset,totalCount:e.totalCount,hasNextPage:e.hasNextPage,hasPreviousPage:e.hasPreviousPage,onNextPage:()=>{e.onNextPage(),i?.()},onPreviousPage:()=>{e.onPreviousPage(),o?.()},onPageSizeChange:t=>{e.onPageSizeChange(t),s?.(t)},showPageSizeOptions:r,getLabel:n}),[e.pageSize,l,e.offset,e.totalCount,e.hasNextPage,e.hasPreviousPage,e.onNextPage,e.onPreviousPage,e.onPageSizeChange,i,o,s]);return(0,k.useMemo)(()=>({data:u,loading:e.loading,isStale:d,error:e.error,pagination:b,sort:t}),[u,e.loading,d,e.error,b,r,n,t])}(t,(0,k.useMemo)(()=>({descriptor:a.sort,onSortChange:a.setSort}),[a.sort,a.setSort]),e.paginationOptions??{}),reload:t.reload,filter:{value:a.filter,onChange:a.setFilter},search:{value:a.search,onChange:a.setSearch}}}({mode:"complete",data:(0,k.useMemo)(()=>Object.keys(o??{}).map(e=>({id:e,key:e,value:o[e]})),[o]),paginationOptions:{pageSize:5}});return(0,r.jsx)(s.o,{title:t||i("entityLabelsCard.title"),children:o&&0!==Object.keys(o).length?(0,r.jsx)(eF,{columnConfig:n,...c}):(0,r.jsx)(p,{})})}}}]);
|
|
5
|
+
//# sourceMappingURL=639.c2c92f37.chunk.js.map
|