"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[2536],{52536(h,u,e){e.d(u,{SeriesToFieldsTransformerEditor:()=>E});var r=e(74848),i=e(96540),l=e(45105),a=e(52358),_=e(72396),n=e(72480),d=e(6634),f=e(78364),m=e(48368);function E({input:b,options:s,onChange:o}){const c=(0,m.sE)(b),v=(0,m.Av)(c),M=[{value:l.W.outer,label:(0,a.t)("transformers.series-to-fields-transformer-editor.modes.label.outer-time-series","Outer (time series)"),description:(0,a.t)("transformers.series-to-fields-transformer-editor.modes.description.keep-all-rows","Keep all rows from any table with a value. Join on distinct field values. Performant and best used for time series.")},{value:l.W.outerTabular,label:(0,a.t)("transformers.series-to-fields-transformer-editor.modes.label.outer-tabular","Outer (tabular)"),description:(0,a.t)("transformers.series-to-fields-transformer-editor.modes.description.join-on-a-field","Join on a field value with duplicated values. Non performant outer join best used for tabular(SQL like) data.")},{value:l.W.inner,label:(0,a.t)("transformers.series-to-fields-transformer-editor.modes.label.inner","Inner"),description:(0,a.t)("transformers.series-to-fields-transformer-editor.modes.description.combine-data-from-two-tables","Combine data from two tables whenever there are matching values in a fields common to both tables.")}],O=(0,_.w)().getVariables().map(t=>({value:"$"+t.name,label:"$"+t.name})),P=(0,i.useCallback)(t=>{o({...s,byField:t?.value})},[o,s]),D=(0,i.useCallback)(t=>{o({...s,mode:t?.value})},[o,s]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.C,{children:(0,r.jsx)(n.I,{label:(0,a.t)("transformers.series-to-fields-transformer-editor.label-mode","Mode"),labelWidth:8,grow:!0,children:(0,r.jsx)(f.G,{options:M,value:s.mode??l.W.outer,onChange:D})})}),(0,r.jsx)(d.C,{children:(0,r.jsx)(n.I,{label:(0,a.t)("transformers.series-to-fields-transformer-editor.label-field","Field"),labelWidth:8,grow:!0,children:(0,r.jsx)(f.G,{options:[...v,...O],value:s.byField,onChange:P,placeholder:"time",isClearable:!0})})})]})}}}]);

//# sourceMappingURL=2536.977eacff1590d5583cec.js.map