@redocly/theme 0.55.0-next.7 → 0.55.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  2. package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
  3. package/lib/components/Catalog/Catalog.d.ts +11 -0
  4. package/lib/components/Catalog/Catalog.js +138 -0
  5. package/lib/components/Catalog/CatalogActionsRow.d.ts +15 -0
  6. package/lib/components/Catalog/CatalogActionsRow.js +34 -0
  7. package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +8 -0
  8. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +179 -0
  9. package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +8 -0
  10. package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +20 -0
  11. package/lib/components/Catalog/CatalogEntities.d.ts +18 -0
  12. package/lib/components/Catalog/CatalogEntities.js +63 -0
  13. package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +2 -0
  14. package/lib/components/Catalog/CatalogEntitiesEmptyState.js +38 -0
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +12 -0
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +133 -0
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +7 -0
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +49 -0
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +6 -0
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +48 -0
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +6 -0
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +111 -0
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +6 -0
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +25 -0
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +6 -0
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +69 -0
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +7 -0
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +48 -0
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +6 -0
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +19 -0
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +6 -0
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +20 -0
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +6 -0
  34. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +20 -0
  35. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +6 -0
  36. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +23 -0
  37. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +6 -0
  38. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +21 -0
  39. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +6 -0
  40. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +24 -0
  41. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +6 -0
  42. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +21 -0
  43. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +21 -0
  44. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +37 -0
  45. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +10 -0
  46. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -0
  47. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +25 -0
  48. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +27 -0
  49. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +22 -0
  50. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +60 -0
  51. package/lib/components/Catalog/CatalogEntityIcon.d.ts +5 -0
  52. package/lib/components/Catalog/CatalogEntityIcon.js +38 -0
  53. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +5 -0
  54. package/lib/components/Catalog/CatalogEntityTypeIcon.js +42 -0
  55. package/lib/components/Catalog/CatalogHighlight.d.ts +4 -0
  56. package/lib/components/Catalog/CatalogHighlight.js +48 -0
  57. package/lib/components/Catalog/CatalogPageDescription.d.ts +9 -0
  58. package/lib/components/Catalog/CatalogPageDescription.js +52 -0
  59. package/lib/components/Catalog/CatalogSelector.d.ts +12 -0
  60. package/lib/components/Catalog/CatalogSelector.js +48 -0
  61. package/lib/components/Catalog/CatalogSortButton.d.ts +10 -0
  62. package/lib/components/Catalog/CatalogSortButton.js +71 -0
  63. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.d.ts +5 -0
  64. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +19 -0
  65. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -0
  66. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +63 -0
  67. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.d.ts +5 -0
  68. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +19 -0
  69. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +11 -0
  70. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +101 -0
  71. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +31 -0
  72. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +106 -0
  73. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +27 -0
  74. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +127 -0
  75. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +6 -0
  76. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +20 -0
  77. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.d.ts +7 -0
  78. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +66 -0
  79. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +9 -0
  80. package/lib/components/Catalog/CatalogTagsWithTooltip.js +46 -0
  81. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +7 -0
  82. package/lib/components/Catalog/CatalogViewModeToggle.js +67 -0
  83. package/lib/components/Catalog/variables.d.ts +1 -0
  84. package/lib/components/Catalog/variables.dark.d.ts +1 -0
  85. package/lib/components/Catalog/variables.dark.js +8 -0
  86. package/lib/components/Catalog/variables.js +354 -0
  87. package/lib/components/CatalogClassic/CatalogClassicHighlight.js +1 -1
  88. package/lib/components/Filter/Filter.d.ts +1 -1
  89. package/lib/components/Filter/Filter.js +2 -2
  90. package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
  91. package/lib/components/Filter/FilterCheckboxes.js +4 -4
  92. package/lib/components/Filter/FilterContent.d.ts +3 -1
  93. package/lib/components/Filter/FilterContent.js +34 -4
  94. package/lib/components/Filter/FilterInput.js +35 -3
  95. package/lib/components/Filter/FilterSelect.d.ts +1 -1
  96. package/lib/components/Filter/FilterSelect.js +4 -4
  97. package/lib/components/LoadMore/LoadMore.d.ts +8 -0
  98. package/lib/components/LoadMore/LoadMore.js +18 -0
  99. package/lib/components/Markdown/Markdown.js +1 -1
  100. package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
  101. package/lib/components/PageNavigation/NavigationButton.js +32 -0
  102. package/lib/components/PageNavigation/NextButton.js +10 -29
  103. package/lib/components/PageNavigation/PageNavigation.js +1 -1
  104. package/lib/components/PageNavigation/PreviousButton.js +11 -27
  105. package/lib/components/Search/SearchAiConversationInput.js +2 -1
  106. package/lib/components/Select/Select.js +3 -3
  107. package/lib/components/Sidebar/Sidebar.d.ts +3 -0
  108. package/lib/components/Sidebar/Sidebar.js +3 -2
  109. package/lib/components/Tag/Tag.d.ts +3 -1
  110. package/lib/components/Tag/Tag.js +54 -2
  111. package/lib/components/Tag/variables.js +21 -0
  112. package/lib/components/Tooltip/Tooltip.d.ts +2 -1
  113. package/lib/components/Tooltip/Tooltip.js +26 -19
  114. package/lib/components/Tooltip/variables.js +17 -0
  115. package/lib/core/constants/catalog.d.ts +1 -0
  116. package/lib/core/constants/catalog.js +5 -0
  117. package/lib/core/constants/index.d.ts +1 -0
  118. package/lib/core/constants/index.js +1 -0
  119. package/lib/core/constants/search.d.ts +1 -0
  120. package/lib/core/constants/search.js +2 -1
  121. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  122. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  123. package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
  124. package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
  125. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
  126. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
  127. package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
  128. package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
  129. package/lib/core/hooks/index.d.ts +2 -0
  130. package/lib/core/hooks/index.js +2 -0
  131. package/lib/core/hooks/use-user-teams.d.ts +1 -0
  132. package/lib/core/hooks/use-user-teams.js +10 -0
  133. package/lib/core/styles/dark.js +2 -0
  134. package/lib/core/styles/global.js +63 -60
  135. package/lib/core/types/catalog.d.ts +118 -5
  136. package/lib/core/types/filter.d.ts +1 -0
  137. package/lib/core/types/hooks.d.ts +11 -4
  138. package/lib/core/types/index.d.ts +1 -0
  139. package/lib/core/types/index.js +1 -0
  140. package/lib/core/types/l10n.d.ts +1 -1
  141. package/lib/core/types/telemetry.d.ts +32 -0
  142. package/lib/core/types/telemetry.js +3 -0
  143. package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
  144. package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
  145. package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
  146. package/lib/icons/CardsIcon/CardsIcon.js +25 -0
  147. package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
  148. package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
  149. package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
  150. package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
  151. package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
  152. package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
  153. package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
  154. package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
  155. package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
  156. package/lib/icons/GithubIcon/GithubIcon.js +22 -0
  157. package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
  158. package/lib/icons/GraphIcon/GraphIcon.js +22 -0
  159. package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
  160. package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
  161. package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
  162. package/lib/icons/SlackIcon/SlackIcon.js +29 -0
  163. package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
  164. package/lib/icons/SortIcon/SortIcon.js +25 -0
  165. package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
  166. package/lib/icons/TableIcon/TableIcon.js +22 -0
  167. package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
  168. package/lib/icons/TagsIcon/TagsIcon.js +24 -0
  169. package/lib/index.d.ts +18 -0
  170. package/lib/index.js +19 -0
  171. package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
  172. package/lib/markdoc/components/Tabs/Tab.js +10 -2
  173. package/lib/markdoc/components/Tabs/TabList.js +2 -2
  174. package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
  175. package/lib/markdoc/components/Tabs/Tabs.js +2 -2
  176. package/package.json +2 -1
  177. package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
  178. package/src/components/Catalog/Catalog.tsx +235 -0
  179. package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
  180. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
  181. package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
  182. package/src/components/Catalog/CatalogEntities.tsx +107 -0
  183. package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
  184. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
  185. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
  186. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
  187. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
  188. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
  189. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
  190. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
  191. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
  192. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
  193. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
  194. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
  195. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
  196. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
  197. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
  198. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
  199. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
  200. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
  201. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
  202. package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
  203. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
  204. package/src/components/Catalog/CatalogHighlight.tsx +56 -0
  205. package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
  206. package/src/components/Catalog/CatalogSelector.tsx +67 -0
  207. package/src/components/Catalog/CatalogSortButton.tsx +78 -0
  208. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
  209. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
  210. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
  211. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
  212. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
  213. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
  214. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
  215. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
  216. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
  217. package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
  218. package/src/components/Catalog/variables.dark.ts +5 -0
  219. package/src/components/Catalog/variables.ts +351 -0
  220. package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
  221. package/src/components/Filter/Filter.tsx +10 -2
  222. package/src/components/Filter/FilterCheckboxes.tsx +8 -4
  223. package/src/components/Filter/FilterContent.tsx +21 -5
  224. package/src/components/Filter/FilterInput.tsx +16 -4
  225. package/src/components/Filter/FilterSelect.tsx +8 -4
  226. package/src/components/LoadMore/LoadMore.tsx +38 -0
  227. package/src/components/Markdown/Markdown.tsx +1 -1
  228. package/src/components/PageNavigation/NavigationButton.tsx +68 -0
  229. package/src/components/PageNavigation/NextButton.tsx +20 -43
  230. package/src/components/PageNavigation/PageNavigation.tsx +1 -1
  231. package/src/components/PageNavigation/PreviousButton.tsx +20 -43
  232. package/src/components/Search/SearchAiConversationInput.tsx +3 -0
  233. package/src/components/Select/Select.tsx +5 -3
  234. package/src/components/Sidebar/Sidebar.tsx +1 -1
  235. package/src/components/Tag/Tag.tsx +67 -1
  236. package/src/components/Tag/variables.ts +21 -0
  237. package/src/components/Tooltip/Tooltip.tsx +31 -22
  238. package/src/components/Tooltip/variables.ts +17 -0
  239. package/src/core/constants/catalog.ts +1 -0
  240. package/src/core/constants/index.ts +1 -0
  241. package/src/core/constants/search.ts +2 -0
  242. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  243. package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
  244. package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
  245. package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
  246. package/src/core/hooks/index.ts +2 -0
  247. package/src/core/hooks/use-user-teams.ts +8 -0
  248. package/src/core/styles/dark.ts +2 -0
  249. package/src/core/styles/global.ts +3 -0
  250. package/src/core/types/catalog.ts +143 -5
  251. package/src/core/types/filter.ts +1 -0
  252. package/src/core/types/hooks.ts +32 -5
  253. package/src/core/types/index.ts +1 -0
  254. package/src/core/types/l10n.ts +20 -0
  255. package/src/core/types/telemetry.ts +36 -0
  256. package/src/core/utils/load-and-navigate.ts +5 -4
  257. package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
  258. package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
  259. package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
  260. package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
  261. package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
  262. package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
  263. package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
  264. package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
  265. package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
  266. package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
  267. package/src/icons/SortIcon/SortIcon.tsx +29 -0
  268. package/src/icons/TableIcon/TableIcon.tsx +26 -0
  269. package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
  270. package/src/index.ts +20 -0
  271. package/src/markdoc/components/Tabs/Tab.tsx +12 -1
  272. package/src/markdoc/components/Tabs/TabList.tsx +2 -1
  273. package/src/markdoc/components/Tabs/Tabs.tsx +8 -3
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CatalogEntity = CatalogEntity;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const utils_1 = require("../../../core/utils");
10
+ const ArrowLeftIcon_1 = require("../../../icons/ArrowLeftIcon/ArrowLeftIcon");
11
+ const CatalogPageDescription_1 = require("../../../components/Catalog/CatalogPageDescription");
12
+ const CatalogEntityProperties_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties");
13
+ const CatalogEntityMetadata_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityMetadata");
14
+ const CatalogEntityLinks_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityLinks");
15
+ const Breadcrumbs_1 = require("../../../components/Breadcrumbs/Breadcrumbs");
16
+ const Sidebar_1 = require("../../../components/Sidebar/Sidebar");
17
+ const Menu_1 = require("../../../components/Menu/Menu");
18
+ const Button_1 = require("../../../components/Button/Button");
19
+ const CatalogEntityRelations_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations");
20
+ const hooks_1 = require("../../../core/hooks");
21
+ const SidebarActions_1 = require("../../SidebarActions/SidebarActions");
22
+ function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRelations, mainCatalogLabelTranslationKey, mainCatalogSlug, }) {
23
+ var _a;
24
+ const { useTranslate, useCatalog } = (0, hooks_1.useThemeHooks)();
25
+ const { translate } = useTranslate();
26
+ const linkToMainCatalog = `catalogs/${catalogConfig.slug}`;
27
+ const linkToMainCatalogLabel = translate(catalogConfig.titleTranslationKey);
28
+ const { layout, collapsedSidebar, onChangeViewClick, onChangeCollapseSidebarClick } = useCatalog();
29
+ return (react_1.default.createElement(CatalogPageWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntity" },
30
+ react_1.default.createElement(CatalogSidebar, { collapsed: collapsedSidebar, header: react_1.default.createElement(BackLink, { icon: react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null), iconPosition: "left", variant: "ghost", size: "medium", "data-component-name": "Sidebar/BackButton", to: linkToMainCatalog }, collapsedSidebar ? ('') : (react_1.default.createElement("div", { "data-translation-key": "sidebar.menu.backLabel" }, translate('sidebar.menu.backLabel')))), menu: react_1.default.createElement(Menu_1.Menu, { items: [
31
+ {
32
+ label: 'Overview',
33
+ link: `${linkToMainCatalog}/entities/${entity.key}`,
34
+ active: true,
35
+ items: [],
36
+ hasActiveSubItem: false,
37
+ },
38
+ ] }), footer: react_1.default.createElement(SidebarActions_1.SidebarActions, { layout: layout, collapsedSidebar: collapsedSidebar, isApiDocs: false, onChangeViewClick: onChangeViewClick, onChangeCollapseSidebarClick: onChangeCollapseSidebarClick }) }),
39
+ react_1.default.createElement(CatalogPageContent, null,
40
+ react_1.default.createElement(Breadcrumbs_1.Breadcrumbs, { additionalBreadcrumbs: [
41
+ ...(mainCatalogLabelTranslationKey
42
+ ? [
43
+ {
44
+ label: translate(mainCatalogLabelTranslationKey),
45
+ link: `catalogs/${mainCatalogSlug}`,
46
+ },
47
+ ]
48
+ : []),
49
+ { label: linkToMainCatalogLabel, link: linkToMainCatalog },
50
+ { label: entity.title },
51
+ ] }),
52
+ react_1.default.createElement(CatalogEntityPageWrapper, null,
53
+ react_1.default.createElement(CatalogPageDescription_1.CatalogPageDescription, { title: entity.title, description: (_a = entity.summary) !== null && _a !== void 0 ? _a : '', tag: entity.key }),
54
+ react_1.default.createElement(CatalogEntityProperties_1.CatalogEntityProperties, { entity: entity }),
55
+ react_1.default.createElement(CatalogTwoColumnsSection, null,
56
+ react_1.default.createElement(CatalogEntityMetadata_1.CatalogEntityMetadata, { entity: entity }),
57
+ react_1.default.createElement(CatalogEntityLinks_1.CatalogEntityLinks, { entity: entity })),
58
+ react_1.default.createElement(CatalogEntityRelations_1.CatalogEntityRelations, { entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, initialRelations: initialRelations })))));
59
+ }
60
+ const CatalogPageWrapper = styled_components_1.default.div `
61
+ --sidebar-width: var(--catalog-sidebar-width);
62
+ --link-color-primary: var(--breadcrumbs-text-color);
63
+
64
+ display: flex;
65
+ flex-direction: column;
66
+
67
+ font-weight: var(--font-weight-regular);
68
+
69
+ color: var(--text-color-secondary);
70
+ font-size: var(--font-size-base);
71
+ font-family: var(--font-family-base);
72
+ line-height: var(--line-height-base);
73
+
74
+ hr {
75
+ border: 0;
76
+ width: calc(100% + 48px);
77
+ margin: auto -24px 0 -24px;
78
+ border-top: 1px solid var(--border-color-primary);
79
+ }
80
+ a:not([role='button']) {
81
+ text-decoration: none;
82
+ color: var(--link-color-primary);
83
+ font-weight: var(--link-font-weight);
84
+ }
85
+
86
+ @media screen and (min-width: ${utils_1.breakpoints.medium}) {
87
+ flex-direction: row;
88
+ padding: 0;
89
+ }
90
+ `;
91
+ const CatalogPageContent = styled_components_1.default.main `
92
+ flex: 1;
93
+ width: 90%;
94
+ margin: 0 auto;
95
+
96
+ @media screen and (min-width: ${utils_1.breakpoints.medium}) {
97
+ width: 100%;
98
+ padding: var(--catalog-page-padding);
99
+ }
100
+ `;
101
+ const CatalogSidebar = (0, styled_components_1.default)(Sidebar_1.Sidebar) `
102
+ display: none;
103
+
104
+ @media screen and (min-width: ${utils_1.breakpoints.medium}) {
105
+ display: flex;
106
+ }
107
+ --menu-container-padding-top: 0;
108
+ `;
109
+ const CatalogEntityPageWrapper = styled_components_1.default.div `
110
+ display: flex;
111
+ flex-direction: column;
112
+
113
+ font-weight: var(--font-weight-regular);
114
+
115
+ color: var(--text-color-secondary);
116
+ font-size: var(--font-size-base);
117
+ font-family: var(--font-family-base);
118
+ line-height: var(--line-height-base);
119
+ `;
120
+ const CatalogTwoColumnsSection = styled_components_1.default.section `
121
+ display: grid;
122
+ grid-template-columns: 1fr 1fr;
123
+ gap: 24px;
124
+ align-items: start;
125
+ `;
126
+ const BackLink = (0, styled_components_1.default)(Button_1.Button) `
127
+ padding: var(--spacing-unit) 0;
128
+ height: calc(var(--line-height-base) + var(--spacing-unit) * 2);
129
+ justify-content: flex-start;
130
+ width: 100%;
131
+ margin-bottom: 0px;
132
+ `;
133
+ //# sourceMappingURL=CatalogEntity.js.map
@@ -0,0 +1,7 @@
1
+ import { ReactNode, JSX } from 'react';
2
+ export type CatalogEntityInfoBarProps = {
3
+ leftContent: ReactNode;
4
+ rightContent: ReactNode;
5
+ withSeparator?: boolean;
6
+ };
7
+ export declare function CatalogEntityInfoBar({ leftContent, rightContent, withSeparator, }: CatalogEntityInfoBarProps): JSX.Element;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CatalogEntityInfoBar = CatalogEntityInfoBar;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ function CatalogEntityInfoBar({ leftContent, rightContent, withSeparator = true, }) {
10
+ return (react_1.default.createElement(InfoBarWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityInfoBar" },
11
+ react_1.default.createElement(LeftColumn, { withSeparator: withSeparator }, leftContent),
12
+ react_1.default.createElement(RightColumn, null, rightContent)));
13
+ }
14
+ const InfoBarWrapper = styled_components_1.default.div `
15
+ display: grid;
16
+ grid-template-columns: 1fr 1fr;
17
+ grid-template-areas: 'left right';
18
+ align-items: center;
19
+
20
+ color: var(--catalog-card-text-color, inherit);
21
+ background-color: var(--catalog-card-bg-color, white);
22
+ border: var(--catalog-card-border-width, 1px) var(--catalog-card-border-style)
23
+ var(--catalog-card-border-color);
24
+ border-radius: var(--catalog-card-border-radius);
25
+ transition: all 0.2s ease-in-out;
26
+ height: 100%;
27
+ padding: var(--catalog-card-gap);
28
+
29
+ &:hover {
30
+ border-color: var(--catalog-card-border-color-hover);
31
+ }
32
+ `;
33
+ const LeftColumn = styled_components_1.default.div `
34
+ font-weight: var(--font-weight-medium);
35
+ color: var(--catalog-metadata-label-color);
36
+ width: 100%;
37
+ grid-area: left;
38
+ justify-self: start;
39
+ text-align: left;
40
+ border-right: ${({ withSeparator }) => withSeparator ? '1px solid var(--border-color-primary)' : 'none'};
41
+ `;
42
+ const RightColumn = styled_components_1.default.div `
43
+ color: var(--catalog-metadata-value-color);
44
+ font-weight: var(--font-weight-medium);
45
+ grid-area: right;
46
+ justify-self: end;
47
+ text-align: right;
48
+ `;
49
+ //# sourceMappingURL=CatalogEntityInfoBar.js.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { BffCatalogEntity } from '../../../core/types';
3
+ export type CatalogEntityLinksProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function CatalogEntityLinks({ entity }: CatalogEntityLinksProps): React.JSX.Element | null;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CatalogEntityLinks = CatalogEntityLinks;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const LaunchIcon_1 = require("../../../icons/LaunchIcon/LaunchIcon");
10
+ const DocumentIcon_1 = require("../../../icons/DocumentIcon/DocumentIcon");
11
+ const CatalogEntityInfoBar_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityInfoBar");
12
+ const Link_1 = require("../../../components/Link/Link");
13
+ function CatalogEntityLinks({ entity }) {
14
+ const links = Object.entries(entity.links || []);
15
+ if (!links.length) {
16
+ return null;
17
+ }
18
+ return (react_1.default.createElement(LinksWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityLinks" },
19
+ react_1.default.createElement(Heading, null, "Links"),
20
+ links.map(([key, value]) => (react_1.default.createElement(CatalogEntityInfoBar_1.CatalogEntityInfoBar, { key: key, leftContent: react_1.default.createElement(Label, null,
21
+ react_1.default.createElement(DocumentIcon_1.DocumentIcon, null),
22
+ " ",
23
+ value.label), rightContent: react_1.default.createElement(Link_1.Link, { color: "var(--catalog-metadata-link-color)", to: value.url, target: "_blank" },
24
+ react_1.default.createElement(LaunchIcon_1.LaunchIcon, null)), withSeparator: false })))));
25
+ }
26
+ const LinksWrapper = styled_components_1.default.div `
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: var(--spacing-xs);
30
+ border-radius: var(--border-radius);
31
+ background-color: var(--catalog-metadata-bg-color);
32
+ transition: all 0.2s ease-in-out;
33
+ margin: var(--spacing-lg) 0;
34
+ `;
35
+ const Label = styled_components_1.default.span `
36
+ display: flex;
37
+ align-items: center;
38
+ gap: var(--spacing-unit);
39
+ font-weight: var(--font-weight-medium);
40
+ color: var(--catalog-metadata-label-color);
41
+ `;
42
+ const Heading = styled_components_1.default.h2 `
43
+ margin-bottom: var(--spacing-sm);
44
+ margin-top: 0;
45
+ font-size: var(--font-size-md);
46
+ color: var(--catalog-metadata-heading-color);
47
+ `;
48
+ //# sourceMappingURL=CatalogEntityLinks.js.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { BffCatalogEntity } from '../../../core/types';
3
+ export type CatalogEntityMetadataProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function CatalogEntityMetadata({ entity }: CatalogEntityMetadataProps): React.JSX.Element | null;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.CatalogEntityMetadata = CatalogEntityMetadata;
41
+ const react_1 = __importStar(require("react"));
42
+ const styled_components_1 = __importDefault(require("styled-components"));
43
+ const ChevronDownIcon_1 = require("../../../icons/ChevronDownIcon/ChevronDownIcon");
44
+ const utils_1 = require("../../../core/utils");
45
+ const hooks_1 = require("../../../core/hooks");
46
+ const CatalogEntityInfoBar_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityInfoBar");
47
+ const MAX_INITIAL_ITEMS = 4;
48
+ function CatalogEntityMetadata({ entity }) {
49
+ const { useTranslate } = (0, hooks_1.useThemeHooks)();
50
+ const { translate } = useTranslate();
51
+ const _a = entity.metadata || {}, { schema } = _a, metadataToShow = __rest(_a, ["schema"]);
52
+ const metadata = Object.entries(metadataToShow);
53
+ const [isOn, setIsOn] = (0, react_1.useState)(false);
54
+ const hasMoreItems = metadata.length > MAX_INITIAL_ITEMS;
55
+ const visibleMetadata = isOn ? metadata : metadata.slice(0, MAX_INITIAL_ITEMS);
56
+ if (!metadata.length) {
57
+ return null;
58
+ }
59
+ return (react_1.default.createElement(MetadataWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityMetadata" },
60
+ react_1.default.createElement(Heading, null, translate('catalog.entity.metadata.title')),
61
+ visibleMetadata.map(([key, value]) => (react_1.default.createElement(CatalogEntityInfoBar_1.CatalogEntityInfoBar, { key: key, leftContent: react_1.default.createElement(Label, null,
62
+ (0, utils_1.capitalize)(key),
63
+ ":"), rightContent: react_1.default.createElement(Value, null, value) }))),
64
+ hasMoreItems && (react_1.default.createElement(ShowMoreButton, { onClick: () => setIsOn(!isOn) },
65
+ isOn ? 'Show less' : 'Show more',
66
+ " ",
67
+ react_1.default.createElement(ChevronIcon, { "$isExpanded": isOn })))));
68
+ }
69
+ const MetadataWrapper = styled_components_1.default.div `
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: var(--spacing-xs);
73
+ border-radius: var(--border-radius);
74
+ background-color: var(--catalog-metadata-bg-color);
75
+ transition: all 0.2s ease-in-out;
76
+ margin: var(--spacing-lg) 0;
77
+ `;
78
+ const Label = styled_components_1.default.span `
79
+ font-weight: var(--font-weight-medium);
80
+ color: var(--catalog-metadata-label-color);
81
+ `;
82
+ const Value = styled_components_1.default.span `
83
+ color: var(--catalog-metadata-value-color);
84
+ font-weight: var(--font-weight-medium);
85
+ `;
86
+ const Heading = styled_components_1.default.h2 `
87
+ margin-bottom: var(--spacing-base);
88
+ margin-top: 0;
89
+ font-size: var(--catalog-metadata-heading-size);
90
+ `;
91
+ const ChevronIcon = (0, styled_components_1.default)(ChevronDownIcon_1.ChevronDownIcon) `
92
+ transform: ${({ $isExpanded }) => ($isExpanded ? 'rotate(180deg)' : 'rotate(0)')};
93
+ transition: transform 0.2s ease;
94
+ `;
95
+ const ShowMoreButton = styled_components_1.default.button `
96
+ background: none;
97
+ border: none;
98
+ display: flex;
99
+ align-items: center;
100
+ gap: var(--catalog-metadata-button-gap, 0.5rem);
101
+ cursor: pointer;
102
+ color: var(--catalog-metadata-button-color);
103
+ padding: 0;
104
+ font-weight: var(--font-weight-medium);
105
+ margin-top: var(--spacing-unit);
106
+
107
+ &:hover {
108
+ color: var(--catalog-metadata-button-color-hover);
109
+ }
110
+ `;
111
+ //# sourceMappingURL=CatalogEntityMetadata.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { BffCatalogEntity } from '../../../../core/types';
3
+ export type ApiDescriptionPropertyProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function ApiDescriptionProperty({ entity }: ApiDescriptionPropertyProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ApiDescriptionProperty = ApiDescriptionProperty;
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_router_dom_1 = require("react-router-dom");
9
+ const theme_1 = require("../../../../index.js");
10
+ const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
11
+ function ApiDescriptionProperty({ entity }) {
12
+ var _a;
13
+ const { useTranslate } = (0, theme_1.useThemeHooks)();
14
+ const { translate } = useTranslate();
15
+ const navigate = (0, react_router_dom_1.useNavigate)();
16
+ const pathPrefix = (0, theme_1.getPathPrefix)();
17
+ const descriptionFile = (_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.descriptionFile;
18
+ return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty" },
19
+ react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
20
+ react_1.default.createElement(theme_1.DocumentIcon, null),
21
+ translate('catalog.entity.properties.apiDescription.title')), content: react_1.default.createElement(theme_1.Tag, null, descriptionFile), onClick: () => {
22
+ navigate(`${pathPrefix}/${descriptionFile}`);
23
+ } })));
24
+ }
25
+ //# sourceMappingURL=ApiDescriptionProperty.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { BffCatalogEntity } from '../../../../core/types';
3
+ export type CatalogEntityPropertiesProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function CatalogEntityProperties({ entity }: CatalogEntityPropertiesProps): JSX.Element;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CatalogEntityProperties = CatalogEntityProperties;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const EntityTypeProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty");
10
+ const GitProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty");
11
+ const TagsProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty");
12
+ const ApiDescriptionProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty");
13
+ const UserEmailProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty");
14
+ const DomainsProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty");
15
+ const OwnersProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty");
16
+ const ContactProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty");
17
+ const propertyRenderers = [
18
+ {
19
+ key: 'type',
20
+ condition: (entity) => !!entity.type,
21
+ component: EntityTypeProperty_1.EntityTypeProperty,
22
+ },
23
+ {
24
+ key: 'contact',
25
+ condition: (entity) => { var _a, _b; return !!((_b = (_a = entity.contact) === null || _a === void 0 ? void 0 : _a.slack) === null || _b === void 0 ? void 0 : _b.channels); },
26
+ component: ContactProperty_1.ContactProperty,
27
+ },
28
+ {
29
+ key: 'git',
30
+ condition: (entity) => !!entity.git,
31
+ component: GitProperty_1.GitProperty,
32
+ },
33
+ {
34
+ key: 'tags',
35
+ condition: (entity) => !!entity.tags,
36
+ component: TagsProperty_1.TagsProperty,
37
+ },
38
+ {
39
+ key: 'api-description',
40
+ condition: (entity) => { var _a; return entity.type === 'api-description' && !!((_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.descriptionFile); },
41
+ component: ApiDescriptionProperty_1.ApiDescriptionProperty,
42
+ },
43
+ {
44
+ key: 'user-email',
45
+ condition: (entity) => { var _a; return entity.type === 'user' && !!((_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.email); },
46
+ component: UserEmailProperty_1.UserEmailProperty,
47
+ },
48
+ {
49
+ key: 'domains',
50
+ condition: (entity) => { var _a, _b; return ((_b = (_a = entity.domains) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0; },
51
+ component: DomainsProperty_1.DomainsProperty,
52
+ },
53
+ {
54
+ key: 'owners',
55
+ condition: (entity) => { var _a, _b; return ((_b = (_a = entity.owners) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0; },
56
+ component: OwnersProperty_1.OwnersProperty,
57
+ },
58
+ ];
59
+ function CatalogEntityProperties({ entity }) {
60
+ return (react_1.default.createElement(CatalogEntityPropertiesGridWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties" }, propertyRenderers
61
+ .filter((renderer) => renderer.condition(entity))
62
+ .map((renderer) => (react_1.default.createElement(renderer.component, { key: renderer.key + entity.id, entity: entity })))));
63
+ }
64
+ const CatalogEntityPropertiesGridWrapper = styled_components_1.default.div `
65
+ display: grid;
66
+ grid-template-columns: repeat(auto-fill, minmax(325px, 1fr));
67
+ gap: var(--spacing-base);
68
+ `;
69
+ //# sourceMappingURL=CatalogEntityProperties.js.map
@@ -0,0 +1,7 @@
1
+ import { ReactNode, JSX } from 'react';
2
+ export type CatalogEntityPropertyCardProps = {
3
+ header: ReactNode;
4
+ content: ReactNode;
5
+ onClick?: () => void;
6
+ };
7
+ export declare function CatalogEntityPropertyCard({ header, content, onClick, }: CatalogEntityPropertyCardProps): JSX.Element;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CatalogEntityPropertyCard = CatalogEntityPropertyCard;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ function CatalogEntityPropertyCard({ header, content, onClick, }) {
10
+ return (react_1.default.createElement(CatalogEntityPropertyWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard", onClick: onClick },
11
+ react_1.default.createElement(CardHeader, null, header),
12
+ react_1.default.createElement(CardContent, null, content)));
13
+ }
14
+ const CatalogEntityPropertyWrapper = styled_components_1.default.div `
15
+ display: flex;
16
+ flex-direction: column;
17
+ color: var(--catalog-card-text-color);
18
+ background-color: var(--catalog-card-bg-color);
19
+ border: var(--catalog-card-border-width) var(--catalog-card-border-style)
20
+ var(--catalog-card-border-color);
21
+ border-radius: var(--catalog-card-border-radius, 8px);
22
+ transition: all 0.2s ease-in-out;
23
+ height: 100%;
24
+ padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
25
+ gap: var(--catalog-card-content-gap-vertical);
26
+
27
+ &:hover {
28
+ border-color: var(--catalog-card-border-color-hover);
29
+ }
30
+
31
+ ${(props) => props.onClick &&
32
+ `
33
+ cursor: pointer;
34
+ `}
35
+ `;
36
+ const CardHeader = styled_components_1.default.div `
37
+ display: flex;
38
+ align-items: center;
39
+ gap: var(--catalog-card-content-gap);
40
+ `;
41
+ const CardContent = styled_components_1.default.div `
42
+ flex: 1;
43
+ display: flex;
44
+ align-items: center;
45
+ gap: var(--catalog-card-content-gap);
46
+ flex-wrap: wrap;
47
+ `;
48
+ //# sourceMappingURL=CatalogEntityPropertyCard.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { BffCatalogEntity } from '../../../../core/types';
3
+ export type ContactPropertyProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function ContactProperty({ entity }: ContactPropertyProps): JSX.Element;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ContactProperty = ContactProperty;
7
+ const react_1 = __importDefault(require("react"));
8
+ const SlackIcon_1 = require("../../../../icons/SlackIcon/SlackIcon");
9
+ const Tag_1 = require("../../../../components/Tag/Tag");
10
+ const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
11
+ function ContactProperty({ entity }) {
12
+ var _a, _b;
13
+ const channels = (_b = (_a = entity.contact) === null || _a === void 0 ? void 0 : _a.slack) === null || _b === void 0 ? void 0 : _b.channels;
14
+ return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty" },
15
+ react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
16
+ react_1.default.createElement(SlackIcon_1.SlackIcon, null),
17
+ "Slack channels"), content: react_1.default.createElement(react_1.default.Fragment, null, channels === null || channels === void 0 ? void 0 : channels.map((channel) => (react_1.default.createElement(Tag_1.Tag, { key: channel.name, style: { backgroundColor: 'var(--bg-color)' } }, channel.name)))) })));
18
+ }
19
+ //# sourceMappingURL=ContactProperty.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { BffCatalogEntity } from '../../../../core/types';
3
+ export type DomainsPropertyProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function DomainsProperty({ entity }: DomainsPropertyProps): JSX.Element;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DomainsProperty = DomainsProperty;
7
+ const react_1 = __importDefault(require("react"));
8
+ const GraphIcon_1 = require("../../../../icons/GraphIcon/GraphIcon");
9
+ const theme_1 = require("../../../../index.js");
10
+ const CatalogEntityPropertyCard_1 = require("./CatalogEntityPropertyCard");
11
+ function DomainsProperty({ entity }) {
12
+ const { domains = [] } = entity;
13
+ return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty" },
14
+ react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
15
+ react_1.default.createElement(GraphIcon_1.GraphIcon, null),
16
+ "Domains"), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(theme_1.Tag, { key: domain === null || domain === void 0 ? void 0 : domain.id, style: { backgroundColor: 'var(--bg-color)' } },
17
+ react_1.default.createElement(GraphIcon_1.GraphIcon, null), domain === null || domain === void 0 ? void 0 :
18
+ domain.title)))) })));
19
+ }
20
+ //# sourceMappingURL=DomainsProperty.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { BffCatalogEntity } from '../../../../core/types';
3
+ export type EntityTypePropertyProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function EntityTypeProperty({ entity }: EntityTypePropertyProps): JSX.Element;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EntityTypeProperty = EntityTypeProperty;
7
+ const react_1 = __importDefault(require("react"));
8
+ const EntityTypeIcon_1 = require("../../../../icons/EntityTypeIcon/EntityTypeIcon");
9
+ const utils_1 = require("../../../../core/utils");
10
+ const CatalogEntityTypeIcon_1 = require("../../../../components/Catalog/CatalogEntityTypeIcon");
11
+ const CatalogEntityPropertyCard_1 = require("./CatalogEntityPropertyCard");
12
+ function EntityTypeProperty({ entity }) {
13
+ return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty" },
14
+ react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
15
+ react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null),
16
+ "Entity type"), content: react_1.default.createElement(react_1.default.Fragment, null,
17
+ react_1.default.createElement(CatalogEntityTypeIcon_1.CatalogEntityTypeIcon, { entityType: entity.type }),
18
+ react_1.default.createElement("strong", null, (0, utils_1.capitalize)(entity.type))) })));
19
+ }
20
+ //# sourceMappingURL=EntityTypeProperty.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ import { BffCatalogEntity } from '../../../../core/types';
3
+ export type GitPropertyProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function GitProperty({ entity }: GitPropertyProps): JSX.Element;