@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,127 @@
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.CatalogTableViewRow = exports.getEntityTagColor = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const Tag_1 = require("../../../components/Tag/Tag");
10
+ const CatalogOwnersCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogOwnersCell");
11
+ const CatalogDomainsCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogDomainsCell");
12
+ const CatalogEntityCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogEntityCell");
13
+ const CatalogTagsCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogTagsCell");
14
+ const useCatalogTableViewRow_1 = require("../../../core/hooks/catalog/useCatalogTableViewRow");
15
+ const getEntityTagColor = (type) => {
16
+ switch (type) {
17
+ case 'service':
18
+ return 'blue';
19
+ case 'domain':
20
+ return 'grass';
21
+ case 'team':
22
+ return 'purple';
23
+ case 'user':
24
+ return 'yellow';
25
+ case 'api-description':
26
+ return 'sky';
27
+ default:
28
+ const exhaustiveCheck = type;
29
+ throw new Error(`Unhandled entity type: ${exhaustiveCheck}`);
30
+ }
31
+ };
32
+ exports.getEntityTagColor = getEntityTagColor;
33
+ const baseColumns = [
34
+ {
35
+ key: 'entity',
36
+ title: 'Entity',
37
+ render: (entity) => react_1.default.createElement(CatalogEntityCell_1.CatalogEntityCell, { entity: entity }),
38
+ width: '3fr',
39
+ minWidth: '250px',
40
+ sortable: true,
41
+ sortKey: 'title',
42
+ },
43
+ {
44
+ key: 'type',
45
+ title: 'Type',
46
+ render: (entity) => (react_1.default.createElement(EntityTypeTag, { color: (0, exports.getEntityTagColor)(entity.type) }, entity.type)),
47
+ width: '2fr',
48
+ minWidth: '120px',
49
+ sortable: true,
50
+ sortKey: 'type',
51
+ },
52
+ {
53
+ key: 'domains',
54
+ title: 'Domains',
55
+ render: (entity) => {
56
+ var _a;
57
+ return (react_1.default.createElement(CatalogDomainsCell_1.CatalogDomainsCell, { domains: ((_a = entity.domains) === null || _a === void 0 ? void 0 : _a.map((domain) => domain.title)) || [] }));
58
+ },
59
+ width: '2fr',
60
+ minWidth: '150px',
61
+ },
62
+ {
63
+ key: 'owners',
64
+ title: 'Owners',
65
+ render: (entity) => {
66
+ var _a;
67
+ return (react_1.default.createElement(CatalogOwnersCell_1.CatalogOwnersCell, { owners: ((_a = entity.owners) === null || _a === void 0 ? void 0 : _a.map((owner) => owner.title)) || [] }));
68
+ },
69
+ width: '2fr',
70
+ minWidth: '150px',
71
+ },
72
+ {
73
+ key: 'tags',
74
+ title: 'Tags',
75
+ render: (entity) => react_1.default.createElement(CatalogTagsCell_1.CatalogTagsCell, { entity: entity }),
76
+ width: '2fr',
77
+ minWidth: '120px',
78
+ },
79
+ ];
80
+ const CatalogTableViewRow = ({ entity, entitiesCatalogConfig, catalogConfig, columns = baseColumns, }) => {
81
+ const { getEntityDetailsLink } = (0, useCatalogTableViewRow_1.useCatalogTableViewRow)({
82
+ entityKey: entity.key,
83
+ entityType: entity.type,
84
+ catalogConfig,
85
+ entitiesCatalogConfig,
86
+ });
87
+ const handleRowClick = () => {
88
+ window.location.assign(getEntityDetailsLink());
89
+ };
90
+ return (react_1.default.createElement(TableRow, { key: entity.id, columnsWidths: columns.map((column) => column.width || '1fr'), columnsMinWidths: columns.map((column) => column.minWidth || 'auto'), onClick: () => handleRowClick() }, columns.map((column) => (react_1.default.createElement(TableCell, { key: column.key, className: column.key === 'entity' ? '' : 'tooltip-cell-container' }, column.render(entity))))));
91
+ };
92
+ exports.CatalogTableViewRow = CatalogTableViewRow;
93
+ const EntityTypeTag = (0, styled_components_1.default)(Tag_1.Tag) `
94
+ font-size: var(--font-size-base);
95
+ background-color: transparent;
96
+ text-transform: lowercase;
97
+ `;
98
+ const TableRow = styled_components_1.default.div `
99
+ display: grid;
100
+ grid-template-columns: ${({ columnsWidths, columnsMinWidths }) => columnsWidths
101
+ .map((width, index) => columnsMinWidths[index] !== 'auto' ? `minmax(${columnsMinWidths[index]}, ${width})` : width)
102
+ .join(' ')};
103
+ border-bottom: 1px solid var(--catalog-table-border-color);
104
+ cursor: pointer;
105
+ transition: background-color 0.2s ease;
106
+
107
+ &:last-child {
108
+ border-bottom: none;
109
+ }
110
+
111
+ &:hover {
112
+ background-color: var(--catalog-table-row-hover-bg-color);
113
+ }
114
+ `;
115
+ const TableCell = styled_components_1.default.div `
116
+ padding: var(--catalog-table-cell-padding);
117
+ display: flex;
118
+ align-items: center;
119
+ position: relative;
120
+ width: 100%;
121
+ overflow: hidden;
122
+
123
+ &.tooltip-cell-container {
124
+ overflow: visible;
125
+ }
126
+ `;
127
+ //# sourceMappingURL=CatalogTableViewRow.js.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { BffCatalogEntity } from '../../../core/types';
3
+ export type CatalogTagsCellProps = {
4
+ entity: BffCatalogEntity;
5
+ };
6
+ export declare function CatalogTagsCell({ entity }: CatalogTagsCellProps): React.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.CatalogTagsCell = CatalogTagsCell;
7
+ const react_1 = __importDefault(require("react"));
8
+ const CatalogTagsWithTooltip_1 = require("../../../components/Catalog/CatalogTagsWithTooltip");
9
+ function CatalogTagsCell({ entity }) {
10
+ return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogTableView/CatalogTagsCell" },
11
+ react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { "data-testid": "catalog-tags-cell", items: entity.tags || [], showPlaceholder: false, tagProps: {
12
+ style: {
13
+ fontSize: 'var(--font-size-base)',
14
+ borderRadius: 'var(--border-radius)',
15
+ },
16
+ borderless: true,
17
+ color: 'grey',
18
+ } })));
19
+ }
20
+ //# sourceMappingURL=CatalogTagsCell.js.map
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export type CatalogUserEntityCellProps = {
3
+ name: string;
4
+ email: string;
5
+ };
6
+ export declare function CatalogUserEntityCell({ name, email }: CatalogUserEntityCellProps): React.JSX.Element;
7
+ export declare const Email: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,66 @@
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.Email = void 0;
7
+ exports.CatalogUserEntityCell = CatalogUserEntityCell;
8
+ const react_1 = __importDefault(require("react"));
9
+ const styled_components_1 = __importDefault(require("styled-components"));
10
+ const CatalogHighlight_1 = require("../../../components/Catalog/CatalogHighlight");
11
+ const extractInitials = (name) => {
12
+ return name
13
+ .split(' ')
14
+ .map((n) => n[0])
15
+ .join('');
16
+ };
17
+ function CatalogUserEntityCell({ name, email }) {
18
+ return (react_1.default.createElement(EntityTitleCellWrapper, { "data-component-name": "Catalog/CatalogTableView/CatalogUserEntityCell" },
19
+ react_1.default.createElement(Avatar, null, extractInitials(name)),
20
+ react_1.default.createElement(EntityTitleContent, null,
21
+ react_1.default.createElement(EntityTitle, null,
22
+ react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, name)),
23
+ react_1.default.createElement(exports.Email, null,
24
+ react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, email)))));
25
+ }
26
+ const EntityTitleCellWrapper = styled_components_1.default.div `
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 6px;
30
+ max-width: 100%;
31
+ `;
32
+ const Avatar = styled_components_1.default.div `
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ width: 32px;
37
+ height: 32px;
38
+ border-radius: 50%;
39
+ background-color: var(--catalog-avatar-bg-color);
40
+ flex-shrink: 0;
41
+ font-size: 14px;
42
+ font-weight: 400;
43
+ `;
44
+ const EntityTitleContent = styled_components_1.default.div `
45
+ display: flex;
46
+ flex-direction: column;
47
+ overflow: hidden;
48
+ `;
49
+ const EntityTitle = styled_components_1.default.div `
50
+ font-size: var(--catalog-table-entity-title-font-size);
51
+ line-height: var(--catalog-table-entity-title-line-height);
52
+ font-weight: var(--catalog-table-entity-title-font-weight);
53
+ white-space: nowrap;
54
+ overflow: hidden;
55
+ text-overflow: ellipsis;
56
+ `;
57
+ exports.Email = styled_components_1.default.div `
58
+ font-size: var(--catalog-table-entity-summary-font-size);
59
+ line-height: var(--catalog-table-entity-summary-line-height);
60
+ color: var(--color-blue-6);
61
+ white-space: nowrap;
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ width: 100%;
65
+ `;
66
+ //# sourceMappingURL=CatalogUserEntityCell.js.map
@@ -0,0 +1,9 @@
1
+ import { JSX } from 'react';
2
+ import { TagProps } from '../Tag/Tag';
3
+ export type CatalogTagsWithTooltipProps = {
4
+ items: string[];
5
+ itemsToShow?: number;
6
+ showPlaceholder?: boolean;
7
+ tagProps?: TagProps;
8
+ };
9
+ export declare function CatalogTagsWithTooltip({ items, itemsToShow, showPlaceholder, tagProps, }: CatalogTagsWithTooltipProps): JSX.Element | null;
@@ -0,0 +1,46 @@
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.CatalogTagsWithTooltip = CatalogTagsWithTooltip;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const constants_1 = require("../../core/constants");
10
+ const Tag_1 = require("../Tag/Tag");
11
+ const CatalogHighlight_1 = require("./CatalogHighlight");
12
+ const Tooltip_1 = require("../Tooltip/Tooltip");
13
+ function CatalogTagsWithTooltip({ items, itemsToShow = 1, showPlaceholder = true, tagProps, }) {
14
+ if (!items || items.length === 0) {
15
+ if (showPlaceholder) {
16
+ return (react_1.default.createElement(CatalogTagsWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" },
17
+ react_1.default.createElement(Tag_1.Tag, { style: { backgroundColor: 'var(--catalog-tags-placeholder-bg-color)' }, color: "grey" }, "N/A")));
18
+ }
19
+ return null;
20
+ }
21
+ if (items.length <= itemsToShow) {
22
+ return (react_1.default.createElement(Tooltip_1.TooltipComponent, { tip: items.join(', '), placement: "bottom", className: "catalog", width: "400px", disabled: items.join(', ').length <= constants_1.CATALOG_TAG_MAX_LENGTH },
23
+ react_1.default.createElement(CatalogTagsWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" }, items.map((item, index) => (react_1.default.createElement(Tag_1.Tag, Object.assign({ key: `${item}-${index}` }, tagProps, { maxLength: constants_1.CATALOG_TAG_MAX_LENGTH }),
24
+ react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, item)))))));
25
+ }
26
+ const displayedItems = items.slice(0, itemsToShow);
27
+ const remainingCount = items.length - itemsToShow;
28
+ return (react_1.default.createElement(Tooltip_1.TooltipComponent, { tip: items.join(', '), placement: "bottom", className: "catalog", width: "400px" },
29
+ react_1.default.createElement(CatalogTagsWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" },
30
+ displayedItems.map((item, index) => (react_1.default.createElement(Tag_1.Tag, Object.assign({ key: `${item}-${index}` }, tagProps, { maxLength: constants_1.CATALOG_TAG_MAX_LENGTH }),
31
+ react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, item)))),
32
+ react_1.default.createElement(MoreTagsButton, null,
33
+ "+",
34
+ remainingCount,
35
+ " more"))));
36
+ }
37
+ const CatalogTagsWrapper = styled_components_1.default.div `
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ gap: var(--catalog-tags-wrapper-gap);
41
+ `;
42
+ const MoreTagsButton = styled_components_1.default.span `
43
+ font-size: var(--catalog-tags-more-button-font-size);
44
+ margin-left: var(--catalog-tags-more-button-margin-left);
45
+ `;
46
+ //# sourceMappingURL=CatalogTagsWithTooltip.js.map
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { CatalogViewMode } from '../../core';
3
+ export type CatalogViewModeToggleProps = {
4
+ viewMode: CatalogViewMode;
5
+ onViewModeChange: (mode: CatalogViewMode) => void;
6
+ };
7
+ export declare function CatalogViewModeToggle({ viewMode: initialViewMode, onViewModeChange, }: CatalogViewModeToggleProps): React.JSX.Element;
@@ -0,0 +1,67 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.CatalogViewModeToggle = CatalogViewModeToggle;
30
+ const react_1 = __importStar(require("react"));
31
+ const styled_components_1 = __importDefault(require("styled-components"));
32
+ const TableIcon_1 = require("../../icons/TableIcon/TableIcon");
33
+ const CardsIcon_1 = require("../../icons/CardsIcon/CardsIcon");
34
+ function useViewMode(initialViewMode) {
35
+ const [viewMode, setViewMode] = (0, react_1.useState)(null);
36
+ (0, react_1.useEffect)(() => {
37
+ setViewMode(initialViewMode);
38
+ }, [initialViewMode]);
39
+ return viewMode;
40
+ }
41
+ function CatalogViewModeToggle({ viewMode: initialViewMode, onViewModeChange, }) {
42
+ const viewMode = useViewMode(initialViewMode);
43
+ return (react_1.default.createElement(ViewModeToggleWrapper, { "data-component-name": "Catalog/CatalogViewModeToggle" },
44
+ react_1.default.createElement(ViewModeButton, { className: viewMode === 'table' ? 'active' : '', onClick: () => onViewModeChange('table') },
45
+ react_1.default.createElement(TableIcon_1.TableIcon, { size: "var(--catalog-view-mode-table-icon-size)" })),
46
+ react_1.default.createElement(ViewModeButton, { className: viewMode === 'cards' ? 'active' : '', onClick: () => onViewModeChange('cards') },
47
+ react_1.default.createElement(CardsIcon_1.CardsIcon, { size: "var(--catalog-view-mode-cards-icon-size)" }))));
48
+ }
49
+ const ViewModeToggleWrapper = styled_components_1.default.div `
50
+ display: flex;
51
+ gap: var(--catalog-view-mode-toggle-gap);
52
+ `;
53
+ const ViewModeButton = styled_components_1.default.button `
54
+ width: var(--catalog-view-mode-button-width);
55
+ height: var(--catalog-view-mode-button-height);
56
+ background-color: transparent;
57
+ cursor: pointer;
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ border-radius: var(--catalog-view-mode-button-border-radius);
62
+
63
+ &.active {
64
+ background-color: var(--catalog-view-mode-toggle-active-bg-color);
65
+ }
66
+ `;
67
+ //# sourceMappingURL=CatalogViewModeToggle.js.map
@@ -0,0 +1 @@
1
+ export declare const catalog: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1 @@
1
+ export declare const catalogDarkMode: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.catalogDarkMode = void 0;
4
+ const styled_components_1 = require("styled-components");
5
+ exports.catalogDarkMode = (0, styled_components_1.css) `
6
+ --catalog-avatar-bg-color: #3b3c45;
7
+ `;
8
+ //# sourceMappingURL=variables.dark.js.map