@odigos/ui-kit 0.0.258 → 0.0.259

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.
@@ -1 +1 @@
1
- export{be as ActionType,dp as Actions,dn as RichTitle}from"../chunks/ui-components-BmIux5o5.js";export{C as CancelModal,j as DURATION_OPTIONS,g as DeleteModal,e as DurationErrorsSection,D as DynamicField,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,b as PERCENTAGE_OPTIONS,f as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,d as RuleTypeSection,c as SamplingPreviewSection,S as SignalsCheckboxList,a as SourceScopeSection,U as UpgradeModal,i as WIDE_DRAWER_WIDTH,W as WideDrawer,Y as YamlSectionCard}from"../chunks/index-BVL5-zQa.js";export{C as ColoredSpan,D as ColoredSpanVariant}from"../chunks/helpers-BlFl20R2.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{be as ActionType,dp as Actions,dn as RichTitle}from"../chunks/ui-components-CrXELmQx.js";export{C as CancelModal,j as DURATION_OPTIONS,g as DeleteModal,e as DurationErrorsSection,D as DynamicField,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,b as PERCENTAGE_OPTIONS,f as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,d as RuleTypeSection,c as SamplingPreviewSection,S as SignalsCheckboxList,a as SourceScopeSection,U as UpgradeModal,i as WIDE_DRAWER_WIDTH,W as WideDrawer,Y as YamlSectionCard}from"../chunks/index-Bio7SJqx.js";export{C as ColoredSpan,D as ColoredSpanVariant}from"../chunks/helpers-zByTbpzZ.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/snippets.js CHANGED
@@ -1 +1 @@
1
- export{be as ActionType,dp as Actions,dn as RichTitle}from"./chunks/ui-components-BmIux5o5.js";export{C as CancelModal,j as DURATION_OPTIONS,g as DeleteModal,e as DurationErrorsSection,D as DynamicField,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,b as PERCENTAGE_OPTIONS,f as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,d as RuleTypeSection,c as SamplingPreviewSection,S as SignalsCheckboxList,a as SourceScopeSection,U as UpgradeModal,i as WIDE_DRAWER_WIDTH,W as WideDrawer,Y as YamlSectionCard}from"./chunks/index-BVL5-zQa.js";export{C as ColoredSpan,D as ColoredSpanVariant}from"./chunks/helpers-BlFl20R2.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{be as ActionType,dp as Actions,dn as RichTitle}from"./chunks/ui-components-CrXELmQx.js";export{C as CancelModal,j as DURATION_OPTIONS,g as DeleteModal,e as DurationErrorsSection,D as DynamicField,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,b as PERCENTAGE_OPTIONS,f as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,d as RuleTypeSection,c as SamplingPreviewSection,S as SignalsCheckboxList,a as SourceScopeSection,U as UpgradeModal,i as WIDE_DRAWER_WIDTH,W as WideDrawer,Y as YamlSectionCard}from"./chunks/index-Bio7SJqx.js";export{C as ColoredSpan,D as ColoredSpanVariant}from"./chunks/helpers-zByTbpzZ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/store.js CHANGED
@@ -1 +1 @@
1
- export{a1 as ProgressKeys,fL as useDarkMode,h as useDataStreamStore,bf as useDrawerStore,d6 as useFilterStore,bT as useModalStore,W as useNotificationStore,$ as useProgressStore,dc as useSelectedStore,a0 as useSetupStore}from"./chunks/ui-components-BmIux5o5.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{a1 as ProgressKeys,fL as useDarkMode,h as useDataStreamStore,bf as useDrawerStore,d6 as useFilterStore,bT as useModalStore,W as useNotificationStore,$ as useProgressStore,dc as useSelectedStore,a0 as useSetupStore}from"./chunks/ui-components-CrXELmQx.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/theme.js CHANGED
@@ -1 +1 @@
1
- export{fU as Provider,fV as animations,fW as opacity,fX as palettes}from"./chunks/ui-components-BmIux5o5.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{fU as Provider,fV as animations,fW as opacity,fX as palettes}from"./chunks/ui-components-CrXELmQx.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/types.js CHANGED
@@ -1 +1 @@
1
- export{f as ActionKeyTypes,g as ActionType,eI as AgentInjectedReason,eJ as BooleanOperation,at as CodeAttributesKeyTypes,eK as ConditionType,_ as Crud,C as CustomInstrumentationsKeyTypes,b7 as DesiredStateProgress,eL as DestinationTypes,E as EntityTypes,ah as ExtractionDataFormat,l as FieldTypes,G as GolangCustomProbe,H as HeadersCollectionKeyTypes,dO as InputTypes,eM as InstallationMethod,eN as InstallationStatus,n as InstrumentationRuleType,eO as IntrumentationStatus,J as JavaCustomProbe,eP as JsonOperation,aa as K8sAttributesFrom,K as K8sResourceKind,eQ as K8sWorkloadContainerAgentConfigTracesHeadSamplingSpanMetricsMode,eR as ListDirection,eS as NumberOperation,eT as OtelDistroName,eU as OtherEntityTypes,av as PayloadCollectionKeyTypes,P as PlatformType,eV as PodContainerLifecycleStatus,eW as PodContainerStatus,eX as PodPhase,eY as Profile,br as ProgrammingLanguages,eZ as SIGNAL_KEY_TO_TYPE,e_ as SIGNAL_TYPE_TO_KEY,e$ as SignalKey,S as SignalType,f0 as SortDirection,o as StatusType,f1 as StringOperation,T as Tier,f2 as WorkloadRolloutReason,dr as WorkloadRolloutStatus}from"./chunks/ui-components-BmIux5o5.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{f as ActionKeyTypes,g as ActionType,eH as AgentInjectedReason,eI as BooleanOperation,at as CodeAttributesKeyTypes,eJ as ConditionType,_ as Crud,C as CustomInstrumentationsKeyTypes,b7 as DesiredStateProgress,eK as DestinationTypes,E as EntityTypes,ah as ExtractionDataFormat,l as FieldTypes,G as GolangCustomProbe,H as HeadersCollectionKeyTypes,dO as InputTypes,eL as InstallationMethod,eM as InstallationStatus,n as InstrumentationRuleType,eN as IntrumentationStatus,J as JavaCustomProbe,eO as JsonOperation,aa as K8sAttributesFrom,K as K8sResourceKind,eP as K8sWorkloadContainerAgentConfigTracesHeadSamplingSpanMetricsMode,eQ as ListDirection,eR as NumberOperation,eS as OtelDistroName,eT as OtherEntityTypes,av as PayloadCollectionKeyTypes,P as PlatformType,eU as PodContainerLifecycleStatus,eV as PodContainerStatus,eW as PodPhase,eX as Profile,br as ProgrammingLanguages,eY as SIGNAL_KEY_TO_TYPE,eZ as SIGNAL_TYPE_TO_KEY,e_ as SignalKey,S as SignalType,e$ as SortDirection,o as StatusType,f0 as StringOperation,T as Tier,f1 as WorkloadRolloutReason,dr as WorkloadRolloutStatus}from"./chunks/ui-components-CrXELmQx.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/visuals.js CHANGED
@@ -1 +1 @@
1
- export{f3 as VISUAL_ODIGOS_LOGO_HEIGHT,f4 as VISUAL_ODIGOS_LOGO_WIDTH,eG as VisualGreenRings,f5 as VisualOdigosLogo,c2 as VisualPurpleRings}from"./chunks/ui-components-BmIux5o5.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{f2 as VISUAL_ODIGOS_LOGO_HEIGHT,f3 as VISUAL_ODIGOS_LOGO_WIDTH,eF as VisualGreenRings,f4 as VisualOdigosLogo,c2 as VisualPurpleRings}from"./chunks/ui-components-CrXELmQx.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.258",
3
+ "version": "0.0.259",
4
4
  "author": "Odigos",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,155 +0,0 @@
