@oneuptime/common 10.7.1 → 10.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/Models/DatabaseModels/CloudResource.ts +846 -0
  2. package/Models/DatabaseModels/CloudResourceInstance.ts +276 -0
  3. package/Models/DatabaseModels/CloudResourceLabelRule.ts +510 -0
  4. package/Models/DatabaseModels/CloudResourceOwnerRule.ts +592 -0
  5. package/Models/DatabaseModels/CloudResourceOwnerTeam.ts +487 -0
  6. package/Models/DatabaseModels/CloudResourceOwnerUser.ts +486 -0
  7. package/Models/DatabaseModels/Host.ts +209 -0
  8. package/Models/DatabaseModels/Index.ts +36 -0
  9. package/Models/DatabaseModels/RumApplication.ts +731 -0
  10. package/Models/DatabaseModels/RumApplicationClient.ts +229 -0
  11. package/Models/DatabaseModels/RumApplicationLabelRule.ts +510 -0
  12. package/Models/DatabaseModels/RumApplicationOwnerRule.ts +592 -0
  13. package/Models/DatabaseModels/RumApplicationOwnerTeam.ts +486 -0
  14. package/Models/DatabaseModels/RumApplicationOwnerUser.ts +485 -0
  15. package/Models/DatabaseModels/ServerlessFunction.ts +881 -0
  16. package/Models/DatabaseModels/ServerlessFunctionInstance.ts +212 -0
  17. package/Models/DatabaseModels/ServerlessFunctionLabelRule.ts +510 -0
  18. package/Models/DatabaseModels/ServerlessFunctionOwnerRule.ts +592 -0
  19. package/Models/DatabaseModels/ServerlessFunctionOwnerTeam.ts +487 -0
  20. package/Models/DatabaseModels/ServerlessFunctionOwnerUser.ts +486 -0
  21. package/Models/DatabaseModels/Service.ts +268 -0
  22. package/Models/DatabaseModels/TelemetryException.ts +15 -1
  23. package/Models/DatabaseModels/WorkflowLog.ts +52 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.ts +21 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.ts +108 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.ts +205 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.ts +195 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.ts +202 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.ts +156 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.ts +149 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.ts +149 -0
  32. package/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.ts +95 -0
  33. package/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.ts +25 -0
  34. package/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.ts +30 -0
  35. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +22 -0
  36. package/Server/Infrastructure/Queue.ts +11 -0
  37. package/Server/Services/CloudResourceInstanceService.ts +76 -0
  38. package/Server/Services/CloudResourceLabelRuleEngineService.ts +175 -0
  39. package/Server/Services/CloudResourceLabelRuleService.ts +14 -0
  40. package/Server/Services/CloudResourceOwnerRuleEngineService.ts +192 -0
  41. package/Server/Services/CloudResourceOwnerRuleService.ts +14 -0
  42. package/Server/Services/CloudResourceOwnerTeamService.ts +10 -0
  43. package/Server/Services/CloudResourceOwnerUserService.ts +10 -0
  44. package/Server/Services/CloudResourceService.ts +342 -0
  45. package/Server/Services/ExceptionAggregationService.ts +3 -0
  46. package/Server/Services/HostService.ts +42 -0
  47. package/Server/Services/LogAggregationService.ts +3 -0
  48. package/Server/Services/MetricAggregationService.ts +3 -0
  49. package/Server/Services/OpenTelemetryIngestService.ts +148 -1
  50. package/Server/Services/RumApplicationClientService.ts +69 -0
  51. package/Server/Services/RumApplicationLabelRuleEngineService.ts +175 -0
  52. package/Server/Services/RumApplicationLabelRuleService.ts +14 -0
  53. package/Server/Services/RumApplicationOwnerRuleEngineService.ts +192 -0
  54. package/Server/Services/RumApplicationOwnerRuleService.ts +14 -0
  55. package/Server/Services/RumApplicationOwnerTeamService.ts +10 -0
  56. package/Server/Services/RumApplicationOwnerUserService.ts +10 -0
  57. package/Server/Services/RumApplicationService.ts +301 -0
  58. package/Server/Services/ServerlessFunctionInstanceService.ts +61 -0
  59. package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +182 -0
  60. package/Server/Services/ServerlessFunctionLabelRuleService.ts +14 -0
  61. package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +199 -0
  62. package/Server/Services/ServerlessFunctionOwnerRuleService.ts +14 -0
  63. package/Server/Services/ServerlessFunctionOwnerTeamService.ts +10 -0
  64. package/Server/Services/ServerlessFunctionOwnerUserService.ts +10 -0
  65. package/Server/Services/ServerlessFunctionService.ts +351 -0
  66. package/Server/Services/ServiceService.ts +95 -8
  67. package/Server/Services/TraceAggregationService.ts +3 -0
  68. package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +39 -0
  69. package/Server/Types/Workflow/ComponentCode.ts +9 -0
  70. package/Server/Types/Workflow/Components/Index.ts +2 -0
  71. package/Server/Types/Workflow/Components/Sleep.ts +105 -0
  72. package/Server/Types/Workflow/Workflow.ts +6 -0
  73. package/Server/Utils/Telemetry/ResourceFacetResolver.ts +150 -0
  74. package/Tests/Types/Monitor/KubernetesAlertTemplates.test.ts +193 -0
  75. package/Tests/UI/Components/DuplicateModel.test.tsx +2 -2
  76. package/Types/Monitor/KubernetesAlertTemplates.ts +239 -14
  77. package/Types/Permission.ts +692 -1
  78. package/Types/Telemetry/ServiceType.ts +3 -0
  79. package/Types/Workflow/ComponentID.ts +1 -0
  80. package/Types/Workflow/Components/Sleep.ts +71 -0
  81. package/Types/Workflow/Components.ts +2 -0
  82. package/Types/Workflow/WorkflowStatus.ts +1 -0
  83. package/UI/Components/BulkUpdate/BulkLabelActions.tsx +159 -32
  84. package/UI/Components/Navbar/NavBar.tsx +72 -123
  85. package/UI/Components/Navbar/NavBarMenuModal.tsx +642 -0
  86. package/UI/Components/Workflow/WorkflowStatus.tsx +3 -0
  87. package/build/dist/Models/DatabaseModels/CloudResource.js +871 -0
  88. package/build/dist/Models/DatabaseModels/CloudResource.js.map +1 -0
  89. package/build/dist/Models/DatabaseModels/CloudResourceInstance.js +300 -0
  90. package/build/dist/Models/DatabaseModels/CloudResourceInstance.js.map +1 -0
  91. package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js +520 -0
  92. package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js.map +1 -0
  93. package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js +601 -0
  94. package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js.map +1 -0
  95. package/build/dist/Models/DatabaseModels/CloudResourceOwnerTeam.js +503 -0
  96. package/build/dist/Models/DatabaseModels/CloudResourceOwnerTeam.js.map +1 -0
  97. package/build/dist/Models/DatabaseModels/CloudResourceOwnerUser.js +502 -0
  98. package/build/dist/Models/DatabaseModels/CloudResourceOwnerUser.js.map +1 -0
  99. package/build/dist/Models/DatabaseModels/Host.js +215 -0
  100. package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
  101. package/build/dist/Models/DatabaseModels/Index.js +36 -0
  102. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  103. package/build/dist/Models/DatabaseModels/RumApplication.js +751 -0
  104. package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -0
  105. package/build/dist/Models/DatabaseModels/RumApplicationClient.js +252 -0
  106. package/build/dist/Models/DatabaseModels/RumApplicationClient.js.map +1 -0
  107. package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js +520 -0
  108. package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js.map +1 -0
  109. package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js +601 -0
  110. package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js.map +1 -0
  111. package/build/dist/Models/DatabaseModels/RumApplicationOwnerTeam.js +503 -0
  112. package/build/dist/Models/DatabaseModels/RumApplicationOwnerTeam.js.map +1 -0
  113. package/build/dist/Models/DatabaseModels/RumApplicationOwnerUser.js +502 -0
  114. package/build/dist/Models/DatabaseModels/RumApplicationOwnerUser.js.map +1 -0
  115. package/build/dist/Models/DatabaseModels/ServerlessFunction.js +908 -0
  116. package/build/dist/Models/DatabaseModels/ServerlessFunction.js.map +1 -0
  117. package/build/dist/Models/DatabaseModels/ServerlessFunctionInstance.js +234 -0
  118. package/build/dist/Models/DatabaseModels/ServerlessFunctionInstance.js.map +1 -0
  119. package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js +520 -0
  120. package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js.map +1 -0
  121. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js +601 -0
  122. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js.map +1 -0
  123. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerTeam.js +503 -0
  124. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerTeam.js.map +1 -0
  125. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerUser.js +502 -0
  126. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerUser.js.map +1 -0
  127. package/build/dist/Models/DatabaseModels/Service.js +276 -0
  128. package/build/dist/Models/DatabaseModels/Service.js.map +1 -1
  129. package/build/dist/Models/DatabaseModels/TelemetryException.js +12 -1
  130. package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
  131. package/build/dist/Models/DatabaseModels/WorkflowLog.js +53 -0
  132. package/build/dist/Models/DatabaseModels/WorkflowLog.js.map +1 -1
  133. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.js +14 -0
  134. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.js.map +1 -0
  135. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.js +53 -0
  136. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.js.map +1 -0
  137. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.js +82 -0
  138. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.js.map +1 -0
  139. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.js +82 -0
  140. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.js.map +1 -0
  141. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.js +83 -0
  142. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.js.map +1 -0
  143. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.js +67 -0
  144. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.js.map +1 -0
  145. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.js +60 -0
  146. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.js.map +1 -0
  147. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.js +60 -0
  148. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.js.map +1 -0
  149. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.js +45 -0
  150. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.js.map +1 -0
  151. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.js +18 -0
  152. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.js.map +1 -0
  153. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.js +27 -0
  154. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.js.map +1 -0
  155. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +22 -0
  156. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  157. package/build/dist/Server/Infrastructure/Queue.js +3 -0
  158. package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
  159. package/build/dist/Server/Services/CloudResourceInstanceService.js +76 -0
  160. package/build/dist/Server/Services/CloudResourceInstanceService.js.map +1 -0
  161. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +160 -0
  162. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -0
  163. package/build/dist/Server/Services/CloudResourceLabelRuleService.js +13 -0
  164. package/build/dist/Server/Services/CloudResourceLabelRuleService.js.map +1 -0
  165. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +179 -0
  166. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -0
  167. package/build/dist/Server/Services/CloudResourceOwnerRuleService.js +13 -0
  168. package/build/dist/Server/Services/CloudResourceOwnerRuleService.js.map +1 -0
  169. package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +9 -0
  170. package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -0
  171. package/build/dist/Server/Services/CloudResourceOwnerUserService.js +9 -0
  172. package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -0
  173. package/build/dist/Server/Services/CloudResourceService.js +287 -0
  174. package/build/dist/Server/Services/CloudResourceService.js.map +1 -0
  175. package/build/dist/Server/Services/ExceptionAggregationService.js +3 -0
  176. package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
  177. package/build/dist/Server/Services/HostService.js +29 -1
  178. package/build/dist/Server/Services/HostService.js.map +1 -1
  179. package/build/dist/Server/Services/LogAggregationService.js +3 -0
  180. package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
  181. package/build/dist/Server/Services/MetricAggregationService.js +3 -0
  182. package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
  183. package/build/dist/Server/Services/OpenTelemetryIngestService.js +98 -2
  184. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  185. package/build/dist/Server/Services/RumApplicationClientService.js +70 -0
  186. package/build/dist/Server/Services/RumApplicationClientService.js.map +1 -0
  187. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +160 -0
  188. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -0
  189. package/build/dist/Server/Services/RumApplicationLabelRuleService.js +13 -0
  190. package/build/dist/Server/Services/RumApplicationLabelRuleService.js.map +1 -0
  191. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +179 -0
  192. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -0
  193. package/build/dist/Server/Services/RumApplicationOwnerRuleService.js +13 -0
  194. package/build/dist/Server/Services/RumApplicationOwnerRuleService.js.map +1 -0
  195. package/build/dist/Server/Services/RumApplicationOwnerTeamService.js +9 -0
  196. package/build/dist/Server/Services/RumApplicationOwnerTeamService.js.map +1 -0
  197. package/build/dist/Server/Services/RumApplicationOwnerUserService.js +9 -0
  198. package/build/dist/Server/Services/RumApplicationOwnerUserService.js.map +1 -0
  199. package/build/dist/Server/Services/RumApplicationService.js +259 -0
  200. package/build/dist/Server/Services/RumApplicationService.js.map +1 -0
  201. package/build/dist/Server/Services/ServerlessFunctionInstanceService.js +64 -0
  202. package/build/dist/Server/Services/ServerlessFunctionInstanceService.js.map +1 -0
  203. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +160 -0
  204. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -0
  205. package/build/dist/Server/Services/ServerlessFunctionLabelRuleService.js +13 -0
  206. package/build/dist/Server/Services/ServerlessFunctionLabelRuleService.js.map +1 -0
  207. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +179 -0
  208. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -0
  209. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleService.js +13 -0
  210. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleService.js.map +1 -0
  211. package/build/dist/Server/Services/ServerlessFunctionOwnerTeamService.js +9 -0
  212. package/build/dist/Server/Services/ServerlessFunctionOwnerTeamService.js.map +1 -0
  213. package/build/dist/Server/Services/ServerlessFunctionOwnerUserService.js +9 -0
  214. package/build/dist/Server/Services/ServerlessFunctionOwnerUserService.js.map +1 -0
  215. package/build/dist/Server/Services/ServerlessFunctionService.js +299 -0
  216. package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -0
  217. package/build/dist/Server/Services/ServiceService.js +63 -7
  218. package/build/dist/Server/Services/ServiceService.js.map +1 -1
  219. package/build/dist/Server/Services/TraceAggregationService.js +3 -0
  220. package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
  221. package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +39 -0
  222. package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
  223. package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
  224. package/build/dist/Server/Types/Workflow/Components/Index.js +2 -0
  225. package/build/dist/Server/Types/Workflow/Components/Index.js.map +1 -1
  226. package/build/dist/Server/Types/Workflow/Components/Sleep.js +85 -0
  227. package/build/dist/Server/Types/Workflow/Components/Sleep.js.map +1 -0
  228. package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +90 -0
  229. package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
  230. package/build/dist/Tests/Types/Monitor/KubernetesAlertTemplates.test.js +121 -0
  231. package/build/dist/Tests/Types/Monitor/KubernetesAlertTemplates.test.js.map +1 -0
  232. package/build/dist/Tests/UI/Components/DuplicateModel.test.js +2 -2
  233. package/build/dist/Tests/UI/Components/DuplicateModel.test.js.map +1 -1
  234. package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +210 -14
  235. package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
  236. package/build/dist/Types/Permission.js +609 -1
  237. package/build/dist/Types/Permission.js.map +1 -1
  238. package/build/dist/Types/Telemetry/ServiceType.js +3 -0
  239. package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
  240. package/build/dist/Types/Workflow/ComponentID.js +1 -0
  241. package/build/dist/Types/Workflow/ComponentID.js.map +1 -1
  242. package/build/dist/Types/Workflow/Components/Sleep.js +64 -0
  243. package/build/dist/Types/Workflow/Components/Sleep.js.map +1 -0
  244. package/build/dist/Types/Workflow/Components.js +2 -0
  245. package/build/dist/Types/Workflow/Components.js.map +1 -1
  246. package/build/dist/Types/Workflow/WorkflowStatus.js +1 -0
  247. package/build/dist/Types/Workflow/WorkflowStatus.js.map +1 -1
  248. package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +113 -19
  249. package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
  250. package/build/dist/UI/Components/Navbar/NavBar.js +34 -66
  251. package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
  252. package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +412 -0
  253. package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -0
  254. package/build/dist/UI/Components/Workflow/WorkflowStatus.js +3 -0
  255. package/build/dist/UI/Components/Workflow/WorkflowStatus.js.map +1 -1
  256. package/package.json +1 -1
  257. package/UI/Components/Navbar/NavBarMenu.tsx +0 -183
  258. package/UI/Components/Navbar/NavBarMenuItem.tsx +0 -146
  259. package/build/dist/UI/Components/Navbar/NavBarMenu.js +0 -82
  260. package/build/dist/UI/Components/Navbar/NavBarMenu.js.map +0 -1
  261. package/build/dist/UI/Components/Navbar/NavBarMenuItem.js +0 -109
  262. package/build/dist/UI/Components/Navbar/NavBarMenuItem.js.map +0 -1
