@odigos/ui-kit 0.0.225 → 0.0.227
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/CHANGELOG.md +28 -0
- package/lib/chunks/index-B0b5lJH3.js +3 -0
- package/lib/chunks/index-C-Z4QHpA.js +149 -0
- package/lib/chunks/ui-components-C7i9zbc-.js +2652 -0
- package/lib/components/_v2/cards/data-card/index.d.ts +16 -3
- package/lib/components/_v2/charts/gauge-chart/index.d.ts +18 -0
- package/lib/components/_v2/charts/index.d.ts +1 -0
- package/lib/components/_v2/condition/index.d.ts +13 -0
- package/lib/components/_v2/conditions/index.d.ts +8 -0
- package/lib/components/_v2/drawer/header/index.d.ts +6 -1
- package/lib/components/_v2/drop-data/index.d.ts +1 -0
- package/lib/components/_v2/icon-button/index.d.ts +1 -0
- package/lib/components/_v2/index.d.ts +3 -0
- package/lib/components/_v2/tag/index.d.ts +2 -1
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/add-destination-drawer/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/index.d.ts +3 -1
- package/lib/containers/_v2/_drawers/edit-action-drawer/helpers.d.ts +12 -0
- package/lib/containers/_v2/_drawers/edit-action-drawer/index.d.ts +9 -0
- package/lib/containers/_v2/_drawers/edit-destination-drawer/helpers.d.ts +11 -0
- package/lib/containers/_v2/_drawers/edit-destination-drawer/index.d.ts +11 -0
- package/lib/containers/_v2/_drawers/edit-rule-drawer/helpers.d.ts +13 -0
- package/lib/containers/_v2/_drawers/edit-rule-drawer/index.d.ts +9 -0
- package/lib/containers/_v2/_drawers/index.d.ts +3 -0
- package/lib/containers/_v2/_forms/add-action-form/index.d.ts +0 -1
- package/lib/containers/_v2/_forms/add-destination-form/index.d.ts +8 -4
- package/lib/containers/_v2/_forms/add-rule-form/index.d.ts +0 -1
- package/lib/containers/_v2/_forms/index.d.ts +0 -1
- package/lib/containers/_v2/onboarding/summary/index.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/enum.d.ts +4 -0
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-badge.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/general-info/helpers/get-general-gauge-cards.d.ts +4 -0
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-status-card.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-text-cards.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-title.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/index.d.ts +2 -1
- package/lib/containers/_v2/pipeline-collectors/general-info/index.d.ts +7 -6
- package/lib/containers/_v2/pipeline-collectors/index.d.ts +5 -0
- package/lib/containers/_v2/pipeline-collectors/toolbar/index.d.ts +1 -11
- package/lib/containers/source-drawer/profiling/flamebearer.d.ts +5 -0
- package/lib/containers/v2.js +43 -56
- package/lib/containers.js +45 -45
- package/lib/contexts/action-form-context.d.ts +19 -0
- package/lib/{containers/_v2/_forms/add-destination-form/context.d.ts → contexts/destination-form-context.d.ts} +5 -4
- package/lib/contexts/index.d.ts +4 -0
- package/lib/contexts/rule-form-context.d.ts +19 -0
- package/lib/contexts/source-instrument-form-context.d.ts +22 -0
- package/lib/contexts.js +1 -1
- package/lib/functions/get-status-color/index.d.ts +2 -2
- package/lib/functions/get-status-icon/index.d.ts +2 -2
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/yaml-section-card/index.d.ts +2 -0
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +36 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-BMJ_MZzY.js +0 -149
- package/lib/chunks/index-Dlnglk_e.js +0 -3
- package/lib/chunks/ui-components-BqdkaDt2.js +0 -2543
- package/lib/components/_v2/cards/section-part-card/index.d.ts +0 -11
- package/lib/containers/_v2/_forms/add-action-form/context.d.ts +0 -18
- package/lib/containers/_v2/_forms/add-rule-form/context.d.ts +0 -18
- package/lib/containers/_v2/_forms/add-source-form/context.d.ts +0 -21
- package/lib/containers/_v2/_forms/add-source-form/index.d.ts +0 -1
|
@@ -0,0 +1,2652 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{css as n,useTheme as i,keyframes as a,ThemeProvider as s}from"styled-components";import{SamplerIcon as l,PiiMaskingIcon as c,ActionIcon as d,RenameAttributeIcon as p,DeleteAttributeIcon as u,AddClusterInfoIcon as h,K8sLogo as m,ImageErrorIcon as g,KafkaLogo as f,RedisLogo as x,PostgresLogo as y,NginxLogo as b,MysqlLogo as v,ElixirLogo as $,SwiftLogo as w,RustLogo as S,RubyLogo as k,PhpLogo as C,CPlusPlusLogo as E,CSharpLogo as A,DotnetLogo as D,PythonLogo as T,NodejsLogo as I,GoLogo as N,JavaLogo as O,AwsXrayLogo as R,VictoriaMetricsLogo as _,UptraceLogo as F,TraceloopLogo as P,TingyunLogo as L,TempoLogo as z,TelemetryHubLogo as M,SumoLogicLogo as B,SplunkLogo as U,SignozLogo as j,SeqLogo as W,AwsS3Logo as H,QuickwitLogo as X,GigapipeLogo as G,QrynLogo as V,PrometheusLogo as K,OpenTelemetryLogo as q,OracleLogo as J,OpsVerseLogo as Y,OpenObserveLogo as Q,OneUptimeLogo as Z,OdigosLogo as ee,ObserveLogo as te,NewRelicLogo as re,MiddlewareLogo as oe,LumigoLogo as ne,LokiLogo as ie,LogzioLogo as ae,LightstepLogo as se,Last9Logo as le,KloudmateLogo as ce,JaegerLogo as de,InstanaLogo as pe,HyperDxLogo as ue,HoneycombLogo as he,GroundcoverLogo as me,GreptimeLogo as ge,GrafanaLogo as fe,GoogleCloudPlatformLogo as xe,ElasticSearchLogo as ye,ElasticApmLogo as be,DynatraceLogo as ve,DatadogLogo as $e,Dash0Logo as we,CoralogixLogo as Se,AwsCloudwatchLogo as ke,ClickhouseLogo as Ce,ChronosphereLogo as Ee,ChecklyLogo as Ae,CauselyLogo as De,BonreeLogo as Te,BetterStackLogo as Ie,AzureMonitorLogo as Ne,AzureBlobLogo as Oe,AxiomLogo as Re,AppDynamicsLogo as _e,AlibabaCloudLogo as Fe,AlaudaLogo as Pe,SamplingIcon as Le,InstrumentationRuleIcon as ze,DestinationIcon as Me,SourceIcon as Be,NamespacesIcon as Ue,PayloadCollectionIcon as je,HeadersCollectionIcon as We,CustomInstrumentationIcon as He,CodeAttributesIcon as Xe,TracesIcon as Ge,MetricsIcon as Ve,LogsIcon as Ke,VmLogo as qe,DotsHorizontalIcon as Je,QuestionCircleIcon as Ye,XSquareIcon as Qe,VSquareIcon as Ze,ExclamationTriangleIcon as et,ExclamationCircleIcon as tt,ISquareIcon as rt,AwsLogo as ot,AwsSecretsManagerLogo as nt,AwsStepFunctionsLogo as it,AwsEventBridgeLogo as at,AwsBedrockLogo as st,AwsApiGatewayLogo as lt,AwsEc2Logo as ct,AwsKinesisLogo as dt,AwsLambdaLogo as pt,AwsSnsLogo as ut,AwsSqsLogo as ht,AwsDynamoDbLogo as mt,AwsStsLogo as gt,VIcon as ft,CopyIcon as xt,XIcon as yt,MinusIcon as bt,ListIcon as vt,CodeIcon as $t,ExtendArrowIcon as wt,PlusIcon as St,EditIcon as kt,NoDataIcon as Ct,RefreshIcon as Et,EyeClosedIcon as At,EyeOpenIcon as Dt,SearchIcon as Tt,TrashIcon as It,EditedIcon as Nt,SortArrowsIcon as Ot,NotebookIcon as Rt,ChevronUpIcon as _t,ChevronDownIcon as Ft,ArrowIcon as Pt,DotsVerticalIcon as Lt,DotIcon as zt,FilterIcon as Mt}from"../icons.js";import{create as Bt}from"zustand";import{Fragment as Ut,useState as jt,useEffect as Wt,useMemo as Ht,useRef as Xt,useCallback as Gt,useContext as Vt,createContext as Kt,forwardRef as qt,memo as Jt,useLayoutEffect as Yt}from"react";import Qt from"javascript-time-ago";import{p as Zt,c as er,s as tr,l as rr}from"./vendor-C150cdxb.js";import{Handle as or,Position as nr,ReactFlowProvider as ir,ReactFlow as ar,Controls as sr,ControlButton as lr,useReactFlow as cr}from"@xyflow/react";import dr,{createPortal as pr}from"react-dom";import{Highlight as ur,themes as hr}from"prism-react-renderer";import{ErrorBoundary as mr}from"react-error-boundary";import gr from"lottie-react";import{VList as fr}from"virtua";const xr=e=>e.charAt(0).toUpperCase()+e.slice(1),yr=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),r=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,r(o)]:[e,o]));return Object.entries(e).reduce((e,[o,n])=>{try{const i=JSON.parse(n);Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]="object"==typeof i&&null!==i?JSON.stringify(r(i)):n}catch(i){"object"==typeof n&&null!==n?Array.isArray(n)?e[o]=JSON.stringify(t(n)):e[o]=JSON.stringify(r(n)):e[o]=n}return e},{})};var br;!function(e){e.SIGNALS="SIGNALS"}(br||(br={}));const vr=(e,t,r)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,n,i]=e;if(o===br.SIGNALS)switch(n){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=r.find(e=>e.name===o||e.key===o);if(!a)return!1;switch(n){case"===":case"==":return a.value===i;case"!==":case"!=":return a.value!==i;case">":return Number(a.value)>Number(i);case"<":return Number(a.value)<Number(i);case">=":return Number(a.value)>=Number(i);case"<=":return Number(a.value)<=Number(i);default:return!0}},$r=e=>JSON.parse(JSON.stringify(e)),wr=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),Sr=(e,t,r)=>{const o=t.split(".");let n=e;for(let e=0;e<o.length-1;e++)o[e]in n&&"object"==typeof n[o[e]]||(n[o[e]]={}),n=n[o[e]];n[o[o.length-1]]=r},kr=(e,t)=>{let r=[...e];return t.monitors?.length&&(r=r.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),r},Cr=(e,t)=>{let r=[...e];return t.monitors?.length&&(r=r.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),r},Er=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var Ar,Dr,Tr,Ir,Nr,Or,Rr,_r,Fr,Pr,Lr,zr,Mr,Br,Ur,jr,Wr,Hr,Xr,Gr,Vr,Kr,qr,Jr,Yr,Qr,Zr,eo,to,ro,oo,no,io,ao,so,lo,co,po,uo,ho,mo,go;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(Ar||(Ar={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler",e.URLTemplatization="URLTemplatization"}(Dr||(Dr={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters",e.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups"}(Tr||(Tr={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(Ir||(Ir={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Nr||(Nr={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(Or||(Or={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Rr||(Rr={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}(_r||(_r={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Fr||(Fr={})),function(e){e.Ascending="ascending",e.Descending="descending"}(Pr||(Pr={})),function(e){e.Community="community",e.Onprem="onprem"}(Lr||(Lr={})),function(e){e.K8s="k8s",e.Vm="vm"}(zr||(zr={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Mr||(Mr={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Br||(Br={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Ur||(Ur={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(jr||(jr={})),function(e){e.DataStream="DataStream"}(Wr||(Wr={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle",e.Time="time"}(Hr||(Hr={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(Xr||(Xr={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Gr||(Gr={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Vr||(Vr={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Kr||(Kr={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(qr||(qr={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(Jr||(Jr={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data",e.OdiLogo="odilogo"}(Yr||(Yr={})),function(e){e.Labeled="labeled"}(Qr||(Qr={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Zr||(Zr={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GoogleCloudOTLP="googlecloudotlp",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signalfx="signalfx",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray"}(eo||(eo={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.Pod="Pod",e.StaticPod="StaticPod",e.Rollout="Rollout",e.ConfigMap="ConfigMap",e.DeploymentConfig="DeploymentConfig"}(to||(to={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(ro||(ro={})),function(e){e.Error="Error",e.Failure="Failure",e.Notice="Notice",e.Pending="Pending",e.Waiting="Waiting",e.Unsupported="Unsupported",e.Disabled="Disabled",e.Success="Success",e.Irrelevant="Irrelevant",e.Unknown="Unknown"}(oo||(oo={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(no||(no={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(io||(io={})),function(e){e.HeaderKeys="headerKeys"}(ao||(ao={})),function(e){e.Java="java",e.Golang="golang"}(so||(so={}));class fo{className;methodName;constructor(e,t){this.className=e,this.methodName=t}Verify(){return!!this.className&&!!this.methodName}toString(){return this.Verify()?`${this.className}.${this.methodName}`:"[Faulty Java Probe]"}}class xo{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,r,o){this.packageName=e,this.functionName=t||"",this.receiverName=r||"",this.receiverMethodName=o||""}Verify(){return!!this.packageName&&(this.functionName?!(this.receiverMethodName||this.receiverName):!(!this.receiverMethodName||!this.receiverName))}toString(){return this.Verify()?this.functionName?`${this.packageName}.${this.functionName}`:this.receiverName&&this.receiverMethodName?`${this.packageName}.(${this.receiverName}).${this.receiverMethodName}`:"":"[Faulty Golang Probe]"}}!function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(lo||(lo={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(co||(co={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(po||(po={})),function(e){e.ContainerCreating="ContainerCreating",e.CrashLoopBackOff="CrashLoopBackOff",e.CreateContainerError="CreateContainerError",e.CreateContainerConfigError="CreateContainerConfigError",e.ErrImagePull="ErrImagePull",e.ErrImageNeverPull="ErrImageNeverPull",e.ImagePullBackOff="ImagePullBackOff",e.InvalidImageName="InvalidImageName",e.RegistryUnavailable="RegistryUnavailable",e.NetworkNotReady="NetworkNotReady",e.Running="Running",e.Completed="Completed",e.Error="Error",e.OOMKilled="OOMKilled",e.ContainerCannotRun="ContainerCannotRun",e.DeadlineExceeded="DeadlineExceeded",e.StartError="StartError"}(uo||(uo={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(ho||(ho={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES"}(mo||(mo={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(go||(go={}));const yo={[mo.Logs]:go.Logs,[mo.Metrics]:go.Metrics,[mo.Traces]:go.Traces},bo={[go.Logs]:mo.Logs,[go.Metrics]:mo.Metrics,[go.Traces]:mo.Traces},vo=(e,t)=>{let r=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));r=r.filter(({namespace:t})=>e.has(t))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));r=r.filter(({kind:t})=>e.has(t))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));r=r.filter(({containers:t})=>t?.some(t=>{const r=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!r&&e.has(r)}))}if(t.conditions?.length){const e=new Set(t.conditions.map(({id:e})=>e));r=r.filter(({conditions:t})=>t?.some(({type:t,reason:r})=>e.has(`${t}#${r}`)))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));r=r.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum)||e.has(t?.message))}if(t.onlyErrors&&(r=r.filter(e=>e.conditions?.some(e=>e.status===Gr.Error))),t.errors?.length){const e=new Set(t.errors.map(({id:e})=>e));r=r.filter(t=>t.conditions?.some(t=>e.has(t.message)))}return r},$o="https://docs.odigos.io",wo="default",So="this-cluster",ko="This Cluster",Co={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Eo={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},Ao={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos."},Do={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},To=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===wo&&!e.dataStreamNames.length):[],Io=(e,t="",r={})=>{for(const o in e)if(e.hasOwnProperty(o)){const n=e[o],i=t?`${t}.${o}`:o;null===n||"object"!=typeof n||Array.isArray(n)?Array.isArray(n)?n.forEach((e,t)=>{const o=`${i}[${t}]`;null!==e&&"object"==typeof e?Io(e,o,r):r[o]=e}):r[i]=n:Io(n,i,r)}return r},No=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},Oo=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},Ro=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>{const o=e[t%16];t++;return("1"===r?o:"0"===r?63&o|128:15&o|64).toString(16)})},_o=e=>{const t=e?.toLowerCase(),r=t?.includes(Ar.Samplers),o=t===Ar.Attributes;if(r)return l;if(o)return c;return{[Dr.K8sAttributes]:m,[Dr.AddClusterInfo]:h,[Dr.DeleteAttributes]:u,[Dr.PiiMasking]:c,[Dr.RenameAttributes]:p,[Dr.URLTemplatization]:d,[Dr.ErrorSampler]:l,[Dr.ProbabilisticSampler]:l,[Dr.LatencySampler]:l,[Dr.ServiceNameSampler]:l,[Dr.SpanAttributeSampler]:l}[e]||g},Fo=e=>{const t=e?.filter(({status:e})=>e===Gr.Error),r=e?.filter(({status:e})=>e===Gr.Warning),o=e?.filter(({status:e})=>e===Kr.Disabled),n=e?.filter(({status:e})=>e===Kr.Loading),i=t.length>0,a=r.length>0,s=o.length>0;return{errors:t,hasErrors:i,warnings:r,hasWarnings:a,disableds:o,hasDisableds:s,loadings:n,hasLoadings:n.length>0,priorotizedStatus:i?Gr.Error:a?Gr.Warning:s?Gr.Info:void 0}},Po=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},Lo=e=>({[Br.Java]:O,[Br.Go]:N,[Br.JavaScript]:I,[Br.Python]:T,[Br.DotNet]:D,[Br.CSharp]:A,[Br.CPlusPlus]:E,[Br.Php]:C,[Br.Ruby]:k,[Br.Rust]:S,[Br.Swift]:w,[Br.Elixir]:$,[Br.MySql]:v,[Br.Nginx]:b,[Br.Postgres]:y,[Br.Redis]:x,[Br.Kafka]:f,[Br.Ignored]:g,[Br.Unknown]:g,[Br.Processing]:g,[Br.NoContainers]:g,[Br.NoRunningPods]:g}[e]||g),zo=e=>e?.map(e=>{return Lo((t=e,t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language??"unknown"));var t})||[],Mo=e=>e?.map(e=>Lo(e))||[],Bo=e=>e.detectedLanguages?.length?Mo(e.detectedLanguages):zo(e.containers),Uo=(e,t)=>{const r={[eo.Alauda]:Pe,[eo.AlibabaCloud]:Fe,[eo.AppDynamics]:_e,[eo.Axiom]:Re,[eo.AzureBlob]:Oe,[eo.AzureMonitor]:Ne,[eo.BetterStack]:Ie,[eo.Bonree]:Te,[eo.Causely]:De,[eo.Checkly]:Ae,[eo.Chronosphere]:Ee,[eo.ClickHouse]:Ce,[eo.CloudWatch]:ke,[eo.Coralogix]:Se,[eo.Dash0]:we,[eo.Datadog]:$e,[eo.Dynamic]:q,[eo.Dynatrace]:ve,[eo.ElasticApm]:be,[eo.ElasticSearch]:ye,[eo.GoogleCloud]:xe,[eo.GoogleCloudOTLP]:xe,[eo.GrafanaCloudLoki]:fe,[eo.GrafanaCloudPrometheus]:fe,[eo.GrafanaCloudTempo]:fe,[eo.Greptime]:ge,[eo.Groundcover]:me,[eo.Honeycomb]:he,[eo.HyperDX]:ue,[eo.Instana]:pe,[eo.Jaeger]:de,[eo.Kafka]:f,[eo.Kloudmate]:ce,[eo.Last9]:le,[eo.Lightstep]:se,[eo.LogzIo]:ae,[eo.Loki]:ie,[eo.Lumigo]:ne,[eo.Middleware]:oe,[eo.NewRelic]:re,[eo.Observe]:te,[eo.Odigos]:ee,[eo.OneUptime]:Z,[eo.OpenObserve]:Q,[eo.Opsverse]:Y,[eo.Oracle]:J,[eo.OTLP]:q,[eo.OTLPHttp]:q,[eo.Prometheus]:K,[eo.Qryn]:V,[eo.QrynOss]:G,[eo.Quickwit]:X,[eo.S3]:H,[eo.Seq]:W,[eo.Signalfx]:U,[eo.Signoz]:j,[eo.Splunk]:U,[eo.SplunkSapm]:U,[eo.SplunkOtlp]:U,[eo.SumoLogic]:B,[eo.TelemetryHub]:M,[eo.Tempo]:z,[eo.Tingyun]:L,[eo.Traceloop]:P,[eo.Uptrace]:F,[eo.VictoriaMetrics]:_,[eo.VictoriaMetricsCloud]:_,[eo.XRay]:R}[e];return r&&!t?{icon:r}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},jo=e=>({[jr.Namespace]:Ue,[jr.Source]:Be,[jr.Destination]:Me,[jr.Action]:d,[jr.InstrumentationRule]:ze,[jr.SamplingRule]:Le}[e]),Wo=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Ho=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Xo=e=>Ho(Wo(e)),Go=(e,t,r)=>{const{extended:o,prioritizeDisplayName:n}=r||{};let i="",a="";switch(t){case jr.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case jr.Source:const r=e;i=r.name,a=r.otelServiceName;break;case jr.Action:const o=e;i=o.type,a=o.name;break;case jr.Destination:const n=e;i=n.destinationType.displayName,a=n.name;break;case jr.Namespace:const s=e;i=s.name,a=s.name}return o?i+(a&&a!==i?` (${a})`:""):n&&a||i},Vo=(e,t)=>{if(t===jr.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[r,o]=e.split("=");t[r]=o}),t}return e},Ko=e=>({[no.CodeAttributes]:Xe,[no.CustomInstrumentation]:He,[no.HeadersCollection]:We,[no.PayloadCollection]:je,[no.UnknownType]:g}[e]||g),qo=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Br.Unknown,Jo=e=>{const{numberOfInstances:t,containers:r}=e;if(!r)return t&&t>0?Br.Processing:Br.NoRunningPods;const o=r?.filter(e=>qo(e)!==Br.Ignored);if(!o.length)return Br.NoContainers;const n=o.find(e=>qo(e)!==Br.Unknown);return n?qo(n):Br.Unknown},Yo=(e,t,r)=>(t===jr.Source?e?.sources.find(e=>e.kind===r.kind&&e.name===r.name&&e.namespace===r.namespace):e?.destinations.find(e=>e.id===r))||{throughput:0},Qo=e=>({[mo.Logs]:Ke,[mo.Metrics]:Ve,[mo.Traces]:Ge}[e]),Zo=e=>{if(!e)return ee;return{[zr.K8s]:m,[zr.Vm]:qe}[e]},en=e=>{if(!e)return"Unknown";return{[zr.K8s]:"Kubernetes Cluster",[zr.Vm]:"Virtual Machine"}[e]},tn=(e,t,r)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[r],n=[];return void 0!==o&&(Array.isArray(o)?n.push(...o):n.push(o)),n.push(...tn(e,t,r)),n}):[]},rn=(e,t)=>{if(t===jr.Source){let t="";return Object.entries(e).forEach(([e,r])=>{t+=`${e}=${r}&`}),t.slice(0,-1),t}return e},on=(e,t,r)=>{switch(t){case Gr.Default:return e.v2.colors.purple[r];case Gr.Info:return e.v2.colors.blue[r];case Gr.Error:return e.v2.colors.red[r];case Gr.Warning:return e.v2.colors.yellow[r];case Gr.Success:return e.v2.colors.green[r];case Kr.Loading:case qr.Disabled:case qr.Unknown:return e.v2.colors.silver[r];default:return e.v2.colors.white[500]}},nn=e=>{switch(e){case co.Updating:case po.Pending:case uo.ContainerCreating:case ho.Waiting:return Gr.Info;case co.Healthy:case po.Succeeded:case po.Running:case uo.Running:case ho.Running:return Gr.Success;case co.Degraded:return Gr.Warning;case co.Failed:case po.Failed:case uo.Error:case uo.CrashLoopBackOff:case uo.CreateContainerError:case uo.CreateContainerConfigError:case uo.ErrImagePull:case uo.ErrImageNeverPull:case uo.ImagePullBackOff:case uo.InvalidImageName:case uo.RegistryUnavailable:case uo.NetworkNotReady:case uo.OOMKilled:case uo.ContainerCannotRun:case ho.Terminated:case uo.DeadlineExceeded:case uo.StartError:return Gr.Error;case co.Down:case uo.Completed:return qr.Disabled;case co.Unknown:case po.Unknown:default:return qr.Unknown}};var an,sn;!function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.P="p",e.Span="span"}(an||(an={})),function(e){e.XXXS="xxxs",e.XXS="xxs",e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e.XXL="xxl",e.XXXL="xxxl"}(sn||(sn={}));const ln=o.p`
|
|
2
|
+
margin: 0;
|
|
3
|
+
color: ${({$color:e,theme:t})=>e||t.v2.colors.grey[50]};
|
|
4
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
5
|
+
font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
|
|
6
|
+
font-weight: ${({$weight:e})=>e};
|
|
7
|
+
text-align: ${({$align:e})=>e};
|
|
8
|
+
text-transform: ${({$transform:e})=>e};
|
|
9
|
+
line-height: ${({theme:e,$lineHeight:t,$size:r})=>t||`${e.v2.text.size[r]+2}px`};
|
|
10
|
+
opacity: ${({$opacity:e})=>e};
|
|
11
|
+
|
|
12
|
+
${({$nowrap:e})=>e&&n`
|
|
13
|
+
text-wrap: nowrap;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
`}
|
|
18
|
+
|
|
19
|
+
${({$underline:e})=>e&&n`
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
`}
|
|
22
|
+
|
|
23
|
+
${({$withClick:e})=>e&&n`
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
&:hover {
|
|
26
|
+
text-decoration: underline;
|
|
27
|
+
}
|
|
28
|
+
`}
|
|
29
|
+
`,cn=({children:r,variant:o=an.P,color:n,size:i=sn.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:p,underline:u,onClick:h,disabled:m,...g})=>{const f=r?.toString().split("\n")||[];return e(ln,{as:o,$color:n,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:p,$underline:u,$withClick:!!h&&!m,onClick:m?void 0:h,...g,children:f.map((r,o)=>t(Ut,{children:[r,o!==f.length-1&&e("br",{})]},`typography-${o}-${r}`))})},dn=o.div`
|
|
30
|
+
border-radius: 100%;
|
|
31
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
32
|
+
position: relative;
|
|
33
|
+
`,pn=o.div`
|
|
34
|
+
width: 80px;
|
|
35
|
+
height: 80px;
|
|
36
|
+
border-radius: 100%;
|
|
37
|
+
border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
|
|
38
|
+
border-right-color: transparent;
|
|
39
|
+
border-left-color: transparent;
|
|
40
|
+
border-bottom-color: transparent;
|
|
41
|
+
animation: spin 1s linear infinite;
|
|
42
|
+
@keyframes spin {
|
|
43
|
+
to {
|
|
44
|
+
transform: rotate(360deg);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`,un=o(cn)`
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 50%;
|
|
50
|
+
left: 50%;
|
|
51
|
+
transform: translate(-50%, -50%);
|
|
52
|
+
`,hn=({percentage:r})=>t(dn,{children:[e(pn,{}),"number"==typeof r?e(un,{size:sn.M,weight:500,children:`${r}%`}):null]}),mn={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function gn(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const o=(e.match(/[^0-9]*$/)||"").toString();return mn[o]?{value:t,unit:o}:{value:t,unit:"px"}}function fn(e){const t=gn(e);return`${t.value}${t.unit}`}const xn=((e,t,r)=>{const o=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return o;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),yn=({loading:r=!0,color:o,scale:n=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=o||d.text.secondary;if(!r)return null;const{value:u}=gn(2),h=u+4.2,m=h/2+h/5.5,g=4*h*n,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:n,...l,...s},x=(e,t)=>({position:"absolute",width:fn(1.5),height:fn(4),borderRadius:fn(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${xn} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...x(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...x(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...x(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...x(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...x(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...x(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},bn=o.div`
|
|
53
|
+
width: ${({$size:e})=>e}px;
|
|
54
|
+
height: ${({$size:e})=>e}px;
|
|
55
|
+
border-radius: 100%;
|
|
56
|
+
background: ${({$color:e})=>e};
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
`,vn=({scale:t,icon:r})=>{const o=i();return e(bn,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e(bn,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e(bn,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e(bn,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e(bn,{$size:23*t,$color:"#50F6E8",children:e(r,{size:16*t,fill:o.v2.colors.black[500]})})})})})})},$n=434,wn=635,Sn=o.div`
|
|
61
|
+
width: ${434}px;
|
|
62
|
+
height: ${635}px;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
padding: 16px;
|
|
68
|
+
background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
|
|
69
|
+
position: relative;
|
|
70
|
+
`,kn=o.div`
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: 50%;
|
|
73
|
+
left: 50%;
|
|
74
|
+
transform: translate(-50%, -50%);
|
|
75
|
+
`,Cn=()=>t(Sn,{children:[e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[e("path",{opacity:"0.1",d:"M231.567 463.134C359.458 463.134 463.134 359.458 463.134 231.567C463.134 103.676 359.458 0 231.567 0C103.676 0 0 103.676 0 231.567C0 359.458 103.676 463.134 231.567 463.134Z",fill:"url(#paint0_radial_164_65835)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[e("path",{opacity:"0.3",d:"M215.921 431.841C335.17 431.841 431.841 335.17 431.841 215.921C431.841 96.6709 335.17 0 215.921 0C96.6709 0 0 96.6709 0 215.921C0 335.17 96.6709 431.841 215.921 431.841Z",fill:"url(#paint0_radial_164_65836)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[e("path",{opacity:"0.5",d:"M186.963 373.927C290.22 373.927 373.927 290.22 373.927 186.963C373.927 83.7063 290.22 0 186.963 0C83.7063 0 0 83.7063 0 186.963C0 290.22 83.7063 373.927 186.963 373.927Z",fill:"url(#paint0_radial_164_65837)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[e("path",{opacity:"0.7",d:"M128.193 256.387C198.992 256.387 256.387 198.992 256.387 128.193C256.387 57.3941 198.992 0 128.193 0C57.3941 0 0 57.3941 0 128.193C0 198.992 57.3941 256.387 128.193 256.387Z",fill:"url(#paint0_radial_164_65838)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(kn,{children:e(ee,{size:112})})]}),En=o.div`
|
|
76
|
+
flex: 1;
|
|
77
|
+
align-self: stretch;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: ${({$gap:e=24})=>e}px;
|
|
81
|
+
overflow-x: scroll;
|
|
82
|
+
|
|
83
|
+
max-height: calc(100vh - 24px - ${({$heightOffset:e})=>e||0}px);
|
|
84
|
+
padding: 24px 24px 0 24px;
|
|
85
|
+
`,An=o.div`
|
|
86
|
+
position: relative;
|
|
87
|
+
|
|
88
|
+
// inherit all the properties of the parent (PageContent)
|
|
89
|
+
flex: inherit;
|
|
90
|
+
align-self: inherit;
|
|
91
|
+
display: inherit;
|
|
92
|
+
flex-direction: inherit;
|
|
93
|
+
gap: inherit;
|
|
94
|
+
overflow-x: inherit;
|
|
95
|
+
`,Dn=o.div`
|
|
96
|
+
padding: ${({$padding:e})=>e||"12px"};
|
|
97
|
+
`,Tn=o.div`
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: row;
|
|
100
|
+
flex-wrap: ${({$wrap:e="unset"})=>e};
|
|
101
|
+
align-items: ${({$alignItems:e="center"})=>e};
|
|
102
|
+
justify-content: ${({$justifyContent:e="unset"})=>e};
|
|
103
|
+
gap: ${({$gap:e=2})=>e}px;
|
|
104
|
+
width: ${({$width:e})=>e||"unset"};
|
|
105
|
+
height: ${({$height:e})=>e||"unset"};
|
|
106
|
+
margin: ${({$margin:e="unset"})=>e};
|
|
107
|
+
padding: ${({$padding:e="unset"})=>e};
|
|
108
|
+
`,In=o.div`
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
flex-wrap: ${({$wrap:e="unset"})=>e};
|
|
112
|
+
align-items: ${({$alignItems:e="unset"})=>e};
|
|
113
|
+
justify-content: ${({$justifyContent:e="unset"})=>e};
|
|
114
|
+
gap: ${({$gap:e=2})=>e}px;
|
|
115
|
+
width: ${({$width:e})=>e||"unset"};
|
|
116
|
+
height: ${({$height:e})=>e||"unset"};
|
|
117
|
+
margin: ${({$margin:e="unset"})=>e};
|
|
118
|
+
padding: ${({$padding:e="unset"})=>e};
|
|
119
|
+
`,Nn=o(In)`
|
|
120
|
+
width: ${({$width:e})=>e||"100%"};
|
|
121
|
+
height: ${({$height:e})=>e||"unset"};
|
|
122
|
+
padding: ${({$padding:e})=>e||"unset"};
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
`,On=o.div`
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
padding: 12px;
|
|
129
|
+
overflow-y: scroll;
|
|
130
|
+
`,Rn=o.div`
|
|
131
|
+
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
132
|
+
top: 0;
|
|
133
|
+
left: 0;
|
|
134
|
+
right: 0;
|
|
135
|
+
bottom: 0;
|
|
136
|
+
z-index: 1000;
|
|
137
|
+
background: rgba(0, 0, 0, 0.6);
|
|
138
|
+
backdrop-filter: blur(2px);
|
|
139
|
+
`,_n=o.div`
|
|
140
|
+
width: 800px;
|
|
141
|
+
min-height: ${({$minHeight:e})=>e||"unset"};
|
|
142
|
+
height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
|
|
143
|
+
margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
|
|
144
|
+
padding: 0 2px;
|
|
145
|
+
overflow-y: scroll;
|
|
146
|
+
`,Fn=o(In)`
|
|
147
|
+
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
148
|
+
width: 100%;
|
|
149
|
+
`,Pn=o(Tn)`
|
|
150
|
+
gap: 16px;
|
|
151
|
+
padding: 16px;
|
|
152
|
+
`,Ln=o.div`
|
|
153
|
+
width: 100%;
|
|
154
|
+
max-height: ${({$maxHeight:e})=>e||"unset"};
|
|
155
|
+
overflow-y: auto;
|
|
156
|
+
`,zn=a`
|
|
157
|
+
0% {
|
|
158
|
+
background-position: 0% 50%;
|
|
159
|
+
}
|
|
160
|
+
100% {
|
|
161
|
+
background-position: 100% 50%;
|
|
162
|
+
}
|
|
163
|
+
`,Mn=o(cn)`
|
|
164
|
+
background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
165
|
+
background-size: 250% 100%; /* Expand background to allow movement */
|
|
166
|
+
background-clip: text;
|
|
167
|
+
color: transparent;
|
|
168
|
+
animation: ${zn} 1s reverse linear infinite;
|
|
169
|
+
`,Bn=e=>{const t=Math.max(0,Date.now()-e),r=Math.floor(t/1e3),o=Math.floor(r/60),n=r%60;return`${String(o).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Un=({icon:r,title:o,titleColor:n,titleSize:a=sn.S,subTitle:s,subTitleColor:l,subTitleSize:c=sn.XXXS,startedAt:d,withGradient:p,gradientColor:u,withSpinner:h,withSpinnerOld:m,scaleSpinnerOld:g=1,percentage:f,withVisual:x,visualIcon:y=Je})=>{const b=i(),[v,$]=jt(()=>d?Bn(d):"");Wt(()=>{if(!d)return;$(Bn(d));const e=setInterval(()=>$(Bn(d)),1e3);return()=>clearInterval(e)},[d]);const w=n||b.v2.colors.white[500],S=l||b.v2.colors.silver[200],k=u||b.v2.colors.black[500];return t(In,{$gap:16,$alignItems:"center",children:[x?e(vn,{scale:1.7,icon:y}):h?e(hn,{percentage:f}):m?e(yn,{scale:g}):null,(o||s||d||r)&&t(In,{$gap:8,$alignItems:"center",children:[t(Tn,{$gap:4,children:[r&&e(r,{}),p?e(Mn,{align:"center",size:a,$titleColor:w,$gradientColor:k,children:o}):e(cn,{align:"center",size:a,color:w,children:o})]}),s?e(cn,{align:"center",size:c,color:S,children:s}):null,v?e(cn,{align:"center",size:c,color:w,children:v}):null]})]})},jn=(e,t)=>{const r={[Gr.Default]:r=>ee({fill:on(t,e,"300"),...r}),[Gr.Info]:r=>rt({fill:on(t,e,"400"),...r}),[Gr.Error]:r=>tt({fill:on(t,e,"500"),...r}),[Gr.Warning]:r=>et({fill:on(t,e,"500"),...r}),[Gr.Success]:r=>Ze({fill:on(t,e,"500"),...r}),[Kr.Loading]:e=>Un({withSpinnerOld:!0,...e}),[qr.Disabled]:r=>Qe({fill:on(t,e,"400"),...r}),[qr.Unknown]:r=>Ye({fill:on(t,e,"300"),...r})};return r[e]},Wn=e=>{switch(e){case oo.Success:return Gr.Success;case oo.Error:case oo.Failure:return Gr.Error;case oo.Notice:return Gr.Warning;case oo.Unsupported:case oo.Unknown:return Gr.Info;case oo.Irrelevant:case oo.Disabled:return Kr.Disabled;case oo.Waiting:return Kr.Loading;case oo.Pending:default:return Gr.Default}},Hn=(e,t)=>{const r=t.find(([t,r])=>e>=t&&(null===r||e<=r));return r?.[2]||null},Xn={redis:x,mysql:v,postgresql:y,postgres:y,kafka:f,elasticsearch:ye,clickhouse:Ce,oracle:J,aws:ot},Gn={sts:gt,dynamodb:mt,s3:H,sqs:ht,sns:ut,lambda:pt,kinesis:dt,ec2:ct,apigateway:lt,apigatewayv2:lt,bedrock:st,bedrockruntime:st,eventbridge:at,sfn:it,stepfunctions:it,secretsmanager:nt,cloudwatch:ke},Vn=e=>{const t=e.attributes,r=t["db.system"];if(r){const e=Xn[r.toLowerCase()];if(e)return e}const o=t["messaging.system"];if(o){const e=Xn[o.toLowerCase()];if(e)return e}const n=t["rpc.system"];if(n?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=Gn[e];if(t)return t}return ot}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(Xn))if(i.includes(e))return t;return Me},Kn=({namespace:e,name:t,kind:r})=>({namespace:e,name:t,kind:r});function qn(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const Jn=(e,t)=>{const r=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=qn(t.fields,{}),n=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==n&&r.push(...e.items[n].fields.map(e=>({...e,initialValue:o[e.name]})))}return r},Yn=(e,t)=>{const r=e=>e?.some(({healthy:e})=>e.status!==Gr.Success);return e?.length?e.some(({instrumentationInstances:e})=>r(e)):r(t)??!1},Qn=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),Zn=e=>{if(!e)return!1;if(e.length>63)return!1;return/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)},ei=(e,t=0)=>{const r=(new Date).getTime();return new Date(e).getTime()-r<=t},ti=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},ri=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,oi=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,ni=e=>oi.test(e),ii=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",ai=e=>e?.map(({status:e,type:t,reason:r,message:o})=>({status:e?.toLowerCase(),type:ii(t),reason:r?ii(r):"",message:o}))||[],si=(e,t)=>{const r=qn(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:r[e.name]??null})).filter(e=>null!==e.value):Object.entries(r).map(([e,t])=>({key:e,name:e,value:t}))},li=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>bo[e]):[],ci=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>bo[e]):[],di=e=>e.replace(/[^\d]/g,""),pi=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},ui=e=>{let t="";try{const r=JSON.parse(e);t=Array.isArray(r)?r.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(r){t=e}return t},hi=e=>{const t=e.fields.reduce((e,{key:t,value:r})=>{const o=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(r);return void 0!==o&&e.push({key:t,value:o}),e},[]);return{...e,fields:t}},mi=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(r=>{const o=e[r];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[r]=e.map(e=>mi(e)))}else if("object"==typeof o&&null!==o){const e=mi(o);Object.keys(e).length>0&&(t[r]=e)}else[void 0,null,""].includes(o)||(t[r]=o)}),t},gi=(e,t=2)=>JSON.stringify(e||{},null,t),fi=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),xi=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]="string"==typeof r?r:JSON.stringify(r),e),{}),yi=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const r=t.split(".");return 1e4*parseInt(r[0]||"0",10)+parseInt(r[1]||"0",10)},bi=o.div`
|
|
170
|
+
color: ${({$color:e,theme:t})=>e||t.text.secondary};
|
|
171
|
+
font-size: ${({$size:e})=>void 0!==e?e:16}px;
|
|
172
|
+
font-weight: ${({$weight:e})=>void 0!==e?e:300};
|
|
173
|
+
text-align: ${({$align:e})=>e||"left"};
|
|
174
|
+
opacity: ${({$opacity:e})=>void 0!==e?e:1};
|
|
175
|
+
text-decoration: ${({$decoration:e})=>e||"none"};
|
|
176
|
+
text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
|
|
177
|
+
font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
|
|
178
|
+
white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
179
|
+
text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
180
|
+
`,vi=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,r,o]=e.split('"');return{original:e,href:r,label:o.replace("</a>","").replace(">","")}})},$i=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},wi=(r,o)=>{const n=vi(r);n?.forEach((e,t)=>{r=r.replace(e.original,`LINK-${t}###`)});const i=$i(r);i?.forEach((e,t)=>{r=r.replace(e.original,`STRONG-${t}###`)});return r.split(" ").map(r=>{if(r.includes("LINK-")){const[i,a]=r.split("###"),s=n?.[parseInt(i.replace("LINK-",""))];return t(Ut,{children:[e("a",{href:s?.href,target:"_blank",rel:"noreferrer",style:{color:o.colors.majestic_blue_soft},children:s?.label}),a?`${a} `:" "]},r)}if(r.includes("STRONG-")){const[o,n]=r.split("###"),a=i?.[parseInt(o.replace("STRONG-",""))];return t(Ut,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),n?`${n} `:" "]},r)}return r+" "})},Si=({children:r,color:o,size:n,weight:a,align:s,family:l,opacity:c,decoration:d,transform:p,nowrap:u,...h})=>{const m=i(),g=Ht(()=>(r?["string","number"].includes(typeof r)?r.toString():Array.isArray(r)?r.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[r]);return e(bi,{$color:o,$size:n,$weight:a,$align:s,$family:l,$opacity:c,$decoration:d,$transform:p,$nowrap:u,...h,children:g.length?g.map((r,o)=>t(Ut,{children:[wi(r,m),o!==g.length-1?e("br",{}):null]},`text-${o}-${r}`)):r})},ki=o.div`
|
|
181
|
+
padding: 4px 0 0 0;
|
|
182
|
+
`,Ci=o(Si)`
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
color: ${({theme:e})=>e.text.error};
|
|
185
|
+
`,Ei=({children:t})=>e(ki,{children:e(Ci,{children:t})}),Ai=o.div`
|
|
186
|
+
position: relative;
|
|
187
|
+
width: 100%;
|
|
188
|
+
`,Di=o.div`
|
|
189
|
+
width: calc(100% - 16px);
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
height: 36px;
|
|
193
|
+
gap: 8px;
|
|
194
|
+
padding-left: 12px;
|
|
195
|
+
transition: border-color 0.3s;
|
|
196
|
+
border-radius: 32px;
|
|
197
|
+
border: 1px solid ${({theme:e,$hasError:t})=>t?e.text.error:e.colors.border};
|
|
198
|
+
|
|
199
|
+
&:hover {
|
|
200
|
+
border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
|
|
201
|
+
}
|
|
202
|
+
&:focus-within {
|
|
203
|
+
border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
|
|
204
|
+
}
|
|
205
|
+
`,Ti=o.input`
|
|
206
|
+
flex: 1;
|
|
207
|
+
border: none;
|
|
208
|
+
outline: none;
|
|
209
|
+
background: none;
|
|
210
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
211
|
+
font-size: 14px;
|
|
212
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
213
|
+
font-weight: 300;
|
|
214
|
+
&::placeholder {
|
|
215
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
216
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
217
|
+
opacity: 0.4;
|
|
218
|
+
font-size: 14px;
|
|
219
|
+
font-weight: 300;
|
|
220
|
+
line-height: 22px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&:disabled {
|
|
224
|
+
cursor: not-allowed;
|
|
225
|
+
}
|
|
226
|
+
`,Ii=o.ul`
|
|
227
|
+
position: absolute;
|
|
228
|
+
max-height: 500px;
|
|
229
|
+
top: 32px;
|
|
230
|
+
border-radius: 24px;
|
|
231
|
+
width: calc(100% - 32px);
|
|
232
|
+
overflow-y: auto;
|
|
233
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
234
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
235
|
+
z-index: 9999;
|
|
236
|
+
padding: 12px;
|
|
237
|
+
`,Ni=o.li`
|
|
238
|
+
width: calc(100% - 24px);
|
|
239
|
+
padding: 8px 12px;
|
|
240
|
+
cursor: ${({$isList:e})=>e?"default":"pointer"};
|
|
241
|
+
border-radius: 24px;
|
|
242
|
+
gap: 8px;
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: ${({$isList:e})=>e?"flex-start":"center"};
|
|
245
|
+
background: transparent;
|
|
246
|
+
&:hover {
|
|
247
|
+
background: ${({theme:e,$isList:t})=>!t&&e.colors.dropdown_bg_2};
|
|
248
|
+
}
|
|
249
|
+
`,Oi=o.div`
|
|
250
|
+
width: 100%;
|
|
251
|
+
`,Ri=o.div`
|
|
252
|
+
display: flex;
|
|
253
|
+
width: 100%;
|
|
254
|
+
`,_i=o.div`
|
|
255
|
+
width: 1px;
|
|
256
|
+
height: 52px;
|
|
257
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
258
|
+
position: absolute;
|
|
259
|
+
left: 33px;
|
|
260
|
+
`,Fi=o.div`
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: column;
|
|
263
|
+
gap: 4px;
|
|
264
|
+
`,Pi=o(Si)`
|
|
265
|
+
flex: 1;
|
|
266
|
+
font-size: 14px;
|
|
267
|
+
`,Li=o(Si)`
|
|
268
|
+
color: ${({theme:e})=>e.text.grey};
|
|
269
|
+
font-size: 10px;
|
|
270
|
+
line-height: 150%;
|
|
271
|
+
`,zi=o.ul`
|
|
272
|
+
padding-left: 0px;
|
|
273
|
+
margin: 4px 0 0 0;
|
|
274
|
+
list-style: none;
|
|
275
|
+
width: 100%;
|
|
276
|
+
`,Mi=(e,t)=>t?e.reduce((e,r)=>{if(r.items){const o=Mi(r.items,t);o.length&&e.push({...r,items:o})}else r.label.toLowerCase().includes(t.toLowerCase())&&e.push(r);return e},[]):e,Bi=({placeholder:r="Type to search...",options:o,selectedOption:n,onOptionSelect:i,defaultText:a,onTextChange:s,style:l,disabled:c,errorMessage:d,...p})=>{const[u,h]=jt(n?.label||a||""),[m,g]=jt(Mi(o,u)),[f,x]=jt(!1);jt(-1),Wt(()=>g(Mi(o,u)),[o]);const y=n?.icon,b=e=>{e&&(h(e.label),s?.(e.label)),x(!e),i?.(e)};return t(Ai,{style:l,children:[t(Di,{$hasError:!!d,children:[y&&e(y,{}),e(Ti,{type:"text",value:u,placeholder:r,onChange:e=>{e.stopPropagation();const t=e.target.value,r=Mi(o,t),n=1===r.length&&r[0].label===t?r[0]:void 0;h(t),s?.(t),g(r),b(n)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:c,onBlur:()=>!c&&x(!1),onFocus:()=>!c&&x(!0),...p})]}),f&&m.length?e(Ii,{children:m.map(t=>e(Ui,{option:t,onClick:b},t.type||t.label))}):null,d&&e(Ei,{children:d})]})},Ui=({option:r,renderIcon:o=!0,onClick:n})=>{const i=!!r.items&&r.items.length>0,a=r.icon;return t(Ni,{"data-id":`option-${r.type||r.label}`,$isList:i,onMouseDown:()=>i?null:n(r),children:[a&&o&&e(a,{}),t(Oi,{children:[t(Fi,{children:[e(Pi,{children:r.label}),e(Li,{children:r.description})]}),i&&e(zi,{children:r.items?.map(r=>t(Ri,{children:[e(_i,{}),e(Ui,{option:r,renderIcon:!1,onClick:n})]},r.type||r.label))})]})]})},ji=Bt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Wi=[{type:Dr.K8sAttributes,icon:_o(Dr.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Dr.AddClusterInfo,icon:_o(Dr.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Dr.DeleteAttributes,icon:_o(Dr.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dr.RenameAttributes,icon:_o(Dr.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[mo.Traces,mo.Metrics,mo.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dr.PiiMasking,icon:_o(Dr.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Dr.URLTemplatization,icon:_o(Dr.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:yi("v1.21.0")}],Hi=[{type:Dr.ErrorSampler,icon:_o(Ar.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Dr.LatencySampler,icon:_o(Ar.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Dr.ProbabilisticSampler,icon:_o(Ar.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Dr.ServiceNameSampler,icon:_o(Ar.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Dr.SpanAttributeSampler,icon:_o(Ar.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[mo.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}],Xi=[{label:"Attributes",icon:_o(Ar.Attributes),items:Wi},{label:"Samplers",icon:_o(Ar.Samplers),items:Hi}];var Gi;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Gi||(Gi={}));const Vi={[Gi.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Gi.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Gi.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Gi.DETECTED]:{TITLE:"Detected by system",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Gi.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Gi.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ki=[{type:no.CodeAttributes,icon:Ko(no.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Br.Go,Br.Python]},{type:no.CustomInstrumentation,icon:Ko(no.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods (i.e. for Java) or explicit symbol (i.e. for Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Br.Go,Br.Java]},{type:no.HeadersCollection,icon:Ko(no.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Br.Go,Br.Java,Br.JavaScript]},{type:no.PayloadCollection,icon:Ko(no.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Br.Go,Br.JavaScript]}],qi="Cancel",Ji="Save",Yi="Edit rule",Qi="Edit auto rule",Zi="Create rule",ea="Delete rule",ta="Save",ra="Rule name",oa="Rule type",na="Rule Enabled",ia="Rule Disabled",aa="Note",sa="HTTP route",la="Method",ca="Keep Percentage",da="Drop Percentage",pa="Keep traces with duration larger than",ua="Keep traces with errors",ha="Keep at least this percentage of matching traces",ma="Keep at most this percentage of matching traces",ga="Custom percentage",fa="Disabled rule",xa="Sample",ya="Keep all",ba="Drop all",va="Operation type",$a="HTTP route prefix",wa="Templated path",Sa="Templated path prefix",ka="Kafka topic",Ca="Custom duration (ms)",Ea="No preview available",Aa="Server address",Da="Drop at most this percentage of matching traces",Ta="Unnamed rule",Ia="Sampling Preview",Na="Source Scope",Oa="Operation",Ra="Duration",_a="Errors",Fa="Keep Percentage",Pa="Drop Percentage",La="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",za="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Ma="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Ba="Retain traces with errors from the selected services and operations.",Ua="Specify the exact percentage of matching traces to keep",ja="Specify the exact percentage of matching traces to drop",Wa="Type rule name",Ha="Add note here...",Xa="Type here",Ga="Search source name",Va="e.g. collector.my.vendor.com",Ka="Optional notes (not used by the system). Add any context or details for this sampling rule.",qa="Rule will apply to all sources in the cluster",Ja="If multiple source scopes are set, they must all match simultaneously.",Ya="All sources",Qa="-",Za="All",es="All operations",ts="HTTP server endpoint",rs="HTTP client endpoint",os="Kafka consumer",ns="Kafka producer",is="Sampling Rules",as='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',ss="Refresh",ls="Create rule",cs="Sampling docs",ds="75vw",ps="Delete rule?",us="Are you sure you want to delete this sampling rule?",hs="Delete",ms="Cancel",gs="Kubernetes Health Probes",fs="Keep All Error Traces",xs="Drop Traces Cluster-Wide",ys="A rule with the same matching conditions already exists.",bs="Create 'Noisy Operation Kubernetes Health Probes' rule",vs="Edit 'Noisy Operation Kubernetes Health Probes' rule",$s="Automatically detect and sample health probe traces across the cluster.",ws="Create 'Highly Relevant Operations' rule",Ss="Edit 'Highly Relevant Operations' rule",ks="Automatically keep all error traces across the entire cluster.",Cs="Create 'Cost Reduction' rule",Es="Edit 'Cost Reduction' rule",As="Automatically drop a percentage of traces across the entire cluster.",Ds={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Ts={noisy:bs,highlyRelevant:ws,costReduction:Cs},Is={noisy:vs,highlyRelevant:Ss,costReduction:Es},Ns={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Os=[{id:mo.Logs,value:"Logs"},{id:mo.Metrics,value:"Metrics"},{id:mo.Traces,value:"Traces"}],Rs={[Br.Go]:"Go",[Br.Java]:"Java",[Br.JavaScript]:"Node.js",[Br.Python]:"Python",[Br.DotNet]:".NET",[Br.CSharp]:"C#",[Br.CPlusPlus]:"C++",[Br.Php]:"PHP",[Br.Ruby]:"Ruby",[Br.Rust]:"Rust",[Br.Swift]:"Swift",[Br.Elixir]:"Elixir",[Br.MySql]:"MySQL",[Br.Nginx]:"Nginx",[Br.Postgres]:"PostgreSQL",[Br.Redis]:"Redis",[Br.Kafka]:"Kafka",[Br.Ignored]:"Ignored",[Br.Unknown]:"Unknown",[Br.Processing]:"Processing",[Br.NoContainers]:"No Containers",[Br.NoRunningPods]:"No Running Pods"},_s=[{id:Br.Go,value:Rs[Br.Go],icon:Lo(Br.Go)},{id:Br.Java,value:Rs[Br.Java],icon:Lo(Br.Java)},{id:Br.JavaScript,value:Rs[Br.JavaScript],icon:Lo(Br.JavaScript)},{id:Br.Python,value:Rs[Br.Python],icon:Lo(Br.Python)},{id:Br.Php,value:Rs[Br.Php],icon:Lo(Br.Php)},{id:Br.Ruby,value:Rs[Br.Ruby],icon:Lo(Br.Ruby)},{id:Br.Rust,value:Rs[Br.Rust],icon:Lo(Br.Rust)},{id:Br.DotNet,value:Rs[Br.DotNet],icon:Lo(Br.DotNet)},{id:Br.CSharp,value:Rs[Br.CSharp],icon:Lo(Br.CSharp)},{id:Br.CPlusPlus,value:Rs[Br.CPlusPlus],icon:Lo(Br.CPlusPlus)},{id:Br.Swift,value:Rs[Br.Swift],icon:Lo(Br.Swift)},{id:Br.Elixir,value:Rs[Br.Elixir],icon:Lo(Br.Elixir)}],Fs={id:ro.OpentelemetryEbpfInstrumentation,value:ro.OpentelemetryEbpfInstrumentation,icon:q},Ps={[Br.Go]:{community:[{id:ro.GolangCommunity,value:ro.GolangCommunity,icon:Lo(Br.Go)},Fs],enterprise:[{id:ro.GolangEnterprise,value:ro.GolangEnterprise,icon:Lo(Br.Go)}]},[Br.JavaScript]:{community:[{id:ro.NodejsCommunity,value:ro.NodejsCommunity,icon:Lo(Br.JavaScript)},Fs],enterprise:[{id:ro.NodejsEnterprise,value:ro.NodejsEnterprise,icon:Lo(Br.JavaScript)}]},[Br.Python]:{community:[{id:ro.PythonCommunity,value:ro.PythonCommunity,icon:Lo(Br.Python)},Fs],enterprise:[{id:ro.PythonEnterprise,value:ro.PythonEnterprise,icon:Lo(Br.Python)}]},[Br.Java]:{community:[{id:ro.JavaCommunity,value:ro.JavaCommunity,icon:Lo(Br.Java)},Fs],enterprise:[{id:ro.JavaEnterprise,value:ro.JavaEnterprise,icon:Lo(Br.Java)},{id:ro.JavaEbpfInstrumentations,value:ro.JavaEbpfInstrumentations,icon:Lo(Br.Java)}]},[Br.DotNet]:{community:[{id:ro.DotNetCommunity,value:ro.DotNetCommunity,icon:Lo(Br.DotNet)},Fs],enterprise:[{id:ro.DotNetEnterprise,value:ro.DotNetEnterprise,icon:Lo(Br.DotNet)}]},[Br.Ruby]:{community:[{id:ro.RubyCommunity,value:ro.RubyCommunity,icon:Lo(Br.Ruby)},Fs],enterprise:[{id:ro.RubyEnterprise,value:ro.RubyEnterprise,icon:Lo(Br.Ruby)}]},[Br.Php]:{community:[{id:ro.PhpCommunity,value:ro.PhpCommunity,icon:Lo(Br.Php)},Fs],enterprise:[]},[Br.CSharp]:{community:[],enterprise:[{id:ro.CPlusPlusEnterprise,value:ro.CPlusPlusEnterprise,icon:Lo(Br.CSharp)}]},[Br.MySql]:{community:[],enterprise:[{id:ro.MySqlEnterprise,value:ro.MySqlEnterprise,icon:Lo(Br.MySql)}]},[Br.CPlusPlus]:{community:[Fs],enterprise:[]},[Br.Rust]:{community:[Fs],enterprise:[]},[Br.Swift]:{community:[Fs],enterprise:[]},[Br.Elixir]:{community:[Fs],enterprise:[]},[Br.Nginx]:{community:[Fs],enterprise:[]},[Br.Postgres]:{community:[Fs],enterprise:[]},[Br.Redis]:{community:[Fs],enterprise:[]},[Br.Kafka]:{community:[Fs],enterprise:[]},[Br.Ignored]:{community:[],enterprise:[]},[Br.Unknown]:{community:[],enterprise:[]},[Br.Processing]:{community:[],enterprise:[]},[Br.NoContainers]:{community:[],enterprise:[]},[Br.NoRunningPods]:{community:[],enterprise:[]}},Ls=6048e5,zs=Bt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Co.DARK_MODE,storage:"undefined"!=typeof window?er(()=>localStorage):void 0})),Ms={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:wo},Bs=Bt(e=>({...Ms,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const r=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(r).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Ms)})),Us=Bt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),js=Bt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,r)=>{const o=t===jr.Namespace?"namespacesLoading":t===jr.Source?"sourcesLoading":t===jr.Destination?"destinationsLoading":t===jr.Action?"actionsLoading":t===jr.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:r})},setEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:r})},addEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]],n=new Map;return t.forEach((e,t)=>{n.set(Xo(e),t)}),r.forEach(e=>{const r=Xo(e),o=n.get(r);void 0!==o?t[o]={...t[o],...e}:(n.set(r,t.length),t.push(e))}),{[o]:t}})},removeEntities:(t,r)=>{const o=t===jr.Namespace?"namespaces":t===jr.Source?"sources":t===jr.Destination?"destinations":t===jr.Action?"actions":t===jr.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=new Set(r.map(e=>Ho(e))),n=e[o].filter(e=>!t.has(Xo(e)));return{[o]:n}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ws=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Hs=Bt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),getEmptyState:Ws})),Xs=Bt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Gs=Bt((e,t)=>({notifications:[],addNotification:r=>{const o=new Date,n=`${o.getTime().toString()}${r.target?`#${r.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===r.type&&e.title===r.title&&e.message===r.message&&!e.dismissed)||e(e=>({notifications:[{...r,id:n,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&e.notifications.splice(r,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var Vs;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(Vs||(Vs={}));const Ks=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),qs=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Js=Bt((e,t)=>({progress:{},setProgress:(r,o)=>{const n=t(),i=Ks();return"number"==typeof o.total&&(i.total=o.total),"number"==typeof o.current&&(i.current=o.current),Array.isArray(o.list)&&(i.list=o.list),e({progress:{...n.progress,[r]:qs(i)}})},addProgress:(r,o,n)=>{const i=t(),a=Ks(r,i.progress);return a.current+=o,n&&(a.list=a.list?.map(e=>e.label===n.label?{...e,status:n.status}:e)),e({progress:{...i.progress,[r]:qs(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Ys=Bt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),Qs={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Zs=(e,t)=>e.destinationType.type!==t.destinationType.type,el=Bt(e=>({...Qs,setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Zs(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const r=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(r).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Zs(e,t))})),clearStore:()=>e(()=>({...Qs}))})),tl={v2:{text:{size:{xxxs:10,xxs:12,xs:14,s:16,m:20,l:24,xl:32,xxl:40,xxxl:48}},colors:{black:{500:"#151618"},white:{500:"#FFFFFF"},purple:{100:"#E1D4FF",200:"#C3AAFF",300:"#A57FFF",400:"#8854FF",500:"#6A2AFF",600:"#5925D0",700:"#4822A2",800:"#371E73",900:"#271A45"},green:{100:"#DCFDFA",200:"#B9FBF6",300:"#96FAF1",400:"#73F8ED",500:"#50F6E8",600:"#44C9BE",700:"#399D94",800:"#2D6F6A",900:"#224340"},grey:{25:"#F6F6F6",50:"#ECECED",100:"#DADADB",150:"#B8B8B8",200:"#B4B5B7",300:"#8F9093",400:"#696B6F",500:"#44464B",600:"#3A3C40",700:"#313236",800:"#282A2E",900:"#1B1B1C"},silver:{25:"#F6F6F7",50:"#EDEDEE",100:"#DADCDE",200:"#B6B8BD",300:"#91959C",400:"#6D717B",500:"#484E5A",600:"#3E424C",700:"#34383F",750:"#2C2F36",800:"#26292F",900:"#1F2125",1e3:"#1B1C1D"},red:{100:"#FFE5E7",200:"#FFCBD0",300:"#FFB0B8",400:"#FF96A1",500:"#FF7C89",600:"#D06772",700:"#A2535B",800:"#733F44",900:"#452B2D",1e3:"#2E2022"},blue:{100:"#EBF0FA",200:"#D6E1F4",300:"#ADC3EA",400:"#84A4DF",500:"#5C86D5",600:"#3368CA",700:"#2D57A6",800:"#274782",900:"#21375E",1e3:"#1C273A"},yellow:{100:"#FFFBF1",200:"#FFF7E2",300:"#FFEFC6",400:"#FFE7A9",500:"#FFDF8D",600:"#FFD770",700:"#D0B05E",800:"#A28A4C",900:"#73633A",1e3:"#453D28"},beige:{600:"#EEC990"},pink:{600:"#F576A2"},orange:{600:"#F29142"}}},colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},rl={v2:tl.v2,darkMode:!0,colors:{...tl.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:tl.font_family},ol={v2:tl.v2,darkMode:!1,colors:{...tl.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:tl.font_family},nl=e=>e?rl:ol;var il=Object.freeze({__proto__:null,baseTheme:tl,darkModeTheme:rl,getTheme:nl,lightModeTheme:ol});tr('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{animation-duration:.3s;animation-fill-mode:forwards;transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const al=({children:t})=>{const{darkMode:r}=zs();return e(s,{theme:nl(r),children:t})},sl={100:"FF","099":"FC","098":"FA","097":"F7","096":"F5","095":"F2","094":"F0","093":"ED","092":"EB","091":"E8","090":"E6","089":"E3","088":"E0","087":"DE","086":"DB","085":"D9","084":"D6","083":"D4","082":"D1","081":"CF","080":"CC","079":"C9","078":"C7","077":"C4","076":"C2","075":"BF","074":"BD","073":"BA","072":"B8","071":"B5","070":"B3","069":"B0","068":"AD","067":"AB","066":"A8","065":"A6","064":"A3","063":"A1","062":"9E","061":"9C","060":"99","059":"96","058":"94","057":"91","056":"8F","055":"8C","054":"8A","053":"87","052":"85","051":"82","050":"80","049":"7D","048":"7A","047":"78","046":"75","045":"73","044":"70","043":"6E","042":"6B","041":"69","040":"66","039":"63","038":"61","037":"5E","036":"5C","035":"59","034":"57","033":"54","032":"52","031":"4F","030":"4D","029":"4A","028":"47","027":"45","026":"42","025":"40","024":"3D","023":"3B","022":"38","021":"36","020":"33","019":"30","018":"2E","017":"2B","016":"29","015":"26","014":"24","013":"21","012":"1F","011":"1C","010":"1A","009":"17","008":"14","007":"12","006":"0F","005":"0D","004":"0A","003":"08","002":"05","001":"03","000":"00"};var ll=Object.freeze({__proto__:null,hex:sl});const cl={in:{left:a`
|
|
277
|
+
from { transform: translateX(-100%); }
|
|
278
|
+
to { transform: translateX(0); }
|
|
279
|
+
`,right:a`
|
|
280
|
+
from { transform: translateX(100%); }
|
|
281
|
+
to { transform: translateX(0); }
|
|
282
|
+
`,top:a`
|
|
283
|
+
from { transform: translateY(-100%); }
|
|
284
|
+
to { transform: translateY(0); }
|
|
285
|
+
`,bottom:a`
|
|
286
|
+
from { transform: translateY(100%); }
|
|
287
|
+
to { transform: translateY(0); }
|
|
288
|
+
`,center:a`
|
|
289
|
+
from { transform: translate(-50%, 100%); }
|
|
290
|
+
to { transform: translate(-50%, -50%); }
|
|
291
|
+
`},out:{left:a`
|
|
292
|
+
from { transform: translateX(0); }
|
|
293
|
+
to { transform: translateX(-100%); }
|
|
294
|
+
`,right:a`
|
|
295
|
+
from { transform: translateX(0); }
|
|
296
|
+
to { transform: translateX(100%); }
|
|
297
|
+
`,top:a`
|
|
298
|
+
from { transform: translateY(0); }
|
|
299
|
+
to { transform: translateY(-100%); }
|
|
300
|
+
`,bottom:a`
|
|
301
|
+
from { transform: translateY(0); }
|
|
302
|
+
to { transform: translateY(100%); }
|
|
303
|
+
`,center:a`
|
|
304
|
+
from { transform: translate(-50%, -50%); }
|
|
305
|
+
to { transform: translate(-50%, 100%); }
|
|
306
|
+
`}},dl={in:a`
|
|
307
|
+
from {
|
|
308
|
+
width: 0%;
|
|
309
|
+
}
|
|
310
|
+
to {
|
|
311
|
+
width: 100%;
|
|
312
|
+
}
|
|
313
|
+
`,out:a`
|
|
314
|
+
from {
|
|
315
|
+
width: 100%;
|
|
316
|
+
}
|
|
317
|
+
to {
|
|
318
|
+
width: 0%;
|
|
319
|
+
}
|
|
320
|
+
`},pl=a`
|
|
321
|
+
0% {
|
|
322
|
+
transform: scale(1);
|
|
323
|
+
opacity: 1;
|
|
324
|
+
}
|
|
325
|
+
75%, 100% {
|
|
326
|
+
transform: scale(2);
|
|
327
|
+
opacity: 0;
|
|
328
|
+
}
|
|
329
|
+
`,ul=a`
|
|
330
|
+
0% {
|
|
331
|
+
background-position: -500px 0;
|
|
332
|
+
}
|
|
333
|
+
100% {
|
|
334
|
+
background-position: 500px 0;
|
|
335
|
+
}
|
|
336
|
+
`,hl={in:a`
|
|
337
|
+
from {
|
|
338
|
+
opacity: 0;
|
|
339
|
+
}
|
|
340
|
+
to {
|
|
341
|
+
opacity: 1;
|
|
342
|
+
}
|
|
343
|
+
`,out:a`
|
|
344
|
+
from {
|
|
345
|
+
opacity: 1;
|
|
346
|
+
}
|
|
347
|
+
to {
|
|
348
|
+
opacity: 0;
|
|
349
|
+
}
|
|
350
|
+
`};var ml=Object.freeze({__proto__:null,fade:hl,ping:pl,progress:dl,shimmer:ul,slide:cl});const gl=o.span`
|
|
351
|
+
display: flex;
|
|
352
|
+
align-items: center;
|
|
353
|
+
justify-content: center;
|
|
354
|
+
|
|
355
|
+
min-height: 16px;
|
|
356
|
+
min-width: 16px;
|
|
357
|
+
width: fit-content;
|
|
358
|
+
padding: 4px;
|
|
359
|
+
gap: 2px;
|
|
360
|
+
|
|
361
|
+
border-radius: 50px;
|
|
362
|
+
border: 1px solid ${({theme:e,$filled:t,$status:r})=>r?e.text[r]+(t?"":sl["050"]):t?"transparent":e.colors.border};
|
|
363
|
+
background-color: ${({theme:e,$filled:t,$status:r})=>t?r?e.colors[r]:e.colors.majestic_blue:"transparent"};
|
|
364
|
+
color: ${({theme:e,$filled:t,$status:r})=>t&&r?e.text.secondary:t?e.text.white:r?e.text[r]:e.text.grey};
|
|
365
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
366
|
+
font-size: 12px;
|
|
367
|
+
white-space: nowrap;
|
|
368
|
+
|
|
369
|
+
${({theme:e,$filled:t,$status:r,$clickable:o})=>o&&`&:hover {\n cursor: pointer;\n background-color: ${r?e.colors[r]+sl["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+sl["020"]};\n }`}
|
|
370
|
+
`,fl=({label:r,filled:o,status:n,withIcon:a,onClick:s})=>{const l=i(),c=n&&a?jn(n,l):null;return t(gl,{$filled:o,$status:n,$clickable:!!s,onClick:s,children:[!!c&&e(c,{}),r]})},xl=o.div`
|
|
371
|
+
height: fit-content;
|
|
372
|
+
border: 2px solid transparent;
|
|
373
|
+
padding: 2px;
|
|
374
|
+
border-radius: 32px;
|
|
375
|
+
background-color: transparent;
|
|
376
|
+
transition: border-color 0.3s ease;
|
|
377
|
+
&:focus-within {
|
|
378
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
379
|
+
}
|
|
380
|
+
`,yl={primary:n`
|
|
381
|
+
border: 1px solid ${({theme:e})=>e.text.secondary+sl["024"]};
|
|
382
|
+
background: ${({theme:e})=>e.colors.secondary};
|
|
383
|
+
color: ${({theme:e})=>e.colors.primary};
|
|
384
|
+
&:hover {
|
|
385
|
+
background: ${({theme:e})=>e.colors.secondary+sl["080"]};
|
|
386
|
+
}
|
|
387
|
+
&:active {
|
|
388
|
+
background: ${({theme:e})=>e.text.secondary+sl["060"]};
|
|
389
|
+
}
|
|
390
|
+
`,secondary:n`
|
|
391
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
392
|
+
background: ${({theme:e})=>e.colors.primary};
|
|
393
|
+
color: ${({theme:e})=>e.colors.secondary};
|
|
394
|
+
&:hover {
|
|
395
|
+
border: 1px solid ${({theme:e})=>e.text.darker_grey};
|
|
396
|
+
background: ${({theme:e})=>e.colors.secondary+sl["010"]};
|
|
397
|
+
}
|
|
398
|
+
&:active {
|
|
399
|
+
border: 1px solid ${({theme:e})=>e.text.dark_grey};
|
|
400
|
+
background: ${({theme:e})=>e.colors.secondary+sl["015"]};
|
|
401
|
+
}
|
|
402
|
+
`,tertiary:n`
|
|
403
|
+
border-color: transparent;
|
|
404
|
+
background: transparent;
|
|
405
|
+
&:hover {
|
|
406
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2+sl["040"]};
|
|
407
|
+
}
|
|
408
|
+
&:active {
|
|
409
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
410
|
+
}
|
|
411
|
+
`,danger:n`
|
|
412
|
+
border-color: transparent;
|
|
413
|
+
background: ${({theme:e})=>e.text.error};
|
|
414
|
+
&:hover {
|
|
415
|
+
background: ${({theme:e})=>e.text.error+sl["090"]};
|
|
416
|
+
}
|
|
417
|
+
&:active {
|
|
418
|
+
background: ${({theme:e})=>e.text.error+sl["080"]};
|
|
419
|
+
}
|
|
420
|
+
`,warning:n`
|
|
421
|
+
border-color: transparent;
|
|
422
|
+
background: ${({theme:e})=>e.text.warning};
|
|
423
|
+
&:hover {
|
|
424
|
+
background: ${({theme:e})=>e.text.warning+sl["090"]};
|
|
425
|
+
}
|
|
426
|
+
&:active {
|
|
427
|
+
background: ${({theme:e})=>e.text.warning+sl["080"]};
|
|
428
|
+
}
|
|
429
|
+
`},bl=o.button`
|
|
430
|
+
height: 36px;
|
|
431
|
+
border-radius: 32px;
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
display: flex;
|
|
434
|
+
align-items: center;
|
|
435
|
+
justify-content: center;
|
|
436
|
+
gap: 8px;
|
|
437
|
+
padding: 0 12px;
|
|
438
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
439
|
+
text-transform: uppercase;
|
|
440
|
+
text-decoration: underline;
|
|
441
|
+
font-weight: 600;
|
|
442
|
+
outline: none;
|
|
443
|
+
${({$variant:e})=>e&&yl[e]}
|
|
444
|
+
${({disabled:e,$variant:t})=>e&&n`
|
|
445
|
+
opacity: 0.5;
|
|
446
|
+
cursor: not-allowed;
|
|
447
|
+
|
|
448
|
+
${"primary"===t?n`
|
|
449
|
+
color: ${({theme:e})=>e.colors.secondary};
|
|
450
|
+
background: ${({theme:e})=>e.text.secondary+sl["010"]};
|
|
451
|
+
&:hover {
|
|
452
|
+
background: ${({theme:e})=>e.text.secondary+sl["015"]};
|
|
453
|
+
}
|
|
454
|
+
`:""}
|
|
455
|
+
`}
|
|
456
|
+
`,vl=({children:t,variant:r="primary",onClick:o,...n})=>{const i=Xt(null);return e(xl,{$variant:r,children:e(bl,{ref:i,$variant:r,onClick:e=>{o&&o(e),i.current?.blur()},...n,children:t})})},$l=e=>{function t(){return void 0===e?{}:$r(e)}const[r,o]=jt(t()),[n,i]=jt({}),a=Gt((e,t)=>{const r={};if(!t||"object"!=typeof t)return e?{...e}:r;for(const[o,n]of Object.entries(e)){const e=o;if(Array.isArray(n)){const o=t[e];Array.isArray(o)&&n.length===o.length&&n.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(a(e,o[t])).length:e===o[t])||(r[e]=t[e])}else if("object"==typeof n&&null!==n)if(null==t[e]||"object"!=typeof t[e])r[e]=t[e];else{const o=a(n,t[e]);Object.keys(o).length>0&&(r[e]=o)}else n!==t[e]&&(r[e]=t[e])}for(const o of Object.keys(t))o in e||(r[o]=t[o]);return r},[]),s=(e,t)=>0===Object.keys(a(e,t)).length,l=Ht(()=>void 0!==e&&!s(e,r),[e,r]);Wt(()=>{const n=t();void 0!==e&&"{}"===JSON.stringify(r)&&"{}"!==JSON.stringify(n)&&o(n)},[e,r]);const c=Gt((e,t)=>wr("formData"===e?r:n,t.toString()),[r,n]);return{formData:r,formErrors:n,getFormDiff:a,areFormValuesEqual:s,isFormDirty:l,handleFormChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?o(r=>({...r,[e]:t})):o(e=>{const o=$r(e);let n=o;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,o})}else r&&o({...r})},handleErrorChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?i(r=>({...r,[e]:t})):i(e=>{const o=$r(e);let n=o;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,o})}else r&&i({...r})},resetFormData:e=>{o(e||t()),i({})},getNestedValue:c}},wl={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null,urlTemplatizationRulesGroups:null}},Sl=()=>{const{addNotification:e}=Gs(),{formData:t,formErrors:r,handleFormChange:o,handleErrorChange:n,resetFormData:i}=$l(wl),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:r,handleFormChange:o,resetFormData:i,validateForm:r=>{const o={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":Qn(t)&&(o[e]=Eo.FIELD_IS_REQUIRED)}}),t.type===Dr.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){o.fields=Eo.FIELD_IS_REQUIRED;break}}return i=!Object.values(o).length,!i&&r?.withAlert&&e({type:Gr.Warning,title:r.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),n(void 0,void 0,o),i},loadFormWithDrawerItem:({type:e,signals:t,name:r,notes:n,disabled:i,fields:s})=>{const l={...$r(wl),type:e,signals:t,name:r,notes:n,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Tr.LabelsAttributes:case Tr.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Tr.CollectContainerAttributes:case Tr.CollectReplicaSetAttributes:case Tr.CollectWorkloadId:case Tr.CollectClusterId:case Tr.ClusterAttributes:case Tr.OverwriteExistingValues:case Tr.AttributeNamesToDelete:case Tr.Renames:case Tr.PiiCategories:case Tr.FallbackSamplingRatio:case Tr.SamplingPercentage:case Tr.EndpointsFilters:case Tr.ServicesNameFilters:case Tr.AttributeFilters:case Tr.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),o(void 0,void 0,l)}}},kl=e=>{Wt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},Cl=()=>{const{setCurrentModal:e}=Xs(),{setDrawerType:t,setDrawerEntityId:r}=Us(),{setActiveNodeType:o,setActiveNodeId:n,activeNodeId:i}=ji();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(i===l?(o(null),n(null)):(o(c),n(l)),p){case jr.Source:case jr.Destination:case jr.Action:case jr.InstrumentationRule:t(p),r(d);break;case Zr.AddSource:e(jr.Source);break;case Zr.AddDestination:e(jr.Destination);break;case Zr.AddAction:e(jr.Action);break;case Zr.AddRule:e(jr.InstrumentationRule)}}}},El=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Us(),{markAsDismissed:r,markAsSeen:o}=Gs();return{onClickNotification:(n,i)=>{const{id:a,crdType:s,target:l}=n,{dismissToast:c}=i||{};if(s&&l)switch(s){case jr.InstrumentationRule:e(jr.InstrumentationRule),t(Vo(l,jr.InstrumentationRule));break;case jr.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(jr.Source),t(Vo(l,jr.Source));break;case jr.Action:e(jr.Action),t(Vo(l,jr.Action));break;case jr.Destination:case"Destination":e(jr.Destination),t(Vo(l,jr.Destination))}o(a),c&&r(a)}}},Al=()=>{const e=Xt(null),[t,r]=jt(0),[o,n]=jt(0);return Wt(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();r(t),n(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}};var Dl;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(Dl||(Dl={}));const Tl=o.div`
|
|
457
|
+
width: ${({$size:e})=>1.5*e}px;
|
|
458
|
+
height: ${({$size:e})=>1.5*e}px;
|
|
459
|
+
display: flex;
|
|
460
|
+
align-items: center;
|
|
461
|
+
justify-content: center;
|
|
462
|
+
border-radius: 100%;
|
|
463
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
464
|
+
&:hover {
|
|
465
|
+
background: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
466
|
+
}
|
|
467
|
+
`,Il=({"data-id":t,icon:r,size:o=Dl.S,onClick:n,disabled:i})=>e(Tl,{"data-id":t,$size:o,$disabled:i,onClick:e=>{n&&!i&&(e.stopPropagation(),n(e))},children:e(r,{size:o})}),Nl=({onDone:t}={})=>{const[r,o]=jt(!1),[n,i]=jt(-1),a=Gt(async(e,n)=>{if(!r){if(o(!0),void 0!==n&&i(n),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[r,t]);return{CopyButton:Gt(({value:t,size:o})=>e(Il,{icon:r?ft:xt,size:o,onClick:()=>a(t)}),[r]),isCopied:r,copiedIndex:n,clickCopy:a}},Ol=e=>{const{addNotification:t}=Gs(),{formData:r,handleFormChange:o,formErrors:n,handleErrorChange:i,resetFormData:a}=$l(e);return{formData:r,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:e=>{const o={};let n=!0;return r.name?Zn(r.name)?o.name=void 0:(n=!1,o.name=Eo.ILLEGAL_K8S_LABEL):(n=!1,o.name=Eo.FIELD_IS_REQUIRED),!n&&e?.withAlert&&t({type:Gr.Warning,title:e.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),n},loadFormWithDrawerItem:({name:t})=>{const r={...$r(e),name:t};o(void 0,void 0,r)}}},Rl={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},_l=e=>{const{supportedSignals:t,preLoadedFields:r}=e||{},{addNotification:o}=Gs(),{formData:n,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=$l(Rl),[c,d]=jt([]),[p,u]=jt([]);Wt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e;if(r===Hr.Dropdown){const e=qn(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:r,title:n,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:r,title:n,value:i,renderCondition:a,...qn(o,{})}})).map(e=>{if(r){const t="string"==typeof r?qn(r,{}):r;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,r]),Wt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),Wt(()=>{if(t&&0===li(n.exportedSignals).length){const{logs:e,metrics:r,traces:o}=t;a("exportedSignals",{logs:e.supported,metrics:r.supported,traces:o.supported})}},[t,n.exportedSignals]);return{formData:n,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let r=!0;return p.forEach(({name:e,value:o,required:n})=>{n&&!o&&(r=!1,t[e]=Eo.FIELD_IS_REQUIRED)}),!r&&e?.withAlert&&o({type:Gr.Warning,title:e.alertTitle,message:Eo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),r},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:r,exportedSignals:o,fields:n})=>{const i={...$r(Rl),type:e,name:t,disabled:r,exportedSignals:o,fields:Object.entries(qn(n,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Fl={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[lo.HttpRequest]:null,[lo.HttpResponse]:null,[lo.DbQuery]:null,[lo.Messaging]:null},codeAttributes:{[io.Column]:null,[io.FilePath]:null,[io.Function]:null,[io.LineNumber]:null,[io.Namespace]:null,[io.StackTrace]:null},headersCollection:null,customInstrumentations:{[so.Java]:null,[so.Golang]:null}},Pl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=$l(Fl);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:n,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...$r(Fl),ruleName:e,notes:t,disabled:o};n&&(l.payloadCollection={[lo.HttpRequest]:n[lo.HttpRequest]?{}:null,[lo.HttpResponse]:n[lo.HttpResponse]?{}:null,[lo.DbQuery]:n[lo.DbQuery]?{}:null,[lo.Messaging]:n[lo.Messaging]?{}:null}),i&&(l.codeAttributes={[io.Column]:i[io.Column]||null,[io.FilePath]:i[io.FilePath]||null,[io.Function]:i[io.Function]||null,[io.LineNumber]:i[io.LineNumber]||null,[io.Namespace]:i[io.Namespace]||null,[io.StackTrace]:i[io.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[so.Java]:s[so.Java]||null,[so.Golang]:s[so.Golang]||null}),r(void 0,void 0,l)}}},Ll=({active:e,key:t,withAltKey:r,withCtrlKey:o,withShiftKey:n,withMetaKey:i},a)=>(Wt(()=>{const s=s=>{e&&t===s.key&&(!r||r&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!n||n&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,r,o,n,i,a]),null),zl=(e,t)=>{Wt(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])},Ml=({sectionNames:e,threshold:t=.4})=>{const[r,o]=jt(e[0]||""),[n,i]=jt(null),a=Xt({}),s=Xt(!1),l=Xt(!1),c=Gt((e,t)=>{a.current[e]=t},[]),d=Gt(e=>{i(e)},[]),p=Gt(e=>{l.current=!0,o(e)},[]);return Wt(()=>{if(!l.current)return;l.current=!1;const e=a.current[r];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[r]),Wt(()=>{const r=a.current,i=e.map(e=>r[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&o(e);break}},{threshold:t,root:n});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,n]),{selectedSection:r,setSelectedSection:p,setSectionRef:c,setScrollContainerRef:d}},Bl=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:r,positionMode:o="local"}={})=>{const n=Xt(null),[i,a]=jt(!1),[s,l]=jt({top:0,left:0}),[c,d]=jt({edge:"top",align:"left"});zl(n,()=>{i&&(a(!1),r?.())});return{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(r,i)=>{if("local"===o)return void l({top:i,left:r});const{innerWidth:a,innerHeight:s}=window,c=n.current?.clientWidth||t,p=n.current?.clientHeight||e,u=r/a,h=u<1/3?"left":u>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=r;if(m>=s/2&&(m+=-p),"center"===h){g=r-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=r-c);l({top:m,left:g})}}},Ul=()=>({getItemSS:(e,t)=>{const r=sessionStorage.getItem(e);return r?qn(r,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),jl={otelServiceName:"",currentStreamName:""},Wl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=$l(jl);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...$r(jl),otelServiceName:e||t||""};r(void 0,void 0,o)}}},Hl=Kt({platformType:zr.K8s,tier:Lr.Community,version:"v0.0.0"}),Xl=({children:t,platformType:r,tier:o,version:n})=>{const i=Ht(()=>({platformType:r,tier:o,version:n}),[r,o,n]);return e(Hl.Provider,{value:i,children:t})},Gl=(e,t)=>!t||yi(e)>=yi(t),Vl=e=>{const t=Vt(Hl),r=Gl(t.version,e),o=t.platformType===zr.Vm;return{...t,isVersionSupported:r,isVm:o,isEnterprise:t.tier===Lr.Onprem}},Kl=new Set([to.StaticPod]),ql=e=>{const t=e.workloads.filter(({selected:e})=>e).length,r=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===r,isSomeSourced:t>0&&t<r,isFutureApps:e.selected||!1}},Jl=(e,t,r)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(r.showOnlySelected){const{isAllSourced:t,isSomeSourced:r,isFutureApps:o}=ql(e);return t||r||o}return!0},Yl=(e,t,r)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!r.showOnlySelected||e.selected),Ql=(e,t,r)=>{const o=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,n=o&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!o||n)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},Zl=(e,t,r)=>({...Ql(e,t),currentStreamName:t}),ec=(e,t,r)=>{const o="boolean"==typeof r,n=e.dataStreamNames?.includes(t),i=(o?r:e.selected)||!1;return{namespace:e.name,selected:!(!n&&!o)&&i,currentStreamName:t}},tc=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:r}=Vl(),o=e=>r!==Lr.Onprem&&Kl.has(e),{selectedStreamName:n}=Bs(),{namespaces:i,addEntities:a}=js(),[s,l]=jt(!1),[c,d]=jt({}),[p,u]=jt(!1),[h,m]=jt(""),[g,f]=jt({}),[x,y]=jt({}),[b,v]=jt(""),[$,w]=jt(jr.Source),[S,k]=jt(!1),[C,E]=jt(!1),A=Ht(()=>{const e=(e,t)=>!b||$!==t||$===t&&e.toLowerCase().includes(b),t={};return Object.entries(x).filter(([t])=>e(t,jr.Namespace)).forEach(([r,o])=>{const n=o.filter(t=>{return e(t.name,jr.Source)&&(r=t,!S||r.selected)&&(e=>!C||(e.numberOfInstances||0)>0)(t);var r});(!b||b&&($===jr.Namespace||$===jr.Source&&n.length))&&(t[r]=n)}),t},[x,b,$,S,C]);return Wt(()=>{(async()=>{l(!0);const e=await t();l(!1);const r=e.data;if(!r?.length)return;const o=[...r].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of o){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>Ql(e,n)),s[e.name]=t.map(e=>Zl(e,n)),c[e.name]=ec(e,n)}a(jr.Namespace,r.map(({sources:e,...t})=>t));const{configuredSources:p,configuredFutureApps:u}=el.getState();Object.entries(p).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const r=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==r&&(s[e][r]={...s[e][r],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(u).forEach(([e,t])=>{c[e]&&(c[e]=t)}),d(i),y(s),f(c)})()},[n]),{loading:s,availableSources:c,filteredNamespacesAndSources:A,getApiSourcesPayload:()=>{const e={};return Object.entries(x).forEach(([t,r])=>{r.forEach(r=>{const o=c[t]?.find(e=>e.name===r.name&&e.kind===r.kind);o?.selected!==r.selected&&(e[t]||(e[t]=[]),e[t].push(r))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,r])=>{const o=i?.find(e=>e.name===t);(r.selected&&!o?.dataStreamNames?.includes(n)||!r.selected&&o?.dataStreamNames?.includes(n))&&(e[t]=r)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const r="boolean"==typeof t;m(t=>t!==e||r?e:""),r&&(y(r=>({...r,[e]:(r[e]||[]).map(e=>t&&o(e.kind)?e:{...e,selected:t,currentStreamName:n})})),u(!1))}},selectedAllNamespaces:p,onSelectAllNamespaces:e=>{u(e),y(t=>{const r={};for(const[i,a]of Object.entries(t))r[i]=a.map(t=>e&&o(t.kind)?t:{...t,selected:e,currentStreamName:n});return r})},selectedSources:x,onSelectSource:(e,t)=>{const r=t||h;if(!r)return;if(o(e.kind))return;const i=[...x[r]||[]],a=i.findIndex(({name:t,kind:r})=>t===e.name&&r===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:n};i[a]=e}else i.push({...e,selected:!0,currentStreamName:n});y(e=>({...e,[r]:i})),u(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const r=t||h;if(!r)return;const o=i.find(e=>e.name===t);o&&f(t=>({...t,[r]:ec(o,n,e)}))},searchText:b,setSearchText:v,searchBy:$,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:E}};try{Qt.addDefaultLocale(rr)}catch(e){}const rc=()=>{const e=Xt(new Qt(rr.locale));return{formatTimeAgo:Gt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},oc=o.div`
|
|
468
|
+
position: fixed;
|
|
469
|
+
top: 50%;
|
|
470
|
+
left: 50%;
|
|
471
|
+
transform: translate(-50%, -50%);
|
|
472
|
+
z-index: 1000;
|
|
473
|
+
width: fit-content;
|
|
474
|
+
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
475
|
+
border: ${({theme:e})=>`1px solid ${e.colors.border}`};
|
|
476
|
+
border-radius: 40px;
|
|
477
|
+
box-shadow: ${({theme:e})=>{const t=e.colors.primary+sl["010"];return`0px 1px 1px 0px ${t}, 0px 2px 2px 0px ${t}, 0px 5px 5px 0px ${t}, 0px 10px 10px 0px ${t}, 0px 0px 8px 0px ${t}`}};
|
|
478
|
+
animation-name: ${cl.in.center};
|
|
479
|
+
`,nc=o.div`
|
|
480
|
+
display: flex;
|
|
481
|
+
justify-content: space-between;
|
|
482
|
+
align-items: center;
|
|
483
|
+
height: 80px;
|
|
484
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
485
|
+
padding: 0 24px;
|
|
486
|
+
`,ic=o.div`
|
|
487
|
+
cursor: pointer;
|
|
488
|
+
display: flex;
|
|
489
|
+
align-items: center;
|
|
490
|
+
gap: 8px;
|
|
491
|
+
`,ac=o.div`
|
|
492
|
+
display: flex;
|
|
493
|
+
align-items: center;
|
|
494
|
+
gap: 8px;
|
|
495
|
+
`,sc=o(Nn)`
|
|
496
|
+
min-width: 350px;
|
|
497
|
+
min-height: 150px;
|
|
498
|
+
`,lc=o.div`
|
|
499
|
+
position: absolute;
|
|
500
|
+
left: 50%;
|
|
501
|
+
transform: translateX(-50%);
|
|
502
|
+
display: flex;
|
|
503
|
+
align-items: center;
|
|
504
|
+
justify-content: center;
|
|
505
|
+
width: 100%;
|
|
506
|
+
pointer-events: none;
|
|
507
|
+
`,cc=o(Si)`
|
|
508
|
+
text-transform: uppercase;
|
|
509
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
510
|
+
pointer-events: auto;
|
|
511
|
+
`,dc=o(Si)`
|
|
512
|
+
text-transform: uppercase;
|
|
513
|
+
font-weight: 500;
|
|
514
|
+
font-size: 14px;
|
|
515
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
516
|
+
text-decoration: underline;
|
|
517
|
+
cursor: pointer;
|
|
518
|
+
`,pc=({isOpen:o,noOverlay:n,header:i,actionComponent:a,onClose:s,children:l,closeOnEscape:c=!0})=>(Ll({key:"Escape",active:o&&c},()=>s()),kl(o),o?dr.createPortal(t(r,{children:[e(Rn,{hidden:!o,onClick:s,style:{opacity:n?0:1}}),t(oc,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&t(nc,{children:[t(ic,{onClick:s,children:[e(yt,{}),e(dc,{children:"Cancel"})]}),e(lc,{children:e(cc,{children:i.title})}),e(ac,{children:a})]}),e(sc,{children:l})]})]}),document.body):null),uc=o.div`
|
|
519
|
+
width: ${({$orientation:e,$thickness:t,$length:r})=>"vertical"===e?`${t}px`:r||"100%"};
|
|
520
|
+
height: ${({$orientation:e,$thickness:t,$length:r})=>"horizontal"===e?`${t}px`:r||"100%"};
|
|
521
|
+
margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
|
|
522
|
+
background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+sl["050"]};
|
|
523
|
+
opacity: ${({$opacity:e})=>e||1};
|
|
524
|
+
`,hc=({orientation:t="horizontal",type:r,thickness:o=1,length:n,margin:i,opacity:a})=>e(uc,{$orientation:t,$type:r,$thickness:o,$length:n,$margin:i,$opacity:a}),mc=o.div`
|
|
525
|
+
/* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
|
|
526
|
+
position: ${({$asPortal:e})=>e?"fixed":"absolute"};
|
|
527
|
+
${({$top:e})=>void 0!==e&&`top: ${e}px;`}
|
|
528
|
+
${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
|
|
529
|
+
${({$left:e})=>void 0!==e&&`left: ${e}px;`}
|
|
530
|
+
${({$right:e})=>void 0!==e&&`right: ${e}px;`}
|
|
531
|
+
z-index: 9999;
|
|
532
|
+
|
|
533
|
+
background-color: ${({theme:e})=>e.colors.info};
|
|
534
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
535
|
+
border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
|
|
536
|
+
max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
|
|
537
|
+
width: ${({$width:e})=>void 0!==e?e:"unset"};
|
|
538
|
+
|
|
539
|
+
${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
|
|
540
|
+
`,gc=o.div`
|
|
541
|
+
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
542
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
543
|
+
`,fc=o.div`
|
|
544
|
+
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
545
|
+
`,xc=o.div`
|
|
546
|
+
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
547
|
+
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
548
|
+
`,yc=qt(({isOpen:r,asPortal:o,...n},i)=>{const a=Ht(()=>{const{children:r,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:p,maxWidth:u,width:h,header:m,footer:g,withPointerEvents:f,...x}=n;return t(mc,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:p,$maxWidth:u,$width:h,$asPortal:o,$withPointerEvents:f,...x,children:[m&&e(gc,{$padding:p,children:m}),e(fc,{$padding:p,children:r}),g&&e(xc,{$padding:p,children:g})]})},[i,n,o]);return r?o?dr.createPortal(a,document.body):a:null});yc.displayName=yc.name;const bc=o.div`
|
|
549
|
+
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
550
|
+
position: relative;
|
|
551
|
+
display: flex;
|
|
552
|
+
align-items: center;
|
|
553
|
+
gap: 4px;
|
|
554
|
+
cursor: help;
|
|
555
|
+
${({$ellipsis:e})=>e&&"\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "}
|
|
556
|
+
`,vc=o.div`
|
|
557
|
+
display: flex;
|
|
558
|
+
flex-direction: column;
|
|
559
|
+
align-items: flex-start;
|
|
560
|
+
gap: 8px;
|
|
561
|
+
width: 100%;
|
|
562
|
+
`,$c=o.div`
|
|
563
|
+
display: flex;
|
|
564
|
+
width: 100%;
|
|
565
|
+
flex-shrink: 0;
|
|
566
|
+
box-sizing: border-box;
|
|
567
|
+
line-height: 0;
|
|
568
|
+
|
|
569
|
+
${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
|
|
570
|
+
${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
|
|
571
|
+
${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
|
|
572
|
+
`,wc=o.div`
|
|
573
|
+
width: 0;
|
|
574
|
+
height: 0;
|
|
575
|
+
border-style: solid;
|
|
576
|
+
border-left: 6.5px solid transparent;
|
|
577
|
+
border-right: 6.5px solid transparent;
|
|
578
|
+
flex-shrink: 0;
|
|
579
|
+
|
|
580
|
+
${({$pointsUp:e,theme:t})=>e?`\n border-bottom: 8px solid ${t.v2.colors.black[500]};\n border-top-width: 0;\n `:`\n border-top: 8px solid ${t.v2.colors.black[500]};\n border-bottom-width: 0;\n `}
|
|
581
|
+
`,Sc=o.div`
|
|
582
|
+
display: flex;
|
|
583
|
+
flex-direction: column;
|
|
584
|
+
align-items: stretch;
|
|
585
|
+
min-width: 0;
|
|
586
|
+
`,kc=o.div`
|
|
587
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
588
|
+
border-radius: 4px;
|
|
589
|
+
padding: 8px;
|
|
590
|
+
box-sizing: border-box;
|
|
591
|
+
min-width: 0;
|
|
592
|
+
`,Cc=({withIcon:o,titleIcon:n,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:p=!1,ellipsis:u=!1})=>{const h=i(),{popupRef:m,popupOpen:g,setPopupOpen:f,popupPosition:x,arrowPlacement:y,handlePosition:b}=Bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),v=Ht(()=>!!vi(s||"")?.length,[s]),$=e=>{const{type:t,clientX:r,clientY:o}=e;v?b(x.left||r,x.top||o):b(r,o),f("mouseleave"!==t)};return s||p?t(bc,{$fullWidth:d,$ellipsis:u,onMouseEnter:$,onMouseMove:$,onMouseLeave:$,children:[c,o&&e(Ye,{fill:h.v2.colors.white[500]}),e(yc,{ref:m,isOpen:g&&!!s,top:x.top,left:x.left,asPortal:!0,withPointerEvents:v,onMouseEnter:v?$:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(Sc,{children:["top"===y.edge&&e($c,{$align:y.align,children:e(wc,{$pointsUp:!0})}),e(kc,{children:t(vc,{children:[(!!n||!!a)&&t(Tn,{$gap:4,style:{alignItems:"center"},children:[n&&e(n,{size:16},"icon"),a&&e(cn,{size:sn.XS,children:a},"title")]}),!!s&&e(cn,{size:sn.XXXS,children:s}),!!l&&e(cn,{size:sn.XXXS,color:h.v2.colors.silver[200],children:new Date(l).toLocaleString()})]})}),"bottom"===y.edge&&e($c,{$align:y.align,children:e(wc,{$pointsUp:!1})})]})})]}):e(r,{children:c})},Ec=o.button`
|
|
593
|
+
position: relative;
|
|
594
|
+
width: ${({$size:e})=>e}px;
|
|
595
|
+
height: ${({$size:e})=>e}px;
|
|
596
|
+
border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
|
|
597
|
+
border-radius: 100%;
|
|
598
|
+
background-color: ${({$backgroundColor:e})=>e||"transparent"};
|
|
599
|
+
display: flex;
|
|
600
|
+
align-items: center;
|
|
601
|
+
justify-content: center;
|
|
602
|
+
cursor: pointer;
|
|
603
|
+
&:hover {
|
|
604
|
+
background-color: ${({theme:e,$backgroundColor:t})=>t?t+sl["070"]:e.colors.dropdown_bg_2};
|
|
605
|
+
}
|
|
606
|
+
`,Ac=o.div`
|
|
607
|
+
position: absolute;
|
|
608
|
+
top: ${({$size:e})=>e/5}px;
|
|
609
|
+
right: ${({$size:e})=>e/5}px;
|
|
610
|
+
width: 6px;
|
|
611
|
+
height: 6px;
|
|
612
|
+
border-radius: 100%;
|
|
613
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
614
|
+
|
|
615
|
+
&::after {
|
|
616
|
+
content: '';
|
|
617
|
+
position: absolute;
|
|
618
|
+
inset: 0;
|
|
619
|
+
border-radius: 100%;
|
|
620
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
621
|
+
animation: ${pl} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
622
|
+
}
|
|
623
|
+
`,Dc=({children:r,onClick:o,tooltip:n,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Cc,{text:n,children:t(Ec,{$size:i,$withBorder:l,$backgroundColor:c,onClick:o,...d,children:[a&&e(Ac,{$size:i,$color:s}),r]})}),Tc=o.div`
|
|
624
|
+
position: relative;
|
|
625
|
+
&.animated {
|
|
626
|
+
overflow: hidden;
|
|
627
|
+
padding-bottom: 1px;
|
|
628
|
+
border-radius: 32px;
|
|
629
|
+
animation: ${({$isLeaving:e})=>e?cl.out.bottom:cl.in.bottom} ${({$duration:e})=>e/10}ms forwards;
|
|
630
|
+
}
|
|
631
|
+
`,Ic=o.div`
|
|
632
|
+
position: absolute;
|
|
633
|
+
bottom: -1px;
|
|
634
|
+
left: 0;
|
|
635
|
+
z-index: -1;
|
|
636
|
+
width: 100%;
|
|
637
|
+
height: 100%;
|
|
638
|
+
border-radius: 32px;
|
|
639
|
+
background-color: ${({$type:e,theme:t})=>t.text[e]};
|
|
640
|
+
animation: ${dl.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
|
|
641
|
+
`,Nc=o.div`
|
|
642
|
+
display: flex;
|
|
643
|
+
align-items: center;
|
|
644
|
+
flex: 1;
|
|
645
|
+
gap: 8px;
|
|
646
|
+
padding: 0 12px;
|
|
647
|
+
border-radius: 32px;
|
|
648
|
+
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
649
|
+
`,Oc=o.div`
|
|
650
|
+
display: flex;
|
|
651
|
+
align-items: center;
|
|
652
|
+
margin: 0 auto 0 0;
|
|
653
|
+
padding: 8px 0;
|
|
654
|
+
max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
|
|
655
|
+
min-height: 12px;
|
|
656
|
+
`,Rc=o(Si)`
|
|
657
|
+
font-size: 14px;
|
|
658
|
+
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
659
|
+
`,_c=o(Si)`
|
|
660
|
+
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
661
|
+
font-size: 12px;
|
|
662
|
+
`,Fc=o(Tn)``,Pc=o(Si)`
|
|
663
|
+
text-transform: uppercase;
|
|
664
|
+
text-decoration: underline;
|
|
665
|
+
font-size: 12px;
|
|
666
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
667
|
+
white-space: nowrap;
|
|
668
|
+
cursor: pointer;
|
|
669
|
+
&:hover {
|
|
670
|
+
transform: scale(1.1);
|
|
671
|
+
transition: transform 0.3s;
|
|
672
|
+
}
|
|
673
|
+
`,Lc=({type:r,icon:o,title:n,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:p})=>{const u=i(),[h,m]=jt(!1),g=Xt(null),f=Xt(null),x=e=>{l&&(m(!0),l({asSeen:e?.asSeen}))};Wt(()=>(g.current=setTimeout(()=>x({asSeen:!1}),c),()=>{g.current&&clearTimeout(g.current)}),[c]);const y=o||jn(r,u);return t(Tc,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{g.current&&clearTimeout(g.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;g.current=setTimeout(()=>x({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(Nc,{"data-id":"toast",$type:r,style:p,children:[e(y,{fill:u.text[r]}),t(Oc,{$withAction:!!s,$overrideMaxWidth:d,children:[n&&e(Rc,{$type:r,children:n}),n&&a&&e(hc,{orientation:"vertical",type:r}),a&&e(_c,{$type:r,children:a})]}),(!!s||!!l)&&t(Fc,{children:[s&&e(Pc,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Dc,{"data-id":"toast-close",onClick:()=>x({asSeen:!0}),children:e(yt,{size:12})})]})]}),l&&e(Ic,{ref:f,$duration:c,$type:r})]})},zc=o.div`
|
|
674
|
+
padding: 24px 32px;
|
|
675
|
+
`,Mc=o.div`
|
|
676
|
+
padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
|
|
677
|
+
`,Bc=o(Si)`
|
|
678
|
+
font-size: 20px;
|
|
679
|
+
line-height: 28px;
|
|
680
|
+
`,Uc=o(Si)`
|
|
681
|
+
color: ${({theme:e})=>e.text.grey};
|
|
682
|
+
width: 416px;
|
|
683
|
+
font-style: normal;
|
|
684
|
+
font-weight: 300;
|
|
685
|
+
line-height: 24px;
|
|
686
|
+
`,jc=o.div`
|
|
687
|
+
display: flex;
|
|
688
|
+
justify-content: space-between;
|
|
689
|
+
gap: 12px;
|
|
690
|
+
`,Wc=o(vl)`
|
|
691
|
+
width: 250px;
|
|
692
|
+
`,Hc=o.div`
|
|
693
|
+
margin-bottom: 12px;
|
|
694
|
+
`,Xc=({isOpen:r,noOverlay:o,title:n="",description:i="",note:a,approveButton:s,denyButton:l,closeOnEscape:c=!0})=>{Ll({key:"Enter",active:r&&c},()=>s.onClick());const d=()=>l.onClick();return e(pc,{isOpen:r,noOverlay:o,onClose:d,children:t(zc,{children:[e(Bc,{children:n}),e(Mc,{$withNote:!!a,children:e(Uc,{children:i})}),!!a&&e(Hc,{children:e(Lc,{type:a.type,title:a.title,message:a.message})}),t(jc,{children:[e(Wc,{"data-id":"approve",variant:s.variant||"primary",onClick:()=>s.onClick(),children:s.text}),e(Wc,{"data-id":"deny",variant:l.variant||"secondary",onClick:d,children:l.text})]})]})})},Gc=({isOpen:t,noOverlay:r,name:o,onApprove:n,onDeny:i})=>e(Xc,{isOpen:t,noOverlay:r,title:"Cancel"+(o?` ${o}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Gr.Warning,onClick:n},denyButton:{text:"Go Back",onClick:i}}),Vc=o.div`
|
|
695
|
+
display: flex;
|
|
696
|
+
align-items: center;
|
|
697
|
+
gap: 8px;
|
|
698
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
699
|
+
opacity: ${({$disabled:e})=>e?.6:1};
|
|
700
|
+
`,Kc=o.div`
|
|
701
|
+
width: 18px;
|
|
702
|
+
height: 18px;
|
|
703
|
+
border-radius: 6px;
|
|
704
|
+
border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e||t?"transparent":r.colors.secondary};
|
|
705
|
+
display: flex;
|
|
706
|
+
align-items: center;
|
|
707
|
+
justify-content: center;
|
|
708
|
+
background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e?r.colors.majestic_blue:t?r.colors.majestic_blue_soft:r.colors.secondary+sl["020"]};
|
|
709
|
+
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
710
|
+
transition: border 0.3s;
|
|
711
|
+
&:hover {
|
|
712
|
+
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
713
|
+
}
|
|
714
|
+
`,qc=({title:r,titleColor:o,tooltip:n,value:a=!1,partiallyChecked:s=!1,onChange:l,disabled:c,style:d,errorMessage:p,allowPropagation:u=!1})=>{const h=i(),[m,g]=jt(a);Wt(()=>g(a),[a]);return t(In,{children:[t(Vc,{"data-id":"checkbox"+(r?`-${r}`:""),$disabled:c,onClick:e=>{c||(u||e.stopPropagation(),l?l(!!s||!m):g(e=>!!s||!e))},style:d,children:[e(Kc,{$isChecked:m,$isPartiallyChecked:s,$disabled:c,children:s?e(bt,{fill:h.text.white}):m?e(ft,{fill:h.text.white}):null}),r&&e(Cc,{text:n,withIcon:!0,children:e(Si,{size:12,color:o||h.text.grey,style:{maxWidth:"90%"},children:r})})]}),!!p&&e(Ei,{children:p})]})},Jc=o(Tn)`
|
|
715
|
+
gap: 0;
|
|
716
|
+
`,Yc=o.button`
|
|
717
|
+
padding: 4px 8px;
|
|
718
|
+
background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
|
|
719
|
+
border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
|
|
720
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
721
|
+
display: flex;
|
|
722
|
+
align-items: center;
|
|
723
|
+
justify-content: center;
|
|
724
|
+
cursor: pointer;
|
|
725
|
+
&:hover {
|
|
726
|
+
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
727
|
+
}
|
|
728
|
+
`,Qc=({isPrettyMode:r,setIsPrettyMode:o})=>t(Jc,{children:[e(Yc,{$position:"left",$selected:r,onClick:()=>o(!0),children:e(vt,{})}),e(Yc,{$position:"right",$selected:!r,onClick:()=>o(!1),children:e($t,{})})]}),Zc=o.table`
|
|
729
|
+
border-collapse: collapse;
|
|
730
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
731
|
+
`,ed=o.tbody``,td=o.tr`
|
|
732
|
+
td:first-child {
|
|
733
|
+
padding-left: 0 !important;
|
|
734
|
+
}
|
|
735
|
+
td:last-child {
|
|
736
|
+
padding-right: 0 !important;
|
|
737
|
+
}
|
|
738
|
+
`,rd=o.td`
|
|
739
|
+
vertical-align: top;
|
|
740
|
+
padding: 4px 6px;
|
|
741
|
+
`,od=o(Si)`
|
|
742
|
+
white-space: nowrap;
|
|
743
|
+
`,nd=o.span`
|
|
744
|
+
white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
|
|
745
|
+
overflow-wrap: break-word;
|
|
746
|
+
word-break: break-word;
|
|
747
|
+
word-wrap: break-word;
|
|
748
|
+
/* Fallback for older browsers */
|
|
749
|
+
-ms-word-break: break-all;
|
|
750
|
+
font-size: 12px;
|
|
751
|
+
`,id=({language:t,code:r,theme:o,flatten:n,pretty:a})=>{const{darkMode:s}=i(),l=o?hr[o]:s?hr.palenight:hr.vsLight;let c="";if("json"===t){const e=qn(r,{}),t=mi(e);c=gi(n?Io(t):t)}else c=r;return a&&"json"===t?e(ad,{darkMode:s,str:c}):e(ur,{theme:l||(s?hr.palenight:hr.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:r,tokens:o})=>e("pre",{children:o.map((o,n)=>e("div",{...t({line:o}),children:o.map((t,o)=>e(nd,{...r({token:t})},`line-${n}-token-${o}`))},`line-${n}`))})})},ad=({darkMode:r,str:o})=>{const n=i(),a=(r,o)=>{const i=new Array(r).fill(r=>t(td,{...r,children:[e(rd,{}),e(rd,{})]}));return e(Ut,{children:i.map((t,r)=>e(t,{style:0===r?{borderBottom:`1px solid ${n.colors.border}`}:{}},`empty-row-${o}-${r}`))})};return e(ur,{theme:r?hr.palenight:hr.vsLight,language:"json",code:o,children:({getLineProps:r,getTokenProps:o,tokens:i})=>e(Zc,{children:e(ed,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const r=[...e],o=["property","string"].includes(r[0])?t.replace(/"/g,""):t;return"string"===r[0]&&(["true","false"].includes(o.split("@")[0])&&(r[0]="boolean"),o.split("@")[0].match(/^[0-9]+$/)&&(r[0]="number")),{types:r,content:o}})})(i),c=r({line:l});return 1===l.length&&"property"===l[0].types[0]?t(Ut,{children:[a(2,s),t(td,{...c,children:[e(rd,{children:e(od,{children:l[0].content})}),e(rd,{})]})]},`line-${s}`):2===l.length?e(td,{...c,children:l.map((r,i)=>{const{text:a,components:l}=((t,r)=>{const[o,...n]=t.split("@");return{text:o,components:n?.map((t,o)=>{if(!t.includes("="))return null;const[n,i]=t.split("=");switch(n){case"tooltip":return e(Cc,{withIcon:!0,text:i},`${n}-${i}-${o}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${n}-${i}-${o}`);let t=jn(i,r);return t||(t=jn(Gr.Warning,r)),e(t,{},`${n}-${i}-${o}`);default:return null}})?.filter(e=>!!e)||[]}})(r.content,n),c=0===i;return e(rd,{children:t(Tn,{children:[e(Tn,{children:l}),e(nd,{$noWrap:c,...o({token:r}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},sd={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function ld(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const o=(e.match(/[^0-9]*$/)||"").toString();return sd[o]?{value:t,unit:o}:{value:t,unit:"px"}}function cd(e){const t=ld(e);return`${t.value}${t.unit}`}const dd=((e,t,r)=>{const o=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return o;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),pd=({loading:r=!0,color:o,scale:n=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=o||d.text.secondary;if(!r)return null;const{value:u}=ld(2),h=u+4.2,m=h/2+h/5.5,g=4*h*n,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:n,...l,...s},x=(e,t)=>({position:"absolute",width:cd(1.5),height:cd(4),borderRadius:cd(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${dd} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...x(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...x(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...x(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...x(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...x(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...x(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},ud=o.div`
|
|
752
|
+
margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
|
|
753
|
+
display: flex;
|
|
754
|
+
align-items: center;
|
|
755
|
+
justify-content: center;
|
|
756
|
+
`,hd=({extend:t,size:r=14,align:o="center"})=>e(ud,{$align:o,children:e(wt,{size:r,rotate:t?180:0})}),md=o.div`
|
|
757
|
+
border-radius: 24px;
|
|
758
|
+
background-color: ${({theme:e,$status:t})=>t===Gr.Error?e.text.error+sl["010"]:t===Gr.Warning?e.text.warning+sl["010"]:e.colors.secondary+sl["005"]};
|
|
759
|
+
&:hover {
|
|
760
|
+
background-color: ${({theme:e,$status:t})=>t===Gr.Error?e.text.error+sl["020"]:t===Gr.Warning?e.text.warning+sl["020"]:e.colors.secondary+sl["010"]};
|
|
761
|
+
}
|
|
762
|
+
cursor: pointer;
|
|
763
|
+
transition: background 0.3s;
|
|
764
|
+
`,gd=o.div`
|
|
765
|
+
display: flex;
|
|
766
|
+
align-items: center;
|
|
767
|
+
gap: 12px;
|
|
768
|
+
padding: 12px 18px;
|
|
769
|
+
`,fd=o.div`
|
|
770
|
+
display: flex;
|
|
771
|
+
flex-direction: column;
|
|
772
|
+
gap: 8px;
|
|
773
|
+
padding: 6px 18px 12px 18px;
|
|
774
|
+
`,xd=o.div`
|
|
775
|
+
display: flex;
|
|
776
|
+
align-items: center;
|
|
777
|
+
gap: 12px;
|
|
778
|
+
`,yd=o(Si)`
|
|
779
|
+
white-space: nowrap;
|
|
780
|
+
`,bd=o(In)`
|
|
781
|
+
width: 16px;
|
|
782
|
+
`,vd=({conditions:r,headerLabelError:o="Something Failed",headerLabelWarning:n="Something isn't right",headerLabelSuccess:a="Everything Successful"})=>{const s=i(),[l,c]=jt(!1),d=Ht(()=>ai(r),[r]),{errors:p,hasErrors:u,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Ht(()=>Fo(d),[d]);Wt(()=>{c(u||m||g)},[u,m,g]);const x=(!d.length||f)&&!u&&!m&&!g,y=u?Gr.Error:m?Gr.Warning:g?Gr.Info:Gr.Success,b=jn(y,s),v=u?o:m||g?n:x?"Loading...":a,$=u?s.text.error:m?s.text.warning:s.text.info,w=`(${u?p.length:m?h.length:d.length}/${d.length})`,S=u?s.text.error_secondary:m?s.text.warning_secondary:s.text.info_secondary,k=Gt(()=>c(e=>!e),[]);return t(md,{onClick:k,$status:y,children:[t(gd,{children:[e(x?pd:b,{}),e(Si,{color:$,size:14,children:v}),e(Si,{color:S,size:12,family:"secondary",children:w}),e(hd,{extend:l,align:"right"})]}),l&&e(fd,{children:d.map(({status:r,type:o,reason:n,message:i},a)=>{const l=r===Kr.Loading?()=>e(pd,{scale:.8}):r===Kr.Disabled?jn(Gr.Info,s):jn(r,s),c=r===Kr.Disabled?s.text.info:r===Gr.Error?s.text.error:r===Gr.Warning?s.text.warning:s.text.info,d=r===Kr.Disabled?s.text.info_secondary:r===Gr.Error?s.text.error_secondary:r===Gr.Warning?s.text.warning_secondary:s.text.info_secondary;return t(xd,{children:[e(bd,{children:e(l,{})}),t(Si,{color:c,size:12,children:[e(yd,{color:d,size:12,weight:700,children:o}),i||n]})]},`condition-${a}`)})})]})},$d=o.div`
|
|
783
|
+
display: flex;
|
|
784
|
+
align-items: center;
|
|
785
|
+
gap: ${({$size:e})=>e/3}px;
|
|
786
|
+
padding: ${({$size:e,$withBorder:t,$withBackground:r})=>t||r?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
|
|
787
|
+
width: ${({$width:e})=>e||"fit-content"};
|
|
788
|
+
border-radius: 360px;
|
|
789
|
+
border: ${({$withBorder:e,$status:t,theme:r})=>e?`1px solid ${r.text[t]+sl["050"]}`:"none"};
|
|
790
|
+
background: ${({$withBackground:e,$status:t,theme:r})=>e?`linear-gradient(90deg, transparent 0%, ${r.text[t]+sl["030"]} 100%)`:"transparent"};
|
|
791
|
+
`,wd=o.div`
|
|
792
|
+
display: flex;
|
|
793
|
+
align-items: center;
|
|
794
|
+
`,Sd=o.div`
|
|
795
|
+
display: flex;
|
|
796
|
+
align-items: center;
|
|
797
|
+
`,kd=({title:r,subtitle:o,status:n=Gr.Default,forceIcon:a,withIcon:s,withBorder:l,withBackground:c,width:d,size:p=12,family:u="secondary",nowrap:h=!1})=>{const m=i(),g=[Kr.Loading,Kr.Disabled].includes(n)?Gr.Info:n,f=a?()=>e(a,{size:p+2,fill:m.text[g]}):n===Kr.Loading?()=>e(pd,{scale:.8}):()=>jn(g,m)?.({size:p+2});return t($d,{$status:g,$width:d,$size:p,$withIcon:s,$withBorder:l,$withBackground:c,children:[s&&e(wd,{children:e(f,{})}),(!!r||!!o)&&t(Sd,{children:[!!r&&e(Si,{size:p,family:u,color:m.text[g],nowrap:h,children:r}),!!r&&!!o&&e(hc,{orientation:"vertical",length:p-2+"px",type:g}),!!o&&e(Si,{size:p-2,family:u,color:m.text[`${g}_secondary`],nowrap:h,children:o})]})]})},Cd=({label:r,onClick:o,variant:n="tertiary",textProps:a,...s})=>{const l=i();return t(vl,{onClick:o,variant:n,...s,children:[e(St,{fill:"primary"===n?l.text.primary:l.text.info}),e(Si,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?l.text.primary:void 0,...a,children:r||Do.ADD})]})},Ed=o(Tn)`
|
|
798
|
+
width: 100%;
|
|
799
|
+
border-radius: 8px;
|
|
800
|
+
background-color: ${({theme:e})=>e.colors.secondary+sl["010"]};
|
|
801
|
+
pre {
|
|
802
|
+
color: ${({theme:e})=>e.text.default};
|
|
803
|
+
font-size: 12px;
|
|
804
|
+
overflow-x: auto;
|
|
805
|
+
width: 100%;
|
|
806
|
+
padding-left: 12px;
|
|
807
|
+
}
|
|
808
|
+
`,Ad=({value:r,callbackCopyDone:o})=>{const{clickCopy:n,isCopied:i}=Nl();return t(Ed,{children:[e("pre",{children:r}),e(Dc,{onClick:e=>{e.stopPropagation(),n(r),o?.()},tooltip:i?"Copied!":"Copy",children:e(i?ft:xt,{})})]})},Dd=({label:r,onClick:o,variant:n="tertiary",...a})=>{const s=i();return t(vl,{onClick:o,variant:n,...a,children:[e(kt,{fill:"primary"===n?s.text.primary:s.text.info}),e(Si,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?s.text.primary:void 0,children:r||Do.EDIT})]})},Td=({onClick:t})=>e(Lc,{type:Gr.Default,icon:rt,message:Ao.QUICK_BACK_TO_SUMMARY,action:{label:Ao.GO_TO_SUMMARY,onClick:t}}),Id=o(Si)`
|
|
809
|
+
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
810
|
+
white-space: nowrap;
|
|
811
|
+
overflow-x: auto;
|
|
812
|
+
|
|
813
|
+
&::after {
|
|
814
|
+
// This is to prevent the "browser default tooltip" from appearing when the title is too long
|
|
815
|
+
content: '';
|
|
816
|
+
display: block;
|
|
817
|
+
}
|
|
818
|
+
`,Nd=({maxWidth:r,text:o,textSize:n=16,textColor:i})=>{const[a,s]=jt(!1),l=Xt(null);return Wt(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(r-n)&&e>.95*(r-n))}},[r,n,o]),t(Tn,{$gap:0,children:[o&&e(Cc,{text:a?o:void 0,children:e(Id,{ref:l,$maxWidth:r-n,size:n,color:i,children:o})}),a&&e(Id,{$maxWidth:n,size:n,color:i,children:"..."})]})},Od=({src:t="",alt:r="",size:o=16})=>{const[n,i]=jt(!1);return t&&!n?e("img",{src:t,alt:r,width:o,height:o,onError:()=>i(!0)}):e(g,{size:o})},Rd=o.div`
|
|
819
|
+
display: flex;
|
|
820
|
+
align-items: center;
|
|
821
|
+
justify-content: center;
|
|
822
|
+
width: ${({$size:e})=>e}px;
|
|
823
|
+
height: ${({$size:e})=>e}px;
|
|
824
|
+
border-radius: 8px;
|
|
825
|
+
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+sl["030"]} 100%)`}};
|
|
826
|
+
`,_d=({icon:t,src:r="",alt:o="",status:n,size:i=36})=>e(Rd,{$status:n,$size:i,children:r?e(Od,{src:r,alt:o,size:i-12}):e(t||g,{size:i-12})}),Fd=o.div`
|
|
827
|
+
position: relative;
|
|
828
|
+
display: flex;
|
|
829
|
+
flex-wrap: wrap;
|
|
830
|
+
align-items: center;
|
|
831
|
+
justify-content: center;
|
|
832
|
+
width: ${({$size:e})=>e}px;
|
|
833
|
+
height: ${({$size:e})=>e}px;
|
|
834
|
+
`,Pd=o.div`
|
|
835
|
+
position: absolute;
|
|
836
|
+
top: ${({$top:e})=>e}px;
|
|
837
|
+
left: ${({$left:e})=>e}px;
|
|
838
|
+
z-index: ${({$zIndex:e})=>e};
|
|
839
|
+
display: flex;
|
|
840
|
+
align-items: center;
|
|
841
|
+
justify-content: center;
|
|
842
|
+
width: ${({$size:e})=>e}px;
|
|
843
|
+
height: ${({$size:e})=>e}px;
|
|
844
|
+
border-radius: 100%;
|
|
845
|
+
border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+sl["030"]};
|
|
846
|
+
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+sl["030"]} 100%)`}};
|
|
847
|
+
`,Ld=({icons:r=[],iconSrcs:o=[],status:n,size:a=36,id:s})=>{const l=i(),c=1===r.length||1===o.length?a-12:a/2.7;if(o.length>0)return e(Ld,{icons:o.map(t=>()=>e(Od,{src:t,size:c})),status:n,size:a,id:s});if(1===r.length)return e(_d,{icon:r[0],status:n,size:a});const d=e=>r.length<=2?.5*c:0===e||1===e?0:1.15*c,p=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(Fd,{$status:n,$size:a,children:r.map((o,i)=>i>2?null:e(Pd,{$status:n,$size:1.5*c,$top:d(i),$left:p(i),$zIndex:i+1,children:2===i&&r.length>3?t(Si,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",r.length-2]}):e(o,{size:c})},`icon-${s}-${i}`))})},zd=Os.map(({id:e})=>e),Md=({monitors:r=zd,withTooltips:o,withLabels:n,size:a=12,color:s})=>{const l=i(),c=s||l.text.grey;return e(Tn,{$gap:n?a:a/2,children:r.map(r=>{const i=xr(r.toLowerCase()),s=Qo(r);return s?e(Cc,{text:o?i:"",children:t(Tn,{$gap:a/3,children:[e(s,{size:n?a+2:a,fill:c}),n&&e(Si,{size:a,color:c,children:i})]})},r):null})})},Bd=o.div`
|
|
848
|
+
visibility: hidden;
|
|
849
|
+
`,Ud=o.div`
|
|
850
|
+
display: flex;
|
|
851
|
+
flex-direction: column;
|
|
852
|
+
align-self: stretch;
|
|
853
|
+
padding: 16px;
|
|
854
|
+
width: calc(100% - 32px);
|
|
855
|
+
border-radius: 16px;
|
|
856
|
+
background-color: ${({theme:e,$status:t,$bgColor:r})=>r||(t?e.text[t]+sl["010"]:e.colors.secondary+sl["005"])};
|
|
857
|
+
opacity: ${({$faded:e})=>e?.5:1};
|
|
858
|
+
|
|
859
|
+
${({theme:e,$status:t,$bgColorHover:r,$withClick:o})=>o?n`
|
|
860
|
+
&:hover {
|
|
861
|
+
cursor: pointer;
|
|
862
|
+
background-color: ${r||(t?e.text[t]+sl["020"]:e.colors.secondary+sl["010"])};
|
|
863
|
+
${Bd} {
|
|
864
|
+
visibility: visible;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
`:`\n &:hover {\n ${Bd} {\n visibility: visible;\n }\n }\n `}
|
|
868
|
+
`,jd=o.div`
|
|
869
|
+
display: flex;
|
|
870
|
+
align-items: center;
|
|
871
|
+
gap: 8px;
|
|
872
|
+
margin-left: auto;
|
|
873
|
+
`,Wd=o(Si)`
|
|
874
|
+
margin-right: 16px;
|
|
875
|
+
`,Hd=o(Si)`
|
|
876
|
+
font-size: 10px;
|
|
877
|
+
color: ${({theme:e})=>e.text.grey};
|
|
878
|
+
`,Xd=({title:r,subTitle:o,hoverText:n,onClick:a,renderActions:s,iconProps:{icon:l,icons:c,iconSrc:d,iconSrcs:p}={},visualProps:{status:u,faded:h,bgColor:m,bgColorHover:g,monitors:f,monitorsWithLabels:x,componentsUnderTitles:y}={},checkboxProps:{withCheckbox:b,isCheckboxDisabled:v,isChecked:$,isLoading:w,onCheckboxChange:S}={},extendableProps:{withExtend:k,isExtended:C,renderExtended:E}={},...A})=>{const D=i(),[T,I]=jt(C||!1),[N,O]=jt(0),R=Xt(null),_=Xt(null),F=Xt(null);return Wt(()=>{if(R.current){const e=R.current.clientWidth,t=_.current?.clientWidth||0;O(e-((b?125:85)+t))}},[b]),t(Ud,{ref:R,$status:u,$faded:h,$bgColor:m,$bgColorHover:g,$withClick:!!a,onClick:a,...A,children:[t(Tn,{$gap:8,children:[t(Tn,{$gap:16,children:[w?e(pd,{}):b?e(qc,{value:$,onChange:S,disabled:v}):null,c?.length||p?.length?e(Ld,{icons:c,iconSrcs:p,status:u,id:`${r}-${o}`}):l||d?e(_d,{icon:l,src:d,status:u}):null]}),t(In,{$gap:4,children:[r&&e(Nd,{maxWidth:N,text:r,textSize:14}),t(Tn,{$gap:4,children:[o&&e(Nd,{maxWidth:N-(F.current?.clientWidth||0),text:o,textSize:10,textColor:D.text.grey}),f&&f.length>0&&t(Tn,{$gap:4,ref:F,children:[o&&e(Hd,{children:"•"}),e(Md,{monitors:f,withLabels:x,size:10})]})]}),y&&y.length>0?e(Tn,{$gap:4,children:y?.map((t,r)=>e(Ut,{children:t},`componentsUnderTitles-${r}`))}):null]}),t(jd,{ref:_,children:[!!n&&e(Bd,{children:e(Wd,{size:14,family:"secondary",children:n})}),s&&s(),k&&t(Ut,{children:[e(hc,{orientation:"vertical",length:"16px",margin:"0 2px"}),e(Dc,{onClick:()=>I(e=>!e),children:e(hd,{extend:T})})]})]})]}),T&&E&&t(In,{children:[e(hc,{margin:"16px 0"}),E()]})]})},Gd=o(Tn)`
|
|
879
|
+
width: 100%;
|
|
880
|
+
justify-content: space-between;
|
|
881
|
+
`,Vd=o(Si)`
|
|
882
|
+
font-size: 12px;
|
|
883
|
+
color: ${({theme:e})=>e.text.grey};
|
|
884
|
+
`,Kd=o(Si)`
|
|
885
|
+
font-size: 10px;
|
|
886
|
+
color: ${({theme:e})=>e.text.darker_grey};
|
|
887
|
+
`,qd=o.div`
|
|
888
|
+
display: flex;
|
|
889
|
+
align-items: center;
|
|
890
|
+
gap: 8px;
|
|
891
|
+
margin-left: auto;
|
|
892
|
+
`,Jd=o(Si)`
|
|
893
|
+
font-size: 12px;
|
|
894
|
+
text-align: right;
|
|
895
|
+
`,Yd=({title:r,subTitle:o,tooltip:n,value:i})=>t(Gd,{children:[e(In,{$gap:4,children:t(Cc,{text:n||"",children:[r&&e(Vd,{children:r},"title"),o&&e(Kd,{children:o},"subtitle")]})}),e(qd,{children:i?.status?e(kd,{status:"transitioning"===i.status?Kr.Loading:i.status,title:i.text||i.status,withBorder:!0,withIcon:!0}):e(Jd,{children:i?.text||"-"})})]}),Qd=o(In)`
|
|
896
|
+
width: 100%;
|
|
897
|
+
`,Zd=({containerName:r,actualDevices:o,started:n,ready:i,instrumentationInstances:a})=>{const s=Ht(()=>{const t=[];return n?.name&&t.push(e(kd,{status:ti(n.value)?pi(n.value)?Gr.Success:Gr.Error:Gr.Default,title:n.name,withIcon:!0,withBorder:!0,size:8},"started")),i?.name&&t.push(e(kd,{status:ti(i.value)?pi(i.value)?Gr.Success:Gr.Error:Gr.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"ready")),t},[n?.name,n?.value,i?.name,i?.value]);return e(Xd,{title:r.value,subTitle:a.length?`${a.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:s},renderActions:()=>e(kd,{status:Gr.Info,title:"Instrumentation Device",subtitle:o.value&&"[]"!==o.value?o.value:"none",withBorder:!0}),extendableProps:{isExtended:!!a.length,renderExtended:()=>e(Qd,{$gap:24,children:a.map((r,o)=>t(Qd,{$gap:8,children:[e(Yd,{title:`Instrumented Process #${o+1}`,subTitle:r.message?.value||"",value:{status:r.healthy.status,text:r.healthy.status===Gr.Success?"healthy":"unhealthy"}}),r.identifyingAttributes?.map(({name:t,value:r})=>e(Yd,{title:t,subTitle:"",value:{text:r,status:void 0}},`describe-${t}-${r}`))]},`process-${o}`))})}})},ep=({title:r="Data not found",subTitle:o})=>{const n=i().v2.colors.grey[400];return t(Nn,{children:[t(Tn,{$gap:8,children:[e(Ct,{fill:n}),e(cn,{size:sn.XS,color:n,align:"center",children:r})]}),o&&e(cn,{size:sn.XXS,color:n,align:"center",children:o})]})},tp=o(In)`
|
|
898
|
+
max-width: 300px;
|
|
899
|
+
padding: 12px;
|
|
900
|
+
border-radius: 12px;
|
|
901
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
902
|
+
justify-content: center;
|
|
903
|
+
`,rp=Jt(({id:t,data:r})=>{const{title:o,subTitle:n}=r;return e(tp,{"data-id":t,children:e(ep,{title:o,subTitle:n})})});rp.displayName=rp.name;const op=o.div`
|
|
904
|
+
padding: 6px;
|
|
905
|
+
border-radius: 12px;
|
|
906
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
907
|
+
cursor: pointer;
|
|
908
|
+
${({$isVirtual:e,theme:t})=>e&&`\n border: 1px dashed ${t.colors.border};\n opacity: 0.8;\n `}
|
|
909
|
+
`,np=o.div`
|
|
910
|
+
position: relative;
|
|
911
|
+
`,ip=o.div`
|
|
912
|
+
position: absolute;
|
|
913
|
+
top: 100%;
|
|
914
|
+
margin-top: 4px;
|
|
915
|
+
left: 50%;
|
|
916
|
+
transform: translateX(-50%);
|
|
917
|
+
display: flex;
|
|
918
|
+
flex-direction: column;
|
|
919
|
+
align-items: center;
|
|
920
|
+
gap: 2px;
|
|
921
|
+
width: 140px;
|
|
922
|
+
text-align: center;
|
|
923
|
+
`,ap=Jt(({id:o,data:n})=>{const{id:a,status:s,title:l,icons:c,isVirtual:d}=n,p=i(),u=d||s!==Gr.Error?null:jn(s,p);return t(r,{children:[e(or,{type:"source",position:nr.Right,style:{visibility:"hidden"}}),e(or,{type:"target",position:nr.Left,style:{visibility:"hidden"}}),t(np,{"data-id":o,children:[e(op,{$isVirtual:d,children:e(Ld,{id:a,icons:c,status:d?void 0:s})}),t(ip,{children:[u&&e(u,{}),e(Si,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:l})]})]})]})});ap.displayName=ap.name;const sp={duration:300,padding:.1,includeHiddenNodes:!0},lp=o.div`
|
|
924
|
+
height: 100%;
|
|
925
|
+
.react-flow__attribution {
|
|
926
|
+
visibility: hidden;
|
|
927
|
+
}
|
|
928
|
+
`,cp=o.div`
|
|
929
|
+
button {
|
|
930
|
+
padding: 8px;
|
|
931
|
+
margin: 8px;
|
|
932
|
+
border-radius: 8px;
|
|
933
|
+
border: 1px solid ${({theme:e})=>e.colors.border} !important;
|
|
934
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
935
|
+
path {
|
|
936
|
+
fill: ${({theme:e})=>e.text.secondary};
|
|
937
|
+
}
|
|
938
|
+
&:hover {
|
|
939
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
940
|
+
}
|
|
941
|
+
&:last-child svg {
|
|
942
|
+
transform: scale(1.4);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
`,dp={[Yr.MapItem]:ap,[Yr.NoData]:rp},pp=({trigger:e})=>{const{fitView:t}=cr(),r=Xt(!0);return Wt(()=>{r.current?r.current=!1:e>0&&requestAnimationFrame(()=>t(sp))},[e,t]),null},up=({nodes:r,edges:o,onNodesChange:n,onEdgesChange:i,fitViewTrigger:a=0,zoomOnScroll:s=!1,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onRefresh:p})=>{const{onClickNode:u}=Cl(),{setActiveNodeType:h,setActiveNodeId:m}=ji();return t(ar,{zoomOnScroll:s,nodes:r,nodeTypes:dp,edges:o,onNodeClick:u,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:n,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(pp,{trigger:a}),e(cp,{children:e(sr,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:sp,children:p&&e(lr,{onClick:p,children:e(Et,{size:20})})})})]})},hp=t=>e(lp,{children:e(ir,{children:e(up,{...t})})}),mp={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},gp=Kt(null),fp=({children:t})=>{const[r,o]=jt(null),[n,i]=jt(void 0),a=$l(mp),s=Gt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),e?.type&&a.handleFormChange("type",e.type),o(e)},[]),l=Gt(e=>{var t;a.resetFormData((({type:e,name:t,notes:r,disabled:o,signals:n,fields:i})=>({type:e,name:t||"",notes:r||"",disabled:!!o,signals:n??[],fields:i??{}}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),o((t=e.type,Wi.find(e=>e.type===t)??Hi.find(e=>e.type===t)??null))},[]),c=Gt(()=>{if(!r)return{errorMessage:"No action type selected",preparedFormData:$r(mp)};const e=(t=a.formData,$r(t));var t;const o={};a.handleErrorChange(void 0,void 0,o);const n=Object.keys(o).length>0?"Invalid form values":void 0;return i(n),{errorMessage:n,preparedFormData:e}},[a,r]),d=Ht(()=>({selectedOption:r,onSelectOption:s,loadAction:l,genericForm:a,validateFormData:c,errorMessage:n}),[r,s,l,a,c,n]);return e(gp.Provider,{value:d,children:t})},xp=()=>{const e=Vt(gp);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},yp={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[]},bp={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,formErrorMessage:void 0,validateFormData:()=>({isOk:!1,preparedFormData:$r(yp)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},vp=Kt(bp),$p=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e,s=r===Hr.Dropdown,l=qn(o,{});return{componentType:r,renderCondition:a,name:t,title:n,value:i,placeholder:l.placeholder||(s?"Select an option":void 0),options:s&&Array.isArray(l.values)?l.values.map(e=>({id:e,value:e})):void 0,...l}}),wp=({children:t})=>{const{selectedStreamName:r}=Bs(),[o,n]=jt(null),[i,a]=jt(),[s,l]=jt(bp.unsavedDestinations),c=Ht(()=>"number"==typeof o?.unsavedIdx?s[o.unsavedIdx]:void 0,[o,s]),d=Gt((e,t)=>{o&&(l(t=>[...t,{...e,option:o.option}]),n(t?e=>e?{...e,listType:Gi.UNSAVED,unsavedIdx:s.length}:null:null))},[o,s.length]),p=Gt((e,t,r)=>{o&&(l(r=>r.map((r,n)=>n===e?{...r,...t,option:o.option}:r)),n(r?e=>e?{...e,listType:Gi.UNSAVED}:null:null))},[o]),u=Gt(e=>{l(t=>t.filter((t,r)=>r!==e)),n(null)},[]),h=$l({...yp,currentStreamName:r});Wt(()=>{if(o)if(c)h.handleFormChange(void 0,void 0,c.formData);else{h.handleFormChange("type",o.option.type),h.handleFormChange("name",o.option.displayName),h.handleFormChange("disabled",!1);const e=ci(o.option.supportedSignals);h.handleFormChange("exportedSignals",{logs:e.includes(mo.Logs),metrics:e.includes(mo.Metrics),traces:e.includes(mo.Traces)}),h.handleFormChange("fields",o.dynamicFields.map(e=>({key:e.name,value:e.value})))}},[o,c]);const m=Gt(e=>{h.resetFormData(),h.handleErrorChange(void 0,void 0,{}),a(void 0),n(e?{...e,dynamicFields:e.option?.fields?$p(e.option.fields):[]}:null)},[]),g=Gt((e,t)=>{let r;for(const o of t){const t=o.items.find(t=>t.type===e.destinationType.type);if(t){r=t;break}}const o=qn(e.fields,{}),i={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:r?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:r?r.fields.map(e=>({...e,initialValue:o[e.name]??e.initialValue})):[]};h.resetFormData(),h.handleErrorChange(void 0,void 0,{}),a(void 0),n({listType:Gi.EXISTS,option:i,dynamicFields:$p(i.fields)}),queueMicrotask(()=>{h.handleFormChange("name",e.name||e.destinationType.displayName),h.handleFormChange("disabled",!!e.disabled),h.handleFormChange("exportedSignals",{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces})})},[]),f=Gt(()=>{const e=$r(h.formData),t={};o?.dynamicFields.forEach(({name:r,required:o})=>{if(o){const o=e.fields.find(e=>e.key===r)?.value;Qn(o)&&(t[r]=Eo.FIELD_IS_REQUIRED)}});li(e.exportedSignals).length||(t.exportedSignals=Eo.FIELD_IS_REQUIRED);const r=0===Object.keys(t).length?void 0:"Invalid form values";return h.handleErrorChange(void 0,void 0,t),a(r),{errorMessage:r,preparedFormData:e}},[h,o]);return e(vp.Provider,{value:{activeForm:o,onChangeActiveForm:m,loadDestination:g,genericForm:h,formErrorMessage:i,validateFormData:f,unsavedDestinations:s,thisUnsavedDestination:c,setUnsavedDestinations:l,addUnsavedDestination:d,updateUnsavedDestination:p,deleteUnsavedDestination:u},children:t})},Sp=()=>Vt(vp),kp={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},Cp=Kt(null),Ep=({children:t})=>{const[r,o]=jt(null),[n,i]=jt(void 0),a=$l(kp),s=Gt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),o(e)},[]),l=Gt(e=>{var t;a.resetFormData((({ruleName:e,notes:t,disabled:r,workloads:o,instrumentationLibraries:n,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!r,workloads:o??null,instrumentationLibraries:n??null,payloadCollection:i??null,codeAttributes:a??null,headersCollection:s??null,customInstrumentations:l??null}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),o((t=e.type,Ki.find(e=>e.type===t)??null))},[]),c=Gt(()=>{if(!r)return{errorMessage:"No rule type selected",preparedFormData:$r(kp)};const e=(e=>{const t=$r(e);return t.headersCollection?.[ao.HeaderKeys]?.length&&(t.headersCollection[ao.HeaderKeys]=t.headersCollection[ao.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[so.Golang]?.length&&(t.customInstrumentations[so.Golang]=t.customInstrumentations[so.Golang].map(e=>new xo(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify())),t.customInstrumentations?.[so.Java]?.length&&(t.customInstrumentations[so.Java]=t.customInstrumentations[so.Java].map(e=>new fo(e.className,e.methodName)).filter(e=>e.Verify())),t})(a.formData),t=((e,t)=>{const r={};switch(e){case no.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(r.codeAttributes="Code attributes are required");break;case no.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(r.payloadCollection="Payload collection are required");break;case no.HeadersCollection:t.headersCollection?.[ao.HeaderKeys]?.length||(r.headersCollection="Header keys are required");break;case no.CustomInstrumentation:t.customInstrumentations?.[so.Golang]?.length||t.customInstrumentations?.[so.Java]?.length||(r.customInstrumentations="Custom instrumentation are required")}return r})(r.type,e);a.handleErrorChange(void 0,void 0,t);const o=Object.keys(t).length>0?"Invalid form values":void 0;return i(o),{errorMessage:o,preparedFormData:e}},[a,r]),d=Ht(()=>({selectedOption:r,onSelectOption:s,loadRule:l,genericForm:a,validateFormData:c,errorMessage:n}),[r,s,l,a,c,n]);return e(Cp.Provider,{value:d,children:t})},Ap=()=>{const e=Vt(Cp);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function Dp(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:[],operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function Tp(e){if(!e.sourceScopes.length)return null;const t=[];for(const r of e.sourceScopes)if("source"===r.scopeType&&r.workloadName){const e={workloadName:r.workloadName};r.workloadKind&&(e.workloadKind=r.workloadKind),r.workloadNamespace&&(e.workloadNamespace=r.workloadNamespace),t.push(e)}else"namespace"===r.scopeType&&r.workloadNamespace?t.push({workloadNamespace:r.workloadNamespace}):"language"===r.scopeType&&r.workloadLanguage&&t.push({workloadLanguage:r.workloadLanguage});return t.length?t:null}function Ip(e){return Tp(e)}function Np(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function Op(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function Rp(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function _p(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Rp(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function Fp(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Rp(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function Pp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Tp(e),percentageAtMost:Np(e),operation:_p(e)}}function Lp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Tp(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?Op(e):null,percentageAtLeast:Np(e),operation:Fp(e)}}function zp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Tp(e),percentageAtMost:Np(e)??0,operation:Fp(e)}}function Mp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Ip(e),operation:_p(e),percentageAtMost:Np(e),notes:e.notes||null}}function Bp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Ip(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?Op(e):null,operation:Fp(e),percentageAtLeast:Np(e),notes:e.notes||null}}function Up(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Ip(e),operation:Fp(e),percentageAtMost:Np(e)??0,notes:e.notes||null}}const jp=["5000","1000","500","100","50"],Wp=["50","25","10","1","0.5","0.1","0"];function Hp(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=Wp.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function Xp(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function Gp(e){const t=Dp(),r=(o=e.rule.sourceScopes,o?.length?o.map(e=>e.workloadLanguage?{scopeType:"language",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:e.workloadLanguage}:e.workloadName?{scopeType:"source",workloadName:e.workloadName,workloadKind:e.workloadKind??"",workloadNamespace:e.workloadNamespace??"",workloadLanguage:""}:e.workloadNamespace?{scopeType:"namespace",workloadName:"",workloadKind:"",workloadNamespace:e.workloadNamespace,workloadLanguage:""}:{scopeType:"all",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:""}).filter(e=>"all"!==e.scopeType):[]);var o;const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let i,a,s={durationPreset:"500",customDurationMs:""},l=!1;switch(e.category){case"noisy":i=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=Hp(e.rule.percentageAtMost);break;case"highlyRelevant":i=Xp(e.rule.operation),a=Hp(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=jp.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),l=e.rule.error;break;case"costReduction":i=Xp(e.rule.operation),a=Hp(e.rule.percentageAtMost)}return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...i,...s,keepErrors:l,...a}}var Vp;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(Vp||(Vp={}));const Kp=[Vp.Action,Vp.Endpoint,Vp.Scope,Vp.Duration],qp=o.span`
|
|
946
|
+
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
947
|
+
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
948
|
+
line-height: 20px;
|
|
949
|
+
color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[600];default:return r.white[500]}}};
|
|
950
|
+
`,Jp=o.span`
|
|
951
|
+
display: inline;
|
|
952
|
+
cursor: help;
|
|
953
|
+
text-decoration: underline dotted;
|
|
954
|
+
text-underline-offset: 3px;
|
|
955
|
+
`,Yp=o.div`
|
|
956
|
+
display: flex;
|
|
957
|
+
flex-direction: column;
|
|
958
|
+
gap: 4px;
|
|
959
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
960
|
+
border-radius: 4px;
|
|
961
|
+
padding: 8px;
|
|
962
|
+
max-width: 300px;
|
|
963
|
+
`,Qp=({items:r,children:o})=>{const{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=Bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(Jp,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[o,e(yc,{ref:n,isOpen:i,top:s.top,left:s.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(Yp,{children:r.map((t,r)=>e(cn,{size:sn.XXXS,children:t},r))})})]})},Zp=({parts:o})=>e(r,{children:o.map((o,n)=>{const i=e(qp,{$variant:o.variant,$isMono:Kp.includes(o.variant),children:o.text});return t(Ut,{children:[0!==n&&e(r,{children:" "}),o.tooltipItems?.length?e(Qp,{items:o.tooltipItems,children:i}):i]},`${o.variant}-${n}`)})});var eu;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(eu||(eu={}));const tu=[{value:eu.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:eu.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:eu.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],ru={[eu.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[eu.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[eu.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},ou={[eu.Noisy]:"Noisy Operations rules list",[eu.HighlyRelevant]:"Highly Relevant Operations rules list",[eu.CostReduction]:"Cost Reduction rules list"},nu={[eu.Noisy]:"noisy",[eu.HighlyRelevant]:"highlyRelevant",[eu.CostReduction]:"costReduction"};function iu(e){if(e.workloadName){const t=e.workloadKind?.toLowerCase()||"deployment";return e.workloadNamespace?`${t} '${e.workloadName}' in namespace '${e.workloadNamespace}'`:`${t} '${e.workloadName}'`}return e.workloadNamespace?`namespace '${e.workloadNamespace}'`:e.workloadLanguage?`${e.workloadLanguage} services`:""}function au(e){if(!e?.length)return[{text:" for ",variant:Vp.Default},{text:"entire cluster",variant:Vp.Scope}];const t=e.map(iu).filter(Boolean);if(!t.length)return[{text:" for ",variant:Vp.Default},{text:"entire cluster",variant:Vp.Scope}];const r=[{text:" for ",variant:Vp.Default}],o=t.slice(0,2),n=t.slice(2);return o.forEach((e,t)=>{t>0&&r.push({text:", ",variant:Vp.Default}),r.push({text:e,variant:Vp.Scope})}),n.length>0&&r.push({text:` + ${n.length} more`,variant:Vp.Default,tooltipItems:n}),r}function su(e,t){if(!e)return[];const r=(o=e).startsWith("/")?o.slice(1):o;var o;const n=[{text:" starting at ",variant:Vp.Default}];return t?n.push({text:`${t} /${r}`,variant:Vp.Endpoint}):n.push({text:`endpoint /${r}`,variant:Vp.Endpoint}),n}function lu(e){const t=[];if(null!=e.percentageAtMost?(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:Vp.Action}),t.push({text:" of traces",variant:Vp.Default})):t.push({text:"Drop all traces",variant:Vp.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method||e.operation.httpClient?.method;t.push(...su(r,o));const n=e.operation.httpClient,i=n?.templatedPath||n?.templatedPathPrefix,a=n?.serverAddress;if((i||a)&&!r){const e=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:Vp.Default}),o?t.push({text:`${o} /${e}`,variant:Vp.Endpoint}):t.push({text:`/${e}`,variant:Vp.Endpoint})}}else t.push({text:" on ",variant:Vp.Default}),t.push({text:"any operation",variant:Vp.Endpoint});return t.push(...au(e.sourceScopes)),t}function cu(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep at least ${e.percentageAtLeast}%`,variant:Vp.Action}),t.push({text:" of traces",variant:Vp.Default})):t.push({text:"Keep all traces",variant:Vp.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...su(r,o))}else t.push({text:" on ",variant:Vp.Default}),t.push({text:"any operation",variant:Vp.Endpoint});return t.push(...au(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:Vp.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:Vp.Duration})),t}function du(e){const t=[];if(t.push({text:`Drop ${e.percentageAtMost}%`,variant:Vp.Action}),t.push({text:" of traces",variant:Vp.Default}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...su(r,o));const n=e.operation.kafkaConsumer?.kafkaTopic;n&&!r&&(t.push({text:" from ",variant:Vp.Default}),t.push({text:`topic '${n}'`,variant:Vp.Endpoint}))}else t.push({text:" on ",variant:Vp.Default}),t.push({text:"any operation",variant:Vp.Endpoint});return t.push(...au(e.sourceScopes)),t}function pu(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function uu(e,t,r){const o=nu[t],n=[];for(const i of e)switch(t){case eu.Noisy:for(const e of i.noisyOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:lu(e),category:o});break;case eu.HighlyRelevant:for(const e of i.highlyRelevantOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:cu(e),category:o,typeBadge:pu(e)});break;case eu.CostReduction:for(const e of i.costReductionRules)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:du(e),category:o})}return n}function hu(e,t){switch(e){case"noisy":return lu(t);case"highlyRelevant":return cu(t);case"costReduction":return du(t)}}function mu(e,t,r,o){for(const n of e)if(n.id===t)switch(o){case"noisy":{const e=n.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:n.id,rule:e};break}case"highlyRelevant":{const e=n.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:n.id,rule:e};break}case"costReduction":{const e=n.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:n.id,rule:e};break}}return null}function gu(e,t){const r=mu(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:hu(r.category,r.rule)}:null}function fu(e,t){const r=mu(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:t.summary}:null}function xu(e){return null==e||Array.isArray(e)&&0===e.length?null:e}function yu(e,t){return JSON.stringify({sourceScopes:xu(e),operation:xu(t)})}function bu(e,t,r,o){return JSON.stringify({sourceScopes:xu(e),error:t??!1,durationAtLeastMs:xu(r),operation:xu(o)})}function vu(e,t){return JSON.stringify({sourceScopes:xu(e),operation:xu(t)})}function $u(e,t,r,o){switch(t){case"noisy":{const t=yu(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!o||e.ruleId!==o)&&yu(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=bu(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!o||e.ruleId!==o)&&bu(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=vu(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!o||e.ruleId!==o)&&vu(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function wu(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:Vp.Default},{text:"disabled",variant:Vp.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:Vp.Action},{text:" of ",variant:Vp.Default},{text:"traces for kubelet health probes in the entire cluster",variant:Vp.Scope}]}function Su(e){return!(!0!==e.error||e.sourceScopes&&0!==e.sourceScopes.length||e.operation||null!=e.percentageAtLeast&&100!==e.percentageAtLeast)}function ku(e){for(const t of e){const e=t.highlyRelevantOperations.find(Su);if(e)return{rule:e,samplingId:t.id}}return null}function Cu(e){return!e||e.disabled?[{text:"Auto rule is ",variant:Vp.Default},{text:"disabled",variant:Vp.Action}]:[{text:"Keep 100%",variant:Vp.Action},{text:" of ",variant:Vp.Default},{text:"error traces across the entire cluster",variant:Vp.Scope}]}function Eu(e){return!(e.sourceScopes&&0!==e.sourceScopes.length||e.operation)}function Au(e){for(const t of e){const e=t.costReductionRules.find(Eu);if(e)return{rule:e,samplingId:t.id}}return null}function Du(e){return!e||e.disabled?[{text:" is ",variant:Vp.Default},{text:"disabled",variant:Vp.Action}]:[{text:`Drop ${e.percentageAtMost}%`,variant:Vp.Action},{text:" of ",variant:Vp.Default},{text:"traces across the entire cluster",variant:Vp.Scope}]}var Tu;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(Tu||(Tu={}));const Iu=Kt(null),Nu=["50","25","10","1","0"];function Ou(e){const t=String(e);return Nu.includes(t)?t:"custom"}const Ru=({category:t,sourceOptions:r=[],namespaceOptions:o=[],children:n})=>{const{formData:i,handleFormChange:a,resetFormData:s}=$l(Dp(t)),[l,c]=jt(null);Wt(()=>{s(Dp(t)),c(null)},[t]);const d=Gt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),p=Gt(()=>{s(Dp(t)),c(null)},[t,s]),u=Ht(()=>({formType:Tu.Create,category:t,formData:i,handleChange:d,resetForm:p,duplicateWarning:l,setDuplicateWarning:c,sourceOptions:r,namespaceOptions:o}),[t,i,d,p,l,r,o]);return e(Iu.Provider,{value:u,children:n})},_u=({data:t,defaultEditMode:r,sourceOptions:o=[],namespaceOptions:n=[],children:i})=>{const[a,s]=jt(!1),{formData:l,handleFormChange:c,resetFormData:d}=$l(void 0),p=Xt(null),[u,h]=jt(null);Wt(()=>{t!==p.current&&(p.current=t,t&&r?(d(Gp(t)),h(null),s(!0)):(s(!1),h(null)))},[t,r]);const m=Gt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Gt(()=>{t&&(d(Gp(t)),h(null),s(!0))},[t,d]),f=Gt(()=>{s(!1),h(null)},[]),x=Ht(()=>({formType:Tu.View,data:t,isEditing:a,formData:l,handleChange:m,handleEdit:g,handleCancelEdit:f,duplicateWarning:u,setDuplicateWarning:h,sourceOptions:o,namespaceOptions:n}),[t,a,l,m,g,f,u,o,n]);return e(Iu.Provider,{value:x,children:i})};function Fu(e){const[t,r]=jt(()=>Ou(e)),[o,n]=jt(()=>"custom"===Ou(e)?String(e):"");Wt(()=>{const t=Ou(e);r(t),n("custom"===t?String(e):"")},[e]);const i=Ht(()=>"custom"===t?Number(o)||0:Number(t),[t,o]);return{percentagePreset:t,setPercentagePreset:r,customPercentage:o,setCustomPercentage:n,resolvedPercentage:i}}const Pu=({enabled:t,keepPercentage:r,children:o})=>{const[n,i]=jt(t),a=Fu(r);Wt(()=>{i(t)},[t]);const s=Ht(()=>wu({enabled:n,keepPercentage:a.resolvedPercentage}),[n,a.resolvedPercentage]),l=Ht(()=>({formType:Tu.EditAutoNoisy,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(Iu.Provider,{value:l,children:o})},Lu=({enabled:t,dropPercentage:r,children:o})=>{const[n,i]=jt(t),a=Fu(r);Wt(()=>{i(t)},[t]);const s=Ht(()=>Du(n?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[n,a.resolvedPercentage]),l=Ht(()=>({formType:Tu.EditAutoCostReduction,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(Iu.Provider,{value:l,children:o})},zu=({enabled:t,children:r})=>{const[o,n]=jt(t);Wt(()=>{n(t)},[t]);const i=Ht(()=>Cu(o?{disabled:!1}:null),[o]),a=Ht(()=>({formType:Tu.EditAutoHighlyRelevant,localEnabled:o,setLocalEnabled:n,summary:i}),[o,i]);return e(Iu.Provider,{value:a,children:r})},Mu=t=>{switch(t.formType){case Tu.Create:return e(Ru,{...t});case Tu.View:return e(_u,{...t});case Tu.EditAutoNoisy:return e(Pu,{...t});case Tu.EditAutoCostReduction:return e(Lu,{...t});case Tu.EditAutoHighlyRelevant:return e(zu,{...t})}};function Bu(e){const t=Vt(Iu);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Uu=Kt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),ju=({children:t,selectedConnectionIds:r,initialInputs:o})=>{const{tier:n}=Vl(),i=n===Lr.Onprem,{selectedStreamName:a}=Bs(),[s,l]=jt(!1),[c,d]=jt(null),[p,u]=jt([]);Wt(()=>{c&&u(e=>{const t=((e,t)=>$r(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(c,r);return t.map(t=>{const r=e?.find(e=>e.clusterId===t.clusterId),n=r??t;if(o?.[t.clusterId]){const e=o[t.clusterId],r=$r(n);return e.forEach(e=>{const t=r.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const r=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);r&&(r.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{Kl.has(e.kind)&&!i||(e.selected=!0)})}),r}return n})})},[c,r,o]);const{formDiff:h,isFormDirty:m}=Ht(()=>{const e=((e,t,r)=>{const o={};return e.forEach(e=>{e.namespaces.forEach(n=>{const i=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),a=n.selected||!1,s=a!==i?.selected;if(s&&(o[e.clusterId]||(o[e.clusterId]=[]),o[e.clusterId].push({namespace:n.name,selected:a,currentStreamName:r}),a&&(o[e.clusterId]=o[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!s||!a){const t=((e,t,r)=>{const o=[];return t.workloads.forEach(n=>{const i=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==i?.selected&&o.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:r})}),o})(i,n,r);t.length>0&&(o[e.clusterId]||(o[e.clusterId]=[]),o[e.clusterId].push(...t))}})}),o})(p,c?.clusters||[],a);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[p,c,a]),g=Gt(e=>!i&&Kl.has(e),[i]),f=Gt(({clusterId:e,workloadId:t,selected:r,auto:o})=>{u(n=>{const i=$r(n),a=i.findIndex(t=>t.clusterId===e);if(-1===a)return i;const s=i[a].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return i;if(t.kind&&t.name){const e=i[a].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return i;const o="boolean"==typeof r?r:!i[a].namespaces[s].workloads[e].selected;if(i[a].namespaces[s].workloads[e].selected=o,o){const e=i[a].namespaces[s].workloads.filter(e=>!g(e.kind));e.every(e=>e.selected)&&(i[a].namespaces[s].selected=!0)}else i[a].namespaces[s].selected=!1}else{const e="boolean"==typeof o?o:!i[a].namespaces[s].selected;i[a].namespaces[s].selected=e,e?i[a].namespaces[s].workloads.forEach(e=>{g(e.kind)||(e.selected=!0)}):"boolean"!=typeof r||r||i[a].namespaces[s].workloads.forEach(e=>{e.selected=!1})}return i})},[g]),x=Gt(({clusterId:e,namespaceName:t,boolean:r,searchText:o="",searchBy:n="",filters:i})=>{u(a=>{const s=$r(a),l=n===jr.Namespace?o:"",c=n===jr.Source?o:"",d=!!l||!!c||!!i?.showOnlySelected;return s.forEach((o,n)=>{e&&o.clusterId!==e||o.namespaces.forEach(({name:e,workloads:o},a)=>{if(!t||e===t)if(d)if(t){o.forEach((e,t)=>{r&&g(e.kind)||Yl(e,c,i||{showOnlySelected:!1})&&(s[n].namespaces[a].workloads[t].selected=r)});const e=s[n].namespaces[a].workloads.filter(e=>!g(e.kind)),t=e.every(e=>e.selected);s[n].namespaces[a].selected=t}else{if(!Jl(s[n].namespaces[a],l,i||{showOnlySelected:!1}))return;s[n].namespaces[a].selected=r,o.forEach((e,t)=>{r&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=r)})}else s[n].namespaces[a].selected=r,o.forEach((e,t)=>{r&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=r)})})}),s})},[g]);return e(Uu.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:p,handleSourceChange:f,handleSelectAll:x,formDiff:h,isFormDirty:m},children:t})},Wu=()=>Vt(Uu),Hu=Kt({formType:void 0}),Xu=({children:t,formType:r})=>{const o=Ht(()=>({formType:r}),[r]);return e(Hu.Provider,{value:o,children:t})},Gu=()=>Vt(Hu),Vu=o.div`
|
|
964
|
+
display: flex;
|
|
965
|
+
|
|
966
|
+
align-items: center;
|
|
967
|
+
gap: 6px;
|
|
968
|
+
margin-bottom: 4px;
|
|
969
|
+
`,Ku=o(Si)`
|
|
970
|
+
font-size: 14px;
|
|
971
|
+
opacity: 0.8;
|
|
972
|
+
line-height: 22px;
|
|
973
|
+
overflow: hidden;
|
|
974
|
+
white-space: nowrap;
|
|
975
|
+
text-overflow: ellipsis;
|
|
976
|
+
color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
|
|
977
|
+
`,qu=o(Si)`
|
|
978
|
+
font-size: 12px;
|
|
979
|
+
color: ${({theme:e})=>e.text.darker_grey};
|
|
980
|
+
opacity: 0.8;
|
|
981
|
+
`,Ju=({title:r,required:o,tooltip:n,style:i,status:a})=>r?e(Vu,{style:i,children:t(Cc,{text:n,withIcon:!0,children:[e(Ku,{$status:a,children:r}),!o&&e(qu,{children:"(optional)"})]})}):null,Yu=o.div`
|
|
982
|
+
display: flex;
|
|
983
|
+
flex-direction: column;
|
|
984
|
+
position: relative;
|
|
985
|
+
width: 100%;
|
|
986
|
+
`,Qu=o.div`
|
|
987
|
+
width: 100%;
|
|
988
|
+
display: flex;
|
|
989
|
+
align-items: center;
|
|
990
|
+
height: 36px;
|
|
991
|
+
gap: 12px;
|
|
992
|
+
transition: border-color 0.3s;
|
|
993
|
+
border-radius: 32px;
|
|
994
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
995
|
+
${({$disabled:e})=>e&&n`
|
|
996
|
+
cursor: not-allowed;
|
|
997
|
+
opacity: 0.6;
|
|
998
|
+
`}
|
|
999
|
+
${({$isActive:e,$hasError:t,$status:r})=>e?n`
|
|
1000
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1001
|
+
`:t?n`
|
|
1002
|
+
border-color: ${({theme:e})=>e.text.error};
|
|
1003
|
+
`:r?n`
|
|
1004
|
+
border-color: ${({theme:e})=>e.text[r]};
|
|
1005
|
+
`:""}
|
|
1006
|
+
&:hover {
|
|
1007
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1008
|
+
}
|
|
1009
|
+
&:focus-within {
|
|
1010
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1011
|
+
}
|
|
1012
|
+
`,Zu=o.input`
|
|
1013
|
+
padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
|
|
1014
|
+
flex: 1;
|
|
1015
|
+
min-width: 150px;
|
|
1016
|
+
width: 100%;
|
|
1017
|
+
border: none;
|
|
1018
|
+
outline: none;
|
|
1019
|
+
background: none;
|
|
1020
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1021
|
+
font-size: 14px;
|
|
1022
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1023
|
+
font-weight: 300;
|
|
1024
|
+
&::placeholder {
|
|
1025
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1026
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1027
|
+
opacity: 0.4;
|
|
1028
|
+
font-size: 14px;
|
|
1029
|
+
font-weight: 300;
|
|
1030
|
+
line-height: 22px; /* 157.143% */
|
|
1031
|
+
}
|
|
1032
|
+
&:disabled {
|
|
1033
|
+
cursor: not-allowed;
|
|
1034
|
+
opacity: 0.6;
|
|
1035
|
+
}
|
|
1036
|
+
&::-webkit-inner-spin-button,
|
|
1037
|
+
&::-webkit-outer-spin-button {
|
|
1038
|
+
-webkit-appearance: none;
|
|
1039
|
+
margin: 0;
|
|
1040
|
+
}
|
|
1041
|
+
`,eh=o.div`
|
|
1042
|
+
display: flex;
|
|
1043
|
+
align-items: center;
|
|
1044
|
+
margin-left: 12px;
|
|
1045
|
+
`,th=o(eh)`
|
|
1046
|
+
cursor: pointer;
|
|
1047
|
+
`,rh=o.button`
|
|
1048
|
+
background-color: ${({theme:e})=>e.colors.primary};
|
|
1049
|
+
border: none;
|
|
1050
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1051
|
+
padding: 8px 16px;
|
|
1052
|
+
border-radius: 20px;
|
|
1053
|
+
cursor: pointer;
|
|
1054
|
+
margin-left: 8px;
|
|
1055
|
+
&:hover {
|
|
1056
|
+
background-color: ${({theme:e})=>e.colors.secondary};
|
|
1057
|
+
}
|
|
1058
|
+
&:disabled {
|
|
1059
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
1060
|
+
cursor: not-allowed;
|
|
1061
|
+
}
|
|
1062
|
+
`,oh=({icon:r,buttonLabel:o,onButtonClick:n,hasError:a,errorMessage:s,title:l,tooltip:c,required:d,value:p,onChange:u,type:h=Xr.Text,name:m,status:g,...f})=>{const x=i(),y=h===Xr.Password,[b,v]=jt(!1);return t(Yu,{children:[e(Ju,{title:l,required:d,tooltip:c,status:g}),t(Qu,{$disabled:f.disabled,$hasError:a||!!s,$isActive:!!f.autoFocus,$status:g,children:[y?e(th,{onClick:()=>v(e=>!e),children:e(b?At:Dt,{size:14,fill:x.text.grey})}):r?e(eh,{children:e(r,{size:14,fill:x.text.grey})}):null,e(Zu,{"data-id":m,type:b||h===Xr.Number?Xr.Text:h,$hasIcon:!!r||y,name:m,value:p,onChange:e=>{e.stopPropagation(),h===Xr.Number&&(e.target.value=di(e.target.value)),u?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...f}),o&&n&&e(rh,{onClick:n,disabled:f.disabled,children:o})]}),!!s&&e(Ei,{children:s})]})},nh=o.div`
|
|
1063
|
+
display: flex;
|
|
1064
|
+
flex-direction: column;
|
|
1065
|
+
min-width: 120px;
|
|
1066
|
+
width: 100%;
|
|
1067
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1068
|
+
`,ih=o.div`
|
|
1069
|
+
position: relative;
|
|
1070
|
+
`,ah=o.div`
|
|
1071
|
+
display: flex;
|
|
1072
|
+
align-items: center;
|
|
1073
|
+
justify-content: space-between;
|
|
1074
|
+
height: 36px;
|
|
1075
|
+
padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
|
|
1076
|
+
border-radius: 32px;
|
|
1077
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1078
|
+
|
|
1079
|
+
${({$isOpen:e,$isMulti:t,theme:r})=>e&&!t?n`
|
|
1080
|
+
border: 1px solid ${r.text.grey};
|
|
1081
|
+
background: ${r.colors.dropdown_bg_2};
|
|
1082
|
+
`:n`
|
|
1083
|
+
border: 1px solid ${r.colors.border};
|
|
1084
|
+
background: transparent;
|
|
1085
|
+
`};
|
|
1086
|
+
|
|
1087
|
+
${({$hasError:e,$status:t})=>e?n`
|
|
1088
|
+
border-color: ${({theme:e})=>e.text.error};
|
|
1089
|
+
`:t?n`
|
|
1090
|
+
border-color: ${({theme:e})=>e.text[t]};
|
|
1091
|
+
`:""}
|
|
1092
|
+
|
|
1093
|
+
&:hover {
|
|
1094
|
+
border-color: ${({$isMulti:e,$hasSelections:t,$disabled:r,theme:o})=>r?"auto":e&&t?o.colors.border:o.colors.secondary};
|
|
1095
|
+
}
|
|
1096
|
+
`,sh=o.div`
|
|
1097
|
+
display: flex;
|
|
1098
|
+
align-items: center;
|
|
1099
|
+
gap: 4px;
|
|
1100
|
+
`,lh=({options:r,value:o,onSelect:n,onDeselect:i,title:a,tooltip:s,placeholder:l,disabled:c=!1,isMulti:d=!1,showSearch:p=!1,required:u=!1,errorMessage:h,hasError:m=!1,status:g})=>{const[f,x]=jt(!1),[y,b]=jt(!1),v=Xt(null);zl(v,()=>x(!1));const $=()=>{(()=>{if(v.current){const e=v.current.getBoundingClientRect().bottom+300>window.innerHeight;b(e)}})(),x(e=>!e)},w=Array.isArray(o)?o.length:0;return t(nh,{$disabled:c,children:[e(Ju,{title:a,required:u,tooltip:s,status:g}),t(ih,{ref:v,children:[t(ah,{$isOpen:f,$isMulti:d,$hasSelections:!!Array.isArray(o)&&!!o.length,$hasError:!!h||m,$status:g,$disabled:c,onClick:()=>!c&&$(),children:[e(uh,{value:o,placeholder:l,onDeselect:i}),t(sh,{children:[d&&e(fl,{label:w,filled:!!w}),e(hd,{extend:f})]})]}),f&&e(gh,{openUpwards:y,options:r,value:o,onSelect:e=>{n?.(e),d||$()},onDeselect:e=>{i?.(e),d||$()},isMulti:d,showSearch:p})]}),!!h&&e(Ei,{children:h})]})},ch=o(sh)`
|
|
1101
|
+
max-width: calc(100% - 50px);
|
|
1102
|
+
overflow-x: auto;
|
|
1103
|
+
`,dh=o(Si)`
|
|
1104
|
+
display: flex;
|
|
1105
|
+
align-items: center;
|
|
1106
|
+
gap: 2px;
|
|
1107
|
+
padding: 4px 12px;
|
|
1108
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1109
|
+
border-radius: 360px;
|
|
1110
|
+
white-space: nowrap;
|
|
1111
|
+
text-overflow: ellipsis;
|
|
1112
|
+
img {
|
|
1113
|
+
&:hover {
|
|
1114
|
+
transform: scale(2);
|
|
1115
|
+
transition: transform 0.3s;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
`,ph=o(Si)``,uh=({value:r,placeholder:o,onDeselect:n})=>{const a=i();return Array.isArray(r)?r.length?e(ch,{children:r.map(r=>t(dh,{size:14,children:[r.value,e(hc,{orientation:"vertical",length:"10px",margin:"0 4px"}),e(yt,{size:12,onClick:e=>{e.stopPropagation(),n?.(r)}})]},`multi-label-${r.id}`))}):e(ph,{size:14,color:a.text.darker_grey,children:o}):e(ph,{size:14,color:r?.value?void 0:a.text.darker_grey,children:r?.value||o})},hh=o.div`
|
|
1119
|
+
position: absolute;
|
|
1120
|
+
${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
|
|
1121
|
+
left: 0;
|
|
1122
|
+
z-index: 1;
|
|
1123
|
+
display: flex;
|
|
1124
|
+
flex-direction: column;
|
|
1125
|
+
overflow-y: auto;
|
|
1126
|
+
width: calc(100% - 16px);
|
|
1127
|
+
max-height: 200px;
|
|
1128
|
+
gap: 8px;
|
|
1129
|
+
padding: 8px;
|
|
1130
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1131
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1132
|
+
border-radius: 24px;
|
|
1133
|
+
`,mh=o.div`
|
|
1134
|
+
display: flex;
|
|
1135
|
+
flex-direction: column;
|
|
1136
|
+
align-items: center;
|
|
1137
|
+
`,gh=({openUpwards:r,options:o,value:n,onSelect:i,onDeselect:a,isMulti:s,showSearch:l})=>{const[c,d]=jt(""),p=o.filter(e=>e.value?.toLowerCase().includes(c?.toLowerCase()));return t(hh,{$openUpwards:r,children:[l&&t(mh,{children:[e(oh,{placeholder:"Search...",icon:Tt,value:c,onChange:e=>d(e.target.value)}),e(hc,{thickness:1,margin:"8px 0 0 0"})]}),0===p.length?e(ep,{subTitle:l&&c?void 0:" "}):p.map((t,r)=>e(xh,{option:t,value:n,isMulti:s,onSelect:i,onDeselect:a},`dropdown-option-${t.id||r}`))]})},fh=o.div`
|
|
1138
|
+
padding: 8px 12px;
|
|
1139
|
+
cursor: pointer;
|
|
1140
|
+
display: flex;
|
|
1141
|
+
justify-content: space-between;
|
|
1142
|
+
align-items: center;
|
|
1143
|
+
border-radius: 32px;
|
|
1144
|
+
&:hover,
|
|
1145
|
+
&.selected {
|
|
1146
|
+
background: ${({theme:e})=>e.colors.majestic_blue+sl["024"]};
|
|
1147
|
+
}
|
|
1148
|
+
`,xh=({option:r,value:o,isMulti:n,onSelect:a,onDeselect:s})=>{const l=i(),c=Array.isArray(o)?!!o?.find(e=>e.id===r.id):o?.id===r.id,d=e=>e?a?.(r):s?.(r);return n?e(fh,{className:c?"selected":"",onClick:()=>d(!c),children:e(qc,{title:r.value||"",titleColor:l.text.secondary,value:c,onChange:d,style:{width:"100%"}})}):t(fh,{className:c?"selected":"",onClick:()=>c?s?.(r):a?.(r),children:[t(Tn,{$gap:8,children:[r.icon&&e(r.icon,{}),e(Si,{size:14,children:r.value})]}),c&&e(ft,{})]})},yh=o(In)`
|
|
1149
|
+
gap: 12px;
|
|
1150
|
+
`,bh=o(Tn)`
|
|
1151
|
+
width: 100%;
|
|
1152
|
+
gap: 12px;
|
|
1153
|
+
align-items: flex-end;
|
|
1154
|
+
`,vh=({clientX:r=0,flipX:o,clientY:n=0,flipY:a,isOpen:s,onClose:l,onSave:c,withDelete:d,onDelete:p,title:u,titleTooltip:h,warning:m,children:g})=>{const f=i(),{popupRef:x,popupPosition:y,handlePosition:b}=Bl({onClickOutside:l});return Ll({key:"Enter",active:s},c),Wt(()=>b(r,n),[r,n]),0===y.top&&0!==n||0===y.left&&0!==r?null:e(yc,{ref:x,isOpen:s,top:a?void 0:y.top,bottom:a?y.top:void 0,left:o?void 0:y.left,right:o?y.left:void 0,padding:"24px",children:t(yh,{children:[e(Cc,{text:h,withIcon:!0,children:e(Si,{size:14,children:u})}),t(bh,{children:[g,t(Tn,{$gap:6,children:[e(Dc,{withBorder:!0,onClick:l,tooltip:"Cancel",children:e(yt,{})}),e(Dc,{withBorder:!0,backgroundColor:f.colors.secondary,onClick:c,tooltip:"Save",children:e(ft,{fill:f.text.primary})}),d&&e(Dc,{onClick:p,tooltip:"Undo",children:e(It,{})})]})]}),m&&e(Lc,{type:Gr.Warning,message:m})]})})},$h=o.div`
|
|
1155
|
+
position: relative;
|
|
1156
|
+
`,wh=({defaultLanguage:r=Br.Unknown,defaultVersion:o="",defaultOtelDistroName:n=null,handleSave:i})=>{const{tier:a}=Vl(),{addNotification:s}=Gs(),{formData:l,handleFormChange:c,resetFormData:d}=$l({language:r,version:o,otelDistroName:n}),[p,u]=jt(!1),h=()=>{u(!1),d()},m=Ht(()=>{if(!l.language)return[];const e=Ps[l.language].community,t=a===Lr.Onprem?Ps[l.language].enterprise:[];return e.concat(t)},[l.language,a]);return t($h,{children:[e(Dc,{tooltip:Ao.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{u(!0)},children:e(kt,{})}),e(vh,{flipX:!0,clientX:36,isOpen:p,onClose:h,onSave:async()=>{!l.version||ni(l.version)?(await i({...l}),h()):s({type:Gr.Warning,message:Eo.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await i({language:null,version:"",otelDistroName:null}),h()},title:Ao.OVERRIDE_RUNTIME_DETAILS,warning:Ao.OVERRIDE_RUNTIME_WARNING,children:t(In,{$gap:12,children:[t(Tn,{$gap:12,children:[e(lh,{title:Ao.LANGUAGE,options:_s,value:_s.find(e=>e.id===l.language),onSelect:e=>{c("language",e.id),c("version",""),c("otelDistroName",null)},required:!0}),e(oh,{title:Ao.RUNTIME_VERSION,placeholder:Ao.VERSION_PLACEHOLDER,value:l.version,onChange:e=>c("version",e.target.value),required:!1})]}),l.language&&e(lh,{title:"Otel Distro Name",options:m,value:m.find(e=>e.id===l.otelDistroName),onSelect:e=>c("otelDistroName",e.id),required:!1})]})})]})},Sh=o(Tn)`
|
|
1157
|
+
width: 100%;
|
|
1158
|
+
justify-content: center;
|
|
1159
|
+
`,kh=({containerName:o,runtimeInfo:n,agentEnabled:a,overrides:s,callbackRuntimeOverride:l})=>{const c=i(),d=s?.runtimeInfo??n,p=d?.language??Br.Unknown,u=d?.runtimeVersion??"",h=null!=s?.runtimeInfo,m=a?.agentEnabled??!1,g=a?.agentEnabledStatus?.message??"",f=a?.otelDistroName??null,x=m?Gr.Success:g?Gr.Info:Gr.Warning,y=m?Vr.INSTRUMENTED:g?Vr.NOT_INSTRUMENTED:Vr.INSTRUMENTING;return e(Xd,{title:o,subTitle:`${p?Rs[p]:"no runtime info"}`+(u?` • Runtime Version: ${u}`:""),iconProps:{icon:Lo(p)},extendableProps:{isExtended:!!g,renderExtended:()=>e(Sh,{children:e(Si,{size:12,family:"secondary",color:c.text.info,children:ii(g)})})},renderActions:()=>t(r,{children:[e(kd,{status:x,title:y,subtitle:f||void 0,withIcon:!0,withBorder:!0}),h&&e(kd,{status:Gr.Default,forceIcon:Nt,title:Ao.OVERIDDEN,withIcon:!0,withBorder:!0}),l&&e(wh,{defaultLanguage:p,defaultVersion:u??"",defaultOtelDistroName:f,handleSave:e=>l({...e,containerName:o})})]})})},Ch=o.tr`
|
|
1160
|
+
cursor: ${({$withHover:e})=>e?"pointer":"default"};
|
|
1161
|
+
opacity: ${({$faded:e})=>e?.5:1};
|
|
1162
|
+
`,Eh=o.td`
|
|
1163
|
+
position: relative;
|
|
1164
|
+
width: fit-content;
|
|
1165
|
+
padding: 16px 8px 16px ${({$isFirst:e})=>e?"16px":"8px"};
|
|
1166
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1167
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1168
|
+
font-size: 14px;
|
|
1169
|
+
white-space: nowrap;
|
|
1170
|
+
`,Ah=o(Si)`
|
|
1171
|
+
font-size: 14px;
|
|
1172
|
+
color: ${({$color:e,theme:t})=>e??t.text.secondary};
|
|
1173
|
+
line-height: 16px;
|
|
1174
|
+
|
|
1175
|
+
overflow: hidden;
|
|
1176
|
+
overflow-wrap: break-word;
|
|
1177
|
+
white-space: wrap;
|
|
1178
|
+
text-wrap: wrap;
|
|
1179
|
+
text-overflow: ellipsis;
|
|
1180
|
+
display: -webkit-box;
|
|
1181
|
+
-webkit-line-clamp: 2;
|
|
1182
|
+
-webkit-box-orient: vertical;
|
|
1183
|
+
`,Dh=o.div`
|
|
1184
|
+
position: absolute;
|
|
1185
|
+
top: 0;
|
|
1186
|
+
left: 0;
|
|
1187
|
+
z-index: -1;
|
|
1188
|
+
width: ${({$width:e})=>e}px;
|
|
1189
|
+
height: ${({$height:e})=>e}px;
|
|
1190
|
+
border-radius: 16px;
|
|
1191
|
+
background-color: ${({theme:e,$hovered:t,$status:r})=>t?r?e.text[r]+sl["020"]:e.colors.majestic_blue+sl["030"]:r?e.text[r]+sl["010"]:e.colors.secondary+sl["005"]};
|
|
1192
|
+
`,Th=({index:r,columns:o,cells:n,onClick:i,status:a,faded:s})=>{const{containerRef:l,containerHeight:c,containerWidth:d}=Al(),[p,u]=jt(!1);return e(Ch,{ref:l,onMouseEnter:()=>!!i&&u(!0),onMouseLeave:()=>!!i&&u(!1),onClick:()=>!!i&&i(),$withHover:!!i,$faded:s,children:o.map(({key:o},i)=>{const s=n.find(({columnKey:e})=>e===o);if(!s)return null;const{value:l,textColor:u,withTooltip:h,icon:m,component:g}=s;return t(Eh,{$isFirst:0===i,children:[m?e(_d,{icon:m}):g?e(g,{}):e(Cc,{text:h&&l?String(l):"",children:e(Ah,{$color:u,children:Qn(l)?"-":l})}),0===i&&e(Dh,{$height:c,$width:d,$top:c*r,$hovered:p,$status:a})]},`table-row-${o}-${l}-${r}-${i}`)})})},Ih=o.div`
|
|
1193
|
+
width: 100%;
|
|
1194
|
+
`,Nh=o.table`
|
|
1195
|
+
position: relative;
|
|
1196
|
+
z-index: 0;
|
|
1197
|
+
width: 100%;
|
|
1198
|
+
border-collapse: separate;
|
|
1199
|
+
border-spacing: 0 12px;
|
|
1200
|
+
`,Oh=o.thead`
|
|
1201
|
+
// only supported with "border-collapse: collapse;"
|
|
1202
|
+
// border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1203
|
+
// border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1204
|
+
`,Rh=o.th`
|
|
1205
|
+
// only required with "border-collapse: separate;"
|
|
1206
|
+
border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1207
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1208
|
+
|
|
1209
|
+
padding: 8px;
|
|
1210
|
+
`,_h=o(Tn)`
|
|
1211
|
+
cursor: pointer;
|
|
1212
|
+
&:hover {
|
|
1213
|
+
* {
|
|
1214
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
`,Fh=o(Si)`
|
|
1218
|
+
color: ${({theme:e})=>e.text.darker_grey};
|
|
1219
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
1220
|
+
text-transform: uppercase;
|
|
1221
|
+
font-size: 12px;
|
|
1222
|
+
font-weight: 500;
|
|
1223
|
+
text-wrap: nowrap;
|
|
1224
|
+
`,Ph=o.tbody``,Lh=({columns:r,rows:o})=>{const[n,i]=jt(Pr.Ascending),[a,s]=jt("name"),l=Gt(e=>{a===e?i(e=>e===Pr.Ascending?Pr.Descending:Pr.Ascending):(s(e),i(Pr.Ascending))},[a]),c=Ht(()=>{const t=(e,t)=>e.cells.find(({columnKey:e})=>e===t)?.value??null;return(a?[...o].sort((e,r)=>{const o=t(e,a),i=t(r,a);return(n===Pr.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(o,i)}):o).map(({status:t,faded:o,cells:n,onClick:i},a)=>e(Th,{index:a,columns:r,cells:n,onClick:i,status:t,faded:o},`row-${a}`))},[r,o,a,n]);return e(Ih,{children:t(Nh,{children:[e(Oh,{children:e("tr",{children:r.map(({key:r,title:o,sortable:n})=>e(Rh,{children:n?t(_h,{onClick:()=>l(r),children:[e(Ot,{}),e(Fh,{children:o})]}):e(Fh,{children:o})},`column-${r}`))})}),e(Ph,{children:c})]})})};var zh;!function(e){e.Code="code",e.Table="table",e.Badge="badge",e.Loader="loader",e.Divider="divider",e.Monitors="monitors",e.CopyText="copy-text",e.ActiveStatus="active-status"}(zh||(zh={}));const Mh=o.div`
|
|
1225
|
+
display: flex;
|
|
1226
|
+
flex-wrap: wrap;
|
|
1227
|
+
gap: 16px 32px;
|
|
1228
|
+
width: 100%;
|
|
1229
|
+
`,Bh=o.div`
|
|
1230
|
+
display: flex;
|
|
1231
|
+
flex-direction: column;
|
|
1232
|
+
gap: 2px;
|
|
1233
|
+
width: ${({$width:e})=>e};
|
|
1234
|
+
`,Uh=o(Si)`
|
|
1235
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1236
|
+
font-size: 10px;
|
|
1237
|
+
line-height: 16px;
|
|
1238
|
+
`,jh=o(Si)`
|
|
1239
|
+
font-size: 12px;
|
|
1240
|
+
white-space: pre-wrap;
|
|
1241
|
+
`,Wh=({data:r})=>e(Mh,{children:r?.map(({type:r,title:o,titleIcon:n,tooltip:i,value:a},s)=>t(Bh,{$width:r&&[zh.Code,zh.Table].includes(r)?"inherit":r&&[zh.Loader,zh.Divider,zh.CopyText].includes(r)?"100%":"unset",children:[e(Cc,{text:i,withIcon:!0,children:t(Tn,{$alignItems:"center",$gap:4,children:[n&&e(n,{size:14}),!!o&&e(Uh,{transform:"capitalize",children:o})]})}),e(Hh,{type:r,value:a})]},`data-field-${o||(a?JSON.stringify(a):s)}`))}),Hh=({type:t,value:r})=>{const o=i();switch(t){case zh.Divider:return e(hc,{length:"100%",margin:"0"});case zh.Loader:return e(Nn,{children:e(pd,{scale:1.2})});case zh.Monitors:return e(Md,{monitors:r?.split(", ")||[],withLabels:!0,color:o.colors.secondary});case zh.Badge:{const{label:t,filled:o,...n}=qn(r,{label:"-",filled:!1});return e(fl,{label:t,filled:o,...n})}case zh.Code:{const{language:t,code:o,...n}=qn(r,{language:"",code:""});return e(id,{language:t,code:o,...n})}case zh.Table:{const{columns:t,rows:o,...n}=qn(r,{columns:[],rows:[{status:void 0,cells:[]}]});return e(Lh,{columns:t,rows:o,...n})}case zh.ActiveStatus:return e(kd,{status:"true"==r?Gr.Success:Gr.Error,title:"true"==r?Ao.ENABLED:Ao.DISABLED,size:10,withIcon:!0,withBorder:!0});case zh.CopyText:{const t="string"==typeof r?r:JSON.stringify(r);return e(Ad,{value:t})}default:return e(jh,{children:ui("string"==typeof r?r||"-":"")})}},Xh=o.div`
|
|
1242
|
+
display: flex;
|
|
1243
|
+
flex-direction: column;
|
|
1244
|
+
align-items: flex-start;
|
|
1245
|
+
align-self: stretch;
|
|
1246
|
+
gap: 16px;
|
|
1247
|
+
padding: 24px;
|
|
1248
|
+
border-radius: 24px;
|
|
1249
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1250
|
+
background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+sl["010"]:"transparent"};
|
|
1251
|
+
transition: background-color 0.3s;
|
|
1252
|
+
`,Gh=o.div`
|
|
1253
|
+
width: 100%;
|
|
1254
|
+
display: flex;
|
|
1255
|
+
flex-direction: column;
|
|
1256
|
+
gap: 4px;
|
|
1257
|
+
cursor: ${({$clickable:e})=>e?"pointer":"default"};
|
|
1258
|
+
`,Vh=o(Si)`
|
|
1259
|
+
width: 100%;
|
|
1260
|
+
display: flex;
|
|
1261
|
+
align-items: center;
|
|
1262
|
+
gap: 8px;
|
|
1263
|
+
font-size: 16px;
|
|
1264
|
+
`,Kh=o(Si)`
|
|
1265
|
+
font-size: 12px;
|
|
1266
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1267
|
+
`,qh=o(Tn)`
|
|
1268
|
+
margin-left: auto;
|
|
1269
|
+
gap: 8px;
|
|
1270
|
+
`,Jh=({title:r="Details",titleBadge:o,titleIcon:n,description:i,action:a,withExtend:s,initialExtended:l=!1,data:c,children:d})=>{const[p,u]=jt(l),[h,m]=jt(!1);return t(Xh,{$hovered:h,children:[r||n||i||a?t(Gh,{$clickable:s||!1,onClick:()=>s&&u(e=>!e),onMouseEnter:()=>s&&m(!0),onMouseLeave:()=>s&&m(!1),children:[t(Tn,{children:[t(Tn,{$alignItems:"center",$gap:8,children:[n&&e(Tn,{$alignItems:"center",children:e(n,{size:20})}),!!r&&e(Vh,{transform:"capitalize",children:r}),o===Kr.Loading?e(pd,{}):void 0!==o&&e(fl,{label:o})]}),(!!a||s)&&t(qh,{children:["function"==typeof a?e(a,{hovered:h}):a,s&&e(hd,{extend:p})]})]}),!!i&&e(Kh,{children:i})]}):null,(!s||s&&p)&&(d||e(Wh,{data:c}))]})},Yh=o.div`
|
|
1271
|
+
visibility: hidden;
|
|
1272
|
+
`,Qh=o(Tn)`
|
|
1273
|
+
align-self: stretch;
|
|
1274
|
+
width: calc(100% - 32px);
|
|
1275
|
+
padding: 16px;
|
|
1276
|
+
border-radius: 16px;
|
|
1277
|
+
background-color: ${({theme:e})=>e.colors.secondary+sl["005"]};
|
|
1278
|
+
${({theme:e,$withClick:t})=>t?n`
|
|
1279
|
+
&:hover {
|
|
1280
|
+
cursor: pointer;
|
|
1281
|
+
background-color: ${e.colors.secondary+sl["010"]};
|
|
1282
|
+
${Yh} {
|
|
1283
|
+
visibility: visible;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
`:`\n &:hover {\n ${Yh} {\n visibility: visible;\n }\n }\n `}
|
|
1287
|
+
`,Zh=o(Tn)`
|
|
1288
|
+
margin-left: auto;
|
|
1289
|
+
gap: 8px;
|
|
1290
|
+
`,em=o(Si)`
|
|
1291
|
+
font-size: 10px;
|
|
1292
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1293
|
+
`,tm=({title:o,subTitle:n,icons:a,iconSrcs:s,onClick:l,renderActions:c})=>{const d=i(),[p,u]=jt(0),h=Xt(null),m=Xt(null);return Wt(()=>{if(h.current){const e=h.current.clientWidth,t=m.current?.clientWidth||0;u(e-(85+t))}},[]),t(Qh,{ref:h,$gap:8,$withClick:!!l,onClick:l,children:[e(Ld,{id:`${o}-${n}`,icons:a,iconSrcs:s}),o&&e(Nd,{maxWidth:p/2,text:o,textSize:14}),o&&n&&e(em,{children:"•"}),n&&e(Nd,{maxWidth:p/2,text:n,textSize:10,textColor:d.text.grey}),e(Zh,{ref:m,children:c&&t(r,{children:[e(hc,{orientation:"vertical",length:"24px",margin:"0"}),c()]})})]})},rm=({isOpen:t,noOverlay:r,name:o,type:n,isLastItem:i,onApprove:a,onDeny:s})=>{const l=n===jr.Source?"uninstrument":"delete";return e(Xc,{isOpen:t,noOverlay:r,title:`${l.charAt(0).toUpperCase()+l.substring(1)}${o?` ${o}`:""}`,description:`Are you sure you want to ${l}?`,note:i?{type:Gr.Warning,title:`You're about to ${l} the last ${n||o}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:s}})},om=o(vl)`
|
|
1294
|
+
display: flex;
|
|
1295
|
+
align-items: center;
|
|
1296
|
+
justify-content: center;
|
|
1297
|
+
font-size: 14px;
|
|
1298
|
+
gap: 6px;
|
|
1299
|
+
min-width: 100px;
|
|
1300
|
+
`,nm=({endpoint:r="/",variant:o="secondary"})=>t(om,{variant:o,onClick:()=>window.open(`https://docs.odigos.io${r}`,"_blank","noopener noreferrer"),children:[e(Rt,{size:18}),"Docs"]}),im=o(Tn)`
|
|
1301
|
+
border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
|
|
1302
|
+
`,am=o.div`
|
|
1303
|
+
display: flex;
|
|
1304
|
+
align-items: center;
|
|
1305
|
+
border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
|
|
1306
|
+
cursor: pointer;
|
|
1307
|
+
`,sm=o(Si)`
|
|
1308
|
+
padding: 12px;
|
|
1309
|
+
font-size: 14px;
|
|
1310
|
+
color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
|
|
1311
|
+
`,lm=({tabs:r,hideBorder:o=!1})=>r?.length?e(im,{$hideBorder:o,children:r.map(({label:r,icon:o,onClick:n,selected:i})=>t(am,{onClick:n,$selected:i,children:[e(sm,{$selected:i,children:r}),o&&e(o,{})]},`tab-${r}`))}):null,cm=o.section`
|
|
1312
|
+
padding: 0px 32px;
|
|
1313
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1314
|
+
`,dm=o.div`
|
|
1315
|
+
height: 76px;
|
|
1316
|
+
display: flex;
|
|
1317
|
+
justify-content: space-between;
|
|
1318
|
+
flex-shrink: 0;
|
|
1319
|
+
align-self: stretch;
|
|
1320
|
+
`,pm=o.div`
|
|
1321
|
+
display: flex;
|
|
1322
|
+
align-items: center;
|
|
1323
|
+
gap: ${({$gap:e})=>e||16}px;
|
|
1324
|
+
`,um=o(Si)`
|
|
1325
|
+
font-size: 18px;
|
|
1326
|
+
line-height: 26px;
|
|
1327
|
+
max-width: ${({$maxWidth:e})=>e};
|
|
1328
|
+
overflow: hidden;
|
|
1329
|
+
white-space: nowrap;
|
|
1330
|
+
text-overflow: ellipsis;
|
|
1331
|
+
`,hm=o(vl)`
|
|
1332
|
+
gap: 8px;
|
|
1333
|
+
`,mm=o(vl)``,gm=({onClose:r,width:o,icons:n,iconSrcs:i,title:a,titleTooltip:s,replaceTitleWith:l,actions:c,actionButtons:d=[],tabs:p})=>t(cm,{children:[t(dm,{children:[t(pm,{children:[n?.length||i?.length?e(Ld,{icons:n,iconSrcs:i,id:`drawer-header-${a}`}):null,("function"==typeof l?e(l,{}):l||null)||e(Cc,{text:s||a,withIcon:!!s,children:a&&e(um,{$maxWidth:`calc(${o} ${c||d.length?"/ 5":"- 192px"})`,children:a})})]}),t(pm,{$gap:2,children:[c,d.map((t,r)=>e(hm,{...t},`header-action-button-${r}`)),e(mm,{"data-id":"drawer-close",variant:"secondary",onClick:r,children:e(yt,{size:12})})]})]}),e(lm,{tabs:p,hideBorder:!0})]}),fm=o.div`
|
|
1334
|
+
display: flex;
|
|
1335
|
+
justify-content: space-between;
|
|
1336
|
+
gap: 8px;
|
|
1337
|
+
padding: 24px 18px 24px 32px;
|
|
1338
|
+
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
1339
|
+
background-color: ${({theme:e})=>e.colors.translucent_bg};
|
|
1340
|
+
transform: translateY(100%);
|
|
1341
|
+
animation-name: ${cl.in.bottom};
|
|
1342
|
+
`,xm=o(Tn)`
|
|
1343
|
+
margin-right: auto;
|
|
1344
|
+
`,ym=o(Tn)`
|
|
1345
|
+
margin: 0 auto;
|
|
1346
|
+
`,bm=o(Tn)`
|
|
1347
|
+
margin-left: auto;
|
|
1348
|
+
`,vm=o(vl)`
|
|
1349
|
+
min-width: 140px;
|
|
1350
|
+
font-size: 14px;
|
|
1351
|
+
`,$m=({isOpen:r,leftButtons:o=[],centerButtons:n=[],rightButtons:i=[]})=>r?t(fm,{children:[e(xm,{children:o.map((t,r)=>e(vm,{...t},`footer-left-button-${r}`))}),e(ym,{children:n.map((t,r)=>e(vm,{...t},`footer-center-button-${r}`))}),e(bm,{children:i.map((t,r)=>e(vm,{...t},`footer-right-button-${r}`))})]}):null,wm=o.div`
|
|
1352
|
+
position: fixed;
|
|
1353
|
+
top: 0;
|
|
1354
|
+
bottom: 0;
|
|
1355
|
+
${({$position:e})=>e}: 0;
|
|
1356
|
+
z-index: 1000;
|
|
1357
|
+
width: ${({$width:e})=>e};
|
|
1358
|
+
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
1359
|
+
box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+sl["010"]};
|
|
1360
|
+
overflow-y: auto;
|
|
1361
|
+
animation-name: ${({$position:e})=>cl.in[e]};
|
|
1362
|
+
`,Sm=o.div`
|
|
1363
|
+
display: flex;
|
|
1364
|
+
flex-direction: column;
|
|
1365
|
+
height: 100%;
|
|
1366
|
+
`,km=o.div`
|
|
1367
|
+
flex-grow: 1;
|
|
1368
|
+
padding: 24px 32px;
|
|
1369
|
+
overflow-y: auto;
|
|
1370
|
+
`,Cm=({isOpen:o,onClose:n,closeOnEscape:i=!0,position:a="right",width:s="300px",children:l,header:c,footer:d})=>(Ll({key:"Escape",active:o&&i},()=>n()),kl(o),o?dr.createPortal(t(r,{children:[e(Rn,{hidden:!o,onClick:n}),e(wm,{"data-id":"drawer",$position:a,$width:s,children:t(Sm,{children:[e(gm,{onClose:n,width:s,...c}),e(km,{children:l}),e($m,{...d})]})})]}),document.body):null),Em=({error:r})=>{const o=i(),n={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:o.text.error,fontFamily:o.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:o.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:o.text.secondary,fontSize:"14px"}};return t("div",{style:n.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:n.errorMessage,children:r?.message||"Unknown Error"}),t("details",{style:n.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:n.errorStack,children:r?.stack||"Unknown Stack"})]}),e("p",{style:n.infoText,children:"Try refreshing the page or contact support"}),e(vl,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},Am=({children:t})=>e(mr,{FallbackComponent:({error:t,...r})=>e(al,{children:e(Em,{...r,error:t})}),children:t}),Dm=o(Tn)`
|
|
1371
|
+
position: relative;
|
|
1372
|
+
width: calc(100% - 24px);
|
|
1373
|
+
padding: 12px;
|
|
1374
|
+
background-color: ${({theme:e})=>e.colors.dark_grey};
|
|
1375
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border+sl["050"]};
|
|
1376
|
+
`,Tm=o(Tn)`
|
|
1377
|
+
margin-right: auto;
|
|
1378
|
+
margin-left: 32px;
|
|
1379
|
+
gap: 12px;
|
|
1380
|
+
`,Im=o(Tn)`
|
|
1381
|
+
margin-left: auto;
|
|
1382
|
+
margin-right: 32px;
|
|
1383
|
+
gap: 12px;
|
|
1384
|
+
`,Nm=o(Tn)`
|
|
1385
|
+
position: absolute;
|
|
1386
|
+
left: 50%;
|
|
1387
|
+
transform: translateX(-50%);
|
|
1388
|
+
gap: 12px;
|
|
1389
|
+
`,Om=({left:r=[],center:o=[],right:n=[]})=>t(Dm,{children:[e(Tm,{children:r.map((t,r)=>t&&e(Ut,{children:t},r))}),e(Nm,{children:o.map((t,r)=>t&&e(Ut,{children:t},r))}),e(Im,{children:n.map((t,r)=>t&&e(Ut,{children:t},r))})]}),Rm=o(Si)`
|
|
1390
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1391
|
+
`,_m=({icon:r,title:o,badge:n,badgeTooltip:i,loading:a})=>t(Tn,{$gap:6,children:[r&&e(r,{}),e(Rm,{size:14,children:o}),void 0!==n&&e(Cc,{text:i,children:e(fl,{label:n})}),a&&e(pd,{})]}),Fm=o.div`
|
|
1392
|
+
width: fit-content;
|
|
1393
|
+
height: fit-content;
|
|
1394
|
+
padding: 4px;
|
|
1395
|
+
gap: 4px;
|
|
1396
|
+
border-radius: 32px;
|
|
1397
|
+
border: 1px solid ${({theme:e})=>e.colors.border+sl["070"]};
|
|
1398
|
+
|
|
1399
|
+
display: flex;
|
|
1400
|
+
flex-direction: ${({$orientation:e,$flip:t})=>("horizontal"===e?"row":"column")+(t?"-reverse":"")};
|
|
1401
|
+
align-items: center;
|
|
1402
|
+
justify-content: center;
|
|
1403
|
+
`,Pm=o.div`
|
|
1404
|
+
width: 32px;
|
|
1405
|
+
height: 32px;
|
|
1406
|
+
|
|
1407
|
+
border-radius: 100%;
|
|
1408
|
+
background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+sl["070"]:e.colors.secondary+sl["012"]};
|
|
1409
|
+
transition: background-color 0.3s;
|
|
1410
|
+
|
|
1411
|
+
display: flex;
|
|
1412
|
+
align-items: center;
|
|
1413
|
+
justify-content: center;
|
|
1414
|
+
|
|
1415
|
+
cursor: pointer;
|
|
1416
|
+
`,Lm=({orientation:r="vertical",flip:o,mainIcons:n,subIcons:i})=>t(Fm,{$orientation:r,$flip:o,children:[n.map(({icon:t,selected:r,onClick:o,tooltip:n},i)=>e(Cc,{text:n,children:e(Pm,{$selected:r,onClick:o,children:e(t,{size:20})})},`main-nav-icon-${i}`)),!!n.length&&!!i.length&&e(hc,{orientation:"vertical"===r?"horizontal":"vertical",margin:"0",length:"20px"}),i.map(({icon:t,selected:r,onClick:o,tooltip:n},i)=>e(Cc,{text:n,children:e(Pm,{$selected:r,onClick:o,children:e(t,{size:20})})},`sub-nav-icon-${i}`))]}),zm=o.div`
|
|
1417
|
+
display: flex;
|
|
1418
|
+
flex-direction: column;
|
|
1419
|
+
width: 100%;
|
|
1420
|
+
`,Mm=o.div`
|
|
1421
|
+
display: flex;
|
|
1422
|
+
flex-direction: column;
|
|
1423
|
+
gap: 8px;
|
|
1424
|
+
`,Bm=o.div`
|
|
1425
|
+
display: flex;
|
|
1426
|
+
align-items: center;
|
|
1427
|
+
gap: 16px;
|
|
1428
|
+
`,Um=o(Dc)`
|
|
1429
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1430
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1431
|
+
`,jm=({initialValues:r=[],value:o,onChange:n,title:i,tooltip:a,required:s,errorMessage:l})=>{const[c,d]=jt(o||r);Wt(()=>{c.length||d([""])},[]);const p=c.filter(e=>!!e.trim()),u=Xt(JSON.stringify(p));Wt(()=>{const e=JSON.stringify(p);u.current!==e&&(u.current=e,n&&n(p))},[p]);const h=(e,t)=>{d(r=>{const o=[...r];return o[t]=e,o})},m=c.length<=1,g=c.some(e=>""===e.trim()),f=m&&g;return t(zm,{children:[e(Ju,{title:i,required:s,tooltip:a}),e(Mm,{children:c.map((r,o)=>{const n=o===c.length-1;return t(Bm,{children:[e(oh,{value:r,onChange:e=>h(e.target.value,o),hasError:!!l,autoFocus:Qn(r)&&!m&&n}),o===c.length-1&&e(Um,{withBorder:!0,size:30,$disabled:g,onClick:g?void 0:()=>{d(e=>{const t=[...e];return t.push(""),t})},children:e(St,{})}),e(Um,{size:30,$disabled:f,onClick:f?void 0:()=>(e=>{m?h("",e):d(t=>t.filter((t,r)=>r!==e))})(o),children:e(It,{})})]},`input-list-${o}`)})}),!!l&&e(Ei,{children:l})]})},Wm=({col:t,colIdx:r,row:o,rowIdx:n,rowsLength:i,maxWidth:a,handleChange:s,errorMessage:l,limitFieldsPerRow:c})=>{const{keyName:d,title:p,tooltip:u,placeholder:h,required:m,type:g,componentType:f,options:x,renderCondition:y}=t,b=o[d];if(y&&!y(o))return null;return e("td",{style:{maxWidth:a,padding:"4px 6px 4px 0"},children:(()=>{switch(f){case Hr.Dropdown:const t=x?.find(e=>e.id===b);return e(lh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,required:m,options:x||[],value:t,onSelect:e=>s(d,e.id,n),onDeselect:()=>s(d,"",n),hasError:!!l&&(!m||m&&Qn(b))});case"multi-dropdown":const o=Array.isArray(b)&&x?.filter(e=>b.includes(e.id))||[];return e(lh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,required:m,options:x||[],value:o,isMulti:!0,onSelect:e=>{const t=[...Array.isArray(b)?b:[],e.id];s(d,t,n)},onDeselect:e=>{const t=(Array.isArray(b)?b:[]).filter(t=>t!==e.id);s(d,t,n)},hasError:!!l&&(!m||m&&Qn(b))});default:const f=i>1&&n===i-1&&0===r&&Qn(b);return e(oh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,type:g,required:m,autoFocus:f,value:b,onChange:({target:{value:e}})=>s(d,e,n),style:{maxWidth:a,paddingLeft:10},hasError:!!l&&(!m||m&&Qn(b))})}})()},`input-table-${n}-${d}`)},Hm=o.div`
|
|
1432
|
+
display: flex;
|
|
1433
|
+
flex-direction: column;
|
|
1434
|
+
width: 100%;
|
|
1435
|
+
`,Xm=o.button`
|
|
1436
|
+
margin-top: ${({$marginTop:e})=>e};
|
|
1437
|
+
background: none;
|
|
1438
|
+
border: none;
|
|
1439
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1440
|
+
opacity: ${({disabled:e})=>e?.5:1};
|
|
1441
|
+
`,Gm=({columns:r,initialValues:o=[],value:n,onChange:i,errorMessage:a,limitFieldsPerRow:s,title:l=""})=>{const[c,d]=jt({}),[p,u]=jt(n||o),h=Ht(()=>new Map(r.map(e=>[e.keyName,e])),[r]);Wt(()=>{if(!p.length){const e={};r.forEach(({keyName:t})=>e[t]=""),d(e),u([e])}},[]);const m=p.filter(e=>{for(const[t,r]of Object.entries(e)){const o=h.get(t);if((!o?.renderCondition||o.renderCondition(e))&&(o?.required&&Qn(r)))return!1}return!0}),g=Xt(JSON.stringify(m)),f=m.length!==p.length,x=`${Math.floor(640/((s||r.length)+.4))}px`;Wt(()=>{const e=JSON.stringify(m);g.current!==e&&(g.current=e,i&&i(m))},[m]);const y=(e,t,r)=>{u(o=>{const n=$r(o);return n[r][e]=t,n})},b=Ht(()=>{if(s){const e=[];for(let t=0;;t+=s){const o=r.slice(t,t+s);if(!o.length)break;e.push(o)}return e}return[r]},[s,r]);return t(Hm,{children:[e(Ju,{title:l}),t("table",{style:{borderCollapse:"collapse"},children:[!s&&e("thead",{children:t("tr",{children:[r.map(({title:t,tooltip:r,required:o})=>e("th",{style:{maxWidth:x},children:e(Ju,{title:t,required:o,tooltip:r})},`input-table-head-${t}`)),e("th",{})]})}),e("tbody",{children:p.map((o,n)=>t(Ut,{children:[s&&n>0?e("tr",{children:e("td",{colSpan:b.length,children:e(hc,{})})}):null,b.map((i,l)=>t("tr",{children:[i.map((t,r)=>e(Wm,{col:t,colIdx:r,row:o,rowIdx:n,rowsLength:p.length,maxWidth:x,limitFieldsPerRow:s,errorMessage:a,handleChange:y},`input-table-row-${n}-col-${r}`)),0===l&&e("td",{children:e(Xm,{$marginTop:s?"24px":"0",onClick:()=>{return e=n,void(p.length>1?u(t=>t.filter((t,r)=>r!==e)):r.forEach(({keyName:t,type:r})=>y(t,r===Xr.Number?"0":"",e)));var e},children:e(It,{})})})]},`input-table-matrix-${n}-${l}`))]},`input-table-row-${n}`))})]}),!!a&&e(Ei,{children:a}),e(Cd,{onClick:()=>{u(e=>{const t=$r(e);return t.push($r(c)),t})},disabled:f})]})},Vm=o.div`
|
|
1442
|
+
display: flex;
|
|
1443
|
+
flex-direction: column;
|
|
1444
|
+
width: 100%;
|
|
1445
|
+
`,Km=o.div`
|
|
1446
|
+
display: flex;
|
|
1447
|
+
flex-direction: column;
|
|
1448
|
+
gap: 8px;
|
|
1449
|
+
`,qm=o.div`
|
|
1450
|
+
display: flex;
|
|
1451
|
+
align-items: center;
|
|
1452
|
+
gap: 8px;
|
|
1453
|
+
`,Jm=o.div`
|
|
1454
|
+
width: 100%;
|
|
1455
|
+
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
1456
|
+
`,Ym=o(Dc)`
|
|
1457
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1458
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1459
|
+
`,Qm={key:"",value:""},Zm=({initialKeyValuePairs:r=[],value:o,onChange:n,title:i,tooltip:a,disabled:s,required:l,errorMessage:c,keyPlaceholder:d="Key",valuePlaceholder:p="Value",inputMaxWidth:u=300})=>{const[h,m]=jt(o||r);Wt(()=>{h.length||m([{...Qm}])},[]);const g=h.filter(({key:e,value:t})=>!Qn(e.trim())&&!Qn(t.trim())),f=Xt(JSON.stringify(g));Wt(()=>{const e=JSON.stringify(g);f.current!==e&&(f.current=e,n&&n(g))},[g]);const x=(e,t,r)=>{m(o=>{const n=[...o];return n[r][e]=t,n})},y=h.length<=1,b=s||h.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),v=s||y&&b;return t(Vm,{children:[e(Ju,{title:i,required:l,tooltip:a}),e(Km,{children:h.map(({key:r,value:o},n)=>t(qm,{children:[e(Jm,{$maxWidth:u,children:e(oh,{placeholder:d,disabled:s,value:r,onChange:e=>x("key",e.target.value,n),hasError:!!c&&(!l||l&&!r),autoFocus:Qn(o)&&!y&&n===h.length-1})}),e(Jm,{$maxWidth:n===h.length-1?u-38:u,children:e(oh,{placeholder:p,disabled:s,value:o,onChange:e=>x("value",e.target.value,n),hasError:!!c&&(!l||l&&Qn(o)),autoFocus:!1})}),n===h.length-1&&e(Ym,{withBorder:!0,size:30,$disabled:b,onClick:b?void 0:()=>{m(e=>{const t=[...e];return t.push({...Qm}),t})},children:e(St,{})}),e(Ym,{size:30,$disabled:v,onClick:v?void 0:()=>(e=>{y?(x("key","",e),x("value","",e)):m(t=>t.filter((t,r)=>r!==e))})(n),children:e(It,{})})]},`key-value-input-list-${n}`))}),!!c&&e(Ei,{children:c})]})},eg=a`
|
|
1460
|
+
0% {
|
|
1461
|
+
background-position: 0% 50%;
|
|
1462
|
+
}
|
|
1463
|
+
100% {
|
|
1464
|
+
background-position: 100% 50%;
|
|
1465
|
+
}
|
|
1466
|
+
`,tg=o(Si)`
|
|
1467
|
+
background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
1468
|
+
background-size: 250% 100%; /* Expand background to allow movement */
|
|
1469
|
+
background-clip: text;
|
|
1470
|
+
color: transparent;
|
|
1471
|
+
animation: ${eg} 1s reverse linear infinite;
|
|
1472
|
+
`,rg=({children:t="Loading...",textColor:r,stripColor:o,...n})=>{const a=i(),s=r||a.v2.colors.white[500],l=o||a.v2.colors.black[500];return e(tg,{$textColor:s,$stripColor:l,...n,children:t})},og=o.div`
|
|
1473
|
+
display: flex;
|
|
1474
|
+
flex-direction: ${({$isVertical:e})=>e?"column":"row"};
|
|
1475
|
+
gap: ${({$isVertical:e})=>e?"12px":"24px"};
|
|
1476
|
+
${({$hasError:e})=>e&&n`
|
|
1477
|
+
border: 1px solid ${({theme:e})=>e.text.error};
|
|
1478
|
+
border-radius: 32px;
|
|
1479
|
+
padding: 8px;
|
|
1480
|
+
`}
|
|
1481
|
+
`,ng=(e,t)=>!t?.length||!!t?.find(t=>t===e),ig=({isVertical:r,title:o="Monitors",required:n,errorMessage:i,allowedSignals:a,selectedSignals:s,setSelectedSignals:l})=>{const[c,d]=jt(1===s.length),p=Xt(JSON.stringify(s));Wt(()=>{const e=s;e.length||Os.forEach(({id:t})=>{ng(t,a)&&e.push(t)});const t=JSON.stringify(e);return p.current!==t&&(p.current=t,l(e),d(1===e.length)),()=>{p.current=""}},[a]);return t("div",{children:[o&&e(Ju,{title:o,required:n}),e(og,{$isVertical:r,$hasError:!!i,children:Os.map(t=>{const r=ng(t.id,a),o=((e,t)=>!!t?.find(t=>t===e))(t.id,s);return r?e(qc,{title:t.value,disabled:!r||c&&o,value:o,onChange:e=>((e,t)=>{const r=e,o=t?[...s,r]:s.filter(e=>e!==r);l(o),d(1===o.length)})(t.id,e)},t.id):null})}),!!i&&e(Ei,{children:i})]})},ag=o.div`
|
|
1482
|
+
display: flex;
|
|
1483
|
+
gap: 8px;
|
|
1484
|
+
align-items: center;
|
|
1485
|
+
`,sg=o(vl)`
|
|
1486
|
+
display: flex;
|
|
1487
|
+
align-items: center;
|
|
1488
|
+
justify-content: center;
|
|
1489
|
+
gap: 8px;
|
|
1490
|
+
min-width: 90px;
|
|
1491
|
+
`,lg=({buttons:r})=>{const o=i(),n=({button:e,index:t})=>r.length>1&&0===t&&(e.icon||e.iconSrc),a=({button:t,rotate:r})=>t.icon?e(t.icon,{size:14,rotate:r,fill:o.text[t.variant||"secondary"]}):t.iconSrc?e("img",{src:t.iconSrc,alt:t.label,width:8,height:12}):null;return e(ag,{children:r.map((r,o)=>e(Cc,{text:r.tooltip||"",children:t(sg,{variant:r.variant||"secondary",onClick:r.onClick,disabled:r.disabled,children:[n({button:r,index:o})&&a({button:r,rotate:0}),r.label,!n({button:r,index:o})&&a({button:r,rotate:180})]},o)},o))})},cg=o.div`
|
|
1492
|
+
width: 100%;
|
|
1493
|
+
height: 100%;
|
|
1494
|
+
|
|
1495
|
+
* {
|
|
1496
|
+
animation: none !important;
|
|
1497
|
+
transition: none !important;
|
|
1498
|
+
}
|
|
1499
|
+
`,dg=({width:t="100%",height:r="100%",gap:o=0,elements:n,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Xt(null),l=Ht(()=>o?n.map((t,r)=>e("div",{style:{paddingBottom:o},children:t},`scroll-y-item-${r}`)):n,[n,o]),c=Gt(e=>{if(!a||!s.current)return;const t=s.current.findItemIndex(e);a(t)},[a]),d=e(fr,{ref:s,style:{width:t,height:r},onScroll:a?c:void 0,children:l});return i?e(cg,{children:d}):d},pg=o.div`
|
|
1500
|
+
display: flex;
|
|
1501
|
+
justify-content: space-between;
|
|
1502
|
+
align-items: center;
|
|
1503
|
+
gap: 16px;
|
|
1504
|
+
`,ug=o.div`
|
|
1505
|
+
display: flex;
|
|
1506
|
+
flex-direction: column;
|
|
1507
|
+
gap: 4px;
|
|
1508
|
+
`,hg=o.div`
|
|
1509
|
+
display: flex;
|
|
1510
|
+
align-items: center;
|
|
1511
|
+
gap: 8px;
|
|
1512
|
+
`,mg=o(Si)``,gg=o(Si)``,fg=({title:r,description:o,badgeLabel:n,icon:i,actionButton:a,size:s="medium"})=>{const l="small"===s?16:"medium"===s?20:24,c="small"===s?12:"medium"===s?14:16;return t(pg,{children:[t(ug,{children:[t(hg,{children:[i&&e(i,{size:l}),e(mg,{weight:300,size:l,children:r}),void 0!==n&&e(fl,{label:n,filled:!!n})]}),e(gg,{weight:200,opacity:.8,size:c,children:o})]}),a&&e("div",{children:a})]})},xg=o.div`
|
|
1513
|
+
position: relative;
|
|
1514
|
+
gap: 0;
|
|
1515
|
+
z-index: 0;
|
|
1516
|
+
display: grid;
|
|
1517
|
+
grid-template-columns: repeat(${({$count:e})=>e}, 1fr);
|
|
1518
|
+
`,yg=o.button`
|
|
1519
|
+
flex: 1;
|
|
1520
|
+
display: flex;
|
|
1521
|
+
align-items: center;
|
|
1522
|
+
justify-content: center;
|
|
1523
|
+
gap: 4px;
|
|
1524
|
+
padding: 6px 12px;
|
|
1525
|
+
background-color: transparent;
|
|
1526
|
+
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1527
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1528
|
+
cursor: pointer;
|
|
1529
|
+
&:hover {
|
|
1530
|
+
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
1531
|
+
}
|
|
1532
|
+
`,bg=o.div`
|
|
1533
|
+
position: absolute;
|
|
1534
|
+
top: ${({$y:e})=>e}px;
|
|
1535
|
+
left: ${({$x:e})=>e}px;
|
|
1536
|
+
z-index: -1;
|
|
1537
|
+
width: ${({$width:e})=>e}px;
|
|
1538
|
+
height: ${({$height:e})=>e}px;
|
|
1539
|
+
background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1540
|
+
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1541
|
+
transition: all 0.3s;
|
|
1542
|
+
`,vg=({options:r=[],selected:o,setSelected:n})=>{const i=r.findIndex(e=>e.value===o),[a,s]=jt(r[i]?.selectedBgColor||""),[l,c]=jt({width:0,height:0}),[d,p]=jt({x:0,y:0}),u=Xt(null);return Wt(()=>{u.current&&(c({width:u.current.offsetWidth,height:u.current.offsetHeight}),p({x:u.current.offsetWidth*i,y:0}))},[o,i]),t(xg,{$count:r.length,children:[r.map(({icon:i,label:a,value:l,selectedBgColor:c,selectedTextColor:d},p)=>{const h=o===l;return t(yg,{ref:h?u:void 0,$isFirstItem:0===p,$isLastItem:p===r.length-1,onClick:()=>{n(l),s(c||"")},children:[i&&e(i,{}),a&&e(Si,{size:12,family:"secondary",decoration:"underline",color:h?d:void 0,children:a})]},`segment-${a||p}-${l}`)}),e(bg,{$bgColor:a,$width:l.width,$height:l.height,$x:d.x,$y:d.y,$isFirstItem:0===i,$isLastItem:i===r.length-1})]})},$g=o(vl)`
|
|
1543
|
+
gap: 8px;
|
|
1544
|
+
text-transform: none;
|
|
1545
|
+
text-decoration: none;
|
|
1546
|
+
border: ${({theme:e,$withBorder:t})=>`1px solid ${t?e.colors.border:"transparent"}`};
|
|
1547
|
+
&.not-selected {
|
|
1548
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+sl["060"]};
|
|
1549
|
+
&:hover {
|
|
1550
|
+
background-color: ${({theme:e,$hoverColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
&.selected {
|
|
1554
|
+
background-color: ${({theme:e})=>e.colors.majestic_blue+sl["030"]};
|
|
1555
|
+
}
|
|
1556
|
+
`,wg=o(Si)`
|
|
1557
|
+
white-space: nowrap;
|
|
1558
|
+
overflow: hidden;
|
|
1559
|
+
text-overflow: ellipsis;
|
|
1560
|
+
font-size: 14px;
|
|
1561
|
+
`,Sg=({label:r,onClick:o,icon:n,iconSrc:a,badgeLabel:s,badgeFilled:l,isSelected:c,withBorder:d,color:p,hoverColor:u,style:h})=>{const m=i();return t($g,{onClick:o,className:c?"selected":"not-selected",$withBorder:d,$color:p,$hoverColor:u,style:h,children:[n&&e("div",{children:e(n,{fill:m.text.info})}),a&&e("div",{children:e("img",{src:a,alt:"",width:16,height:16})}),e(wg,{children:r}),c&&e("div",{children:e(ft,{fill:m.colors.majestic_blue_soft})}),void 0!==s&&e(fl,{label:s,filled:l||c})]})},kg=o.div`
|
|
1562
|
+
display: flex;
|
|
1563
|
+
flex-direction: column;
|
|
1564
|
+
gap: 16px;
|
|
1565
|
+
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
1566
|
+
`,Cg=o.div`
|
|
1567
|
+
display: flex;
|
|
1568
|
+
align-items: center;
|
|
1569
|
+
gap: 16px;
|
|
1570
|
+
`,Eg=o.div`
|
|
1571
|
+
width: 50px;
|
|
1572
|
+
height: 50px;
|
|
1573
|
+
border-radius: 8px;
|
|
1574
|
+
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1575
|
+
background-size: 200% 100%;
|
|
1576
|
+
animation: ${ul} 10s infinite linear;
|
|
1577
|
+
`,Ag=o(In)`
|
|
1578
|
+
flex: 1;
|
|
1579
|
+
gap: 12px;
|
|
1580
|
+
`,Dg=o.div`
|
|
1581
|
+
width: ${({$width:e})=>e};
|
|
1582
|
+
height: 16px;
|
|
1583
|
+
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1584
|
+
background-size: 200% 100%;
|
|
1585
|
+
animation: ${ul} 1.5s infinite linear;
|
|
1586
|
+
border-radius: 4px;
|
|
1587
|
+
`,Tg=({size:r=5,maxWidth:o})=>e(kg,{$maxWidth:o,children:[...Array(r)].map((r,o)=>t(Cg,{children:[e(Eg,{}),t(Ag,{children:[e(Dg,{$width:"80%"}),e(Dg,{$width:"100%"})]})]},o))});var Ig;!function(e){e.Active="active",e.Disabled="disabled",e.Finished="finish"}(Ig||(Ig={}));const Ng=o.div`
|
|
1588
|
+
display: flex;
|
|
1589
|
+
flex-direction: column;
|
|
1590
|
+
gap: 32px;
|
|
1591
|
+
`,Og=o.div`
|
|
1592
|
+
display: flex;
|
|
1593
|
+
gap: 16px;
|
|
1594
|
+
padding: 8px;
|
|
1595
|
+
opacity: ${({$state:e})=>e===Ig.Active?1:e===Ig.Disabled?.5:.8};
|
|
1596
|
+
transition: all 0.3s;
|
|
1597
|
+
`,Rg=o(Tn)`
|
|
1598
|
+
justify-content: center;
|
|
1599
|
+
width: 24px;
|
|
1600
|
+
height: 24px;
|
|
1601
|
+
border-radius: 32px;
|
|
1602
|
+
border: ${({theme:e,$state:t})=>t===Ig.Disabled?`1px dashed ${e.text.dark_grey}`:`1px solid ${e.colors.secondary}`};
|
|
1603
|
+
opacity: ${({$state:e})=>e===Ig.Finished?.8:1};
|
|
1604
|
+
`,_g=o(In)`
|
|
1605
|
+
justify-content: center;
|
|
1606
|
+
gap: 8px;
|
|
1607
|
+
`,Fg=o(Si)``,Pg=o(Si)``,Lg=({data:r,currentStep:o=0})=>{const[n,i]=jt([]);return Wt(()=>{i(r.map((e,t)=>t<o-1?{...e,state:Ig.Finished,subtitle:e.subtitle||Gr.Success}:t===o-1?{...e,state:Ig.Active,subtitle:""}:{...e,state:Ig.Disabled,subtitle:""}))},[o,r]),e(Ng,{children:n.map((r,o)=>t(Og,{$state:r.state,children:[e(Rg,{$state:r.state,children:[Ig.Active,Ig.Disabled].includes(r.state)?e(Si,{size:12,children:r.stepNumber}):r.state===Ig.Finished?e(ft,{size:20}):null}),t(_g,{children:[e(Fg,{family:"secondary",children:r.title}),r.subtitle&&e(Pg,{size:10,weight:300,children:r.subtitle})]})]},o))})},zg=o(Tn)`
|
|
1608
|
+
width: fit-content;
|
|
1609
|
+
gap: 6px;
|
|
1610
|
+
padding: 6px 12px;
|
|
1611
|
+
border-radius: 360px;
|
|
1612
|
+
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
1613
|
+
`,Mg=o(Si)`
|
|
1614
|
+
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
1615
|
+
`,Bg=({type:r=Gr.Info,icon:o,title:n,size:i,family:a,children:s,...l})=>t(zg,{$type:r,children:[o&&e(o,{}),e(Mg,{$type:r,size:i||12,family:a||"secondary",...l,children:s||n})]}),Ug=o.div`
|
|
1616
|
+
display: flex;
|
|
1617
|
+
flex-direction: column;
|
|
1618
|
+
position: relative;
|
|
1619
|
+
width: 100%;
|
|
1620
|
+
`,jg=o.div`
|
|
1621
|
+
width: 100%;
|
|
1622
|
+
display: flex;
|
|
1623
|
+
align-items: center;
|
|
1624
|
+
gap: 12px;
|
|
1625
|
+
transition: border-color 0.3s;
|
|
1626
|
+
border-radius: 24px;
|
|
1627
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1628
|
+
${({$disabled:e})=>e&&n`
|
|
1629
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
1630
|
+
cursor: not-allowed;
|
|
1631
|
+
opacity: 0.6;
|
|
1632
|
+
`}
|
|
1633
|
+
|
|
1634
|
+
${({$hasError:e})=>e&&n`
|
|
1635
|
+
border-color: ${({theme:e})=>e.text.error};
|
|
1636
|
+
`}
|
|
1637
|
+
|
|
1638
|
+
${({$isActive:e})=>e&&n`
|
|
1639
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1640
|
+
`}
|
|
1641
|
+
|
|
1642
|
+
&:hover {
|
|
1643
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1644
|
+
}
|
|
1645
|
+
&:focus-within {
|
|
1646
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1647
|
+
}
|
|
1648
|
+
`,Wg=o.textarea`
|
|
1649
|
+
flex: 1;
|
|
1650
|
+
border: none;
|
|
1651
|
+
outline: none;
|
|
1652
|
+
background: none;
|
|
1653
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1654
|
+
font-size: 14px;
|
|
1655
|
+
padding: 12px 20px 0;
|
|
1656
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1657
|
+
font-weight: 300;
|
|
1658
|
+
line-height: 22px;
|
|
1659
|
+
&::placeholder {
|
|
1660
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1661
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1662
|
+
opacity: 0.4;
|
|
1663
|
+
font-size: 14px;
|
|
1664
|
+
font-weight: 300;
|
|
1665
|
+
line-height: 22px; /* 157.143% */
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
&:disabled {
|
|
1669
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
1670
|
+
cursor: not-allowed;
|
|
1671
|
+
}
|
|
1672
|
+
`,Hg=({errorMessage:r,title:o,tooltip:n,required:i,onChange:a,name:s,...l})=>{const c=Xt(null),d=e=>{c.current&&(c.current.style.height="auto",e&&(c.current.style.height=`${c.current.scrollHeight}px`))};return t(Ug,{children:[e(Ju,{title:o,required:i,tooltip:n}),e(jg,{$disabled:l.disabled,$hasError:!!r,$isActive:!!l.autoFocus,children:e(Wg,{ref:c,"data-id":s,name:s,onFocus:()=>d(!0),onBlur:()=>d(!1),onChange:e=>{e.stopPropagation(),d(!0),a?.(e)},onKeyDown:e=>{e.stopPropagation()},...l})}),!!r&&e(Ei,{children:r})]})},Xg=o.div`
|
|
1673
|
+
display: flex;
|
|
1674
|
+
align-items: center;
|
|
1675
|
+
gap: 12px;
|
|
1676
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1677
|
+
opacity: ${({$disabled:e})=>e?.6:1};
|
|
1678
|
+
`,Gg=o.div`
|
|
1679
|
+
width: 24px;
|
|
1680
|
+
height: 12px;
|
|
1681
|
+
border: 1px ${({$isActive:e,theme:t})=>e?`solid ${t.colors.majestic_blue}`:`dashed ${t.text.grey}`};
|
|
1682
|
+
border-radius: 20px;
|
|
1683
|
+
display: flex;
|
|
1684
|
+
align-items: center;
|
|
1685
|
+
padding: 2px;
|
|
1686
|
+
background-color: transparent;
|
|
1687
|
+
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
1688
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1689
|
+
opacity: ${({$isActive:e})=>e?1:.5};
|
|
1690
|
+
transition: border-color 0.3s, opacity 0.3s;
|
|
1691
|
+
&::before {
|
|
1692
|
+
content: '';
|
|
1693
|
+
width: 12px;
|
|
1694
|
+
height: 12px;
|
|
1695
|
+
border-radius: 50%;
|
|
1696
|
+
background-color: ${({$isActive:e,theme:t})=>e?t.colors.majestic_blue:t.colors.secondary};
|
|
1697
|
+
transform: ${({$isActive:e})=>e?"translateX(12px)":"translateX(0)"};
|
|
1698
|
+
transition: background-color 0.3s, transform 0.3s;
|
|
1699
|
+
}
|
|
1700
|
+
`,Vg=({title:r,tooltip:o,initialValue:n=!1,onChange:i,disabled:a,allowPropagation:s=!1,flipHorizontally:l})=>{const[c,d]=jt(n);Wt(()=>d(n),[n]);return t(Xg,{$disabled:a,onClick:e=>{a||(s||e.stopPropagation(),i?i(!c):d(e=>!e))},children:[!l&&e(Gg,{$disabled:a,$isActive:c}),(r||o)&&e(Cc,{text:o,withIcon:!0,children:r&&e(Si,{size:14,children:r})}),l&&e(Gg,{$disabled:a,$isActive:c})]})};var Kg={v:"5.12.1",fr:60,ip:0,op:80,w:220,h:620,nm:"Odigos - Trace Loader",ddd:0,assets:[{id:"comp_0",nm:"moving lines-5",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-5",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[6.097,.571,0],ix:2,l:2},a:{a:0,k:[-.046,-149.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-.055,-173.88],[.095,546.629]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:2.4,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:18.172,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:36.174,s:[85.889]},{t:51,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:12.174,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:30.174,s:[85.889]},{t:45,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:51,st:-26,ct:1,bm:0}]},{id:"comp_1",nm:"moving lines-4",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.475,.571,0],ix:2,l:2},a:{a:0,k:[.144,-156.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.167,-182.047],[.314,547.797]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:17.9,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:38.055,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:61.053,s:[85.889]},{t:80,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:15.553,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:38.555,s:[85.889]},{t:57.5,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:80,st:-26,ct:1,bm:0}]},{id:"comp_2",nm:"moving lines-3",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.841,.571,0],ix:2,l:2},a:{a:0,k:[.324,-150.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.382,-175.047],[-.051,538.464]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:6,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:23.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:43.525,s:[85.889]},{t:60,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:13.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:33.525,s:[85.889]},{t:50,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:60,st:-26,ct:1,bm:0}]}],layers:[{ddd:0,ind:1,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:-22,op:29,st:-22,ct:1,bm:0},{ddd:0,ind:2,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:56,op:107,st:56,ct:1,bm:0},{ddd:0,ind:3,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:22,op:73,st:22,ct:1,bm:0},{ddd:0,ind:4,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:-65,op:15,st:-65,ct:1,bm:0},{ddd:0,ind:5,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:14,op:94,st:14,ct:1,bm:0},{ddd:0,ind:6,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:2,op:62,st:2,ct:1,bm:0},{ddd:0,ind:7,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:-36,op:20,st:-40,ct:1,bm:0},{ddd:0,ind:8,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:39,op:99,st:39,ct:1,bm:0},{ddd:0,ind:9,ty:4,nm:"Vector :M",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110,309.736,0],ix:2,l:2},a:{a:0,k:[308.5,313.236,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[205.677,618.844],[205.677,4.807]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[411.428,618.822],[411.333,4.99]],c:!1},ix:2},nm:"Path 6",mn:"ADBE Vector Shape - Group",hd:!1},{ind:2,ty:"sh",ix:3,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[308.5,618.796],[308.5,5.145]],c:!1},ix:2},nm:"Path 7",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.975244164467,.975244164467,.975244164467,.639999985695],ix:3},o:{a:0,k:64,ix:4},w:{a:0,k:1,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 7",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:0,op:684,st:0,ct:1,bm:0}],markers:[],props:{}};const qg=o.div`
|
|
1701
|
+
width: ${({$width:e})=>e}px;
|
|
1702
|
+
height: ${({$height:e})=>e}px;
|
|
1703
|
+
position: relative;
|
|
1704
|
+
`,Jg=({width:t=620})=>{const{darkMode:r}=i(),o=t/(620/220);return e(qg,{$width:t,$height:o,children:e(gr,{autoplay:!0,loop:!0,animationData:Kg,style:{width:o,height:t,transform:"rotate(-90deg)",position:"absolute",top:-(o-o/10),left:o-o/10,filter:r?"invert(0)":"invert(1)"}})})},Yg=o.div`
|
|
1705
|
+
display: flex;
|
|
1706
|
+
align-items: center;
|
|
1707
|
+
justify-content: center;
|
|
1708
|
+
gap: 4px;
|
|
1709
|
+
min-width: ${({$minWidth:e})=>e};
|
|
1710
|
+
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
1711
|
+
padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
|
|
1712
|
+
border-radius: 100px;
|
|
1713
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
1714
|
+
`,Qg=({label:r,leftIcon:o,rightIcon:n,tooltip:a,status:s=qr.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:p,backgroundColor:u,minWidth:h="unset",fullWidth:m=!1})=>{const g=i(),f=r?.toString(),x=s?[qr.Disabled].includes(s)?on(g,s,c?"400":"700"):[qr.Unknown].includes(s)?on(g,s,"600"):on(g,s,c?l?"400":"300":l?"700":"500"):g.v2.colors.grey[200],y=p||(c&&![qr.Unknown].includes(s)?x:[qr.Disabled].includes(s)?g.v2.colors.grey[400]:[Gr.Error,Gr.Warning,Gr.Success].includes(s)?g.v2.colors.black[500]:g.v2.colors.white[500]),b=u||(c&&![qr.Unknown].includes(s)?[qr.Disabled].includes(s)?g.v2.colors.grey[700]:g.v2.colors.silver[600]:x);return e(Cc,{text:a,fullWidth:m,children:t(Yg,{$backgroundColor:b,$minWidth:h,$fullWidth:m,$hasLabel:!!f,children:[o&&e(o,{fill:y,size:14}),f&&e(cn,{color:y,size:d||sn.XXS,nowrap:!0,children:f}),n&&e(n,{fill:y,size:14})]})})},Zg=o.span`
|
|
1715
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1716
|
+
font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
|
|
1717
|
+
font-weight: 400;
|
|
1718
|
+
color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
|
|
1719
|
+
`,ef=o.span`
|
|
1720
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1721
|
+
font-size: 14px;
|
|
1722
|
+
font-weight: 400;
|
|
1723
|
+
color: ${({theme:e})=>e.v2.colors.red[500]};
|
|
1724
|
+
`,tf=({label:r,tooltip:o,required:n,badge:i,width:a,smallAndDark:s})=>r||o||n?t(Tn,{$width:a,$justifyContent:"space-between",children:[r&&e(Zg,{$smallAndDark:s,children:r}),t(Tn,{$gap:4,children:[i&&e(Qg,{...i,textSize:sn.XXXS}),n&&e(ef,{children:"*"}),o&&e(Cc,{text:o,withIcon:!0})]})]}):null,rf=({errorMessage:r,warnMessage:o,helpMessage:n})=>{const a=i(),s=r?a.v2.colors.red[500]:o?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(rt,{size:12,fill:s});return r||o||n?t(Tn,{$alignItems:"center",children:[l&&e(In,{children:l}),e(cn,{size:sn.XXS,weight:400,color:s,children:r||o||n})]}):null},of=o.div`
|
|
1725
|
+
padding: ${({$small:e})=>e?"4px":"6px 12px"};
|
|
1726
|
+
|
|
1727
|
+
display: flex;
|
|
1728
|
+
align-self: stretch;
|
|
1729
|
+
align-items: center;
|
|
1730
|
+
gap: 8px;
|
|
1731
|
+
border-radius: 6px;
|
|
1732
|
+
|
|
1733
|
+
border: 1px solid ${({theme:e,$disabled:t,$error:r})=>t?e.v2.colors.grey[600]:r?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
1734
|
+
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
1735
|
+
${({$disabled:e,$error:t})=>!e&&!t&&n`
|
|
1736
|
+
&:hover,
|
|
1737
|
+
&:active,
|
|
1738
|
+
&:focus-within {
|
|
1739
|
+
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
1740
|
+
}
|
|
1741
|
+
`}
|
|
1742
|
+
`,nf=o.input`
|
|
1743
|
+
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
1744
|
+
width: ${({$width:e})=>e||"unset"};
|
|
1745
|
+
|
|
1746
|
+
flex: 1;
|
|
1747
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1748
|
+
font-size: ${({$small:e})=>e?"12px":"14px"};
|
|
1749
|
+
font-weight: 400;
|
|
1750
|
+
|
|
1751
|
+
cursor: text;
|
|
1752
|
+
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
1753
|
+
&::placeholder {
|
|
1754
|
+
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
&:disabled {
|
|
1758
|
+
cursor: not-allowed;
|
|
1759
|
+
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1760
|
+
&::placeholder {
|
|
1761
|
+
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
overflow: hidden;
|
|
1766
|
+
text-overflow: ellipsis;
|
|
1767
|
+
white-space: nowrap;
|
|
1768
|
+
`,af=o.div`
|
|
1769
|
+
display: flex;
|
|
1770
|
+
align-items: center;
|
|
1771
|
+
justify-content: center;
|
|
1772
|
+
cursor: pointer;
|
|
1773
|
+
`,sf=({label:r,required:o,tooltip:n,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:p,helpMessage:u,type:h=Xr.Text,name:m,value:g,onChange:f,disabled:x,maxWidth:y,width:b,small:v=!1,onClick:$,...w})=>{const S=i(),k=h===Xr.Password,[C,E]=jt(!1),[A,D]=jt(null),T=c||!!d||!!A,I=g?S.v2.colors.white[500]:x?S.v2.colors.grey[400]:S.v2.colors.silver[200],N=v?14:18;return t(In,{$width:b,$gap:6,children:[e(tf,{label:r,tooltip:n,required:o,badge:a}),t(of,{$small:v,$disabled:x,$error:T,onClick:$,children:[s?e(s,{size:N,fill:I}):null,e(nf,{"data-id":m,type:C||h===Xr.Number?Xr.Text:h,name:m,value:g,onChange:e=>{e.stopPropagation();const t=e.target.value;h===Xr.Number&&(e.target.value=di(t),t&&t!==e.target.value?D("Please enter a valid number"):D(null)),f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:x,$maxWidth:y,$width:b,$small:v,...w}),k?e(af,{onClick:()=>E(e=>!e),children:e(C?At:Dt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]}),e(rf,{errorMessage:A||d,warnMessage:p,helpMessage:u})]})};var lf,cf;!function(e){e.S="s",e.L="l"}(lf||(lf={})),function(e){e.Filled="filled",e.Underline="underline"}(cf||(cf={}));const df=o.div`
|
|
1774
|
+
display: flex;
|
|
1775
|
+
align-items: center;
|
|
1776
|
+
gap: 2px;
|
|
1777
|
+
padding: 3px;
|
|
1778
|
+
border-radius: 8px;
|
|
1779
|
+
border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
|
|
1780
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1781
|
+
`,pf=o.button`
|
|
1782
|
+
flex: 1;
|
|
1783
|
+
display: flex;
|
|
1784
|
+
align-items: center;
|
|
1785
|
+
justify-content: center;
|
|
1786
|
+
gap: 8px;
|
|
1787
|
+
padding: ${({$size:e})=>e===lf.S?"4px 8px":"8px 16px"};
|
|
1788
|
+
border-radius: 6px;
|
|
1789
|
+
border: none;
|
|
1790
|
+
box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
|
|
1791
|
+
|
|
1792
|
+
${({$disabled:e,$isSelected:t,$selectedBgColor:r,theme:o})=>e?n`
|
|
1793
|
+
cursor: not-allowed;
|
|
1794
|
+
background-color: ${t?(r||o.v2.colors.black[500])+sl["040"]:"transparent"};
|
|
1795
|
+
`:n`
|
|
1796
|
+
cursor: pointer;
|
|
1797
|
+
background-color: ${t?r||o.v2.colors.black[500]:"transparent"};
|
|
1798
|
+
&:hover {
|
|
1799
|
+
background-color: ${t?r||o.v2.colors.black[500]:o.v2.colors.silver[800]};
|
|
1800
|
+
}
|
|
1801
|
+
`}
|
|
1802
|
+
`,uf=o.div`
|
|
1803
|
+
display: flex;
|
|
1804
|
+
align-items: stretch;
|
|
1805
|
+
`,hf=o.button`
|
|
1806
|
+
display: flex;
|
|
1807
|
+
height: 34px;
|
|
1808
|
+
padding: 8px 12px 8px 16px;
|
|
1809
|
+
justify-content: center;
|
|
1810
|
+
align-items: center;
|
|
1811
|
+
gap: 8px;
|
|
1812
|
+
border: none;
|
|
1813
|
+
border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
|
|
1814
|
+
border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
|
|
1815
|
+
background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
|
|
1816
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1817
|
+
transition:
|
|
1818
|
+
border-color 0.2s,
|
|
1819
|
+
background-color 0.2s,
|
|
1820
|
+
border-radius 0.2s;
|
|
1821
|
+
&:hover {
|
|
1822
|
+
border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
|
|
1823
|
+
}
|
|
1824
|
+
`,mf=({"data-id":o,size:n=lf.L,variant:a=cf.Filled,options:s=[],selected:l,setSelected:c,disabled:d})=>{const p=i(),u=a===cf.Underline,h=u?hf:pf;return e(u?uf:df,{"data-id":o,children:s.map(({value:o,label:i,icon:a,tooltip:s,selectedBgColor:m,disabled:g},f)=>{const x=l===o,y=g||d,b=y?p.v2.colors.grey[400]:u||x?p.v2.colors.white[500]:p.v2.colors.grey[300],v=n===lf.S?sn.XXS:sn.XS,$=x?500:400,w=t(r,{children:[a&&e(a,{fill:b}),i&&e(cn,{size:v,weight:$,color:b,nowrap:!0,children:i})]});return e(h,{onClick:()=>!y&&c(o),$disabled:y,$isSelected:x,$size:n,...!u&&{$selectedBgColor:m},children:s?e(Cc,{text:s,withIcon:!0,children:w}):w},`segment-${i||f}-${o}`)})})},gf=o.div`
|
|
1825
|
+
box-sizing: border-box !important;
|
|
1826
|
+
width: ${({$width:e})=>e??"fit-content"};
|
|
1827
|
+
padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
|
|
1828
|
+
display: flex;
|
|
1829
|
+
align-self: stretch;
|
|
1830
|
+
align-items: center;
|
|
1831
|
+
gap: 8px;
|
|
1832
|
+
overflow: hidden;
|
|
1833
|
+
border-radius: 6px;
|
|
1834
|
+
|
|
1835
|
+
border: none;
|
|
1836
|
+
border-radius: 6px;
|
|
1837
|
+
background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:r,$emphasizeBackgroundColor:o,theme:n})=>{const i=r??n.v2.colors.silver[800],a=o??n.v2.colors.silver[700];return e||t?a:i}};
|
|
1838
|
+
`,ff=o.input`
|
|
1839
|
+
min-width: 0;
|
|
1840
|
+
flex: 1;
|
|
1841
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1842
|
+
font-size: 14px;
|
|
1843
|
+
font-weight: 400;
|
|
1844
|
+
line-height: 20px;
|
|
1845
|
+
|
|
1846
|
+
cursor: text;
|
|
1847
|
+
color: ${({$textColor:e})=>e};
|
|
1848
|
+
&::placeholder {
|
|
1849
|
+
color: ${({$textColor:e})=>e};
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
overflow: hidden;
|
|
1853
|
+
text-overflow: ellipsis;
|
|
1854
|
+
white-space: nowrap;
|
|
1855
|
+
`,xf=({"data-id":r,value:o,onChange:n,placeholder:a,width:s,segment:l,idleBackgroundColor:c,emphasizeBackgroundColor:d})=>{const p=i(),[u,h]=jt(!1),[m,g]=jt(!1),[f,x]=jt(!1),y=u?p.v2.colors.white[500]:p.v2.colors.silver[200],b=!!l?.options?.length,v=Ht(()=>{if(b)return l?.options.find(e=>e.value===l.selected)?.label},[b,l?.options,l?.selected]),$=Ht(()=>a||(b&&v?`Search by ${v.toLowerCase()}`:"Search..."),[a,b,v]);return t(gf,{$width:s,$withSegment:b,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),$isHovered:m&&!f,$isActive:u,$idleBackgroundColor:c,$emphasizeBackgroundColor:d,children:[e(Tt,{size:18,fill:y}),e(ff,{"data-id":r??"search",name:"search",type:"text",placeholder:$,value:o,onChange:e=>{e.stopPropagation(),n(e.target.value)},onFocus:()=>h(!0),onBlur:()=>h(!1),$textColor:y}),b&&e("div",{style:{flexShrink:0},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:e(mf,{"data-id":l["data-id"],options:l.options,selected:l.selected,setSelected:l.setSelected,size:lf.S})})]})};var yf,bf;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(yf||(yf={})),function(e){e.S="small",e.M="medium",e.L="large"}(bf||(bf={}));const vf=o.button`
|
|
1856
|
+
display: flex;
|
|
1857
|
+
align-items: center;
|
|
1858
|
+
justify-content: center;
|
|
1859
|
+
gap: 8px;
|
|
1860
|
+
${({$fullWidth:e})=>e&&n`
|
|
1861
|
+
width: 100%;
|
|
1862
|
+
`}
|
|
1863
|
+
border: none;
|
|
1864
|
+
border-radius: 6px;
|
|
1865
|
+
${({$size:e,$hasLabel:t})=>e===bf.S?n`
|
|
1866
|
+
height: 32px;
|
|
1867
|
+
${t?n`
|
|
1868
|
+
padding: 8px 16px;
|
|
1869
|
+
`:n`
|
|
1870
|
+
width: 32px;
|
|
1871
|
+
`}
|
|
1872
|
+
`:e===bf.M?n`
|
|
1873
|
+
height: 38px;
|
|
1874
|
+
${t?n`
|
|
1875
|
+
padding: 8px 18px;
|
|
1876
|
+
`:n`
|
|
1877
|
+
width: 38px;
|
|
1878
|
+
`}
|
|
1879
|
+
`:n`
|
|
1880
|
+
height: 44px;
|
|
1881
|
+
${t?n`
|
|
1882
|
+
padding: 8px 22px;
|
|
1883
|
+
`:n`
|
|
1884
|
+
width: 44px;
|
|
1885
|
+
`}
|
|
1886
|
+
`}
|
|
1887
|
+
|
|
1888
|
+
cursor: pointer;
|
|
1889
|
+
&:disabled {
|
|
1890
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1891
|
+
cursor: not-allowed;
|
|
1892
|
+
}
|
|
1893
|
+
&:enabled {
|
|
1894
|
+
${({$withShadow:e})=>e?n`
|
|
1895
|
+
box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
|
|
1896
|
+
`:""}
|
|
1897
|
+
${({$variant:e})=>e===yf.Primary?n`
|
|
1898
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[500]};
|
|
1899
|
+
&:hover {
|
|
1900
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[600]};
|
|
1901
|
+
}
|
|
1902
|
+
&:active {
|
|
1903
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[700]};
|
|
1904
|
+
}
|
|
1905
|
+
`:e===yf.Secondary?n`
|
|
1906
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
1907
|
+
&:hover {
|
|
1908
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1909
|
+
}
|
|
1910
|
+
&:active {
|
|
1911
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1912
|
+
}
|
|
1913
|
+
`:e===yf.Text?n`
|
|
1914
|
+
background-color: transparent;
|
|
1915
|
+
&:hover {
|
|
1916
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1917
|
+
}
|
|
1918
|
+
&:active {
|
|
1919
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1920
|
+
}
|
|
1921
|
+
`:""}
|
|
1922
|
+
}
|
|
1923
|
+
`,$f=qt(({"data-id":o,label:n,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=yf.Primary,size:p=bf.M,iconSize:u,loading:h,fullWidth:m,withShadow:g,textColor:f,disabled:x,onClick:y,...b},v)=>{const $=i(),w=u||(p===bf.L?18:16),S=p===bf.L?sn.S:sn.XS,k=f||(x?$.v2.colors.grey[400]:$.v2.colors.white[500]),[C,E]=jt(!1),A=Gt(async e=>{e.stopPropagation(),E(!0),await(y?.(e)),E(!1)},[y]);return e(vf,{ref:v,"data-id":o,$variant:d,$size:p,$fullWidth:m,$withShadow:g,$hasLabel:!!n,disabled:x,onClick:h||C?void 0:A,...b,children:e(Cc,{text:a,withIcon:!s,children:h||C?n?e(rg,{size:$.v2.text.size[S],textColor:k}):e(pd,{}):t(r,{children:[l&&e(l,{size:w,fill:k}),n?e(cn,{size:S,weight:500,color:k,nowrap:!0,children:n}):null,c&&e(c,{size:w,fill:k})]})})})});$f.displayName=$f.name;const wf=o.div`
|
|
1924
|
+
display: flex;
|
|
1925
|
+
align-items: center;
|
|
1926
|
+
justify-content: center;
|
|
1927
|
+
width: fit-content;
|
|
1928
|
+
height: fit-content;
|
|
1929
|
+
padding: 8px;
|
|
1930
|
+
border-radius: 100%;
|
|
1931
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1932
|
+
`,Sf=({icon:r=yt,hideIcon:o=!1,title:n="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(In,{$gap:12,$alignItems:"center",children:[!o&&e(wf,{children:e(r,{size:32,fill:l})}),t(In,{$gap:4,$alignItems:"center",children:[e(cn,{size:sn.S,align:"center",children:n}),a&&e(cn,{size:sn.XXS,align:"center",color:l,children:a})]}),s&&e($f,{variant:yf.Secondary,...s})]})};var kf;!function(e){e.S="small",e.L="large"}(kf||(kf={}));const Cf=o.div`
|
|
1933
|
+
width: fit-content;
|
|
1934
|
+
display: flex;
|
|
1935
|
+
align-items: center;
|
|
1936
|
+
gap: 8px;
|
|
1937
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1938
|
+
`,Ef=o.div`
|
|
1939
|
+
width: ${({$size:e})=>e===kf.S?"16px":"20px"};
|
|
1940
|
+
height: ${({$size:e})=>e===kf.S?"16px":"20px"};
|
|
1941
|
+
display: flex;
|
|
1942
|
+
align-items: center;
|
|
1943
|
+
justify-content: center;
|
|
1944
|
+
border-radius: 4px;
|
|
1945
|
+
border: 1px solid ${({$borderColor:e})=>e};
|
|
1946
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
1947
|
+
`,Af=({name:r,label:o,tooltip:n,badge:a,size:s=kf.L,disabled:l,partiallyChecked:c,value:d,onChange:p,errorMessage:u,warnMessage:h,helpMessage:m})=>{const g=i(),[f,x]=jt(!1),y=c||d,b=s===kf.S?12:16,v=l?g.v2.colors.grey[400]:g.v2.colors.white[500],$=y?"transparent":l?g.v2.colors.grey[700]:f?g.v2.colors.silver[400]:g.v2.colors.silver[600],w=l?g.v2.colors.grey[600]:y?g.v2.colors.purple[500]:g.v2.colors.silver[900];return t(In,{$gap:4,children:[t(Tn,{$justifyContent:"space-between",children:[t(Cf,{"data-id":r||"checkbox"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),l||p(!!c||!d)},$disabled:l,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[e(Ef,{$size:s,$borderColor:$,$backgroundColor:w,children:c?e(bt,{size:b,fill:v}):d?e(ft,{size:b,fill:v}):null}),o&&e(cn,{size:s===kf.S?sn.XXS:sn.XS,nowrap:!0,children:o})]}),e(tf,{tooltip:n,badge:a})]}),e(rf,{errorMessage:u,warnMessage:h,helpMessage:m})]})},Df=o.div`
|
|
1948
|
+
display: flex;
|
|
1949
|
+
flex-direction: ${({$direction:e})=>e===Fr.Horizontal?"row":"column"};
|
|
1950
|
+
gap: ${({$direction:e})=>e===Fr.Horizontal?16:8}px;
|
|
1951
|
+
`,Tf=({direction:r=Fr.Vertical,title:o,size:n,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=n===kf.S?sn.XXS:sn.XS,p=Ht(()=>s.every(e=>l[e.id]),[s,l]),u=Ht(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(r=>{const o={...r};return e?o[e]=t:s.forEach(e=>o[e.id]=t),o})};return t(Df,{$direction:r,children:[o&&a?e(Af,{label:o,partiallyChecked:u,value:p,onChange:e=>h("",e),size:n}):o&&!a?e(cn,{size:d,children:o}):null,s.map(t=>e(Af,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:n},`${o}-checkbox-${t.id}`))]})};var If,Nf;!function(e){e.Left="left",e.Right="right"}(If||(If={})),function(e){e.Top="top",e.Bottom="bottom"}(Nf||(Nf={}));const Of=o.div`
|
|
1952
|
+
position: relative;
|
|
1953
|
+
display: flex;
|
|
1954
|
+
flex-direction: column;
|
|
1955
|
+
gap: 4px;
|
|
1956
|
+
`,Rf=o.div`
|
|
1957
|
+
position: fixed;
|
|
1958
|
+
${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
|
|
1959
|
+
${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
|
|
1960
|
+
${({$coords:e})=>null!=e.left?`left: ${e.left}px;`:""}
|
|
1961
|
+
${({$coords:e})=>null!=e.right?`right: ${e.right}px;`:""}
|
|
1962
|
+
${({$coords:e})=>null!=e.width?`width: ${e.width-16}px;`:""}
|
|
1963
|
+
z-index: 1100;
|
|
1964
|
+
|
|
1965
|
+
display: flex;
|
|
1966
|
+
flex-direction: column;
|
|
1967
|
+
gap: 0;
|
|
1968
|
+
|
|
1969
|
+
min-width: 120px;
|
|
1970
|
+
padding: 8px;
|
|
1971
|
+
border-radius: 6px;
|
|
1972
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1973
|
+
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
|
|
1974
|
+
`,_f=o.div`
|
|
1975
|
+
display: flex;
|
|
1976
|
+
flex-direction: column;
|
|
1977
|
+
gap: 0;
|
|
1978
|
+
|
|
1979
|
+
width: 100%;
|
|
1980
|
+
max-height: ${({$maxHeight:e})=>e||"230px"};
|
|
1981
|
+
overflow-y: auto;
|
|
1982
|
+
`,Ff=o.div`
|
|
1983
|
+
display: flex;
|
|
1984
|
+
align-items: center;
|
|
1985
|
+
gap: 8px;
|
|
1986
|
+
width: calc(100% - 16px);
|
|
1987
|
+
padding: 8px;
|
|
1988
|
+
border-radius: 6px;
|
|
1989
|
+
cursor: pointer;
|
|
1990
|
+
${({$selected:e})=>e?n`
|
|
1991
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1992
|
+
`:n`
|
|
1993
|
+
background-color: transparent;
|
|
1994
|
+
&:hover {
|
|
1995
|
+
background-color: ${({theme:e})=>e.v2.colors.grey[700]};
|
|
1996
|
+
}
|
|
1997
|
+
`}
|
|
1998
|
+
`,Pf=({defaultOpen:r,open:o,onOpenChange:n,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:p,withMultiSelect:u,withSearch:h,fullWidth:m,maxHeight:g,buttonProps:f,iconButtonProps:x,isLoading:y,emptyMessage:b,children:v})=>{const $=i(),w=void 0!==o,S=!!f||!!x||!!v,[k,C]=jt(r??!S),E=w?o:k,A=Gt(e=>{w||C(e),n?.(e)},[w,n]),[D,T]=jt({x:a||If.Left,y:s||Nf.Bottom}),I=Xt(null),N=Xt(null),[O,R]=jt({}),_=Gt((e,t)=>{const r=I.current?.getBoundingClientRect();if(!r)return;const o=S?8:0;R({top:t===Nf.Bottom?S?r.bottom+o:r.top:void 0,bottom:t===Nf.Top?S?window.innerHeight-r.top+o:window.innerHeight-r.bottom:void 0,left:e===If.Left?r.left:void 0,right:e===If.Right?window.innerWidth-r.right:void 0,width:m?r.width:void 0})},[S,m]),F=e=>{const t=!E;if(A(t),!t)return;const r={x:a||(e.clientX>window.innerWidth/2?If.Right:If.Left),y:s||(e.clientY>window.innerHeight/2?Nf.Top:Nf.Bottom)};T(r),_(r.x,r.y)};Yt(()=>{E&&_(D.x,D.y)},[E,D.x,D.y,_]),Wt(()=>{if(!E)return;const e=e=>{const t=e.target;I.current?.contains(t)||N.current?.contains(t)||A(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[E,A]),Wt(()=>{if(!E)return;const e=()=>A(!1),t=()=>A(!1);return document.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[E,A]);const P=e=>{d(u?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),S&&!u&&A(!1)},[L,z]=jt(""),M=Ht(()=>L?l.filter(e=>e?.label?.toLowerCase().includes(L.toLowerCase())):l,[l.length,L]);return t(Of,{ref:I,children:[p&&e(tf,{label:p}),f&&e($f,{...f,fullWidth:m,rightIcon:E?_t:Ft,onClick:F}),x&&e(Il,{...x,onClick:F}),"function"==typeof v?v({ChevronIcon:E?_t:Ft,handleClick:F}):v,E&&pr(t(Rf,{ref:N,$coords:O,children:[h&&e(xf,{value:L,onChange:z,width:"100%"}),y?e(Un,{withSpinner:!0,title:"Loading...",titleSize:sn.XS}):0===M.length&&b?e(Sf,{subTitle:b}):e(_f,{$maxHeight:g,children:M.map(r=>{if(!r)return null;const{id:o,label:n,icon:i,withCheckbox:a}=r,s=c.includes(o);return t(Ff,{"data-id":`option-${o}`,$selected:s&&!a,onClick:()=>P(o),children:[a&&e(Af,{value:s,onChange:()=>P(o)}),i&&e(i,{size:14,fill:r.color||$.v2.colors.white[500]}),e(cn,{size:sn.XS,nowrap:!0,color:r.color||$.v2.colors.white[500],children:n})]},o)})}),u&&e($f,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},Lf=t=>{const{"data-id":r,options:o,placeholder:n="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=jt(""),[c,d]=jt(!1),p=Ht(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),u=Ht(()=>{if(a){const e=p.length;return e?1===e?o.find(e=>e.id===p[0])?.label??"":`${e} selected`:""}return t.value?o.find(e=>e.id===t.value)?.label??"":""},[a,t,o,p]),h=c?s:u,m=Ht(()=>{const e=a?o.map(e=>({...e,withCheckbox:!0})):o;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[a,o,s]),g=Gt(()=>{l(""),d(!0)},[]),f=Gt(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),x=Gt(e=>{d(e),e||l("")},[]),y=Gt(e=>{if(a)return void t.onSelect(e);const r=o.find(t=>t.id===e[0]);r&&(t.onSelect(r),l(""),d(!1))},[a,t,o]),b=c&&(i||m.length>0||s.length>0);return e(Pf,{open:b,onOpenChange:x,items:m,selectedIds:p,setSelectedIds:y,withMultiSelect:a,isLoading:i,emptyMessage:"No results found",fullWidth:!0,alignY:Nf.Bottom,children:e(sf,{name:r,leftIcon:Tt,placeholder:n,value:h,onChange:f,onFocus:g})})},zf=o.button`
|
|
1999
|
+
width: 100%;
|
|
2000
|
+
padding: 0;
|
|
2001
|
+
padding-right: 12px;
|
|
2002
|
+
display: flex;
|
|
2003
|
+
align-items: center;
|
|
2004
|
+
justify-content: flex-start;
|
|
2005
|
+
gap: 12px;
|
|
2006
|
+
border-radius: 8px;
|
|
2007
|
+
border: none;
|
|
2008
|
+
${({$hovered:e})=>e?n`
|
|
2009
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2010
|
+
`:n`
|
|
2011
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2012
|
+
`}
|
|
2013
|
+
overflow: hidden;
|
|
2014
|
+
cursor: pointer;
|
|
2015
|
+
&:disabled {
|
|
2016
|
+
cursor: not-allowed;
|
|
2017
|
+
opacity: 0.5;
|
|
2018
|
+
}
|
|
2019
|
+
`,Mf=o.div`
|
|
2020
|
+
width: ${({$hasIcon:e})=>e?"56px":"0"};
|
|
2021
|
+
height: 56px;
|
|
2022
|
+
display: flex;
|
|
2023
|
+
align-items: center;
|
|
2024
|
+
justify-content: center;
|
|
2025
|
+
${({$hovered:e})=>e?n`
|
|
2026
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2027
|
+
`:n`
|
|
2028
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
2029
|
+
`}
|
|
2030
|
+
`,Bf=o.div`
|
|
2031
|
+
width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
|
|
2032
|
+
display: flex;
|
|
2033
|
+
justify-content: space-between;
|
|
2034
|
+
align-items: center;
|
|
2035
|
+
gap: 8px;
|
|
2036
|
+
`,Uf=({label:r,icon:o,loading:n,disabled:i,onClick:a})=>{const[s,l]=jt(!1);return t(zf,{$hovered:s,type:"button",disabled:i||n,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(Mf,{$hovered:s,$hasIcon:!!o,children:o&&e(o,{size:36})}),t(Bf,{$hasIcon:!!o,children:[n?e(rg,{size:16}):e(cn,{variant:an.Span,align:"center",children:r}),e(Pt,{rotate:90,size:24})]})]})},jf=({buttons:t})=>e(In,{$gap:12,children:t.map(t=>e(Uf,{...t},t.label))});var Wf;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Wf||(Wf={}));const Hf=({onAnyClick:t,actions:r})=>e(Tn,{$gap:8,$alignItems:"center",children:r?.map(r=>{if(!r)return null;switch(r.type){case Wf.Button:return e($f,{...r.buttonProps,onClick:e=>{r.buttonProps?.onClick?.(e),t?.()}},r.id);case Wf.ButtonDropData:return e(Pf,{...r.dropDataProps,items:r.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{r.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:r.buttonProps},r.id);default:return null}})}),Xf=o.div`
|
|
2037
|
+
display: flex;
|
|
2038
|
+
align-items: center;
|
|
2039
|
+
justify-content: center;
|
|
2040
|
+
padding: 8px;
|
|
2041
|
+
border-radius: 8px;
|
|
2042
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
2043
|
+
`,Gf=({icon:r,title:o,subTitle:n,withCopy:a,badge:s,children:l})=>{const c=i(),{CopyButton:d}=Nl();return t(Tn,{$gap:n?8:6,$alignItems:"center",children:[r&&(n?e(Xf,{children:e(r,{size:24})}):e(r,{size:24})),o||s||n?t(In,{children:[o||s?t(Tn,{$gap:6,$alignItems:"center",children:[o&&e(cn,{nowrap:!0,children:o}),a&&o&&e(d,{value:o,size:Dl.XS}),s&&e(Qg,{...s})]}):null,n&&e(cn,{size:sn.XXS,color:c.v2.colors.silver[200],nowrap:!0,children:n})]}):null,l]})},Vf=o.div`
|
|
2044
|
+
display: flex;
|
|
2045
|
+
flex-direction: column;
|
|
2046
|
+
gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
2047
|
+
width: ${({$moreSpacing:e})=>e?"calc(100% - 32px)":"calc(100% - 24px)"};
|
|
2048
|
+
align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
|
|
2049
|
+
padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
2050
|
+
border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
|
|
2051
|
+
background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
|
|
2052
|
+
`,Kf=o.div`
|
|
2053
|
+
display: flex;
|
|
2054
|
+
align-items: center;
|
|
2055
|
+
flex-wrap: wrap;
|
|
2056
|
+
width: 100%;
|
|
2057
|
+
`,qf=o.div`
|
|
2058
|
+
width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
|
|
2059
|
+
margin: 8px;
|
|
2060
|
+
display: flex;
|
|
2061
|
+
flex-direction: column;
|
|
2062
|
+
gap: 4px;
|
|
2063
|
+
`,Jf=({bgTint:r="900",fullHeight:o=!1,moreSpacing:n=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,actions:c=[],cellsPerRow:d,items:p,children:u})=>{const h=i(),{CopyButton:m}=Nl(),[g,f]=jt(l||!1),x=!s||s&&g;return t(Vf,{$bgTint:r,$fullHeight:o,$moreSpacing:n,children:[(a||s)&&t(Tn,{$gap:16,$justifyContent:"space-between",children:[a?e(Gf,{...a}):e("div",{}),t(Tn,{children:[x&&e(Hf,{actions:c}),s&&e(Tn,{$gap:8,$alignItems:"center",children:e($f,{variant:yf.Text,size:bf.S,leftIcon:g?_t:Ft,onClick:()=>f(e=>!e)})})]})]}),x&&p?e(Kf,{children:p.map(({id:r,title:o,label:n,withCopy:i,badge:a})=>t(qf,{$cellsPerRow:d||p.length,children:[e(cn,{size:sn.XXXS,color:h.v2.colors.silver[200],nowrap:!0,children:o}),t(Tn,{$gap:4,children:[a&&e(Qg,{...a}),n&&e(cn,{size:sn.XS,nowrap:!0,children:n}),i&&e(m,{value:n||a?.label?.toString()||"",size:Dl.XS})]})]},r))}):null,x&&u]})};var Yf;!function(e){e.S="small",e.M="medium"}(Yf||(Yf={}));const Qf=o.div`
|
|
2064
|
+
display: flex;
|
|
2065
|
+
flex-direction: column;
|
|
2066
|
+
gap: ${({$gap:e})=>e}px;
|
|
2067
|
+
width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
|
|
2068
|
+
align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
|
|
2069
|
+
padding: ${({$padding:e})=>e}px;
|
|
2070
|
+
border-radius: 16px;
|
|
2071
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2072
|
+
`,Zf=qt(({id:r,size:o=Yf.M,fullHeight:n=!1,richTitle:i,search:a,actions:s,children:l},c)=>{const d=o===Yf.S?4:16,p=o===Yf.S?12:16;return t(Qf,{ref:c,id:r,"data-section-name":r,$padding:p,$gap:d,$fullHeight:n,children:[a||i||s?t(Tn,{$gap:d,$justifyContent:"space-between",children:[a||i?e(Gf,{...i,children:a&&e(xf,{...a})}):null,e(Hf,{actions:s??[]})]}):null,l]})});Zf.displayName="SectionCard";const ex=o.div`
|
|
2073
|
+
flex: 1;
|
|
2074
|
+
align-self: stretch;
|
|
2075
|
+
display: flex;
|
|
2076
|
+
align-items: center;
|
|
2077
|
+
gap: 8px;
|
|
2078
|
+
padding: 16px;
|
|
2079
|
+
border-radius: 12px;
|
|
2080
|
+
background-color: ${({theme:e,$status:t})=>on(e,t,t===qr.Unknown?"750":"500")};
|
|
2081
|
+
`,tx=o.div`
|
|
2082
|
+
display: flex;
|
|
2083
|
+
align-items: center;
|
|
2084
|
+
justify-content: center;
|
|
2085
|
+
width: fit-content;
|
|
2086
|
+
height: fit-content;
|
|
2087
|
+
padding: 8px;
|
|
2088
|
+
border-radius: 12px;
|
|
2089
|
+
background-color: ${({theme:e,$status:t})=>t===qr.Unknown?on(e,t,"800"):on(e,t,"900")+sl["015"]};
|
|
2090
|
+
`,rx=({status:r,icon:o,title:n,description:a})=>{const s=i(),l=o??jn(r,s),c=[Gr.Default,Gr.Info,qr.Disabled,qr.Unknown].includes(r)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(ex,{$status:r,children:[e(tx,{$status:r,children:e(l,{size:32,fill:c})}),t(In,{$gap:2,$justifyContent:"center",children:[e(cn,{size:sn.M,weight:500,color:c,nowrap:!0,children:n}),e(cn,{size:sn.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},ox=o.div`
|
|
2091
|
+
flex: 0.5;
|
|
2092
|
+
display: flex;
|
|
2093
|
+
flex-direction: column;
|
|
2094
|
+
gap: 12px;
|
|
2095
|
+
padding: 12px;
|
|
2096
|
+
border-radius: 12px;
|
|
2097
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2098
|
+
`,nx=["-","N/A","undefined","null","undefined/undefined","null/null"],ix=({title:r,cells:o})=>{const n=i();return t(ox,{children:[e(cn,{size:sn.XXS,color:n.v2.colors.grey[150],children:r}),e(Tn,{$gap:32,children:o.map(o=>t(In,{$gap:2,children:[!o.isLoading||o.value&&!nx.includes(o.value)?e(cn,{size:o.label?sn.M:sn.L,children:o.value}):e(pd,{scale:.9}),o.label&&e(cn,{size:sn.XXS,children:o.label})]},`${r}-${o.label}-${o.value}`))})]})};var ax;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(ax||(ax={}));const sx=o.div`
|
|
2099
|
+
display: flex;
|
|
2100
|
+
align-items: flex-end;
|
|
2101
|
+
justify-content: space-between;
|
|
2102
|
+
gap: 24px;
|
|
2103
|
+
width: fit-content;
|
|
2104
|
+
`,lx=o.div`
|
|
2105
|
+
position: relative;
|
|
2106
|
+
display: flex;
|
|
2107
|
+
flex-direction: column;
|
|
2108
|
+
align-items: center;
|
|
2109
|
+
width: ${({$width:e})=>e??150}px;
|
|
2110
|
+
flex-shrink: 0;
|
|
2111
|
+
`,cx=o.svg`
|
|
2112
|
+
display: block;
|
|
2113
|
+
width: 100%;
|
|
2114
|
+
height: auto;
|
|
2115
|
+
overflow: visible;
|
|
2116
|
+
`,dx=o(In)`
|
|
2117
|
+
position: absolute;
|
|
2118
|
+
left: 0;
|
|
2119
|
+
right: 0;
|
|
2120
|
+
bottom: 4px;
|
|
2121
|
+
align-items: center;
|
|
2122
|
+
gap: 2px;
|
|
2123
|
+
pointer-events: none;
|
|
2124
|
+
`,px=o.span`
|
|
2125
|
+
display: inline-block;
|
|
2126
|
+
flex-shrink: 0;
|
|
2127
|
+
width: 9px;
|
|
2128
|
+
height: 9px;
|
|
2129
|
+
border-radius: 50%;
|
|
2130
|
+
background-color: ${({$color:e})=>e};
|
|
2131
|
+
`,ux=e=>{if(null==e||""===e)return{number:0,prefix:"",suffix:""};if("number"==typeof e)return{number:e,prefix:"",suffix:""};const t=e.match(/^(\D*)(-?\d*\.?\d+)(.*)$/);return t?{number:parseFloat(t[2]),prefix:t[1]??"",suffix:(t[3]??"").trim()}:{number:0,prefix:"",suffix:""}},hx=10,mx=(e,t,r,o)=>{const n=o*Math.PI/180;return{x:e+r*Math.cos(n),y:t-r*Math.sin(n)}},gx=(e,t,r,o,n)=>{const i=mx(e,t,r,o),a=mx(e,t,r,n),s=o>n?1:0,l=Math.abs(o-n)>180?1:0;return`M ${i.x} ${i.y} A ${r} ${r} 0 ${l} ${s} ${a.x} ${a.y}`},fx=({variant:r=ax.CurrentOfMax,gaugeWidth:o,title:n,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:p,secondaryColor:u})=>{const{number:h}=ux(a),{number:m}=ux(s),{number:g,prefix:f,suffix:x}=ux(l),y=i(),b=((e,t,r)=>Math.min(Math.max(e,t),r))((g-h)/Math.max(m-h,1),0,1),v=180-180*b,$=b>0?gx(60,60,55,180,v):null,w=b<1?gx(60,60,55,v,0):null,S=mx(60,60,55,180),k=mx(60,60,55,0),C=d??(r===ax.GoodAgainstBad?y.v2.colors.green[500]:y.v2.colors.purple[400]),E=u??(r===ax.GoodAgainstBad?y.v2.colors.red[500]:y.v2.colors.silver[500]),[A,D]=jt(null),T=e=>`${f}${e}${x}`,I=r===ax.GoodAgainstBad?Math.max(m-g,0):m,N="primary"===A?c:"secondary"===A?p:"",O="primary"===A?T(g):"secondary"===A?T(I):"",R=()=>D("primary"),_=()=>D("secondary"),F=()=>D(null);return t(sx,{children:[t(lx,{$width:o,children:[e(Cc,{keepAlive:!0,fullWidth:!0,title:N,text:O,children:t(cx,{viewBox:"0 0 120 65",role:"img","aria-label":`${n}: ${g} of ${m}`,children:[$&&e("path",{d:$,fill:"none",stroke:C,strokeWidth:hx,strokeLinecap:1===b?"round":"butt",onMouseEnter:R,onMouseLeave:F}),w&&e("path",{d:w,fill:"none",stroke:E,strokeWidth:hx,strokeLinecap:0===b?"round":"butt",onMouseEnter:_,onMouseLeave:F}),b>0&&e("circle",{cx:S.x,cy:S.y,r:5,fill:C,onMouseEnter:R,onMouseLeave:F}),b<1&&e("circle",{cx:k.x,cy:k.y,r:5,fill:E,onMouseEnter:_,onMouseLeave:F})]})}),n&&t(dx,{children:[e(cn,{size:sn.XXXS,color:y.v2.colors.grey[150],align:"center",children:n}),e(cn,{size:sn.L,weight:500,align:"center",children:`${f}${g}${x}`})]})]}),t(In,{$gap:7,children:[t(Tn,{$gap:8,$alignItems:"center",children:[e(px,{$color:C}),e(cn,{size:sn.XXXS,color:y.v2.colors.grey[150],nowrap:!0,children:c})]}),t(Tn,{$gap:8,$alignItems:"center",children:[e(px,{$color:E}),e(cn,{size:sn.XXXS,color:y.v2.colors.grey[150],nowrap:!0,children:p})]})]})]})},xx=o(Tn)`
|
|
2132
|
+
width: calc(100% - 20px);
|
|
2133
|
+
padding: 10px;
|
|
2134
|
+
border-radius: 6px;
|
|
2135
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2136
|
+
display: flex;
|
|
2137
|
+
align-items: center;
|
|
2138
|
+
justify-content: space-between;
|
|
2139
|
+
gap: 12px;
|
|
2140
|
+
`,yx=o.div`
|
|
2141
|
+
position: relative;
|
|
2142
|
+
width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
|
|
2143
|
+
display: flex;
|
|
2144
|
+
align-items: center;
|
|
2145
|
+
gap: 4px;
|
|
2146
|
+
`,bx=o.pre`
|
|
2147
|
+
flex: 1;
|
|
2148
|
+
margin: 0;
|
|
2149
|
+
padding: 0;
|
|
2150
|
+
font-size: 14px;
|
|
2151
|
+
color: #5ffb98; // TODO: add to theme
|
|
2152
|
+
overflow-x: auto;
|
|
2153
|
+
`,vx=o.span`
|
|
2154
|
+
flex-shrink: 0;
|
|
2155
|
+
font-size: 14px;
|
|
2156
|
+
color: #5ffb98; // TODO: add to theme
|
|
2157
|
+
`,$x=({value:r,hideCopy:o=!1,onDone:n})=>{const{CopyButton:i}=Nl({onDone:n}),a=Xt(null),[s,l]=jt(!1);return Wt(()=>{const e=()=>{if(a.current){const{scrollWidth:e,clientWidth:t}=a.current;l(e>t)}};e();const t=new ResizeObserver(e);return a.current&&t.observe(a.current),()=>{t.disconnect()}},[r]),t(xx,{children:[t(yx,{$hideCopy:o,children:[e(bx,{ref:a,children:r}),s&&e(vx,{children:"..."})]}),!o&&e(i,{value:r,size:Dl.XS})]})},wx=o.div`
|
|
2158
|
+
display: flex;
|
|
2159
|
+
align-items: center;
|
|
2160
|
+
gap: 8px;
|
|
2161
|
+
padding: 16px;
|
|
2162
|
+
border-radius: ${({$isExtended:e})=>e?"12px 12px 0 0":"12px"};
|
|
2163
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
2164
|
+
|
|
2165
|
+
${({$withHover:e,$hoverBackgroundColor:t})=>e&&n`
|
|
2166
|
+
cursor: pointer;
|
|
2167
|
+
transition: background 0.2s;
|
|
2168
|
+
&:hover {
|
|
2169
|
+
background-color: ${t};
|
|
2170
|
+
}
|
|
2171
|
+
`}
|
|
2172
|
+
`,Sx=o.div`
|
|
2173
|
+
display: flex;
|
|
2174
|
+
align-items: center;
|
|
2175
|
+
justify-content: center;
|
|
2176
|
+
flex-shrink: 0;
|
|
2177
|
+
width: 42px;
|
|
2178
|
+
height: 42px;
|
|
2179
|
+
border-radius: 11px;
|
|
2180
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
2181
|
+
`,kx=o(In)`
|
|
2182
|
+
flex: 1;
|
|
2183
|
+
min-width: 0;
|
|
2184
|
+
`,Cx=o.div`
|
|
2185
|
+
display: flex;
|
|
2186
|
+
align-items: center;
|
|
2187
|
+
justify-content: center;
|
|
2188
|
+
flex-shrink: 0;
|
|
2189
|
+
width: 24px;
|
|
2190
|
+
height: 24px;
|
|
2191
|
+
`,Ex=({status:r,title:o,subTitle:n,badgeLabel:a,loading:s,isExtended:l=!1,toggleExtended:c,invertColors:d=!1})=>{const p=i(),u=jn(r,p),h=c?l?_t:Ft:void 0,m=r===qr.Unknown,g=r===qr.Disabled,f=[Gr.Error,Gr.Warning,Gr.Success].includes(r),x=on(p,r,g?d?"400":"700":m?"600":d?"300":"500"),y=g?p.v2.colors.grey[400]:d?p.v2.colors.white[500]:f?p.v2.colors.black[500]:p.v2.colors.white[500],b=d&&!m?x:y,v=d&&!m?g?p.v2.colors.grey[700]:l?p.v2.colors.silver[500]:p.v2.colors.silver[600]:"rgba(21, 22, 24, 0.1)",$=d||m?l?p.v2.colors.silver[700]:p.v2.colors.silver[800]:g?l?p.v2.colors.grey[800]:p.v2.colors.grey[900]:on(p,r,l?"400":"500"),w=d||m?l?p.v2.colors.silver[600]:p.v2.colors.silver[700]:g?l?p.v2.colors.grey[700]:p.v2.colors.grey[800]:on(p,r,l?"700":"800");return t(wx,{$withHover:!!c,$isExtended:l,$backgroundColor:$,$hoverBackgroundColor:w,onClick:c,children:[e(Sx,{$backgroundColor:v,children:s?e(pd,{scale:1.2}):e(u,{size:32,fill:b})}),t(kx,{$gap:4,$justifyContent:"center",children:[t(Tn,{$gap:10,$alignItems:"center",children:[e(cn,{size:sn.S,weight:500,color:y,children:o}),a&&e(Qg,{label:a,backgroundColor:p.v2.colors.silver[600],textColor:p.v2.colors.white[500],textSize:sn.XXXS})]}),n&&e(cn,{size:sn.XXXS,color:y,children:n})]}),h&&e(Cx,{children:e(h,{size:24,fill:y})})]})},Ax=o.div`
|
|
2192
|
+
display: flex;
|
|
2193
|
+
flex-direction: column;
|
|
2194
|
+
width: 100%;
|
|
2195
|
+
border-radius: 12px;
|
|
2196
|
+
overflow: hidden;
|
|
2197
|
+
`,Dx=o.div`
|
|
2198
|
+
display: flex;
|
|
2199
|
+
flex-direction: column;
|
|
2200
|
+
gap: 8px;
|
|
2201
|
+
padding: 8px 12px 16px 12px;
|
|
2202
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
2203
|
+
`,Tx=o.div`
|
|
2204
|
+
display: flex;
|
|
2205
|
+
align-items: center;
|
|
2206
|
+
gap: 8px;
|
|
2207
|
+
`,Ix=o.div`
|
|
2208
|
+
display: flex;
|
|
2209
|
+
align-items: center;
|
|
2210
|
+
justify-content: center;
|
|
2211
|
+
flex-shrink: 0;
|
|
2212
|
+
width: 18px;
|
|
2213
|
+
height: 18px;
|
|
2214
|
+
`,Nx=({conditions:r,title:o,subTitle:n})=>{const a=i(),[s,l]=jt(!1),c=Gt(()=>l(e=>!e),[]),d=Ht(()=>ai(r),[r]),{errors:p,hasErrors:u,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Ht(()=>Fo(d),[d]);Wt(()=>{l(u||m||g)},[u,m,g]);const x=Ht(()=>(!d.length||f)&&!u&&!m&&!g,[d.length,f,u,m,g]),y=Ht(()=>u?Gr.Error:m?Gr.Warning:g?Gr.Info:Gr.Success,[u,m,g]),b=Ht(()=>o||(1===d.length?ii(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:r,loading:o})=>{const n="Something isn't right";return e?"Something Failed":t||r?n:o?"Loading...":"Everything Successful"})({hasErrors:u,hasWarnings:m,hasDisableds:g,loading:x}),[o,d,u,m,g,x]),v=Ht(()=>n||1===d.length&&d[0].message||void 0,[n,d]),$=Ht(()=>`${u?p.length:m?h.length:d.length}/${d.length}`,[u,p.length,m,h.length,d.length]);return t(Ax,{children:[e(Ex,{status:y,invertColors:!0,title:b,subTitle:v,badgeLabel:$,loading:x,isExtended:s,toggleExtended:c}),s&&e(Dx,{children:d.map(({status:r,type:o,reason:n,message:i},s)=>{const l=r===Kr.Loading,c=r===Kr.Disabled?Gr.Info:r,d=l?null:jn(c,a),p=r===Gr.Error?on(a,Gr.Error,"500"):r===Gr.Warning?on(a,Gr.Warning,"500"):a.v2.colors.white[500],u=[o,i||n].filter(Boolean).join(" - ");return t(Tx,{children:[e(Ix,{children:l||!d?e(Un,{withSpinnerOld:!0}):e(d,{size:18})}),e(cn,{size:sn.XXXS,color:p,lineHeight:"16px",children:u})]},`condition-${s}`)})})]})};var Ox,Rx,_x;!function(e){e.Default="default",e.SuccessError="successError"}(Ox||(Ox={})),function(e){e.S="small",e.L="large"}(Rx||(Rx={})),function(e){e.Left="left",e.Right="right"}(_x||(_x={}));const Fx=o.div`
|
|
2215
|
+
display: flex;
|
|
2216
|
+
align-items: center;
|
|
2217
|
+
gap: ${({$gap:e})=>e}px;
|
|
2218
|
+
`,Px=o.div`
|
|
2219
|
+
position: relative;
|
|
2220
|
+
display: flex;
|
|
2221
|
+
align-items: center;
|
|
2222
|
+
justify-content: space-between;
|
|
2223
|
+
|
|
2224
|
+
width: ${({$size:e})=>2*e+2}px;
|
|
2225
|
+
height: ${({$size:e})=>e}px;
|
|
2226
|
+
padding: ${4}px;
|
|
2227
|
+
border-radius: ${({$size:e})=>2*e}px;
|
|
2228
|
+
background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:r,$variant:o,$value:n,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&n)return t;if(r&&!n)return r;switch(o){case Ox.SuccessError:return n?i.v2.colors.green[500]:i.v2.colors.red[500];case Ox.Default:default:return n?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
|
|
2229
|
+
|
|
2230
|
+
border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
|
|
2231
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2232
|
+
`,Lx=o.div`
|
|
2233
|
+
position: absolute;
|
|
2234
|
+
top: 50%;
|
|
2235
|
+
left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
|
|
2236
|
+
transform: translateY(-50%);
|
|
2237
|
+
width: ${({$size:e})=>e}px;
|
|
2238
|
+
height: ${({$size:e})=>e}px;
|
|
2239
|
+
border-radius: 100%;
|
|
2240
|
+
background-color: ${({$color:e})=>e};
|
|
2241
|
+
box-shadow: ${({$disabled:e})=>e?"0 0 40px 0 rgba(0, 0, 0, 0.07)":"0 0 10px 0 rgba(0, 0, 0, 0.50)"};
|
|
2242
|
+
`,zx=({variant:o=Ox.Default,size:n=Rx.L,name:a,label:s,labelAlign:l=_x.Right,labelColor:c,tooltip:d,badge:p,value:u,onChange:h,disabled:m,withIcon:g,onIcon:f=ft,offIcon:x=yt,onBgColor:y,offBgColor:b,errorMessage:v,warnMessage:$,helpMessage:w})=>{const S=i(),k=m?S.v2.colors.grey[400]:S.v2.colors.white[500],C=n===Rx.S?10:16,E=c||S.v2.colors.silver[200],A=n===Rx.S?sn.XXXS:sn.XS,D=n===Rx.S?8:12;return t(In,{$gap:4,children:[t(Tn,{$justifyContent:"space-between",children:[t(Fx,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":u?"true":"false",$gap:D,children:[s&&l===_x.Left&&e(cn,{color:E,size:A,nowrap:!0,children:s}),t(Px,{$onBgColor:y,$offBgColor:b,$variant:o,$size:C,$value:u,$disabled:m,onClick:e=>{e.stopPropagation(),m||h(!u)},children:[e(Lx,{$color:k,$size:C,$value:u,$disabled:m}),g&&t(r,{children:[e(f,{size:C,fill:k}),e(x,{size:C,fill:k})]})]}),s&&l===_x.Right&&e(cn,{color:E,size:A,nowrap:!0,children:s})]}),e(tf,{tooltip:d,badge:p})]}),e(rf,{errorMessage:v,warnMessage:$,helpMessage:w})]})},Mx=o.div`
|
|
2243
|
+
display: flex;
|
|
2244
|
+
flex-direction: ${({$direction:e})=>e===Fr.Horizontal?"row":"column"};
|
|
2245
|
+
gap: ${({$direction:e})=>e===Fr.Horizontal?16:8}px;
|
|
2246
|
+
`,Bx=({direction:r=Fr.Vertical,title:o,size:n,disabled:i,options:a,values:s,setValues:l})=>{const c=n===Rx.S?sn.XS:sn.S;return t(Mx,{$direction:r,children:[o&&e(cn,{size:c,children:o}),a.map(t=>e(zx,{...t,labelAlign:_x.Right,value:s[t.id],onChange:e=>{return r=t.id,o=e,void l(e=>{const t={...e};return r?t[r]=o:a.forEach(e=>t[e.id]=o),t});var r,o},disabled:i,size:n},`${o}-toggle-${t.id}`))]})},Ux=o.div`
|
|
2247
|
+
display: flex;
|
|
2248
|
+
align-items: center;
|
|
2249
|
+
justify-content: space-between;
|
|
2250
|
+
width: 100%;
|
|
2251
|
+
overflow: hidden;
|
|
2252
|
+
`,jx=o.div`
|
|
2253
|
+
display: flex;
|
|
2254
|
+
align-items: center;
|
|
2255
|
+
gap: 16px;
|
|
2256
|
+
padding: 6px 0;
|
|
2257
|
+
min-width: 0;
|
|
2258
|
+
flex: 1;
|
|
2259
|
+
overflow: hidden;
|
|
2260
|
+
`,Wx=o.div`
|
|
2261
|
+
display: flex;
|
|
2262
|
+
align-items: center;
|
|
2263
|
+
justify-content: center;
|
|
2264
|
+
flex: 0 0 36px;
|
|
2265
|
+
width: 36px;
|
|
2266
|
+
height: 36px;
|
|
2267
|
+
border-radius: 8px;
|
|
2268
|
+
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2269
|
+
`,Hx=o.img`
|
|
2270
|
+
width: 24px;
|
|
2271
|
+
height: 24px;
|
|
2272
|
+
`,Xx=o.div`
|
|
2273
|
+
display: flex;
|
|
2274
|
+
align-items: center;
|
|
2275
|
+
gap: 16px;
|
|
2276
|
+
flex-shrink: 0;
|
|
2277
|
+
`,Gx=({icon:r,iconSrc:o,title:n,subTitle:i,toggleProps:a,actions:s,onClose:l,onCloseDisabled:c})=>t(Ux,{children:[t(jx,{children:[r?e(Wx,{children:e(r,{size:24})}):o?e(Wx,{children:e(Hx,{src:o,alt:n||"icon"})}):null,(n||i)&&t(In,{$gap:6,children:[n&&e(cn,{size:sn.S,weight:500,children:n}),i&&e(cn,{size:sn.XXS,children:i})]})]}),t(Xx,{children:[a&&e(zx,{...a}),s?.length?e(Pf,{iconButtonProps:{"data-id":"drawer-actions",icon:Lt},items:s,selectedIds:s?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>s?.find(t=>t?.id===e[0])?.onClick?.()}):null,l&&e(Il,{"data-id":"drawer-close",icon:yt,size:Dl.M,onClick:l,disabled:c})]})]}),Vx=o.div`
|
|
2278
|
+
display: flex;
|
|
2279
|
+
align-items: center;
|
|
2280
|
+
gap: 10px;
|
|
2281
|
+
${({$fullWidth:e})=>e&&n`
|
|
2282
|
+
width: calc(100% - 16px);
|
|
2283
|
+
`}
|
|
2284
|
+
padding: 4px 12px 4px 4px;
|
|
2285
|
+
border-radius: 8px;
|
|
2286
|
+
background-color: ${({theme:e,$status:t})=>on(e,t,[Gr.Info].includes(t)?"1000":"900")};
|
|
2287
|
+
`,Kx=o.div`
|
|
2288
|
+
width: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
2289
|
+
height: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
2290
|
+
display: flex;
|
|
2291
|
+
align-items: center;
|
|
2292
|
+
justify-content: center;
|
|
2293
|
+
border-radius: 6px;
|
|
2294
|
+
background-color: ${({theme:e,$status:t})=>on(e,t,[Gr.Info].includes(t)?"900":"800")};
|
|
2295
|
+
`,qx=o.div`
|
|
2296
|
+
margin-left: auto;
|
|
2297
|
+
margin-right: 8px;
|
|
2298
|
+
cursor: pointer;
|
|
2299
|
+
&:hover {
|
|
2300
|
+
transform: scale(1.2);
|
|
2301
|
+
}
|
|
2302
|
+
`,Jx=({status:r,message:o,action:n,fullWidth:a,smallIcon:s})=>{const l=i(),c=jn(r,l),d=on(l,r,r===Gr.Default?"300":r===Gr.Info?"400":"500");return t(Vx,{$status:r,$fullWidth:a,children:[e("div",{children:e(Kx,{$status:r,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(cn,{color:d,size:sn.XXXS,weight:400,children:o}),n&&e(qx,{"data-id":n["data-id"],onClick:n.onClick,children:e(cn,{color:d,size:sn.XXS,weight:500,underline:!0,children:n.label})})]})},Yx=o.div`
|
|
2303
|
+
display: flex;
|
|
2304
|
+
align-items: center;
|
|
2305
|
+
gap: 8px;
|
|
2306
|
+
padding: 4px 12px;
|
|
2307
|
+
`,Qx=o.div`
|
|
2308
|
+
flex: 1;
|
|
2309
|
+
`,Zx=o.div`
|
|
2310
|
+
width: 150px;
|
|
2311
|
+
`,ey=({note:r,actions:o,children:n})=>n?e(Yx,{children:n}):t(Yx,{children:[r&&e(Jx,{...r}),e(Qx,{}),o?.map((t,r)=>e(Zx,{children:e($f,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${r}`))]}),ty=o.div`
|
|
2312
|
+
position: fixed;
|
|
2313
|
+
top: 0;
|
|
2314
|
+
bottom: 0;
|
|
2315
|
+
${({$position:e})=>e}: 0;
|
|
2316
|
+
z-index: 1000;
|
|
2317
|
+
|
|
2318
|
+
display: flex;
|
|
2319
|
+
flex-direction: column;
|
|
2320
|
+
gap: 12px;
|
|
2321
|
+
|
|
2322
|
+
width: calc(${({$width:e})=>e} - 32px);
|
|
2323
|
+
padding: 12px;
|
|
2324
|
+
border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
|
|
2325
|
+
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2326
|
+
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
2327
|
+
overflow: hidden;
|
|
2328
|
+
|
|
2329
|
+
${({$disableAnimation:e,$position:t})=>!e&&n`
|
|
2330
|
+
animation-name: ${cl.in[t]};
|
|
2331
|
+
`}
|
|
2332
|
+
`,ry=o.div`
|
|
2333
|
+
display: flex;
|
|
2334
|
+
flex-direction: column;
|
|
2335
|
+
gap: 12px;
|
|
2336
|
+
|
|
2337
|
+
height: calc(100% - ${56}px);
|
|
2338
|
+
overflow-y: auto;
|
|
2339
|
+
`,oy=({isOpen:o,hideOverlay:n=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(kl(o),o?pr(t(r,{children:[!n&&e(Rn,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(ty,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(Gx,{...l}),e(ry,{children:d}),c&&e(ey,{...c})]})]}),document.body):null),ny=({options:t,values:r,setValues:o,withMultiSelect:n,withSearch:i,...a})=>{const s=Ht(()=>r?.length?`Selected: ${t.filter(e=>r.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[t,r]);return e(Pf,{withMultiSelect:n,withSearch:i,alignX:If.Left,items:t,selectedIds:r,setSelectedIds:o,children:({ChevronIcon:t,handleClick:r})=>e(sf,{placeholder:"Select options...",...a,rightIcon:t,value:s,onChange:()=>{},onClick:r})})},iy=o.header`
|
|
2340
|
+
position: relative;
|
|
2341
|
+
width: calc(100% - 36px);
|
|
2342
|
+
padding: 12px 18px;
|
|
2343
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2344
|
+
display: flex;
|
|
2345
|
+
align-items: center;
|
|
2346
|
+
justify-content: space-between;
|
|
2347
|
+
`,ay=o(Tn)`
|
|
2348
|
+
position: absolute;
|
|
2349
|
+
left: 50%;
|
|
2350
|
+
transform: translateX(-50%);
|
|
2351
|
+
gap: 16px;
|
|
2352
|
+
`,sy=({left:r=[],center:o=[],right:n=[]})=>t(iy,{children:[e(Tn,{$gap:16,children:r}),e(ay,{children:o}),e(Tn,{$gap:16,children:n})]}),ly=o.div`
|
|
2353
|
+
display: flex;
|
|
2354
|
+
align-items: center;
|
|
2355
|
+
gap: 2px;
|
|
2356
|
+
width: fit-content;
|
|
2357
|
+
padding: 4px;
|
|
2358
|
+
border-radius: 8px;
|
|
2359
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2360
|
+
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
|
|
2361
|
+
|
|
2362
|
+
position: absolute;
|
|
2363
|
+
right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
|
|
2364
|
+
left: ${({$left:e})=>e||"unset"};
|
|
2365
|
+
top: 50%;
|
|
2366
|
+
transform: translateY(-50%);
|
|
2367
|
+
`,cy=({isOpen:t,actions:r,positionRight:o,positionLeft:n})=>t?e(ly,{$right:o,$left:n,children:r.map(t=>{if(!t)return null;const{tooltip:r,...o}=t;return e(Cc,{text:r||"",children:e($f,{...o,variant:yf.Secondary,size:bf.S})},o.id)})}):null,dy=({values:r,setValues:o,name:n,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:p,helpMessage:u,placeholder:h,disabled:m})=>{const g=i(),f=r.length<=1,x=m,y=m||f&&x,b=r.length?r:[""];return t(In,{"data-id":n,$gap:6,children:[e(tf,{label:a,tooltip:s,required:c,badge:l}),e(In,{$gap:8,children:b.map((n,i)=>{const a=i===b.length-1;return t(Tn,{$gap:8,$alignItems:"center",children:[e(sf,{width:"100%",autoFocus:Qn(n)&&!f&&a,value:n,onChange:e=>((e,t)=>{const n=[...r||[]];n[t]=e,o(n)})(e.target.value,i),disabled:m,placeholder:h,hasError:!!d}),a&&e($f,{leftIcon:St,variant:yf.Secondary,size:bf.S,disabled:x,onClick:()=>(()=>{const e=[...r||[]];e.push(""),o(e)})()}),e($f,{leftIcon:y?It:()=>e(It,{fill:g.v2.colors.red[500]}),variant:yf.Secondary,size:bf.S,disabled:y,onClick:()=>(e=>{const t=[...r||[]].filter((t,r)=>r!==e);t.length||t.push(""),o(t)})(i)})]},`input-list-${i}`)})}),e(rf,{errorMessage:d,warnMessage:p,helpMessage:u})]})},py=({col:t,colIdx:r,row:o,rowIdx:n,rowsLength:i,handleChange:a,errorMessage:s,disabled:l})=>{const{keyName:c,componentType:d,inputType:p,label:u,placeholder:h,options:m,renderCondition:g}=t,f=o[c];if(g&&!g(o))return null;switch(d){case Hr.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===d,r=Array.isArray(f)?f:null!=f&&""!==f?[String(f)]:[],o=m?.filter(e=>r.includes(e.id)).map(e=>e.id)||[];return e(ny,{name:c,label:h?u:void 0,placeholder:h||u,options:m||[],withMultiSelect:t,withSearch:t,values:o,setValues:e=>a(c,t?e:e[0]??"",n),disabled:l,hasError:!!s},c)}default:const t=i>1&&0===n&&0===r&&Qn(f);return e(sf,{name:c,label:h?u:void 0,placeholder:h||u,autoFocus:t,type:p,value:f,onChange:({target:{value:e}})=>a(c,e,n),disabled:l,hasError:!!s})}},uy=o.table`
|
|
2368
|
+
width: 100%;
|
|
2369
|
+
border-collapse: separate;
|
|
2370
|
+
border-spacing: 0 8px;
|
|
2371
|
+
`,hy=o.td`
|
|
2372
|
+
padding: 0 8px 0 0;
|
|
2373
|
+
`,my=o.td`
|
|
2374
|
+
width: 72px;
|
|
2375
|
+
padding-bottom: 2px;
|
|
2376
|
+
vertical-align: bottom;
|
|
2377
|
+
`,gy=({columns:r,values:o,setValues:n,name:a,label:s,tooltip:l,badge:c,required:d,disabled:p,errorMessage:u,warnMessage:h,helpMessage:m,limitFieldsPerRow:g})=>{const f=i(),x=Ht(()=>{const e={};return r.forEach(({keyName:t})=>e[t]=""),e},[r]),y=(e,t,r)=>{const i=o.length?$r(o):[$r(x)];i[r][e]=t,n(i)},b=Ht(()=>{if(g){const e=[];for(let t=0;;t+=g){const o=r.slice(t,t+g);if(!o.length)break;e.push(o)}return e}return[r]},[g,r]),v=o.length?o:[x];return t(In,{"data-id":a,$gap:0,children:[e(tf,{label:s,tooltip:l,required:d,badge:c}),e(uy,{children:e("tbody",{children:v.map((r,i)=>{const a=i===v.length-1;return t(Ut,{children:[g&&i>0?e("tr",{children:e(hy,{colSpan:b.length})}):null,b.map((s,l)=>t("tr",{children:[s.map((t,o)=>t.renderCondition&&!t.renderCondition(r)?null:e(hy,{children:e(py,{col:t,colIdx:o,row:r,rowIdx:i,rowsLength:v.length,handleChange:y,disabled:p,errorMessage:u})},`input-table-row-${i}-col-${l}-${o}`)),0===l&&e(my,{children:t(Tn,{$gap:8,$justifyContent:"flex-end",children:[a&&e($f,{leftIcon:St,variant:yf.Secondary,size:bf.S,disabled:p,onClick:()=>(()=>{const e=$r(o);e.push($r(x)),n(e)})()}),e($f,{leftIcon:p?It:()=>e(It,{fill:f.v2.colors.red[500]}),variant:yf.Secondary,size:bf.S,disabled:p,onClick:()=>(e=>{const t=o.filter((t,r)=>r!==e);t.length||t.push($r(x)),n(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`))]},`input-table-row-${i}`)})})}),e(rf,{errorMessage:u,warnMessage:h,helpMessage:m})]})},fy=o.div`
|
|
2378
|
+
display: flex;
|
|
2379
|
+
align-items: center;
|
|
2380
|
+
justify-content: space-between;
|
|
2381
|
+
gap: 32px;
|
|
2382
|
+
|
|
2383
|
+
padding: 18px 16px;
|
|
2384
|
+
border-radius: 18px;
|
|
2385
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]+sl["095"]};
|
|
2386
|
+
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
2387
|
+
|
|
2388
|
+
position: fixed;
|
|
2389
|
+
bottom: 0;
|
|
2390
|
+
left: 50%;
|
|
2391
|
+
z-index: 1;
|
|
2392
|
+
animation-name: ${cl.in.center};
|
|
2393
|
+
`,xy=({isOpen:r,onClose:o,richTitle:n,actions:i})=>r?t(fy,{children:[e(Gf,{...n}),e(Hf,{onAnyClick:o,actions:i})]}):null,yy=o.div`
|
|
2394
|
+
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
2395
|
+
top: 50%;
|
|
2396
|
+
left: 50%;
|
|
2397
|
+
transform: translate(-50%, -50%);
|
|
2398
|
+
z-index: 1000;
|
|
2399
|
+
width: fit-content;
|
|
2400
|
+
border-radius: 20px;
|
|
2401
|
+
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2402
|
+
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
2403
|
+
overflow: hidden;
|
|
2404
|
+
|
|
2405
|
+
animation-name: ${cl.in.center};
|
|
2406
|
+
`,by=o.div`
|
|
2407
|
+
position: relative;
|
|
2408
|
+
`,vy=o.div`
|
|
2409
|
+
position: absolute;
|
|
2410
|
+
top: 16px;
|
|
2411
|
+
left: 16px;
|
|
2412
|
+
`,$y=({isOpen:o,hideOverlay:n=!1,relativeToParent:i=!1,onBack:a,onClose:s,children:l})=>{if(kl(o),!o)return null;const c=t(r,{children:[!n&&e(Rn,{$relativeToParent:i,onClick:s}),e(yy,{"data-id":"modal",$relativeToParent:i,children:t(by,{children:[a&&e(vy,{children:e(Il,{icon:t=>e(Pt,{rotate:-90,...t}),size:Dl.L,onClick:a})}),l]})})]});return i?c:pr(c,document.body)},wy=o.div`
|
|
2413
|
+
position: relative;
|
|
2414
|
+
width: ${64}px;
|
|
2415
|
+
height: ${({$height:e})=>e};
|
|
2416
|
+
flex-shrink: 0;
|
|
2417
|
+
`,Sy=o.aside`
|
|
2418
|
+
position: absolute;
|
|
2419
|
+
top: 0;
|
|
2420
|
+
left: 0;
|
|
2421
|
+
bottom: 0;
|
|
2422
|
+
display: flex;
|
|
2423
|
+
flex-direction: column;
|
|
2424
|
+
gap: 8px;
|
|
2425
|
+
width: ${({$expanded:e})=>e?"220px":"64px"};
|
|
2426
|
+
padding: 16px ${12}px;
|
|
2427
|
+
box-sizing: border-box;
|
|
2428
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2429
|
+
overflow-x: hidden;
|
|
2430
|
+
overflow-y: auto;
|
|
2431
|
+
z-index: 10;
|
|
2432
|
+
transition:
|
|
2433
|
+
width 200ms ease,
|
|
2434
|
+
padding 200ms ease;
|
|
2435
|
+
`,ky=o.button`
|
|
2436
|
+
display: flex;
|
|
2437
|
+
align-items: center;
|
|
2438
|
+
width: 100%;
|
|
2439
|
+
min-width: 0;
|
|
2440
|
+
height: ${40}px;
|
|
2441
|
+
padding: 0;
|
|
2442
|
+
margin: 0;
|
|
2443
|
+
border: none;
|
|
2444
|
+
border-radius: 6px;
|
|
2445
|
+
box-sizing: border-box;
|
|
2446
|
+
cursor: pointer;
|
|
2447
|
+
font: inherit;
|
|
2448
|
+
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
|
|
2449
|
+
&:hover {
|
|
2450
|
+
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
|
|
2451
|
+
}
|
|
2452
|
+
&:active {
|
|
2453
|
+
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
|
|
2454
|
+
}
|
|
2455
|
+
`,Cy=o.div`
|
|
2456
|
+
width: ${40}px;
|
|
2457
|
+
height: ${40}px;
|
|
2458
|
+
display: flex;
|
|
2459
|
+
align-items: center;
|
|
2460
|
+
justify-content: center;
|
|
2461
|
+
flex-shrink: 0;
|
|
2462
|
+
`,Ey=o.div`
|
|
2463
|
+
flex: 1 1 0;
|
|
2464
|
+
min-width: 0;
|
|
2465
|
+
overflow: hidden;
|
|
2466
|
+
padding-right: 12px;
|
|
2467
|
+
pointer-events: none;
|
|
2468
|
+
`,Ay=({height:r,icons:o})=>{const n=i(),[a,s]=jt(!1);return e(wy,{$height:r,children:e(Sy,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:o.map(({id:r,label:o,selected:i,icon:s,onClick:l})=>t(ky,{$selected:i,onClick:l,"aria-label":o,title:a?void 0:o,children:[e(Cy,{children:e(s,{size:24,fill:n.v2.colors.white[500]})}),a&&e(Ey,{children:e(cn,{size:sn.S,weight:500,color:n.v2.colors.white[500],nowrap:!0,children:o})})]},r))})})};var Dy;!function(e){e.S="small",e.L="large"}(Dy||(Dy={}));const Ty=o.div`
|
|
2469
|
+
width: fit-content;
|
|
2470
|
+
display: flex;
|
|
2471
|
+
align-items: center;
|
|
2472
|
+
gap: 8px;
|
|
2473
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2474
|
+
`,Iy=o.div`
|
|
2475
|
+
width: ${({$size:e})=>e===Dy.S?"16px":"20px"};
|
|
2476
|
+
height: ${({$size:e})=>e===Dy.S?"16px":"20px"};
|
|
2477
|
+
display: flex;
|
|
2478
|
+
align-items: center;
|
|
2479
|
+
justify-content: center;
|
|
2480
|
+
border-radius: 100%;
|
|
2481
|
+
border: 1px solid ${({$borderColor:e})=>e};
|
|
2482
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
2483
|
+
`,Ny=({"data-id":r,label:o,value:n,onChange:a,disabled:s,size:l=Dy.L})=>{const c=i(),[d,p]=jt(!1),u=n,h=l===Dy.S?6:8,m=s?c.v2.colors.grey[400]:c.v2.colors.white[500],g=u?"transparent":s?c.v2.colors.grey[700]:d?c.v2.colors.silver[400]:c.v2.colors.silver[600],f=s?c.v2.colors.grey[600]:u?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(Ty,{"data-id":r??"radio"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),s||a(!n)},$disabled:s,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e(Iy,{$size:l,$borderColor:g,$backgroundColor:f,children:n?e(zt,{size:h,fill:m}):null}),o&&e(cn,{size:l===Dy.S?sn.XXS:sn.XS,children:o})]})},Oy=o.div`
|
|
2484
|
+
display: flex;
|
|
2485
|
+
flex-direction: ${({$flexDirection:e})=>e};
|
|
2486
|
+
gap: ${({$gap:e})=>e}px;
|
|
2487
|
+
`,Ry=({label:r,direction:o,disabled:n,size:i,options:a,values:s,setValues:l})=>t(Oy,{$flexDirection:o===Fr.Horizontal?"row":"column",$gap:o===Fr.Horizontal?16:8,children:[r&&e(cn,{children:r}),a.map(t=>e(Ny,{...t,value:s[t.id],onChange:e=>{return r=t.id,o=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[r]=o,t});var r,o},disabled:n,size:i},`${r}-radio-${t.id}`))]}),_y=({currentStep:r,data:o,gap:n=12})=>e(In,{$gap:n,children:o.map(o=>{const n=o.step<r,i=o.step===r;return t(Tn,{$gap:8,children:[n||o.forceDoneBadge?e(Qg,{status:Gr.Success,label:"",leftIcon:ft}):e(Qg,{status:Gr.Default,label:o.step.toString()}),e(cn,{size:i?sn.M:sn.XS,weight:i?500:400,opacity:i?1:.7,children:o.label})]},`stepper-item-${o.step}`)})});var Fy;!function(e){e.Data="data",e.Pretty="pretty"}(Fy||(Fy={}));const Py=o.div`
|
|
2488
|
+
height: ${({$maxHeight:e})=>e};
|
|
2489
|
+
width: 100%;
|
|
2490
|
+
display: flex;
|
|
2491
|
+
flex-direction: column;
|
|
2492
|
+
overflow: hidden;
|
|
2493
|
+
`,Ly=o.div`
|
|
2494
|
+
width: 100%;
|
|
2495
|
+
flex: 1;
|
|
2496
|
+
display: flex;
|
|
2497
|
+
flex-direction: column;
|
|
2498
|
+
`,zy=o.div`
|
|
2499
|
+
flex-shrink: 0;
|
|
2500
|
+
position: relative;
|
|
2501
|
+
z-index: 2;
|
|
2502
|
+
`,My=o.div`
|
|
2503
|
+
position: relative;
|
|
2504
|
+
display: flex;
|
|
2505
|
+
width: 100%;
|
|
2506
|
+
`,By=o.div`
|
|
2507
|
+
position: relative;
|
|
2508
|
+
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2509
|
+
flex: ${({$flex:e})=>e??1};
|
|
2510
|
+
padding: 18px 24px;
|
|
2511
|
+
border: none;
|
|
2512
|
+
border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
|
|
2513
|
+
box-sizing: border-box;
|
|
2514
|
+
|
|
2515
|
+
${({$variant:e,$backgroundColor:t})=>{if(t)return n`
|
|
2516
|
+
background-color: ${t};
|
|
2517
|
+
`;switch(e){case Fy.Data:return n`
|
|
2518
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2519
|
+
`;case Fy.Pretty:return n`
|
|
2520
|
+
background-color: transparent;
|
|
2521
|
+
`;default:return""}}}
|
|
2522
|
+
`,Uy=o.div`
|
|
2523
|
+
position: absolute;
|
|
2524
|
+
top: 50%;
|
|
2525
|
+
right: 0;
|
|
2526
|
+
transform: translateY(-50%);
|
|
2527
|
+
width: 1px;
|
|
2528
|
+
height: 18px;
|
|
2529
|
+
background: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2530
|
+
`,jy=o.div`
|
|
2531
|
+
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2532
|
+
flex: ${({$flex:e})=>e??1};
|
|
2533
|
+
overflow: hidden;
|
|
2534
|
+
display: flex;
|
|
2535
|
+
align-items: center;
|
|
2536
|
+
|
|
2537
|
+
padding: 18px 24px;
|
|
2538
|
+
cursor: ${({$withClick:e})=>e?"pointer":"default"};
|
|
2539
|
+
box-sizing: border-box;
|
|
2540
|
+
|
|
2541
|
+
${({$variant:e,$selected:t,$hovered:r,$isLastRow:o,$isFirstCell:i,$isLastCell:a})=>{switch(e){case Fy.Data:return n`
|
|
2542
|
+
border-bottom: ${({theme:e})=>o?"none":`1px solid ${e.v2.colors.silver[500]}`};
|
|
2543
|
+
border-radius: ${o?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
|
|
2544
|
+
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
2545
|
+
`;case Fy.Pretty:return n`
|
|
2546
|
+
border: none;
|
|
2547
|
+
border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
|
|
2548
|
+
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
2549
|
+
`;default:return""}}}
|
|
2550
|
+
`,Wy=o.div`
|
|
2551
|
+
width: 100%;
|
|
2552
|
+
display: flex;
|
|
2553
|
+
align-items: center;
|
|
2554
|
+
justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
|
|
2555
|
+
gap: 4px;
|
|
2556
|
+
text-align: ${({$textAlign:e})=>e||"left"};
|
|
2557
|
+
`,Hy=({variant:r,columns:o,rows:n,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=jt(null),p=Ht(()=>n.map((p,u)=>{const{cells:h,onClick:m,isSelected:g=!1,onSelect:f,onDeselect:x,hideCheckbox:y}=p,b=c===u,v=i(p),$=(e,t)=>({$isLastRow:u===n.length-1,$isFirstCell:e,$isLastCell:t,$selected:g,$withClick:!!m,onClick:()=>m?.(),$hovered:!!m&&b,onMouseEnter:()=>d(u),onMouseLeave:()=>d(null)});return t(My,{children:[l&&e(jy,{$variant:r,style:{flex:"0 0 68px"},...$(!0,!1),children:!y&&e(Af,{value:g,onChange:()=>g?x?.():f?.()})},"checkbox-column"),o.map(({key:n,withTooltip:i,textAlign:c,flex:d,minWidth:p},m)=>{const g=h.find(e=>e.key===n),f=0===m&&!l,x=m===o.length-1,y=v.length&&(a&&x||s&&f||!a&&!s&&x),w=e(Tn,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:g?.component?e(g.component,{}):e(cn,{size:sn.XS,children:g?.rawValue||"-"})});return t(jy,{$variant:r,$flex:d,$minWidth:p,...$(f,x),children:[i?e(Cc,{text:g?.rawValue?.toString()||"",ellipsis:!0,children:w}):w,y?e(cy,{isOpen:b,actions:v,positionRight:a,positionLeft:s}):null]},`row-${u}-cell-${m}`)})]},`row-${u}`)}),[n,c,i,a,s,l,o]);return e(dg,{gap:r===Fy.Pretty?8:0,elements:p})},Xy=({columnKey:t,sortDirection:r,sortByKey:o,onSort:n})=>{const a=i(),s=o===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=r===Pr.Ascending?0:180;return e(Il,{icon:t=>e(Pt,{fill:s,rotate:l,...t}),onClick:()=>n(t)})},Gy=({columnKey:t,filters:r,onFilter:o,rowsUnfiltered:n,filterOverride:a})=>{const s=i(),l=r[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=Ht(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(n.map(e=>e.cells.find(e=>e.key===t)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[n,t,a]);return e(Pf,{items:c,withMultiSelect:!0,selectedIds:r[t]?.map(e=>e.toString())??[],setSelectedIds:e=>o(t,e),defaultOpen:!1,iconButtonProps:{icon:t=>e(Mt,{fill:l,...t})}})},Vy=({variant:r,backgroundColor:o,columns:n,rowsUnfiltered:i,sortDirection:a,sortByKey:s,onSort:l,filters:c,onFilter:d,withCheckboxes:p,partiallySelected:u,allSelected:h,onSelectAll:m})=>t(My,{children:[p&&e(By,{$variant:r,$backgroundColor:o,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(Af,{partiallyChecked:u&&!h,value:h||!1,onChange:m})},"checkbox-column"),n.map(({key:u,label:h,withTooltip:m,tooltip:g,noSort:f,noFilter:x,filterOverride:y,flex:b,minWidth:v,textAlign:$},w)=>{const S=0===w&&!p,k=w===n.length-1,C=e(cn,{size:sn.XS,align:$,children:h});return t(By,{$variant:r,$backgroundColor:o,$flex:b,$minWidth:v,$isFirst:S,$isLast:k,children:[t(Wy,{$textAlign:$,children:[g||m?e(Cc,{text:g||h,children:C}):C,!f&&e(Xy,{columnKey:u,sortDirection:a,sortByKey:s,onSort:l}),!x&&e(Gy,{columnKey:u,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:y})]}),!k&&r===Fy.Data&&e(Uy,{})]},`column-${u}`)})]}),Ky=({variant:r,maxHeight:o="256px",headerBackgroundColor:n,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h})=>{const[m,g]=jt(Pr.Ascending),[f,x]=jt(""),[y,b]=jt({}),v=Gt(e=>{x(e),g(e=>e===Pr.Ascending?Pr.Descending:Pr.Ascending)},[]),$=Gt((e,t)=>{b(r=>({...r,[e]:t}))},[]),w=Ht(()=>{const e=(e,t)=>{const r=e.cells.find(e=>e.key===t);return r&&(r.rawValue?.toString()||r.component?.({})?.props?.children?.toString())||""};return(f?[...c].sort((t,r)=>{const o=e(t,f),n=e(r,f);return(m===Pr.Ascending?1:-1)*((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"number"==typeof e&&"number"==typeof t?e-t:"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(o,n)}):c).filter(t=>{for(const[r,o]of Object.entries(y)){if(!o.length)continue;const n=l.find(e=>e.key===r)?.filterOverride;if(n){if(!n.filterRow(t,o))return!1}else if(!o.includes(e(t,r)))return!1}return!0})},[c,f,m,y,l]),{partiallySelected:S,allSelected:k}=Ht(()=>{const e=w.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[w]);return e(Py,{$maxHeight:o,children:t(Ly,{$variant:r,children:[!i&&e(zy,{children:e(Vy,{variant:r,backgroundColor:n,columns:l,rowsUnfiltered:c,sortDirection:m,sortByKey:f,onSort:v,filters:y,onFilter:$,withCheckboxes:h,partiallySelected:S,allSelected:k,onSelectAll:e=>{e?w.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):w.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),w.length?e(Hy,{variant:r,columns:l,rows:w,getRowActions:d||(()=>[]),rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h}):e(Nn,{style:{height:o},children:a?e(Un,{withSpinner:!0}):e(Sf,{...s})})]})})},qy=o.div`
|
|
2558
|
+
display: flex;
|
|
2559
|
+
align-items: center;
|
|
2560
|
+
justify-content: center;
|
|
2561
|
+
gap: 8px;
|
|
2562
|
+
padding: 8px;
|
|
2563
|
+
border-radius: 6px;
|
|
2564
|
+
|
|
2565
|
+
${({$flex:e})=>e?n`
|
|
2566
|
+
flex: ${e};
|
|
2567
|
+
`:n`
|
|
2568
|
+
width: fit-content;
|
|
2569
|
+
`}
|
|
2570
|
+
|
|
2571
|
+
${({$disabled:e,$withClick:t})=>e?n`
|
|
2572
|
+
cursor: not-allowed;
|
|
2573
|
+
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
2574
|
+
border: 1px solid transparent;
|
|
2575
|
+
`:t?n`
|
|
2576
|
+
cursor: pointer;
|
|
2577
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2578
|
+
&:hover {
|
|
2579
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2580
|
+
}
|
|
2581
|
+
&:active {
|
|
2582
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[900]};
|
|
2583
|
+
border: 1px solid ${({theme:e})=>e.v2.colors.purple[400]};
|
|
2584
|
+
}
|
|
2585
|
+
`:n`
|
|
2586
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2587
|
+
border: 1px solid transparent;
|
|
2588
|
+
`}
|
|
2589
|
+
`,Jy=({label:r,leftIcon:o,rightIcon:n,onClick:a,disabled:s,flex:l})=>{const c=i(),d=s?c.v2.colors.grey[400]:c.v2.colors.white[500];return t(qy,{$disabled:s,$withClick:!!a,onClick:()=>!s&&a?.(),$flex:l,children:[o&&e(o,{fill:d,size:16}),e(cn,{color:d,size:sn.XS,nowrap:!0,children:r}),n&&e(n,{fill:d,size:16})]})},Yy=o.div`
|
|
2590
|
+
padding: 6px 12px;
|
|
2591
|
+
|
|
2592
|
+
display: flex;
|
|
2593
|
+
align-self: stretch;
|
|
2594
|
+
align-items: flex-start;
|
|
2595
|
+
gap: 8px;
|
|
2596
|
+
border-radius: 6px;
|
|
2597
|
+
|
|
2598
|
+
border: 1px solid ${({theme:e,$disabled:t,$error:r})=>t?e.v2.colors.grey[600]:r?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
2599
|
+
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
2600
|
+
${({$disabled:e,$error:t})=>!e&&!t&&n`
|
|
2601
|
+
&:hover,
|
|
2602
|
+
&:active,
|
|
2603
|
+
&:focus-within {
|
|
2604
|
+
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2605
|
+
}
|
|
2606
|
+
`}
|
|
2607
|
+
`,Qy=o.textarea`
|
|
2608
|
+
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
2609
|
+
min-height: ${({$minHeight:e})=>e||"50px"};
|
|
2610
|
+
flex: 1;
|
|
2611
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
2612
|
+
font-size: 14px;
|
|
2613
|
+
font-weight: 400;
|
|
2614
|
+
resize: none;
|
|
2615
|
+
|
|
2616
|
+
background: transparent;
|
|
2617
|
+
border: none;
|
|
2618
|
+
outline: none;
|
|
2619
|
+
cursor: text;
|
|
2620
|
+
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
2621
|
+
&::placeholder {
|
|
2622
|
+
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
&:disabled {
|
|
2626
|
+
cursor: not-allowed;
|
|
2627
|
+
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2628
|
+
&::placeholder {
|
|
2629
|
+
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
`,Zy=({label:r,required:o,tooltip:n,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:p,disabled:u,maxWidth:h,minHeight:m,...g})=>{const f=Xt(null),x=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(In,{$gap:6,children:[e(tf,{label:r,tooltip:n,required:o,badge:i}),e(Yy,{$disabled:u,$error:!!a,children:e(Qy,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),x(),p?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:x,onBlur:x,disabled:u,$maxWidth:h,$minHeight:m,...g})}),e(rf,{errorMessage:a,warnMessage:s,helpMessage:l})]})},eb=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],tb=o.div`
|
|
2633
|
+
flex: 1;
|
|
2634
|
+
min-width: 0;
|
|
2635
|
+
`,rb=o.div`
|
|
2636
|
+
flex: 0 0 auto;
|
|
2637
|
+
min-width: 140px;
|
|
2638
|
+
`,ob=({name:r,label:o,tooltip:n,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:p=eb,defaultUnit:u,errorMessage:h,warnMessage:m,helpMessage:g,hasError:f,width:x})=>{const y=Ht(()=>u&&p.some(e=>e.id===u)?u:p[0]?.id||"s",[u,p]),{num:b,unit:v}=Ht(()=>((e,t,r)=>{if(null==e||""===e)return{num:"",unit:r};const o=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),n=new RegExp(`^\\s*(\\d+)\\s*(${o.join("|")})\\s*$`,"i"),i=String(e).match(n);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:r}:{num:"",unit:r}})(c,p,y),[c,p,y]),$=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(In,{$width:x,$gap:6,children:[e(tf,{label:o,tooltip:n,required:s,badge:i}),t(Tn,{$gap:8,$alignItems:"center",children:[e(tb,{children:e(sf,{name:r,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:b,onChange:e=>$(di(e.target.value),v)})}),e(rb,{children:e(ny,{name:`${r}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:p,values:[v],setValues:e=>$(b,e[0]||v)})})]}),e(rf,{errorMessage:h,warnMessage:m,helpMessage:g})]})},nb=o.div`
|
|
2639
|
+
width: 530px;
|
|
2640
|
+
`,ib=o.div`
|
|
2641
|
+
display: flex;
|
|
2642
|
+
flex-direction: column;
|
|
2643
|
+
align-items: center;
|
|
2644
|
+
gap: 16px;
|
|
2645
|
+
padding: 24px;
|
|
2646
|
+
`,ab=o.div`
|
|
2647
|
+
display: flex;
|
|
2648
|
+
justify-content: center;
|
|
2649
|
+
gap: 16px;
|
|
2650
|
+
padding: 16px 24px;
|
|
2651
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2652
|
+
`,sb=({visual:r,title:o,description:n,isOpen:a,onClose:s,onDeny:l,denyLabel:c="Deny",onApprove:d,approveLabel:p="Approve",...u})=>{const h=i();return e($y,{isOpen:a,onClose:s,...u,children:t(nb,{children:[t(ib,{children:[r&&e(r,{}),e(cn,{size:sn.M,weight:500,color:h.v2.colors.white[500],children:o}),e(In,{$alignItems:"center",$gap:4,children:n.split("\n").map(t=>e(cn,{size:sn.XS,weight:400,color:h.v2.colors.silver[200],children:t},t))})]}),(l||d)&&t(ab,{children:[e($f,{"data-id":"deny",variant:yf.Secondary,label:c,onClick:()=>{l?.(),s()}}),d&&e($f,{"data-id":"approve",variant:yf.Primary,label:p,onClick:()=>{d(),s()}})]})]})})};export{Bu as $,Wf as A,bf as B,id as C,Jf as D,Gr as E,In as F,mo as G,li as H,sf as I,ci as J,Ir as K,hi as L,io as M,Sf as N,Cc as O,ao as P,lo as Q,xo as R,mf as S,zx as T,fo as U,so as V,no as W,Ap as X,Qg as Y,Rs as Z,Lo as _,yf as a,Mu as a$,Tu as a0,fs as a1,Da as a2,ja as a3,Pa as a4,xs as a5,ha as a6,Ua as a7,Fa as a8,gs as a9,ql as aA,Js as aB,Wu as aC,jr as aD,Vs as aE,ko as aF,So as aG,Wo as aH,oy as aI,Do as aJ,Dn as aK,Nx as aL,_o as aM,$l as aN,si as aO,Bs as aP,Er as aQ,Jn as aR,ii as aS,Gs as aT,Eo as aU,Jy as aV,Ko as aW,qi as aX,ta as aY,Yi as aZ,ea as a_,Zf as aa,ga as ab,sl as ac,Wi as ad,Hi as ae,Ao as af,Il as ag,Dl as ah,Gi as ai,Un as aj,Vi as ak,Uo as al,ny as am,lf as an,$r as ao,qn as ap,js as aq,Ki as ar,Vl as as,Yl as at,Kl as au,qr as av,Lr as aw,Rx as ax,an as ay,Jl as az,Nn as b,ls as b$,Ds as b0,Is as b1,Ta as b2,Zi as b3,Ts as b4,ks as b5,Ss as b6,As as b7,Es as b8,$s as b9,co as bA,rx as bB,fx as bC,ix as bD,An as bE,cf as bF,Zp as bG,fa as bH,Za as bI,eu as bJ,wu as bK,ku as bL,Cu as bM,Au as bN,Du as bO,gu as bP,uu as bQ,Up as bR,Bp as bS,Mp as bT,fu as bU,hu as bV,nu as bW,$u as bX,ys as bY,cs as bZ,ss as b_,vs as ba,Ji as bb,ds as bc,na as bd,ia as be,Ox as bf,Ll as bg,rc as bh,ei as bi,Pf as bj,Nf as bk,If as bl,Gl as bm,En as bn,Ky as bo,Fy as bp,ju as bq,wp as br,fp as bs,Ep as bt,xy as bu,_y as bv,Gf as bw,Hf as bx,nn as by,$x as bz,Tr as c,fi as c$,as as c0,is as c1,tu as c2,ru as c3,ou as c4,sb as c5,ms as c6,hs as c7,us as c8,ps as c9,Ur as cA,Xs as cB,yi as cC,pc as cD,_n as cE,Lc as cF,Bi as cG,lg as cH,Fo as cI,kd as cJ,Kr as cK,ai as cL,jn as cM,Hs as cN,kr as cO,_d as cP,Go as cQ,Md as cR,Fn as cS,Pn as cT,_m as cU,jo as cV,Ln as cW,Lh as cX,ep as cY,Jg as cZ,fl as c_,Ml as ca,zh as cb,Ju as cc,qc as cd,Ei as ce,oh as cf,Gm as cg,Vg as ch,Zm as ci,jm as cj,Dc as ck,Cd as cl,vg as cm,fg as cn,nm as co,ig as cp,Hg as cq,Si as cr,Us as cs,Cm as ct,rm as cu,Gc as cv,Sl as cw,Xi as cx,vd as cy,Jh as cz,tf as d,zo as d$,pd as d0,vl as d1,Ys as d2,Xd as d3,oo as d4,Xo as d5,Ho as d6,dg as d7,No as d8,Bo as d9,Wh as dA,Yo as dB,Bg as dC,Pl as dD,Xc as dE,cl as dF,Kn as dG,El as dH,Yr as dI,Vn as dJ,ji as dK,hp as dL,Dd as dM,Lm as dN,Br as dO,xf as dP,Wn as dQ,Yn as dR,Ad as dS,Yd as dT,Zd as dU,cy as dV,ti as dW,pi as dX,Wl as dY,to as dZ,kh as d_,Tg as da,Al as db,To as dc,vo as dd,Cr as de,Cl as df,Bl as dg,yc as dh,On as di,Sg as dj,zl as dk,lh as dl,Os as dm,Co as dn,Ul as dp,Ol as dq,el as dr,wo as ds,hd as dt,Td as du,Wr as dv,_l as dw,xr as dx,yo as dy,Lg as dz,Af as e,Lf as e$,tc as e0,Ld as e1,Po as e2,vh as e3,zs as e4,Oo as e5,Qc as e6,tn as e7,Nd as e8,ob as e9,ca as eA,da as eB,ma as eC,xa as eD,ba as eE,ya as eF,ra as eG,oa as eH,aa as eI,Wa as eJ,Ha as eK,Ka as eL,Ns as eM,Vp as eN,Qi as eO,du as eP,zp as eQ,cu as eR,Lp as eS,lu as eT,Pp as eU,Ia as eV,Ea as eW,Na as eX,qa as eY,La as eZ,Ja as e_,_a as ea,ua as eb,Ra as ec,pa as ed,Ba as ee,Ma as ef,Ca as eg,Oa as eh,za as ei,Va as ej,Aa as ek,Ny as el,Xa as em,wa as en,sa as eo,Sa as ep,$a as eq,la as er,ka as es,ts as et,va as eu,Qa as ev,rs as ew,es as ex,os as ey,ns as ez,rf as f,ap as f$,Ga as f0,kf as f1,vn as f2,Ar as f3,Zr as f4,Rr as f5,eo as f6,Qr as f7,Mr as f8,Vr as f9,on as fA,Hn as fB,Zn as fC,ri as fD,ni as fE,di as fF,ui as fG,mi as fH,gi as fI,Sr as fJ,xi as fK,Ya as fL,Cs as fM,ws as fN,bs as fO,_s as fP,Fs as fQ,Ps as fR,Ls as fS,al as fT,ml as fU,ll as fV,il as fW,kl as fX,Xl as fY,Xu as fZ,Gu as f_,_r as fa,Fr as fb,Or as fc,ro as fd,zr as fe,ho as ff,uo as fg,po as fh,Jr as fi,bo as fj,go as fk,Pr as fl,Nr as fm,wn as fn,$n as fo,Cn as fp,yr as fq,Io as fr,wr as fs,Mo as ft,Vo as fu,Jo as fv,Qo as fw,Zo as fx,en as fy,rn as fz,Ro as g,rp as g0,tm as g1,$m as g2,gm as g3,Am as g4,Om as g5,Od as g6,rg as g7,Rn as g8,lm as g9,vi as ga,$i as gb,wi as gc,Uf as gd,jf as ge,Tf as gf,Ex as gg,eb as gh,ax as gi,sy as gj,$y as gk,Ay as gl,Ry as gm,Dy as gn,Yf as go,Bx as gp,Xr as h,Qn as i,gy as j,_x as k,dy as l,hc as m,Tn as n,$f as o,Hr as p,Dr as q,xp as r,cn as s,sn as t,Nl as u,$o as v,Zy as w,vr as x,Sp as y,Jx as z};
|