@techdocs/cli 1.8.6-next.1 → 1.8.6-next.2
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 +11 -0
- package/dist/embedded-app/.config-schema.json +128 -128
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/4036.63ab04b7.chunk.js +3 -0
- package/dist/embedded-app/static/4036.63ab04b7.chunk.js.map +1 -0
- package/dist/embedded-app/static/4992.d68a0e7c.chunk.js +3 -0
- package/dist/embedded-app/static/4992.d68a0e7c.chunk.js.map +1 -0
- package/dist/embedded-app/static/9605.d238f558.chunk.js +11 -0
- package/dist/embedded-app/static/9605.d238f558.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.d7355744.js +497 -0
- package/dist/embedded-app/static/main.d7355744.js.map +1 -0
- package/dist/embedded-app/static/{runtime.e5b87207.js → runtime.d7355744.js} +2 -2
- package/dist/embedded-app/static/{runtime.e5b87207.js.map → runtime.d7355744.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.e5b87207.js → vendor.d7355744.js} +3 -3
- package/dist/embedded-app/static/vendor.d7355744.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/4036.35345ea7.chunk.js +0 -3
- package/dist/embedded-app/static/4036.35345ea7.chunk.js.map +0 -1
- package/dist/embedded-app/static/4992.a7e47df4.chunk.js +0 -3
- package/dist/embedded-app/static/4992.a7e47df4.chunk.js.map +0 -1
- package/dist/embedded-app/static/9605.333ca2de.chunk.js +0 -11
- package/dist/embedded-app/static/9605.333ca2de.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.e5b87207.js +0 -497
- package/dist/embedded-app/static/main.e5b87207.js.map +0 -1
- package/dist/embedded-app/static/vendor.e5b87207.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.8.6-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-techdocs-node@1.12.0-next.2
|
|
9
|
+
- @backstage/backend-common@0.21.4-next.2
|
|
10
|
+
- @backstage/catalog-model@1.4.5-next.0
|
|
11
|
+
- @backstage/cli-common@0.1.13
|
|
12
|
+
- @backstage/config@1.2.0-next.1
|
|
13
|
+
|
|
3
14
|
## 1.8.6-next.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -323,6 +323,51 @@
|
|
|
323
323
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
324
324
|
}
|
|
325
325
|
},
|
|
326
|
+
{
|
|
327
|
+
"path": "../core-components/config.d.ts",
|
|
328
|
+
"value": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"properties": {
|
|
331
|
+
"auth": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"properties": {
|
|
334
|
+
"autologout": {
|
|
335
|
+
"description": "Autologout feature configuration",
|
|
336
|
+
"type": "object",
|
|
337
|
+
"properties": {
|
|
338
|
+
"enabled": {
|
|
339
|
+
"description": "Enable or disable the autologout feature",
|
|
340
|
+
"visibility": "frontend",
|
|
341
|
+
"type": "boolean"
|
|
342
|
+
},
|
|
343
|
+
"idleTimeoutMinutes": {
|
|
344
|
+
"description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
|
|
345
|
+
"visibility": "frontend",
|
|
346
|
+
"type": "number"
|
|
347
|
+
},
|
|
348
|
+
"promptBeforeIdleSeconds": {
|
|
349
|
+
"description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
|
|
350
|
+
"visibility": "frontend",
|
|
351
|
+
"type": "number"
|
|
352
|
+
},
|
|
353
|
+
"useWorkerTimers": {
|
|
354
|
+
"description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
|
|
355
|
+
"visibility": "frontend",
|
|
356
|
+
"type": "boolean"
|
|
357
|
+
},
|
|
358
|
+
"logoutIfDisconnected": {
|
|
359
|
+
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
|
|
360
|
+
"visibility": "frontend",
|
|
361
|
+
"type": "boolean"
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
326
371
|
{
|
|
327
372
|
"path": "../../plugins/techdocs/config.d.ts",
|
|
328
373
|
"value": {
|
|
@@ -371,51 +416,6 @@
|
|
|
371
416
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
372
417
|
}
|
|
373
418
|
},
|
|
374
|
-
{
|
|
375
|
-
"path": "../core-components/config.d.ts",
|
|
376
|
-
"value": {
|
|
377
|
-
"type": "object",
|
|
378
|
-
"properties": {
|
|
379
|
-
"auth": {
|
|
380
|
-
"type": "object",
|
|
381
|
-
"properties": {
|
|
382
|
-
"autologout": {
|
|
383
|
-
"description": "Autologout feature configuration",
|
|
384
|
-
"type": "object",
|
|
385
|
-
"properties": {
|
|
386
|
-
"enabled": {
|
|
387
|
-
"description": "Enable or disable the autologout feature",
|
|
388
|
-
"visibility": "frontend",
|
|
389
|
-
"type": "boolean"
|
|
390
|
-
},
|
|
391
|
-
"idleTimeoutMinutes": {
|
|
392
|
-
"description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
|
|
393
|
-
"visibility": "frontend",
|
|
394
|
-
"type": "number"
|
|
395
|
-
},
|
|
396
|
-
"promptBeforeIdleSeconds": {
|
|
397
|
-
"description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
|
|
398
|
-
"visibility": "frontend",
|
|
399
|
-
"type": "number"
|
|
400
|
-
},
|
|
401
|
-
"useWorkerTimers": {
|
|
402
|
-
"description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
|
|
403
|
-
"visibility": "frontend",
|
|
404
|
-
"type": "boolean"
|
|
405
|
-
},
|
|
406
|
-
"logoutIfDisconnected": {
|
|
407
|
-
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
|
|
408
|
-
"visibility": "frontend",
|
|
409
|
-
"type": "boolean"
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
419
|
{
|
|
420
420
|
"path": "../integration/config.d.ts",
|
|
421
421
|
"value": {
|
|
@@ -961,56 +961,6 @@
|
|
|
961
961
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
962
962
|
}
|
|
963
963
|
},
|
|
964
|
-
{
|
|
965
|
-
"path": "../../plugins/stackstorm/config.d.ts",
|
|
966
|
-
"value": {
|
|
967
|
-
"type": "object",
|
|
968
|
-
"properties": {
|
|
969
|
-
"stackstorm": {
|
|
970
|
-
"type": "object",
|
|
971
|
-
"properties": {
|
|
972
|
-
"webUrl": {
|
|
973
|
-
"description": "StackStorm Web UI url\nUsed in links to StackStorm web UI",
|
|
974
|
-
"visibility": "frontend",
|
|
975
|
-
"type": "string"
|
|
976
|
-
}
|
|
977
|
-
},
|
|
978
|
-
"required": [
|
|
979
|
-
"webUrl"
|
|
980
|
-
]
|
|
981
|
-
}
|
|
982
|
-
},
|
|
983
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
{
|
|
987
|
-
"path": "../../node_modules/@oriflame/backstage-plugin-score-card/config.d.ts",
|
|
988
|
-
"value": {
|
|
989
|
-
"type": "object",
|
|
990
|
-
"properties": {
|
|
991
|
-
"scorecards": {
|
|
992
|
-
"description": "Extra configuration for score card plugin",
|
|
993
|
-
"type": "object",
|
|
994
|
-
"properties": {
|
|
995
|
-
"jsonDataUrl": {
|
|
996
|
-
"description": "The public absolute root URL with json file defining the score card entries.",
|
|
997
|
-
"visibility": "frontend",
|
|
998
|
-
"type": "string"
|
|
999
|
-
},
|
|
1000
|
-
"wikiLinkTemplate": {
|
|
1001
|
-
"description": "The template for the link to the wiki, e.g. \"https://TBD/XXX/_wiki/wikis/XXX.wiki/{id}\"",
|
|
1002
|
-
"visibility": "frontend",
|
|
1003
|
-
"type": "string"
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
},
|
|
1008
|
-
"required": [
|
|
1009
|
-
"scorecards"
|
|
1010
|
-
],
|
|
1011
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1012
|
-
}
|
|
1013
|
-
},
|
|
1014
964
|
{
|
|
1015
965
|
"path": "../backend-common/config.d.ts",
|
|
1016
966
|
"value": {
|
|
@@ -1426,47 +1376,52 @@
|
|
|
1426
1376
|
}
|
|
1427
1377
|
},
|
|
1428
1378
|
{
|
|
1429
|
-
"path": "../../
|
|
1379
|
+
"path": "../../plugins/stackstorm/config.d.ts",
|
|
1430
1380
|
"value": {
|
|
1431
1381
|
"type": "object",
|
|
1432
1382
|
"properties": {
|
|
1433
|
-
"
|
|
1383
|
+
"stackstorm": {
|
|
1434
1384
|
"type": "object",
|
|
1435
1385
|
"properties": {
|
|
1436
|
-
"
|
|
1437
|
-
"description": "
|
|
1438
|
-
"
|
|
1439
|
-
"
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
}
|
|
1386
|
+
"webUrl": {
|
|
1387
|
+
"description": "StackStorm Web UI url\nUsed in links to StackStorm web UI",
|
|
1388
|
+
"visibility": "frontend",
|
|
1389
|
+
"type": "string"
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"required": [
|
|
1393
|
+
"webUrl"
|
|
1394
|
+
]
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1397
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"path": "../../node_modules/@oriflame/backstage-plugin-score-card/config.d.ts",
|
|
1402
|
+
"value": {
|
|
1403
|
+
"type": "object",
|
|
1404
|
+
"properties": {
|
|
1405
|
+
"scorecards": {
|
|
1406
|
+
"description": "Extra configuration for score card plugin",
|
|
1407
|
+
"type": "object",
|
|
1408
|
+
"properties": {
|
|
1409
|
+
"jsonDataUrl": {
|
|
1410
|
+
"description": "The public absolute root URL with json file defining the score card entries.",
|
|
1411
|
+
"visibility": "frontend",
|
|
1412
|
+
"type": "string"
|
|
1413
|
+
},
|
|
1414
|
+
"wikiLinkTemplate": {
|
|
1415
|
+
"description": "The template for the link to the wiki, e.g. \"https://TBD/XXX/_wiki/wikis/XXX.wiki/{id}\"",
|
|
1416
|
+
"visibility": "frontend",
|
|
1417
|
+
"type": "string"
|
|
1466
1418
|
}
|
|
1467
1419
|
}
|
|
1468
1420
|
}
|
|
1469
1421
|
},
|
|
1422
|
+
"required": [
|
|
1423
|
+
"scorecards"
|
|
1424
|
+
],
|
|
1470
1425
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1471
1426
|
}
|
|
1472
1427
|
},
|
|
@@ -1655,7 +1610,7 @@
|
|
|
1655
1610
|
}
|
|
1656
1611
|
},
|
|
1657
1612
|
{
|
|
1658
|
-
"path": "../../node_modules/@oriflame/backstage-plugin-score-card/node_modules/@backstage/
|
|
1613
|
+
"path": "../../node_modules/@oriflame/backstage-plugin-score-card/node_modules/@backstage/core-components/config.d.ts",
|
|
1659
1614
|
"value": {
|
|
1660
1615
|
"type": "object",
|
|
1661
1616
|
"properties": {
|
|
@@ -1719,6 +1674,51 @@
|
|
|
1719
1674
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1720
1675
|
}
|
|
1721
1676
|
},
|
|
1677
|
+
{
|
|
1678
|
+
"path": "../../node_modules/@oriflame/backstage-plugin-score-card/node_modules/@backstage/plugin-catalog-react/node_modules/@backstage/core-components/config.d.ts",
|
|
1679
|
+
"value": {
|
|
1680
|
+
"type": "object",
|
|
1681
|
+
"properties": {
|
|
1682
|
+
"auth": {
|
|
1683
|
+
"type": "object",
|
|
1684
|
+
"properties": {
|
|
1685
|
+
"autologout": {
|
|
1686
|
+
"description": "Autologout feature configuration",
|
|
1687
|
+
"type": "object",
|
|
1688
|
+
"properties": {
|
|
1689
|
+
"enabled": {
|
|
1690
|
+
"description": "Enable or disable the autologout feature",
|
|
1691
|
+
"visibility": "frontend",
|
|
1692
|
+
"type": "boolean"
|
|
1693
|
+
},
|
|
1694
|
+
"idleTimeoutMinutes": {
|
|
1695
|
+
"description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
|
|
1696
|
+
"visibility": "frontend",
|
|
1697
|
+
"type": "number"
|
|
1698
|
+
},
|
|
1699
|
+
"promptBeforeIdleSeconds": {
|
|
1700
|
+
"description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
|
|
1701
|
+
"visibility": "frontend",
|
|
1702
|
+
"type": "number"
|
|
1703
|
+
},
|
|
1704
|
+
"useWorkerTimers": {
|
|
1705
|
+
"description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
|
|
1706
|
+
"visibility": "frontend",
|
|
1707
|
+
"type": "boolean"
|
|
1708
|
+
},
|
|
1709
|
+
"logoutIfDisconnected": {
|
|
1710
|
+
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
|
|
1711
|
+
"visibility": "frontend",
|
|
1712
|
+
"type": "boolean"
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
1722
|
{
|
|
1723
1723
|
"path": "../../node_modules/@oriflame/backstage-plugin-score-card/node_modules/@backstage/integration/config.d.ts",
|
|
1724
1724
|
"value": {
|
|
@@ -1 +1 @@
|
|
|
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="description" content="Backstage is an open
|
|
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="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><script defer="defer" src="/static/runtime.d7355744.js"></script><script defer="defer" src="/static/module-material-ui.8c838e72.js"></script><script defer="defer" src="/static/module-material-table.7d74b785.js"></script><script defer="defer" src="/static/module-lodash.11460fc1.js"></script><script defer="defer" src="/static/module-react-dom.266912b1.js"></script><script defer="defer" src="/static/module-react-router.296c491a.js"></script><script defer="defer" src="/static/module-react-router-dom.3fde9fd7.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.d141b9e2.js"></script><script defer="defer" src="/static/module-zod.e526c254.js"></script><script defer="defer" src="/static/module-i18next.b1663d5a.js"></script><script defer="defer" src="/static/vendor.d7355744.js"></script><script defer="defer" src="/static/main.d7355744.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4036],{70048:function(y,i,e){e.d(i,{K:function(){return s}});var t=e(18690);function s(m){return(0,t.g)()}},5077:function(y,i,e){e.d(i,{b:function(){return x},W:function(){return H}});var t=e(31085),s=e(14041),m=e(18690),C=e(24504),R=e(72020),M=e(86892),j=e(16203),p=e(45061),L=e(39299),B=e(82779),I=e(70048),g=e(19402),K=e(22020),W=e(26679),D=e(72427),S=e(82266),A=e(38282),O=e(64947);function U(){const a=(0,D.gf)(W.l),{retry:n,...o}=(0,A.A)(async()=>await a.getCookie(),[a]),r=(0,s.useCallback)(l=>{const u=(1+3*Math.random())*6e4,c=Date.parse(l)-Date.now()-u,E=setTimeout(n,c);return()=>clearTimeout(E)},[n]);return{...o,retry:n,refresh:r}}function T({children:a}){const n=(0,S.n)(),{Progress:o}=n.getComponents(),[r]=(0,s.useState)(()=>new BroadcastChannel("techdocs-cookie-refresh")),{loading:l,error:u,value:c,retry:E,refresh:v}=U();return(0,s.useEffect)(()=>{if(!c)return()=>{};r.postMessage({action:"TECHDOCS_COOKIE_REFRESHED",payload:c});let h=v(c.expiresAt);const d=f=>{const{action:P,payload:F}=f.data;P==="TECHDOCS_COOKIE_REFRESHED"&&(h(),h=v(F.expiresAt))};return r.addEventListener("message",d),()=>{h(),r.removeEventListener("message",d)}},[c,v,r]),u?(0,t.jsx)(K.b,{error:u,children:(0,t.jsx)(O.A,{variant:"outlined",onClick:E,children:"Retry"})}):l?(0,t.jsx)(o,{}):a}const x=a=>{const{withSearch:n,withHeader:o=!0}=a;return(0,t.jsxs)(C.Y,{themeId:"documentation",children:[o&&(0,t.jsx)(p.T,{}),(0,t.jsx)(L.Z,{}),(0,t.jsx)(j.p,{withSearch:n})]})},H=a=>{const{kind:n,name:o,namespace:r}=(0,I.K)(B.Oc),{children:l,entityRef:u={kind:n,name:o,namespace:r}}=a,c=(0,m.P1)();if(!l){const h=(c?s.Children.toArray(c.props.children):[]).flatMap(d=>{var f,P;return(P=d==null||(f=d.props)===null||f===void 0?void 0:f.children)!==null&&P!==void 0?P:[]}).find(d=>!(0,g.E)(d,R.AF)&&!(0,g.E)(d,R.Wm));return(0,t.jsx)(T,{children:(0,t.jsx)(M.R,{entityRef:u,children:h||(0,t.jsx)(x,{})})})}return(0,t.jsx)(T,{children:(0,t.jsx)(M.R,{entityRef:u,children:({metadata:E,entityMetadata:v,onReady:h})=>(0,t.jsx)("div",{className:"techdocs-reader-page",children:(0,t.jsx)(C.Y,{themeId:"documentation",children:l instanceof Function?l({entityRef:u,techdocsMetadataValue:E.value,entityMetadataValue:v.value,onReady:h}):l})})})})}},84036:function(y,i,e){e.r(i),e.d(i,{TechDocsReaderLayout:function(){return t.b},TechDocsReaderPage:function(){return t.W}});var t=e(5077)},39299:function(y,i,e){e.d(i,{Z:function(){return W}});var t=e(31085),s=e(14041),m=e(58837),C=e(75173),R=e(10394),M=e(71677),j=e(29365),p=e(37757),L=e(9684),B=e(86892),I=e(72020),g=e(99730);const K=(0,m.A)(D=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:D.spacing(3,3,0),"@media print":{display:"none"}}})),W=D=>{const S=K(),[A,O]=(0,s.useState)(null),U=(0,s.useCallback)(r=>{O(r.currentTarget)},[]),T=(0,s.useCallback)(()=>{O(null)},[]),{entityMetadata:{value:x,loading:H}}=(0,B.V)(),a=(0,I.YR)(),n=a.renderComponentsByLocation(g.e.Subheader),o=a.renderComponentsByLocation(g.e.Settings);return!n&&!o||H===!1&&!x?null:(0,t.jsx)(C.A,{classes:S,...D.toolbarProps,children:(0,t.jsxs)(R.A,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[n,o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Ay,{title:"Settings",children:(0,t.jsx)(j.A,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:U,children:(0,t.jsx)(L.A,{})})}),(0,t.jsx)(p.A,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:A,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!!A,onClose:T,keepMounted:!0,children:(0,t.jsx)("div",{children:o})})]}):null]})})}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=4036.63ab04b7.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/4036.63ab04b7.chunk.js","mappings":"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","sources":["webpack://techdocs-cli-embedded-app/../core-plugin-api/src/routing/useRouteRefParams.ts","webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsAuthProvider.tsx","webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx","webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 { useParams } from 'react-router-dom';\nimport { RouteRef, AnyParams, SubRouteRef } from './types';\n\n/**\n * React hook for retrieving dynamic params from the current URL.\n * @param _routeRef - Ref of the current route.\n * @public\n */\nexport function useRouteRefParams<Params extends AnyParams>(\n _routeRef: RouteRef<Params> | SubRouteRef<Params>,\n): Params {\n return useParams() as Params;\n}\n","/*\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 React, { ReactNode, useEffect, useState, useCallback } from 'react';\nimport { ErrorPanel } from '@backstage/core-components';\nimport { techdocsApiRef } from '@backstage/plugin-techdocs-react';\nimport { useApi, useApp } from '@backstage/core-plugin-api';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\nimport { Button } from '@material-ui/core';\n\ntype TechDocsRefreshCookieMessage = MessageEvent<{\n action: string;\n payload: {\n expiresAt: string;\n };\n}>;\n\nfunction useTechDocsCookie() {\n const techdocsApi = useApi(techdocsApiRef);\n\n const { retry, ...state } = useAsyncRetry(async () => {\n return await techdocsApi.getCookie();\n }, [techdocsApi]);\n\n const refresh = useCallback(\n (expiresAt: string) => {\n // Randomize the refreshing margin to avoid all tabs refreshing at the same time\n const refreshingMargin = (1 + 3 * Math.random()) * 60000;\n const delay = Date.parse(expiresAt) - Date.now() - refreshingMargin;\n const timeout = setTimeout(retry, delay);\n return () => clearTimeout(timeout);\n },\n [retry],\n );\n\n return { ...state, retry, refresh };\n}\n\nexport function TechDocsAuthProvider({ children }: { children: ReactNode }) {\n const app = useApp();\n const { Progress } = app.getComponents();\n\n const [channel] = useState(\n () => new BroadcastChannel('techdocs-cookie-refresh'),\n );\n\n const { loading, error, value, retry, refresh } = useTechDocsCookie();\n\n useEffect(() => {\n if (!value) return () => {};\n\n channel.postMessage({\n action: 'TECHDOCS_COOKIE_REFRESHED',\n payload: value,\n });\n\n let cancel = refresh(value.expiresAt);\n\n const handleMessage = (event: TechDocsRefreshCookieMessage): void => {\n const { action, payload } = event.data;\n if (action === 'TECHDOCS_COOKIE_REFRESHED') {\n cancel();\n cancel = refresh(payload.expiresAt);\n }\n };\n\n channel.addEventListener('message', handleMessage);\n\n return () => {\n cancel();\n channel.removeEventListener('message', handleMessage);\n };\n }, [value, refresh, channel]);\n\n if (error) {\n return (\n <ErrorPanel error={error}>\n <Button variant=\"outlined\" onClick={retry}>\n Retry\n </Button>\n </ErrorPanel>\n );\n }\n\n if (loading) {\n return <Progress />;\n }\n\n return children;\n}\n","/*\n * Copyright 2022 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 React, { ReactNode, Children, ReactElement } from 'react';\nimport { useOutlet } from 'react-router-dom';\n\nimport { Page } from '@backstage/core-components';\nimport { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n TECHDOCS_ADDONS_WRAPPER_KEY,\n TECHDOCS_ADDONS_KEY,\n TechDocsReaderPageProvider,\n} from '@backstage/plugin-techdocs-react';\n\nimport { TechDocsReaderPageRenderFunction } from '../../../types';\n\nimport { TechDocsReaderPageContent } from '../TechDocsReaderPageContent';\nimport { TechDocsReaderPageHeader } from '../TechDocsReaderPageHeader';\nimport { TechDocsReaderPageSubheader } from '../TechDocsReaderPageSubheader';\nimport { rootDocsRouteRef } from '../../../routes';\nimport {\n getComponentData,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport { TechDocsAuthProvider } from './TechDocsAuthProvider';\n\n/* An explanation for the multiple ways of customizing the TechDocs reader page\n\nPlease refer to this page on the microsite for the latest recommended approach:\nhttps://backstage.io/docs/features/techdocs/how-to-guides#how-to-customize-the-techdocs-reader-page\n\nThe <TechDocsReaderPage> component is responsible for rendering the <TechDocsReaderPageProvider> and\nits contained version of a <Page>, which in turn renders the <TechDocsReaderPageContent>.\n\nHistorically, there have been different approaches on how this <Page> can be customized, and how the\n<TechDocsReaderPageContent> inside could be exchanged for a custom implementation (which was not\npossible before). Also, the current implementation supports every scenario to avoid breaking default\nconfigurations of TechDocs.\n\nIn particular, there are 4 different TechDocs page configurations:\n\nCONFIGURATION 1: <TechDocsReaderPage> only, no children\n\n<Route path=\"/docs/:namespace/:kind/:name/*\" element={<TechDocsReaderPage />} >\n\nThis is the simplest way to use TechDocs. Only a full page is passed, assuming that it comes with\nits content inside. Since we allowed customizing it, we started providing <TechDocsReaderLayout> as\na default implementation (which contains <TechDocsReaderPageContent>).\n\nCONFIGURATION 2 (not advised): <TechDocsReaderPage> with element children\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={\n <TechDocsReaderPage>\n {techdocsPage}\n </TechDocsReaderPage>\n }\n/>\n\nPreviously, there were two ways of passing children to <TechDocsReaderPage>: either as elements (as\nshown above), or as a render function (described below in CONFIGURATION 3). The \"techdocsPage\" is\nlocated in packages/app/src/components/techdocs and is the default implementation of the content\ninside.\n\nCONFIGURATION 3 (not advised): <TechDocsReaderPage> with render function as child\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={\n <TechDocsReaderPage>\n {({ metadata, entityMetadata, onReady }) => (\n techdocsPage\n )}\n </TechDocsReaderPage>\n }\n/>\n\nSimilar to CONFIGURATION 2, the direct children will be passed to the <TechDocsReaderPage> but in\nthis case interpreted as render prop.\n\nCONFIGURATION 4: <TechDocsReaderPage> and provided content in <Route>\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={<TechDocsReaderPage />}\n>\n {techDocsPage}\n <TechDocsAddons>\n <ExpandableNavigation />\n <ReportIssue />\n <TextSize />\n <LightBox />\n </TechDocsAddons>\n</Route>\n\nThis is the current state in packages/app/src/App.tsx and moved the location of children from inside\nthe element prop in the <Route> to the children of the <Route>. Then, in <TechDocsReaderPage> they\nare retrieved using the useOutlet hook from React Router.\n\nNOTE: Render functions are no longer supported in this approach.\n*/\n\n/**\n * Props for {@link TechDocsReaderLayout}\n * @public\n */\nexport type TechDocsReaderLayoutProps = {\n /**\n * Show or hide the header, defaults to true.\n */\n withHeader?: boolean;\n /**\n * Show or hide the content search bar, defaults to true.\n */\n withSearch?: boolean;\n};\n\n/**\n * Default TechDocs reader page structure composed with a header and content\n * @public\n */\nexport const TechDocsReaderLayout = (props: TechDocsReaderLayoutProps) => {\n const { withSearch, withHeader = true } = props;\n return (\n <Page themeId=\"documentation\">\n {withHeader && <TechDocsReaderPageHeader />}\n <TechDocsReaderPageSubheader />\n <TechDocsReaderPageContent withSearch={withSearch} />\n </Page>\n );\n};\n\n/**\n * @public\n */\nexport type TechDocsReaderPageProps = {\n entityRef?: CompoundEntityRef;\n children?: TechDocsReaderPageRenderFunction | ReactNode;\n};\n\n/**\n * An addon-aware implementation of the TechDocsReaderPage.\n *\n * @public\n */\nexport const TechDocsReaderPage = (props: TechDocsReaderPageProps) => {\n const { kind, name, namespace } = useRouteRefParams(rootDocsRouteRef);\n const { children, entityRef = { kind, name, namespace } } = props;\n\n const outlet = useOutlet();\n\n if (!children) {\n const childrenList = outlet ? Children.toArray(outlet.props.children) : [];\n\n const grandChildren = childrenList.flatMap<ReactElement>(\n child => (child as ReactElement)?.props?.children ?? [],\n );\n\n const page: React.ReactNode = grandChildren.find(\n grandChild =>\n !getComponentData(grandChild, TECHDOCS_ADDONS_WRAPPER_KEY) &&\n !getComponentData(grandChild, TECHDOCS_ADDONS_KEY),\n );\n\n // As explained above, \"page\" is configuration 4 and <TechDocsReaderLayout> is 1\n return (\n <TechDocsAuthProvider>\n <TechDocsReaderPageProvider entityRef={entityRef}>\n {(page as JSX.Element) || <TechDocsReaderLayout />}\n </TechDocsReaderPageProvider>\n </TechDocsAuthProvider>\n );\n }\n\n // As explained above, a render function is configuration 3 and React element is 2\n return (\n <TechDocsAuthProvider>\n <TechDocsReaderPageProvider entityRef={entityRef}>\n {({ metadata, entityMetadata, onReady }) => (\n <div className=\"techdocs-reader-page\">\n <Page themeId=\"documentation\">\n {children instanceof Function\n ? children({\n entityRef,\n techdocsMetadataValue: metadata.value,\n entityMetadataValue: entityMetadata.value,\n onReady,\n })\n : children}\n </Page>\n </div>\n )}\n </TechDocsReaderPageProvider>\n </TechDocsAuthProvider>\n );\n};\n","/*\n * Copyright 2022 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 React, { MouseEvent, useState, useCallback } from 'react';\n\nimport {\n Box,\n makeStyles,\n Toolbar,\n ToolbarProps,\n Menu,\n Tooltip,\n IconButton,\n} from '@material-ui/core';\nimport SettingsIcon from '@material-ui/icons/Settings';\n\nimport {\n TechDocsAddonLocations as locations,\n useTechDocsAddons,\n useTechDocsReaderPage,\n} from '@backstage/plugin-techdocs-react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n gridArea: 'pageSubheader',\n flexDirection: 'column',\n minHeight: 'auto',\n padding: theme.spacing(3, 3, 0),\n '@media print': {\n display: 'none',\n },\n },\n}));\n\n/**\n * Renders the reader page subheader.\n * Please use the Tech Docs add-ons to customize it\n * @public\n */\nexport const TechDocsReaderPageSubheader = (props: {\n toolbarProps?: ToolbarProps;\n}) => {\n const classes = useStyles();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const handleClick = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const handleClose = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const {\n entityMetadata: { value: entityMetadata, loading: entityMetadataLoading },\n } = useTechDocsReaderPage();\n\n const addons = useTechDocsAddons();\n\n const subheaderAddons = addons.renderComponentsByLocation(\n locations.Subheader,\n );\n\n const settingsAddons = addons.renderComponentsByLocation(locations.Settings);\n\n if (!subheaderAddons && !settingsAddons) return null;\n\n // No entity metadata = 404. Don't render subheader on 404.\n if (entityMetadataLoading === false && !entityMetadata) return null;\n\n return (\n <Toolbar classes={classes} {...props.toolbarProps}>\n <Box\n display=\"flex\"\n justifyContent=\"flex-end\"\n width=\"100%\"\n flexWrap=\"wrap\"\n >\n {subheaderAddons}\n {settingsAddons ? (\n <>\n <Tooltip title=\"Settings\">\n <IconButton\n aria-controls=\"tech-docs-reader-page-settings\"\n aria-haspopup=\"true\"\n onClick={handleClick}\n >\n <SettingsIcon />\n </IconButton>\n </Tooltip>\n <Menu\n id=\"tech-docs-reader-page-settings\"\n getContentAnchorEl={null}\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n open={Boolean(anchorEl)}\n onClose={handleClose}\n keepMounted\n >\n <div>{settingsAddons}</div>\n </Menu>\n </>\n ) : null}\n </Box>\n </Toolbar>\n );\n};\n"],"names":["useRouteRefParams","_routeRef","useParams","useTechDocsCookie","techdocsApi","useApi","techdocsApiRef","retry","state","useAsyncRetry","getCookie","refresh","useCallback","expiresAt","refreshingMargin","Math","random","delay","Date","parse","now","timeout","setTimeout","clearTimeout","TechDocsAuthProvider","children","app","useApp","Progress","getComponents","channel","useState","BroadcastChannel","loading","error","value","useEffect","postMessage","action","payload","cancel","handleMessage","event","data","addEventListener","removeEventListener","ErrorPanel","Button","variant","onClick","TechDocsReaderLayout","props","withSearch","withHeader","Page","themeId","TechDocsReaderPageHeader","TechDocsReaderPageSubheader","TechDocsReaderPageContent","TechDocsReaderPage","kind","name","namespace","rootDocsRouteRef","entityRef","outlet","useOutlet","page","Children","toArray","flatMap","child","find","grandChild","getComponentData","TECHDOCS_ADDONS_WRAPPER_KEY","TECHDOCS_ADDONS_KEY","TechDocsReaderPageProvider","metadata","entityMetadata","onReady","div","className","Function","techdocsMetadataValue","entityMetadataValue","useStyles","makeStyles","theme","root","gridArea","flexDirection","minHeight","padding","spacing","display","classes","anchorEl","setAnchorEl","handleClick","currentTarget","handleClose","entityMetadataLoading","useTechDocsReaderPage","addons","useTechDocsAddons","subheaderAddons","renderComponentsByLocation","locations","Subheader","settingsAddons","Settings","Toolbar","toolbarProps","Box","justifyContent","width","flexWrap","Tooltip","title","IconButton","aria-controls","aria-haspopup","SettingsIcon","Menu","id","getContentAnchorEl","anchorOrigin","vertical","horizontal","open","Boolean","onClose","keepMounted"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4992],{48514:function(Z,L,e){e.d(L,{M:function(){return W}});var t=e(31085),u=e(58837),I=e(71677),R=e(14041),D=e(62220),M=e.n(D),z=e(85058);const U=(0,u.A)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function W(C){const[O,F]=(0,R.useState)(!1),m=(0,z.a)(),y=U(),P=h=>{m()&&F(h)};var S;return(0,t.jsx)(I.Ay,{title:(S=C.title)!==null&&S!==void 0?S:C.text||"",placement:C.placement,disableHoverListener:!O,children:(0,t.jsx)(M(),{text:C.text,line:C.line,onToggled:P,containerClassName:y.container})})}},60413:function(Z,L,e){e.d(L,{C4:function(){return R},tS:function(){return M}});function t({name:O,attributes:F,resourceType:m}){return m?{type:"resource",name:O,attributes:F,resourceType:m}:{type:"basic",name:O,attributes:F}}const u="catalog-entity",I=t({name:"catalog.entity.read",attributes:{action:"read"},resourceType:u}),R=t({name:"catalog.entity.create",attributes:{action:"create"}}),D=t({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:u}),M=t({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:u}),z=t({name:"catalog.location.read",attributes:{action:"read"}}),U=t({name:"catalog.location.create",attributes:{action:"create"}}),W=t({name:"catalog.location.delete",attributes:{action:"delete"}}),C=[I,R,D,M,z,U,W]},64992:function(Z,L,e){e.r(L),e.d(L,{BaseCatalogPage:function(){return ft},CatalogPage:function(){return Ce},DefaultCatalogPage:function(){return pt}});var t=e(31085),u=e(14041),I=e(18690),R=e(27155),D=e(26280),M=e(59428),z=e(64947),U=e(29365),W=e(5893),C=e(73970),O=e(25534);function F(n){const{title:a,to:i}=n,l=(0,W.A)(r=>r.breakpoints.down("xs"));return i?l?(0,t.jsx)(U.A,{component:C.N_,color:"primary",title:a,size:"small",to:i,children:(0,t.jsx)(O.A,{})}):(0,t.jsx)(z.A,{component:C.N_,variant:"contained",color:"primary",to:i,children:a}):null}var m=e(3851),y=e(72427),P=e(65461),S=e(9222),h=e(21405),G=e(54203),St=e(95203),tt=e(72348),et=e(51372),Pt=e(6820),Et=e(88640),jt=e(77310),nt=e(14209),V=e(90184),At=e(56889),at=e(67871),J=e(72501),Tt=e(7031),k=e(26694),Lt=e(75625),Rt=e(39330),Ot=e(80109),Ft=e(15303),Kt=e(45250),Mt=e(65398),Bt=e.n(Mt),Nt=e(8859),it=e(34428),lt=e(67720),ot=e(48514);const g=Object.freeze({createNameColumn(n){function a(i){var l;return((l=i.metadata)===null||l===void 0?void 0:l.title)||(0,V.S)(i,{defaultKind:n==null?void 0:n.defaultKind})}return{title:"Name",field:"resolved.entityRef",highlight:!0,customSort({entity:i},{entity:l}){return a(i).localeCompare(a(l))},render:({entity:i})=>(0,t.jsx)(Nt.z,{entityRef:i,defaultKind:(n==null?void 0:n.defaultKind)||"Component"})}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:n})=>(0,t.jsx)(it.i,{entityRefs:n.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:n})=>(0,t.jsx)(it.i,{entityRefs:n.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",customFilterAndSearch:(n,a)=>{var i,l,r,o,c,s;let d=[];if(!((l=a.entity)===null||l===void 0||(i=l.spec)===null||i===void 0)&&i.targets&&Array.isArray((o=a.entity)===null||o===void 0||(r=o.spec)===null||r===void 0?void 0:r.targets)){var v,f;d=(f=a.entity)===null||f===void 0||(v=f.spec)===null||v===void 0?void 0:v.targets}else if(!((s=a.entity)===null||s===void 0||(c=s.spec)===null||c===void 0)&&c.target){var p,x;d=[(x=a.entity)===null||x===void 0||(p=x.spec)===null||p===void 0?void 0:p.target]}return d.join(", ").toLocaleUpperCase("en-US").includes(n.toLocaleUpperCase("en-US"))},render:({entity:n})=>{var a,i;return(0,t.jsx)(t.Fragment,{children:((n==null||(a=n.spec)===null||a===void 0?void 0:a.targets)||(n==null||(i=n.spec)===null||i===void 0?void 0:i.target))&&(0,t.jsx)(ot.M,{text:(n.spec.targets||[n.spec.target]).join(", "),placement:"bottom-start"})})}}},createSpecTypeColumn(n={hidden:!1}){return{title:"Type",field:"entity.spec.type",hidden:n.hidden,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:n})=>(0,t.jsx)(ot.M,{text:n.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:n})=>(0,t.jsx)(t.Fragment,{children:n.metadata.tags&&n.metadata.tags.map(a=>(0,t.jsx)(lt.A,{label:a,size:"small",variant:"outlined",style:{marginBottom:"0px"}},a))}),width:"auto"}},createTitleColumn(n){return{title:"Title",field:"entity.metadata.title",hidden:n==null?void 0:n.hidden,searchable:!0}},createLabelColumn(n,a){return{title:(a==null?void 0:a.title)||"Label",field:"entity.metadata.labels",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:i})=>{var l;const r=(l=i.metadata)===null||l===void 0?void 0:l.labels,o=r&&r[n]||(a==null?void 0:a.defaultValue);return(0,t.jsx)(t.Fragment,{children:o&&(0,t.jsx)(lt.A,{label:o,size:"small",variant:"outlined"},o)})},width:"auto"}},createNamespaceColumn(){return{title:"Namespace",field:"entity.metadata.namespace",width:"auto"}}});var B=e(92822);function It(n){const{columns:a,data:i,next:l,prev:r,title:o,isLoading:c}=n,{updateFilters:s}=(0,h.nK)();return(0,t.jsx)(nt.X,{title:c?"":o,columns:a,data:i,options:{paginationPosition:"both",pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1},onSearchChange:d=>s({text:d?new B.V3(d):void 0}),onPageChange:d=>{d>0?l==null||l():r==null||r()},page:r?1:0,totalCount:l?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}}})}const st=({filters:n,entities:a})=>{var i;const l=n.type===void 0;return[g.createTitleColumn({hidden:!0}),g.createNameColumn({defaultKind:(i=n.kind)===null||i===void 0?void 0:i.value}),...r(),g.createMetadataDescriptionColumn(),g.createTagsColumn()];function r(){var o;const c=[g.createSystemColumn(),g.createOwnerColumn(),g.createSpecTypeColumn({hidden:!l}),g.createSpecLifecycleColumn()];switch((o=n.kind)===null||o===void 0?void 0:o.value){case"user":return[];case"domain":case"system":return[g.createOwnerColumn()];case"group":case"template":return[g.createSpecTypeColumn({hidden:!l})];case"location":return[g.createSpecTypeColumn({hidden:!l}),g.createSpecTargetsColumn()];default:return a.every(s=>s.metadata.namespace==="default")?c:[...c,g.createNamespaceColumn()]}}},Dt=(0,Tt.A)({root:{color:"#f3ba37"}})(Ot.A),zt=(n,a)=>{const i=l=>l.metadata.title||(0,V.S)(l,{defaultKind:"Component"});return i(n).localeCompare(i(a))},Q=n=>{var a,i,l;const{columns:r=st,tableOptions:o,subtitle:c,emptyContent:s}=n,{isStarredEntity:d,toggleStarredEntity:v}=(0,At.I)(),f=(0,h.nK)(),{loading:p,error:x,entities:E,filters:j,pageInfo:H,totalItems:$}=f,b=!!H,X=(0,u.useMemo)(()=>typeof r=="function"?r(f):r,[r,f]);if(x)return(0,t.jsx)("div",{children:(0,t.jsx)(Et.B,{severity:"error",title:"Could not fetch catalog entities.",children:(0,t.jsx)(jt.z,{language:"text",text:x.toString()})})});const N=[({entity:K})=>{var A;const T=(A=K.metadata.annotations)===null||A===void 0?void 0:A[tt._P],Y="View";return{icon:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(J.A,{style:k.A,children:Y}),(0,t.jsx)(Rt.A,{fontSize:"small"})]}),tooltip:Y,disabled:!T,onClick:()=>{T&&window.open(T,"_blank")}}},({entity:K})=>{var A;const T=(A=K.metadata.annotations)===null||A===void 0?void 0:A[tt.P],Y="Edit";return{icon:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(J.A,{style:k.A,children:Y}),(0,t.jsx)(Lt.A,{fontSize:"small"})]}),tooltip:Y,disabled:!T,onClick:()=>{T&&window.open(T,"_blank")}}},({entity:K})=>{const A=d(K),T=A?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(J.A,{style:k.A,children:T}),A?(0,t.jsx)(Dt,{}):(0,t.jsx)(Ft.A,{})]}),tooltip:T,onClick:()=>v(K)}}],he=((a=j.kind)===null||a===void 0?void 0:a.value)||"",xe=((i=j.type)===null||i===void 0?void 0:i.value)||"";var _;const yt=`${[(0,Kt.capitalize)((_=(l=j.user)===null||l===void 0?void 0:l.value)!==null&&_!==void 0?_:"all"),xe,Bt()(he)].filter(K=>K).join(" ")} (${$})`,gt=n.actions||N,Ct={actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!p,padding:"dense",...o};if(b)return(0,t.jsx)(It,{columns:X,emptyContent:s,isLoading:p,title:yt,actions:gt,subtitle:c,options:Ct,data:E.map(rt),next:H.next,prev:H.prev});const ht=E.sort(zt).map(rt),xt=20,Se=ht.length>xt;return(0,t.jsx)(nt.X,{isLoading:p,columns:X,options:{paging:Se,pageSize:xt,pageSizeOptions:[20,50,100],...Ct},title:yt,data:ht,actions:gt,subtitle:c,emptyContent:s})};Q.columns=g,Q.defaultColumnsFunc=st;function rt(n){const a=(0,at.t)(n,et.jn,{kind:"system"}),i=(0,at.t)(n,et.vv);return{entity:n,resolved:{name:(0,V.S)(n,{defaultKind:"Component"}),entityRef:(0,Pt.U2)(n),ownedByRelationsTitle:i.map(l=>(0,V.S)(l,{defaultKind:"group"})).join(", "),ownedByRelations:i,partOfSystemRelationTitle:a.map(l=>(0,V.S)(l,{defaultKind:"system"})).join(", "),partOfSystemRelations:a}}}var Ut=e(93184);const Wt=(0,Ut.h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create"}}});var Ht=e(87849),bt=e(60413),Gt=e(36989),ct=e(66917),dt=e(36017),w=e(10394),ut=e(91638),mt=e(7341);function Vt(){const n=(0,y.gf)(mt.v),{error:a,loading:i,value:l}=(0,ut.default)(async()=>await n.getEntityFacets({facets:["kind"]}).then(o=>{var c;return((c=o.facets.kind)===null||c===void 0?void 0:c.map(s=>s.value).sort())||[]}),[n]);return{loading:i,error:a,allKinds:l!=null?l:[]}}function Xt(n,a,i){let l=n;return a&&(l=l.filter(o=>a.some(c=>c.toLocaleLowerCase("en-US")===o.toLocaleLowerCase("en-US")))),i&&!n.some(o=>o.toLocaleLowerCase("en-US")===i.toLocaleLowerCase("en-US"))&&(l=l.concat([i])),l.sort().reduce((o,c)=>(o[c.toLocaleLowerCase("en-US")]=c,o),{})}function Yt(n){var a;const{filters:i,queryParameters:{kind:l},updateFilters:r}=(0,h.nK)(),o=(0,u.useMemo)(()=>[l].flat()[0],[l]);var c;const[s,d]=(0,u.useState)((c=o!=null?o:(a=i.kind)===null||a===void 0?void 0:a.value)!==null&&c!==void 0?c:n.initialFilter);(0,u.useEffect)(()=>{o&&d(o)},[o]),(0,u.useEffect)(()=>{var x;if(!((x=i.kind)===null||x===void 0)&&x.value){var E;d((E=i.kind)===null||E===void 0?void 0:E.value)}},[i.kind]),(0,u.useEffect)(()=>{r({kind:s?new B.gM(s):void 0})},[s,r]);const{allKinds:v,loading:f,error:p}=Vt();return{loading:f,error:p,allKinds:v!=null?v:[],selectedKind:s,setSelectedKind:d}}const Jt=n=>{const{allowedKinds:a,hidden:i,initialFilter:l="component"}=n,r=(0,y.gf)(dt.k),{error:o,allKinds:c,selectedKind:s,setSelectedKind:d}=Yt({initialFilter:l});if((0,u.useEffect)(()=>{o&&r.post({message:"Failed to load entity kinds",severity:"error"})},[o,r]),o)return null;const v=Xt(c,a,s),f=Object.keys(v).map(p=>({value:p,label:v[p]}));return i?null:(0,t.jsx)(w.A,{pb:1,pt:1,children:(0,t.jsx)(ct.w,{label:"Kind",items:f,selected:s.toLocaleLowerCase("en-US"),onChange:p=>d(String(p))})})};var q=e(58837),vt=e(50207);const Qt=(0,q.A)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),$t=n=>{const{initialFilter:a=[]}=n,i=Qt();return(0,t.jsx)(vt.y,{label:"Lifecycle",name:"lifecycles",path:"spec.lifecycle",Filter:B.I5,InputProps:{className:i.input},initialSelectedOptions:a})},Zt=(0,q.A)({input:{}},{name:"CatalogReactEntityNamespacePicker"}),kt=n=>{const{initiallySelectedNamespaces:a}=n,i=Zt();return(0,t.jsx)(vt.y,{label:"Namespace",name:"namespace",path:"metadata.namespace",Filter:B.z,InputProps:{className:i.input},initialSelectedOptions:a})};var wt=e(72987),qt=e(86901),_t=e(69076),te=e(16249),ee=e(44148),ne=e(41260),ae=e(6924),ie=e(20577);const le=(0,q.A)({root:{},input:{},label:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),oe=(0,t.jsx)(ne.A,{fontSize:"small"}),se=(0,t.jsx)(ee.A,{fontSize:"small"}),re=()=>{const n=le(),{updateFilters:a}=(0,h.nK)(),[i,l]=(0,u.useState)([]);function r(s){a({orphan:s?new B.Kf(s):void 0})}function o(s){a({error:s?new B.mT(s):void 0})}const c=["Is Orphan","Has Error"];return(0,t.jsx)(w.A,{className:n.root,pb:1,pt:1,children:(0,t.jsxs)(J.A,{className:n.label,variant:"button",component:"label",children:["Processing Status",(0,t.jsx)(ie.Ay,{multiple:!0,disableCloseOnSelect:!0,options:c,value:i,onChange:(s,d)=>{l(d),r(d.includes("Is Orphan")),o(d.includes("Has Error"))},renderOption:(s,{selected:d})=>(0,t.jsx)(qt.A,{control:(0,t.jsx)(_t.A,{icon:oe,checkedIcon:se,checked:d}),onClick:v=>v.preventDefault(),label:s}),size:"small",popupIcon:(0,t.jsx)(ae.A,{"data-testid":"processing-status-picker-expand"}),renderInput:s=>(0,t.jsx)(te.A,{...s,className:n.input,variant:"outlined"})})]})})};var ce=e(91035),de=e(46343),ue=e.n(de),me=e(40074),ve=e.n(me);function fe(){const n=(0,y.gf)(mt.v),{filters:{kind:a,type:i},queryParameters:{type:l},updateFilters:r}=(0,h.nK)(),o=(0,u.useMemo)(()=>[l].flat().filter(Boolean),[l]);var c;const[s,d]=(0,u.useState)(o.length?o:(c=i==null?void 0:i.getTypes())!==null&&c!==void 0?c:[]);(0,u.useEffect)(()=>{o.length&&d(o)},[o]);const[v,f]=(0,u.useState)([]),p=(0,u.useMemo)(()=>a==null?void 0:a.value,[a]),{error:x,loading:E,value:j}=(0,ut.default)(async()=>p?await n.getEntityFacets({filter:{kind:p},facets:["spec.type"]}).then(b=>b.facets["spec.type"]||[]):[],[p,n]),H=(0,u.useRef)(j);return(0,u.useEffect)(()=>{const $=H.current;if(H.current=j,E||!p||$===j||!j)return;const b=[...new Set(ve()(j,N=>-N.count).map(N=>N.value.toLocaleLowerCase("en-US")))];f(b);const X=s.filter(N=>b.includes(N));ue()(s,X)||d(X)},[E,p,s,d,j]),(0,u.useEffect)(()=>{r({type:s.length?new B.qA(s):void 0})},[s,r]),{loading:E,error:x,availableTypes:v,selectedTypes:s,setSelectedTypes:d}}const pe=n=>{const{hidden:a,initialFilter:i}=n,l=(0,y.gf)(dt.k),{error:r,availableTypes:o,selectedTypes:c,setSelectedTypes:s}=fe();if((0,u.useEffect)(()=>{r&&l.post({message:"Failed to load entity types",severity:"error"}),i&&s([i])},[r,l,i,s]),o.length===0||r)return null;const d=[{value:"all",label:"all"},...o.map(f=>({value:f,label:f}))];var v;return a?null:(0,t.jsx)(w.A,{pb:1,pt:1,children:(0,t.jsx)(ct.w,{label:"Type",items:d,selected:(v=d.length>1?c[0]:void 0)!==null&&v!==void 0?v:"all",onChange:f=>s(f==="all"?[]:[String(f)])})})};var ye=e(67626);const ge=n=>{const{initialKind:a,initiallySelectedFilter:i,ownerPickerMode:l,initiallySelectedNamespaces:r}=n;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Jt,{initialFilter:a}),(0,t.jsx)(pe,{}),(0,t.jsx)(ye.y,{initialFilter:i}),(0,t.jsx)(wt.t,{mode:l}),(0,t.jsx)($t,{}),(0,t.jsx)(ce.m,{}),(0,t.jsx)(re,{}),(0,t.jsx)(kt,{initiallySelectedNamespaces:r})]})};function ft(n){const{filters:a,content:i=(0,t.jsx)(Q,{}),pagination:l}=n;var r;const o=(r=(0,y.gf)(P.U).getOptionalString("organization.name"))!==null&&r!==void 0?r:"Backstage",c=(0,S.S)(St.qP),{t:s}=(0,Ht.i)(Wt),{allowed:d}=(0,Gt.J)({permission:bt.C4});return(0,t.jsx)(R.d,{title:s("indexPage.title",{orgName:o}),themeId:"home",children:(0,t.jsxs)(D.U,{children:[(0,t.jsxs)(M.d,{title:"",children:[d&&(0,t.jsx)(F,{title:s("indexPage.createButtonTitle"),to:c&&c()}),(0,t.jsx)(m.Y,{children:"All your software catalog entities"})]}),(0,t.jsx)(h.B9,{pagination:l,children:(0,t.jsxs)(G.GI,{children:[(0,t.jsx)(G.GI.Filters,{children:a}),(0,t.jsx)(G.GI.Content,{children:i})]})})]})})}function pt(n){const{columns:a,actions:i,initiallySelectedFilter:l="owned",initialKind:r="component",tableOptions:o={},emptyContent:c,pagination:s,ownerPickerMode:d,filters:v,initiallySelectedNamespaces:f}=n;return(0,t.jsx)(ft,{filters:v!=null?v:(0,t.jsx)(ge,{initialKind:r,initiallySelectedFilter:l,ownerPickerMode:d,initiallySelectedNamespaces:f}),content:(0,t.jsx)(Q,{columns:a,actions:i,tableOptions:o,emptyContent:c}),pagination:s})}function Ce(n){return(0,I.P1)()||(0,t.jsx)(pt,{...n})}},36989:function(Z,L,e){e.d(L,{J:function(){return F}});var t=e(72427),u=e(96824);function I(m,y){return m.name===y.name}function R(m,y){return"resourceType"in m?!y||m.resourceType===y:!1}function D(m){return m.attributes.action==="create"}function M(m){return m.attributes.action==="read"}function z(m){return m.attributes.action==="update"}function U(m){return m.attributes.action==="delete"}function W(m){return{authorize:async(y,P)=>await m.authorize(y,P),authorizeConditional(y,P){const S=y;return m.authorize(S,P)}}}var C=e(54241),O=e(68721);function F(m){const y=(0,t.gf)(u.x),{data:P,error:S}=(0,O.Ay)(m,async h=>{if(R(h.permission)&&!h.resourceRef)return C.b.DENY;const{result:G}=await y.authorize(h);return G});return S?{error:S,loading:!1,allowed:!1}:P===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:P===C.b.ALLOW}}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=4992.d68a0e7c.chunk.js.map
|