@@ -0,0 +1,412 @@
1
+ import Icon from "../Icon/Icon";
2
+ import Link from "../Link/Link";
3
+ import Navigation from "../../Utils/Navigation";
4
+ import IconProp from "../../../Types/Icon/IconProp";
5
+ import React, { useMemo, useRef, useState, useEffect, } from "react";
6
+ /*
7
+ * Icon color map carried over from the former NavBarMenuItem, extended with the
8
+ * few colors the dashboard items use (yellow/red/teal) plus a glyph text color
9
+ * so every product renders in its intended color. Unknown colors fall back to
10
+ * indigo.
11
+ */
12
+ const ICON_COLOR_CLASSES = {
13
+ purple: {
14
+ bg: "bg-purple-50",
15
+ ring: "ring-purple-200",
16
+ text: "text-purple-600",
17
+ },
18
+ blue: { bg: "bg-blue-50", ring: "ring-blue-200", text: "text-blue-600" },
19
+ gray: { bg: "bg-gray-100", ring: "ring-gray-300", text: "text-gray-600" },
20
+ amber: { bg: "bg-amber-50", ring: "ring-amber-200", text: "text-amber-600" },
21
+ green: { bg: "bg-green-50", ring: "ring-green-200", text: "text-green-600" },
22
+ cyan: { bg: "bg-cyan-50", ring: "ring-cyan-200", text: "text-cyan-600" },
23
+ slate: { bg: "bg-slate-100", ring: "ring-slate-300", text: "text-slate-600" },
24
+ indigo: {
25
+ bg: "bg-indigo-50",
26
+ ring: "ring-indigo-200",
27
+ text: "text-indigo-600",
28
+ },
29
+ rose: { bg: "bg-rose-50", ring: "ring-rose-200", text: "text-rose-600" },
30
+ violet: {
31
+ bg: "bg-violet-50",
32
+ ring: "ring-violet-200",
33
+ text: "text-violet-600",
34
+ },
35
+ orange: {
36
+ bg: "bg-orange-50",
37
+ ring: "ring-orange-200",
38
+ text: "text-orange-600",
39
+ },
40
+ stone: { bg: "bg-stone-100", ring: "ring-stone-300", text: "text-stone-600" },
41
+ sky: { bg: "bg-sky-50", ring: "ring-sky-200", text: "text-sky-600" },
42
+ emerald: {
43
+ bg: "bg-emerald-50",
44
+ ring: "ring-emerald-200",
45
+ text: "text-emerald-600",
46
+ },
47
+ yellow: {
48
+ bg: "bg-yellow-50",
49
+ ring: "ring-yellow-200",
50
+ text: "text-yellow-600",
51
+ },
52
+ red: { bg: "bg-red-50", ring: "ring-red-200", text: "text-red-600" },
53
+ teal: { bg: "bg-teal-50", ring: "ring-teal-200", text: "text-teal-600" },
54
+ };
55
+ // Persist the handful of most-recently opened products across sessions.
56
+ const RECENT_STORAGE_KEY = "oneuptime-navbar-recent-products";
57
+ const RECENT_LIMIT = 5;
58
+ const readRecentRoutes = () => {
59
+ try {
60
+ if (typeof window === "undefined" || !window.localStorage) {
61
+ return [];
62
+ }
63
+ const raw = window.localStorage.getItem(RECENT_STORAGE_KEY);
64
+ if (!raw) {
65
+ return [];
66
+ }
67
+ const parsed = JSON.parse(raw);
68
+ if (!Array.isArray(parsed)) {
69
+ return [];
70
+ }
71
+ return parsed.filter((value) => {
72
+ return typeof value === "string";
73
+ });
74
+ }
75
+ catch (_a) {
76
+ // Ignore storage access / parse errors (e.g. private mode, bad JSON).
77
+ return [];
78
+ }
79
+ };
80
+ const writeRecentRoute = (routeString) => {
81
+ try {
82
+ if (typeof window === "undefined" || !window.localStorage) {
83
+ return;
84
+ }
85
+ const existing = readRecentRoutes().filter((route) => {
86
+ return route !== routeString;
87
+ });
88
+ const next = [routeString, ...existing].slice(0, RECENT_LIMIT);
89
+ window.localStorage.setItem(RECENT_STORAGE_KEY, JSON.stringify(next));
90
+ }
91
+ catch (_a) {
92
+ // Ignore storage write errors (e.g. private mode, quota exceeded).
93
+ }
94
+ };
95
+ const NavBarMenuModal = (props) => {
96
+ const [query, setQuery] = useState("");
97
+ const [activeIndex, setActiveIndex] = useState(0);
98
+ // Drives the open transition (fade + scale-in) on the first paint.
99
+ const [isShown, setIsShown] = useState(false);
100
+ // Recently opened product routes, read once when the modal opens.
101
+ const [recentRoutes] = useState(() => {
102
+ return readRecentRoutes();
103
+ });
104
+ const inputRef = useRef(null);
105
+ const cellRefs = useRef([]);
106
+ const recentLabel = props.recentLabel || "Recent";
107
+ // Show the OS-appropriate shortcut hint (⌘K on macOS, Ctrl K elsewhere).
108
+ const shortcutLabel = useMemo(() => {
109
+ if (typeof navigator === "undefined") {
110
+ return "⌘K";
111
+ }
112
+ const platform = (navigator.platform ||
113
+ navigator.userAgent ||
114
+ "").toLowerCase();
115
+ const isApplePlatform = platform.includes("mac") ||
116
+ platform.includes("iphone") ||
117
+ platform.includes("ipad") ||
118
+ platform.includes("ipod");
119
+ return isApplePlatform ? "⌘K" : "Ctrl K";
120
+ }, []);
121
+ // Filter items by the search query (title + description + category).
122
+ const filteredItems = useMemo(() => {
123
+ const normalizedQuery = query.trim().toLowerCase();
124
+ if (!normalizedQuery) {
125
+ return props.items;
126
+ }
127
+ return props.items.filter((item) => {
128
+ const haystack = `${item.title} ${item.description} ${item.category || ""}`.toLowerCase();
129
+ return haystack.includes(normalizedQuery);
130
+ });
131
+ }, [props.items, query]);
132
+ /*
133
+ * The "Recent" row: resolve stored routes to current items, skip the page
134
+ * we're already on, and cap the count. Only shown while idle (no query).
135
+ */
136
+ const recentItems = useMemo(() => {
137
+ if (recentRoutes.length === 0) {
138
+ return [];
139
+ }
140
+ const itemByRoute = new Map();
141
+ props.items.forEach((item) => {
142
+ itemByRoute.set(item.route.toString(), item);
143
+ });
144
+ const resolved = [];
145
+ recentRoutes.forEach((route) => {
146
+ const item = itemByRoute.get(route);
147
+ if (item && !Navigation.isStartWith(item.activeRoute || item.route)) {
148
+ resolved.push(item);
149
+ }
150
+ });
151
+ return resolved.slice(0, RECENT_LIMIT);
152
+ }, [recentRoutes, props.items]);
153
+ // Group filtered items by category, preserving first-seen order.
154
+ const categoryGroups = useMemo(() => {
155
+ const order = [];
156
+ const byCategory = new Map();
157
+ filteredItems.forEach((item) => {
158
+ const category = item.category || "Other";
159
+ if (!byCategory.has(category)) {
160
+ byCategory.set(category, []);
161
+ order.push(category);
162
+ }
163
+ byCategory.get(category).push(item);
164
+ });
165
+ return order.map((category) => {
166
+ return { category, items: byCategory.get(category) };
167
+ });
168
+ }, [filteredItems]);
169
+ /*
170
+ * Final render order: a "Recent" group (idle only) followed by the category
171
+ * groups, with every item stamped with its index in the flattened order so
172
+ * keyboard navigation and cell refs stay in sync.
173
+ */
174
+ const displayGroups = useMemo(() => {
175
+ const raw = [];
176
+ if (!query.trim() && recentItems.length > 0) {
177
+ raw.push({ category: recentLabel, items: recentItems });
178
+ }
179
+ raw.push(...categoryGroups);
180
+ let flatIndex = 0;
181
+ return raw.map((group) => {
182
+ const items = group.items.map((item) => {
183
+ const entry = { item, flatIndex };
184
+ flatIndex++;
185
+ return entry;
186
+ });
187
+ return { category: group.category, items };
188
+ });
189
+ }, [query, recentItems, categoryGroups, recentLabel]);
190
+ // Flattened list in render order — used for keyboard navigation.
191
+ const flatItems = useMemo(() => {
192
+ return displayGroups.reduce((acc, group) => {
193
+ group.items.forEach((entry) => {
194
+ acc.push(entry.item);
195
+ });
196
+ return acc;
197
+ }, []);
198
+ }, [displayGroups]);
199
+ // Index of the product matching the current page (the "you are here" item).
200
+ const currentFlatIndex = useMemo(() => {
201
+ return flatItems.findIndex((item) => {
202
+ return Navigation.isStartWith(item.activeRoute || item.route);
203
+ });
204
+ }, [flatItems]);
205
+ // Play the open animation and focus the search box on mount.
206
+ useEffect(() => {
207
+ var _a;
208
+ setIsShown(true);
209
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
210
+ }, []);
211
+ /*
212
+ * When idle, pre-select the current page so the modal opens "where you are";
213
+ * while searching, snap the selection to the first result.
214
+ */
215
+ useEffect(() => {
216
+ if (query) {
217
+ setActiveIndex(0);
218
+ return;
219
+ }
220
+ setActiveIndex(currentFlatIndex >= 0 ? currentFlatIndex : 0);
221
+ }, [query, currentFlatIndex]);
222
+ // Keep the active cell scrolled into view as the selection moves.
223
+ useEffect(() => {
224
+ var _a;
225
+ (_a = cellRefs.current[activeIndex]) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: "nearest" });
226
+ }, [activeIndex]);
227
+ // Record a selection and close the modal.
228
+ const selectItem = (item) => {
229
+ writeRecentRoute(item.route.toString());
230
+ props.onClose();
231
+ };
232
+ // Wrap the portions of text that match the query in a highlight.
233
+ const highlightMatch = (text) => {
234
+ const needle = query.trim().toLowerCase();
235
+ if (!needle) {
236
+ return text;
237
+ }
238
+ const haystack = text.toLowerCase();
239
+ const parts = [];
240
+ let cursor = 0;
241
+ let matchAt = haystack.indexOf(needle, cursor);
242
+ let key = 0;
243
+ while (matchAt !== -1) {
244
+ if (matchAt > cursor) {
245
+ parts.push(text.slice(cursor, matchAt));
246
+ }
247
+ parts.push(React.createElement("mark", { key: `m-${key}`, className: "rounded-sm bg-yellow-100 px-0.5 text-inherit" }, text.slice(matchAt, matchAt + needle.length)));
248
+ key++;
249
+ cursor = matchAt + needle.length;
250
+ matchAt = haystack.indexOf(needle, cursor);
251
+ }
252
+ if (cursor < text.length) {
253
+ parts.push(text.slice(cursor));
254
+ }
255
+ return parts;
256
+ };
257
+ const moveVertical = (direction) => {
258
+ const cells = cellRefs.current;
259
+ const active = cells[activeIndex] || null;
260
+ if (!active) {
261
+ return;
262
+ }
263
+ const activeRect = active.getBoundingClientRect();
264
+ const activeCenterX = activeRect.left + activeRect.width / 2;
265
+ // Find the nearest row in the requested direction.
266
+ let targetTop = null;
267
+ for (let i = 0; i < flatItems.length; i++) {
268
+ const cell = cells[i] || null;
269
+ if (!cell) {
270
+ continue;
271
+ }
272
+ const top = cell.getBoundingClientRect().top;
273
+ if (direction === "down" && top > activeRect.top + 1) {
274
+ if (targetTop === null || top < targetTop) {
275
+ targetTop = top;
276
+ }
277
+ }
278
+ if (direction === "up" && top < activeRect.top - 1) {
279
+ if (targetTop === null || top > targetTop) {
280
+ targetTop = top;
281
+ }
282
+ }
283
+ }
284
+ if (targetTop === null) {
285
+ return;
286
+ }
287
+ // Within that row, pick the cell whose horizontal center is closest.
288
+ let bestIndex = activeIndex;
289
+ let bestDistance = Number.POSITIVE_INFINITY;
290
+ for (let i = 0; i < flatItems.length; i++) {
291
+ const cell = cells[i] || null;
292
+ if (!cell) {
293
+ continue;
294
+ }
295
+ const rect = cell.getBoundingClientRect();
296
+ if (Math.abs(rect.top - targetTop) <= 1) {
297
+ const centerX = rect.left + rect.width / 2;
298
+ const distance = Math.abs(centerX - activeCenterX);
299
+ if (distance < bestDistance) {
300
+ bestDistance = distance;
301
+ bestIndex = i;
302
+ }
303
+ }
304
+ }
305
+ setActiveIndex(bestIndex);
306
+ };
307
+ const handleKeyDown = (event) => {
308
+ if (event.key === "Escape") {
309
+ event.preventDefault();
310
+ props.onClose();
311
+ return;
312
+ }
313
+ if (flatItems.length === 0) {
314
+ return;
315
+ }
316
+ if (event.key === "ArrowRight") {
317
+ event.preventDefault();
318
+ setActiveIndex((index) => {
319
+ return Math.min(index + 1, flatItems.length - 1);
320
+ });
321
+ }
322
+ else if (event.key === "ArrowLeft") {
323
+ event.preventDefault();
324
+ setActiveIndex((index) => {
325
+ return Math.max(index - 1, 0);
326
+ });
327
+ }
328
+ else if (event.key === "ArrowDown") {
329
+ event.preventDefault();
330
+ moveVertical("down");
331
+ }
332
+ else if (event.key === "ArrowUp") {
333
+ event.preventDefault();
334
+ moveVertical("up");
335
+ }
336
+ else if (event.key === "Enter") {
337
+ event.preventDefault();
338
+ const item = flatItems[activeIndex];
339
+ if (item) {
340
+ selectItem(item);
341
+ Navigation.navigate(item.route);
342
+ }
343
+ }
344
+ };
345
+ const keycapClass = "inline-flex h-5 min-w-[1.25rem] items-center justify-center rounded border border-gray-200 bg-white px-1 text-[11px] font-medium text-gray-500 shadow-sm";
346
+ return (React.createElement("div", { className: "relative z-50", role: "dialog", "aria-modal": "true", "aria-label": "Products menu" },
347
+ React.createElement("div", { className: `fixed inset-0 bg-gray-900 bg-opacity-50 backdrop-blur-sm transition-opacity duration-200 ${isShown ? "opacity-100" : "opacity-0"}` }),
348
+ React.createElement("div", { className: "fixed inset-0 z-50 overflow-y-auto", onClick: props.onClose },
349
+ React.createElement("div", { className: "flex min-h-full items-start justify-center p-4 sm:p-6" },
350
+ React.createElement("div", { className: `relative mt-[6vh] flex w-full max-w-4xl flex-col overflow-hidden rounded-2xl bg-white shadow-2xl ring-1 ring-black ring-opacity-5 transition-all duration-200 ease-out ${isShown ? "scale-100 opacity-100" : "scale-95 opacity-0"}`, style: { maxHeight: "80vh" }, onClick: (event) => {
351
+ event.stopPropagation();
352
+ } },
353
+ React.createElement("div", { className: "flex items-center gap-3 border-b border-gray-100 px-4 py-3" },
354
+ React.createElement(Icon, { icon: IconProp.Search, className: "h-5 w-5 flex-shrink-0 text-gray-400" }),
355
+ React.createElement("input", { ref: inputRef, type: "text", role: "combobox", "aria-expanded": true, "aria-controls": "navbar-menu-listbox", "aria-activedescendant": flatItems.length > 0
356
+ ? `navbar-menu-option-${activeIndex}`
357
+ : undefined, "aria-label": props.searchPlaceholder || "Search products", value: query, onChange: (event) => {
358
+ setQuery(event.target.value);
359
+ }, onKeyDown: handleKeyDown, placeholder: props.searchPlaceholder || "Search…", className: "flex-1 border-0 bg-transparent p-0 text-base text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-0" }),
360
+ React.createElement("kbd", { className: "hidden items-center rounded border border-gray-200 bg-gray-50 px-1.5 py-0.5 text-xs font-medium text-gray-400 sm:inline-flex" }, shortcutLabel)),
361
+ React.createElement("div", { id: "navbar-menu-listbox", role: "listbox", "aria-label": "Products", className: "flex-1 overflow-y-auto px-4 py-4" }, flatItems.length === 0 ? (React.createElement("div", { className: "flex flex-col items-center justify-center py-16 text-center" },
362
+ React.createElement(Icon, { icon: IconProp.Search, className: "mb-3 h-8 w-8 text-gray-300" }),
363
+ React.createElement("p", { className: "text-sm text-gray-500" }, props.noResultsText || "No results found."),
364
+ query && (React.createElement("p", { className: "mt-1 text-xs text-gray-400" },
365
+ "\u201C",
366
+ query,
367
+ "\u201D")))) : (displayGroups.map((group) => {
368
+ return (React.createElement("div", { key: group.category, className: "mb-6 last:mb-1" },
369
+ React.createElement("h3", { className: "mb-2 px-1 text-xs font-semibold uppercase tracking-wider text-gray-500" }, group.category),
370
+ React.createElement("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5" }, group.items.map((entry) => {
371
+ const item = entry.item;
372
+ const flatIndex = entry.flatIndex;
373
+ const isActive = flatIndex === activeIndex;
374
+ const isCurrent = flatIndex === currentFlatIndex;
375
+ const colors = ICON_COLOR_CLASSES[item.iconColor || "indigo"] ||
376
+ ICON_COLOR_CLASSES["indigo"];
377
+ return (React.createElement("div", { key: entry.flatIndex, id: `navbar-menu-option-${flatIndex}`, role: "option", "aria-selected": isActive, ref: (element) => {
378
+ cellRefs.current[flatIndex] = element;
379
+ }, onMouseEnter: () => {
380
+ setActiveIndex(flatIndex);
381
+ }, className: "relative" },
382
+ isCurrent && (React.createElement("span", { "aria-hidden": "true", className: "absolute right-2 top-2 z-10 h-2 w-2 rounded-full bg-indigo-500 ring-2 ring-white" })),
383
+ React.createElement(Link, { to: item.route, onClick: () => {
384
+ selectItem(item);
385
+ }, className: `group flex h-full flex-col items-center gap-2 rounded-xl p-3 text-center transition-all duration-150 ${isActive
386
+ ? "scale-[1.03] bg-indigo-50 shadow-sm ring-2 ring-indigo-400"
387
+ : isCurrent
388
+ ? "bg-indigo-50/60 ring-1 ring-indigo-200 hover:bg-indigo-50"
389
+ : "hover:bg-gray-50"}` },
390
+ React.createElement("div", { className: `flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-xl ${colors.bg} ring-1 ${colors.ring}` },
391
+ React.createElement(Icon, { icon: item.icon, className: `h-6 w-6 transition-transform duration-150 group-hover:scale-110 ${colors.text}` })),
392
+ React.createElement("div", { className: "w-full" },
393
+ React.createElement("p", { className: "text-sm font-medium text-gray-900" }, highlightMatch(item.title)),
394
+ React.createElement("p", { className: "mt-0.5 text-xs leading-snug text-gray-500 line-clamp-2" }, highlightMatch(item.description))))));
395
+ }))));
396
+ }))),
397
+ props.footer && (React.createElement("div", { className: "flex items-center justify-between gap-4 border-t border-gray-100 bg-gray-50 px-4 py-3" },
398
+ React.createElement(Link, { to: props.footer.link, openInNewTab: true, className: "group flex min-w-0 items-center gap-3" },
399
+ React.createElement("div", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-gray-100 ring-1 ring-gray-200 transition-all group-hover:bg-gray-200" },
400
+ React.createElement(Icon, { icon: IconProp.GitHub, className: "h-4 w-4 text-gray-700" })),
401
+ React.createElement("div", { className: "min-w-0 text-left" },
402
+ React.createElement("p", { className: "truncate text-sm font-medium text-gray-900" }, props.footer.title),
403
+ React.createElement("p", { className: "truncate text-xs text-gray-500" }, props.footer.description))),
404
+ props.keyboardHint && (React.createElement("div", { "aria-label": props.keyboardHint, className: "hidden flex-shrink-0 items-center gap-2 text-xs text-gray-400 md:flex" },
405
+ React.createElement("span", { className: "flex items-center gap-1" },
406
+ React.createElement("kbd", { className: keycapClass }, "\u2191"),
407
+ React.createElement("kbd", { className: keycapClass }, "\u2193")),
408
+ React.createElement("kbd", { className: keycapClass }, "\u21B5"),
409
+ React.createElement("kbd", { className: keycapClass }, "esc"))))))))));
410
+ };
411
+ export default NavBarMenuModal;
412
+ //# sourceMappingURL=NavBarMenuModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavBarMenuModal.js","sourceRoot":"","sources":["../../../../../UI/Components/Navbar/NavBarMenuModal.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AAGpD,OAAO,KAAK,EAAE,EAIZ,OAAO,EACP,MAAM,E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M,IAAI,CACf,6BAAK,SAAS,EAAC,uFAAuF;wBACpG,oBAAC,IAAI,IACH,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EACrB,YAAY,EAAE,IAAI,EAClB,SAAS,EAAC,uCAAuC;4BAEjD,6BAAK,SAAS,EAAC,2IAA2I;gCACxJ,oBAAC,IAAI,IACH,IAAI,EAAE,QAAQ,CAAC,MAAM,EACrB,SAAS,EAAC,uBAAuB,GACjC,CACE;4BACN,6BAAK,SAAS,EAAC,mBAAmB;gCAChC,2BAAG,SAAS,EAAC,4CAA4C,IACtD,KAAK,CAAC,MAAM,CAAC,KAAK,CACjB;gCACJ,2BAAG,SAAS,EAAC,gCAAgC,IAC1C,KAAK,CAAC,MAAM,CAAC,WAAW,CACvB,CACA,CACD;wBACN,KAAK,CAAC,YAAY,IAAI,CACrB,2CACc,KAAK,CAAC,YAAY,EAC9B,SAAS,EAAC,uEAAuE;4BAEjF,8BAAM,SAAS,EAAC,yBAAyB;gCACvC,6BAAK,SAAS,EAAE,WAAW,aAAS;gCACpC,6BAAK,SAAS,EAAE,WAAW,aAAS,CAC/B;4BACP,6BAAK,SAAS,EAAE,WAAW,aAAS;4BACpC,6BAAK,SAAS,EAAE,WAAW,UAAW,CAClC,CACP,CACG,CACP,CACG,CACF,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -12,6 +12,9 @@ const WorkflowStatusElement = (props) => {
12
12
  if (props.status === WorkflowStatus.Scheduled) {
13
13
  return React.createElement(Pill, { color: Yellow, text: "Scheduled" });
14
14
  }
