@odigos/ui-kit 0.0.10 → 0.0.11-1.patch-dev.361

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 (563) hide show
  1. package/.devcontainer/README.md +26 -0
  2. package/.devcontainer/devcontainer.json +21 -0
  3. package/CHANGELOG.md +849 -0
  4. package/README.md +3 -2
  5. package/VERSIONING.md +228 -0
  6. package/lib/chunks/ui-components-f51830d4.js +1605 -0
  7. package/lib/chunks/vendor-1dea551d.js +1 -0
  8. package/lib/components/auto-complete-input/index.d.ts +3 -0
  9. package/lib/components/badge/index.d.ts +2 -2
  10. package/lib/components/code/index.d.ts +1 -1
  11. package/lib/components/data-card/data-card-fields/index.d.ts +19 -19
  12. package/lib/components/data-card/index.d.ts +8 -6
  13. package/lib/components/data-finger/index.d.ts +12 -0
  14. package/lib/components/data-tab/index.d.ts +25 -10
  15. package/lib/components/delete-warning/index.d.ts +2 -2
  16. package/lib/components/describe-row/index.d.ts +2 -2
  17. package/lib/components/divider/index.d.ts +3 -2
  18. package/lib/components/drawer/drawer-footer/index.d.ts +3 -0
  19. package/lib/components/drawer/drawer-header/index.d.ts +6 -4
  20. package/lib/components/drawer/index.d.ts +2 -2
  21. package/lib/components/dropdown/index.d.ts +6 -2
  22. package/lib/components/error-boundary/index.d.ts +1 -2
  23. package/lib/components/field-error/index.d.ts +1 -2
  24. package/lib/components/field-label/index.d.ts +2 -0
  25. package/lib/components/icon-button/index.d.ts +2 -0
  26. package/lib/components/icon-group/index.d.ts +3 -2
  27. package/lib/components/icon-wrapped/index.d.ts +2 -2
  28. package/lib/components/index.d.ts +56 -48
  29. package/lib/components/input/index.d.ts +2 -1
  30. package/lib/components/input-table/index.d.ts +4 -11
  31. package/lib/components/input-table/map-columns-to-fields/index.d.ts +15 -0
  32. package/lib/components/input-table/types.d.ts +15 -0
  33. package/lib/components/interactive-table/index.d.ts +9 -8
  34. package/lib/components/interactive-table/table-row.d.ts +13 -0
  35. package/lib/components/key-value-input-list/index.d.ts +4 -0
  36. package/lib/components/monitors-checkboxes/index.d.ts +4 -4
  37. package/lib/components/monitors-icons/index.d.ts +2 -2
  38. package/lib/components/notification-note/index.d.ts +3 -2
  39. package/lib/components/popup/index.d.ts +18 -0
  40. package/lib/components/popup-form/index.d.ts +18 -0
  41. package/lib/components/scroll-x/index.d.ts +10 -0
  42. package/lib/components/segment/index.d.ts +8 -6
  43. package/lib/{containers/data-flow-actions-menu → components}/selection-button/index.d.ts +3 -3
  44. package/lib/components/status/index.d.ts +8 -5
  45. package/lib/components/stepper/index.d.ts +2 -1
  46. package/lib/components/styled.d.ts +23 -4
  47. package/lib/components/tab-list/index.d.ts +17 -0
  48. package/lib/components/tag/index.d.ts +9 -0
  49. package/lib/components/text/index.d.ts +16 -3
  50. package/lib/components/toggle/index.d.ts +2 -1
  51. package/lib/components/warning-modal/index.d.ts +2 -2
  52. package/lib/components.js +1 -173
  53. package/lib/constants/destinations/index.d.ts +18 -0
  54. package/lib/constants/index.d.ts +2 -0
  55. package/lib/constants/sources/index.d.ts +4 -0
  56. package/lib/constants/strings/index.d.ts +89 -0
  57. package/lib/constants.js +1 -13
  58. package/lib/containers/action-drawer/build-card.d.ts +1 -7
  59. package/lib/containers/action-drawer/index.d.ts +2 -2
  60. package/lib/containers/action-form/custom-fields/add-cluster-info.d.ts +2 -2
  61. package/lib/containers/action-form/custom-fields/delete-attributes.d.ts +2 -2
  62. package/lib/containers/action-form/custom-fields/error-sampler.d.ts +2 -2
  63. package/lib/containers/action-form/custom-fields/index.d.ts +3 -3
  64. package/lib/containers/action-form/custom-fields/k8s-attributes.d.ts +2 -2
  65. package/lib/containers/action-form/custom-fields/latency-sampler.d.ts +2 -2
  66. package/lib/containers/action-form/custom-fields/pii-masking.d.ts +2 -2
  67. package/lib/containers/action-form/custom-fields/probabilistic-sampler.d.ts +2 -2
  68. package/lib/containers/action-form/custom-fields/rename-attributes.d.ts +2 -2
  69. package/lib/containers/action-form/custom-fields/service-name-sampler.d.ts +5 -0
  70. package/lib/containers/action-form/custom-fields/span-attribute-sampler.d.ts +5 -0
  71. package/lib/containers/await-pipeline/index.d.ts +1 -2
  72. package/lib/containers/data-flow/helpers/build-action-nodes.d.ts +7 -1
  73. package/lib/containers/data-flow/helpers/build-destination-nodes.d.ts +7 -1
  74. package/lib/containers/data-flow/helpers/build-edges.d.ts +2 -2
  75. package/lib/containers/data-flow/helpers/build-rule-nodes.d.ts +7 -1
  76. package/lib/containers/data-flow/helpers/get-node-positions.d.ts +2 -2
  77. package/lib/containers/data-flow/index.d.ts +2 -2
  78. package/lib/containers/data-flow-actions-menu/add-entity/index.d.ts +2 -3
  79. package/lib/containers/data-flow-actions-menu/data-stream-select/index.d.ts +9 -0
  80. package/lib/containers/data-flow-actions-menu/filters/index.d.ts +2 -8
  81. package/lib/containers/data-flow-actions-menu/index.d.ts +5 -6
  82. package/lib/containers/data-flow-actions-menu/search/index.d.ts +3 -2
  83. package/lib/containers/data-flow-actions-menu/search/search-results/builder.d.ts +3 -3
  84. package/lib/containers/data-flow-actions-menu/search/search-results/index.d.ts +0 -1
  85. package/lib/containers/data-flow-actions-menu/styled.d.ts +5 -1
  86. package/lib/containers/data-stream-drawer/index.d.ts +10 -0
  87. package/lib/containers/data-stream-form/index.d.ts +9 -0
  88. package/lib/containers/data-stream-modal/index.d.ts +4 -0
  89. package/lib/containers/data-stream-selection-form/index.d.ts +13 -0
  90. package/lib/containers/destination-drawer/build-card.d.ts +1 -7
  91. package/lib/containers/destination-drawer/index.d.ts +2 -5
  92. package/lib/containers/destination-form/dynamic-fields/index.d.ts +2 -1
  93. package/lib/containers/destination-form/index.d.ts +2 -5
  94. package/lib/containers/destination-form/test-connection/index.d.ts +5 -10
  95. package/lib/containers/destination-modal/choose-destination/destinations-list/index.d.ts +3 -1
  96. package/lib/containers/destination-modal/choose-destination/index.d.ts +5 -5
  97. package/lib/containers/destination-modal/index.d.ts +5 -6
  98. package/lib/containers/destination-selection-form/destination-list/index.d.ts +8 -0
  99. package/lib/containers/destination-selection-form/index.d.ts +5 -9
  100. package/lib/containers/dropdowns/{connection-type-dropdown → condition-dropdown}/index.d.ts +5 -5
  101. package/lib/containers/dropdowns/error-dropdown/index.d.ts +2 -0
  102. package/lib/containers/dropdowns/index.d.ts +6 -7
  103. package/lib/containers/dropdowns/kind-dropdown/index.d.ts +2 -0
  104. package/lib/containers/dropdowns/language-dropdown/index.d.ts +2 -0
  105. package/lib/containers/dropdowns/namespace-dropdown/index.d.ts +2 -3
  106. package/lib/containers/index.d.ts +38 -33
  107. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +2 -8
  108. package/lib/containers/instrumentation-rule-form/custom-fields/custom-instrumentation.d.ts +5 -0
  109. package/lib/containers/instrumentation-rule-form/custom-fields/headers-collection.d.ts +5 -0
  110. package/lib/containers/instrumentation-rule-form/custom-fields/index.d.ts +2 -2
  111. package/lib/containers/instrumentation-rule-form/index.d.ts +1 -1
  112. package/lib/containers/multi-source-control/index.d.ts +2 -0
  113. package/lib/containers/notification-manager/index.d.ts +1 -2
  114. package/lib/containers/overview-drawer/index.d.ts +10 -4
  115. package/lib/containers/service-map/helpers/build-edges.d.ts +10 -0
  116. package/lib/containers/service-map/helpers/build-map-nodes.d.ts +11 -0
  117. package/lib/containers/service-map/helpers/generate-dag-positions.d.ts +5 -0
  118. package/lib/containers/service-map/helpers/generate-spiral-grid-position.d.ts +2 -0
  119. package/lib/containers/service-map/index.d.ts +8 -0
  120. package/lib/containers/setup-summary/index.d.ts +10 -0
  121. package/lib/containers/side-nav/index.d.ts +8 -8
  122. package/lib/containers/slack-invite/index.d.ts +1 -2
  123. package/lib/containers/source-drawer/build-card.d.ts +1 -6
  124. package/lib/containers/source-drawer/describe/index.d.ts +1 -1
  125. package/lib/containers/source-drawer/index.d.ts +7 -8
  126. package/lib/containers/source-drawer/libraries/index.d.ts +14 -0
  127. package/lib/containers/source-drawer/odigos-health/index.d.ts +6 -0
  128. package/lib/containers/source-modal/index.d.ts +3 -9
  129. package/lib/containers/source-selection-form/index.d.ts +4 -8
  130. package/lib/containers/source-selection-form/source-list/index.d.ts +8 -0
  131. package/lib/containers/system-overview/describe/index.d.ts +1 -1
  132. package/lib/containers/system-settings/index.d.ts +9 -0
  133. package/lib/containers/system-settings/settings/collector-gateway-settings.d.ts +4 -0
  134. package/lib/containers/system-settings/settings/collector-node-settings.d.ts +4 -0
  135. package/lib/containers/system-settings/settings/general-settings.d.ts +4 -0
  136. package/lib/containers/system-settings/settings/options.d.ts +5 -0
  137. package/lib/containers/system-settings/settings/rollback-settings.d.ts +4 -0
  138. package/lib/containers/system-settings/settings/styled.d.ts +8 -0
  139. package/lib/containers/system-settings/settings/types.d.ts +13 -0
  140. package/lib/containers/system-settings/settings/ui-settings.d.ts +4 -0
  141. package/lib/containers/table-cell-conditions/index.d.ts +1 -0
  142. package/lib/containers/toast-list/index.d.ts +1 -2
  143. package/lib/containers/toggle-dark-mode/index.d.ts +1 -2
  144. package/lib/containers/trace-view/build-spans.d.ts +2 -0
  145. package/lib/containers/trace-view/index.d.ts +9 -0
  146. package/lib/containers/trace-view/span/index.d.ts +38 -0
  147. package/lib/containers/trace-view/span-drawer/build-details-card.d.ts +3 -0
  148. package/lib/containers/trace-view/span-drawer/build-logs-card.d.ts +3 -0
  149. package/lib/containers/trace-view/span-drawer/build-process-card.d.ts +3 -0
  150. package/lib/containers/trace-view/span-drawer/build-tags-card.d.ts +3 -0
  151. package/lib/containers/trace-view/span-drawer/index.d.ts +9 -0
  152. package/lib/containers.js +289 -15709
  153. package/lib/functions/clean-object-empty-strings-values/index.d.ts +2 -1
  154. package/lib/functions/compare-condition/index.d.ts +3 -3
  155. package/lib/functions/filter-destinations-by-stream/index.d.ts +2 -0
  156. package/lib/functions/filter-sources-by-stream/index.d.ts +2 -0
  157. package/lib/functions/flatten-object-keys/index.d.ts +2 -1
  158. package/lib/functions/format-duration/index.d.ts +1 -0
  159. package/lib/functions/get-action-icon/index.d.ts +2 -2
  160. package/lib/functions/get-conditions-booleans/index.d.ts +6 -2
  161. package/lib/functions/get-destination-icon/index.d.ts +5 -1
  162. package/lib/functions/get-entity-icon/index.d.ts +2 -2
  163. package/lib/functions/get-entity-id/index.d.ts +2 -2
  164. package/lib/functions/get-entity-label/index.d.ts +2 -2
  165. package/lib/functions/get-id-from-sse-target/index.d.ts +2 -2
  166. package/lib/functions/get-instrumentation-rule-icon/index.d.ts +2 -2
  167. package/lib/functions/get-main-container-language/index.d.ts +2 -0
  168. package/lib/functions/get-metric-for-entity/index.d.ts +2 -2
  169. package/lib/functions/get-monitor-icon/index.d.ts +2 -2
  170. package/lib/functions/get-platform-icon/index.d.ts +2 -2
  171. package/lib/functions/get-platform-label/index.d.ts +2 -2
  172. package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
  173. package/lib/functions/get-recursive-values/index.d.ts +4 -0
  174. package/lib/functions/get-sse-target-from-id/index.d.ts +2 -2
  175. package/lib/functions/get-status-icon/index.d.ts +3 -2
  176. package/lib/functions/get-status-type-from-odigos-health/index.d.ts +2 -0
  177. package/lib/functions/get-yaml-fields-for-destination/index.d.ts +2 -0
  178. package/lib/functions/has-unhealthy-instances/index.d.ts +2 -0
  179. package/lib/functions/index.d.ts +15 -1
  180. package/lib/functions/is-legal-k8s-label/index.d.ts +1 -0
  181. package/lib/functions/is-string-a-boolean/index.d.ts +1 -0
  182. package/lib/functions/is-valid-version/index.d.ts +1 -0
  183. package/lib/functions/map-destination-fields-for-display/index.d.ts +6 -0
  184. package/lib/functions/map-exported-signals/index.d.ts +2 -0
  185. package/lib/functions/numbers-only/index.d.ts +1 -0
  186. package/lib/functions/parse-boolean-from-string/index.d.ts +1 -0
  187. package/lib/functions/remove-empty-values-from-object/index.d.ts +2 -1
  188. package/lib/functions/safe-json-parse/index.d.ts +2 -1
  189. package/lib/functions/safe-json-stringify/index.d.ts +2 -1
  190. package/lib/functions/split-camel-string/index.d.ts +1 -1
  191. package/lib/functions/stringify-non-string-values/index.d.ts +2 -1
  192. package/lib/functions.js +1 -115
  193. package/lib/hooks/index.d.ts +3 -0
  194. package/lib/hooks/useActionFormData.d.ts +2 -2
  195. package/lib/hooks/useDataStreamFormData.d.ts +12 -0
  196. package/lib/hooks/useDestinationFormData.d.ts +1 -1
  197. package/lib/hooks/useGenericForm.d.ts +3 -1
  198. package/lib/hooks/useInstrumentationRuleFormData.d.ts +3 -6
  199. package/lib/hooks/usePopup.d.ts +17 -0
  200. package/lib/hooks/useSessionStorage.d.ts +5 -0
  201. package/lib/hooks/useSourceFormData.d.ts +2 -5
  202. package/lib/hooks/useSourceSelectionFormData.d.ts +19 -20
  203. package/lib/hooks.js +1 -13
  204. package/lib/icons/actions/index.d.ts +5 -5
  205. package/lib/icons/brand/index.d.ts +2 -2
  206. package/lib/icons/common/avatar-icon/index.d.ts +2 -0
  207. package/lib/icons/common/edited-icon/index.d.ts +2 -0
  208. package/lib/icons/common/gear-icon/index.d.ts +2 -0
  209. package/lib/icons/common/index.d.ts +30 -20
  210. package/lib/icons/common/refresh-arrows-icon/index.d.ts +2 -0
  211. package/lib/icons/common/refresh-left-arrow-icon/index.d.ts +2 -0
  212. package/lib/icons/common/refresh-right-arrow-icon/index.d.ts +2 -0
  213. package/lib/icons/common/rotate-arrows-icon/index.d.ts +2 -0
  214. package/lib/icons/common/user-group-icon/index.d.ts +2 -0
  215. package/lib/icons/common/user-icon/index.d.ts +2 -0
  216. package/lib/icons/common/user-settings-icon/index.d.ts +2 -0
  217. package/lib/icons/compute-platform/index.d.ts +2 -2
  218. package/lib/icons/destinations/alauda-logo/index.d.ts +2 -0
  219. package/lib/icons/destinations/alibaba-cloud-logo/index.d.ts +2 -0
  220. package/lib/icons/destinations/app-dynamics-logo/index.d.ts +2 -0
  221. package/lib/icons/destinations/aws-cloudwatch-logo/index.d.ts +2 -0
  222. package/lib/icons/destinations/aws-s3-logo/index.d.ts +2 -0
  223. package/lib/icons/destinations/aws-xray-logo/index.d.ts +2 -0
  224. package/lib/icons/destinations/axiom-logo/index.d.ts +2 -0
  225. package/lib/icons/destinations/better-stack-logo/index.d.ts +2 -0
  226. package/lib/icons/destinations/blob-storage-logo/index.d.ts +2 -0
  227. package/lib/icons/destinations/bonree-logo/index.d.ts +2 -0
  228. package/lib/icons/destinations/causely-logo/index.d.ts +2 -0
  229. package/lib/icons/destinations/checkly-logo/index.d.ts +2 -0
  230. package/lib/icons/destinations/chronosphere-logo/index.d.ts +2 -0
  231. package/lib/icons/destinations/clickhouse-logo/index.d.ts +2 -0
  232. package/lib/icons/destinations/coralogix-logo/index.d.ts +2 -0
  233. package/lib/icons/destinations/dash0-logo/index.d.ts +2 -0
  234. package/lib/icons/destinations/datadog-logo/index.d.ts +2 -0
  235. package/lib/icons/destinations/dynatrace-logo/index.d.ts +2 -0
  236. package/lib/icons/destinations/elastic-apm-logo/index.d.ts +2 -0
  237. package/lib/icons/destinations/elastic-search-logo/index.d.ts +2 -0
  238. package/lib/icons/destinations/gigapipe-logo/index.d.ts +2 -0
  239. package/lib/icons/destinations/google-cloud-platform-logo/index.d.ts +2 -0
  240. package/lib/icons/destinations/google-cloud-storage-logo/index.d.ts +2 -0
  241. package/lib/icons/destinations/grafana-logo/index.d.ts +2 -0
  242. package/lib/icons/destinations/greptime-logo/index.d.ts +2 -0
  243. package/lib/icons/destinations/groundcover-logo/index.d.ts +2 -0
  244. package/lib/icons/destinations/honeycomb-logo/index.d.ts +2 -0
  245. package/lib/icons/destinations/hyperdx-logo/index.d.ts +2 -0
  246. package/lib/icons/destinations/index.d.ts +60 -0
  247. package/lib/icons/destinations/instana-logo/index.d.ts +2 -0
  248. package/lib/icons/destinations/jaeger-logo/index.d.ts +2 -0
  249. package/lib/icons/destinations/kloudmate-logo/index.d.ts +2 -0
  250. package/lib/icons/destinations/last9-logo/index.d.ts +2 -0
  251. package/lib/icons/destinations/lightstep-logo/index.d.ts +2 -0
  252. package/lib/icons/destinations/logzio-logo/index.d.ts +2 -0
  253. package/lib/icons/destinations/loki-logo/index.d.ts +2 -0
  254. package/lib/icons/destinations/lumigo-logo/index.d.ts +2 -0
  255. package/lib/icons/destinations/middleware-logo/index.d.ts +2 -0
  256. package/lib/icons/destinations/new-relic-logo/index.d.ts +2 -0
  257. package/lib/icons/destinations/observe-logo/index.d.ts +2 -0
  258. package/lib/icons/destinations/odigos-destination-logo/index.d.ts +2 -0
  259. package/lib/icons/destinations/one-uptime-logo/index.d.ts +2 -0
  260. package/lib/icons/destinations/open-observe-logo/index.d.ts +2 -0
  261. package/lib/icons/destinations/open-telemetry-logo/index.d.ts +2 -0
  262. package/lib/icons/destinations/ops-verse-logo/index.d.ts +2 -0
  263. package/lib/icons/destinations/oracle-logo/index.d.ts +2 -0
  264. package/lib/icons/destinations/prometheus-logo/index.d.ts +2 -0
  265. package/lib/icons/destinations/qryn-logo/index.d.ts +2 -0
  266. package/lib/icons/destinations/quickwit-logo/index.d.ts +2 -0
  267. package/lib/icons/destinations/sentry-logo/index.d.ts +2 -0
  268. package/lib/icons/destinations/seq-logo/index.d.ts +2 -0
  269. package/lib/icons/destinations/signoz-logo/index.d.ts +2 -0
  270. package/lib/icons/destinations/splunk-logo/index.d.ts +2 -0
  271. package/lib/icons/destinations/sumo-logic-logo/index.d.ts +2 -0
  272. package/lib/icons/destinations/telemetry-hub-logo/index.d.ts +2 -0
  273. package/lib/icons/destinations/tempo-logo/index.d.ts +2 -0
  274. package/lib/icons/destinations/tingyun-logo/index.d.ts +2 -0
  275. package/lib/icons/destinations/traceloop-logo/index.d.ts +2 -0
  276. package/lib/icons/destinations/uptrace-logo/index.d.ts +2 -0
  277. package/lib/icons/destinations/victoria-metrics-logo/index.d.ts +2 -0
  278. package/lib/icons/index.d.ts +1 -0
  279. package/lib/icons/instrumentation-rules/custom-instrumentation-icon/index.d.ts +2 -0
  280. package/lib/icons/instrumentation-rules/headers-collection-icon/index.d.ts +2 -0
  281. package/lib/icons/instrumentation-rules/index.d.ts +4 -2
  282. package/lib/icons/math/index.d.ts +4 -2
  283. package/lib/icons/math/minus-circled-icon/index.d.ts +2 -0
  284. package/lib/icons/math/plus-circled-icon/index.d.ts +2 -0
  285. package/lib/icons/monitors/index.d.ts +3 -3
  286. package/lib/icons/on-off/index.d.ts +6 -6
  287. package/lib/icons/overview/data-streams-icon/index.d.ts +2 -0
  288. package/lib/icons/overview/index.d.ts +10 -8
  289. package/lib/icons/overview/namespaces-icon/index.d.ts +2 -0
  290. package/lib/icons/programming-languages/index.d.ts +0 -1
  291. package/lib/icons/social/index.d.ts +1 -1
  292. package/lib/icons/status/index.d.ts +8 -8
  293. package/lib/icons.js +1 -82
  294. package/lib/mock-data/config/index.d.ts +2 -0
  295. package/lib/{data → mock-data}/destinations/index.d.ts +1 -1
  296. package/lib/{data → mock-data}/index.d.ts +4 -0
  297. package/lib/mock-data/instrumentation-instances/index.d.ts +2 -0
  298. package/lib/mock-data/service-map/index.d.ts +2 -0
  299. package/lib/{data → mock-data}/sources/index.d.ts +8 -4
  300. package/lib/mock-data/traces/index.d.ts +2 -0
  301. package/lib/snippets/add-button/index.d.ts +8 -0
  302. package/lib/snippets/copy-text/index.d.ts +7 -0
  303. package/lib/snippets/edit-button/index.d.ts +7 -0
  304. package/lib/snippets/index.d.ts +7 -0
  305. package/lib/snippets/note-back-to-summary/index.d.ts +6 -0
  306. package/lib/snippets/pod-container/index.d.ts +5 -0
  307. package/lib/snippets/react-flow/edges/labeled-edge.d.ts +10 -0
  308. package/lib/{containers/data-flow → snippets/react-flow}/flow.d.ts +2 -0
  309. package/lib/snippets/react-flow/index.d.ts +13 -0
  310. package/lib/snippets/react-flow/nodes/add-node.d.ts +11 -0
  311. package/lib/snippets/react-flow/nodes/base-node.d.ts +21 -0
  312. package/lib/snippets/react-flow/nodes/edged-node.d.ts +9 -0
  313. package/lib/snippets/react-flow/nodes/frame-node.d.ts +9 -0
  314. package/lib/{containers/data-flow → snippets/react-flow}/nodes/header-node.d.ts +5 -5
  315. package/lib/snippets/react-flow/nodes/map-item-node.d.ts +12 -0
  316. package/lib/snippets/react-flow/nodes/no-data-node.d.ts +9 -0
  317. package/lib/snippets/react-flow/nodes/scroll-node.d.ts +15 -0
  318. package/lib/snippets/react-flow/nodes/skeleton-node.d.ts +8 -0
  319. package/lib/snippets/source-container/index.d.ts +7 -0
  320. package/lib/snippets/source-container/override-runtime.d.ts +9 -0
  321. package/lib/snippets.js +1 -0
  322. package/lib/store/index.d.ts +2 -0
  323. package/lib/store/useActiveNodeStore.d.ts +11 -0
  324. package/lib/store/useDarkMode.d.ts +5 -3
  325. package/lib/store/useDataStreamStore.d.ts +16 -0
  326. package/lib/store/useDrawerStore.d.ts +2 -2
  327. package/lib/store/useEntityStore.d.ts +8 -6
  328. package/lib/store/useFilterStore.d.ts +5 -2
  329. package/lib/store/usePendingStore.d.ts +2 -2
  330. package/lib/store/useSetupStore.d.ts +20 -26
  331. package/lib/store.js +1 -4
  332. package/lib/theme/index.d.ts +2 -3
  333. package/lib/theme/palletes/index.d.ts +2 -105
  334. package/lib/theme.js +1 -240
  335. package/lib/types/actions/index.d.ts +154 -68
  336. package/lib/types/common/index.d.ts +91 -76
  337. package/lib/types/config/index.d.ts +80 -0
  338. package/lib/types/data-flow/index.d.ts +17 -15
  339. package/lib/types/data-streams/index.d.ts +3 -0
  340. package/lib/types/describe/index.d.ts +7 -3
  341. package/lib/types/destinations/index.d.ts +89 -9
  342. package/lib/types/index.d.ts +5 -1
  343. package/lib/types/instrumentation-instances/index.d.ts +7 -0
  344. package/lib/types/instrumentation-rules/index.d.ts +65 -36
  345. package/lib/types/namespaces/index.d.ts +14 -0
  346. package/lib/types/service-map/index.d.ts +10 -0
  347. package/lib/types/signals/index.d.ts +5 -5
  348. package/lib/types/sources/index.d.ts +42 -20
  349. package/lib/types/traces/index.d.ts +38 -0
  350. package/lib/types.js +1 -166
  351. package/package.json +50 -40
  352. package/lib/components/auto-complete-input/auto-complete-input.stories.d.ts +0 -9
  353. package/lib/components/badge/badge.stories.d.ts +0 -13
  354. package/lib/components/button/button.stories.d.ts +0 -9
  355. package/lib/components/cancel-warning/cancel-warning.stories.d.ts +0 -9
  356. package/lib/components/checkbox/checkbox.stories.d.ts +0 -9
  357. package/lib/components/code/code.stories.d.ts +0 -9
  358. package/lib/components/condition-details/condition-details.stories.d.ts +0 -14
  359. package/lib/components/data-card/data-card.stories.d.ts +0 -10
  360. package/lib/components/data-tab/data-tab.stories.d.ts +0 -9
  361. package/lib/components/delete-warning/delete-warning.stories.d.ts +0 -9
  362. package/lib/components/describe-row/describe-row.stories.d.ts +0 -9
  363. package/lib/components/divider/divider.stories.d.ts +0 -9
  364. package/lib/components/docs-button/docs-button.stories.d.ts +0 -9
  365. package/lib/components/drawer/drawer.stories.d.ts +0 -10
  366. package/lib/components/dropdown/dropdown.stories.d.ts +0 -10
  367. package/lib/components/error-boundary/error-boundary.stories.d.ts +0 -9
  368. package/lib/components/extend-arrow/extend-arrow.stories.d.ts +0 -9
  369. package/lib/components/fade-loader/fade-loader.stories.d.ts +0 -9
  370. package/lib/components/field-error/field-error.stories.d.ts +0 -9
  371. package/lib/components/field-label/field-label.stories.d.ts +0 -9
  372. package/lib/components/header/header.stories.d.ts +0 -9
  373. package/lib/components/icon-button/icon-button.stories.d.ts +0 -9
  374. package/lib/components/icon-group/icon-group.stories.d.ts +0 -14
  375. package/lib/components/icon-title-badge/icon-title-badge.stories.d.ts +0 -9
  376. package/lib/components/icon-wrapped/icon-wrapped.stories.d.ts +0 -10
  377. package/lib/components/icons-nav/icons-nav.stories.d.ts +0 -9
  378. package/lib/components/image-controlled/image-controlled.stories.d.ts +0 -9
  379. package/lib/components/input/input.stories.d.ts +0 -9
  380. package/lib/components/input-list/input-list.stories.d.ts +0 -9
  381. package/lib/components/input-table/input-table.stories.d.ts +0 -9
  382. package/lib/components/interactive-table/interactive-table.stories.d.ts +0 -12
  383. package/lib/components/interactive-table/row.d.ts +0 -13
  384. package/lib/components/key-value-input-list/key-value-input-list.stories.d.ts +0 -9
  385. package/lib/components/modal/modal.stories.d.ts +0 -9
  386. package/lib/components/monitors-checkboxes/monitors-checkboxes.stories.d.ts +0 -9
  387. package/lib/components/monitors-icons/monitors-icons.stories.d.ts +0 -9
  388. package/lib/components/navigation-buttons/navigation-buttons.stories.d.ts +0 -9
  389. package/lib/components/no-data-found/no-data-found.stories.d.ts +0 -9
  390. package/lib/components/notification-note/notification-note.stories.d.ts +0 -10
  391. package/lib/components/section-title/section-title.stories.d.ts +0 -9
  392. package/lib/components/segment/segment.stories.d.ts +0 -9
  393. package/lib/components/skeleton-loader/skeleton-loader.stories.d.ts +0 -9
  394. package/lib/components/status/status.stories.d.ts +0 -9
  395. package/lib/components/stepper/stepper.stories.d.ts +0 -9
  396. package/lib/components/text/text.stories.d.ts +0 -9
  397. package/lib/components/textarea/textarea.stories.d.ts +0 -9
  398. package/lib/components/toggle/toggle.stories.d.ts +0 -9
  399. package/lib/components/tooltip/tooltip.stories.d.ts +0 -9
  400. package/lib/components/trace-loader/trace-loader.stories.d.ts +0 -9
  401. package/lib/components/warning-modal/warning-modal.stories.d.ts +0 -9
  402. package/lib/containers/action-drawer/action-drawer.stories.d.ts +0 -9
  403. package/lib/containers/action-form/action-form.stories.d.ts +0 -9
  404. package/lib/containers/action-modal/action-modal.stories.d.ts +0 -9
  405. package/lib/containers/action-table/action-table.stories.d.ts +0 -9
  406. package/lib/containers/await-pipeline/await-pipeline.stories.d.ts +0 -9
  407. package/lib/containers/compute-platform-select/compute-platform-select.stories.d.ts +0 -9
  408. package/lib/containers/compute-platform-select/index.d.ts +0 -10
  409. package/lib/containers/compute-platforms/compute-platforms.stories.d.ts +0 -9
  410. package/lib/containers/compute-platforms/index.d.ts +0 -8
  411. package/lib/containers/compute-platforms-actions-menu/compute-platforms-actions-menu.stories.d.ts +0 -9
  412. package/lib/containers/compute-platforms-actions-menu/index.d.ts +0 -7
  413. package/lib/containers/data-flow/data-flow.stories.d.ts +0 -9
  414. package/lib/containers/data-flow/edges/labeled-edge.d.ts +0 -10
  415. package/lib/containers/data-flow/helpers/get-main-container-language.d.ts +0 -2
  416. package/lib/containers/data-flow/nodes/add-node.d.ts +0 -11
  417. package/lib/containers/data-flow/nodes/base-node.d.ts +0 -21
  418. package/lib/containers/data-flow/nodes/edged-node.d.ts +0 -9
  419. package/lib/containers/data-flow/nodes/frame-node.d.ts +0 -9
  420. package/lib/containers/data-flow/nodes/scroll-node.d.ts +0 -26
  421. package/lib/containers/data-flow/nodes/skeleton-node.d.ts +0 -8
  422. package/lib/containers/data-flow-actions-menu/data-flow.stories.d.ts +0 -11
  423. package/lib/containers/data-flow-actions-menu/search/recent-searches/index.d.ts +0 -2
  424. package/lib/containers/destination-drawer/destination-drawer.stories.d.ts +0 -9
  425. package/lib/containers/destination-form/destination-form.stories.d.ts +0 -9
  426. package/lib/containers/destination-modal/choose-destination/potential-destinations-list/index.d.ts +0 -8
  427. package/lib/containers/destination-modal/destination-modal.stories.d.ts +0 -9
  428. package/lib/containers/destination-selection-form/configured-list/index.d.ts +0 -5
  429. package/lib/containers/destination-selection-form/destination-selection-form.stories.d.ts +0 -9
  430. package/lib/containers/destination-table/destination-table.stories.d.ts +0 -9
  431. package/lib/containers/dropdowns/connection-status-dropdown/connection-status-dropdown.stories.d.ts +0 -9
  432. package/lib/containers/dropdowns/connection-status-dropdown/index.d.ts +0 -15
  433. package/lib/containers/dropdowns/connection-type-dropdown/connection-type-dropdown.stories.d.ts +0 -9
  434. package/lib/containers/dropdowns/error-dropdown/error-dropdown.stories.d.ts +0 -9
  435. package/lib/containers/dropdowns/kind-dropdown/error-dropdown.stories.d.ts +0 -9
  436. package/lib/containers/dropdowns/language-dropdown/language-dropdown.stories.d.ts +0 -9
  437. package/lib/containers/dropdowns/monitor-dropdown/monitor-dropdown.stories.d.ts +0 -9
  438. package/lib/containers/dropdowns/namespace-dropdown/namespace-dropdown.stories.d.ts +0 -9
  439. package/lib/containers/instrumentation-rule-drawer/instrumentation-rule-drawer.stories.d.ts +0 -9
  440. package/lib/containers/instrumentation-rule-form/instrumentation-rule-form.stories.d.ts +0 -9
  441. package/lib/containers/instrumentation-rule-modal/instrumentation-rule-modal.stories.d.ts +0 -9
  442. package/lib/containers/instrumentation-rule-table/instrumentation-rule-table.stories.d.ts +0 -9
  443. package/lib/containers/multi-source-control/multi-source-control.stories.d.ts +0 -9
  444. package/lib/containers/notification-manager/notification-manager.stories.d.ts +0 -9
  445. package/lib/containers/overview-drawer/overview-drawer.stories.d.ts +0 -9
  446. package/lib/containers/side-nav/side-nav.stories.d.ts +0 -9
  447. package/lib/containers/slack-invite/slack-invite.stories.d.ts +0 -9
  448. package/lib/containers/source-drawer/source-drawer.stories.d.ts +0 -9
  449. package/lib/containers/source-form/source-form.stories.d.ts +0 -9
  450. package/lib/containers/source-modal/source-modal.stories.d.ts +0 -9
  451. package/lib/containers/source-selection-form/fast/controls/index.d.ts +0 -7
  452. package/lib/containers/source-selection-form/fast/index.d.ts +0 -7
  453. package/lib/containers/source-selection-form/fast/list/index.d.ts +0 -10
  454. package/lib/containers/source-selection-form/simple/controls/index.d.ts +0 -11
  455. package/lib/containers/source-selection-form/simple/index.d.ts +0 -7
  456. package/lib/containers/source-selection-form/simple/list/index.d.ts +0 -9
  457. package/lib/containers/source-selection-form/source-selection-form.stories.d.ts +0 -9
  458. package/lib/containers/source-table/source-table.stories.d.ts +0 -9
  459. package/lib/containers/system-overview/system-overview.stories.d.ts +0 -9
  460. package/lib/containers/table-cell-conditions/table-cell-conditions.stories.d.ts +0 -9
  461. package/lib/containers/toast-list/toast-list.stories.d.ts +0 -9
  462. package/lib/containers/toggle-dark-mode/toggle-dark-mode.stories.d.ts +0 -9
  463. package/lib/functions/derive-type-from-rule/index.d.ts +0 -2
  464. package/lib/icons/actions/add-cluster-info-icon/add-cluster-info-icon.stories.d.ts +0 -8
  465. package/lib/icons/actions/delete-attribute-icon/delete-attribute-icon.stories.d.ts +0 -8
  466. package/lib/icons/actions/pii-masking-icon/pii-masking-icon.stories.d.ts +0 -8
  467. package/lib/icons/actions/rename-attribute-icon/rename-attribute-icon.stories.d.ts +0 -8
  468. package/lib/icons/actions/sampler-icon/sampler-icon.stories.d.ts +0 -8
  469. package/lib/icons/brand/odigos-logo/odigos-logo.stories.d.ts +0 -8
  470. package/lib/icons/brand/odigos-logo-text/odigos-logo-text.stories.d.ts +0 -8
  471. package/lib/icons/common/arrow-icon/arrow-icon.stories.d.ts +0 -8
  472. package/lib/icons/common/code-brackets-icon/code-brackets-icon.stories.d.ts +0 -8
  473. package/lib/icons/common/code-icon/code-icon.stories.d.ts +0 -8
  474. package/lib/icons/common/command-icon/command-icon.stories.d.ts +0 -8
  475. package/lib/icons/common/copy-icon/copy-icon.stories.d.ts +0 -8
  476. package/lib/icons/common/edit-icon/edit-icon.stories.d.ts +0 -8
  477. package/lib/icons/common/extend-arrow-icon/extend-arrow-icon.stories.d.ts +0 -8
  478. package/lib/icons/common/filter-icon/filter-icon.stories.d.ts +0 -8
  479. package/lib/icons/common/folder-icon/folder-icon.stories.d.ts +0 -8
  480. package/lib/icons/common/image-error-icon/image-error-icon.stories.d.ts +0 -8
  481. package/lib/icons/common/key-icon/key-icon.stories.d.ts +0 -8
  482. package/lib/icons/common/list-icon/list-icon.stories.d.ts +0 -8
  483. package/lib/icons/common/no-data-icon/no-data-icon.stories.d.ts +0 -8
  484. package/lib/icons/common/notebook-icon/notebook-icon.stories.d.ts +0 -8
  485. package/lib/icons/common/notification-icon/notification-icon.stories.d.ts +0 -8
  486. package/lib/icons/common/search-icon/search-icon.stories.d.ts +0 -8
  487. package/lib/icons/common/sort-arrows-icon/sort-arrows-icon.stories.d.ts +0 -8
  488. package/lib/icons/common/terminal-icon/terminal-icon.stories.d.ts +0 -8
  489. package/lib/icons/common/trash-icon/trash-icon.stories.d.ts +0 -8
  490. package/lib/icons/common/x-icon/x-icon.stories.d.ts +0 -8
  491. package/lib/icons/compute-platform/k8s-logo/k8s-logo.stories.d.ts +0 -8
  492. package/lib/icons/compute-platform/vm-logo/vm-logo.stories.d.ts +0 -8
  493. package/lib/icons/instrumentation-rules/code-attributes-icon/code-attributes-icon.stories.d.ts +0 -8
  494. package/lib/icons/instrumentation-rules/payload-collection-icon/payload-collection-icon.stories.d.ts +0 -8
  495. package/lib/icons/math/minus-icon/minus-icon.stories.d.ts +0 -8
  496. package/lib/icons/math/plus-icon/plus-icon.stories.d.ts +0 -8
  497. package/lib/icons/monitors/logs-icon/logs-icon.stories.d.ts +0 -8
  498. package/lib/icons/monitors/metrics-icon/metrics-icon.stories.d.ts +0 -8
  499. package/lib/icons/monitors/traces-icon/traces-icon.stories.d.ts +0 -8
  500. package/lib/icons/on-off/eye-closed-icon/eye-closed-icon.stories.d.ts +0 -8
  501. package/lib/icons/on-off/eye-open-icon/eye-open-icon.stories.d.ts +0 -8
  502. package/lib/icons/on-off/light-off-icon/light-off-icon.stories.d.ts +0 -8
  503. package/lib/icons/on-off/light-on-icon/light-on-icon.stories.d.ts +0 -8
  504. package/lib/icons/on-off/moon-icon/moon-icon.stories.d.ts +0 -8
  505. package/lib/icons/on-off/sun-icon/sun-icon.stories.d.ts +0 -8
  506. package/lib/icons/overview/actions-icon/actions-icon.stories.d.ts +0 -8
  507. package/lib/icons/overview/connections-icon/connections-icon.stories.d.ts +0 -8
  508. package/lib/icons/overview/destinations-icon/destinations-icon.stories.d.ts +0 -8
  509. package/lib/icons/overview/overview-icon/overview-icon.stories.d.ts +0 -8
  510. package/lib/icons/overview/rules-icon/rules-icon.stories.d.ts +0 -8
  511. package/lib/icons/overview/service-map-icon/service-map-icon.stories.d.ts +0 -8
  512. package/lib/icons/overview/sources-icon/sources-icon.stories.d.ts +0 -8
  513. package/lib/icons/overview/trace-view-icon/trace-view-icon.stories.d.ts +0 -8
  514. package/lib/icons/programming-languages/c-plus-plus-logo/c-plus-plus-logo.stories.d.ts +0 -8
  515. package/lib/icons/programming-languages/c-sharp-logo/c-sharp-logo.stories.d.ts +0 -8
  516. package/lib/icons/programming-languages/dotnet-logo/dotnet-logo.stories.d.ts +0 -8
  517. package/lib/icons/programming-languages/elixir-logo/elixir-logo.stories.d.ts +0 -8
  518. package/lib/icons/programming-languages/go-logo/go-logo.stories.d.ts +0 -8
  519. package/lib/icons/programming-languages/java-logo/java-logo.stories.d.ts +0 -8
  520. package/lib/icons/programming-languages/kafka-logo/kafka-logo.stories.d.ts +0 -8
  521. package/lib/icons/programming-languages/mysql-logo/mysql-logo.stories.d.ts +0 -8
  522. package/lib/icons/programming-languages/nginx-logo/nginx-logo.stories.d.ts +0 -8
  523. package/lib/icons/programming-languages/nodejs-logo/nodejs-logo.stories.d.ts +0 -8
  524. package/lib/icons/programming-languages/php-logo/php-logo.stories.d.ts +0 -8
  525. package/lib/icons/programming-languages/postgres-logo/postgres-logo.stories.d.ts +0 -8
  526. package/lib/icons/programming-languages/python-logo/python-logo.stories.d.ts +0 -8
  527. package/lib/icons/programming-languages/redis-logo/redis-logo.stories.d.ts +0 -8
  528. package/lib/icons/programming-languages/ruby-logo/ruby-logo.stories.d.ts +0 -8
  529. package/lib/icons/programming-languages/rust-logo/rust-logo.stories.d.ts +0 -8
  530. package/lib/icons/programming-languages/swift-logo/swift-logo.stories.d.ts +0 -8
  531. package/lib/icons/social/slack-logo/slack-logo.stories.d.ts +0 -8
  532. package/lib/icons/status/check-circled-icon/check-circled-icon.stories.d.ts +0 -8
  533. package/lib/icons/status/check-icon/check-icon.stories.d.ts +0 -8
  534. package/lib/icons/status/cross-circled-icon/cross-circled-icon.stories.d.ts +0 -8
  535. package/lib/icons/status/cross-icon/cross-icon.stories.d.ts +0 -8
  536. package/lib/icons/status/error-round-icon/error-round-icon.stories.d.ts +0 -8
  537. package/lib/icons/status/error-triangle-icon/error-triangle-icon.stories.d.ts +0 -8
  538. package/lib/icons/status/info-icon/info-icon.stories.d.ts +0 -8
  539. package/lib/icons/status/warning-triangle-icon/warning-triangle-icon.stories.d.ts +0 -8
  540. package/lib/index-3KUV6Vlt.js +0 -89
  541. package/lib/index-BFct3S32.js +0 -22
  542. package/lib/index-BGlk5VhF.js +0 -69
  543. package/lib/index-BZS1ijMm.js +0 -30
  544. package/lib/index-BjJpYtF1.js +0 -42
  545. package/lib/index-BumPE6cF.js +0 -37
  546. package/lib/index-CZe2VX28.js +0 -128
  547. package/lib/index-DB1gmCsH.js +0 -202
  548. package/lib/index-DIcomki-.js +0 -671
  549. package/lib/index-D_Qn2U89.js +0 -138
  550. package/lib/index-DnmWFsTQ.js +0 -45
  551. package/lib/index-Do8ODRlA.js +0 -29597
  552. package/lib/index-eF2JXMVR.js +0 -196
  553. package/lib/index-ixs381n-.js +0 -466
  554. package/lib/types/connection/index.d.ts +0 -7
  555. package/lib/useSourceSelectionFormData-CxdOP9FT.js +0 -561
  556. package/lib/useTransition-Dfxjcy-C.js +0 -3493
  557. /package/lib/icons/{programming-languages → destinations}/kafka-logo/index.d.ts +0 -0
  558. /package/lib/{data → mock-data}/actions/index.d.ts +0 -0
  559. /package/lib/{data → mock-data}/describe/index.d.ts +0 -0
  560. /package/lib/{data → mock-data}/instrumentation-rules/index.d.ts +0 -0
  561. /package/lib/{data → mock-data}/namespaces/index.d.ts +0 -0
  562. /package/lib/{data → mock-data}/tokens/index.d.ts +0 -0
  563. /package/lib/{containers/data-flow/helpers → snippets/react-flow}/node-config.d.ts +0 -0