1
- import{ay as e,L as a,l as t,ab as l,ac as r,dN as n,V as i,aL as s,aq as o,a9 as d,s as c,ad as u,al as p,dO as h,B as g,z as m,dP as v,dQ as f,n as b,C as y,J as x,G as C,H as S,av as $,at as T,b1 as k,T as w,a6 as P,a7 as A,y as M,M as L,aH as O,dR as I,dS as D,aR as z,dT as X,b as N,dU as R,O as H,c as E,dV as B,dW as V,dX as q,dY as G,dZ as j,d_ as U,d$ as J,ai as K,e0 as W,e1 as F,e2 as Y,e3 as Q,e4 as Z,bP as _,e5 as ee,e6 as ae,e7 as te,e8 as le,e9 as re,ea as ne,eb as ie,ec as se,ed as oe,ee as de,ef as ce,eg as ue,eh as pe,ei as he,ej as ge,ek as me,bC as ve,el as fe,em as be,en as ye,eo as xe,ep as Ce,eq as Se,er as $e,es as Te,et as ke,aX as we,Y as Pe,eu as Ae,o as Me,ev as Le,b2 as Oe,ew as Ie,ex as De,ey as ze,ez as Xe,br as Ne,ax as Re,eA as He,eB as Ee,eC as Be,db as Ve,eD as qe,eE as Ge,eF as je,e as Ue,d9 as Je,a8 as Ke,eG as We,Q as Fe,aK as Ye,N as Qe,ae as Ze,aO as _e,dn as ea,U as aa,bj as ta,be as la,bS as ra,eH as na}from"./ui-components-BmIux5o5.js";import{D as ia,C as sa,E as oa,u as da,F as ca,h as ua,f as pa,e as ha,G as ga,H as ma,I as va,i as fa,m as ba}from"./helpers-BlFl20R2.js";import{jsx as ya,jsxs as xa,Fragment as Ca}from"react/jsx-runtime";import Sa,{useMemo as $a,useCallback as Ta,useState as ka,useEffect as wa,useRef as Pa,forwardRef as Aa,useImperativeHandle as Ma}from"react";import La,{useTheme as Oa}from"styled-components";import{EditIcon as Ia,OdigosLogoTextCentral as Da,OdigosLogoTextEnterprise as za,OdigosLogoTextCommunity as Xa,OdigosLogoTextColoredCentral as Na,OdigosLogoTextColoredEnterprise as Ra,OdigosLogoTextColoredCommunity as Ha,ArrowLeftIcon as Ea,ArrowRightIcon as Ba,VSquareIcon as Va,VIcon as qa,CopyIcon as Ga,YamlIcon as ja}from"../icons.js";const Ua=({isOpen:t,onClose:l,onDeny:r,onApprove:n})=>ya(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:t,onClose:l,denyButton:{label:"Keep editing",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:"Discard changes",variant:a.Primary,onClick:()=>{n?.(),l()}}}),Ja=({isOpen:t,onClose:l,onDeny:r,onApprove:n,action:i="delete",target:s,description:o,overrideApproveButtonLabel:d,overrideDenyButtonLabel:c})=>{const u=i.charAt(0).toUpperCase()+i.substring(1),p=s?.endsWith("s")?"these":"this";return ya(e,{title:`${u}${s?` ${s}`:""}?`,description:o??`Are you sure you want to ${i}${s?` ${p} ${s}`:""}?`,isOpen:t,onClose:l,denyButton:{label:c??"Go back",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:d??u,variant:a.Primary,onClick:()=>{n?.(),l()}}})},Ka=({componentType:e,inputType:a,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C,setValue:S,errorMessage:$,warnMessage:T,helpMessage:k,dropdownOptions:w,dropdownNoSearch:P,dropdownNoCheckbox:A,timeUnits:M,timeDefaultUnit:L})=>{switch(e){case t.Input:return ya(p,{name:g,type:a,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",onChange:e=>{const t=e.target.value;S(a===h.Number?""===t?null:Number(t):t)},errorMessage:$,warnMessage:T,helpMessage:k},g);case t.MultiInput:return ya(u,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:T,helpMessage:k},g);case t.KeyValuePair:return ya(d,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key",placeholder:"Key"},{keyName:"value",label:"Value",placeholder:"Value"}],values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:T,helpMessage:k},g);case t.TextArea:return ya(o,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:C??"",onChange:e=>S(e.target.value),errorMessage:$,warnMessage:T,helpMessage:k},g);case t.Dropdown:return ya(s,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!P,options:w?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!A}))||[],values:C?[String(C)]:[],setValues:e=>S(e[0]),errorMessage:$,warnMessage:T,helpMessage:k},g);case t.Checkbox:return ya(i,{name:g,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:T,helpMessage:k},g);case t.Time:return ya(n,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",setValue:e=>S(e),units:M,defaultUnit:L,errorMessage:$,warnMessage:T,helpMessage:k},g);case t.Toggle:return ya(l,{name:g,labelAlign:r.Right,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:T,helpMessage:k},g);default:return null}},Wa=La.div`
2
- display: flex;
3
- align-items: center;
4
- gap: 24px;
5
- padding: 8px 16px;
6
- border-radius: 12px;
7
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
8
- `,Fa=La.div`
9
- flex: 1;
10
- min-width: 0;
11
- white-space: pre;
12
- overflow-x: auto;
13
- `,Ya=({title:e,summary:t,onEdit:l,renderAction:r})=>{const n=$a(()=>{const a=[];return e&&(a.push({text:e,variant:ia.Default}),a.push({text:" - ",variant:ia.Default})),a.push(...t),a},[e,t]);return xa(Wa,{children:[ya(Fa,{children:ya(sa,{parts:n})}),r&&r(),l&&ya(g,{"data-id":"sampling-btn-edit-auto-rule",label:v,rightIcon:Ia,variant:a.Text,size:m.S,onClick:l})]})},Qa={[$.HttpRequest]:"HTTP request",[$.HttpResponse]:"HTTP response",[$.DbQuery]:"DB query",[$.Messaging]:"messaging"};function Za(e,a,t){return 1===e?a:t??`${a}s`}function _a(e,a){const t=[],l=e.slice(0,3),r=e.slice(3);return l.forEach((e,l)=>{l>0&&t.push({text:", ",variant:ia.Default}),t.push({text:e,variant:a})}),r.length>0&&t.push({text:` + ${r.length} more`,variant:ia.Default,tooltipItems:r}),t}function et(e,a){switch(e){case b.CodeAttributes:return function(e){const a=Object.values(T).filter(a=>!!e.codeAttributes?.[a]).map(e=>k(e).toLowerCase());return a.length?[{text:"Collect",variant:ia.Action},{text:" ",variant:ia.Default},..._a(a,ia.Endpoint)]:null}(a);case b.PayloadCollection:return function(e){const a=Object.values($).filter(a=>null!=e.payloadCollection?.[a]).map(e=>Qa[e]);return a.length?[{text:"Collect",variant:ia.Action},{text:" ",variant:ia.Default},..._a(a,ia.Endpoint)]:null}(a);case b.HeadersCollection:return function(e){const a=(e.headersCollection?.[S.HeaderKeys]??[]).map(e=>e.trim()).filter(e=>e.length>0);if(!a.length)return null;const t=Za(a.length,"HTTP header");return[{text:`Collect ${a.length} ${t}`,variant:ia.Action},{text:"",variant:ia.Default,tooltipItems:a}]}(a);case b.CustomInstrumentation:return function(e){const a=(e.customInstrumentations?.[y.Java]??[]).map(e=>new x(e.className,e.methodName)).filter(e=>e.Verify()),t=(e.customInstrumentations?.[y.Golang]??[]).map(e=>new C(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify());if(!(a.length+t.length))return null;const l=[];a.length&&l.push(`${a.length} Java ${Za(a.length,"probe")}`),t.length&&l.push(`${t.length} Go ${Za(t.length,"probe")}`);const r=[...a.map(e=>`Java: ${e.toString()}`),...t.map(e=>`Go: ${e.toString()}`)];return[{text:`Apply ${l.join(" + ")}`,variant:ia.Action},{text:"",variant:ia.Default,tooltipItems:r}]}(a);default:return null}}const at=({option:e,formState:a,renderAction:t})=>{const l=$a(()=>{const t=et(e?.type,a);return t?[...t,...oa(a.sourceScopes)]:[]},[e?.type,a]),r=0===l.length;return ya(Ya,{title:r?f:"Instrumentation Rule Preview",summary:l,renderAction:t})},tt=({size:e=200,central:a=!1,useInline:t=!1})=>{const{tier:l}=da();if(t){if(a)return ya(Da,{size:e});switch(l){case w.Community:return ya(Xa,{size:e});case w.Onprem:return ya(za,{size:e});default:return null}}if(a)return ya(Na,{size:e});switch(l){case w.Community:return ya(Ha,{size:e});case w.Onprem:return ya(Ra,{size:e});default:return null}},lt=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"custom",label:"Custom"}],rt=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"custom",label:"Custom"}],nt=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],it=({description:e,options:a,selected:t,onSelect:l,customName:r,customLabel:n,customPlaceholder:i,customValue:s,onCustomChange:o,customInputType:d=h.Number,customMin:c,customMax:u})=>xa(P,{$gap:6,children:[ya(A,{label:e}),xa(M,{$gap:8,$alignItems:"flex-end",children:[ya(L,{options:a,selected:t,setSelected:l}),"custom"===t&&ya(p,{name:r,label:n,placeholder:i,type:d,value:s,onChange:o,width:160,min:c,max:u})]})]}),st=()=>{},ot=e=>e.readOnly?ya(dt,{rule:e.rule}):ya(ct,{ruleType:e.ruleType,formState:e.formState,onChange:e.onChange}),dt=({rule:e})=>{const a=null!=e.durationAtLeastMs;return e.error?ya(O,{richTitle:{title:I},children:ya(l,{name:"sampling-view-toggle-keep-errors",onChange:st,value:!0,size:z.S,label:D,labelAlign:r.Right})}):a?ya(O,{richTitle:{title:X},children:xa("div",{children:[ya(N,{size:E.XXXS,color:H.Secondary,children:R}),ya(N,{size:E.XS,children:`${e.durationAtLeastMs}ms`})]})}):null},ct=({ruleType:e,formState:a,onChange:t})=>{const n=Ta(e=>t({durationPreset:e}),[t]),i=Ta(e=>t({customDurationMs:e.target.value}),[t]);return"Error"===e?ya(O,{richTitle:{title:I,subTitle:B},children:ya(l,{name:"sampling-toggle-keep-errors",value:!0,onChange:st,size:z.S,label:D,labelAlign:r.Right})}):"Duration"===e?ya(O,{richTitle:{title:X,subTitle:V},children:ya(it,{description:R,options:nt,selected:a.durationPreset,onSelect:n,customName:"sampling-input-custom-duration",customLabel:q,customPlaceholder:"200ms",customValue:a.customDurationMs,onCustomChange:i})}):null},ut=La.div`
14
- display: flex;
15
- gap: 32px;
16
- `,pt=La.div`
17
- display: flex;
18
- flex-direction: column;
19
- gap: 4px;
20
- `,ht=La.div`
21
- display: flex;
22
- flex-wrap: wrap;
23
- align-items: flex-end;
24
- gap: 16px;
25
- `,gt=La.div`
26
- display: flex;
27
- align-items: flex-end;
28
- gap: 16px;
29
- padding: 12px 16px;
30
- border-radius: 8px;
31
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
32
- `,mt=La.div`
33
- display: flex;
34
- align-items: flex-end;
35
- gap: 10px;
36
- flex: 1;
37
- `,vt=La.div`
38
- display: flex;
39
- align-items: center;
40
- height: 32px;
41
- `,ft=La.div`
42
- display: flex;
43
- align-items: flex-end;
44
- gap: 16px;
45
- margin-bottom: 12px;
46
- `,bt="Any",yt="Kafka topic",xt=()=>ya("div",{style:{marginBottom:"8px"},children:ya(N,{size:E.XS,weight:500,children:"And"})}),Ct=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],St=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],$t=[{id:"",label:bt},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}];const Tt=e=>e.readOnly?ya(kt,{data:e.data}):ya(wt,{category:e.category,formState:e.formState,onChange:e.onChange}),kt=({data:e})=>{const a=$a(()=>function(e){if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:le,value:te},{id:"route",title:Y,value:a.httpServer.route||a.httpServer.routePrefix||re},{id:"method",title:ee,value:a.httpServer.method||bt}];if(a?.httpClient){const e=[{id:"type",title:le,value:ne}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:Y,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||re}),e.push({id:"method",title:ee,value:a.httpClient.method||bt}),e}return[{id:"type",title:le,value:ie}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:le,value:te},{id:"route",title:Y,value:a.httpServer.route||a.httpServer.routePrefix||re},{id:"method",title:ee,value:a.httpServer.method||bt}]:a?.kafkaConsumer?[{id:"type",title:le,value:se},{id:"topic",title:yt,value:a.kafkaConsumer.kafkaTopic||re}]:a?.kafkaProducer?[{id:"type",title:le,value:oe},{id:"topic",title:yt,value:a.kafkaProducer.kafkaTopic||re}]:[{id:"type",title:le,value:ie}]}(e),[e]);return ya(O,{richTitle:{title:G},children:ya(ut,{children:a.map(({id:e,title:a,value:t})=>xa(pt,{children:[ya(N,{size:E.XXXS,color:H.Secondary,nowrap:!0,children:a}),ya(N,{size:E.XS,nowrap:!0,children:t})]},e))})})},wt=({category:e,formState:t,onChange:l})=>{const r=$a(()=>"noisy"===e?Ct:St,[e]),n=Ta(e=>l({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[l]),i=Ta(e=>a=>{a&&l({routeType:e,route:""})},[l]),s=Ta(e=>l({route:e.target.value}),[l]),o=Ta(e=>l({serverAddress:e.target.value}),[l]),d=Ta(e=>l({method:e[0]||""}),[l]),c=Ta(e=>l({kafkaTopic:e.target.value}),[l]),u="httpServer"===t.operationType||"httpClient"===t.operationType,h="kafkaConsumer"===t.operationType||"kafkaProducer"===t.operationType,g="httpClient"===t.operationType?F:Y,v="httpClient"===t.operationType?Q:Z;return xa(O,{richTitle:{title:`2. ${G}`,subTitle:j},children:[ya(P,{$alignItems:"flex-start",children:ya(L,{options:r,selected:t.operationType,setSelected:n})}),u&&xa(ht,{children:["httpClient"===t.operationType&&xa(ft,{children:[ya(p,{name:"sampling-input-server-address",label:J,placeholder:U,value:t.serverAddress,onChange:o}),ya(xt,{})]}),xa(gt,{children:[xa(mt,{children:[ya(vt,{children:ya(K,{"data-id":"sampling-radio-route",value:"route"===t.routeType,onChange:i("route")})}),ya(p,{name:"sampling-input-route",label:g,placeholder:W,value:"route"===t.routeType?t.route:"",onChange:s,disabled:"route"!==t.routeType})]}),xa(mt,{children:[ya(vt,{children:ya(K,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===t.routeType,onChange:i("routePrefix")})}),ya(p,{name:"sampling-input-route-prefix",label:v,placeholder:W,value:"routePrefix"===t.routeType?t.route:"",onChange:s,disabled:"routePrefix"!==t.routeType})]})]}),xa(ft,{children:[ya(xt,{}),ya(_,{label:ee,items:$t,selectedIds:[t.method||""],setSelectedIds:e=>d(e),buttonProps:{"data-id":"sampling-btn-method",label:$t.find(e=>e.id===t.method)?.label||bt,size:m.S,variant:a.Secondary}})]})]}),h&&ya(p,{name:"sampling-input-kafka-topic",label:ae,placeholder:"Type kafka topic",value:t.kafkaTopic,onChange:c,width:"320px"})]})},Pt=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],At=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}];const Mt=e=>e.readOnly?ya(Lt,{data:e.data}):ya(Ot,{category:e.category,formState:e.formState,onChange:e.onChange}),Lt=({data:e})=>{const a=$a(()=>function(e){switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:ce,method:he,description:ue,value:`${e.rule.percentageAtLeast}%`}:{title:ce,method:me,description:null,value:null};case"noisy":return ca(e.rule.percentageAtMost)?{title:ce,method:ge,description:null,value:null}:{title:ce,method:he,description:pe,value:`${e.rule.percentageAtMost}%`};case"costReduction":return{title:ce,method:he,description:pe,value:`${e.rule.percentageAtMost}%`}}}(e),[e]),t=[{id:"method",title:ee,value:a.method},...null!=a.description?[{id:"value",title:a.description,value:a.value}]:[]];return ya(O,{richTitle:{title:a.title},children:ya(ut,{children:t.map(({id:e,title:a,value:t})=>xa(pt,{children:[ya(N,{size:E.XXXS,color:H.Secondary,nowrap:!0,children:a}),ya(N,{size:E.XS,nowrap:!0,children:t})]},e))})})},Ot=({category:e,formState:a,onChange:t})=>{const l="highlyRelevant"===e,r=l?At:Pt,n=`${l?4:3}. ${ce}`,i=de[e],s=l?ue:pe,o="noisy"===e?rt:lt,d=Ta(e=>t({percentageMode:e}),[t]),c=Ta(e=>t({percentagePreset:e}),[t]),u=Ta(e=>t({customPercentage:e.target.value}),[t]);return xa(O,{richTitle:{title:n,subTitle:i},children:["costReduction"!==e&&ya(P,{$alignItems:"flex-start",children:ya(L,{options:r,selected:a.percentageMode,setSelected:d})}),("costReduction"===e||"sample"===a.percentageMode)&&ya(it,{description:s,options:o,selected:a.percentagePreset,onSelect:c,customName:"sampling-input-custom-percentage",customPlaceholder:"5%",customValue:a.customPercentage,onCustomChange:u,customInputType:h.Decimal,customMin:0,customMax:100})]})},It=La.div`
47
- display: flex;
48
- align-items: flex-end;
49
- gap: 16px;
50
- `,Dt=La.div`
51
- width: 280px;
52
- flex-shrink: 0;
53
- `,zt=La.div`
54
- flex: 1;
55
- min-width: 0;
56
- `;function Xt(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":$e[e.category]}const Nt=e=>e.readOnly?ya(Rt,{data:e.data}):ya(Ht,{formState:e.formState,onChange:e.onChange}),Rt=({data:e})=>{const a=$a(()=>[{id:"name",title:fe,value:e.rule.name||ve},{id:"type",title:be,value:Xt(e)}],[e]),t=e.rule.notes||re;return xa(O,{children:[ya(ut,{children:a.map(({id:e,title:a,value:t})=>xa(pt,{children:[ya(N,{size:E.XXXS,color:H.Secondary,nowrap:!0,children:a}),ya(N,{size:E.XS,nowrap:!0,children:t})]},e))}),xa(pt,{children:[ya(N,{size:E.XXXS,color:H.Secondary,children:ye}),ya(N,{size:E.XS,children:t})]})]})},Ht=({formState:e,onChange:a})=>{const t=Ta(e=>a({name:e.target.value}),[a]),l=Ta(e=>a({notes:e.target.value}),[a]);return ya(O,{children:xa(It,{children:[ya(Dt,{children:ya(p,{name:"sampling-input-rule-name",label:fe,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:xe,value:e.name,onChange:t})}),ya(zt,{children:ya(p,{name:"sampling-input-note",label:ye,tooltip:Se,placeholder:Ce,value:e.notes,onChange:l})})]})})},Et=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}],Bt=({formState:e,onChange:a})=>{const t=Ta(e=>a({ruleType:e,keepErrors:"Error"===e}),[a]);return ya(O,{richTitle:{title:`3. ${be}`,subTitle:Te},children:ya(P,{$alignItems:"flex-start",children:ya(L,{options:Et,selected:e.ruleType,setSelected:t})})})},Vt=e=>{const a=$a(()=>{if(e.readOnly)return e.summary;switch(e.category){case"noisy":return ha(va(e.formState));case"highlyRelevant":return pa(ma(e.formState));case"costReduction":return ua(ga(e.formState))}},[e]);if(e.readOnly)return ya(Ya,{title:ke,summary:a,renderAction:e.renderAction});const t=1===a.length&&"default"===a[0].variant;return ya(Ya,{title:t?f:ke,summary:t?[]:a,renderAction:e.renderAction})},qt=La.div`
57
- display: flex;
58
- flex-wrap: wrap;
59
- gap: 8px;
60
- `,Gt=La.div`
61
- display: flex;
62
- align-items: center;
63
- gap: 8px;
64
- padding: 8px 12px;
65
- border-radius: 8px;
66
- cursor: pointer;
67
- background: ${({theme:e,$selected:a})=>a?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
68
- border: 1px solid ${({theme:e,$selected:a})=>a?e.v2.colors.silver[500]:e.v2.colors.silver[750]};
69
-
70
- &:hover {
71
- background: ${({theme:e})=>e.v2.colors.silver[700]};
72
- }
73
- `,jt=La.div`
74
- display: flex;
75
- width: 32px;
76
- height: 32px;
77
- justify-content: center;
78
- align-items: center;
79
- flex-shrink: 0;
80
- `,Ut=La.div`
81
- display: flex;
82
- flex-direction: column;
83
- gap: 12px;
84
- `,Jt=La.div`
85
- display: flex;
86
- flex-wrap: wrap;
87
- gap: 6px;
88
- `,Kt=La.div`
89
- display: flex;
90
- align-items: center;
91
- gap: 8px;
92
- &::before,
93
- &::after {
94
- content: '';
95
- flex: 1;
96
- height: 1px;
97
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
98
- }
99
- `,Wt=La.div`
100
- padding: 2px 10px;
101
- border-radius: 999px;
102
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
103
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[600]};
104
- `,Ft={[Ne.JavaScript]:"Node.js",[Ne.DotNet]:".NET",[Ne.Php]:"PHP",[Ne.Java]:"Java",[Ne.Go]:"Go",[Ne.Python]:"Python",[Ne.Ruby]:"Ruby",[Ne.Rust]:"Rust"},Yt=[Ne.Python,Ne.Java,Ne.JavaScript,Ne.DotNet,Ne.Php,Ne.Ruby,Ne.Go],Qt=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function Zt(e){const a=Ft[e];return a||e.charAt(0).toUpperCase()+e.slice(1)}function _t(e){return null!=e?`${e}. ${je}`:je}const el=({readOnly:e,...a})=>ya(e?ll:nl,{...a}),al=({title:e,count:a,children:t})=>xa(P,{$gap:6,children:[xa(M,{$gap:8,$alignItems:"center",children:[ya(N,{size:E.XS,color:H.Primary,nowrap:!0,children:e}),a>1&&xa(N,{size:E.XXS,color:H.Secondary,nowrap:!0,children:["(",qe,")"]})]}),ya(Jt,{children:t})]}),tl=()=>{const e=Oa();return ya(Kt,{children:ya(Wt,{children:ya(N,{size:E.XXS,color:e.v2.colors.white[500],nowrap:!0,children:Ge})})})},ll=({scopes:e,titleNumber:a})=>{const t=_t(a);if(fa(e))return ya(we,{bgTint:"900",richTitle:{title:t},withCollapse:!0,collapseIsDefaultOpen:!0,children:ya(Pe,{status:Me.Default,message:Ae,fullWidth:!0})});const l=e.sources??[],r=e.namespaces??[],n=e.languages??[],i=[];return l.length&&i.push({kind:"sources",node:ya(al,{title:Le,count:l.length,children:l.map((e,a)=>{const t=[e.namespace,e.kind,e.name].filter(Boolean),l=t.length?t.join(" / "):Ie;return ya(Oe,{label:l},`src-${a}-${l}`)})})}),r.length&&i.push({kind:"namespaces",node:ya(al,{title:De,count:r.length,children:r.map((e,a)=>ya(Oe,{label:e},`ns-${a}-${e}`))})}),n.length&&i.push({kind:"languages",node:ya(al,{title:ze,count:n.length,children:n.map((e,a)=>{const t=Re(e);return ya(Oe,{label:Zt(e),leftIcon:t},`lang-${a}-${e}`)})})}),ya(we,{bgTint:"900",richTitle:{title:t,subTitle:i.length>1?Xe:void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:ya(we,{bgTint:"800",children:ya(Ut,{children:i.map((e,a)=>xa(Sa.Fragment,{children:[a>0&&ya(tl,{}),e.node]},e.kind))})})})},rl=e=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":"all",nl=({scopes:e,onChange:a,sourceOptions:t=[],namespaceOptions:l=[],supportedLanguages:r,titleNumber:n,dataIdPrefix:s="source-scope",slim:o})=>{const d=e??ba(),[c,u]=ka(()=>rl(d)),{sources:p,namespaces:h,languages:g}=d,m=p.length>0||h.length>0||g.length>0;wa(()=>{m&&"all"===c&&u(rl(d))},[m,c]);const v=$a(()=>Qt.map(e=>"language"===e.value&&0===r?.length?null:{...e,disabled:"all"===e.value&&m}).filter(Boolean),[m]),f=$a(()=>p.map(e=>{return a=e.namespace,t=e.kind,l=e.name,`${a}/${t}/${l}`;var a,t,l}),[p]),b=$a(()=>[...h],[h]),y=$a(()=>new Set(g),[g]),x=Ta(e=>{u(e)},[]),C=Ta(e=>{const t=e.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=>({namespace:e.namespace,kind:e.kind,name:e.name}));a({...d,sources:t})},[d,a]),S=Ta(e=>{a({...d,namespaces:e})},[d,a]),$=Ta(e=>{const t=d.languages,l=t.includes(e)?t.filter(a=>a!==e):[...t,e];a({...d,languages:l})},[d,a]),T=!m&&"all"===c,k=(r||Yt).map(e=>({id:e,label:Ft[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:Re(e)}));return xa(O,{richTitle:o?{title:_t(n),titleSize:E.XS,titleColor:H.Secondary,tooltip:He}:{title:_t(n),subTitle:He,subTitleWrap:!0},backgroundColor:o?"transparent":void 0,padding:o?0:void 0,children:[ya(Pe,T?{status:Me.Default,message:Ae,fullWidth:!0,smallIcon:!0}:{status:Me.Info,message:Xe,fullWidth:!0,smallIcon:!0}),ya(P,{$alignItems:"flex-start",children:ya(L,{options:v,selected:c,setSelected:x})}),"source"===c&&ya(Ee,{multiple:!0,"data-id":`${s}-autocomplete-source`,options:t,value:f,onSelect:C,placeholder:Be}),"namespace"===c&&ya(Ee,{multiple:!0,"data-id":`${s}-autocomplete-namespace`,options:l,value:b,onSelect:S,placeholder:"Search namespace"}),"language"===c&&k.length>0&&ya(qt,{children:k.map(({id:e,label:a,Icon:t})=>{const l=y.has(e);return xa(Gt,{$selected:l,onClick:()=>$(e),children:[ya(i,{name:`${s}-lang-${e}`,size:Ve.S,value:l,onChange:()=>$(e)}),ya(jt,{children:ya(t,{size:20})}),ya(N,{size:E.XS,nowrap:!0,children:a})]},e)})})]})},il=(e,a)=>!a?.length||!!a?.find(a=>a===e),sl=({title:e="Signals",required:a,errorMessage:t,allowedSignals:l,selectedSignals:r,setSelectedSignals:n,disabled:s})=>{const[o,d]=ka(1===r.length),c=Pa(JSON.stringify(r));wa(()=>{let e=Ue(r).filter(e=>il(e,l));e.length||(e=Je.filter(({id:e})=>il(e,l)).map(({id:e})=>e));const a=JSON.stringify(e);c.current!==a&&(c.current=a,n(e),d(1===e.length))},[l,r]);return xa(P,{$gap:12,children:[ya(A,{label:e,required:a}),ya(M,{$gap:12,children:Je.map(e=>{const a=il(e.id,l),t=((e,a)=>!!a?.find(a=>a===e))(e.id,r);return a?ya(i,{label:e.value,disabled:s||!a||o&&t,value:t,onChange:a=>((e,a)=>{const t=e,l=a?[...r,t]:r.filter(e=>e!==t);n(l),d(1===l.length)})(e.id,a)},e.id):null})}),ya(Ke,{errorMessage:t})]})},ol=({minSupportedVersion:a,currentVersion:t})=>ya(e,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>ya(We,{scale:2.4,icon:()=>ya("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:ya("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: ${t}.`}),dl=La.div`
105
- display: flex;
106
- flex-direction: column;
107
- justify-content: flex-end;
108
- width: ${({$width:e})=>e};
109
- gap: ${({$columnHasHeader:e})=>e?"0":"12px"};
110
- `,cl=La.div`
111
- display: flex;
112
- align-items: center;
113
- min-height: 24px;
114
- padding: 12px;
115
- border-radius: 16px 16px 0 0;
116
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
117
- `,ul=La.div`
118
- display: flex;
119
- flex-direction: column;
120
- gap: ${({$gap:e})=>e}px;
121
- padding: 12px 12px 0 12px;
122
- width: 100%;
123
- height: ${({$heightOffset:e,$columnHasHeader:a})=>`calc(100vh - 180px - ${e}px ${a?"- 48px":""})`};
124
- border-radius: ${({$columnHasHeader:e,$isLeft:a,$isRight:t})=>e?a?"0 0 0 16px":t?"0 16px 0 0":"0":a?"16px 0 0 16px":t?"0 16px 16px 0":"16px"};
125
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
126
- overflow-y: auto;
127
- overflow-x: hidden;
128
- `,pl=({isLeft:e,isRight:a,heightOffset:t=0,width:l,header:r,list:n})=>xa(dl,{$width:l,$columnHasHeader:!!r,children:[r&&ya(cl,{children:r}),ya(ul,{$gap:8,$isLeft:e,$isRight:a,$heightOffset:t,$columnHasHeader:!!r,children:n.length?n.length>1?ya(Fe,{gap:8,elements:n}):ya(Ca,{children:n[0]}):ya(Ye,{$height:"100%",children:ya(Qe,{})})})]}),hl="75vw",gl=La.div`
129
- display: flex;
130
- flex-direction: column;
131
- border-radius: 16px;
132
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
133
- overflow: hidden;
134
- `,ml=La.div`
135
- display: flex;
136
- gap: 12px;
137
- padding: 16px 16px 0 16px;
138
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
139
- position: sticky;
140
- top: 0;
141
- `,vl=La.div`
142
- padding: 12px 12px 0 12px;
143
- `,fl=La.div`
144
- display: flex;
145
- gap: 12px;
146
- padding: 16px;
147
- `,bl=La.div`
148
- padding: 5vh 10vw;
149
- border-radius: 12px;
150
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
151
- `,yl=Aa(({isOpen:t,withOverlay:l,disableAnimation:r,onClose:n,onBack:i,onNext:s,nextIsSkip:o,onSave:d,disableSave:c,connectionIds:u,header:p,subHeader:h,leftColumn:g,rightColumn:m,search:v,filters:f,errorMessage:b,isFormDirty:y,hideDirtyNote:x,isFetching:C,progress:S},$)=>{const[T,k]=ka(!1),[w,P]=ka(!1),[A,M]=ka(void 0);Ma($,()=>({clearErrors:()=>M(void 0)}));const L=w,O=Ta(()=>{y&&!T?k(!0):(k(!1),n?.())},[y,T,n]),I=c||w||"boolean"==typeof y&&!y,D=Ta(async()=>{P(!0);const e=await d();P(!1),!1!==e&&(e?.error?M(e.error):(u?.setValue([]),n?.()))},[d,u,n]),z=!!v||!!u||!!f,X=!!h,N=(z?48:0)+(X?50:0),R=$a(()=>C?{status:Me.Info,message:"Fetching Data..."}:w&&!S?{status:Me.Info,message:"Saving Changes..."}:A||b?{status:Me.Error,message:A||b}:"boolean"==typeof y&&y&&!x?{status:Me.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:"boolean"!=typeof y||y||x?void 0:{status:Me.Success,message:"The values reflect the current configuration of the selected cluster."},[C,w,S,A,b,y,x]),H=$a(()=>i?{label:"Back",leftIcon:Ea,variant:a.Secondary,onClick:i}:{label:"Cancel",variant:a.Secondary,onClick:O,disabled:L},[i,O,L]),[B,V]=ka(!1),q=$a(()=>s?o?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:Ba,variant:a.Secondary,onClick:()=>V(!0)}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:Ba,variant:a.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:a.Primary,onClick:D,disabled:I},[s,o,D,I]);return xa(Ze,{width:hl,isOpen:t,disableAnimation:r,hideOverlay:!w&&!l,header:{...p,onClose:n?O:void 0,onCloseDisabled:L},footer:{note:R,actions:[H,q]},children:[w?ya(Ye,{$height:"calc(100vh - 136px)",children:ya(bl,{children:ya(_e,{titleSize:E.S,subTitleSize:E.XXXS,withGradient:!0,withSpinner:!0,...S})})}):xa(gl,{children:[z&&xa(ml,{children:[u&&ya(ea,{icon:Va,title:"Selected Clusters",badge:{label:u.value.length}}),v&&ya(aa,{width:"100%",...v}),f]}),X&&ya(vl,{children:ya(ea,{icon:h.icon,title:h.title,subTitle:h.description,badge:h.badge})}),xa(fl,{children:[ya(pl,{isLeft:!0,heightOffset:N,...g}),ya(pl,{isRight:!0,heightOffset:N,...m})]})]}),ya(Ua,{isOpen:T,onClose:()=>k(!1),onApprove:O}),ya(e,{title:"Skip setup?",description:"Without completing setup, Odigos won't be able to collect and send your telemetry data. This may interrupt your data flow and limit the platform's ability to provide value.",isOpen:B,onClose:()=>V(!1),denyButton:{label:"Go Back",variant:a.Secondary,onClick:()=>V(!1)},approveButton:{label:"Skip",variant:a.Primary,onClick:()=>{s?.(),V(!1)}}})]})});yl.displayName=yl.name;const xl=La.div`
152
- padding: 0 24px;
153
- border-radius: 12px;
154
- background-color: ${({$codeBgColor:e})=>e||"transparent"};
155
- `,Cl=({title:e="YAML",yaml:t,defaultOpen:l,fullHeight:r,bgTint:n="1000",codeBgColor:i})=>{const{clickCopy:s,isCopied:o}=ta(),d=$a(()=>t?[{id:ra(),type:la.Button,buttonProps:{variant:a.Text,size:m.S,leftIcon:o?qa:Ga,onClick:()=>s(t||""),disabled:o}}]:[],[t,o]);return ya(we,{bgTint:n,richTitle:{icon:ja,title:e},actions:d,withCollapse:!0,collapseIsDefaultOpen:l,fullHeight:r,children:ya(xl,{$codeBgColor:i,children:t?ya(na,{code:t,language:"yaml",theme:"duotoneDark"}):ya(Ye,{children:ya(Qe,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{Ya as A,Ua as C,Ka as D,at as I,rt as N,Tt as O,it as P,Nt as R,sl as S,ol as U,yl as W,Cl as Y,el as a,lt as b,Vt as c,Bt as d,ot as e,Mt as f,Ja as g,tt as h,hl as i,nt as j};