15
+ if (props.status === WorkflowStatus.Waiting) {
16
+ return React.createElement(Pill, { color: Yellow, text: "Waiting" });
17
+ }
15
18
  if (props.status === WorkflowStatus.Error) {
16
19
  return React.createElement(Pill, { color: Red, text: "Error" });
17
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowStatus.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/WorkflowStat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,IAAI,IAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAC,OAAO,GAAG,CAAC;IAC3C,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC,OAAO,EAAE,CAAC;QAC5C,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAC,SAAS,GAAG,CAAC;IAC7C,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC,qBAAqB,EAAE,CAAC;QAC1D,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAC,iCAAiC,GAAG,CAAC;IACrE,CAAC;IAED,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAC,SAAS,GAAG,CAAC;AAChD,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneuptime/common",
3
- "version": "10.7.1",
3
+ "version": "10.8.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,183 +0,0 @@
1
- import Link from "../Link/Link";
2
- import Icon from "../Icon/Icon";
3
- import IconProp from "../../../Types/Icon/IconProp";
4
- import URL from "../../../Types/API/URL";
5
- import React, { FunctionComponent, ReactElement } from "react";
6
-
7
- export interface MenuSection {
8
- title: string;
9
- items: Array<ReactElement>;
10
- }
11
-
12
- export interface ComponentProps {
13
- children?: ReactElement | Array<ReactElement>;
14
- sections?: MenuSection[];
15
- footer?:
16
- | {
17
- title: string;
18
- description: string;
19
- link: URL;
20
- }
21
- | undefined;
22
- }
23
-
24
- const NavBarMenu: FunctionComponent<ComponentProps> = (
25
- props: ComponentProps,
26
- ): ReactElement => {
27
- // If sections are provided, render categorized menu
28
- if (props.sections && props.sections.length > 0) {
29
- // Separate Settings section from other sections
30
- const mainSections: MenuSection[] = props.sections.filter(
31
- (section: MenuSection) => {
32
- return section.title !== "Settings";
33
- },
34
- );
35
- const settingsSection: MenuSection | undefined = props.sections.find(
36
- (section: MenuSection) => {
37
- return section.title === "Settings";
38
- },
39
- );
40
-
41
- /*
42
- * Lay every category out in a single horizontal row. Settings keeps its
43
- * right-hand divider; the four content categories share the remaining
44
- * width as equal columns. We pick the column count from
45
- * mainSections.length so adding or removing a category stays one row.
46
- */
47
- const mainColsClass: string =
48
- mainSections.length >= 4
49
- ? "md:grid-cols-4"
50
- : mainSections.length === 3
51
- ? "md:grid-cols-3"
52
- : mainSections.length === 2
53
- ? "md:grid-cols-2"
54
- : "md:grid-cols-1";
55
-
56
- return (
57
- <div className="absolute left-0 z-50 mt-8 w-screen max-w-7xl transform px-2 sm:px-0">
58
- <div className="overflow-hidden rounded-2xl shadow-xl ring-1 ring-black ring-opacity-5 bg-white">
59
- {/* Sections */}
60
- <div className="p-6">
61
- <div className="flex gap-6">
62
- {/* Main sections grid */}
63
- <div className={`flex-1 grid grid-cols-1 ${mainColsClass} gap-6`}>
64
- {mainSections.map((section: MenuSection, index: number) => {
65
- return (
66
- <div key={index} className="space-y-3">
67
- <h3 className="text-xs font-semibold uppercase tracking-wider text-gray-500 px-2.5 text-left">
68
- {section.title}
69
- </h3>
70
- <div className="space-y-1">{section.items}</div>
71
- </div>
72
- );
73
- })}
74
- </div>
75
-
76
- {/* Settings section on the side */}
77
- {settingsSection && (
78
- <div className="border-l border-gray-100 pl-6 space-y-3 min-w-[200px]">
79
- <h3 className="text-xs font-semibold uppercase tracking-wider text-gray-500 px-2.5 text-left">
80
- {settingsSection.title}
81
- </h3>
82
- <div className="space-y-1">{settingsSection.items}</div>
83
- </div>
84
- )}
85
- </div>
86
- </div>
87
-
88
- {/* Footer */}
89
- {props.footer && (
90
- <div className="border-t border-gray-100 bg-gray-50 px-4 py-4">
91
- <Link
92
- to={props.footer.link}
93
- openInNewTab={true}
94
- className="group flex items-center gap-3 rounded-lg p-2.5 -m-2 transition-colors hover:bg-gray-100"
95
- >
96
- <div className="flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg bg-gray-100 ring-1 ring-gray-200 group-hover:bg-gray-200 group-hover:ring-gray-300 transition-all">
97
- <Icon
98
- icon={IconProp.GitHub}
99
- className="h-5 w-5 text-gray-700"
100
- />
101
- </div>
102
- <div className="flex-1 min-w-0 text-left">
103
- <p className="text-sm font-medium text-gray-900">
104
- {props.footer.title}
105
- </p>
106
- <p className="text-xs text-gray-500">
107
- {props.footer.description}
108
- </p>
109
- </div>
110
- </Link>
111
- </div>
112
- )}
113
- </div>
114
- </div>
115
- );
116
- }
117
-
118
- // Legacy: render children directly
119
- let children: Array<ReactElement> = [];
120
- if (props.children) {
121
- if (!Array.isArray(props.children)) {
122
- children = [props.children];
123
- } else {
124
- children = props.children;
125
- }
126
- }
127
-
128
- // Calculate number of columns based on items count
129
- const itemCount: number = children.length;
130
- const columnClass: string =
131
- itemCount <= 4
132
- ? "lg:grid-cols-2"
133
- : itemCount <= 6
134
- ? "lg:grid-cols-3"
135
- : "lg:grid-cols-3";
136
- const maxWidthClass: string =
137
- itemCount <= 4
138
- ? "lg:max-w-xl"
139
- : itemCount <= 6
140
- ? "lg:max-w-2xl"
141
- : "lg:max-w-3xl";
142
-
143
- return (
144
- <div
145
- className={`absolute left-1/2 z-50 mt-8 w-screen max-w-md -translate-x-1/2 transform px-2 sm:px-0 ${maxWidthClass}`}
146
- >
147
- <div className="overflow-hidden rounded-2xl shadow-xl ring-1 ring-black ring-opacity-5 bg-white">
148
- {/* Menu Items */}
149
- <div className={`relative grid gap-1 p-4 ${columnClass}`}>
150
- {children}
151
- </div>
152
-
153
- {/* Footer */}
154
- {props.footer && (
155
- <div className="border-t border-gray-100 bg-gray-50 px-4 py-4">
156
- <Link
157
- to={props.footer.link}
158
- openInNewTab={true}
159
- className="group flex items-center gap-3 rounded-lg p-2.5 -m-2 transition-colors hover:bg-gray-100"
160
- >
161
- <div className="flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg bg-gray-100 ring-1 ring-gray-200 group-hover:bg-gray-200 group-hover:ring-gray-300 transition-all">
162
- <Icon
163
- icon={IconProp.GitHub}
164
- className="h-5 w-5 text-gray-700"
165
- />
166
- </div>
167
- <div className="flex-1 min-w-0 text-left">
168
- <p className="text-sm font-medium text-gray-900">
169
- {props.footer.title}
170
- </p>
171
- <p className="text-xs text-gray-500">
172
- {props.footer.description}
173
- </p>
174
- </div>
175
- </Link>
176
- </div>
177
- )}
178
- </div>
179
- </div>
180
- );
181
- };
182
-
183
- export default NavBarMenu;