@odigos/ui-kit 0.0.224 → 0.0.225

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 (90) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/DEVELOPMENT.md +27 -0
  3. package/Makefile +7 -0
  4. package/lib/chunks/index-BMJ_MZzY.js +149 -0
  5. package/lib/chunks/{index-Au62BabI.js → index-Dlnglk_e.js} +1 -1
  6. package/lib/chunks/ui-components-BqdkaDt2.js +2543 -0
  7. package/lib/components/_v2/autocomplete/index.d.ts +13 -3
  8. package/lib/components/_v2/drawer/header/index.d.ts +2 -0
  9. package/lib/components/_v2/drop-data/index.d.ts +1 -0
  10. package/lib/components/_v2/index.d.ts +1 -0
  11. package/lib/components/_v2/time-input/index.d.ts +24 -0
  12. package/lib/components/v2.js +1 -1
  13. package/lib/components.js +1 -1
  14. package/lib/constants/sampling/index.d.ts +9 -4
  15. package/lib/constants/sources/index.d.ts +1 -0
  16. package/lib/constants.js +1 -1
  17. package/lib/containers/_v2/_drawers/index.d.ts +1 -5
  18. package/lib/containers/_v2/_drawers/sampling-rule-drawer/index.d.ts +50 -0
  19. package/lib/containers/_v2/_forms/index.d.ts +1 -5
  20. package/lib/containers/_v2/_forms/sampling-rule-form/index.d.ts +2 -0
  21. package/lib/containers/_v2/sampling-rules/converters.d.ts +9 -0
  22. package/lib/containers/_v2/sampling-rules/helpers.d.ts +2 -2
  23. package/lib/containers/_v2/sampling-rules/rules-table/index.d.ts +1 -1
  24. package/lib/containers/_v2/sampling-rules/toolbar/index.d.ts +1 -1
  25. package/lib/containers/_v2/sampling-rules/types.d.ts +1 -42
  26. package/lib/containers/source-drawer/profiling/index.d.ts +1 -1
  27. package/lib/containers/v2.js +51 -188
  28. package/lib/containers.js +47 -47
  29. package/lib/contexts/index.d.ts +1 -0
  30. package/lib/contexts/sampling-rules-form-context.d.ts +90 -0
  31. package/lib/contexts.js +1 -1
  32. package/lib/functions.js +1 -1
  33. package/lib/hooks/useScrollTo.d.ts +1 -0
  34. package/lib/hooks.js +1 -1
  35. package/lib/snippets/_v2/colored-span/index.d.ts +1 -0
  36. package/lib/snippets/_v2/dynamic-field/index.d.ts +3 -1
  37. package/lib/snippets/_v2/index.d.ts +1 -0
  38. package/lib/snippets/_v2/sampling-rule-form-sections/duration-errors.d.ts +13 -0
  39. package/lib/snippets/_v2/sampling-rule-form-sections/index.d.ts +7 -0
  40. package/lib/snippets/_v2/sampling-rule-form-sections/operation.d.ts +12 -0
  41. package/lib/snippets/_v2/sampling-rule-form-sections/percentage.d.ts +12 -0
  42. package/lib/snippets/_v2/sampling-rule-form-sections/preset-with-custom-input.d.ts +29 -0
  43. package/lib/snippets/_v2/sampling-rule-form-sections/rule-info.d.ts +12 -0
  44. package/lib/snippets/_v2/sampling-rule-form-sections/sampling-preview.d.ts +12 -0
  45. package/lib/{containers/_v2/_forms/create-sampling-rule-form/sections → snippets/_v2/sampling-rule-form-sections}/source-scope.d.ts +8 -4
  46. package/lib/snippets/_v2/sampling-rule-form-sections/styled.d.ts +2 -0
  47. package/lib/snippets/v2.js +1 -53
  48. package/lib/snippets.js +1 -1
  49. package/lib/store.js +1 -1
  50. package/lib/theme.js +1 -1
  51. package/lib/types/common/index.d.ts +2 -1
  52. package/lib/types/enum/index.d.ts +1 -0
  53. package/lib/types/sampling.d.ts +77 -0
  54. package/lib/types/sources/index.d.ts +18 -6
  55. package/lib/types.js +1 -1
  56. package/lib/visuals.js +1 -1
  57. package/package.json +1 -1
  58. package/lib/chunks/ui-components-CI2PiWkX.js +0 -2516
  59. package/lib/containers/_v2/_drawers/create-sampling-rule-drawer/index.d.ts +0 -20
  60. package/lib/containers/_v2/_drawers/edit-auto-rule-drawer/index.d.ts +0 -9
  61. package/lib/containers/_v2/_drawers/edit-cost-reduction-auto-rule-drawer/index.d.ts +0 -9
  62. package/lib/containers/_v2/_drawers/edit-highly-relevant-auto-rule-drawer/index.d.ts +0 -8
  63. package/lib/containers/_v2/_drawers/view-sampling-rule-drawer/index.d.ts +0 -21
  64. package/lib/containers/_v2/_forms/create-sampling-rule-form/context.d.ts +0 -34
  65. package/lib/containers/_v2/_forms/create-sampling-rule-form/converters.d.ts +0 -5
  66. package/lib/containers/_v2/_forms/create-sampling-rule-form/form-helpers.d.ts +0 -5
  67. package/lib/containers/_v2/_forms/create-sampling-rule-form/index.d.ts +0 -3
  68. package/lib/containers/_v2/_forms/create-sampling-rule-form/sections/duration-errors.d.ts +0 -9
  69. package/lib/containers/_v2/_forms/create-sampling-rule-form/sections/operation.d.ts +0 -9
  70. package/lib/containers/_v2/_forms/create-sampling-rule-form/sections/percentage.d.ts +0 -9
  71. package/lib/containers/_v2/_forms/create-sampling-rule-form/sections/rule-info.d.ts +0 -9
  72. package/lib/containers/_v2/_forms/create-sampling-rule-form/sections/sampling-preview.d.ts +0 -9
  73. package/lib/containers/_v2/_forms/create-sampling-rule-form/styled.d.ts +0 -5
  74. package/lib/containers/_v2/_forms/create-sampling-rule-form/types.d.ts +0 -54
  75. package/lib/containers/_v2/_forms/edit-auto-rule-form/context.d.ts +0 -21
  76. package/lib/containers/_v2/_forms/edit-auto-rule-form/index.d.ts +0 -3
  77. package/lib/containers/_v2/_forms/edit-cost-reduction-auto-rule-form/context.d.ts +0 -21
  78. package/lib/containers/_v2/_forms/edit-cost-reduction-auto-rule-form/index.d.ts +0 -3
  79. package/lib/containers/_v2/_forms/edit-highly-relevant-auto-rule-form/context.d.ts +0 -14
  80. package/lib/containers/_v2/_forms/edit-highly-relevant-auto-rule-form/index.d.ts +0 -3
  81. package/lib/containers/_v2/_forms/view-sampling-rule-form/context.d.ts +0 -37
  82. package/lib/containers/_v2/_forms/view-sampling-rule-form/index.d.ts +0 -3
  83. package/lib/containers/_v2/_forms/view-sampling-rule-form/reverse-converters.d.ts +0 -3
  84. package/lib/containers/_v2/_forms/view-sampling-rule-form/sections/duration-errors.d.ts +0 -6
  85. package/lib/containers/_v2/_forms/view-sampling-rule-form/sections/operation-details.d.ts +0 -6
  86. package/lib/containers/_v2/_forms/view-sampling-rule-form/sections/percentage.d.ts +0 -6
  87. package/lib/containers/_v2/_forms/view-sampling-rule-form/sections/rule-info.d.ts +0 -6
  88. package/lib/containers/_v2/_forms/view-sampling-rule-form/sections/sampling-preview.d.ts +0 -6
  89. package/lib/containers/_v2/_forms/view-sampling-rule-form/sections/source-scopes.d.ts +0 -6
  90. /package/lib/containers/_v2/{_forms/view-sampling-rule-form/footer.d.ts → _drawers/sampling-rule-drawer/view-footer.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.225](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.224...ui-kit-v0.0.225) (2026-04-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * add Node.js support to payload collection rule ([#821](https://github.com/odigos-io/ui-kit/issues/821)) ([f18cdca](https://github.com/odigos-io/ui-kit/commit/f18cdca1ba946bb0e6ac732cfc56a7937d19212d))
9
+ * **CORE-680:** Add OBI distro options ([#748](https://github.com/odigos-io/ui-kit/issues/748)) ([c67cf03](https://github.com/odigos-io/ui-kit/commit/c67cf0358107a105db8d61d313935ca83eb6f621))
10
+ * **Namespace & Workload Columns:** enhance no-data states with improved messaging and icons ([#819](https://github.com/odigos-io/ui-kit/issues/819)) ([885216a](https://github.com/odigos-io/ui-kit/commit/885216ab02d981920fbdcfa876ee6b7291b32e23))
11
+ * **Settings:** add TimeInput component and integrate into DynamicField ([#822](https://github.com/odigos-io/ui-kit/issues/822)) ([856d622](https://github.com/odigos-io/ui-kit/commit/856d6226b6a698ca421246cc9bc172fb2b43e66b))
12
+ * **Settings:** implement scrollable sections and enhance useScrollTo hook for nested scrolling ([#823](https://github.com/odigos-io/ui-kit/issues/823)) ([1f04f0f](https://github.com/odigos-io/ui-kit/commit/1f04f0f9b12c8cc84ece9c6534a10077879f50d6))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **Sampling:** figma updates ([#816](https://github.com/odigos-io/ui-kit/issues/816)) ([68f47b1](https://github.com/odigos-io/ui-kit/commit/68f47b10026465e2ddeeecf832955ded7fa33afe))
18
+ * source overriden status ([#818](https://github.com/odigos-io/ui-kit/issues/818)) ([4423fd0](https://github.com/odigos-io/ui-kit/commit/4423fd0ec5e44d15491b147770a7c016167a90a8))
19
+
3
20
  ## [0.0.224](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.223...ui-kit-v0.0.224) (2026-04-26)
4
21
 
5
22
 
package/DEVELOPMENT.md ADDED
@@ -0,0 +1,27 @@
1
+ # Development
2
+
3
+ ## Publishing local changes
4
+
5
+ To test locally, make changes first in this repo.
6
+
7
+ Run `npm install -g yalc` to install yalc and manage the local dependency of this repo.
8
+
9
+ Use `make docker-build` to run `yarn build` in a container.
10
+
11
+ Run `yalc publish` to publish your changes locally.
12
+
13
+ *In your consumer (eg, odigos-io/odigos):*
14
+
15
+ Run `yalc add @odigos/ui-kit && yarn install`.
16
+
17
+ Run `yarn build`
18
+
19
+ ## Updating local changes
20
+
21
+ In this repo, make your changes, run `make docker-build` and `yalc push`.
22
+
23
+ In your consumer, run `yalc update && yarn install && yarn build`.
24
+
25
+ Then, in Odigos, you can run `yarn back:build` and `yarn back:start`.
26
+
27
+ It may help to delete `.next`, `.yarn`, and `node_modules` in your consumer, then re-add `yalc` and continue with `install/build`.
package/Makefile ADDED
@@ -0,0 +1,7 @@
1
+ .PHONY: docker-build
2
+ docker-build:
3
+ docker run --rm -it \
4
+ -v "$(CURDIR)":/app \
5
+ -w /app \
6
+ node:25 \
7
+ bash -lc "yarn install && yarn build"
@@ -0,0 +1,149 @@
1
+ import{bQ as e,r as a,n as l,o as t,d$ as r,d as s,av as o,y as i,m as n,M as d,p as c,I as p,k as u,a3 as h,a9 as g,c as m,F as v,i as f,x as b,aw as y,S as x,e0 as S,e1 as w,aA as C,e2 as k,T,e3 as $,e as L,e4 as P,e5 as M,e6 as A,e7 as O,e8 as N,e9 as z,ea as D,eb as R,ec as X,ed as I,ee as E,ef as H,eg as K,b3 as V,a as j,B as q,eh as U,ei as G,ej as J,ek as B,el as F,em as W,en as Q,eo as Z,ep as Y,aj as _,af as ee,eq as ae,er as le,am as te,ai as re,es as se,et as oe,eu as ie,ev as ne,aM as de,ew as ce,ex as pe,ey as ue,ez as he,eA as ge,eB as me,eC as ve,eD as fe,bo as be,q as ye,eE as xe,eF as Se,eG as we,eH as Ce,eI as ke,eJ as Te,eK as $e,eL as Le,eM as Pe,eN as Me,P as Ae,eO as Oe,Q as Ne,eP as ze,eQ as De,eR as Re,eS as Xe,eT as Ie,dE as Ee,a2 as He,v as Ke,d9 as Ve,j as je,eU as qe,cT as Ue,b as Ge,N as Je,aW as Be,as as Fe,bi as We,dF as Qe}from"./ui-components-BqdkaDt2.js";import{jsx as Ze,jsxs as Ye,Fragment as _e}from"react/jsx-runtime";import{OdigosLogoTextEnterprise as ea,OdigosLogoTextCommunity as aa,EditIcon as la,ArrowLeftIcon as ta,ArrowRightIcon as ra,VSquareIcon as sa}from"../icons.js";import{useCallback as oa,useMemo as ia,useState as na,useRef as da,useEffect as ca,forwardRef as pa,useImperativeHandle as ua}from"react";import ha,{useTheme as ga}from"styled-components";import"./index-Dlnglk_e.js";const ma=({isOpen:a,onClose:l,onDeny:t,onApprove:r})=>Ze(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:l,onDeny:t,denyLabel:"Keep editing",onApprove:r,approveLabel:"Discard changes"}),va=({isOpen:a,onClose:l,onDeny:t,onApprove:r,action:s="delete",target:o})=>{const i=s.charAt(0).toUpperCase()+s.substring(1),n=o?.endsWith("s")?"these":"this";return Ze(e,{title:`${i}${o?` ${o}`:""}?`,description:`Are you sure you want to ${s}${o?` ${n} ${o}`:""}?`,isOpen:a,onClose:l,onDeny:t,denyLabel:"Go back",onApprove:r,approveLabel:i})},fa=({componentType:e,inputType:h,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S,setValue:w,errorMessage:C,warnMessage:k,helpMessage:T,dropdownOptions:$,dropdownNoSearch:L,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:A})=>{switch(e){case a.Input:return Ze(p,{name:g,type:h,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",onChange:e=>{const a=e.target.value;w(h===u.Number?""===a?null:Number(a):a)},errorMessage:C,warnMessage:k,helpMessage:T},g);case a.MultiInput:return Ze(c,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.KeyValuePair:return Ze(n,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key"},{keyName:"value",label:"Value"}],values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.TextArea:return Ze(i,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:S??"",onChange:e=>w(e.target.value),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Dropdown:return Ze(o,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!L,options:$?.map(e=>({id:e.id||"",label:e.value||"",withCheckbox:!P}))||[],values:S?[String(S)]:[],setValues:e=>w(e[0]),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Checkbox:return Ze(s,{name:g,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(e),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Time:return Ze(r,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",setValue:e=>w(e),units:M,defaultUnit:A,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Toggle:return Ze(l,{name:g,labelAlign:t.Right,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(e),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);default:return null}},ba=({size:e=200})=>{const{tier:a}=h();return a===g.Onprem?Ze(ea,{size:e}):Ze(aa,{size:e})},ya=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],xa=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],Sa=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],wa=({description:e,options:a,selected:l,onSelect:t,customName:r,customLabel:s,customPlaceholder:o,customValue:i,onCustomChange:n})=>Ye(m,{$gap:16,$alignItems:"flex-end",children:[Ye(v,{$gap:6,children:[Ze(f,{label:e}),Ze(b,{size:y.S,options:a,selected:l,setSelected:t})]}),"custom"===l&&Ze(p,{name:r,label:s,placeholder:o,type:u.Number,value:i,onChange:n,width:160})]}),Ca=()=>{},ka=e=>e.readOnly?Ze(Ta,{rule:e.rule}):Ze($a,{ruleType:e.ruleType,formState:e.formState,onChange:e.onChange}),Ta=({rule:e})=>{const a=ga(),r=null!=e.durationAtLeastMs;return e.error?Ze(x,{richTitle:{title:S},children:Ze(l,{name:"sampling-view-toggle-keep-errors",onChange:Ca,value:!0,size:C.S,label:w,labelAlign:t.Right})}):r?Ze(x,{richTitle:{title:k},children:Ye("div",{children:[Ze(T,{size:L.XXXS,color:a.v2.colors.silver[200],children:$}),Ze(T,{size:L.XS,children:`${e.durationAtLeastMs}ms`})]})}):null},$a=({ruleType:e,formState:a,onChange:r})=>{const s=oa(e=>r({durationPreset:e}),[r]),o=oa(e=>r({customDurationMs:e.target.value}),[r]);return"Error"===e?Ze(x,{richTitle:{title:S,subTitle:P},children:Ze(l,{name:"sampling-toggle-keep-errors",value:!0,onChange:Ca,size:C.S,label:w,labelAlign:t.Right})}):"Duration"===e?Ze(x,{richTitle:{title:k,subTitle:M},children:Ze(wa,{description:$,options:Sa,selected:a.durationPreset,onSelect:s,customName:"sampling-input-custom-duration",customLabel:A,customPlaceholder:"200ms",customValue:a.customDurationMs,onCustomChange:o})}):null},La=ha.div`
2
+ display: flex;
3
+ gap: 32px;
4
+ `,Pa=ha.div`
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 4px;
8
+ `,Ma=ha.div`
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ align-items: flex-end;
12
+ gap: 16px;
13
+ `,Aa=ha.div`
14
+ display: flex;
15
+ align-items: flex-end;
16
+ gap: 16px;
17
+ padding: 12px 16px;
18
+ border-radius: 8px;
19
+ background-color: ${({theme:e})=>e.v2.colors.black[500]};
20
+ `,Oa=ha.div`
21
+ display: flex;
22
+ align-items: flex-end;
23
+ gap: 10px;
24
+ flex: 1;
25
+ `,Na=ha.div`
26
+ display: flex;
27
+ align-items: center;
28
+ height: 32px;
29
+ `,za=ha.div`
30
+ display: flex;
31
+ align-items: flex-end;
32
+ gap: 16px;
33
+ margin-bottom: 12px;
34
+ `,Da="Any",Ra="Kafka topic",Xa=()=>Ze("div",{style:{marginBottom:"8px"},children:Ze(T,{size:L.XS,weight:500,children:"And"})}),Ia=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],Ea=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Ha=[{id:"",label:Da},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}];const Ka=e=>e.readOnly?Ze(Va,{data:e.data}):Ze(ja,{category:e.category,formState:e.formState,onChange:e.onChange}),Va=({data:e})=>{const a=ga(),l=ia(()=>function(e){if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:B,value:J},{id:"route",title:E,value:a.httpServer.route||a.httpServer.routePrefix||F},{id:"method",title:U,value:a.httpServer.method||Da}];if(a?.httpClient){const e=[{id:"type",title:B,value:W}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:E,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||F}),e.push({id:"method",title:U,value:a.httpClient.method||Da}),e}return[{id:"type",title:B,value:Q}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:B,value:J},{id:"route",title:E,value:a.httpServer.route||a.httpServer.routePrefix||F},{id:"method",title:U,value:a.httpServer.method||Da}]:a?.kafkaConsumer?[{id:"type",title:B,value:Z},{id:"topic",title:Ra,value:a.kafkaConsumer.kafkaTopic||F}]:a?.kafkaProducer?[{id:"type",title:B,value:Y},{id:"topic",title:Ra,value:a.kafkaProducer.kafkaTopic||F}]:[{id:"type",title:B,value:Q}]}(e),[e]);return Ze(x,{richTitle:{title:O},children:Ze(La,{children:l.map(({id:e,title:l,value:t})=>Ye(Pa,{children:[Ze(T,{size:L.XXXS,color:a.v2.colors.silver[200],nowrap:!0,children:l}),Ze(T,{size:L.XS,nowrap:!0,children:t})]},e))})})},ja=({category:e,formState:a,onChange:l})=>{const t=ia(()=>"noisy"===e?Ia:Ea,[e]),r=oa(e=>l({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[l]),s=oa(e=>a=>{a&&l({routeType:e,route:""})},[l]),o=oa(e=>l({route:e.target.value}),[l]),i=oa(e=>l({serverAddress:e.target.value}),[l]),n=oa(e=>l({method:e[0]||""}),[l]),d=oa(e=>l({kafkaTopic:e.target.value}),[l]),c="httpServer"===a.operationType||"httpClient"===a.operationType,u="kafkaConsumer"===a.operationType||"kafkaProducer"===a.operationType,h="httpClient"===a.operationType?I:E,g="httpClient"===a.operationType?H:K;return Ye(x,{richTitle:{title:`2. ${O}`,subTitle:N},children:[Ze(v,{$alignItems:"flex-start",children:Ze(b,{size:y.S,options:t,selected:a.operationType,setSelected:r})}),c&&Ye(Ma,{children:["httpClient"===a.operationType&&Ye(za,{children:[Ze(p,{name:"sampling-input-server-address",label:D,placeholder:z,value:a.serverAddress,onChange:i}),Ze(Xa,{})]}),Ye(Aa,{children:[Ye(Oa,{children:[Ze(Na,{children:Ze(R,{"data-id":"sampling-radio-route",value:"route"===a.routeType,onChange:s("route")})}),Ze(p,{name:"sampling-input-route",label:h,placeholder:X,value:"route"===a.routeType?a.route:"",onChange:o,disabled:"route"!==a.routeType})]}),Ye(Oa,{children:[Ze(Na,{children:Ze(R,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===a.routeType,onChange:s("routePrefix")})}),Ze(p,{name:"sampling-input-route-prefix",label:g,placeholder:X,value:"routePrefix"===a.routeType?a.route:"",onChange:o,disabled:"routePrefix"!==a.routeType})]})]}),Ye(za,{children:[Ze(Xa,{}),Ze(V,{label:U,items:Ha,selectedIds:[a.method||""],setSelectedIds:e=>n(e),buttonProps:{"data-id":"sampling-btn-method",label:Ha.find(e=>e.id===a.method)?.label||Da,size:q.S,variant:j.Secondary}})]})]}),u&&Ze(p,{name:"sampling-input-kafka-topic",label:G,placeholder:"Type kafka topic",value:a.kafkaTopic,onChange:d,width:"320px"})]})},qa=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Ua=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}];const Ga=e=>e.readOnly?Ze(Ja,{data:e.data}):Ze(Ba,{category:e.category,formState:e.formState,onChange:e.onChange}),Ja=({data:e})=>{const a=ga(),l=ia(()=>function(e){switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:ae,method:oe,description:re,value:`${e.rule.percentageAtLeast}%`}:{title:ae,method:ne,description:null,value:null};case"noisy":return null!=e.rule.percentageAtMost?{title:le,method:oe,description:se,value:`${e.rule.percentageAtMost}%`}:{title:le,method:ie,description:null,value:null};case"costReduction":return{title:le,method:oe,description:se,value:`${e.rule.percentageAtMost}%`}}}(e),[e]),t=[{id:"method",title:U,value:l.method},...null!=l.description?[{id:"value",title:l.description,value:l.value}]:[]];return Ze(x,{richTitle:{title:l.title},children:Ze(La,{children:t.map(({id:e,title:l,value:t})=>Ye(Pa,{children:[Ze(T,{size:L.XXXS,color:a.v2.colors.silver[200],nowrap:!0,children:l}),Ze(T,{size:L.XS,nowrap:!0,children:t})]},e))})})},Ba=({category:e,formState:a,onChange:l})=>{const t="highlyRelevant"===e,r=t?Ua:qa,s=`3. ${t?ae:le}`,o=t?_:ee,i=t?re:se,n="noisy"===e?xa:ya,d=oa(e=>l({percentageMode:e}),[l]),c=oa(e=>l({percentagePreset:e}),[l]),p=oa(e=>l({customPercentage:e.target.value}),[l]);return Ye(x,{richTitle:{title:s,subTitle:o},children:["costReduction"!==e&&Ze(v,{$alignItems:"flex-start",children:Ze(b,{size:y.S,options:r,selected:a.percentageMode,setSelected:d})}),("costReduction"===e||"sample"===a.percentageMode)&&Ze(wa,{description:i,options:n,selected:a.percentagePreset,onSelect:c,customName:"sampling-input-custom-percentage",customLabel:te,customPlaceholder:"5%",customValue:a.customPercentage,onCustomChange:p})]})},Fa=ha.div`
35
+ display: flex;
36
+ align-items: flex-end;
37
+ gap: 16px;
38
+ `,Wa=ha.div`
39
+ width: 280px;
40
+ flex-shrink: 0;
41
+ `,Qa=ha.div`
42
+ display: flex;
43
+ flex-direction: column;
44
+ gap: 4px;
45
+ `,Za=ha.div`
46
+ flex: 1;
47
+ min-width: 0;
48
+ `,Ya=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}];function _a(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":ve[e.category]}const el=e=>e.readOnly?Ze(al,{data:e.data}):Ze(ll,{category:e.category,formState:e.formState,onChange:e.onChange}),al=({data:e})=>{const a=ga(),l=ia(()=>[{id:"name",title:ce,value:e.rule.name||de},{id:"type",title:pe,value:_a(e)}],[e]),t=e.rule.notes||F;return Ye(x,{children:[Ze(La,{children:l.map(({id:e,title:l,value:t})=>Ye(Pa,{children:[Ze(T,{size:L.XXXS,color:a.v2.colors.silver[200],nowrap:!0,children:l}),Ze(T,{size:L.XS,nowrap:!0,children:t})]},e))}),Ye(Pa,{children:[Ze(T,{size:L.XXXS,color:a.v2.colors.silver[200],children:ue}),Ze(T,{size:L.XS,children:t})]})]})},ll=({category:e,formState:a,onChange:l})=>{const t=oa(e=>l({name:e.target.value}),[l]),r=oa(e=>l({notes:e.target.value}),[l]),s=oa(e=>{l({ruleType:e,keepErrors:"Error"===e})},[l]);return Ze(x,{children:Ye(Fa,{children:[Ze(Wa,{children:Ze(p,{name:"sampling-input-rule-name",label:ce,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:he,value:a.name,onChange:t})}),"highlyRelevant"===e&&Ye(Qa,{children:[Ze(f,{label:pe}),Ze(b,{size:y.S,options:Ya,selected:a.ruleType,setSelected:s})]}),Ze(Za,{children:Ze(p,{name:"sampling-input-note",label:ue,tooltip:me,placeholder:ge,value:a.notes,onChange:r})})]})})},tl=ha.div`
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 24px;
52
+ padding: 8px 16px;
53
+ border-radius: 12px;
54
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
55
+ `,rl=ha.div`
56
+ flex: 1;
57
+ min-width: 0;
58
+ white-space: pre;
59
+ overflow-x: auto;
60
+ `,sl=({title:e,summary:a,onEdit:l,renderAction:t})=>{const r=ia(()=>{const l=[];return e&&(l.push({text:e,variant:fe.Default}),l.push({text:" - ",variant:fe.Default})),l.push(...a),l},[e,a]);return Ye(tl,{children:[Ze(rl,{children:Ze(be,{parts:r})}),t&&t(),l&&Ze(ye,{"data-id":"sampling-btn-edit-auto-rule",label:xe,rightIcon:la,variant:j.Text,size:q.S,onClick:l})]})},ol=e=>{const a=ia(()=>{if(e.readOnly)return e.summary;switch(e.category){case"noisy":return Te($e(e.formState));case"highlyRelevant":return Ce(ke(e.formState));case"costReduction":return Se(we(e.formState))}},[e]);if(e.readOnly)return Ze(sl,{title:Le,summary:a});const l=1===a.length&&"default"===a[0].variant;return Ze(sl,{title:l?Pe:Le,summary:l?[]:a})},il=ha.div`
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ gap: 8px;
64
+ `,nl=ha.div`
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 8px;
68
+ padding: 8px 12px;
69
+ border-radius: 8px;
70
+ cursor: pointer;
71
+ background: ${({theme:e,$selected:a})=>a?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
72
+ border: 1px solid ${({theme:e,$selected:a})=>a?e.v2.colors.silver[500]:e.v2.colors.silver[800]};
73
+
74
+ &:hover {
75
+ background: ${({theme:e})=>e.v2.colors.silver[700]};
76
+ }
77
+ `,dl=ha.div`
78
+ display: flex;
79
+ width: 32px;
80
+ height: 32px;
81
+ justify-content: center;
82
+ align-items: center;
83
+ flex-shrink: 0;
84
+ `,cl=ha.div`
85
+ display: flex;
86
+ flex-direction: column;
87
+ gap: 4px;
88
+ `,pl=ha.div`
89
+ display: flex;
90
+ align-items: center;
91
+ gap: 8px;
92
+ padding: 8px;
93
+ border-radius: 8px;
94
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
95
+ `,ul=ha.div`
96
+ display: flex;
97
+ width: 24px;
98
+ height: 24px;
99
+ justify-content: center;
100
+ align-items: center;
101
+ flex-shrink: 0;
102
+ `,hl={[Ee.JavaScript]:"Node.js",[Ee.DotNet]:".NET",[Ee.Php]:"PHP",[Ee.Java]:"Java",[Ee.Go]:"Go",[Ee.Python]:"Python",[Ee.Ruby]:"Ruby",[Ee.Rust]:"Rust"},gl=[Ee.Python,Ee.Java,Ee.JavaScript,Ee.DotNet,Ee.Php,Ee.Ruby,Ee.Go].map(e=>({id:e,label:hl[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:He(e)})),ml=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function vl(e){const a=hl[e];return a||e.charAt(0).toUpperCase()+e.slice(1)}const fl=e=>e.readOnly?Ze(bl,{scopes:e.scopes}):Ze(yl,{formState:e.formState,onChange:e.onChange,sourceOptions:e.sourceOptions,namespaceOptions:e.namespaceOptions}),bl=({scopes:e})=>{const a=ga();return Ze(x,{richTitle:{title:Me},children:e.length?Ze(cl,{children:e.map((e,l)=>((e,l)=>{if(e.workloadLanguage){const t=He(e.workloadLanguage);return Ye(pl,{children:[t&&Ze(ul,{children:Ze(t,{size:18})}),Ze(T,{size:L.XS,color:a.v2.colors.white[500],children:vl(e.workloadLanguage)})]},l)}const t=[e.workloadNamespace,e.workloadKind,e.workloadName].filter(Boolean),r=t.length?t.join(" / "):"Unknown scope";return Ze(pl,{children:Ze(T,{size:L.XS,color:a.v2.colors.white[500],children:r})},l)})(e,l))}):Ze(Ae,{status:Ne.Default,message:Oe,fullWidth:!0})})},yl=({formState:e,onChange:a,sourceOptions:l=[],namespaceOptions:t=[]})=>{const[r,o]=na("all"),i=e.sourceScopes.length>0,n=ia(()=>ml.map(e=>({...e,disabled:"all"===e.value&&i})),[i]),d=ia(()=>e.sourceScopes.filter(e=>"source"===e.scopeType).map(e=>{return a=e.workloadNamespace,l=e.workloadKind,t=e.workloadName,`${a}/${l}/${t}`;var a,l,t}),[e.sourceScopes]),c=ia(()=>e.sourceScopes.filter(e=>"namespace"===e.scopeType).map(e=>e.workloadNamespace),[e.sourceScopes]),p=ia(()=>new Set(e.sourceScopes.filter(e=>"language"===e.scopeType).map(e=>e.workloadLanguage)),[e.sourceScopes]),u=oa(e=>{o(e)},[]),h=oa(l=>{const t=e.sourceScopes.filter(e=>"source"!==e.scopeType),r=l.map(e=>function(e){const a=e.split("/");return 3!==a.length?null:{namespace:a[0],kind:a[1],name:a[2]}}(e)).filter(e=>null!==e).map(e=>({scopeType:"source",workloadName:e.name,workloadKind:e.kind,workloadNamespace:e.namespace,workloadLanguage:""}));a({sourceScopes:[...t,...r]})},[e.sourceScopes,a]),g=oa(l=>{const t=e.sourceScopes.filter(e=>"namespace"!==e.scopeType),r=l.map(e=>({scopeType:"namespace",workloadName:"",workloadKind:"",workloadNamespace:e,workloadLanguage:""}));a({sourceScopes:[...t,...r]})},[e.sourceScopes,a]),m=oa(l=>{if(e.sourceScopes.some(e=>"language"===e.scopeType&&e.workloadLanguage===l))a({sourceScopes:e.sourceScopes.filter(e=>!("language"===e.scopeType&&e.workloadLanguage===l))});else{const t={scopeType:"language",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:l};a({sourceScopes:[...e.sourceScopes,t]})}},[e.sourceScopes,a]);return Ye(x,{richTitle:{title:`1. ${Me}`,subTitle:ze},children:[Ze(Ae,!i&&"all"===r?{status:Ne.Default,message:Oe,fullWidth:!0,smallIcon:!0}:{status:Ne.Info,message:De,fullWidth:!0,smallIcon:!0}),Ze(v,{$alignItems:"flex-start",children:Ze(b,{size:y.S,options:n,selected:r,setSelected:u})}),"source"===r&&Ze(Re,{multiple:!0,"data-id":"sampling-autocomplete-source",options:l,value:d,onSelect:h,placeholder:Xe}),"namespace"===r&&Ze(Re,{multiple:!0,"data-id":"sampling-autocomplete-namespace",options:t,value:c,onSelect:g,placeholder:"Search namespace"}),"language"===r&&Ze(il,{children:gl.map(({id:e,label:a,Icon:l})=>{const t=p.has(e);return Ye(nl,{$selected:t,onClick:()=>m(e),children:[Ze(s,{name:`sampling-scope-lang-${e}`,size:Ie.S,value:t,onChange:()=>m(e)}),Ze(dl,{children:Ze(l,{size:20})}),Ze(T,{size:L.XS,nowrap:!0,children:a})]},e)})})]})},xl=(e,a)=>!a?.length||!!a?.find(a=>a===e),Sl=({title:e="Signals",required:a,errorMessage:l,allowedSignals:t,selectedSignals:r,setSelectedSignals:o,disabled:i})=>{const[n,d]=na(1===r.length),c=da(JSON.stringify(r));ca(()=>{const e=Ke(r);e.length||Ve.forEach(({id:a})=>{xl(a,t)&&e.push(a)});const a=JSON.stringify(e);c.current!==a&&(c.current=a,o(e),d(1===e.length))},[t,r]);return Ye(v,{$gap:12,children:[Ze(f,{label:e,required:a}),Ze(m,{$gap:12,children:Ve.map(e=>{const a=xl(e.id,t),l=((e,a)=>!!a?.find(a=>a===e))(e.id,r);return a?Ze(s,{label:e.value,disabled:i||!a||n&&l,value:l,onChange:a=>((e,a)=>{const l=e,t=a?[...r,l]:r.filter(e=>e!==l);o(t),d(1===t.length)})(e.id,a)},e.id):null})}),Ze(je,{errorMessage:l})]})},wl=({minSupportedVersion:a,currentVersion:l})=>Ze(e,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>Ze(qe,{scale:2.4,icon:()=>Ze("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:Ze("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${a} or later.\nCurrent version: ${l}.`}),Cl=ha.div`
103
+ display: flex;
104
+ flex-direction: column;
105
+ justify-content: flex-end;
106
+ width: ${({$width:e})=>e};
107
+ gap: ${({$columnHasHeader:e})=>e?"0":"12px"};
108
+ `,kl=ha.div`
109
+ display: flex;
110
+ align-items: center;
111
+ min-height: 24px;
112
+ padding: 12px;
113
+ border-radius: 16px 16px 0 0;
114
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
115
+ `,Tl=ha.div`
116
+ display: flex;
117
+ flex-direction: column;
118
+ gap: ${({$gap:e})=>e}px;
119
+ padding: 12px 12px 0 12px;
120
+ width: calc(100% - 24px);
121
+ height: ${({$heightOffset:e,$columnHasHeader:a})=>`calc(100vh - 180px - ${e}px ${a?"- 48px":""})`};
122
+ border-radius: ${({$columnHasHeader:e,$isLeft:a,$isRight:l})=>e?a?"0 0 0 16px":l?"0 16px 0 0":"0":a?"16px 0 0 16px":l?"0 16px 16px 0":"16px"};
123
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
124
+ overflow-y: auto;
125
+ overflow-x: hidden;
126
+ `,$l=({isLeft:e,isRight:a,heightOffset:l=0,width:t,header:r,list:s})=>Ye(Cl,{$width:t,$columnHasHeader:!!r,children:[r&&Ze(kl,{children:r}),Ze(Tl,{$gap:8,$isLeft:e,$isRight:a,$heightOffset:l,$columnHasHeader:!!r,children:s.length?s.length>1?Ze(Ue,{gap:8,elements:s}):Ze(_e,{children:s[0]}):Ze(Ge,{$height:"100%",children:Ze(Je,{})})})]}),Ll="75vw",Pl=ha.div`
127
+ display: flex;
128
+ flex-direction: column;
129
+ border-radius: 16px;
130
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
131
+ overflow: hidden;
132
+ `,Ml=ha.div`
133
+ display: flex;
134
+ gap: 12px;
135
+ padding: 16px 16px 0 16px;
136
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
137
+ position: sticky;
138
+ top: 0;
139
+ `,Al=ha.div`
140
+ padding: 12px 12px 0 12px;
141
+ `,Ol=ha.div`
142
+ display: flex;
143
+ gap: 12px;
144
+ padding: 16px;
145
+ `,Nl=ha.div`
146
+ padding: 5vh 10vw;
147
+ border-radius: 12px;
148
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
149
+ `,zl=pa(({isOpen:e,withOverlay:a,disableAnimation:l,onClose:t,onBack:r,onNext:s,nextIsSkip:o,onSave:i,disableSave:n,connectionIds:d,header:c,subHeader:p,leftColumn:u,rightColumn:h,search:g,filters:m,errorMessage:v,isFormDirty:f,hideDirtyNote:b,isFetching:y,progress:x},S)=>{const[w,C]=na(!1),[k,T]=na(!1),[$,P]=na(void 0);ua(S,()=>({clearErrors:()=>P(void 0)}));const M=k,A=oa(()=>{f&&!w?C(!0):(C(!1),t?.())},[f,w,t]),O=n||k||"boolean"==typeof f&&!f,N=oa(async()=>{T(!0);const e=await i();T(!1),e?.error?P(e.error):(d?.setValue([]),t?.())},[i,d,t]),z=!!g||!!d||!!m,D=!!p,R=(z?48:0)+(D?50:0),X=ia(()=>y?{status:Ne.Info,message:"Fetching Data..."}:k&&!x?{status:Ne.Info,message:"Saving Changes..."}:$||v?{status:Ne.Error,message:$||v}:"boolean"==typeof f&&f&&!b?{status:Ne.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:"boolean"!=typeof f||f||b?void 0:{status:Ne.Success,message:"The values reflect the current configuration of the selected cluster."},[y,k,x,$,v,f,b]),I=ia(()=>r?{label:"Back",leftIcon:ta,variant:j.Secondary,onClick:r}:{label:"Cancel",variant:j.Secondary,onClick:A,disabled:M},[r,A,M]),E=ia(()=>s?o?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:ra,variant:j.Secondary,onClick:s}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:ra,variant:j.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:j.Primary,onClick:N,disabled:O},[s,o,N,O]);return Ye(Be,{width:Ll,isOpen:e,disableAnimation:l,hideOverlay:!k&&!a,header:{...c,onClose:t?A:void 0,onCloseDisabled:M},footer:{note:X,actions:[I,E]},children:[k?Ze(Ge,{$height:"calc(100vh - 136px)",children:Ze(Nl,{children:Ze(Fe,{titleSize:L.S,subTitleSize:L.XXXS,withGradient:!0,withSpinner:!0,...x})})}):Ye(Pl,{children:[z&&Ye(Ml,{children:[d&&Ze(We,{icon:sa,title:"Selected Clusters",badge:{label:d.value.length}}),g&&Ze(Qe,{width:"100%",...g}),m]}),D&&Ze(Al,{children:Ze(We,{icon:p.icon,title:p.title,subTitle:p.description,badge:p.badge})}),Ye(Ol,{children:[Ze($l,{isLeft:!0,heightOffset:R,...u}),Ze($l,{isRight:!0,heightOffset:R,...h})]})]}),Ze(ma,{isOpen:w,onClose:()=>C(!1),onApprove:A})]})});zl.displayName=zl.name;export{sl as A,ma as C,fa as D,xa as N,Ka as O,wa as P,el as R,Sl as S,wl as U,zl as W,ya as a,ol as b,fl as c,Ga as d,ka as e,Ll as f,va as g,ba as h,Sa as i};
@@ -1,3 +1,3 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{u as n,B as a,a as r,A as s,g as l,S as c,C as d,b as p,N as m}from"./ui-components-CI2PiWkX.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const g=i.div`
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{u as n,B as a,a as r,A as s,g as l,S as c,C as d,b as p,N as m}from"./ui-components-BqdkaDt2.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const g=i.div`
2
2
  padding: 0 12px;
3
3
  `,C=({title:i="YAML",yaml:C,defaultOpen:S,fullHeight:k})=>{const{clickCopy:v,isCopied:A}=n(),[Y,j]=o(S??!1),x=e(()=>C?[{id:l(),type:s.Button,buttonProps:{variant:r.Secondary,size:a.S,leftIcon:A?u:f,onClick:()=>v(C||""),disabled:A}},{id:l(),type:s.Button,buttonProps:{variant:r.Secondary,size:a.S,leftIcon:Y?h:y,onClick:()=>j(t=>!t)}}]:[],[C,A,Y]);return t(c,{richTitle:{icon:b,title:i},actions:x,fullHeight:k,children:Y&&t(g,{children:C?t(d,{code:C,language:"yaml",theme:"duotoneDark"}):t(p,{children:t(m,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{C as Y};