@@ -1,7 +0,0 @@
1
- import { STATUS_TYPE, PLATFORM_TYPE } from '../common';
2
- export interface Connection {
3
- id: string;
4
- type?: PLATFORM_TYPE;
5
- name?: string;
6
- status: STATUS_TYPE;
7
- }
@@ -1,561 +0,0 @@
1
- import { ACTION_TYPE, STATUS_TYPE, ADD_NODE_TYPES, ENTITY_TYPES, FIELD_TYPES } from './types.js';
2
- import { useState, useEffect, useCallback } from 'react';
3
- import { f as useNotificationStore, e as useModalStore, a as useDrawerStore, i as useSetupStore } from './index-DIcomki-.js';
4
- import 'styled-components';
5
- import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
6
- import './index-CZe2VX28.js';
7
- import { F as FORM_ALERTS } from './index-DnmWFsTQ.js';
8
- import { b as useGenericForm } from './useTransition-Dfxjcy-C.js';
9
- import { g as getIdFromSseTarget } from './index-BFct3S32.js';
10
-
11
- const INITIAL$2 = {
12
- // @ts-ignore (TS complains about empty string because we expect an "ActionsType", but it's fine)
13
- type: '',
14
- name: '',
15
- notes: '',
16
- signals: [],
17
- disabled: false,
18
- clusterAttributes: null,
19
- renames: null,
20
- attributeNamesToDelete: null,
21
- piiCategories: null,
22
- fallbackSamplingRatio: null,
23
- samplingPercentage: null,
24
- endpointsFilters: null,
25
- };
26
- const useActionFormData = () => {
27
- const { addNotification } = useNotificationStore();
28
- const { formData, formErrors, handleFormChange, handleErrorChange, resetFormData } = useGenericForm(INITIAL$2);
29
- const validateForm = (params) => {
30
- const errors = {};
31
- let ok = true;
32
- Object.entries(formData).forEach(([k, v]) => {
33
- switch (k) {
34
- case 'type':
35
- case 'signals':
36
- if (isEmpty(v))
37
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
38
- break;
39
- case 'clusterAttributes':
40
- if (formData.type === ACTION_TYPE.ADD_CLUSTER_INFO && isEmpty(v))
41
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
42
- break;
43
- case 'renames':
44
- if (formData.type === ACTION_TYPE.RENAME_ATTRIBUTES && isEmpty(v))
45
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
46
- break;
47
- case 'attributeNamesToDelete':
48
- if (formData.type === ACTION_TYPE.DELETE_ATTRIBUTES && isEmpty(v))
49
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
50
- break;
51
- case 'piiCategories':
52
- if (formData.type === ACTION_TYPE.PII_MASKING && isEmpty(v))
53
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
54
- break;
55
- case 'fallbackSamplingRatio':
56
- if (formData.type === ACTION_TYPE.ERROR_SAMPLER && isEmpty(v))
57
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
58
- break;
59
- case 'samplingPercentage':
60
- if (formData.type === ACTION_TYPE.PROBABILISTIC_SAMPLER && isEmpty(v))
61
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
62
- break;
63
- case 'endpointsFilters':
64
- if (formData.type === ACTION_TYPE.LATENCY_SAMPLER) {
65
- if (isEmpty(v))
66
- errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
67
- v?.forEach((endpoint) => {
68
- if (endpoint.httpRoute.charAt(0) !== '/')
69
- errors[k] = FORM_ALERTS.LATENCY_HTTP_ROUTE;
70
- });
71
- }
72
- break;
73
- }
74
- });
75
- ok = !Object.values(errors).length;
76
- if (!ok && params?.withAlert) {
77
- addNotification({
78
- type: STATUS_TYPE.WARNING,
79
- title: params.alertTitle,
80
- message: FORM_ALERTS.REQUIRED_FIELDS,
81
- hideFromHistory: true,
82
- });
83
- }
84
- handleErrorChange(undefined, undefined, errors);
85
- return ok;
86
- };
87
- const loadFormWithDrawerItem = ({ type, spec }) => {
88
- const updatedData = {
89
- ...INITIAL$2,
90
- type,
91
- };
92
- Object.entries(spec).forEach(([k, v]) => {
93
- if (!!v) {
94
- switch (k) {
95
- case 'actionName': {
96
- updatedData['name'] = v;
97
- break;
98
- }
99
- case 'type':
100
- case 'notes':
101
- case 'signals':
102
- case 'disabled':
103
- case 'collectContainerAttributes':
104
- case 'collectWorkloadId':
105
- case 'collectClusterId':
106
- case 'labelsAttributes':
107
- case 'annotationsAttributes':
108
- case 'clusterAttributes':
109
- case 'attributeNamesToDelete':
110
- case 'renames':
111
- case 'piiCategories':
112
- case 'fallbackSamplingRatio':
113
- case 'samplingPercentage':
114
- case 'endpointsFilters': {
115
- // @ts-ignore
116
- updatedData[k] = v;
117
- break;
118
- }
119
- }
120
- }
121
- });
122
- handleFormChange(undefined, undefined, updatedData);
123
- };
124
- return {
125
- formData,
126
- formErrors,
127
- handleFormChange,
128
- resetFormData,
129
- validateForm,
130
- loadFormWithDrawerItem,
131
- };
132
- };
133
-
134
- const useClickNode = () => {
135
- const { setCurrentModal } = useModalStore();
136
- const { setDrawerType, setDrawerEntityId } = useDrawerStore();
137
- const onClickNode = (_, object) => {
138
- const { data: { id, type }, } = object;
139
- switch (type) {
140
- case ENTITY_TYPES.SOURCE:
141
- case ENTITY_TYPES.DESTINATION:
142
- case ENTITY_TYPES.ACTION:
143
- case ENTITY_TYPES.INSTRUMENTATION_RULE:
144
- setDrawerType(type);
145
- setDrawerEntityId(id);
146
- break;
147
- case ADD_NODE_TYPES.ADD_SOURCE:
148
- setCurrentModal(ENTITY_TYPES.SOURCE);
149
- break;
150
- case ADD_NODE_TYPES.ADD_DESTINATION:
151
- setCurrentModal(ENTITY_TYPES.DESTINATION);
152
- break;
153
- case ADD_NODE_TYPES.ADD_ACTION:
154
- setCurrentModal(ENTITY_TYPES.ACTION);
155
- break;
156
- case ADD_NODE_TYPES.ADD_RULE:
157
- setCurrentModal(ENTITY_TYPES.INSTRUMENTATION_RULE);
158
- break;
159
- default:
160
- console.warn('Unhandled node click', object);
161
- break;
162
- }
163
- };
164
- return { onClickNode };
165
- };
166
-
167
- const useClickNotification = () => {
168
- const { setDrawerType, setDrawerEntityId } = useDrawerStore();
169
- const { markAsDismissed, markAsSeen } = useNotificationStore();
170
- const onClickNotification = (notif, options) => {
171
- const { id, crdType, target } = notif;
172
- const { dismissToast } = options || {};
173
- if (crdType && target) {
174
- switch (crdType) {
175
- case ENTITY_TYPES.INSTRUMENTATION_RULE:
176
- setDrawerType(ENTITY_TYPES.INSTRUMENTATION_RULE);
177
- setDrawerEntityId(getIdFromSseTarget(target, ENTITY_TYPES.INSTRUMENTATION_RULE));
178
- break;
179
- case ENTITY_TYPES.SOURCE:
180
- case 'InstrumentationConfig':
181
- case 'InstrumentationInstance':
182
- setDrawerType(ENTITY_TYPES.SOURCE);
183
- setDrawerEntityId(getIdFromSseTarget(target, ENTITY_TYPES.SOURCE));
184
- break;
185
- case ENTITY_TYPES.ACTION:
186
- setDrawerType(ENTITY_TYPES.ACTION);
187
- setDrawerEntityId(getIdFromSseTarget(target, ENTITY_TYPES.ACTION));
188
- break;
189
- case ENTITY_TYPES.DESTINATION:
190
- case 'Destination':
191
- setDrawerType(ENTITY_TYPES.DESTINATION);
192
- setDrawerEntityId(getIdFromSseTarget(target, ENTITY_TYPES.DESTINATION));
193
- break;
194
- default:
195
- console.warn('notif click not handled for:', { crdType, target });
196
- break;
197
- }
198
- }
199
- markAsSeen(id);
200
- if (dismissToast)
201
- markAsDismissed(id);
202
- };
203
- return { onClickNotification };
204
- };
205
-
206
- const INITIAL$1 = {
207
- type: '',
208
- name: '',
209
- exportedSignals: {
210
- logs: false,
211
- metrics: false,
212
- traces: false,
213
- },
214
- fields: [],
215
- };
216
- const buildFormDynamicFields = (fields) => {
217
- return fields
218
- .filter((f) => !!f)
219
- .map((f) => {
220
- const { name, componentType, componentProperties, displayName, initialValue, renderCondition } = f;
221
- switch (componentType) {
222
- case FIELD_TYPES.DROPDOWN: {
223
- const componentPropertiesJson = safeJsonParse(componentProperties, {});
224
- const options = Array.isArray(componentPropertiesJson.values)
225
- ? componentPropertiesJson.values.map((value) => ({
226
- id: value,
227
- value,
228
- }))
229
- : Object.entries(componentPropertiesJson.values).map(([key, value]) => ({
230
- id: key,
231
- value,
232
- }));
233
- return {
234
- name,
235
- componentType: componentType,
236
- title: displayName,
237
- value: initialValue,
238
- placeholder: componentPropertiesJson.placeholder || 'Select an option',
239
- options,
240
- renderCondition,
241
- ...componentPropertiesJson,
242
- };
243
- }
244
- default: {
245
- const componentPropertiesJson = safeJsonParse(componentProperties, {});
246
- return {
247
- name,
248
- componentType,
249
- title: displayName,
250
- value: initialValue,
251
- renderCondition,
252
- ...componentPropertiesJson,
253
- };
254
- }
255
- }
256
- });
257
- };
258
- const useDestinationFormData = (params) => {
259
- const { supportedSignals, preLoadedFields } = params || {};
260
- const { addNotification } = useNotificationStore();
261
- const { formData, formErrors, handleFormChange, handleErrorChange, resetFormData } = useGenericForm(INITIAL$1);
262
- const [yamlFields, setYamlFields] = useState([]);
263
- const [dynamicFields, setDynamicFields] = useState([]);
264
- useEffect(() => {
265
- if (yamlFields) {
266
- setDynamicFields(buildFormDynamicFields(yamlFields).map((field) => {
267
- // if we have preloaded fields, we need to set the value of the field
268
- // (this can be from an odigos-detected-destination during create, or from an existing destination during edit/update)
269
- if (!!preLoadedFields) {
270
- const parsedFields = typeof preLoadedFields === 'string' ? safeJsonParse(preLoadedFields, {}) : preLoadedFields;
271
- if (field.name in parsedFields) {
272
- return {
273
- ...field,
274
- // @ts-ignore
275
- value: parsedFields[field.name],
276
- };
277
- }
278
- }
279
- return field;
280
- }));
281
- }
282
- else {
283
- setDynamicFields([]);
284
- }
285
- }, [yamlFields, preLoadedFields]);
286
- useEffect(() => {
287
- handleFormChange('fields', dynamicFields.map((field) => ({
288
- key: field.name,
289
- value: field.value,
290
- })));
291
- }, [dynamicFields]);
292
- useEffect(() => {
293
- const { logs, metrics, traces } = supportedSignals || {};
294
- handleFormChange('exportedSignals', {
295
- logs: logs?.supported || false,
296
- metrics: metrics?.supported || false,
297
- traces: traces?.supported || false,
298
- });
299
- }, [supportedSignals]);
300
- const validateForm = (params) => {
301
- const errors = {};
302
- let ok = true;
303
- dynamicFields.forEach(({ name, value, required }) => {
304
- if (required && !value) {
305
- ok = false;
306
- errors[name] = FORM_ALERTS.FIELD_IS_REQUIRED;
307
- }
308
- });
309
- if (!ok && params?.withAlert) {
310
- addNotification({
311
- type: STATUS_TYPE.WARNING,
312
- title: params.alertTitle,
313
- message: FORM_ALERTS.REQUIRED_FIELDS,
314
- hideFromHistory: true,
315
- });
316
- }
317
- handleErrorChange(undefined, undefined, errors);
318
- return ok;
319
- };
320
- const loadFormWithDrawerItem = ({ destinationType: { type }, name, exportedSignals, fields }) => {
321
- const updatedData = {
322
- ...INITIAL$1,
323
- type,
324
- name,
325
- exportedSignals,
326
- fields: Object.entries(safeJsonParse(fields, {})).map(([key, value]) => ({ key, value })),
327
- };
328
- handleFormChange(undefined, undefined, updatedData);
329
- };
330
- return {
331
- formData,
332
- formErrors,
333
- handleFormChange,
334
- resetFormData,
335
- validateForm,
336
- loadFormWithDrawerItem,
337
- yamlFields,
338
- setYamlFields,
339
- dynamicFields,
340
- setDynamicFields,
341
- };
342
- };
343
-
344
- const INITIAL = {
345
- otelServiceName: '',
346
- };
347
- const useSourceFormData = () => {
348
- const { addNotification } = useNotificationStore();
349
- const { formData, formErrors, handleFormChange, handleErrorChange, resetFormData } = useGenericForm(INITIAL);
350
- const validateForm = (params) => {
351
- const errors = {};
352
- let ok = true;
353
- handleErrorChange(undefined, undefined, errors);
354
- return ok;
355
- };
356
- const loadFormWithDrawerItem = ({ otelServiceName, name }) => {
357
- const updatedData = {
358
- ...INITIAL,
359
- otelServiceName: otelServiceName || name || '',
360
- };
361
- handleFormChange(undefined, undefined, updatedData);
362
- };
363
- return {
364
- formData,
365
- formErrors,
366
- handleFormChange,
367
- resetFormData,
368
- validateForm,
369
- loadFormWithDrawerItem,
370
- };
371
- };
372
-
373
- const useSourceSelectionFormData = (params) => {
374
- const { namespaces, namespace, selectedNamespace, onSelectNamespace } = params || {};
375
- // only for "onboarding" - get unsaved values and set to state
376
- // (this is to persist the values when user navigates back to this page)
377
- const { configuredSources, configuredFutureApps, availableSources } = useSetupStore();
378
- // Keeps intial values fetched from API, so we can later filter the user-specific-selections, therebey minimizing the amount of data sent to the API on "persist sources".
379
- const [recordedInitialSources, setRecordedInitialSources] = useState(availableSources);
380
- const [selectAllForNamespace, setSelectAllForNamespace] = useState('');
381
- const [selectedSources, setSelectedSources] = useState(configuredSources);
382
- const [selectedFutureApps, setSelectedFutureApps] = useState(configuredFutureApps);
383
- useEffect(() => {
384
- if (!!namespaces?.length) {
385
- // initialize all states (to avoid undefined errors)
386
- setRecordedInitialSources((prev) => {
387
- const payload = { ...prev };
388
- namespaces.forEach(({ name }) => (payload[name] = payload[name] || []));
389
- return payload;
390
- });
391
- setSelectedSources((prev) => {
392
- const payload = { ...prev };
393
- namespaces.forEach(({ name }) => (payload[name] = payload[name] || []));
394
- return payload;
395
- });
396
- setSelectedFutureApps((prev) => {
397
- const payload = { ...prev };
398
- namespaces.forEach(({ name, selected }) => (payload[name] = payload[name] || selected || false));
399
- return payload;
400
- });
401
- }
402
- }, [namespaces]);
403
- useEffect(() => {
404
- if (!!namespace) {
405
- // initialize sources for this namespace
406
- const { name, sources = [] } = namespace;
407
- setRecordedInitialSources((prev) => ({
408
- ...prev,
409
- [name]: sources.map(({ name, kind, selected, numberOfInstances }) => ({
410
- name,
411
- kind,
412
- selected,
413
- numberOfInstances,
414
- })),
415
- }));
416
- setSelectedSources((prev) => ({
417
- ...prev,
418
- [name]: !!prev[name].length
419
- ? prev[name]
420
- : sources.map(({ name, kind, selected, numberOfInstances }) => ({
421
- name,
422
- kind,
423
- selected,
424
- numberOfInstances,
425
- })),
426
- }));
427
- }
428
- }, [namespace]);
429
- // form filters
430
- const [searchText, setSearchText] = useState('');
431
- const [showSelectedOnly, setShowSelectedOnly] = useState(false);
432
- const onSelectAll = useCallback((selected, ns, selectionsByNamespace) => {
433
- // When clicking "select all" on a single namespace
434
- if (!!ns) {
435
- if (!selectionsByNamespace) {
436
- // If the sources are not loaded yet, call the onSelectNamespace to load the sources
437
- onSelectNamespace?.(selected ? ns : '');
438
- // Set the state, so the interval would be able to use the namespace
439
- setSelectAllForNamespace(selected ? ns : '');
440
- }
441
- else if (!!selectionsByNamespace?.[ns]?.length) {
442
- // Clear the state, so the interval would stop
443
- setSelectAllForNamespace('');
444
- }
445
- // Set the selected sources
446
- setSelectedSources((prev) => ({
447
- ...prev,
448
- [ns]: selectionsByNamespace?.[ns]?.map((source) => ({
449
- ...source,
450
- selected,
451
- })) || [],
452
- }));
453
- // setSelectedFutureApps((prev) => ({
454
- // ...prev,
455
- // [ns]: !!selectionsByNamespace?.[ns]?.length ? selected : false,
456
- // }))
457
- }
458
- // When clicking "select all" on all namespaces
459
- else {
460
- setSelectedSources((prev) => {
461
- const payload = { ...prev };
462
- Object.entries(payload).forEach(([key, sources]) => {
463
- payload[key] = sources.map((source) => ({ ...source, selected }));
464
- });
465
- return payload;
466
- });
467
- }
468
- }, [selectedSources]);
469
- // This is to keep trying "select all" per namespace, until the sources are loaded (allows for 1-click, better UX).
470
- useEffect(() => {
471
- if (!!selectAllForNamespace) {
472
- const interval = setInterval(() => onSelectAll(true, selectAllForNamespace, selectedSources), 100);
473
- return () => clearInterval(interval);
474
- }
475
- }, [selectAllForNamespace, onSelectAll]);
476
- const onSelectSource = (source, namespace) => {
477
- const id = namespace || selectedNamespace;
478
- if (!id)
479
- return;
480
- const arr = [...(selectedSources[id] || [])];
481
- const foundIdx = arr.findIndex(({ name, kind }) => name === source.name && kind === source.kind);
482
- if (foundIdx !== -1) {
483
- // Replace the item with a new object to avoid mutating a possibly read-only object
484
- const updatedItem = { ...arr[foundIdx], selected: !arr[foundIdx].selected };
485
- arr[foundIdx] = updatedItem;
486
- }
487
- else {
488
- arr.push({ ...source, selected: true });
489
- }
490
- setSelectedSources((prev) => ({ ...prev, [id]: arr }));
491
- };
492
- const onSelectFutureApps = (bool, namespace) => {
493
- const id = namespace || selectedNamespace;
494
- if (!id)
495
- return;
496
- setSelectedFutureApps((prev) => ({ ...prev, [id]: bool }));
497
- };
498
- const filterNamespaces = (options) => {
499
- const { cancelSearch } = options || {};
500
- const namespaces = Object.entries(selectedSources);
501
- const isSearchOk = (targetText) => cancelSearch || !searchText || targetText.toLowerCase().includes(searchText);
502
- return namespaces.filter(([namespace]) => isSearchOk(namespace));
503
- };
504
- const filterSources = (namespace, options) => {
505
- const { cancelSearch, cancelSelected } = options || {};
506
- const id = namespace || selectedNamespace;
507
- if (!id)
508
- return [];
509
- const isSearchOk = (targetText) => cancelSearch || !searchText || targetText.toLowerCase().includes(searchText);
510
- const isOnlySelectedOk = (sources, compareKey, target) => cancelSelected || !showSelectedOnly || !!sources.find((item) => item[compareKey] === target && item.selected);
511
- return selectedSources[id].filter((source) => isSearchOk(source.name) && isOnlySelectedOk(selectedSources[id], 'name', source.name));
512
- };
513
- // This is to filter the user-specific-selections, therebey minimizing the amount of data sent to the API on "persist sources".
514
- const getApiSourcesPayload = () => {
515
- const payload = {};
516
- Object.entries(selectedSources).forEach(([namespace, sources]) => {
517
- sources.forEach((source) => {
518
- const foundInitial = recordedInitialSources[namespace]?.find((initialSource) => initialSource.name === source.name && initialSource.kind === source.kind);
519
- if (foundInitial?.selected !== source.selected) {
520
- if (!payload[namespace])
521
- payload[namespace] = [];
522
- payload[namespace].push({
523
- name: source.name,
524
- kind: source.kind,
525
- selected: source.selected,
526
- });
527
- }
528
- });
529
- });
530
- return payload;
531
- };
532
- // This is to filter the user-specific-selections, therebey minimizing the amount of data sent to the API on "persist namespaces".
533
- const getApiFutureAppsPayload = () => {
534
- const payload = {};
535
- Object.entries(selectedFutureApps).forEach(([namespace, selected]) => {
536
- const foundInitial = namespaces?.find((ns) => ns.name === namespace);
537
- if (foundInitial?.selected !== selected) {
538
- payload[namespace] = selected;
539
- }
540
- });
541
- return payload;
542
- };
543
- return {
544
- recordedInitialSources,
545
- filterNamespaces,
546
- filterSources,
547
- getApiSourcesPayload,
548
- getApiFutureAppsPayload,
549
- selectedSources,
550
- onSelectSource,
551
- selectedFutureApps,
552
- onSelectFutureApps,
553
- onSelectAll,
554
- searchText,
555
- setSearchText,
556
- showSelectedOnly,
557
- setShowSelectedOnly,
558
- };
559
- };
560
-
561
- export { useClickNode as a, useClickNotification as b, useDestinationFormData as c, useSourceFormData as d, useSourceSelectionFormData as e, useActionFormData as u };