@odigos/ui-kit 0.0.287 → 0.0.289
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.
- package/.cursor/rules/frontend-workflow.mdc +27 -0
- package/.cursor/rules/ui-feedback-tables-forms.mdc +40 -0
- package/.cursor/rules/ui-implementation.mdc +21 -0
- package/.cursor/rules/ui-pages-and-drawers.mdc +34 -0
- package/.cursor/rules/ui-visual-language.mdc +27 -0
- package/CHANGELOG.md +30 -0
- package/lib/chunks/{helpers-CtkwQ3Wc.js → helpers-Ds7r-EIJ.js} +1 -1
- package/lib/chunks/index-DiYN36pr.js +351 -0
- package/lib/chunks/source-instrument-form-context-CBP9xXNN.js +5 -0
- package/lib/chunks/{ui-components-CjgsN17j.js → ui-components-Dvmqmy3G.js} +93 -84
- package/lib/components/table/types.d.ts +2 -2
- package/lib/components/trace-view/styled.d.ts +51 -34
- package/lib/components/trace-view/types.d.ts +4 -0
- package/lib/components.js +1 -1
- package/lib/constants/strings/index.d.ts +6 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_drawers/edit-source-drawer/overview/instructions-card.d.ts +21 -0
- package/lib/containers/_modals/sampling-onboarding-modal/common/chrome.d.ts +14 -10
- package/lib/containers/_modals/sampling-onboarding-modal/common/section.d.ts +9 -3
- package/lib/containers/insights/findings/drawer/anomaly/risk-breakdown/helpers.d.ts +23 -0
- package/lib/containers/insights/findings/drawer/anomaly/risk-breakdown/index.d.ts +9 -0
- package/lib/containers/insights/operation-identity.d.ts +22 -0
- package/lib/containers/insights/overview/contained-table-and-heading/index.d.ts +2 -1
- package/lib/containers/insights/settings-and-configurations/panels/detection/create-override-panel.d.ts +1 -1
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/constants.d.ts +6 -1
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/facet-section.d.ts +1 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/mappers.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/mappers.d.ts +2 -1
- package/lib/containers/insights/settings-and-configurations/panels/storage/layout.d.ts +12 -4
- package/lib/containers/insights/settings-and-configurations/panels/system/constants.d.ts +19 -1
- package/lib/containers/insights/transactions/helpers.d.ts +16 -3
- package/lib/containers.js +606 -478
- package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
- package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +19 -2
- package/lib/contexts/odigos-api/hooks/use-sources-api.d.ts +10 -1
- package/lib/contexts/odigos-api/index.d.ts +1 -1
- package/lib/contexts/odigos-api/types.d.ts +48 -1
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/{containers/insights/findings/drawer/anomaly/anomaly-blast-radius → snippets/blast-radius}/helpers.d.ts +7 -6
- package/lib/snippets/blast-radius/index.d.ts +7 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/snippets/sampling-rule-form-sections/styled.d.ts +6 -2
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme/palettes/index.d.ts +1 -0
- package/lib/theme.js +1 -1
- package/lib/types/insights/index.d.ts +68 -13
- package/lib/types/workload/index.d.ts +61 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +27 -24
- package/lib/chunks/index-BlYPxLja.js +0 -311
- package/lib/chunks/source-instrument-form-context-Bg6JzU76.js +0 -5
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/index.d.ts +0 -7
- /package/lib/{containers/insights/findings/drawer/anomaly/anomaly-blast-radius → snippets/blast-radius}/animated-edge.d.ts +0 -0
- /package/lib/{containers/insights/findings/drawer/anomaly/anomaly-blast-radius → snippets/blast-radius}/blast-radius-node.d.ts +0 -0
- /package/lib/{containers/insights/findings/drawer/anomaly/anomaly-blast-radius → snippets/blast-radius}/types.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odigos/ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.289",
|
|
4
4
|
"author": "Odigos",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -88,26 +88,25 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@apollo/client": "^4.2.
|
|
92
|
-
"react": "19.2.8",
|
|
93
|
-
"react-dom": "19.2.8",
|
|
94
|
-
"styled-components": "6.
|
|
91
|
+
"@apollo/client": "^4.2.12",
|
|
92
|
+
"react": "^19.2.8",
|
|
93
|
+
"react-dom": "^19.2.8",
|
|
94
|
+
"styled-components": "6.5.3"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@xyflow/react": "^12.11.
|
|
97
|
+
"@xyflow/react": "^12.11.5",
|
|
98
98
|
"elkjs": "^0.12.0",
|
|
99
99
|
"javascript-time-ago": "^2.6.4",
|
|
100
|
-
"lottie-react": "^2.4.1",
|
|
101
100
|
"prism-react-renderer": "^2.4.1",
|
|
102
|
-
"react": "19.2.8",
|
|
103
|
-
"react-dom": "19.2.8",
|
|
104
|
-
"react-error-boundary": "^6.1.
|
|
105
|
-
"styled-components": "6.
|
|
106
|
-
"virtua": "^0.50.
|
|
107
|
-
"zustand": "^5.0.
|
|
101
|
+
"react": "^19.2.8",
|
|
102
|
+
"react-dom": "^19.2.8",
|
|
103
|
+
"react-error-boundary": "^6.1.3",
|
|
104
|
+
"styled-components": "6.5.3",
|
|
105
|
+
"virtua": "^0.50.5",
|
|
106
|
+
"zustand": "^5.0.15"
|
|
108
107
|
},
|
|
109
108
|
"devDependencies": {
|
|
110
|
-
"@apollo/client": "^4.2.
|
|
109
|
+
"@apollo/client": "^4.2.12",
|
|
111
110
|
"@babel/core": "^7.29.7",
|
|
112
111
|
"@babel/preset-env": "^7.29.7",
|
|
113
112
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -119,28 +118,32 @@
|
|
|
119
118
|
"@rollup/plugin-terser": "^1.0.0",
|
|
120
119
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
121
120
|
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
122
|
-
"@storybook/react-webpack5": "10.5.
|
|
123
|
-
"@types/node": "^26.
|
|
121
|
+
"@storybook/react-webpack5": "10.5.10",
|
|
122
|
+
"@types/node": "^26.3.0",
|
|
124
123
|
"@types/react": "^19.2.18",
|
|
125
|
-
"@types/react-dom": "^19.2.
|
|
126
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
127
|
-
"@typescript-eslint/parser": "^8.
|
|
124
|
+
"@types/react-dom": "^19.2.5",
|
|
125
|
+
"@typescript-eslint/eslint-plugin": "^8.68.0",
|
|
126
|
+
"@typescript-eslint/parser": "^8.68.0",
|
|
128
127
|
"babel-loader": "^10.1.1",
|
|
129
128
|
"babel-plugin-styled-components": "^2.3.0",
|
|
130
129
|
"eslint": "^9.39.4",
|
|
131
130
|
"eslint-plugin-react": "^7.37.5",
|
|
132
|
-
"eslint-plugin-storybook": "10.5.
|
|
131
|
+
"eslint-plugin-storybook": "10.5.10",
|
|
133
132
|
"graphql": "^17.0.2",
|
|
134
|
-
"postcss": "^8.5.
|
|
135
|
-
"rollup": "^4.
|
|
133
|
+
"postcss": "^8.5.26",
|
|
134
|
+
"rollup": "^4.63.0",
|
|
136
135
|
"rollup-plugin-filesize": "^10.0.0",
|
|
137
136
|
"rollup-plugin-postcss": "^4.0.2",
|
|
138
|
-
"rollup-plugin-visualizer": "^7.
|
|
137
|
+
"rollup-plugin-visualizer": "^7.1.1",
|
|
139
138
|
"rxjs": "^7.8.2",
|
|
140
|
-
"storybook": "10.5.
|
|
139
|
+
"storybook": "10.5.10",
|
|
141
140
|
"typescript": "^5.9.3"
|
|
142
141
|
},
|
|
143
142
|
"resolutions": {
|
|
143
|
+
"fast-uri": "3.1.6",
|
|
144
|
+
"ip-address": "10.5.0",
|
|
145
|
+
"js-yaml": "4.3.1",
|
|
146
|
+
"nanoid": "3.3.18",
|
|
144
147
|
"postcss": "^8.5.12"
|
|
145
148
|
}
|
|
146
149
|
}
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as r,useTheme as n}from"styled-components";import{D as i,c as o,F as s,d as c,e as d,f as p,g as u,h,B as g,i as m,j as v,k as b,W as f,u as y,M as x,I as C,l as k,N as $,m as S,C as w,n as T,o as M,V as A,p as P,q as O,r as L,s as E,v as I,w as R,x as N,y as V,z as D,E as z,G as _,H as X,J as H,K as B,L as j,S as q,O as U,Q as G,U as K,X as F,Y as W,Z as J,_ as Y,$ as Z,a0 as Q,a1 as ee,a2 as ae,a3 as te,a4 as le,a5 as re,a6 as ne,a7 as ie,a8 as oe,a9 as se,aa as ce,T as de,ab as pe,ac as ue,ad as he,ae as ge,af as me,ag as ve,ah as be,ai as fe,aj as ye,ak as xe,al as Ce,am as ke,an as $e,b as Se,ao as we,ap as Te,aq as Me,ar as Ae,as as Pe,at as Oe,au as Le,av as Ee,aw as Ie,ax as Re,ay as Ne,az as Ve,aA as De,aB as ze,aC as _e,aD as Xe,aE as He,aF as Be,aG as je,aH as qe,aI as Ue,aJ as Ge,aK as Ke,aL as Fe,aM as We,aN as Je,aO as Ye,aP as Ze,aQ as Qe,aR as ea,aS as aa,aT as ta,aU as la,aV as ra,aW as na,aX as ia,aY as oa,aZ as sa,a_ as ca,a$ as da,b0 as pa,b1 as ua,b2 as ha,b3 as ga,b4 as ma,b5 as va,b6 as ba,b7 as fa,R as ya,b8 as xa,A as Ca,b9 as ka}from"./ui-components-CjgsN17j.js";import{XIcon as $a,VIcon as Sa,TrashIcon as wa,PlusIcon as Ta,VSquareIcon as Ma,XSquareIcon as Aa,EditIcon as Pa,OdigosLogoTextCentral as Oa,OdigosLogoTextEnterprise as La,OdigosLogoTextCommunity as Ea,OdigosLogoTextColoredCentral as Ia,OdigosLogoTextColoredEnterprise as Ra,OdigosLogoTextColoredCommunity as Na,ArrowLeftIcon as Va,ArrowRightIcon as Da,CopyIcon as za,YamlIcon as _a}from"../icons.js";import Xa,{useMemo as Ha,useRef as Ba,useCallback as ja,useState as qa,useEffect as Ua,Fragment as Ga,forwardRef as Ka,useImperativeHandle as Fa}from"react";import{i as Wa,m as Ja,u as Ya,n as Za,a as Qa,C as et,b as at,d as tt,e as lt,f as rt,g as nt,h as it,j as ot,k as st}from"./helpers-CtkwQ3Wc.js";const ct=/^[a-zA-Z]$/,dt=new Set(["*","+","?"]),pt=new Set(["^","$"]),ut={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},ht=l.div`
|
|
2
|
-
padding: 8px 16px;
|
|
3
|
-
border-radius: 6px;
|
|
4
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
|
|
5
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
6
|
-
font-family: ${({theme:e})=>e.font_family.code};
|
|
7
|
-
font-size: 12px;
|
|
8
|
-
line-height: 20px;
|
|
9
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
10
|
-
word-break: break-all;
|
|
11
|
-
white-space: pre-wrap;
|
|
12
|
-
user-select: text;
|
|
13
|
-
|
|
14
|
-
/* Wraps the background tightly to each visual fragment when a colored
|
|
15
|
-
token gets split across two visual lines. Without this the highlight
|
|
16
|
-
stretches all the way to the right edge of the container. */
|
|
17
|
-
& > span {
|
|
18
|
-
box-decoration-break: clone;
|
|
19
|
-
-webkit-box-decoration-break: clone;
|
|
20
|
-
}
|
|
21
|
-
`,gt=l.span`
|
|
22
|
-
background: ${({$kind:e})=>ut[e]};
|
|
23
|
-
`,mt=({pattern:a,"data-id":t})=>{const l=Ha(()=>(e=>{const a=[];let t=0,l=!1;const r=(e,t)=>{const l=a[a.length-1];l&&l.kind===t?l.text+=e:a.push({text:e,kind:t})};for(;t<e.length;){const a=e[t];if(l){if("]"===a){r("]","class-bracket"),l=!1,t++;continue}if("\\"===a&&t+1<e.length){r(e.slice(t,t+2),"class-content"),t+=2;continue}r(a,"class-content"),t++}else{if("("===a&&"?"===e[t+1]){let a=2;const l=e[t+2];if(":"===l||"="===l||"!"===l)a=3;else if("<"===l){const l=e[t+3];if("="===l||"!"===l)a=4;else{const l=e.indexOf(">",t+2);-1!==l&&(a=l-t+1)}}r(e.slice(t,t+a),"group"),t+=a;continue}if("("!==a&&")"!==a)if("["!==a)if(dt.has(a)||pt.has(a))r(a,"anchor-quantifier"),t++;else{if("{"===a){const a=e.indexOf("}",t);if(a>t&&/^\{\d+,?\d*\}$/.test(e.slice(t,a+1))){r(e.slice(t,a+1),"anchor-quantifier"),t=a+1;continue}}if("\\"===a&&t+1<e.length){const a=e[t+1];ct.test(a)?r(e.slice(t,t+2),"anchor-quantifier"):r(e.slice(t,t+2),"literal"),t+=2;continue}"|"!==a?(r(a,"literal"),t++):(r("|","alternation"),t++)}else"^"===e[t+1]?(r("[^","class-bracket"),t+=2):(r("[","class-bracket"),t++),l=!0;else r(a,"group"),t++}}return a})(a),[a]);return e(ht,a?{"data-id":t,children:l.map((a,t)=>e(gt,{$kind:a.kind,children:a.text},t))}:{"data-id":t,children:" "})},vt="rgba(102, 191, 255, 0.5)",bt=r`
|
|
24
|
-
font-family: ${({theme:e})=>e.font_family.code};
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
line-height: 20px;
|
|
27
|
-
letter-spacing: 0;
|
|
28
|
-
white-space: pre-wrap;
|
|
29
|
-
word-wrap: break-word;
|
|
30
|
-
overflow-wrap: break-word;
|
|
31
|
-
/* tab-size keeps tabs visually consistent across the two layers — some
|
|
32
|
-
browsers default to 8 on a textarea but 4 on a div. */
|
|
33
|
-
-moz-tab-size: 4;
|
|
34
|
-
tab-size: 4;
|
|
35
|
-
margin: 0;
|
|
36
|
-
`,ft=l.div`
|
|
37
|
-
position: relative;
|
|
38
|
-
width: 100%;
|
|
39
|
-
min-height: ${({$minHeight:e})=>e}px;
|
|
40
|
-
border-radius: 6px;
|
|
41
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
|
|
42
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
43
|
-
|
|
44
|
-
&:hover,
|
|
45
|
-
&:focus-within {
|
|
46
|
-
border-color: ${({theme:e})=>e.v2.colors.silver[300]};
|
|
47
|
-
}
|
|
48
|
-
`,yt=l.div`
|
|
49
|
-
${bt}
|
|
50
|
-
position: absolute;
|
|
51
|
-
inset: 0;
|
|
52
|
-
padding: 12px;
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
color: transparent;
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
|
|
57
|
-
/* Mandatory for backgrounds that wrap across visual lines. */
|
|
58
|
-
& > span {
|
|
59
|
-
box-decoration-break: clone;
|
|
60
|
-
-webkit-box-decoration-break: clone;
|
|
61
|
-
}
|
|
62
|
-
`,xt=l.textarea`
|
|
63
|
-
${bt}
|
|
64
|
-
position: relative;
|
|
65
|
-
z-index: 1;
|
|
66
|
-
display: block;
|
|
67
|
-
width: 100%;
|
|
68
|
-
min-height: ${({$minHeight:e})=>e}px;
|
|
69
|
-
padding: 12px;
|
|
70
|
-
border: 0;
|
|
71
|
-
background: transparent;
|
|
72
|
-
outline: none;
|
|
73
|
-
resize: vertical;
|
|
74
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
75
|
-
caret-color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
76
|
-
box-sizing: border-box;
|
|
77
|
-
|
|
78
|
-
&::placeholder {
|
|
79
|
-
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
80
|
-
}
|
|
81
|
-
`,Ct=e=>({before:e,matchPre:"",capture:"",matchPost:"",after:""}),kt=({regex:t,value:l,onChange:r,minHeight:n=240,...i})=>{const o=Ba(null),s=Ba(null),c=Ha(()=>((e,a)=>{if(!e||!a)return Ct(a);let t;try{t=new RegExp(e)}catch{return Ct(a)}const l=t.exec(a);if(!l)return Ct(a);const r=l.index,n=l.index+l[0].length;if(l.length<2||null==l[1])return{before:a.slice(0,r),matchPre:"",capture:a.slice(r,n),matchPost:"",after:a.slice(n)};const i=l[0].indexOf(l[1]),o=i>=0?r+i:r,s=o+l[1].length;return{before:a.slice(0,r),matchPre:a.slice(r,o),capture:a.slice(o,s),matchPost:a.slice(s,n),after:a.slice(n)}})(t,l),[t,l]),d=ja(()=>{o.current&&s.current&&(o.current.scrollTop=s.current.scrollTop,o.current.scrollLeft=s.current.scrollLeft)},[]);return a(ft,{$minHeight:n,children:[a(yt,{ref:o,"aria-hidden":!0,children:[c.before,e("span",{style:{background:vt},children:c.matchPre}),e("span",{style:{background:"rgba(102, 242, 102, 0.5)"},children:c.capture}),e("span",{style:{background:vt},children:c.matchPost}),c.after,l.endsWith("\n")?" ":""]}),e(xt,{ref:s,$minHeight:n,value:l,onChange:e=>r(e.target.value),onScroll:d,spellCheck:!1,...i})]})},$t=l.div`
|
|
82
|
-
flex: 1;
|
|
83
|
-
min-height: 0;
|
|
84
|
-
overflow-y: auto;
|
|
85
|
-
`,St=l.div`
|
|
86
|
-
background: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
87
|
-
border-radius: 8px;
|
|
88
|
-
padding: 8px;
|
|
89
|
-
display: flex;
|
|
90
|
-
flex-direction: column;
|
|
91
|
-
gap: 12px;
|
|
92
|
-
`,wt=l.div`
|
|
93
|
-
padding: 8px 16px;
|
|
94
|
-
border-radius: 8px;
|
|
95
|
-
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
96
|
-
font-family: ${({theme:e})=>e.font_family.code};
|
|
97
|
-
font-size: 12px;
|
|
98
|
-
line-height: 20px;
|
|
99
|
-
color: ${({theme:e,$tone:a})=>"error"===a?e.v2.colors.red[500]:"match"===a?e.v2.colors.white[500]:e.v2.colors.silver[200]};
|
|
100
|
-
word-break: break-all;
|
|
101
|
-
white-space: pre-wrap;
|
|
102
|
-
user-select: text;
|
|
103
|
-
`,Tt=({isOpen:t,regex:l,onClose:r,initialTestString:n=""})=>{const[f,y]=qa(n),x=Ha(()=>((e,a)=>{if(!e)return{ok:!0,isMatch:!1,message:o.RESULT_EMPTY_REGEX};if(!a)return{ok:!0,isMatch:!1,message:o.RESULT_EMPTY_INPUT};let t;try{t=new RegExp(e)}catch(e){return{ok:!1,message:e instanceof Error?e.message:o.RESULT_INVALID_REGEX_FALLBACK}}const l=t.exec(a);return l?{ok:!0,isMatch:!0,message:l.length>1?l[1]:l[0]}:{ok:!0,isMatch:!1,message:o.RESULT_NO_MATCH}})(l,f),[l,f]),C=x.ok?x.isMatch?"match":"neutral":"error";return e(i,{isOpen:t,header:{title:o.TITLE,onClose:()=>{y(""),r()}},children:e($t,{children:a(St,{children:[a(s,{$gap:6,children:[e(c,{label:o.REGEX_LABEL}),e(mt,{pattern:l,"data-id":"regex-tester-regex"}),!l&&e(d,{size:u.XXS,color:p.Secondary,children:o.REGEX_EMPTY_HINT})]}),a(s,{$gap:6,children:[a(h,{$width:"100%",$justifyContent:"space-between",$alignItems:"center",children:[e(c,{label:o.TEST_STRING_LABEL}),e(g,{"data-id":"regex-tester-unescape",label:o.UNESCAPE_LABEL,tooltip:o.UNESCAPE_TOOLTIP,variant:v.Secondary,size:m.S,onClick:()=>y(e=>(e=>{let a="";for(let t=0;t<e.length;t++){if("\\"===e[t]&&t+1<e.length){const l=e[t+1],r="n"===l?"\n":"t"===l?"\t":"r"===l?"\r":'"'===l?'"':"'"===l?"'":"\\"===l?"\\":null;if(null!=r){a+=r,t++;continue}}a+=e[t]}return a})(e)),disabled:(k=f,!/\\["'\\nrt]/.test(k))})]}),e(kt,{name:"regex-tester-test-string","data-id":"regex-tester-test-string",placeholder:o.TEST_STRING_PLACEHOLDER,regex:l,value:f,onChange:y,minHeight:240}),e(b,{helpMessage:o.TEST_STRING_HELP})]}),a(s,{$gap:8,children:[e(c,{label:o.RESULT_LABEL}),e(wt,{$tone:C,"data-id":"regex-tester-result",children:x.message}),x.ok&&x.isMatch&&e(d,{size:u.XXS,color:p.Secondary,children:o.RESULT_CAPTURE_HINT})]})]})})});var k},Mt=l.div`
|
|
104
|
-
display: grid;
|
|
105
|
-
grid-template-rows: ${({$open:e})=>e?"1fr":"0fr"};
|
|
106
|
-
opacity: ${({$open:e})=>e?1:0};
|
|
107
|
-
margin-bottom: ${({$open:e,$gapCancelPx:a})=>e?"0":`-${a}px`};
|
|
108
|
-
transition:
|
|
109
|
-
grid-template-rows ${220}ms ease,
|
|
110
|
-
opacity ${220}ms ease ${({$open:e,$delayInMs:a})=>e?`${a}ms`:"0ms"},
|
|
111
|
-
margin-bottom ${220}ms ease;
|
|
112
|
-
pointer-events: ${({$open:e})=>e?"auto":"none"};
|
|
113
|
-
|
|
114
|
-
> .animated-collapse-inner {
|
|
115
|
-
overflow: hidden;
|
|
116
|
-
min-height: 0;
|
|
117
|
-
}
|
|
118
|
-
`,At=({open:a,children:t,delayInMs:l=0,gapCancelPx:r=0})=>e(Mt,{$open:a,$delayInMs:l,$gapCancelPx:r,"aria-hidden":!a,children:e("div",{className:"animated-collapse-inner",children:t})}),Pt=({isOpen:a,onClose:t,onDeny:l,onApprove:r})=>e(f,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:t,denyButton:{label:"Keep editing",variant:v.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:"Discard changes",variant:v.Primary,onClick:()=>{r?.(),t()}}}),Ot=l.div`
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-direction: column;
|
|
121
|
-
gap: 12px;
|
|
122
|
-
width: 70vw;
|
|
123
|
-
height: 70vh;
|
|
124
|
-
padding: 12px;
|
|
125
|
-
overflow: auto;
|
|
126
|
-
`,Lt=l.div`
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: center;
|
|
129
|
-
justify-content: space-between;
|
|
130
|
-
width: 100%;
|
|
131
|
-
`,Et=({isOpen:t,onClose:l,language:r,code:n,...i})=>{const{CopyButton:o}=y();return e(x,{isOpen:t,onClose:l,children:a(Ot,{children:[a(Lt,{children:[e(d,{size:u.XS,children:"JSON view"}),e(C,{icon:a=>e($a,{...a}),size:k.L,onClick:l})]}),r&&n?e(S,{fullHeight:!0,overflow:"auto",children:a(h,{$width:"100%",$alignItems:"flex-start",$justifyContent:"space-between",children:[e(w,{language:r,code:n,...i}),e(o,{value:n})]})}):e($,{})]})})},It=({isOpen:a,onClose:t,onViewConnector:l})=>e(f,{isOpen:a,onClose:t,visual:()=>e(A,{scale:1.2,icon:Sa}),title:M.CLOUD_CONNECTOR_CREATED_MODAL_TITLE,description:M.CLOUD_CONNECTOR_CREATED_MODAL_DESC,denyButton:{label:T.STAY_ON_CONNECTIONS,variant:v.Secondary,onClick:t},approveButton:{label:T.GO_TO_CONNECTOR_OVERVIEW,variant:v.Primary,onClick:l??t}}),Rt=({isOpen:a,onClose:t,onDeny:l,onApprove:r,action:n="delete",target:i,description:o,overrideApproveButtonLabel:s,overrideDenyButtonLabel:c})=>{const d=n.charAt(0).toUpperCase()+n.substring(1),p=i?.endsWith("s")?"these":"this";return e(f,{title:`${d}${i?` ${i}`:""}?`,description:o??`Are you sure you want to ${n}${i?` ${p} ${i}`:""}?`,isOpen:a,onClose:t,denyButton:{label:c??"Go back",variant:v.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:s??d,variant:v.Primary,onClick:()=>{r?.(),t()}}})},Nt=({componentType:a,inputType:t,name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d,setValue:p,errorMessage:u,warnMessage:h,helpMessage:g,dropdownOptions:m,dropdownNoSearch:v,dropdownNoCheckbox:b,timeUnits:f,timeDefaultUnit:y,toggleSize:x=E.L,keyLabel:C,valueLabel:k})=>{switch(a){case P.Input:return e(X,{name:l,type:t,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",onChange:e=>{const a=e.target.value;p(t===H.Number?""===a?null:Number(a):a)},errorMessage:u,warnMessage:h,helpMessage:g},l);case P.MultiInput:return e(_,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,values:Array.isArray(d)?d:z(d,[]),setValues:e=>p(e),errorMessage:u,warnMessage:h,helpMessage:g,plain:!0},l);case P.KeyValuePair:return e(D,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,limitFieldsPerRow:2,columns:[{keyName:"key",label:C||"Key",placeholder:C||"Key"},{keyName:"value",label:k||"Value",placeholder:k||"Value"}],values:Array.isArray(d)?d:z(d,[]),setValues:e=>p(e),errorMessage:u,warnMessage:h,helpMessage:g},l);case P.TextArea:return e(V,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,placeholder:o,value:d??"",onChange:e=>p(e.target.value),errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Dropdown:return e(N,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,withSearch:!v,options:m?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!b}))||[],values:d?[String(d)]:[],setValues:e=>p(e[0]),errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Checkbox:return e(R,{name:l,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>p(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Time:return e(I,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",setValue:e=>p(e),units:f,defaultUnit:y,errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Toggle:return e(O,{name:l,size:x,labelAlign:L.Right,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>p(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},l);default:return null}},Vt=l.div`
|
|
132
|
-
display: flex;
|
|
133
|
-
flex-wrap: wrap;
|
|
134
|
-
gap: 8px;
|
|
135
|
-
`,Dt=l.div`
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
gap: 8px;
|
|
139
|
-
padding: 8px 12px;
|
|
140
|
-
border-radius: 8px;
|
|
141
|
-
cursor: pointer;
|
|
142
|
-
background: ${({theme:e,$selected:a})=>a?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
143
|
-
border: 1px solid ${({theme:e,$selected:a})=>a?e.v2.colors.silver[500]:e.v2.colors.silver[750]};
|
|
144
|
-
|
|
145
|
-
&:hover {
|
|
146
|
-
background: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
147
|
-
}
|
|
148
|
-
`,zt=l.div`
|
|
149
|
-
display: flex;
|
|
150
|
-
width: 32px;
|
|
151
|
-
height: 32px;
|
|
152
|
-
justify-content: center;
|
|
153
|
-
align-items: center;
|
|
154
|
-
flex-shrink: 0;
|
|
155
|
-
`,_t=l.div`
|
|
156
|
-
display: flex;
|
|
157
|
-
flex-direction: column;
|
|
158
|
-
gap: 12px;
|
|
159
|
-
`,Xt=l.div`
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-wrap: wrap;
|
|
162
|
-
gap: 6px;
|
|
163
|
-
`,Ht=l.div`
|
|
164
|
-
display: flex;
|
|
165
|
-
align-items: center;
|
|
166
|
-
gap: 8px;
|
|
167
|
-
&::before,
|
|
168
|
-
&::after {
|
|
169
|
-
content: '';
|
|
170
|
-
flex: 1;
|
|
171
|
-
height: 1px;
|
|
172
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
173
|
-
}
|
|
174
|
-
`,Bt=l.div`
|
|
175
|
-
padding: 2px 10px;
|
|
176
|
-
border-radius: 999px;
|
|
177
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
178
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[600]};
|
|
179
|
-
`,jt={[Y.JavaScript]:"Node.js",[Y.DotNet]:".NET",[Y.Php]:"PHP",[Y.Java]:"Java",[Y.Go]:"Go",[Y.Python]:"Python",[Y.Ruby]:"Ruby",[Y.Rust]:"Rust"},qt=[Y.Python,Y.Java,Y.JavaScript,Y.DotNet,Y.Php,Y.Ruby,Y.Go],Ut=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function Gt(e){return jt[e]||e.charAt(0).toUpperCase()+e.slice(1)}function Kt(e){return null!=e?`${e}. ${oe}`:oe}const Ft=({readOnly:a,...t})=>e(a?Yt:Qt,{...t}),Wt=({title:t,count:l,children:r})=>a(s,{$gap:6,children:[a(h,{$gap:8,$alignItems:"center",children:[e(d,{size:u.XS,color:p.Primary,nowrap:!0,children:t}),l>1&&e(d,{size:u.XXS,color:p.Secondary,nowrap:!0,children:`(${ne})`})]}),e(Xt,{children:r})]}),Jt=()=>{const a=n();return e(Ht,{children:e(Bt,{children:e(d,{size:u.XXS,color:a.v2.colors.white[500],nowrap:!0,children:ie})})})},Yt=({scopes:t,titleNumber:l})=>{const r=Kt(l);if(Wa(t))return e(S,{bgTint:"900",richTitle:{title:r},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(B,{status:q.Default,message:j,fullWidth:!0})});const n=t.sources??[],i=t.namespaces??[],o=t.languages??[],s=[];return n.length&&s.push({kind:"sources",node:e(Wt,{title:U,count:n.length,children:n.map((a,t)=>{const l=[a.namespace,a.kind,a.name].filter(Boolean),r=l.length?l.join(" / "):K;return e(G,{label:r},`src-${t}-${r}`)})})}),i.length&&s.push({kind:"namespaces",node:e(Wt,{title:F,count:i.length,children:i.map((a,t)=>e(G,{label:a},`ns-${t}-${a}`))})}),o.length&&s.push({kind:"languages",node:e(Wt,{title:W,count:o.length,children:o.map((a,t)=>{const l=Z(a);return e(G,{label:Gt(a),leftIcon:l},`lang-${t}-${a}`)})})}),e(S,{bgTint:"900",richTitle:{title:r,subTitle:s.length>1?J:void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(S,{bgTint:"800",children:e(_t,{children:s.map((t,l)=>a(Xa.Fragment,{children:[l>0&&e(Jt,{}),t.node]},t.kind))})})})},Zt=e=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":"all",Qt=({scopes:t,onChange:l,sourceOptions:r=[],namespaceOptions:n=[],supportedLanguages:i,titleNumber:o,dataIdPrefix:c="source-scope",slim:h,disabled:g})=>{const m=t??Ja(),[v,b]=qa(()=>Zt(m)),{sources:f,namespaces:y,languages:x}=m,C=f.length>0||y.length>0||x.length>0;Ua(()=>{C&&"all"===v&&b(Zt(m))},[C,v]);const k=Ha(()=>Ut.map(e=>"language"===e.value&&0===i?.length?null:{...e,disabled:"all"===e.value&&C}).filter(Boolean),[C]),$=Ha(()=>f.map(e=>`${e.namespace}/${e.kind}/${e.name}`),[f]),S=Ha(()=>[...y],[y]),w=Ha(()=>new Set(x),[x]),T=ja(e=>{b(e)},[]),M=ja(e=>{const a=e.map(e=>(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}));l({...m,sources:a})},[m,l]),A=ja(e=>{l({...m,namespaces:e})},[m,l]),P=ja(e=>{const a=m.languages,t=a.includes(e)?a.filter(a=>a!==e):[...a,e];l({...m,languages:t})},[m,l]),O=!C&&"all"===v,L=(i||qt).map(e=>({id:e,label:jt[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:Z(e)}));return a(Q,{richTitle:h?{title:Kt(o),titleSize:u.XS,titleColor:p.Secondary,tooltip:ee}:{title:Kt(o),subTitle:ee,subTitleWrap:!0},backgroundColor:h?"transparent":void 0,padding:h?0:void 0,children:[e(B,O?{status:q.Default,message:j,fullWidth:!0,smallIcon:!0}:{status:q.Info,message:J,fullWidth:!0,smallIcon:!0}),e(s,{$alignItems:"flex-start",children:e(ae,{options:k,selected:v,setSelected:T,disabled:g})}),"source"===v&&e(te,{multiple:!0,"data-id":`${c}-autocomplete-source`,options:r,value:$,onSelect:M,placeholder:le,disabled:g}),"namespace"===v&&e(te,{multiple:!0,"data-id":`${c}-autocomplete-namespace`,options:n,value:S,onSelect:A,placeholder:"Search namespace",disabled:g}),"language"===v&&L.length>0&&e(Vt,{children:L.map(({id:t,label:l,Icon:r})=>{const n=w.has(t);return a(Dt,{$selected:n,onClick:()=>P(t),children:[e(R,{name:`${c}-lang-${t}`,size:re.S,value:n,onChange:()=>P(t),disabled:g}),e(zt,{children:e(r,{size:20})}),e(d,{size:u.XS,nowrap:!0,children:l})]},t)})})]})},el=e=>{if(null!=e){if(!Array.isArray(e)&&"object"==typeof e)return Object.entries(e).map(([e,a])=>({id:e,label:null==a?e:String(a)}));if(Array.isArray(e))return e.map(e=>"string"==typeof e?{id:e,label:e}:e)}},al=e=>{if(!Array.isArray(e)||e.length<3)return;const[a,t,l]=e;return e=>{const r=null==e?.[a]?"":String(e[a]);switch(t){case"=":case"==":case"===":return r===l;case"!=":case"!==":return r!==l;default:return!0}}},tl=e=>{if(Array.isArray(e))return e.map(e=>{const a=e;return{keyName:String(a.keyName??a.name??""),label:a.label??a.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,componentType:a.componentType,options:el(a.options??a.values),fullRow:a.fullRow,defaultValue:a.defaultValue,withRegexTester:a.withRegexTester,separator:a.separator,copyByColumn:a.copyByColumn,renderCondition:al(a.renderCondition)}})},ll=e=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return{id:e,label:e};const a=e;return{id:String(a.id??a.keyName??a.name??""),label:a.label??a.displayName??String(a.id??""),tooltip:a.tooltip,fields:Array.isArray(a.fields)?a.fields.map(rl):void 0}})},rl=e=>{const a="string"==typeof e.componentProperties?z(e.componentProperties,{}):e.componentProps||{};return{name:e.name,componentType:e.componentType,inputType:e.inputType??a.inputType??a.type,title:e.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,required:a.required,initialValue:e.initialValue,renderCondition:e.renderCondition,options:el(a.options??a.values),itemWrapperKey:a.itemWrapperKey,columns:tl(a.columns),limitFieldsPerRow:a.limitFieldsPerRow,variant:a.variant,wrapKey:a.wrapKey,checkboxOptions:ll(a.options??a.values),checkedValue:a.checkedValue??"true",valueMode:a.valueMode??"object",fields:Array.isArray(a.fields)?a.fields.map(rl):void 0,addLabel:a.addLabel,itemLabel:a.itemLabel,keyLabel:a.titleKey??a.keyLabel,valueLabel:a.titleValue??a.valueLabel,persistAs:a.persistAs}},nl=e=>{const a=e.initialValue;if(void 0!==a&&""!==a)return e.componentType===P.CheckboxList?"array"===e.valueMode?z(a,[]):z(a,{}):e.componentType!==P.MultiInput&&e.componentType!==P.MultiTabledInput||!e.wrapKey?e.componentType===P.MultiInput||e.componentType===P.MultiTabledInput?z(a,[]):e.componentType===P.SourceScopes?"null"===a||"{}"===a?Ja():Za(z(a,null)):e.componentType===P.Toggle||e.componentType===P.Checkbox?"true"===a:a:{[e.wrapKey]:z(a,[])}},il=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),ol=e=>Array.isArray(e)?e:[],sl=e=>{const a={};return e.forEach(e=>{a[String(e.key??"")]=String(e.value??"")}),a},cl=e=>il(e)?Object.entries(e).map(([e,a])=>({key:e,value:String(a??"")})):[],dl=({field:a,value:t,setValue:l,errorMessage:r,disabled:n})=>{const[i,o]=qa(()=>cl(t));return Ua(()=>{const e=il(t)?t:{};((e,a)=>{const t=Object.keys(e),l=Object.keys(a);return t.length===l.length&&t.every(t=>Object.prototype.hasOwnProperty.call(a,t)&&a[t]===e[t])})(sl(i),e)||o(cl(t))},[t]),e(D,{name:a.name,label:a.title,tooltip:a.tooltip,helpMessage:a.helpMessage,required:a.required,disabled:n,limitFieldsPerRow:2,columns:[{keyName:"key",label:a.keyLabel||"Key",placeholder:a.keyLabel||"Key"},{keyName:"value",label:a.valueLabel||"Value",placeholder:a.valueLabel||"Value"}],values:i,setValues:e=>{o(e),l(sl(e))},errorMessage:r})},pl=({field:l,value:r,setValue:n,errorMessage:i,disabled:o,keyValuePersistAs:h,sourceOptions:g,namespaceOptions:m})=>{const{name:v,componentType:f,inputType:y,title:x,tooltip:C,placeholder:k,helpMessage:$,required:S,initialValue:w,options:T,itemWrapperKey:M,columns:A,limitFieldsPerRow:O,variant:L,wrapKey:E,checkboxOptions:I}=l,[N,V]=qa({open:!1,value:""});if(f===P.SourceScopes)return e(Ft,{scopes:Za(r),onChange:e=>n(e),sourceOptions:g,namespaceOptions:m,dataIdPrefix:`dynamic-field-${v}`,slim:!0});if(f===P.CheckboxList&&"array"===l.valueMode){const t=ol(r),l=(e,a)=>n(a?[...t.filter(a=>a!==e),e]:t.filter(a=>a!==e));return a(s,{$gap:12,children:[x&&e(c,{label:x,tooltip:C,required:S}),e(s,{$gap:8,children:(I||[]).map(a=>{const r=e(R,{name:a.id,label:a.label,value:t.includes(a.id),disabled:o,onChange:e=>l(a.id,e)},a.id);return a.tooltip?e(de,{text:a.tooltip,withIcon:!0,children:r},a.id):r})}),e(b,{errorMessage:i,helpMessage:$})]})}if(f===P.CheckboxList){const t=il(r)?r:{},c=(e=>"emptyObject"!==e.checkedValue||{})(l),g=e=>"emptyObject"===l.checkedValue?il(e):!!e;return a(s,{$gap:12,children:[x&&e(d,{size:u.XS,color:p.Secondary,nowrap:!0,children:x}),e(s,{$gap:12,children:(I||[]).map(l=>{const r=t[l.id],i=g(r),d=il(r)?r:{},p=e(R,{label:l.label,value:i,disabled:o,onChange:e=>n({...t,[l.id]:e?il(r)?r:c:null})}),u=l.tooltip?e(de,{text:l.tooltip,withIcon:!0,children:p}):p,m=i&&l.fields?.length?e(s,{$gap:12,$padding:"0 0 0 24px",children:l.fields.map(a=>e(pl,{field:a,value:d[a.name],setValue:e=>n({...t,[l.id]:{...d,[a.name]:e}}),disabled:o,keyValuePersistAs:h},`${v}-${l.id}-${a.name}`))}):null;return a(s,{$gap:12,children:[u,m]},l.id)})}),e(b,{errorMessage:i,helpMessage:$})]})}if(f===P.MultiTabledInput){const l=ol(E?r?.[E]:r),s=e=>n(E?{...il(r)?r:{},[E]:e}:e),c=(A||[]).some(e=>e.withRegexTester);return a(t,{children:[e("cards"===L?pe:D,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,columns:A||[],limitFieldsPerRow:O,values:l,setValues:s,errorMessage:i,onTestRegex:c?e=>V({open:!0,value:e}):void 0}),c&&e(Tt,{isOpen:N.open,regex:N.value,onClose:()=>V({open:!1,value:""})})]})}if(f===P.MultiInput&&E){const a=ol(r?.[E]);return e(_,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,placeholder:k,values:a,setValues:e=>n({...il(r)?r:{},[E]:e}),errorMessage:i})}if(f===P.MultiInput&&M){const a=ol(r).map(e=>String(e?.[M]??""));return e(_,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,placeholder:k,values:a,setValues:e=>n(e.map(e=>({[M]:e}))),errorMessage:i})}return f===P.KeyValuePair?"map"===(l.persistAs??h)?e(dl,{field:l,value:r,setValue:n,errorMessage:i,disabled:o}):e(Nt,{componentType:f,name:v,label:x,tooltip:C,helpMessage:$,disabled:o,required:S,errorMessage:i,keyLabel:l.keyLabel,valueLabel:l.valueLabel,value:r??[],setValue:n}):e(Nt,{componentType:f,inputType:y,name:v,label:x,tooltip:C,helpMessage:$,disabled:o,required:S,placeholder:k,errorMessage:i,dropdownOptions:T,value:(null==r?w:r)??"",setValue:n})},ul=({field:l,value:r,setValue:i,disabled:o,keyValuePersistAs:d,sourceOptions:p,namespaceOptions:u})=>{const b=n(),f=ol(r),y=f.length?f:[{}],x=l.fields||[],C=e=>i(e);return a(t,{children:[y.map((t,r)=>a(Ga,{children:[e(ce,{}),a(s,{$gap:12,children:[a(h,{$justifyContent:"space-between",$alignItems:"center",children:[e(c,{label:`${l.itemLabel||l.title||"Item"} ${r+1}`}),e(g,{leftIcon:()=>e(wa,{fill:b.v2.colors.red[500]}),variant:v.Secondary,size:m.S,onClick:()=>(e=>{const a=y.filter((a,t)=>t!==e);C(a)})(r),disabled:o||1===y.length})]}),x.map(a=>e(pl,{field:a,value:t[a.name],setValue:e=>((e,a,t)=>C(y.map((l,r)=>r===e?{...l,[a]:t}:l)))(r,a.name,e),disabled:o,keyValuePersistAs:d,sourceOptions:p,namespaceOptions:u},`${l.name}-group-${r}-${a.name}`))]})]},`${l.name}-group-${r}`)),e(g,{variant:v.Secondary,label:l.addLabel||"Add",leftIcon:Ta,onClick:()=>C([...y,{}]),disabled:o}),e(ce,{})]})},hl=({field:t,value:l,setValue:r,errorMessage:n,disabled:i})=>a(s,{$gap:12,children:[t.title&&e(c,{label:t.title,tooltip:t.tooltip,required:t.required}),e(s,{$gap:8,children:(t.checkboxOptions||[]).map(a=>{const t=e(R,{name:a.id,label:a.label,value:!0===l?.[a.id],disabled:i,onChange:e=>r(a.id,e)},a.id);return a.tooltip?e(de,{text:a.tooltip,withIcon:!0,children:t},a.id):t})}),e(b,{errorMessage:n,helpMessage:t.helpMessage})]}),gl=({signals:a,fields:l,value:r,setValue:n,formErrors:i,disabled:o,seedInitialValues:s,keyValuePersistAs:c="map",sourceOptions:d,namespaceOptions:p})=>{const{isK8s:u}=Ya(),h=(l||[]).filter(e=>!!e).map(e=>rl(e));return Ua(()=>{if(!s)return;const e=r||{},a={};h.forEach(t=>{if(t.componentType===P.SourceScopes&&!u)return;const l=t.componentType===P.SourceScopes?nl(t)??Ja():nl(t);if(void 0===l)return;if(t.componentType===P.CheckboxList&&"flatFields"===t.valueMode&&il(l))return void Object.entries(l).forEach(([t,l])=>{void 0!==e[t]&&null!==e[t]||(a[t]=l)});const r=e[t.name];if(t.componentType===P.SourceScopes){if(void 0!==r)return}else if(null!=r)return;a[t.name]=il(l)&&il(a[t.name])?{...a[t.name],...l}:l}),Object.entries(a).forEach(([e,a])=>n(e,a))},[]),e(t,{children:h.map((t,l)=>{const s=Object.entries(r||{}).map(([e,a])=>({name:e,key:e,value:a}));if(t.renderCondition&&!se(t.renderCondition,a,s))return null;if(t.componentType===P.SourceScopes&&!u)return null;const h=r?.[t.name],g=`${t.name}-${l}`;if(t.componentType===P.FieldGroup)return e(ul,{field:t,value:h,setValue:e=>n(t.name,e),disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:p},g);if(t.componentType===P.CheckboxList&&"flatFields"===t.valueMode){const a=t.checkboxOptions?.map(e=>i[e.id]).find(Boolean);return e(hl,{field:t,value:r||{},setValue:n,errorMessage:a,disabled:o},g)}return e(pl,{field:t,value:h,setValue:e=>n(t.name,e),errorMessage:i[t.name],disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:p},g)})})},ml=gl,vl=({isEnabled:a,setIsEnabled:t,fieldDisabled:l})=>{const r=n();return e(ae,{options:[{icon:Ma,label:"Enable",value:!0,selectedBgColor:r.v2.colors.green[1e3],selectedBorderColor:r.v2.colors.green[400],selectedTextColor:r.v2.colors.green[400]},{icon:Aa,label:"Disable",value:!1,selectedBgColor:r.v2.colors.red[1e3],selectedBorderColor:r.v2.colors.red[500],selectedTextColor:r.v2.colors.red[400]}],size:ue.S,selected:a,setSelected:t,disabled:l})},bl=l.div`
|
|
180
|
-
display: flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
gap: 24px;
|
|
183
|
-
padding: 8px 16px;
|
|
184
|
-
border-radius: 12px;
|
|
185
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
186
|
-
`,fl=l.div`
|
|
187
|
-
flex: 1;
|
|
188
|
-
min-width: 0;
|
|
189
|
-
white-space: pre;
|
|
190
|
-
overflow-x: auto;
|
|
191
|
-
`,yl=({title:t,summary:l,onEdit:r,renderAction:n})=>{const i=Ha(()=>{const e=[];return t&&(e.push({text:t,variant:Qa.Default}),e.push({text:" - ",variant:Qa.Default})),e.push(...l),e},[t,l]);return a(bl,{children:[e(fl,{children:e(et,{parts:i})}),n&&n(),r&&e(g,{"data-id":"sampling-btn-edit-auto-rule",label:he,rightIcon:Pa,variant:v.Text,size:m.S,onClick:r})]})},xl={[Ce.HttpRequest]:"HTTP request",[Ce.HttpResponse]:"HTTP response",[Ce.DbQuery]:"DB query",[Ce.Messaging]:"messaging"};function Cl(e,a,t){return 1===e?a:t??`${a}s`}function kl(e,a){const t=[],l=e.slice(0,3),r=e.slice(3);return l.forEach((e,l)=>{l>0&&t.push({text:", ",variant:Qa.Default}),t.push({text:e,variant:a})}),r.length>0&&t.push({text:` + ${r.length} more`,variant:Qa.Default,tooltipItems:r}),t}const $l=({option:a,formState:t,renderAction:l})=>{const r=Ha(()=>{const e=function(e,a){switch(e){case me.CodeAttributes:return(e=>{const a=Object.values(ke).filter(a=>!!e.codeAttributes?.[a]).map(e=>$e(e).toLowerCase());return a.length?[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},...kl(a,Qa.Endpoint)]:null})(a);case me.PayloadCollection:return(e=>{const a=Object.values(Ce).filter(a=>null!=e.payloadCollection?.[a]).map(e=>xl[e]);return a.length?[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},...kl(a,Qa.Endpoint)]:null})(a);case me.HeadersCollection:return(e=>{const a=(e.headersCollection?.[xe.HeaderKeys]??[]).map(e=>e.trim()).filter(e=>e.length>0);if(!a.length)return null;const t=Cl(a.length,"HTTP header");return[{text:`Collect ${a.length} ${t}`,variant:Qa.Action},{text:"",variant:Qa.Default,tooltipItems:a}]})(a);case me.CustomInstrumentation:return(e=>{const a=(e.customInstrumentations?.[ve.Java]??[]).map(e=>new be(e.className,e.methodName)).filter(e=>e.Verify()),t=(e.customInstrumentations?.[ve.Golang]??[]).map(e=>new fe(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify()),l=(e.customInstrumentations?.[ve.Php]??[]).map(e=>new ye(e.className,e.functionName)).filter(e=>e.Verify());if(!(a.length+t.length+l.length))return null;const r=[];a.length&&r.push(`${a.length} Java ${Cl(a.length,"probe")}`),t.length&&r.push(`${t.length} Go ${Cl(t.length,"probe")}`),l.length&&r.push(`${l.length} PHP ${Cl(l.length,"probe")}`);const n=[...a.map(e=>`Java: ${e.toString()}`),...t.map(e=>`Go: ${e.toString()}`),...l.map(e=>`PHP: ${e.toString()}`)];return[{text:`Apply ${r.join(" + ")}`,variant:Qa.Action},{text:"",variant:Qa.Default,tooltipItems:n}]})(a);case me.NetworkMetrics:return[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},{text:"network flow and TCP stats metrics",variant:Qa.Endpoint}];default:return null}}(a?.type,t);return e?[...e,...at(t.sourceScopes)]:[]},[a?.type,t]),n=0===r.length;return e(yl,{title:n?ge:"Instrumentation Rule Preview",summary:r,renderAction:l})},Sl=({size:a=200,central:t=!1,useInline:l=!1})=>{const{tier:r}=Ya();if(l){if(t)return e(Oa,{size:a});switch(r){case Se.Community:return e(Ea,{size:a});case Se.Onprem:return e(La,{size:a});default:return null}}if(t)return e(Ia,{size:a});switch(r){case Se.Community:return e(Na,{size:a});case Se.Onprem:return e(Ra,{size:a});default:return null}},wl=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"custom",label:"Custom"}],Tl=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"custom",label:"Custom"}],Ml=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],Al=({description:t,options:l,selected:r,onSelect:n,customName:i,customLabel:o,customPlaceholder:d,customValue:p,onCustomChange:u,customInputType:g=H.Number,customMin:m,customMax:v})=>a(s,{$gap:6,children:[e(c,{label:t}),a(h,{$gap:8,$alignItems:"flex-end",children:[e(ae,{options:l,selected:r,setSelected:n}),"custom"===r&&e(X,{name:i,label:o,placeholder:d,type:g,value:p,onChange:u,width:160,min:m,max:v})]})]}),Pl=()=>{},Ol=a=>a.readOnly?e(Ll,{rule:a.rule}):e(El,{ruleType:a.ruleType,formState:a.formState,onChange:a.onChange}),Ll=({rule:t})=>{const l=null!=t.durationAtLeastMs;return t.error?e(Q,{richTitle:{title:we},children:e(O,{name:"sampling-view-toggle-keep-errors",onChange:Pl,value:!0,size:E.S,label:Te,labelAlign:L.Right})}):l?e(Q,{richTitle:{title:Me},children:a("div",{children:[e(d,{size:u.XXXS,color:p.Secondary,children:Ae}),e(d,{size:u.XS,children:`${t.durationAtLeastMs}ms`})]})}):null},El=({ruleType:a,formState:t,onChange:l})=>{const r=ja(e=>l({durationPreset:e}),[l]),n=ja(e=>l({customDurationMs:e.target.value}),[l]);return"Duration"===a?e(Q,{richTitle:{title:Me,subTitle:Pe},children:e(Al,{description:Ae,options:Ml,selected:t.durationPreset,onSelect:r,customName:"sampling-input-custom-duration",customLabel:Oe,customPlaceholder:"200ms",customValue:t.customDurationMs,onCustomChange:n})}):null},Il=l.div`
|
|
192
|
-
display: flex;
|
|
193
|
-
gap: 32px;
|
|
194
|
-
`,Rl=l.div`
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
gap: 4px;
|
|
198
|
-
`,Nl=l.div`
|
|
199
|
-
display: flex;
|
|
200
|
-
flex-wrap: wrap;
|
|
201
|
-
align-items: flex-end;
|
|
202
|
-
gap: 16px;
|
|
203
|
-
`,Vl=l.div`
|
|
204
|
-
display: flex;
|
|
205
|
-
align-items: flex-end;
|
|
206
|
-
gap: 16px;
|
|
207
|
-
padding: 12px 16px;
|
|
208
|
-
border-radius: 8px;
|
|
209
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
210
|
-
`,Dl=l.div`
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: flex-end;
|
|
213
|
-
gap: 10px;
|
|
214
|
-
flex: 1;
|
|
215
|
-
`,zl=l.div`
|
|
216
|
-
display: flex;
|
|
217
|
-
align-items: center;
|
|
218
|
-
height: 32px;
|
|
219
|
-
`,_l=l.div`
|
|
220
|
-
display: flex;
|
|
221
|
-
align-items: flex-end;
|
|
222
|
-
gap: 16px;
|
|
223
|
-
margin-bottom: 12px;
|
|
224
|
-
`,Xl="Any",Hl="Kafka topic",Bl=()=>e("div",{style:{marginBottom:"8px"},children:e(d,{size:u.XS,weight:500,children:"And"})}),jl=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],ql=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Ul=[{id:"",label:Xl},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}],Gl=a=>a.readOnly?e(Kl,{data:a.data}):e(Fl,{category:a.category,formState:a.formState,onChange:a.onChange}),Kl=({data:t})=>{const l=Ha(()=>(e=>{if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:Ue,value:qe},{id:"route",title:ze,value:a.httpServer.route||a.httpServer.routePrefix||Ge},{id:"method",title:Be,value:a.httpServer.method||Xl}];if(a?.httpClient){const e=[{id:"type",title:Ue,value:Ke}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:ze,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||Ge}),e.push({id:"method",title:Be,value:a.httpClient.method||Xl}),e}return[{id:"type",title:Ue,value:Fe}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:Ue,value:qe},{id:"route",title:ze,value:a.httpServer.route||a.httpServer.routePrefix||Ge},{id:"method",title:Be,value:a.httpServer.method||Xl}]:a?.kafkaConsumer?[{id:"type",title:Ue,value:We},{id:"topic",title:Hl,value:a.kafkaConsumer.kafkaTopic||Ge}]:a?.kafkaProducer?[{id:"type",title:Ue,value:Je},{id:"topic",title:Hl,value:a.kafkaProducer.kafkaTopic||Ge}]:[{id:"type",title:Ue,value:Fe}]})(t),[t]);return e(Q,{richTitle:{title:Le},children:e(Il,{children:l.map(({id:t,title:l,value:r})=>a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))})})},Fl=({category:t,formState:l,onChange:r})=>{const n=Ha(()=>"noisy"===t?jl:ql,[t]),i=ja(e=>r({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[r]),o=ja(e=>a=>{a&&r({routeType:e,route:""})},[r]),c=ja(e=>r({route:e.target.value}),[r]),d=ja(e=>r({serverAddress:e.target.value}),[r]),p=ja(e=>r({method:e[0]||""}),[r]),u=ja(e=>r({kafkaTopic:e.target.value}),[r]),h="httpServer"===l.operationType||"httpClient"===l.operationType,g="kafkaConsumer"===l.operationType||"kafkaProducer"===l.operationType,b="httpClient"===l.operationType?De:ze,f="httpClient"===l.operationType?_e:Xe;return a(Q,{richTitle:{title:`2. ${Le}`,subTitle:Ee},children:[e(s,{$alignItems:"flex-start",children:e(ae,{options:n,selected:l.operationType,setSelected:i})}),h&&a(Nl,{children:["httpClient"===l.operationType&&a(_l,{children:[e(X,{name:"sampling-input-server-address",label:Re,placeholder:Ie,value:l.serverAddress,onChange:d}),e(Bl,{})]}),a(Vl,{children:[a(Dl,{children:[e(zl,{children:e(Ne,{"data-id":"sampling-radio-route",value:"route"===l.routeType,onChange:o("route")})}),e(X,{name:"sampling-input-route",label:b,placeholder:Ve,value:"route"===l.routeType?l.route:"",onChange:c,disabled:"route"!==l.routeType})]}),a(Dl,{children:[e(zl,{children:e(Ne,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===l.routeType,onChange:o("routePrefix")})}),e(X,{name:"sampling-input-route-prefix",label:f,placeholder:Ve,value:"routePrefix"===l.routeType?l.route:"",onChange:c,disabled:"routePrefix"!==l.routeType})]})]}),a(_l,{children:[e(Bl,{}),e(He,{label:Be,items:Ul,selectedIds:[l.method||""],setSelectedIds:e=>p(e),buttonProps:{"data-id":"sampling-btn-method",label:Ul.find(e=>e.id===l.method)?.label||Xl,size:m.S,variant:v.Secondary}})]})]}),g&&e(X,{name:"sampling-input-kafka-topic",label:je,placeholder:"Type kafka topic",value:l.kafkaTopic,onChange:u,width:"320px"})]})},Wl=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Jl=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}],Yl=a=>a.readOnly?e(Zl,{data:a.data}):e(Ql,{category:a.category,formState:a.formState,onChange:a.onChange}),Zl=({data:t})=>{const l=Ha(()=>(e=>{switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:Ze,method:aa,description:Qe,value:`${e.rule.percentageAtLeast}%`}:{title:Ze,method:la,description:null,value:null};case"noisy":return tt(e.rule.percentageAtMost)?{title:Ze,method:ta,description:null,value:null}:{title:Ze,method:aa,description:ea,value:`${e.rule.percentageAtMost}%`};case"costReduction":return{title:Ze,method:aa,description:ea,value:`${e.rule.percentageAtMost}%`}}})(t),[t]),r=[{id:"method",title:Be,value:l.method},...null!=l.description?[{id:"value",title:l.description,value:l.value}]:[]];return e(Q,{richTitle:{title:l.title},children:e(Il,{children:r.map(({id:t,title:l,value:r})=>a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))})})},Ql=({category:t,formState:l,onChange:r})=>{const n="highlyRelevant"===t,i=n?Jl:Wl,o=`${n?4:3}. ${Ze}`,c=Ye[t],d=n?Qe:ea,p="noisy"===t?Tl:wl,u=ja(e=>r({percentageMode:e}),[r]),h=ja(e=>r({percentagePreset:e}),[r]),g=ja(e=>r({customPercentage:e.target.value}),[r]);return a(Q,{richTitle:{title:o,subTitle:c},children:["costReduction"!==t&&e(s,{$alignItems:"flex-start",children:e(ae,{options:i,selected:l.percentageMode,setSelected:u})}),("costReduction"===t||"sample"===l.percentageMode)&&e(Al,{description:d,options:p,selected:l.percentagePreset,onSelect:h,customName:"sampling-input-custom-percentage",customPlaceholder:"5%",customValue:l.customPercentage,onCustomChange:g,customInputType:H.Decimal,customMin:0,customMax:100})]})},er=l.div`
|
|
225
|
-
display: flex;
|
|
226
|
-
align-items: flex-end;
|
|
227
|
-
gap: 16px;
|
|
228
|
-
`,ar=l.div`
|
|
229
|
-
width: 280px;
|
|
230
|
-
flex-shrink: 0;
|
|
231
|
-
`,tr=l.div`
|
|
232
|
-
flex: 1;
|
|
233
|
-
min-width: 0;
|
|
234
|
-
`;function lr(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":pa[e.category]}const rr=a=>a.readOnly?e(nr,{data:a.data}):e(ir,{formState:a.formState,onChange:a.onChange}),nr=({data:t})=>{const l=Ha(()=>[{id:"name",title:na,value:t.rule.name||ra},{id:"type",title:ia,value:lr(t)}],[t]),r=t.rule.notes||Ge;return a(Q,{children:[e(Il,{children:l.map(({id:t,title:l,value:r})=>a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))}),a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,children:oa}),e(d,{size:u.XS,children:r})]})]})},ir=({formState:t,onChange:l})=>{const r=ja(e=>l({name:e.target.value}),[l]),n=ja(e=>l({notes:e.target.value}),[l]);return e(Q,{children:a(er,{children:[e(ar,{children:e(X,{name:"sampling-input-rule-name",label:na,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:sa,value:t.name,onChange:r})}),e(tr,{children:e(X,{name:"sampling-input-note",label:oa,tooltip:da,placeholder:ca,value:t.notes,onChange:n})})]})})},or=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}],sr=({formState:a,onChange:t})=>{const l=ja(e=>t({ruleType:e,keepErrors:"Error"===e}),[t]);return e(Q,{richTitle:{title:`3. ${ia}`,subTitle:ua},children:e(s,{$alignItems:"flex-start",children:e(ae,{options:or,selected:a.ruleType,setSelected:l})})})},cr=a=>{const t=Ha(()=>{if(a.readOnly)return a.summary;switch(a.category){case"noisy":return nt(st(a.formState));case"highlyRelevant":return rt(ot(a.formState));case"costReduction":return lt(it(a.formState))}},[a]);if(a.readOnly)return e(yl,{title:ha,summary:t,renderAction:a.renderAction});const l=1===t.length&&"default"===t[0].variant;return e(yl,{title:l?ge:ha,summary:l?[]:t,renderAction:a.renderAction})},dr=(e,a)=>!a?.length||!!a?.find(a=>a===e),pr=({title:t="Signals",required:l,errorMessage:r,allowedSignals:n,selectedSignals:i,setSelectedSignals:o,disabled:d})=>{const[p,u]=qa(1===i.length),g=Ba(JSON.stringify(i));return Ua(()=>{let e=ga(i).filter(e=>dr(e,n));e.length||(e=ma.filter(({id:e})=>dr(e,n)).map(({id:e})=>e));const a=JSON.stringify(e);g.current!==a&&(g.current=a,o(e),u(1===e.length))},[n,i]),a(s,{$gap:12,children:[e(c,{label:t,required:l}),e(h,{$gap:12,children:ma.map(a=>{const t=dr(a.id,n),l=((e,a)=>!!a?.find(a=>a===e))(a.id,i);return t?e(R,{label:a.value,disabled:d||!t||p&&l,value:l,onChange:e=>((e,a)=>{const t=e,l=a?[...i,t]:i.filter(e=>e!==t);o(l),u(1===l.length)})(a.id,e)},a.id):null})}),e(b,{errorMessage:r})]})},ur=({minSupportedVersion:a,currentVersion:t})=>e(f,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>e(A,{scale:2.4,icon:()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:e("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:M.UPGRADE_REQUIRED,description:`${M.UPGRADE_TO_USE_FEATURE(a)}\n${M.CURRENT_VERSION(t)}`}),hr=l.div`
|
|
235
|
-
display: flex;
|
|
236
|
-
flex-direction: column;
|
|
237
|
-
justify-content: flex-end;
|
|
238
|
-
width: ${({$width:e})=>e};
|
|
239
|
-
gap: ${({$columnHasHeader:e})=>e?"0":"12px"};
|
|
240
|
-
`,gr=l.div`
|
|
241
|
-
display: flex;
|
|
242
|
-
align-items: center;
|
|
243
|
-
min-height: 24px;
|
|
244
|
-
padding: 12px;
|
|
245
|
-
border-radius: 16px 16px 0 0;
|
|
246
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
247
|
-
`,mr=l.div`
|
|
248
|
-
display: flex;
|
|
249
|
-
flex-direction: column;
|
|
250
|
-
gap: ${({$gap:e})=>e}px;
|
|
251
|
-
padding: 12px 12px 0 12px;
|
|
252
|
-
width: 100%;
|
|
253
|
-
height: ${({$heightOffset:e,$columnHasHeader:a})=>`calc(100vh - 180px - ${e}px ${a?"- 48px":""})`};
|
|
254
|
-
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"};
|
|
255
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
256
|
-
overflow-y: auto;
|
|
257
|
-
overflow-x: hidden;
|
|
258
|
-
`,vr=({isLeft:l,isRight:r,heightOffset:n=0,width:i,header:o,list:s})=>a(hr,{$width:i,$columnHasHeader:!!o,children:[o&&e(gr,{children:o}),e(mr,{$gap:8,$isLeft:l,$isRight:r,$heightOffset:n,$columnHasHeader:!!o,children:s.length?s.length>1?e(va,{gap:8,elements:s}):e(t,{children:s[0]}):e(ba,{$height:"100%",children:e($,{})})})]}),br="75vw",fr=l.div`
|
|
259
|
-
display: flex;
|
|
260
|
-
flex-direction: column;
|
|
261
|
-
border-radius: 16px;
|
|
262
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
263
|
-
overflow: hidden;
|
|
264
|
-
`,yr=l.div`
|
|
265
|
-
display: flex;
|
|
266
|
-
gap: 12px;
|
|
267
|
-
padding: 16px 16px 0 16px;
|
|
268
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
269
|
-
position: sticky;
|
|
270
|
-
top: 0;
|
|
271
|
-
`,xr=l.div`
|
|
272
|
-
padding: 12px 12px 0 12px;
|
|
273
|
-
`,Cr=l.div`
|
|
274
|
-
display: flex;
|
|
275
|
-
gap: 12px;
|
|
276
|
-
padding: 16px;
|
|
277
|
-
`,kr=l.div`
|
|
278
|
-
padding: 5vh 10vw;
|
|
279
|
-
border-radius: 12px;
|
|
280
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
281
|
-
`,$r=Ka(({isOpen:t,withOverlay:l,disableAnimation:r,onClose:n,onBack:o,onNext:s,nextIsSkip:c,onSave:d,disableSave:p,connectionIds:h,header:g,subHeader:m,leftColumn:b,rightColumn:y,search:x,filters:C,errorMessage:k,isFormDirty:$,allowSaveWhenPristine:S,hideDirtyNote:w,forcedNote:T,isFetching:M,progress:A},P)=>{const[O,L]=qa(!1),[E,I]=qa(!1),[R,N]=qa(void 0);Fa(P,()=>({clearErrors:()=>N(void 0)}));const V=E,D=ja(()=>{$&&!O?L(!0):(L(!1),n?.())},[$,O,n]),z=p||E||!S&&"boolean"==typeof $&&!$,_=ja(async()=>{I(!0);const e=await d();I(!1),!1!==e&&(e?.error?N(e.error):(h?.setValue([]),n?.()))},[d,h,n]),X=!!x||!!h||!!C,H=!!m,B=(X?48:0)+(H?50:0),j=Ha(()=>T||(M?{status:q.Info,message:"Fetching Data..."}:E&&!A?{status:q.Info,message:"Saving Changes..."}:R||k?{status:q.Error,message:R||k}:"boolean"!=typeof $||w?void 0:$?{status:q.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:{status:q.Success,message:"The values reflect the current configuration of the selected cluster."}),[M,E,A,R,k,$,w,T]),U=Ha(()=>o?{label:"Back",leftIcon:Va,variant:v.Secondary,onClick:o}:{label:"Cancel",variant:v.Secondary,onClick:D,disabled:V},[o,D,V]),[G,K]=qa(!1),F=Ha(()=>s?c?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:Da,variant:v.Secondary,onClick:()=>K(!0)}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:Da,variant:v.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:v.Primary,onClick:_,disabled:z},[s,c,_,z]);return a(i,{width:br,isOpen:t,disableAnimation:r,hideOverlay:!E&&!l,header:{...g,onClose:n?D:void 0,onCloseDisabled:V},footer:{note:j,actions:[U,F]},children:[E?e(ba,{$height:"calc(100vh - 136px)",children:e(kr,{children:e(fa,{titleSize:u.S,subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,...A})})}):a(fr,{children:[X&&a(yr,{children:[h&&e(ya,{icon:Ma,title:"Selected Clusters",badge:{label:h.value.length}}),x&&e(xa,{...x,width:x.width??"100%"}),C]}),H&&e(xr,{children:e(ya,{icon:m.icon,title:m.title,subTitle:m.description,badge:m.badge})}),a(Cr,{children:[e(vr,{isLeft:!0,heightOffset:B,...b}),e(vr,{isRight:!0,heightOffset:B,...y})]})]}),e(Pt,{isOpen:O,onClose:()=>L(!1),onApprove:D}),e(f,{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:G,onClose:()=>K(!1),denyButton:{label:"Go Back",variant:v.Secondary,onClick:()=>K(!1)},approveButton:{label:"Skip",variant:v.Primary,onClick:()=>{s?.(),K(!1)}}})]})});$r.displayName=$r.name;const Sr=l.div`
|
|
282
|
-
padding: 0 24px;
|
|
283
|
-
border-radius: 12px;
|
|
284
|
-
background-color: ${({$codeBgColor:e})=>e||"transparent"};
|
|
285
|
-
`,wr=l.div`
|
|
286
|
-
display: flex;
|
|
287
|
-
flex-direction: column;
|
|
288
|
-
gap: 8px;
|
|
289
|
-
width: 100%;
|
|
290
|
-
padding: 8px;
|
|
291
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[700]};
|
|
292
|
-
border-radius: 12px;
|
|
293
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
294
|
-
`,Tr=l.div`
|
|
295
|
-
display: flex;
|
|
296
|
-
align-items: center;
|
|
297
|
-
gap: 4px;
|
|
298
|
-
width: 100%;
|
|
299
|
-
`,Mr=l.div`
|
|
300
|
-
flex: 1;
|
|
301
|
-
min-width: 0;
|
|
302
|
-
`,Ar=l.div`
|
|
303
|
-
width: 100%;
|
|
304
|
-
max-height: 180px;
|
|
305
|
-
overflow: auto;
|
|
306
|
-
padding: 0 12px;
|
|
307
|
-
|
|
308
|
-
pre {
|
|
309
|
-
margin: 0;
|
|
310
|
-
}
|
|
311
|
-
`,Pr=({title:t="YAML",yaml:l,defaultOpen:r,fullHeight:n,bgTint:i="1000",codeBgColor:o,compact:s})=>{const{clickCopy:c,isCopied:h,CopyButton:g}=y(),b=Ha(()=>l?[{id:ka(),type:Ca.Button,buttonProps:{variant:v.Text,size:m.S,leftIcon:h?Sa:za,onClick:()=>c(l||""),disabled:h}}]:[],[l,h]);return s?a(wr,{children:[a(Tr,{children:[e(_a,{size:16}),e(Mr,{children:e(d,{size:u.XXS,color:p.Primary,children:t})}),l&&e(g,{value:l})]}),l?e(Ar,{children:e(w,{code:l,language:"yaml",theme:"duotoneDark"})}):e($,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})]}):e(S,{bgTint:i,richTitle:{icon:_a,title:t},actions:b,withCollapse:!0,collapseIsDefaultOpen:r,fullHeight:n,children:e(Sr,{$codeBgColor:o,children:l?e(w,{code:l,language:"yaml",theme:"duotoneDark"}):e(ba,{children:e($,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{At as A,Pt as C,Ml as D,vl as E,$l as I,Tl as N,Sl as O,wl as P,rr as R,cr as S,ur as U,br as W,Pr as Y,Et as a,It as b,Rt as c,Ol as d,ml as e,Nt as f,gl as g,Gl as h,Yl as i,Al as j,sr as k,pr as l,Ft as m,$r as n,Tt as o,yl as p};
|