@infinilabs/discover 0.0.2 → 0.0.4
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/dist/{abap-obercqiY.cjs → abap-B18hVSsN.cjs} +1 -1
- package/dist/{apex-B0_UGK1B.cjs → apex-_IxnNPmz.cjs} +1 -1
- package/dist/{azcli-CEoytwx_.cjs → azcli-CmmdHEUf.cjs} +1 -1
- package/dist/{bat-D65OC-jj.cjs → bat-BzEiqWeR.cjs} +1 -1
- package/dist/{bicep-DvD_e5vW.cjs → bicep-DIoFd1wt.cjs} +1 -1
- package/dist/{cameligo-DzMHfeEs.cjs → cameligo-bKTW7lk6.cjs} +1 -1
- package/dist/{chunk-BjqF3vbe.cjs → chunk-Bt4DEX77.cjs} +1 -1
- package/dist/{classnames-eUba3oot.js → classnames-BCXlvRQ0.js} +1 -1
- package/dist/{classnames-BXjDNQ6Q.cjs → classnames-D729JvxH.cjs} +1 -1
- package/dist/{clojure-BC7BzAFK.cjs → clojure-CPT5CD4v.cjs} +1 -1
- package/dist/{coffee-Ca9F0OWZ.cjs → coffee-waR5WxfR.cjs} +1 -1
- package/dist/{common-BlOHZJzI.js → common-1_7zA8Zc.js} +3 -3
- package/dist/{common-Tr1I-HCs.js → common-BQBJRuts.js} +473 -1392
- package/dist/{common-DuYIpe6b.cjs → common-CZAeFul_.cjs} +1 -1
- package/dist/{common-BeXEy5sz.cjs → common-CbtzlL22.cjs} +9 -10
- package/dist/components-BEmqsoEA.js +52040 -0
- package/dist/components-BQLD97h3.cjs +87 -0
- package/dist/{cpp-DKy9h6xR.cjs → cpp-BfChftwy.cjs} +1 -1
- package/dist/{csharp-CkbgT9vH.cjs → csharp-nBoW6KTT.cjs} +1 -1
- package/dist/{csp-C2qFd6iv.cjs → csp-BIzjPLVo.cjs} +1 -1
- package/dist/{css-DCKUCzD6.cjs → css-DSqM7UD_.cjs} +1 -1
- package/dist/{cssMode-l7eR8WSG.cjs → cssMode-BQ-UYI-y.cjs} +1 -1
- package/dist/{cssMode-CU2AJQMM.js → cssMode-Ci5F4dqN.js} +1 -1
- package/dist/{cypher-122TYSjJ.cjs → cypher-CF3LPcnK.cjs} +1 -1
- package/dist/{dart-DshcPGU8.cjs → dart-s1KldUPT.cjs} +1 -1
- package/dist/{dockerfile-CL8dwZCe.cjs → dockerfile-C8jXrAc3.cjs} +1 -1
- package/dist/{ecl-DVx2J_EE.cjs → ecl-DXHahiYb.cjs} +1 -1
- package/dist/{editor.api-CbUDOph7.js → editor.api-B3Kwz8AU.js} +1 -1
- package/dist/{editor.api-lY2thcaq.cjs → editor.api-DKqStM0b.cjs} +1 -1
- package/dist/{elixir-Xgx_1krO.cjs → elixir-Bfz_qDwz.cjs} +1 -1
- package/dist/filter_label-uegvGoQW.cjs +1 -0
- package/dist/filter_label-yraKDyOi.js +58 -0
- package/dist/{filter_operators-C-TaTcNc.js → filter_operators-B4Weryc1.js} +1 -1
- package/dist/filter_operators-BNI9krzf.cjs +1 -0
- package/dist/{flow9-DR-EyjYV.cjs → flow9-Dl0fmUvR.cjs} +1 -1
- package/dist/{freemarker2-C6Iq5MB-.js → freemarker2-ByX2nJLu.js} +1 -1
- package/dist/{freemarker2-BTGUjvgA.cjs → freemarker2-D-WA-CyM.cjs} +1 -1
- package/dist/{fsharp-DaBEigN7.cjs → fsharp-C6zPBIxE.cjs} +1 -1
- package/dist/{go-Xyq33f0v.cjs → go-D0pYkox6.cjs} +1 -1
- package/dist/{graphql-Cj7XAy25.cjs → graphql-DoB8VDUR.cjs} +1 -1
- package/dist/{handlebars-B2b1q7PA.cjs → handlebars-D7bIAzGa.cjs} +1 -1
- package/dist/{handlebars-DGGN9u4Y.js → handlebars-DcNvsS6s.js} +1 -1
- package/dist/{hcl-C3dpBsgU.cjs → hcl-D7mPh_NX.cjs} +1 -1
- package/dist/{html-qfcUzk8e.cjs → html-BBfIeaSx.cjs} +1 -1
- package/dist/{html-RJa-j-qT.js → html-WAHLT253.js} +1 -1
- package/dist/{htmlMode-CYIxo4hc.cjs → htmlMode-CWYZdyx7.cjs} +1 -1
- package/dist/{htmlMode-DDZ48mdp.js → htmlMode-nvsOmwpu.js} +1 -1
- package/dist/index.cjs +2 -303
- package/dist/index.d.ts +2 -0
- package/dist/index.js +12 -72891
- package/dist/index_pattern_select-BtXboNtZ.cjs +1 -0
- package/dist/{index_pattern_select--iGeA3sP.js → index_pattern_select-Ct7oi9xn.js} +23 -22
- package/dist/{ini-ChENqKh8.cjs → ini-B225Sx1g.cjs} +1 -1
- package/dist/{java-LZ6g7weJ.cjs → java-BNrGpLYe.cjs} +1 -1
- package/dist/{javascript-CN5gTHH2.js → javascript-DHdNxH1K.js} +2 -2
- package/dist/{javascript-CZ97a-BN.cjs → javascript-DUx3OYOm.cjs} +1 -1
- package/dist/{jsonMode-BZDeJMLL.cjs → jsonMode-BRQQ8h5o.cjs} +1 -1
- package/dist/{jsonMode-DraOl-ka.js → jsonMode-_9GP7_yD.js} +1 -1
- package/dist/{julia-BeebccKw.cjs → julia-BECnkWdE.cjs} +1 -1
- package/dist/{kotlin-M82nl514.cjs → kotlin-CvZkSUtj.cjs} +1 -1
- package/dist/{less-B4Q3fV9Y.cjs → less-DP_4XDqA.cjs} +1 -1
- package/dist/{lexon-CXQaaecE.cjs → lexon-D38Ck9oq.cjs} +1 -1
- package/dist/{lib-Chy_6VKj.cjs → lib-BbQB6wY_.cjs} +1 -1
- package/dist/{lib-C9j_E-l0.js → lib-Cdf3LT56.js} +1 -1
- package/dist/{liquid-DvB-d2w7.js → liquid-Bg6T1F2Y.js} +1 -1
- package/dist/{liquid-BYNEOJvX.cjs → liquid-P9tMrOja.cjs} +1 -1
- package/dist/lodash-DZJGw-mv.cjs +20 -0
- package/dist/{lodash-D-qGlPRW.js → lodash-Gv_ptthU.js} +653 -1132
- package/dist/{lua-CnG8Tpu2.cjs → lua-BhjgkZV9.cjs} +1 -1
- package/dist/{m3-CVcm-OIn.cjs → m3-Cj6LSzkf.cjs} +1 -1
- package/dist/{markdown-DrRHDVSU.cjs → markdown-DdS9Osew.cjs} +1 -1
- package/dist/{mdx-BbiOYPr2.cjs → mdx-D0bSf49T.cjs} +1 -1
- package/dist/{mdx-Fk8VTCUK.js → mdx-DrS_Ytun.js} +1 -1
- package/dist/{mips-D_p8UYQb.cjs → mips-s4kDsLVi.cjs} +1 -1
- package/dist/{monaco.contribution-BpuUCejv.cjs → monaco.contribution-1d_zL2ik.cjs} +1 -1
- package/dist/{monaco.contribution-Cq4QrMn0.js → monaco.contribution-DTll1C0Q.js} +2 -2
- package/dist/{msdax-xM1_j20x.cjs → msdax-HTzJv8D6.cjs} +1 -1
- package/dist/{mysql-DMsJkSnA.cjs → mysql-BSGf2DlN.cjs} +1 -1
- package/dist/{objective-c-BG02Lrht.cjs → objective-c-DMCjtkhm.cjs} +1 -1
- package/dist/{pascal-CnP2Fqes.cjs → pascal-CtrfiOgh.cjs} +1 -1
- package/dist/{pascaligo-BzDEm-l_.cjs → pascaligo-2Quk8B2E.cjs} +1 -1
- package/dist/{perl-nIxw-e4R.cjs → perl-CH3a6xob.cjs} +1 -1
- package/dist/{pgsql-Buk6XzVf.cjs → pgsql-BLOVjnrQ.cjs} +1 -1
- package/dist/{php-B3sFYUqV.cjs → php-yRnOpoyI.cjs} +1 -1
- package/dist/{pla-CZtnfWl6.cjs → pla-BDmxlb0M.cjs} +1 -1
- package/dist/{postiats-CgJZf83Q.cjs → postiats-n_UjHe5B.cjs} +1 -1
- package/dist/{powerquery-D9gzk2Dq.cjs → powerquery-C2Q8OWaZ.cjs} +1 -1
- package/dist/{powershell-CZHaQY6z.cjs → powershell-Bq3wVwgc.cjs} +1 -1
- package/dist/{protobuf-D_C8Guej.cjs → protobuf-Ctw52x4r.cjs} +1 -1
- package/dist/public-BHeuKoy2.cjs +3 -0
- package/dist/{public-BC9tZcui.js → public-BS_TzGX7.js} +81 -56
- package/dist/{pug-quEtG4rz.cjs → pug-CRcQmIDy.cjs} +1 -1
- package/dist/{python-CQX8JcT4.cjs → python-BK8ePFuv.cjs} +1 -1
- package/dist/{python-C45c7K7W.js → python-Bxq6xlCg.js} +1 -1
- package/dist/{qsharp-CX1SSV_j.cjs → qsharp-D_knGg5J.cjs} +1 -1
- package/dist/query_bar_top_row-B7ExTxTa.js +13 -0
- package/dist/query_bar_top_row-CoEs67SV.cjs +1 -0
- package/dist/query_bar_top_row-D6BsHiQi.cjs +1 -0
- package/dist/{query_bar_top_row-63VciJSV.js → query_bar_top_row-desyME3s.js} +328 -316
- package/dist/query_string_input-BJotC1gb.js +9 -0
- package/dist/{query_string_input-GJtRxVUU.js → query_string_input-Cw7sdboC.js} +32 -31
- package/dist/query_string_input-DZpTPUw8.cjs +1 -0
- package/dist/query_string_input-PlPTC5TU.cjs +1 -0
- package/dist/{r-DpVDQTST.cjs → r-84hDa72n.cjs} +1 -1
- package/dist/{razor-DYx4yJJn.cjs → razor-9YAbWQGm.cjs} +1 -1
- package/dist/{razor-BnoJmj1k.js → razor-B_jbEEwp.js} +1 -1
- package/dist/{redis-DsCuCZIT.cjs → redis-anq3Z0f9.cjs} +1 -1
- package/dist/{redshift-z5_aUfdC.cjs → redshift-C5pFXAgg.cjs} +1 -1
- package/dist/{restructuredtext-DdXoKocW.cjs → restructuredtext-BhKsZDmb.cjs} +1 -1
- package/dist/{ruby-Dj0sNBey.cjs → ruby-t5kbrNnA.cjs} +1 -1
- package/dist/{rust-DjkW1U4M.cjs → rust-CoY1WcgB.cjs} +1 -1
- package/dist/{sb-BCN0JcpS.cjs → sb-niZv2I4k.cjs} +1 -1
- package/dist/{scala-CyXWhZaJ.cjs → scala-C66JuPEz.cjs} +1 -1
- package/dist/{scheme-Cs9G6QEE.cjs → scheme-D_FsyR5V.cjs} +1 -1
- package/dist/{scss-Fl7taPuq.cjs → scss-BJpgvfWa.cjs} +1 -1
- package/dist/search_bar-Cb9thx0h.cjs +1 -0
- package/dist/{search_bar-CP6HzakZ.js → search_bar-Cc0AiLC6.js} +869 -660
- package/dist/{services-BPC3fXx4.cjs → services-CDXxluYi.cjs} +2 -2
- package/dist/{services-9wPHk1eh.js → services-Hp7HR5A8.js} +88 -90
- package/dist/{shard_failure_open_modal_button-BYTThYch.js → shard_failure_open_modal_button-3Fgne-kW.js} +39 -39
- package/dist/shard_failure_open_modal_button-B1bDjIGP.cjs +2 -0
- package/dist/{shell-Cw5yNfC4.cjs → shell-DzIPFcUo.cjs} +1 -1
- package/dist/{solidity-BoAzg9X_.cjs → solidity-CHkFNcGN.cjs} +1 -1
- package/dist/{sophia-L84Jz6Ow.cjs → sophia-mtIQNQ_C.cjs} +1 -1
- package/dist/{sparql-D6lnG7vO.cjs → sparql-CrZwU91_.cjs} +1 -1
- package/dist/{sql-VXdYzIyz.cjs → sql-_m43zSZb.cjs} +1 -1
- package/dist/src/components/IndexPatternSelect/index.d.ts +2 -0
- package/dist/src/components/ResultHeader/index.d.ts +1 -0
- package/dist/src/components/context.d.ts +1 -2
- package/dist/src/components/index.d.ts +113 -1
- package/dist/{st-CxJLwAAK.cjs → st-bAlUFHcH.cjs} +1 -1
- package/dist/suggestions_component-BkDapsHi.cjs +77 -0
- package/dist/{suggestions_component-BBHwbjYT.js → suggestions_component-D52Ar73h.js} +85 -84
- package/dist/{swift-ZBC6wQdc.cjs → swift-Cmw0b-2Y.cjs} +1 -1
- package/dist/{systemverilog-DoSgAb1I.cjs → systemverilog-eqXMOadB.cjs} +1 -1
- package/dist/{tcl-IXmy-lJ0.cjs → tcl-COARXPsa.cjs} +1 -1
- package/dist/{tsMode-CNvH6xuC.cjs → tsMode-CPL8kC26.cjs} +1 -1
- package/dist/{tsMode-BrPRpJvb.js → tsMode-DEdZuvHt.js} +2 -2
- package/dist/{twig-CT2RXmm0.cjs → twig-ZGwnie5L.cjs} +1 -1
- package/dist/{typescript-BRKHcp4S.js → typescript-BYA2ifcg.js} +1 -1
- package/dist/typescript-Br6yZ45m.cjs +1 -0
- package/dist/typescript-CB8UTCwS.js +3 -0
- package/dist/{typescript-Bbw9fxuo.cjs → typescript-CH9SvObC.cjs} +1 -1
- package/dist/{typespec-CkKpvaMv.cjs → typespec-BtzyCWq0.cjs} +1 -1
- package/dist/{vb-R3Kcrzvd.cjs → vb-D_rFJbXI.cjs} +1 -1
- package/dist/{wgsl-FTDBzylH.cjs → wgsl-C3QOSd29.cjs} +1 -1
- package/dist/{xml-BZjE3dtf.js → xml-BBlarb4B.js} +1 -1
- package/dist/{xml-CxbMIueA.cjs → xml-t4MGpEOC.cjs} +1 -1
- package/dist/{yaml-Di_6aXC4.js → yaml-P_so8xTg.js} +1 -1
- package/dist/{yaml-DvaGkWBl.cjs → yaml-vvzY-F77.cjs} +1 -1
- package/package.json +5 -3
- package/dist/createLucideIcon-239Z-2by.cjs +0 -1
- package/dist/createLucideIcon-BO6TDGE7.js +0 -43
- package/dist/dist-DCz_Qv0B.js +0 -884
- package/dist/dist-D_2dZQH5.cjs +0 -11
- package/dist/filter_label-DRJC3vpe.js +0 -58
- package/dist/filter_label-DssaWGpx.cjs +0 -1
- package/dist/filter_operators-D0kyB-XI.cjs +0 -1
- package/dist/index_pattern_select-BeN5049F.cjs +0 -1
- package/dist/lodash-C_2NO1eK.cjs +0 -35
- package/dist/public-DWj11W6c.cjs +0 -3
- package/dist/query_bar_top_row-DTuo9G7b.cjs +0 -1
- package/dist/query_bar_top_row-Qa1UOoyA.js +0 -11
- package/dist/query_bar_top_row-uXjdOqmq.cjs +0 -1
- package/dist/query_string_input-AJgelaNH.cjs +0 -1
- package/dist/query_string_input-BMyni2_5.js +0 -9
- package/dist/query_string_input-LOqshppi.cjs +0 -1
- package/dist/search_bar-BmZWeddp.cjs +0 -1
- package/dist/shard_failure_open_modal_button-Dx8ML4VE.cjs +0 -2
- package/dist/suggestions_component-CF4sehth.cjs +0 -77
- package/dist/tsup.config.d.ts +0 -2
- package/dist/typescript-CQjO9XnF.js +0 -3
- package/dist/typescript-D6q4AO2z.cjs +0 -1
- /package/dist/{abap-B988NUrV.js → abap-OkMsrIvQ.js} +0 -0
- /package/dist/{apex-BlHPPQK-.js → apex-d2k0_z-2.js} +0 -0
- /package/dist/{azcli-C7iyZFGk.js → azcli-Cdmj8rOB.js} +0 -0
- /package/dist/{bat-Buc0l0C3.js → bat-don-D6tc.js} +0 -0
- /package/dist/{bicep-U66iJ-pV.js → bicep-BvuLech3.js} +0 -0
- /package/dist/{cameligo-C9Dwkdmm.js → cameligo-BvlaYcL9.js} +0 -0
- /package/dist/{chunk-CIp4IH9D.js → chunk-D-4zIDrl.js} +0 -0
- /package/dist/{clojure-DDWmWbSx.js → clojure-Ch9OmS1b.js} +0 -0
- /package/dist/{coffee-7Sx2S8NH.js → coffee-CpXCo1uE.js} +0 -0
- /package/dist/{cpp-CHjqaSPQ.js → cpp-DyS6q87C.js} +0 -0
- /package/dist/{csharp-jwStnVeK.js → csharp-Hj6_S7WZ.js} +0 -0
- /package/dist/{csp-DkO8Np0h.js → csp-COceLik5.js} +0 -0
- /package/dist/{css-BFvwcljm.js → css-ASlh9LOx.js} +0 -0
- /package/dist/{cypher-DaQ7hFRL.js → cypher-BxgrUQKu.js} +0 -0
- /package/dist/{dart-D8p_2HKP.js → dart-Bmyj-5e5.js} +0 -0
- /package/dist/{dockerfile-DKWOQrwp.js → dockerfile-BlydhWgZ.js} +0 -0
- /package/dist/{ecl-DP3PNWGB.js → ecl-BwXMRs82.js} +0 -0
- /package/dist/{elixir-e9tDp1p1.js → elixir-D8V-g5GN.js} +0 -0
- /package/dist/{flow9-C9BjpX8h.js → flow9-CaqlcxIQ.js} +0 -0
- /package/dist/{fsharp-BWm_FISn.js → fsharp-WVyrH5gA.js} +0 -0
- /package/dist/{go-cmqV0Vy_.js → go-3CS-nUOQ.js} +0 -0
- /package/dist/{graphql-BkFHHVmI.js → graphql-iGOXWO5L.js} +0 -0
- /package/dist/{hcl-5I-P7bYX.js → hcl-BRgJNQGx.js} +0 -0
- /package/dist/{ini-DSIAxBZt.js → ini-CP_6inF6.js} +0 -0
- /package/dist/{java-DGeAxsRb.js → java-CNOvl7Kv.js} +0 -0
- /package/dist/{julia-CU4CtsP4.js → julia-mM-7aLvT.js} +0 -0
- /package/dist/{kotlin-B8NxXJ89.js → kotlin-CJIQVpIl.js} +0 -0
- /package/dist/{less-DbeQQzer.js → less-Bz7StVdM.js} +0 -0
- /package/dist/{lexon-Cw9JuAKc.js → lexon-Cfo4t0ql.js} +0 -0
- /package/dist/{lua-yl5NzA_S.js → lua-BkXMcIht.js} +0 -0
- /package/dist/{m3-CdNAqvIX.js → m3-BlTfuwFL.js} +0 -0
- /package/dist/{markdown-C1h-EuiT.js → markdown-Bb9NwWaF.js} +0 -0
- /package/dist/{mips-DIWpzGF0.js → mips-vcHuXEUv.js} +0 -0
- /package/dist/{msdax-BiazpDQ1.js → msdax-BfzKV0XZ.js} +0 -0
- /package/dist/{mysql-DphBFJlP.js → mysql-D895Th5f.js} +0 -0
- /package/dist/{objective-c-DWZ8Qpyc.js → objective-c-4PQYfG3y.js} +0 -0
- /package/dist/{pascal-BcvlMOdu.js → pascal-DLURHKPf.js} +0 -0
- /package/dist/{pascaligo-DHEp4kzh.js → pascaligo-C8qRRmWT.js} +0 -0
- /package/dist/{perl-USYKPHpO.js → perl-CZUy-IFA.js} +0 -0
- /package/dist/{pgsql-DzPhAh9W.js → pgsql-4tk2cu8I.js} +0 -0
- /package/dist/{php-PfpSTefE.js → php-BZ42EuCS.js} +0 -0
- /package/dist/{pla-DrFOZwDB.js → pla-DtfRslJJ.js} +0 -0
- /package/dist/{postiats-4OGxVVUT.js → postiats-BNEouZag.js} +0 -0
- /package/dist/{powerquery-_h9-HEnY.js → powerquery-BifET6Dv.js} +0 -0
- /package/dist/{powershell-nOzcY8gy.js → powershell-BdX8IDNR.js} +0 -0
- /package/dist/{protobuf-DAgxhnea.js → protobuf-BsteaEG3.js} +0 -0
- /package/dist/{pug-raGZNmZ1.js → pug-Br-vpp5b.js} +0 -0
- /package/dist/{qsharp-C2jz5tuo.js → qsharp-ChycTJOw.js} +0 -0
- /package/dist/{r-CXkPcYYf.js → r-CniD0c5t.js} +0 -0
- /package/dist/{redis-giKZvbbg.js → redis-pyXNr6RN.js} +0 -0
- /package/dist/{redshift-qKVxBsP_.js → redshift-DyonAstC.js} +0 -0
- /package/dist/{restructuredtext-D0n4pabr.js → restructuredtext-DK3fWXo5.js} +0 -0
- /package/dist/{ruby-BNrBlpcw.js → ruby-Chq6Cfgo.js} +0 -0
- /package/dist/{rust-D6mpPoli.js → rust-C3Sfj6Cs.js} +0 -0
- /package/dist/{sb-DhS9GhXl.js → sb-DcDlxrhv.js} +0 -0
- /package/dist/{scala-BqxBEpi8.js → scala-CEdpCxsL.js} +0 -0
- /package/dist/{scheme-Bh4oGAk3.js → scheme-CJ-m-Mx4.js} +0 -0
- /package/dist/{scss-Byf08jwC.js → scss-BEDGxUq3.js} +0 -0
- /package/dist/{shell-UoRv_tpG.js → shell-DjJnS0bk.js} +0 -0
- /package/dist/{solidity-B5t7Lkol.js → solidity-CXRhrGeW.js} +0 -0
- /package/dist/{sophia-BrXXWhvp.js → sophia-ChdUx1PX.js} +0 -0
- /package/dist/{sparql-B8ZTY48u.js → sparql-Ds0TTAeK.js} +0 -0
- /package/dist/{sql-D_74hUL-.js → sql-ClwNupAF.js} +0 -0
- /package/dist/{st-D8Rdx9Bz.js → st-Dsx0bfk9.js} +0 -0
- /package/dist/{swift-s19Ivx3X.js → swift-D2JpsDUa.js} +0 -0
- /package/dist/{systemverilog-fA72PnKj.js → systemverilog-Cz6WMn3P.js} +0 -0
- /package/dist/{tcl-B8QLbcxi.js → tcl-DBbIj-92.js} +0 -0
- /package/dist/{twig-Dy7NkzKI.js → twig-DcqMSkOn.js} +0 -0
- /package/dist/{typespec-ndyv0mQx.js → typespec-Com1jZQg.js} +0 -0
- /package/dist/{vb-DET0NIW-.js → vb-CJkLttvN.js} +0 -0
- /package/dist/{wgsl-D5TeQchR.js → wgsl-AS15fsXS.js} +0 -0
|
@@ -1,44 +1,24 @@
|
|
|
1
|
-
import { o as __toESM } from "./chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import "./
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
1
|
+
import { o as __toESM } from "./chunk-D-4zIDrl.js";
|
|
2
|
+
import { a as CirclePlus, i as ListFilter, o as CircleMinus, r as Ft, s as createLucideIcon, t as GlobalConfigContext } from "./components-BEmqsoEA.js";
|
|
3
|
+
import { t as QueryBarTopRow } from "./query_bar_top_row-desyME3s.js";
|
|
4
|
+
import { f as withKibana, t as getIndexPatterns } from "./services-Hp7HR5A8.js";
|
|
5
|
+
import { c as FilterLabel } from "./public-BS_TzGX7.js";
|
|
6
|
+
import { t as require_classnames } from "./classnames-BCXlvRQ0.js";
|
|
7
|
+
import { t as require_lodash } from "./lodash-Gv_ptthU.js";
|
|
8
|
+
import "./common-1_7zA8Zc.js";
|
|
9
|
+
import "./lib-Cdf3LT56.js";
|
|
10
|
+
import { $ as toggleFilterNegated, J as disableFilter, M as isFilterable, Q as toggleFilterDisabled, U as cleanFilter, X as isFilterPinned, Y as enableFilter, Z as pinFilter, _t as buildFilter, dt as getDisplayValueFromFilter, et as unpinFilter, f as Ipv4Address, ft as getIndexPatternFromFilter, gt as buildCustomFilter, nt as getFilterParams, q as buildEmptyFilter, yt as require_moment_timezone } from "./common-BQBJRuts.js";
|
|
11
|
+
import "./editor.api-B3Kwz8AU.js";
|
|
12
|
+
import "./monaco.contribution-DTll1C0Q.js";
|
|
13
|
+
import { t as FILTER_OPERATORS } from "./filter_operators-B4Weryc1.js";
|
|
14
|
+
import "./query_string_input-Cw7sdboC.js";
|
|
15
|
+
import React, { Component, Fragment, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
16
|
+
import { Button, Checkbox, Divider, Empty, Flex, Form, Input, InputNumber, Menu, Popover, Select, Space, Spin, Switch, Tag } from "antd";
|
|
17
|
+
import { EuiComboBox, EuiFlexGroup, EuiFlexItem, EuiFormRow, useInnerText } from "@elastic/eui";
|
|
18
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
19
|
import Icon, { BarsOutlined, CheckOutlined, CloseCircleOutlined, CloseOutlined, DownOutlined, FilterOutlined, LayoutOutlined, LeftOutlined, ReloadOutlined, RightOutlined, SortAscendingOutlined, TableOutlined, UpOutlined } from "@ant-design/icons";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
cy: "12",
|
|
21
|
-
r: "10",
|
|
22
|
-
key: "1mglay"
|
|
23
|
-
}], ["path", {
|
|
24
|
-
d: "M8 12h8",
|
|
25
|
-
key: "1wcyev"
|
|
26
|
-
}]]), CirclePlus = createLucideIcon("circle-plus", [
|
|
27
|
-
["circle", {
|
|
28
|
-
cx: "12",
|
|
29
|
-
cy: "12",
|
|
30
|
-
r: "10",
|
|
31
|
-
key: "1mglay"
|
|
32
|
-
}],
|
|
33
|
-
["path", {
|
|
34
|
-
d: "M8 12h8",
|
|
35
|
-
key: "1wcyev"
|
|
36
|
-
}],
|
|
37
|
-
["path", {
|
|
38
|
-
d: "M12 8v8",
|
|
39
|
-
key: "napkw2"
|
|
40
|
-
}]
|
|
41
|
-
]), EyeOff = createLucideIcon("eye-off", [
|
|
20
|
+
import dateMath from "@elastic/datemath";
|
|
21
|
+
var EyeOff = createLucideIcon("eye-off", [
|
|
42
22
|
["path", {
|
|
43
23
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
44
24
|
key: "ct8e1f"
|
|
@@ -69,29 +49,6 @@ var CircleMinus = createLucideIcon("circle-minus", [["circle", {
|
|
|
69
49
|
}], ["path", {
|
|
70
50
|
d: "m15 5 4 4",
|
|
71
51
|
key: "1mk7zo"
|
|
72
|
-
}]]), PinOff = createLucideIcon("pin-off", [
|
|
73
|
-
["path", {
|
|
74
|
-
d: "M12 17v5",
|
|
75
|
-
key: "bb1du9"
|
|
76
|
-
}],
|
|
77
|
-
["path", {
|
|
78
|
-
d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",
|
|
79
|
-
key: "znwnzq"
|
|
80
|
-
}],
|
|
81
|
-
["path", {
|
|
82
|
-
d: "m2 2 20 20",
|
|
83
|
-
key: "1ooewy"
|
|
84
|
-
}],
|
|
85
|
-
["path", {
|
|
86
|
-
d: "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",
|
|
87
|
-
key: "c9qhm2"
|
|
88
|
-
}]
|
|
89
|
-
]), Pin = createLucideIcon("pin", [["path", {
|
|
90
|
-
d: "M12 17v5",
|
|
91
|
-
key: "bb1du9"
|
|
92
|
-
}], ["path", {
|
|
93
|
-
d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
|
|
94
|
-
key: "1nkz8b"
|
|
95
52
|
}]]), SquaresExclude = createLucideIcon("squares-exclude", [["path", {
|
|
96
53
|
d: "M16 12v2a2 2 0 0 1-2 2H9a1 1 0 0 0-1 1v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2h0",
|
|
97
54
|
key: "1mcohs"
|
|
@@ -119,14 +76,284 @@ var CircleMinus = createLucideIcon("circle-minus", [["circle", {
|
|
|
119
76
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
120
77
|
key: "e791ji"
|
|
121
78
|
}]
|
|
122
|
-
])
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
]), import_lodash$9 = require_lodash(), MapShim = (function() {
|
|
80
|
+
if (typeof Map < "u") return Map;
|
|
81
|
+
function e(e, t) {
|
|
82
|
+
var n = -1;
|
|
83
|
+
return e.some(function(e, r) {
|
|
84
|
+
return e[0] === t ? (n = r, !0) : !1;
|
|
85
|
+
}), n;
|
|
86
|
+
}
|
|
87
|
+
return function() {
|
|
88
|
+
function t() {
|
|
89
|
+
this.__entries__ = [];
|
|
90
|
+
}
|
|
91
|
+
return Object.defineProperty(t.prototype, "size", {
|
|
92
|
+
get: function() {
|
|
93
|
+
return this.__entries__.length;
|
|
94
|
+
},
|
|
95
|
+
enumerable: !0,
|
|
96
|
+
configurable: !0
|
|
97
|
+
}), t.prototype.get = function(t) {
|
|
98
|
+
var n = e(this.__entries__, t), r = this.__entries__[n];
|
|
99
|
+
return r && r[1];
|
|
100
|
+
}, t.prototype.set = function(t, n) {
|
|
101
|
+
var r = e(this.__entries__, t);
|
|
102
|
+
~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);
|
|
103
|
+
}, t.prototype.delete = function(t) {
|
|
104
|
+
var n = this.__entries__, r = e(n, t);
|
|
105
|
+
~r && n.splice(r, 1);
|
|
106
|
+
}, t.prototype.has = function(t) {
|
|
107
|
+
return !!~e(this.__entries__, t);
|
|
108
|
+
}, t.prototype.clear = function() {
|
|
109
|
+
this.__entries__.splice(0);
|
|
110
|
+
}, t.prototype.forEach = function(e, t) {
|
|
111
|
+
t === void 0 && (t = null);
|
|
112
|
+
for (var n = 0, r = this.__entries__; n < r.length; n++) {
|
|
113
|
+
var i = r[n];
|
|
114
|
+
e.call(t, i[1], i[0]);
|
|
115
|
+
}
|
|
116
|
+
}, t;
|
|
117
|
+
}();
|
|
118
|
+
})(), isBrowser = typeof window < "u" && typeof document < "u" && window.document === document, global$1 = (function() {
|
|
119
|
+
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
120
|
+
})(), requestAnimationFrame$1 = (function() {
|
|
121
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(global$1) : function(e) {
|
|
122
|
+
return setTimeout(function() {
|
|
123
|
+
return e(Date.now());
|
|
124
|
+
}, 1e3 / 60);
|
|
125
|
+
};
|
|
126
|
+
})(), trailingTimeout = 2;
|
|
127
|
+
function throttle(e, t) {
|
|
128
|
+
var n = !1, r = !1, i = 0;
|
|
129
|
+
function a() {
|
|
130
|
+
n && (n = !1, e()), r && s();
|
|
131
|
+
}
|
|
132
|
+
function o() {
|
|
133
|
+
requestAnimationFrame$1(a);
|
|
134
|
+
}
|
|
135
|
+
function s() {
|
|
136
|
+
var e = Date.now();
|
|
137
|
+
if (n) {
|
|
138
|
+
if (e - i < trailingTimeout) return;
|
|
139
|
+
r = !0;
|
|
140
|
+
} else n = !0, r = !1, setTimeout(o, t);
|
|
141
|
+
i = e;
|
|
142
|
+
}
|
|
143
|
+
return s;
|
|
144
|
+
}
|
|
145
|
+
var REFRESH_DELAY = 20, transitionKeys = [
|
|
146
|
+
"top",
|
|
147
|
+
"right",
|
|
148
|
+
"bottom",
|
|
149
|
+
"left",
|
|
150
|
+
"width",
|
|
151
|
+
"height",
|
|
152
|
+
"size",
|
|
153
|
+
"weight"
|
|
154
|
+
], mutationObserverSupported = typeof MutationObserver < "u", ResizeObserverController = function() {
|
|
155
|
+
function e() {
|
|
156
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
157
|
+
}
|
|
158
|
+
return e.prototype.addObserver = function(e) {
|
|
159
|
+
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
160
|
+
}, e.prototype.removeObserver = function(e) {
|
|
161
|
+
var t = this.observers_, n = t.indexOf(e);
|
|
162
|
+
~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();
|
|
163
|
+
}, e.prototype.refresh = function() {
|
|
164
|
+
this.updateObservers_() && this.refresh();
|
|
165
|
+
}, e.prototype.updateObservers_ = function() {
|
|
166
|
+
var e = this.observers_.filter(function(e) {
|
|
167
|
+
return e.gatherActive(), e.hasActive();
|
|
168
|
+
});
|
|
169
|
+
return e.forEach(function(e) {
|
|
170
|
+
return e.broadcastActive();
|
|
171
|
+
}), e.length > 0;
|
|
172
|
+
}, e.prototype.connect_ = function() {
|
|
173
|
+
!isBrowser || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), mutationObserverSupported ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
174
|
+
attributes: !0,
|
|
175
|
+
childList: !0,
|
|
176
|
+
characterData: !0,
|
|
177
|
+
subtree: !0
|
|
178
|
+
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
179
|
+
}, e.prototype.disconnect_ = function() {
|
|
180
|
+
!isBrowser || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
181
|
+
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
182
|
+
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
183
|
+
transitionKeys.some(function(e) {
|
|
184
|
+
return !!~n.indexOf(e);
|
|
185
|
+
}) && this.refresh();
|
|
186
|
+
}, e.getInstance = function() {
|
|
187
|
+
return this.instance_ ||= new e(), this.instance_;
|
|
188
|
+
}, e.instance_ = null, e;
|
|
189
|
+
}(), defineConfigurable = (function(e, t) {
|
|
190
|
+
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
191
|
+
var i = r[n];
|
|
192
|
+
Object.defineProperty(e, i, {
|
|
193
|
+
value: t[i],
|
|
194
|
+
enumerable: !1,
|
|
195
|
+
writable: !1,
|
|
196
|
+
configurable: !0
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return e;
|
|
200
|
+
}), getWindowOf = (function(e) {
|
|
201
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || global$1;
|
|
202
|
+
}), emptyRect = createRectInit(0, 0, 0, 0);
|
|
203
|
+
function toFloat(e) {
|
|
204
|
+
return parseFloat(e) || 0;
|
|
205
|
+
}
|
|
206
|
+
function getBordersSize(e) {
|
|
207
|
+
return [...arguments].slice(1).reduce(function(t, n) {
|
|
208
|
+
var r = e["border-" + n + "-width"];
|
|
209
|
+
return t + toFloat(r);
|
|
210
|
+
}, 0);
|
|
211
|
+
}
|
|
212
|
+
function getPaddings(e) {
|
|
213
|
+
for (var t = [
|
|
214
|
+
"top",
|
|
215
|
+
"right",
|
|
216
|
+
"bottom",
|
|
217
|
+
"left"
|
|
218
|
+
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
219
|
+
var a = i[r], o = e["padding-" + a];
|
|
220
|
+
n[a] = toFloat(o);
|
|
221
|
+
}
|
|
222
|
+
return n;
|
|
223
|
+
}
|
|
224
|
+
function getSVGContentRect(e) {
|
|
225
|
+
var t = e.getBBox();
|
|
226
|
+
return createRectInit(0, 0, t.width, t.height);
|
|
227
|
+
}
|
|
228
|
+
function getHTMLElementContentRect(e) {
|
|
229
|
+
var t = e.clientWidth, n = e.clientHeight;
|
|
230
|
+
if (!t && !n) return emptyRect;
|
|
231
|
+
var r = getWindowOf(e).getComputedStyle(e), i = getPaddings(r), a = i.left + i.right, o = i.top + i.bottom, s = toFloat(r.width), c = toFloat(r.height);
|
|
232
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= getBordersSize(r, "left", "right") + a), Math.round(c + o) !== n && (c -= getBordersSize(r, "top", "bottom") + o)), !isDocumentElement(e)) {
|
|
233
|
+
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
234
|
+
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
235
|
+
}
|
|
236
|
+
return createRectInit(i.left, i.top, s, c);
|
|
237
|
+
}
|
|
238
|
+
var isSVGGraphicsElement = (function() {
|
|
239
|
+
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
240
|
+
return e instanceof getWindowOf(e).SVGGraphicsElement;
|
|
241
|
+
} : function(e) {
|
|
242
|
+
return e instanceof getWindowOf(e).SVGElement && typeof e.getBBox == "function";
|
|
243
|
+
};
|
|
244
|
+
})();
|
|
245
|
+
function isDocumentElement(e) {
|
|
246
|
+
return e === getWindowOf(e).document.documentElement;
|
|
247
|
+
}
|
|
248
|
+
function getContentRect(e) {
|
|
249
|
+
return isBrowser ? isSVGGraphicsElement(e) ? getSVGContentRect(e) : getHTMLElementContentRect(e) : emptyRect;
|
|
250
|
+
}
|
|
251
|
+
function createReadOnlyRect(e) {
|
|
252
|
+
var t = e.x, n = e.y, r = e.width, i = e.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
|
|
253
|
+
return defineConfigurable(o, {
|
|
254
|
+
x: t,
|
|
255
|
+
y: n,
|
|
256
|
+
width: r,
|
|
257
|
+
height: i,
|
|
258
|
+
top: n,
|
|
259
|
+
right: t + r,
|
|
260
|
+
bottom: i + n,
|
|
261
|
+
left: t
|
|
262
|
+
}), o;
|
|
263
|
+
}
|
|
264
|
+
function createRectInit(e, t, n, r) {
|
|
265
|
+
return {
|
|
266
|
+
x: e,
|
|
267
|
+
y: t,
|
|
268
|
+
width: n,
|
|
269
|
+
height: r
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
var ResizeObservation = function() {
|
|
273
|
+
function e(e) {
|
|
274
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = createRectInit(0, 0, 0, 0), this.target = e;
|
|
275
|
+
}
|
|
276
|
+
return e.prototype.isActive = function() {
|
|
277
|
+
var e = getContentRect(this.target);
|
|
278
|
+
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
279
|
+
}, e.prototype.broadcastRect = function() {
|
|
280
|
+
var e = this.contentRect_;
|
|
281
|
+
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
282
|
+
}, e;
|
|
283
|
+
}(), ResizeObserverEntry = function() {
|
|
284
|
+
function e(e, t) {
|
|
285
|
+
var n = createReadOnlyRect(t);
|
|
286
|
+
defineConfigurable(this, {
|
|
287
|
+
target: e,
|
|
288
|
+
contentRect: n
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
return e;
|
|
292
|
+
}(), ResizeObserverSPI = function() {
|
|
293
|
+
function e(e, t, n) {
|
|
294
|
+
if (this.activeObservations_ = [], this.observations_ = new MapShim(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
295
|
+
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
296
|
+
}
|
|
297
|
+
return e.prototype.observe = function(e) {
|
|
298
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
299
|
+
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
300
|
+
if (!(e instanceof getWindowOf(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
301
|
+
var t = this.observations_;
|
|
302
|
+
t.has(e) || (t.set(e, new ResizeObservation(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
303
|
+
}
|
|
304
|
+
}, e.prototype.unobserve = function(e) {
|
|
305
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
306
|
+
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
307
|
+
if (!(e instanceof getWindowOf(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
308
|
+
var t = this.observations_;
|
|
309
|
+
t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
|
|
310
|
+
}
|
|
311
|
+
}, e.prototype.disconnect = function() {
|
|
312
|
+
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
|
|
313
|
+
}, e.prototype.gatherActive = function() {
|
|
314
|
+
var e = this;
|
|
315
|
+
this.clearActive(), this.observations_.forEach(function(t) {
|
|
316
|
+
t.isActive() && e.activeObservations_.push(t);
|
|
317
|
+
});
|
|
318
|
+
}, e.prototype.broadcastActive = function() {
|
|
319
|
+
if (this.hasActive()) {
|
|
320
|
+
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
321
|
+
return new ResizeObserverEntry(e.target, e.broadcastRect());
|
|
322
|
+
});
|
|
323
|
+
this.callback_.call(e, t, e), this.clearActive();
|
|
324
|
+
}
|
|
325
|
+
}, e.prototype.clearActive = function() {
|
|
326
|
+
this.activeObservations_.splice(0);
|
|
327
|
+
}, e.prototype.hasActive = function() {
|
|
328
|
+
return this.activeObservations_.length > 0;
|
|
329
|
+
}, e;
|
|
330
|
+
}(), observers = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new MapShim(), ResizeObserver = function() {
|
|
331
|
+
function e(t) {
|
|
332
|
+
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
333
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
334
|
+
var n = new ResizeObserverSPI(t, ResizeObserverController.getInstance(), this);
|
|
335
|
+
observers.set(this, n);
|
|
336
|
+
}
|
|
337
|
+
return e;
|
|
338
|
+
}();
|
|
339
|
+
[
|
|
340
|
+
"observe",
|
|
341
|
+
"unobserve",
|
|
342
|
+
"disconnect"
|
|
343
|
+
].forEach(function(e) {
|
|
344
|
+
ResizeObserver.prototype[e] = function() {
|
|
345
|
+
var t;
|
|
346
|
+
return (t = observers.get(this))[e].apply(t, arguments);
|
|
347
|
+
};
|
|
348
|
+
});
|
|
349
|
+
var ResizeObserver_es_default = (function() {
|
|
350
|
+
return global$1.ResizeObserver === void 0 ? ResizeObserver : global$1.ResizeObserver;
|
|
351
|
+
})(), import_classnames$1 = /* @__PURE__ */ __toESM(require_classnames(), 1);
|
|
125
352
|
function GenericComboBox(e) {
|
|
126
|
-
let { options: t, selectedOptions: n, getLabel: r, onChange: i, ...a } = e, o = t.map(r), s = o.map((e) => ({ label: e }))
|
|
127
|
-
return /* @__PURE__ */
|
|
353
|
+
let { options: t, selectedOptions: n, getLabel: r, onChange: i, ...a } = e, o = t.map(r), s = o.map((e) => ({ label: e }));
|
|
354
|
+
return /* @__PURE__ */ jsx(EuiComboBox, {
|
|
128
355
|
options: s,
|
|
129
|
-
selectedOptions:
|
|
356
|
+
selectedOptions: n.filter((e) => t.indexOf(e) !== -1).map((e) => s[t.indexOf(e)]),
|
|
130
357
|
onChange: (e) => {
|
|
131
358
|
i(e.map(({ label: e }) => t[o.indexOf(e)]));
|
|
132
359
|
},
|
|
@@ -134,7 +361,6 @@ function GenericComboBox(e) {
|
|
|
134
361
|
...a
|
|
135
362
|
});
|
|
136
363
|
}
|
|
137
|
-
var import_target = /* @__PURE__ */ __toESM(require_target(), 1);
|
|
138
364
|
function getFieldFromFilter(e, t) {
|
|
139
365
|
return t.fields.find((t) => t.name === e.meta.key);
|
|
140
366
|
}
|
|
@@ -150,7 +376,7 @@ function getOperatorOptions(e) {
|
|
|
150
376
|
function validateParams(e, t) {
|
|
151
377
|
switch (t) {
|
|
152
378
|
case "date":
|
|
153
|
-
let t = typeof e == "string" ?
|
|
379
|
+
let t = typeof e == "string" ? dateMath.parse(e) : null;
|
|
154
380
|
return !!(typeof e == "string" && t && t.isValid());
|
|
155
381
|
case "ip": try {
|
|
156
382
|
return !!new Ipv4Address(e);
|
|
@@ -190,7 +416,7 @@ var PhraseSuggestorUI = class extends React.Component {
|
|
|
190
416
|
onSearchChange = (e) => {
|
|
191
417
|
this.updateSuggestions(`${e}`);
|
|
192
418
|
};
|
|
193
|
-
updateSuggestions = (0, import_lodash$
|
|
419
|
+
updateSuggestions = (0, import_lodash$9.debounce)(async (e = "") => {
|
|
194
420
|
this.abortController && this.abortController.abort(), this.abortController = new AbortController();
|
|
195
421
|
let { indexPattern: t, field: n, dateRangeFrom: r, dateRangeTo: i, timeField: a } = this.props;
|
|
196
422
|
if (!n || !this.isSuggestingValues()) return;
|
|
@@ -214,69 +440,56 @@ var PhraseSuggestorUI = class extends React.Component {
|
|
|
214
440
|
}, 500);
|
|
215
441
|
};
|
|
216
442
|
withKibana(PhraseSuggestorUI);
|
|
217
|
-
var import_lodash$
|
|
443
|
+
var import_lodash$8 = require_lodash();
|
|
218
444
|
const ValueInputType = class extends Component {
|
|
219
445
|
render() {
|
|
220
446
|
let e = this.props.value, t;
|
|
221
447
|
switch (this.props.type) {
|
|
222
448
|
case "string":
|
|
223
|
-
t = /* @__PURE__ */
|
|
449
|
+
t = /* @__PURE__ */ jsx(Input, {
|
|
224
450
|
placeholder: this.props.placeholder,
|
|
225
451
|
value: e,
|
|
226
452
|
onChange: this.onChange,
|
|
227
|
-
controlOnly: this.props.controlOnly,
|
|
228
453
|
className: this.props.className
|
|
229
454
|
});
|
|
230
455
|
break;
|
|
231
456
|
case "number":
|
|
232
|
-
t = /* @__PURE__ */
|
|
457
|
+
t = /* @__PURE__ */ jsx(InputNumber, {
|
|
233
458
|
placeholder: this.props.placeholder,
|
|
234
459
|
value: typeof e == "string" ? parseFloat(e) : e,
|
|
235
|
-
onChange: this.onChange,
|
|
236
|
-
|
|
237
|
-
className: this.props.className
|
|
460
|
+
onChange: (e) => this.props.onChange(e === null ? "" : `${e}`),
|
|
461
|
+
className: `w-full ${this.props.className}`
|
|
238
462
|
});
|
|
239
463
|
break;
|
|
240
464
|
case "date":
|
|
241
|
-
t = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EuiFieldText, {
|
|
242
|
-
placeholder: this.props.placeholder,
|
|
243
|
-
value: e,
|
|
244
|
-
onChange: this.onChange,
|
|
245
|
-
onBlur: this.onBlur,
|
|
246
|
-
isInvalid: !(0, import_lodash$9.isEmpty)(e) && !validateParams(e, this.props.type),
|
|
247
|
-
controlOnly: this.props.controlOnly,
|
|
248
|
-
className: this.props.className
|
|
249
|
-
});
|
|
250
|
-
break;
|
|
251
465
|
case "ip":
|
|
252
|
-
|
|
466
|
+
let n = (0, import_lodash$8.isEmpty)(e) || validateParams(e, this.props.type);
|
|
467
|
+
t = /* @__PURE__ */ jsx(Input, {
|
|
253
468
|
placeholder: this.props.placeholder,
|
|
254
469
|
value: e,
|
|
470
|
+
status: n ? "" : "error",
|
|
255
471
|
onChange: this.onChange,
|
|
256
|
-
|
|
257
|
-
controlOnly: this.props.controlOnly,
|
|
472
|
+
onBlur: this.onBlur,
|
|
258
473
|
className: this.props.className
|
|
259
474
|
});
|
|
260
475
|
break;
|
|
261
476
|
case "boolean":
|
|
262
|
-
t = /* @__PURE__ */
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
],
|
|
277
|
-
|
|
278
|
-
onChange: this.onBoolChange,
|
|
279
|
-
className: this.props.className
|
|
477
|
+
t = /* @__PURE__ */ jsx(Select, {
|
|
478
|
+
placeholder: this.props.placeholder,
|
|
479
|
+
value: e === void 0 ? void 0 : String(e),
|
|
480
|
+
onChange: (e) => {
|
|
481
|
+
let t = e === "true";
|
|
482
|
+
this.props.onChange(t);
|
|
483
|
+
},
|
|
484
|
+
className: `w-full ${this.props.className}`,
|
|
485
|
+
options: [{
|
|
486
|
+
value: "true",
|
|
487
|
+
label: "true"
|
|
488
|
+
}, {
|
|
489
|
+
value: "false",
|
|
490
|
+
label: "false"
|
|
491
|
+
}],
|
|
492
|
+
allowClear: !0
|
|
280
493
|
});
|
|
281
494
|
break;
|
|
282
495
|
default: break;
|
|
@@ -298,12 +511,14 @@ const ValueInputType = class extends Component {
|
|
|
298
511
|
}
|
|
299
512
|
};
|
|
300
513
|
};
|
|
301
|
-
var import_lodash$
|
|
514
|
+
var import_lodash$7 = require_lodash();
|
|
515
|
+
const PhraseValueInput = withKibana(class extends PhraseSuggestorUI {
|
|
302
516
|
render() {
|
|
303
|
-
return /* @__PURE__ */ (
|
|
304
|
-
label:
|
|
305
|
-
|
|
306
|
-
|
|
517
|
+
return /* @__PURE__ */ jsx(Form.Item, {
|
|
518
|
+
label: this.props.label,
|
|
519
|
+
className: "!mb-12px",
|
|
520
|
+
children: this.isSuggestingValues() ? this.renderWithSuggestions() : /* @__PURE__ */ jsx(ValueInputType, {
|
|
521
|
+
placeholder: "",
|
|
307
522
|
value: this.props.value,
|
|
308
523
|
onChange: this.props.onChange,
|
|
309
524
|
type: this.props.field ? this.props.field.type : "string"
|
|
@@ -311,92 +526,107 @@ var import_lodash$8 = require_lodash(), PhraseValueInputUI = class extends Phras
|
|
|
311
526
|
});
|
|
312
527
|
}
|
|
313
528
|
renderWithSuggestions() {
|
|
314
|
-
let e = Array.isArray(this.state.suggestions) ? this.state.suggestions : [], { value: t,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
529
|
+
let e = Array.isArray(this.state.suggestions) ? this.state.suggestions : [], { value: t, onChange: n } = this.props, r = t === void 0 ? void 0 : String(t), i = (r ? (0, import_lodash$7.uniq)([r, ...e]) : e).map((e) => ({
|
|
530
|
+
label: e,
|
|
531
|
+
value: e
|
|
532
|
+
}));
|
|
533
|
+
return /* @__PURE__ */ jsx(Select, {
|
|
534
|
+
mode: "tags",
|
|
535
|
+
maxCount: 1,
|
|
536
|
+
placeholder: "",
|
|
537
|
+
value: r,
|
|
538
|
+
onChange: (e) => {
|
|
539
|
+
n(Array.isArray(e) ? e[e.length - 1] : e);
|
|
540
|
+
},
|
|
541
|
+
showSearch: { onSearch: this.onSearchChange },
|
|
542
|
+
options: i,
|
|
543
|
+
allowClear: !1,
|
|
544
|
+
style: { width: "100%" }
|
|
326
545
|
});
|
|
327
546
|
}
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
const PhraseValueInput = withKibana(PhraseValueInputUI);
|
|
333
|
-
var import_lodash$7 = require_lodash(), PhrasesValuesInputUI = class extends PhraseSuggestorUI {
|
|
547
|
+
});
|
|
548
|
+
var import_lodash$6 = require_lodash();
|
|
549
|
+
const PhrasesValuesInput = withKibana(class extends PhraseSuggestorUI {
|
|
334
550
|
render() {
|
|
335
|
-
let { suggestions: e } = this.state, { values: t,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
551
|
+
let { suggestions: e } = this.state, { values: t, onChange: n } = this.props, r = (t ? (0, import_lodash$6.uniq)([...t, ...e]) : e).map((e) => ({
|
|
552
|
+
label: e,
|
|
553
|
+
value: e
|
|
554
|
+
}));
|
|
555
|
+
return /* @__PURE__ */ jsx(Form.Item, {
|
|
556
|
+
label: this.props.label,
|
|
557
|
+
className: "!mb-12px",
|
|
558
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
559
|
+
mode: "tags",
|
|
560
|
+
placeholder: "",
|
|
561
|
+
value: t || [],
|
|
562
|
+
options: r,
|
|
563
|
+
onChange: (e) => {
|
|
564
|
+
n(e);
|
|
565
|
+
},
|
|
566
|
+
showSearch: { onSearch: this.onSearchChange },
|
|
567
|
+
allowClear: !1,
|
|
568
|
+
style: { width: "100%" },
|
|
569
|
+
tokenSeparators: [","]
|
|
348
570
|
})
|
|
349
571
|
});
|
|
350
572
|
}
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
return GenericComboBox(e);
|
|
354
|
-
}
|
|
355
|
-
const PhrasesValuesInput = withKibana(PhrasesValuesInputUI);
|
|
356
|
-
init_moment();
|
|
357
|
-
var import_lodash$6 = require_lodash();
|
|
573
|
+
});
|
|
574
|
+
var import_moment_timezone = /* @__PURE__ */ __toESM(require_moment_timezone(), 1);
|
|
358
575
|
function RangeValueInputUI(e) {
|
|
359
|
-
useKibana();
|
|
360
576
|
let t = e.field ? e.field.type : "string", n = (e) => {
|
|
361
577
|
if (typeof e != "string" && typeof e != "number") return e;
|
|
362
|
-
let t =
|
|
363
|
-
return t.isValid() ? t
|
|
364
|
-
}, r = (t) => {
|
|
365
|
-
if (typeof
|
|
578
|
+
let t = (0, import_moment_timezone.default)(e).tz("Browser");
|
|
579
|
+
return t.isValid() ? t.format("YYYY-MM-DDTHH:mm:ss.SSSZ") : e;
|
|
580
|
+
}, r = (t, n) => {
|
|
581
|
+
if (typeof n != "string" && typeof n != "number") throw Error("Range params must be a string or number");
|
|
366
582
|
e.onChange({
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
});
|
|
370
|
-
}, a = (t) => {
|
|
371
|
-
if (typeof t != "string" && typeof t != "number") throw Error("Range params must be a string or number");
|
|
372
|
-
e.onChange({
|
|
373
|
-
from: (0, import_lodash$6.get)(e, "value.from"),
|
|
374
|
-
to: t
|
|
583
|
+
...e.value,
|
|
584
|
+
[t]: n
|
|
375
585
|
});
|
|
376
586
|
};
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
587
|
+
return /* @__PURE__ */ jsx(Form.Item, {
|
|
588
|
+
label: e.label,
|
|
589
|
+
className: "!mb-12px",
|
|
590
|
+
children: /* @__PURE__ */ jsxs(Space.Compact, {
|
|
591
|
+
style: { width: "100%" },
|
|
592
|
+
children: [
|
|
593
|
+
/* @__PURE__ */ jsx(ValueInputType, {
|
|
594
|
+
controlOnly: !0,
|
|
595
|
+
type: t,
|
|
596
|
+
value: e.value?.from,
|
|
597
|
+
onChange: (e) => r("from", e),
|
|
598
|
+
onBlur: (t) => {
|
|
599
|
+
r("from", n(t?.target?.value ?? e.value?.from));
|
|
600
|
+
},
|
|
601
|
+
placeholder: "",
|
|
602
|
+
className: "!w-[calc(50%-15px)]"
|
|
603
|
+
}),
|
|
604
|
+
/* @__PURE__ */ jsx(Input, {
|
|
605
|
+
style: {
|
|
606
|
+
width: 31,
|
|
607
|
+
borderLeft: 0,
|
|
608
|
+
borderRight: 0,
|
|
609
|
+
pointerEvents: "none",
|
|
610
|
+
backgroundColor: "transparent",
|
|
611
|
+
textAlign: "center"
|
|
612
|
+
},
|
|
613
|
+
placeholder: "→",
|
|
614
|
+
disabled: !0
|
|
615
|
+
}),
|
|
616
|
+
/* @__PURE__ */ jsx(ValueInputType, {
|
|
617
|
+
controlOnly: !0,
|
|
618
|
+
type: t,
|
|
619
|
+
value: e.value?.to,
|
|
620
|
+
onChange: (e) => r("to", e),
|
|
621
|
+
onBlur: (t) => {
|
|
622
|
+
r("to", n(t?.target?.value ?? e.value?.to));
|
|
623
|
+
},
|
|
624
|
+
placeholder: "",
|
|
625
|
+
className: "!w-[calc(50%-15px)]"
|
|
626
|
+
})
|
|
627
|
+
]
|
|
398
628
|
})
|
|
399
|
-
})
|
|
629
|
+
});
|
|
400
630
|
}
|
|
401
631
|
const RangeValueInput = RangeValueInputUI;
|
|
402
632
|
var import_lodash$5 = require_lodash(), FilterEditorUI = class extends Component {
|
|
@@ -413,62 +643,70 @@ var import_lodash$5 = require_lodash(), FilterEditorUI = class extends Component
|
|
|
413
643
|
};
|
|
414
644
|
}
|
|
415
645
|
render() {
|
|
416
|
-
|
|
646
|
+
let e = this.props.i18n?.filter?.item || {};
|
|
647
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
417
648
|
className: "ant-popover-title !p-12px !uppercase !mb-0 !border-b-1px !border-b-solid !border-[var(--ant-color-border)] flex items-center justify-between",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ jsx("div", { children: this.props.title }), /* @__PURE__ */ jsx(Button, {
|
|
419
650
|
className: "h-auto px-0",
|
|
420
651
|
type: "link",
|
|
421
652
|
onClick: this.toggleCustomEditor,
|
|
422
|
-
children: this.state.isCustomEditorOpen ? "Edit filter values" : "Edit as Query DSL"
|
|
653
|
+
children: this.state.isCustomEditorOpen ? e.edit_values || "Edit filter values" : e.edit_dsl || "Edit as Query DSL"
|
|
423
654
|
})]
|
|
424
|
-
}), /* @__PURE__ */
|
|
655
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
425
656
|
className: "globalFilterItem__editorForm",
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
657
|
+
children: /* @__PURE__ */ jsxs(Form, {
|
|
658
|
+
layout: "vertical",
|
|
659
|
+
children: [
|
|
660
|
+
this.renderIndexPatternInput(),
|
|
661
|
+
this.state.isCustomEditorOpen ? this.renderCustomEditor() : this.renderRegularEditor(),
|
|
662
|
+
/* @__PURE__ */ jsx(Form.Item, {
|
|
663
|
+
className: "!mb-12px",
|
|
664
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
665
|
+
className: "flex items-center gap-8px",
|
|
666
|
+
children: [/* @__PURE__ */ jsx(Switch, {
|
|
667
|
+
size: "small",
|
|
668
|
+
id: "filterEditorCustomLabelSwitch",
|
|
669
|
+
checked: this.state.useCustomLabel,
|
|
670
|
+
onChange: this.onCustomLabelSwitchChange
|
|
671
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
672
|
+
className: "text-[var(--ant-form-label-color)] text-[var(--ant-form-label-font-size)]",
|
|
673
|
+
children: e.create_label || "Create custom label?"
|
|
674
|
+
})]
|
|
675
|
+
})
|
|
676
|
+
}),
|
|
677
|
+
this.state.useCustomLabel && /* @__PURE__ */ jsx(Form.Item, {
|
|
678
|
+
className: "!mb-12px",
|
|
679
|
+
label: e.custom_label || "Custom label",
|
|
680
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
681
|
+
value: `${this.state.customLabel}`,
|
|
682
|
+
onChange: this.onCustomLabelChange
|
|
683
|
+
})
|
|
684
|
+
}),
|
|
685
|
+
/* @__PURE__ */ jsxs("div", {
|
|
686
|
+
className: "text-right",
|
|
687
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
688
|
+
className: "w-80px",
|
|
689
|
+
type: "text",
|
|
690
|
+
onClick: this.props.onCancel,
|
|
691
|
+
children: e.cancel || "Cancel"
|
|
692
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
693
|
+
className: "w-80px",
|
|
694
|
+
type: "primary",
|
|
695
|
+
onClick: this.onSubmit,
|
|
696
|
+
disabled: !this.isFilterValid(),
|
|
697
|
+
children: e.save || "Save"
|
|
698
|
+
})]
|
|
444
699
|
})
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
className: "mt-16px text-right",
|
|
448
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
449
|
-
className: "w-80px",
|
|
450
|
-
size: "large",
|
|
451
|
-
type: "text",
|
|
452
|
-
onClick: this.props.onCancel,
|
|
453
|
-
children: "Cancel"
|
|
454
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
455
|
-
className: "w-80px",
|
|
456
|
-
size: "large",
|
|
457
|
-
type: "primary",
|
|
458
|
-
onClick: this.onSubmit,
|
|
459
|
-
disabled: !this.isFilterValid(),
|
|
460
|
-
children: "Save"
|
|
461
|
-
})]
|
|
462
|
-
})
|
|
463
|
-
] })
|
|
700
|
+
]
|
|
701
|
+
})
|
|
464
702
|
})] });
|
|
465
703
|
}
|
|
466
704
|
renderIndexPatternInput() {
|
|
467
705
|
if (this.props.indexPatterns.length <= 1 && this.props.indexPatterns.find((e) => e === this.getIndexPatternFromFilter())) return "";
|
|
468
706
|
let { selectedIndexPattern: e } = this.state;
|
|
469
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ jsx(EuiFlexGroup, { children: /* @__PURE__ */ jsx(EuiFlexItem, { children: /* @__PURE__ */ jsx(EuiFormRow, {
|
|
470
708
|
label: "Index Pattern",
|
|
471
|
-
children: /* @__PURE__ */
|
|
709
|
+
children: /* @__PURE__ */ jsx(IndexPatternComboBox, {
|
|
472
710
|
placeholder: "Select an index pattern",
|
|
473
711
|
options: this.props.indexPatterns,
|
|
474
712
|
selectedOptions: e ? [e] : [],
|
|
@@ -481,80 +719,81 @@ var import_lodash$5 = require_lodash(), FilterEditorUI = class extends Component
|
|
|
481
719
|
}) }) });
|
|
482
720
|
}
|
|
483
721
|
renderRegularEditor() {
|
|
484
|
-
return /* @__PURE__ */
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EuiFlexItem, {
|
|
489
|
-
grow: 2,
|
|
490
|
-
children: this.renderFieldInput()
|
|
491
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EuiFlexItem, {
|
|
492
|
-
grow: !1,
|
|
493
|
-
style: { flexBasis: 160 },
|
|
494
|
-
children: this.renderOperatorInput()
|
|
495
|
-
})]
|
|
496
|
-
}),
|
|
497
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EuiSpacer, { size: "s" }),
|
|
498
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
499
|
-
"data-test-subj": "filterParams",
|
|
500
|
-
children: this.renderParamsEditor()
|
|
501
|
-
})
|
|
722
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
723
|
+
this.renderFieldInput(),
|
|
724
|
+
this.renderOperatorInput(),
|
|
725
|
+
this.renderParamsEditor()
|
|
502
726
|
] });
|
|
503
727
|
}
|
|
504
728
|
renderFieldInput() {
|
|
505
|
-
let { selectedIndexPattern: e, selectedField: t } = this.state, n = e ? getFilterableFields(e) : [];
|
|
506
|
-
return /* @__PURE__ */ (
|
|
507
|
-
label: "Field",
|
|
508
|
-
|
|
729
|
+
let { selectedIndexPattern: e, selectedField: t } = this.state, n = e ? getFilterableFields(e) : [], r = this.props.i18n?.filter?.item || {};
|
|
730
|
+
return /* @__PURE__ */ jsx(Form.Item, {
|
|
731
|
+
label: r.field || "Field",
|
|
732
|
+
className: "!mb-12px",
|
|
733
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
509
734
|
id: "fieldInput",
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
735
|
+
showSearch: !0,
|
|
736
|
+
disabled: !e,
|
|
737
|
+
value: t?.name,
|
|
738
|
+
onChange: (e) => {
|
|
739
|
+
let t = n.find((t) => t.name === e);
|
|
740
|
+
this.onFieldChange([t]);
|
|
741
|
+
},
|
|
742
|
+
options: n.map((e) => ({
|
|
743
|
+
label: e.name,
|
|
744
|
+
value: e.name
|
|
745
|
+
})),
|
|
746
|
+
allowClear: !1,
|
|
747
|
+
style: { width: "100%" }
|
|
520
748
|
})
|
|
521
749
|
});
|
|
522
750
|
}
|
|
523
751
|
renderOperatorInput() {
|
|
524
|
-
let { selectedField: e, selectedOperator: t } = this.state, n = e ? getOperatorOptions(e) : [];
|
|
525
|
-
return /* @__PURE__ */ (
|
|
526
|
-
label: "Operator",
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
onChange:
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
752
|
+
let { selectedField: e, selectedOperator: t } = this.state, n = e ? getOperatorOptions(e) : [], r = this.props.i18n?.filter?.item || {}, i = this.props.i18n?.filter?.operators || {};
|
|
753
|
+
return /* @__PURE__ */ jsx(Form.Item, {
|
|
754
|
+
label: r.operator || "Operator",
|
|
755
|
+
className: "!mb-12px",
|
|
756
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
757
|
+
id: "fieldInput",
|
|
758
|
+
showSearch: !0,
|
|
759
|
+
disabled: !e,
|
|
760
|
+
value: t?.message,
|
|
761
|
+
onChange: (e) => {
|
|
762
|
+
let t = n.find((t) => t.message === e);
|
|
763
|
+
this.onOperatorChange([t]);
|
|
764
|
+
},
|
|
765
|
+
options: n.map((e) => ({
|
|
766
|
+
label: i[`${e.type}${e.negate ? "_false" : "_true"}`] || e.message,
|
|
767
|
+
value: e.message
|
|
768
|
+
})),
|
|
769
|
+
allowClear: !1,
|
|
770
|
+
style: { width: "100%" }
|
|
537
771
|
})
|
|
538
772
|
});
|
|
539
773
|
}
|
|
540
774
|
renderCustomEditor() {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
775
|
+
let e = this.props.i18n?.filter?.item || {};
|
|
776
|
+
return /* @__PURE__ */ jsx(Form.Item, {
|
|
777
|
+
label: e.dsl || "Query DSL",
|
|
778
|
+
className: "!mb-12px",
|
|
779
|
+
children: /* @__PURE__ */ jsx(Ft, {
|
|
544
780
|
value: this.state.queryDsl,
|
|
545
781
|
onChange: (e) => this.onQueryDslChange(e || ""),
|
|
546
782
|
language: "json",
|
|
547
783
|
width: "100%",
|
|
548
|
-
height: "250px"
|
|
784
|
+
height: "250px",
|
|
785
|
+
theme: this.props.theme === "dark" ? "vs-dark" : "light",
|
|
786
|
+
className: "border border-solid border-[var(--ant-color-border)] rounded-6px overflow-hidden"
|
|
549
787
|
})
|
|
550
788
|
});
|
|
551
789
|
}
|
|
552
790
|
renderParamsEditor() {
|
|
553
791
|
let e = this.state.selectedIndexPattern;
|
|
554
792
|
if (!e || !this.state.selectedOperator) return "";
|
|
793
|
+
let t = this.props.i18n?.filter?.item || {};
|
|
555
794
|
switch (this.state.selectedOperator.type) {
|
|
556
795
|
case "exists": return "";
|
|
557
|
-
case "phrase": return /* @__PURE__ */
|
|
796
|
+
case "phrase": return /* @__PURE__ */ jsx(PhraseValueInput, {
|
|
558
797
|
indexPattern: e,
|
|
559
798
|
field: this.state.selectedField,
|
|
560
799
|
value: this.state.params,
|
|
@@ -563,9 +802,10 @@ var import_lodash$5 = require_lodash(), FilterEditorUI = class extends Component
|
|
|
563
802
|
services: this.props.services,
|
|
564
803
|
dateRangeFrom: this.props.dateRangeFrom,
|
|
565
804
|
dateRangeTo: this.props.dateRangeTo,
|
|
566
|
-
timeField: this.props.timeField
|
|
805
|
+
timeField: this.props.timeField,
|
|
806
|
+
label: t.value || "Value"
|
|
567
807
|
});
|
|
568
|
-
case "phrases": return /* @__PURE__ */
|
|
808
|
+
case "phrases": return /* @__PURE__ */ jsx(PhrasesValuesInput, {
|
|
569
809
|
indexPattern: e,
|
|
570
810
|
field: this.state.selectedField,
|
|
571
811
|
values: this.state.params,
|
|
@@ -573,12 +813,18 @@ var import_lodash$5 = require_lodash(), FilterEditorUI = class extends Component
|
|
|
573
813
|
services: this.props.services,
|
|
574
814
|
dateRangeFrom: this.props.dateRangeFrom,
|
|
575
815
|
dateRangeTo: this.props.dateRangeTo,
|
|
576
|
-
timeField: this.props.timeField
|
|
816
|
+
timeField: this.props.timeField,
|
|
817
|
+
label: t.values || "Values"
|
|
577
818
|
});
|
|
578
|
-
case "range": return /* @__PURE__ */
|
|
819
|
+
case "range": return /* @__PURE__ */ jsx(RangeValueInput, {
|
|
579
820
|
field: this.state.selectedField,
|
|
580
821
|
value: this.state.params,
|
|
581
|
-
onChange: this.onParamsChange
|
|
822
|
+
onChange: this.onParamsChange,
|
|
823
|
+
services: this.props.services,
|
|
824
|
+
dateRangeFrom: this.props.dateRangeFrom,
|
|
825
|
+
dateRangeTo: this.props.dateRangeTo,
|
|
826
|
+
timeField: this.props.timeField,
|
|
827
|
+
label: t.range || "Range"
|
|
582
828
|
});
|
|
583
829
|
}
|
|
584
830
|
}
|
|
@@ -669,29 +915,26 @@ var import_lodash$5 = require_lodash(), FilterEditorUI = class extends Component
|
|
|
669
915
|
function IndexPatternComboBox(e) {
|
|
670
916
|
return GenericComboBox(e);
|
|
671
917
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
let [c, l] = useInnerText(),
|
|
680
|
-
return isFilterPinned(e) && (
|
|
681
|
-
title:
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
iconOnClick: t,
|
|
687
|
-
iconOnClickAriaLabel: "Delete",
|
|
918
|
+
const FilterEditor = (e) => {
|
|
919
|
+
let { i18n: t } = useContext(GlobalConfigContext);
|
|
920
|
+
return /* @__PURE__ */ jsx(FilterEditorUI, {
|
|
921
|
+
...e,
|
|
922
|
+
i18n: t
|
|
923
|
+
});
|
|
924
|
+
}, FilterView = ({ filter: e, iconOnClick: t, onClick: n, valueLabel: r, errorMessage: i, filterLabelStatus: a, className: o, ...s }) => {
|
|
925
|
+
let [c, l] = useInnerText(), d = i || `Filter: ${l}. Select for more filter actions.`;
|
|
926
|
+
return isFilterPinned(e) && (d = `'Pinned', ${d}`), e.meta.disabled && (d = `'Disabled', ${d}`), /* @__PURE__ */ jsx(Tag, {
|
|
927
|
+
title: d,
|
|
928
|
+
closable: !0,
|
|
929
|
+
onClose: (e) => {
|
|
930
|
+
e.preventDefault(), t();
|
|
931
|
+
},
|
|
688
932
|
onClick: n,
|
|
689
|
-
|
|
933
|
+
className: `${o} !bg-transparent !p-0 !text-14px flex items-center`,
|
|
690
934
|
...s,
|
|
691
|
-
|
|
692
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
935
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
693
936
|
ref: c,
|
|
694
|
-
children: /* @__PURE__ */
|
|
937
|
+
children: /* @__PURE__ */ jsx(FilterLabel, {
|
|
695
938
|
filter: e,
|
|
696
939
|
valueLabel: r,
|
|
697
940
|
filterLabelStatus: a
|
|
@@ -701,139 +944,121 @@ const FilterEditor = FilterEditorUI, FilterView = ({ filter: e, iconOnClick: t,
|
|
|
701
944
|
};
|
|
702
945
|
var FILTER_ITEM_OK = "", FILTER_ITEM_WARNING = "warn", FILTER_ITEM_ERROR = "error";
|
|
703
946
|
function FilterItem(e) {
|
|
704
|
-
let [
|
|
947
|
+
let [n, i] = useState(!1), [a, s] = useState(!1), [c, u] = useState(void 0), { id: d, filter: f, indexPatterns: m } = e, { i18n: h } = useContext(GlobalConfigContext), _ = h?.filter?.item || {};
|
|
705
948
|
useEffect(() => {
|
|
706
949
|
let t = e.filter.meta.index;
|
|
707
950
|
t ? getIndexPatterns().get(t).then((e) => {
|
|
708
|
-
|
|
951
|
+
u(!!e);
|
|
709
952
|
}).catch(() => {
|
|
710
|
-
|
|
711
|
-
}) :
|
|
953
|
+
u(!1);
|
|
954
|
+
}) : u(!0);
|
|
712
955
|
}, [e.filter.meta.index]);
|
|
713
|
-
function
|
|
714
|
-
|
|
956
|
+
function y(t) {
|
|
957
|
+
i(!1), e.onUpdate(t);
|
|
715
958
|
}
|
|
716
|
-
function
|
|
717
|
-
let t =
|
|
718
|
-
e.onUpdate(t);
|
|
719
|
-
}
|
|
720
|
-
function p() {
|
|
721
|
-
let t = toggleFilterNegated(l);
|
|
959
|
+
function b() {
|
|
960
|
+
let t = toggleFilterNegated(f);
|
|
722
961
|
e.onUpdate(t);
|
|
723
962
|
}
|
|
724
|
-
function
|
|
725
|
-
let t = toggleFilterDisabled(
|
|
963
|
+
function x() {
|
|
964
|
+
let t = toggleFilterDisabled(f);
|
|
726
965
|
e.onUpdate(t);
|
|
727
966
|
}
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
function _(e) {
|
|
732
|
-
let { disabled: t } = l.meta;
|
|
967
|
+
function C(e) {
|
|
968
|
+
let { disabled: t } = f.meta;
|
|
733
969
|
return t || e.status === FILTER_ITEM_ERROR;
|
|
734
970
|
}
|
|
735
|
-
function
|
|
736
|
-
return (0, import_classnames$
|
|
737
|
-
"globalFilterItem-isDisabled":
|
|
971
|
+
function w(t, n) {
|
|
972
|
+
return (0, import_classnames$1.default)("globalFilterItem", {
|
|
973
|
+
"globalFilterItem-isDisabled": C(n),
|
|
738
974
|
"globalFilterItem-isError": n.status === FILTER_ITEM_ERROR,
|
|
739
975
|
"globalFilterItem-isWarning": n.status === FILTER_ITEM_WARNING,
|
|
740
|
-
"globalFilterItem-isPinned": isFilterPinned(
|
|
976
|
+
"globalFilterItem-isPinned": isFilterPinned(f),
|
|
741
977
|
"globalFilterItem-isExcluded": t
|
|
742
978
|
}, e.className);
|
|
743
979
|
}
|
|
744
|
-
function
|
|
745
|
-
|
|
746
|
-
return `filter ${`filter-${_(e) ? "disabled" : "enabled"}`} ${t} ${n} ${`filter-${isFilterPinned(l) ? "pinned" : "unpinned"}`} ${r}`;
|
|
747
|
-
}
|
|
748
|
-
function b() {
|
|
749
|
-
return !e.indexPatterns.length || getIndexPatternFromFilter(l, u) ? !0 : u.map((e) => e.fields.map((e) => e.name)).reduce((e, t) => [...e, ...t], []).includes(l.meta?.key || "");
|
|
980
|
+
function E() {
|
|
981
|
+
return !e.indexPatterns.length || getIndexPatternFromFilter(f, m) ? !0 : m.map((e) => e.fields.map((e) => e.name)).reduce((e, t) => [...e, ...t], []).includes(f.meta?.key || "");
|
|
750
982
|
}
|
|
751
|
-
function
|
|
983
|
+
function D() {
|
|
752
984
|
let e = {
|
|
753
985
|
title: "",
|
|
754
986
|
message: "",
|
|
755
987
|
status: FILTER_ITEM_OK
|
|
756
988
|
};
|
|
757
|
-
if (
|
|
758
|
-
else if (
|
|
759
|
-
e.title = getDisplayValueFromFilter(
|
|
989
|
+
if (c === !1) e.status = FILTER_ITEM_ERROR, e.title = "Error", e.message = "Index pattern not found";
|
|
990
|
+
else if (E()) try {
|
|
991
|
+
e.title = getDisplayValueFromFilter(f, m);
|
|
760
992
|
} catch (t) {
|
|
761
993
|
e.status = FILTER_ITEM_ERROR, e.title = "Error", e.message = t.message;
|
|
762
994
|
}
|
|
763
995
|
else e.status = FILTER_ITEM_WARNING, e.title = "Warning", e.message = "Field {filter.meta.key} does not exist in current view";
|
|
764
996
|
return e;
|
|
765
997
|
}
|
|
766
|
-
if (
|
|
767
|
-
let
|
|
768
|
-
if (
|
|
769
|
-
let
|
|
770
|
-
filter:
|
|
771
|
-
valueLabel:
|
|
772
|
-
filterLabelStatus:
|
|
773
|
-
errorMessage:
|
|
774
|
-
className:
|
|
998
|
+
if (c === void 0) return null;
|
|
999
|
+
let O = D();
|
|
1000
|
+
if (O.status === FILTER_ITEM_ERROR && !f.meta.disabled) return f.meta.disabled = !0, e.onUpdate(f), null;
|
|
1001
|
+
let k = /* @__PURE__ */ jsx(FilterView, {
|
|
1002
|
+
filter: f,
|
|
1003
|
+
valueLabel: O.title,
|
|
1004
|
+
filterLabelStatus: O.status,
|
|
1005
|
+
errorMessage: O.message,
|
|
1006
|
+
className: w(f.meta.negate, O),
|
|
775
1007
|
iconOnClick: () => e.onRemove(),
|
|
776
|
-
onClick: () => {}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
classNames: { container: `!p-0 !overflow-hidden ${r ? "w-400px" : "w-256px"}` },
|
|
1008
|
+
onClick: () => {}
|
|
1009
|
+
}), { negate: A, disabled: j, index: M } = f.meta;
|
|
1010
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
1011
|
+
classNames: { container: `!p-0 !overflow-hidden ${a ? "w-400px" : "w-256px"}` },
|
|
781
1012
|
placement: "bottomLeft",
|
|
782
|
-
open:
|
|
1013
|
+
open: n,
|
|
783
1014
|
onOpenChange: (e) => {
|
|
784
|
-
e ||
|
|
1015
|
+
e || s(!1), i(e);
|
|
785
1016
|
},
|
|
786
|
-
content:
|
|
787
|
-
filter:
|
|
788
|
-
indexPatterns:
|
|
789
|
-
onSubmit:
|
|
1017
|
+
content: a ? /* @__PURE__ */ jsx(FilterEditor, {
|
|
1018
|
+
filter: f,
|
|
1019
|
+
indexPatterns: m,
|
|
1020
|
+
onSubmit: y,
|
|
790
1021
|
onCancel: () => {
|
|
791
|
-
|
|
1022
|
+
i(!1);
|
|
792
1023
|
},
|
|
793
|
-
services: e.services
|
|
794
|
-
|
|
1024
|
+
services: e.services,
|
|
1025
|
+
theme: e.theme,
|
|
1026
|
+
title: _.edit || "Edit filter"
|
|
1027
|
+
}) : /* @__PURE__ */ jsx(Menu, {
|
|
795
1028
|
className: "!border-0",
|
|
796
1029
|
classNames: { item: "!m-0 !px-12px !w-full !rounded-0" },
|
|
797
1030
|
mode: "vertical",
|
|
798
1031
|
items: [
|
|
799
|
-
{
|
|
800
|
-
key: "pin",
|
|
801
|
-
label: isFilterPinned(l) ? "Unpin" : "Pin across all apps",
|
|
802
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pin, { className: "w-14px h-14px" }),
|
|
803
|
-
onClick: () => {
|
|
804
|
-
n(!1), f();
|
|
805
|
-
}
|
|
806
|
-
},
|
|
807
|
-
k && {
|
|
1032
|
+
M && {
|
|
808
1033
|
key: "edit",
|
|
809
|
-
label: "Edit filter",
|
|
810
|
-
icon: /* @__PURE__ */
|
|
1034
|
+
label: _.edit || "Edit filter",
|
|
1035
|
+
icon: /* @__PURE__ */ jsx(Pencil, { className: "w-14px h-14px" }),
|
|
811
1036
|
onClick: () => {
|
|
812
|
-
|
|
1037
|
+
s(!0);
|
|
813
1038
|
}
|
|
814
1039
|
},
|
|
815
1040
|
{
|
|
816
1041
|
key: "include_exclude",
|
|
817
|
-
label:
|
|
818
|
-
icon:
|
|
1042
|
+
label: A ? _.include_results || "Include results" : _.exclude_results || "Exclude results",
|
|
1043
|
+
icon: jsx(A ? CirclePlus : CircleMinus, { className: "w-14px h-14px" }),
|
|
819
1044
|
onClick: () => {
|
|
820
|
-
|
|
1045
|
+
i(!1), b();
|
|
821
1046
|
}
|
|
822
1047
|
},
|
|
823
1048
|
{
|
|
824
1049
|
key: "enable_disabled",
|
|
825
|
-
label:
|
|
826
|
-
icon:
|
|
1050
|
+
label: j ? _.re_enable || "Re-enable" : _.temporarily_disable || "Temporarily disable",
|
|
1051
|
+
icon: jsx(j ? Eye : EyeOff, { className: "w-14px h-14px" }),
|
|
827
1052
|
onClick: () => {
|
|
828
|
-
|
|
1053
|
+
i(!1), x();
|
|
829
1054
|
}
|
|
830
1055
|
},
|
|
831
1056
|
{
|
|
832
1057
|
key: "delete",
|
|
833
|
-
label: "Delete",
|
|
834
|
-
icon: /* @__PURE__ */
|
|
1058
|
+
label: _.delete || "Delete",
|
|
1059
|
+
icon: /* @__PURE__ */ jsx(Trash2, { className: "w-14px h-14px" }),
|
|
835
1060
|
onClick: () => {
|
|
836
|
-
|
|
1061
|
+
i(!1), e.onRemove();
|
|
837
1062
|
}
|
|
838
1063
|
}
|
|
839
1064
|
].filter((e) => !!e)
|
|
@@ -842,29 +1067,30 @@ function FilterItem(e) {
|
|
|
842
1067
|
trigger: "click",
|
|
843
1068
|
destroyOnHidden: !0,
|
|
844
1069
|
arrow: !1,
|
|
845
|
-
children: /* @__PURE__ */
|
|
846
|
-
className: "
|
|
847
|
-
children:
|
|
1070
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1071
|
+
className: "px-8px",
|
|
1072
|
+
children: k
|
|
848
1073
|
})
|
|
849
1074
|
});
|
|
850
1075
|
}
|
|
851
|
-
var import_classnames
|
|
1076
|
+
var import_classnames = /* @__PURE__ */ __toESM(require_classnames(), 1);
|
|
852
1077
|
function FilterBarUI(e) {
|
|
853
1078
|
function t(t) {
|
|
854
1079
|
e.onFiltersUpdated && e.onFiltersUpdated(t);
|
|
855
1080
|
}
|
|
856
1081
|
function n() {
|
|
857
|
-
return e.filters.map((t, n) => /* @__PURE__ */
|
|
858
|
-
grow: !1,
|
|
1082
|
+
return e.filters.map((t, n) => /* @__PURE__ */ jsx("div", {
|
|
859
1083
|
className: "globalFilterBar__flexItem",
|
|
860
|
-
|
|
1084
|
+
style: { flex: "0 0 auto" },
|
|
1085
|
+
children: /* @__PURE__ */ jsx(FilterItem, {
|
|
861
1086
|
id: `${n}`,
|
|
862
1087
|
intl: e.intl,
|
|
863
1088
|
filter: t,
|
|
864
1089
|
onUpdate: (e) => i(n, e),
|
|
865
1090
|
onRemove: () => r(n),
|
|
866
1091
|
indexPatterns: e.indexPatterns,
|
|
867
|
-
services: e.services
|
|
1092
|
+
services: e.services,
|
|
1093
|
+
theme: e.theme
|
|
868
1094
|
})
|
|
869
1095
|
}, n));
|
|
870
1096
|
}
|
|
@@ -876,19 +1102,19 @@ function FilterBarUI(e) {
|
|
|
876
1102
|
let i = [...e.filters];
|
|
877
1103
|
i[n] = r, t(i);
|
|
878
1104
|
}
|
|
879
|
-
return /* @__PURE__ */
|
|
1105
|
+
return /* @__PURE__ */ jsx(Flex, {
|
|
880
1106
|
className: "globalFilterGroup",
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
children: /* @__PURE__ */
|
|
1107
|
+
vertical: !1,
|
|
1108
|
+
align: "flex-start",
|
|
1109
|
+
gap: 0,
|
|
1110
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
885
1111
|
className: "globalFilterGroup__filterFlexItem",
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
1112
|
+
style: { flex: 1 },
|
|
1113
|
+
children: /* @__PURE__ */ jsx(Flex, {
|
|
1114
|
+
className: (0, import_classnames.default)("globalFilterBar", e.className),
|
|
1115
|
+
wrap: "wrap",
|
|
1116
|
+
gap: 8,
|
|
1117
|
+
align: "center",
|
|
892
1118
|
children: n()
|
|
893
1119
|
})
|
|
894
1120
|
})
|
|
@@ -900,25 +1126,25 @@ var Loading_module_default = {
|
|
|
900
1126
|
tips: "_tips_16hnu_13"
|
|
901
1127
|
}, Loading_default = (e) => {
|
|
902
1128
|
let { loading: t = !0, currentLocales: n } = e;
|
|
903
|
-
return t ? /* @__PURE__ */
|
|
1129
|
+
return t ? /* @__PURE__ */ jsx("div", {
|
|
904
1130
|
className: Loading_module_default.loading,
|
|
905
|
-
children: /* @__PURE__ */
|
|
1131
|
+
children: /* @__PURE__ */ jsx(Spin, { tip: n["dropdownlist.loading"] })
|
|
906
1132
|
}) : null;
|
|
907
1133
|
}, Error_module_default = {
|
|
908
1134
|
error: "_error_1fev3_1",
|
|
909
1135
|
tips: "_tips_1fev3_14"
|
|
910
1136
|
}, Error_default = (e) => {
|
|
911
1137
|
let { currentLocales: t, failed: n = !0 } = e;
|
|
912
|
-
return n ? /* @__PURE__ */
|
|
1138
|
+
return n ? /* @__PURE__ */ jsxs("div", {
|
|
913
1139
|
className: Error_module_default.error,
|
|
914
|
-
children: [/* @__PURE__ */
|
|
1140
|
+
children: [/* @__PURE__ */ jsx(Icon, { component: CloseCircleOutlined }), /* @__PURE__ */ jsx("div", {
|
|
915
1141
|
className: Error_module_default.tips,
|
|
916
1142
|
children: t["dropdownlist.loading.failed"]
|
|
917
1143
|
})]
|
|
918
1144
|
}) : null;
|
|
919
|
-
}, Empty_module_default = { empty: "_empty_1bf3s_1" }, Empty_default = (e) => /* @__PURE__ */
|
|
1145
|
+
}, Empty_module_default = { empty: "_empty_1bf3s_1" }, Empty_default = (e) => /* @__PURE__ */ jsx("div", {
|
|
920
1146
|
className: Empty_module_default.empty,
|
|
921
|
-
children: /* @__PURE__ */
|
|
1147
|
+
children: /* @__PURE__ */ jsx(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE })
|
|
922
1148
|
}), List_module_default = {
|
|
923
1149
|
container: "_container_f1ixt_1",
|
|
924
1150
|
group: "_group_f1ixt_5",
|
|
@@ -948,32 +1174,32 @@ var Loading_module_default = {
|
|
|
948
1174
|
options: "_options_f1ixt_185",
|
|
949
1175
|
option: "_option_f1ixt_185"
|
|
950
1176
|
}, import_lodash$4 = require_lodash(), List_default = (e) => {
|
|
951
|
-
let { visible: t, value: n, onChange: r, loading: i = !1, failed: a = !1, rowKey: o, renderItem: s, renderTag: c, renderEmptyList: l, onSearchChange: u, searchValue: d, sorterOptions: f, pagination: p, data: m, sorter: h, onSorterChange: g, filters: _, onFiltersChange: v, filterOptions: y, groups: b, onGroupsChange: x, groupOptions: S, currentLocales: C, showGroup: w, onShowGroupChange: T, isMultiple: E, extraData: D = [], searchPlaceholder: O, onRefresh: k, actions: A = [] } = e, [j, M] = useState([]), [
|
|
1177
|
+
let { visible: t, value: n, onChange: r, loading: i = !1, failed: a = !1, rowKey: o, renderItem: s, renderTag: c, renderEmptyList: l, onSearchChange: u, searchValue: d, sorterOptions: f, pagination: p, data: m, sorter: h, onSorterChange: g, filters: _, onFiltersChange: v, filterOptions: y, groups: b, onGroupsChange: x, groupOptions: S, currentLocales: C, showGroup: w, onShowGroupChange: T, isMultiple: E, extraData: D = [], searchPlaceholder: O, onRefresh: k, actions: A = [] } = e, [j, M] = useState([]), [an, F] = useState(!1), I = useRef(null), L = useCallback(() => {
|
|
952
1178
|
setTimeout(() => {
|
|
953
1179
|
T(!1), u();
|
|
954
1180
|
}, 500);
|
|
955
|
-
}, [T, u]),
|
|
1181
|
+
}, [T, u]), R = (e) => {
|
|
956
1182
|
if (!e.disabled) if (E) {
|
|
957
1183
|
let t = (0, import_lodash$4.cloneDeep)(n) || [], i = t.findIndex((t) => t[o] === e[o]);
|
|
958
1184
|
i === -1 ? t.push(e) : t.splice(i, 1), r(t);
|
|
959
1185
|
} else r(e);
|
|
960
|
-
},
|
|
1186
|
+
}, z = () => {
|
|
961
1187
|
T(!w);
|
|
962
|
-
},
|
|
1188
|
+
}, V = (e, t) => {
|
|
963
1189
|
let n = [...b];
|
|
964
1190
|
n[e]?.value === t.value ? n.splice(e, 1) : n[e] = {
|
|
965
1191
|
key: t.key,
|
|
966
1192
|
value: t.value
|
|
967
1193
|
}, n.splice(e + 1, n.length), x(n);
|
|
968
|
-
},
|
|
1194
|
+
}, H = (e) => {
|
|
969
1195
|
u(e.trim());
|
|
970
|
-
},
|
|
1196
|
+
}, U = (e, t) => {
|
|
971
1197
|
let n = [...j];
|
|
972
1198
|
n[t] = e, M(n);
|
|
973
|
-
},
|
|
1199
|
+
}, W = (e, t, n) => {
|
|
974
1200
|
let r = (0, import_lodash$4.cloneDeep)(_), i = r[e] || [], a = i.indexOf(t);
|
|
975
1201
|
a === -1 ? n && i.push(t) : n || i.splice(a, 1), r[e] = i, v(r);
|
|
976
|
-
},
|
|
1202
|
+
}, G = (e) => {
|
|
977
1203
|
let t = (0, import_lodash$4.cloneDeep)(n || []);
|
|
978
1204
|
m.forEach((n) => {
|
|
979
1205
|
if (n.disabled) return;
|
|
@@ -982,238 +1208,238 @@ var Loading_module_default = {
|
|
|
982
1208
|
}), r(t);
|
|
983
1209
|
};
|
|
984
1210
|
useEffect(() => {
|
|
985
|
-
|
|
986
|
-
}, [t, F]), useEffect(() => {
|
|
987
|
-
t || I();
|
|
1211
|
+
I.current && t && I.current.focus();
|
|
988
1212
|
}, [t, I]), useEffect(() => {
|
|
1213
|
+
t || L();
|
|
1214
|
+
}, [t, L]), useEffect(() => {
|
|
989
1215
|
M(h);
|
|
990
1216
|
}, [h]);
|
|
991
|
-
let { currentPage:
|
|
1217
|
+
let { currentPage: K, pageSize: q, total: J, pages: Y } = p, sn = useMemo(() => b[0] === void 0 ? [] : S.find((e) => e.value === b[0].value)?.list || [], [S, b]), X = useMemo(() => {
|
|
992
1218
|
if (!E) return !1;
|
|
993
1219
|
if (E) return n?.length === 0 ? !1 : m.every((e) => n.findIndex((t) => t[o] === e[o]) !== -1) ? !0 : m.some((e) => n.findIndex((t) => t[o] === e[o]) !== -1) ? "indeterminate" : !1;
|
|
994
1220
|
}, [
|
|
995
1221
|
E,
|
|
996
1222
|
JSON.stringify(m),
|
|
997
1223
|
JSON.stringify(n)
|
|
998
|
-
]),
|
|
1224
|
+
]), Q = (e, t) => !w || e.length === 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
999
1225
|
className: List_module_default.group,
|
|
1000
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1226
|
+
children: e.map((e) => /* @__PURE__ */ jsxs("div", {
|
|
1001
1227
|
className: `${List_module_default.item} ${b[t]?.value === e.value ? List_module_default.selected : ""}`,
|
|
1002
|
-
onClick: () =>
|
|
1228
|
+
onClick: () => V(t, e),
|
|
1003
1229
|
title: e.label,
|
|
1004
|
-
children: [/* @__PURE__ */
|
|
1230
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1005
1231
|
className: List_module_default.label,
|
|
1006
1232
|
children: e.label
|
|
1007
|
-
}), /* @__PURE__ */
|
|
1233
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
1008
1234
|
component: RightOutlined,
|
|
1009
1235
|
className: List_module_default.icon
|
|
1010
1236
|
})]
|
|
1011
1237
|
}, e.value))
|
|
1012
|
-
}),
|
|
1238
|
+
}), $ = A.concat(k ? [/* @__PURE__ */ jsx("a", {
|
|
1013
1239
|
disabled: i,
|
|
1014
1240
|
onClick: () => {
|
|
1015
1241
|
i || k();
|
|
1016
1242
|
},
|
|
1017
1243
|
children: C["dropdownlist.refresh"]
|
|
1018
1244
|
})] : []);
|
|
1019
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1020
1246
|
className: `${List_module_default.container} css-var-r0`,
|
|
1021
1247
|
children: [
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
/* @__PURE__ */
|
|
1248
|
+
Q(S, 0),
|
|
1249
|
+
Q(sn, 1),
|
|
1250
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1025
1251
|
className: List_module_default.content,
|
|
1026
1252
|
children: [
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
ref:
|
|
1253
|
+
/* @__PURE__ */ jsx(Input, {
|
|
1254
|
+
ref: I,
|
|
1029
1255
|
value: d,
|
|
1030
1256
|
onChange: (e) => {
|
|
1031
1257
|
if (!i) {
|
|
1032
1258
|
let t = e.target.value;
|
|
1033
|
-
|
|
1259
|
+
H(t);
|
|
1034
1260
|
}
|
|
1035
1261
|
},
|
|
1036
1262
|
allowClear: !0,
|
|
1037
1263
|
className: List_module_default.search,
|
|
1038
1264
|
placeholder: O || C["dropdownlist.search.placeholder"]
|
|
1039
1265
|
}),
|
|
1040
|
-
/* @__PURE__ */
|
|
1266
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1041
1267
|
className: List_module_default.tools,
|
|
1042
|
-
children: [/* @__PURE__ */
|
|
1268
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1043
1269
|
className: List_module_default.result,
|
|
1044
1270
|
children: [
|
|
1045
1271
|
C["dropdownlist.result.found"],
|
|
1046
1272
|
" ",
|
|
1047
|
-
p === !1 ? m.length :
|
|
1273
|
+
p === !1 ? m.length : J,
|
|
1048
1274
|
" ",
|
|
1049
1275
|
C["dropdownlist.result.records"]
|
|
1050
1276
|
]
|
|
1051
|
-
}), /* @__PURE__ */
|
|
1277
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1052
1278
|
className: List_module_default.actions,
|
|
1053
1279
|
children: [
|
|
1054
|
-
f.length > 0 && /* @__PURE__ */
|
|
1055
|
-
open:
|
|
1056
|
-
onOpenChange:
|
|
1280
|
+
f.length > 0 && /* @__PURE__ */ jsx(Popover, {
|
|
1281
|
+
open: an,
|
|
1282
|
+
onOpenChange: F,
|
|
1057
1283
|
overlayClassName: List_module_default.filterPopover,
|
|
1058
1284
|
placement: "bottom",
|
|
1059
1285
|
trigger: "click",
|
|
1060
|
-
content: /* @__PURE__ */
|
|
1286
|
+
content: /* @__PURE__ */ jsxs("div", {
|
|
1061
1287
|
className: List_module_default.sorter,
|
|
1062
1288
|
children: [
|
|
1063
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ jsx("div", {
|
|
1064
1290
|
className: List_module_default.title,
|
|
1065
1291
|
children: C["dropdownlist.sort.by"]
|
|
1066
1292
|
}),
|
|
1067
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1068
1294
|
className: List_module_default.form,
|
|
1069
|
-
children: [/* @__PURE__ */
|
|
1295
|
+
children: [/* @__PURE__ */ jsx(Select, {
|
|
1070
1296
|
value: j[0],
|
|
1071
1297
|
style: { width: "65%" },
|
|
1072
|
-
onChange: (e) =>
|
|
1073
|
-
children: f.map((e) => /* @__PURE__ */
|
|
1298
|
+
onChange: (e) => U(e, 0),
|
|
1299
|
+
children: f.map((e) => /* @__PURE__ */ jsx(Select.Option, {
|
|
1074
1300
|
value: e.key,
|
|
1075
1301
|
children: e.label
|
|
1076
1302
|
}, e.key))
|
|
1077
|
-
}), /* @__PURE__ */
|
|
1303
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
1078
1304
|
value: j[1],
|
|
1079
1305
|
style: { width: "35%" },
|
|
1080
|
-
onChange: (e) =>
|
|
1081
|
-
children: [/* @__PURE__ */
|
|
1306
|
+
onChange: (e) => U(e, 1),
|
|
1307
|
+
children: [/* @__PURE__ */ jsx(Select.Option, {
|
|
1082
1308
|
value: "desc",
|
|
1083
1309
|
children: C["dropdownlist.sort.by.desc"]
|
|
1084
|
-
}), /* @__PURE__ */
|
|
1310
|
+
}), /* @__PURE__ */ jsx(Select.Option, {
|
|
1085
1311
|
value: "asc",
|
|
1086
1312
|
children: C["dropdownlist.sort.by.asc"]
|
|
1087
1313
|
})]
|
|
1088
1314
|
})]
|
|
1089
1315
|
}),
|
|
1090
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1091
1317
|
className: List_module_default.actions,
|
|
1092
|
-
children: [/* @__PURE__ */
|
|
1318
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
1093
1319
|
type: "link",
|
|
1094
1320
|
onClick: () => {
|
|
1095
|
-
g([]),
|
|
1321
|
+
g([]), F(!1);
|
|
1096
1322
|
},
|
|
1097
1323
|
children: C["dropdownlist.sort.by.clear"]
|
|
1098
|
-
}), /* @__PURE__ */
|
|
1324
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1099
1325
|
style: { width: 80 },
|
|
1100
1326
|
type: "primary",
|
|
1101
1327
|
onClick: () => {
|
|
1102
|
-
g(j),
|
|
1328
|
+
g(j), F(!1);
|
|
1103
1329
|
},
|
|
1104
1330
|
children: C["dropdownlist.apply"]
|
|
1105
1331
|
})]
|
|
1106
1332
|
})
|
|
1107
1333
|
]
|
|
1108
1334
|
}),
|
|
1109
|
-
children: /* @__PURE__ */
|
|
1335
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
1110
1336
|
style: { cursor: "pointer" },
|
|
1111
1337
|
component: SortAscendingOutlined
|
|
1112
1338
|
})
|
|
1113
1339
|
}),
|
|
1114
|
-
y.length > 0 && /* @__PURE__ */
|
|
1340
|
+
y.length > 0 && /* @__PURE__ */ jsx(Popover, {
|
|
1115
1341
|
overlayClassName: List_module_default.filterPopover,
|
|
1116
1342
|
placement: "bottom",
|
|
1117
1343
|
trigger: "click",
|
|
1118
|
-
content: /* @__PURE__ */
|
|
1344
|
+
content: /* @__PURE__ */ jsxs("div", {
|
|
1119
1345
|
className: List_module_default.filters,
|
|
1120
|
-
children: [/* @__PURE__ */
|
|
1346
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1121
1347
|
className: List_module_default.title,
|
|
1122
|
-
children: [C["dropdownlist.filters"], /* @__PURE__ */
|
|
1348
|
+
children: [C["dropdownlist.filters"], /* @__PURE__ */ jsx(Icon, {
|
|
1123
1349
|
className: List_module_default.clear,
|
|
1124
1350
|
component: ReloadOutlined,
|
|
1125
1351
|
onClick: () => {
|
|
1126
1352
|
v({});
|
|
1127
1353
|
}
|
|
1128
1354
|
})]
|
|
1129
|
-
}), y.map((e) => /* @__PURE__ */
|
|
1355
|
+
}), y.map((e) => /* @__PURE__ */ jsxs("div", {
|
|
1130
1356
|
className: List_module_default.content,
|
|
1131
|
-
children: [/* @__PURE__ */
|
|
1357
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1132
1358
|
className: List_module_default.label,
|
|
1133
1359
|
children: e.label
|
|
1134
|
-
}), /* @__PURE__ */
|
|
1360
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1135
1361
|
className: List_module_default.options,
|
|
1136
|
-
children: (e.list || []).map((t) => /* @__PURE__ */
|
|
1362
|
+
children: (e.list || []).map((t) => /* @__PURE__ */ jsxs("div", {
|
|
1137
1363
|
className: List_module_default.option,
|
|
1138
|
-
children: [/* @__PURE__ */
|
|
1139
|
-
onChange: (n) =>
|
|
1364
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
1365
|
+
onChange: (n) => W(e.key, t.value, n.target.checked),
|
|
1140
1366
|
checked: (_[e.key] || []).indexOf(t.value) !== -1,
|
|
1141
1367
|
children: t.label || t.value
|
|
1142
|
-
}), t.count !== void 0 && /* @__PURE__ */
|
|
1368
|
+
}), t.count !== void 0 && /* @__PURE__ */ jsx("div", { children: t.count })]
|
|
1143
1369
|
}, t.value))
|
|
1144
1370
|
})]
|
|
1145
1371
|
}, e.key))]
|
|
1146
1372
|
}),
|
|
1147
|
-
children: /* @__PURE__ */
|
|
1373
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
1148
1374
|
style: { cursor: "pointer" },
|
|
1149
1375
|
component: FilterOutlined
|
|
1150
1376
|
})
|
|
1151
1377
|
}),
|
|
1152
|
-
S.length > 0 && /* @__PURE__ */
|
|
1378
|
+
S.length > 0 && /* @__PURE__ */ jsx(Icon, {
|
|
1153
1379
|
style: { cursor: "pointer" },
|
|
1154
1380
|
component: LayoutOutlined,
|
|
1155
|
-
onClick:
|
|
1381
|
+
onClick: z
|
|
1156
1382
|
}),
|
|
1157
|
-
E && /* @__PURE__ */
|
|
1158
|
-
indeterminate:
|
|
1159
|
-
onChange: (e) =>
|
|
1160
|
-
checked:
|
|
1383
|
+
E && /* @__PURE__ */ jsx(Checkbox, {
|
|
1384
|
+
indeterminate: X === "indeterminate",
|
|
1385
|
+
onChange: (e) => G(e.target.checked),
|
|
1386
|
+
checked: X === !0
|
|
1161
1387
|
})
|
|
1162
1388
|
]
|
|
1163
1389
|
})]
|
|
1164
1390
|
}),
|
|
1165
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx("div", {
|
|
1166
1392
|
className: List_module_default.listWrapper,
|
|
1167
|
-
children: /* @__PURE__ */
|
|
1393
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1168
1394
|
className: List_module_default.list,
|
|
1169
|
-
style: { maxHeight: `${32 * (
|
|
1170
|
-
children: i ? /* @__PURE__ */
|
|
1395
|
+
style: { maxHeight: `${32 * (q + D.length)}px` },
|
|
1396
|
+
children: i ? /* @__PURE__ */ jsx(Loading_default, { currentLocales: C }) : a ? /* @__PURE__ */ jsx(Error_default, { currentLocales: C }) : m.length === 0 && D.length === 0 ? l ? l() : /* @__PURE__ */ jsx(Empty_default, {}) : D.concat(m).map((e) => {
|
|
1171
1397
|
let t = E ? (n || []).findIndex((t) => t[o] === e[o]) !== -1 : n?.[o] === e[o];
|
|
1172
|
-
return /* @__PURE__ */
|
|
1398
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1173
1399
|
className: `${List_module_default.item} ${t ? List_module_default.selected : ""} ${e.disabled ? List_module_default.disabled : ""}`,
|
|
1174
|
-
onClick: () =>
|
|
1400
|
+
onClick: () => R(e),
|
|
1175
1401
|
children: [
|
|
1176
|
-
/* @__PURE__ */
|
|
1402
|
+
/* @__PURE__ */ jsx("div", {
|
|
1177
1403
|
className: List_module_default.label,
|
|
1178
1404
|
children: s ? s(e) : e[o]
|
|
1179
1405
|
}),
|
|
1180
|
-
c && !w ? /* @__PURE__ */
|
|
1406
|
+
c && !w ? /* @__PURE__ */ jsx("div", {
|
|
1181
1407
|
className: List_module_default.tag,
|
|
1182
1408
|
children: s ? c(e) : e[o]
|
|
1183
1409
|
}) : null,
|
|
1184
|
-
t && /* @__PURE__ */
|
|
1410
|
+
t && /* @__PURE__ */ jsx(Icon, { component: CheckOutlined })
|
|
1185
1411
|
]
|
|
1186
1412
|
}, e[o]);
|
|
1187
1413
|
})
|
|
1188
1414
|
})
|
|
1189
1415
|
}),
|
|
1190
|
-
p === !1 ? null : /* @__PURE__ */
|
|
1416
|
+
p === !1 ? null : /* @__PURE__ */ jsx("div", {
|
|
1191
1417
|
className: List_module_default.footerWrapper,
|
|
1192
|
-
children: /* @__PURE__ */
|
|
1418
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1193
1419
|
className: List_module_default.footer,
|
|
1194
|
-
children: [/* @__PURE__ */
|
|
1420
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1195
1421
|
className: List_module_default.actions,
|
|
1196
|
-
children:
|
|
1197
|
-
}), /* @__PURE__ */
|
|
1422
|
+
children: $.map((e, t) => /* @__PURE__ */ jsxs(Fragment, { children: [e, t !== $.length - 1 && /* @__PURE__ */ jsx(Divider, { orientation: "vertical" })] }, t))
|
|
1423
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1198
1424
|
className: List_module_default.pager,
|
|
1199
1425
|
children: [
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
onClick: () => p.onChange(
|
|
1426
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
1427
|
+
onClick: () => p.onChange(K - 1),
|
|
1202
1428
|
component: LeftOutlined,
|
|
1203
|
-
className: `${List_module_default.icon} ${
|
|
1429
|
+
className: `${List_module_default.icon} ${K <= 1 ? List_module_default.disabled : ""}`
|
|
1204
1430
|
}),
|
|
1205
|
-
/* @__PURE__ */
|
|
1431
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1206
1432
|
className: List_module_default.pageNum,
|
|
1207
1433
|
children: [
|
|
1208
|
-
|
|
1434
|
+
K,
|
|
1209
1435
|
"/",
|
|
1210
|
-
|
|
1436
|
+
Y
|
|
1211
1437
|
]
|
|
1212
1438
|
}),
|
|
1213
|
-
/* @__PURE__ */
|
|
1214
|
-
onClick: () => p.onChange(
|
|
1439
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
1440
|
+
onClick: () => p.onChange(K + 1),
|
|
1215
1441
|
component: RightOutlined,
|
|
1216
|
-
className: `${List_module_default.icon} ${
|
|
1442
|
+
className: `${List_module_default.icon} ${K >= Y ? List_module_default.disabled : ""}`
|
|
1217
1443
|
})
|
|
1218
1444
|
]
|
|
1219
1445
|
})]
|
|
@@ -1269,7 +1495,7 @@ var Loading_module_default = {
|
|
|
1269
1495
|
let { currentPage: e, pageSize: t } = l;
|
|
1270
1496
|
return f.filter((n, r) => r >= (e - 1) * t && r < e * t);
|
|
1271
1497
|
}, [f, l]);
|
|
1272
|
-
return /* @__PURE__ */
|
|
1498
|
+
return /* @__PURE__ */ jsx(List_default, {
|
|
1273
1499
|
...e,
|
|
1274
1500
|
visible: t,
|
|
1275
1501
|
data: p,
|
|
@@ -1280,7 +1506,7 @@ var Loading_module_default = {
|
|
|
1280
1506
|
});
|
|
1281
1507
|
}, CustomList_default = (e) => {
|
|
1282
1508
|
let { visible: t, data: n = [], pagination: r = {} } = e, i = r.total || n.length, a = r.pageSize || 10;
|
|
1283
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ jsx(List_default, {
|
|
1284
1510
|
...e,
|
|
1285
1511
|
visible: t,
|
|
1286
1512
|
data: n,
|
|
@@ -1330,25 +1556,25 @@ var Loading_module_default = {
|
|
|
1330
1556
|
allowClear: "_allowClear_1nq1q_44",
|
|
1331
1557
|
popover: "_popover_1nq1q_50"
|
|
1332
1558
|
}, import_lodash$2 = require_lodash(), DropdownList_default = (e) => {
|
|
1333
|
-
let { className: t = "", popoverClassName: n = "", popoverPlacement: r = "bottomLeft", children: i, width: a = 300, dropdownWidth: o, locale: s = "en-US", allowClear: c = !1, mode: l = "", value: u, disabled: d = !1, onChange: f, placeholder: p = "", loading: m = !1, data: h = [], rowKey: g, renderItem: _, renderLabel: v, pagination: y, onSearchChange: b = () => {}, sorter: x = [], onSorterChange: S = () => {}, sorterOptions: C = [], filters: w = {}, onFiltersChange: T = () => {}, filterOptions: E = [], defaultGroupVisible: D = !1, groups: O = [], onGroupsChange: k = () => {}, groupOptions: A = [], onGroupVisibleChange: j = () => {}, autoAdjustOverflow: M = { adjustX: 1 }, getPopupContainer:
|
|
1334
|
-
|
|
1559
|
+
let { className: t = "", popoverClassName: n = "", popoverPlacement: r = "bottomLeft", children: i, width: a = 300, dropdownWidth: o, locale: s = "en-US", allowClear: c = !1, mode: l = "", value: u, disabled: d = !1, onChange: f, placeholder: p = "", loading: m = !1, data: h = [], rowKey: g, renderItem: _, renderLabel: v, pagination: y, onSearchChange: b = () => {}, sorter: x = [], onSorterChange: S = () => {}, sorterOptions: C = [], filters: w = {}, onFiltersChange: T = () => {}, filterOptions: E = [], defaultGroupVisible: D = !1, groups: O = [], onGroupsChange: k = () => {}, groupOptions: A = [], onGroupVisibleChange: j = () => {}, autoAdjustOverflow: M = { adjustX: 1 }, getPopupContainer: nn = (e) => e.parentNode, extraData: rn = [], showListIcon: an = !0 } = e, [N, P] = useState(!1), [F, I] = useState(D), [L, on] = useState(), [R, z] = useState(), B = useRef(null), V = useMemo(() => l === "multiple" && (u === void 0 || Array.isArray(u)), [l, u]), H = (e) => {
|
|
1560
|
+
P(e);
|
|
1561
|
+
}, U = (e) => {
|
|
1562
|
+
f(e), V || P(!1);
|
|
1563
|
+
}, W = (e) => {
|
|
1564
|
+
on(e), b(e);
|
|
1335
1565
|
}, G = (e) => {
|
|
1336
|
-
f(e), U || L(!1);
|
|
1337
|
-
}, K = (e) => {
|
|
1338
|
-
z(e), b(e);
|
|
1339
|
-
}, q = (e) => {
|
|
1340
1566
|
let t = (0, import_lodash$2.cloneDeep)(u) || [];
|
|
1341
1567
|
t.splice(e, 1), f(t);
|
|
1342
|
-
},
|
|
1343
|
-
f(
|
|
1344
|
-
},
|
|
1568
|
+
}, K = () => {
|
|
1569
|
+
f(V ? [] : void 0);
|
|
1570
|
+
}, q = () => {
|
|
1345
1571
|
let t = {
|
|
1346
1572
|
...e,
|
|
1347
1573
|
value: u,
|
|
1348
1574
|
loading: m,
|
|
1349
1575
|
data: h,
|
|
1350
|
-
onSearchChange:
|
|
1351
|
-
searchValue:
|
|
1576
|
+
onSearchChange: W,
|
|
1577
|
+
searchValue: L,
|
|
1352
1578
|
sorter: x,
|
|
1353
1579
|
onSorterChange: S,
|
|
1354
1580
|
sorterOptions: C,
|
|
@@ -1358,81 +1584,81 @@ var Loading_module_default = {
|
|
|
1358
1584
|
groups: O,
|
|
1359
1585
|
onGroupsChange: k,
|
|
1360
1586
|
groupOptions: A,
|
|
1361
|
-
visible:
|
|
1362
|
-
onChange:
|
|
1587
|
+
visible: N,
|
|
1588
|
+
onChange: U,
|
|
1363
1589
|
currentLocales: locales_default[s] || {},
|
|
1364
|
-
showGroup:
|
|
1590
|
+
showGroup: F,
|
|
1365
1591
|
onShowGroupChange: (e) => {
|
|
1366
|
-
|
|
1592
|
+
I(e), j(e);
|
|
1367
1593
|
},
|
|
1368
|
-
isMultiple:
|
|
1594
|
+
isMultiple: V
|
|
1369
1595
|
};
|
|
1370
|
-
return !y || !y.currentPage || !y.total ? /* @__PURE__ */
|
|
1371
|
-
},
|
|
1372
|
-
let e = /* @__PURE__ */
|
|
1596
|
+
return !y || !y.currentPage || !y.total ? /* @__PURE__ */ jsx(AutoList_default, { ...t }) : /* @__PURE__ */ jsx(CustomList_default, { ...t });
|
|
1597
|
+
}, J = (e) => v ? v(e) : _ ? _(e) : e[g], Y = () => {
|
|
1598
|
+
let e = /* @__PURE__ */ jsx("span", {
|
|
1373
1599
|
style: { color: "#999" },
|
|
1374
1600
|
children: p
|
|
1375
1601
|
});
|
|
1376
|
-
return
|
|
1602
|
+
return V ? u?.length > 0 ? /* @__PURE__ */ jsx(Fragment$1, { children: u.filter((e) => !!(e && e[g])).map((e, t) => /* @__PURE__ */ jsxs("span", {
|
|
1377
1603
|
className: `${index_module_default$1.multipleItem} common-ui-dropdownlist-multiple-item`,
|
|
1378
|
-
children: [
|
|
1604
|
+
children: [J(e), e.disabled ? null : /* @__PURE__ */ jsx(Icon, {
|
|
1379
1605
|
component: CloseOutlined,
|
|
1380
1606
|
style: {
|
|
1381
1607
|
marginLeft: 4,
|
|
1382
1608
|
fontSize: 10
|
|
1383
1609
|
},
|
|
1384
1610
|
onClick: (e) => {
|
|
1385
|
-
e.stopPropagation(),
|
|
1611
|
+
e.stopPropagation(), G(t);
|
|
1386
1612
|
}
|
|
1387
1613
|
})]
|
|
1388
|
-
}, t)) }) : e : u && u[g] ?
|
|
1614
|
+
}, t)) }) : e : u && u[g] ? J(u) : e;
|
|
1389
1615
|
};
|
|
1390
1616
|
useEffect(() => {
|
|
1391
|
-
!o && isNaN(Number(a)) &&
|
|
1617
|
+
!o && isNaN(Number(a)) && B.current && z(B.current.offsetWidth);
|
|
1392
1618
|
}, [
|
|
1393
1619
|
o,
|
|
1394
1620
|
a,
|
|
1395
|
-
|
|
1621
|
+
B
|
|
1396
1622
|
]);
|
|
1397
|
-
let
|
|
1398
|
-
isNaN(Number(
|
|
1399
|
-
let
|
|
1400
|
-
return /* @__PURE__ */
|
|
1623
|
+
let Z = o || a;
|
|
1624
|
+
isNaN(Number(Z)) ? R && (Z = `${R}px`) : Z = `${Z}px`, F && (Z = `calc(${Z} + ${120 * O.length || 120}px)`);
|
|
1625
|
+
let cn = Y();
|
|
1626
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1401
1627
|
className: `${index_module_default$1.dropdownList} ${t}`,
|
|
1402
1628
|
style: { width: a },
|
|
1403
|
-
ref:
|
|
1404
|
-
children: /* @__PURE__ */
|
|
1405
|
-
open: d ? !1 :
|
|
1406
|
-
onOpenChange:
|
|
1629
|
+
ref: B,
|
|
1630
|
+
children: /* @__PURE__ */ jsx(Popover, {
|
|
1631
|
+
open: d ? !1 : N,
|
|
1632
|
+
onOpenChange: H,
|
|
1407
1633
|
placement: r,
|
|
1408
|
-
content:
|
|
1634
|
+
content: q(),
|
|
1409
1635
|
trigger: "click",
|
|
1410
1636
|
overlayClassName: `${index_module_default$1.popover} ${n}`,
|
|
1411
1637
|
overlayStyle: {
|
|
1412
|
-
width:
|
|
1638
|
+
width: Z,
|
|
1413
1639
|
maxHeight: 126 + (y?.pageSize || 10) * 32
|
|
1414
1640
|
},
|
|
1415
1641
|
autoAdjustOverflow: M,
|
|
1416
|
-
getPopupContainer:
|
|
1417
|
-
children: i || /* @__PURE__ */
|
|
1642
|
+
getPopupContainer: nn,
|
|
1643
|
+
children: i || /* @__PURE__ */ jsx(Button, {
|
|
1418
1644
|
style: { width: "100%" },
|
|
1419
1645
|
disabled: d,
|
|
1420
1646
|
className: `${index_module_default$1.button} css-var-r0 common-ui-dropdownlist-select ${c ? index_module_default$1.allowClear : ""}`,
|
|
1421
|
-
children: /* @__PURE__ */
|
|
1647
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1422
1648
|
className: index_module_default$1.content,
|
|
1423
1649
|
children: [
|
|
1424
|
-
|
|
1425
|
-
/* @__PURE__ */
|
|
1650
|
+
an && /* @__PURE__ */ jsx(BarsOutlined, { className: index_module_default$1.icon }),
|
|
1651
|
+
/* @__PURE__ */ jsx("div", {
|
|
1426
1652
|
className: index_module_default$1.label,
|
|
1427
|
-
children: /* @__PURE__ */
|
|
1653
|
+
children: /* @__PURE__ */ jsx("span", { children: cn })
|
|
1428
1654
|
}),
|
|
1429
|
-
/* @__PURE__ */
|
|
1430
|
-
component:
|
|
1655
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
1656
|
+
component: N ? UpOutlined : DownOutlined,
|
|
1431
1657
|
className: index_module_default$1.down
|
|
1432
1658
|
}),
|
|
1433
|
-
c && /* @__PURE__ */
|
|
1659
|
+
c && /* @__PURE__ */ jsx(Icon, {
|
|
1434
1660
|
onClick: (e) => {
|
|
1435
|
-
e.stopPropagation(),
|
|
1661
|
+
e.stopPropagation(), K();
|
|
1436
1662
|
},
|
|
1437
1663
|
theme: "filled",
|
|
1438
1664
|
component: CloseCircleOutlined,
|
|
@@ -1445,10 +1671,11 @@ var Loading_module_default = {
|
|
|
1445
1671
|
});
|
|
1446
1672
|
}, index_module_default = {}, IndexPatternSelect_default = (e) => {
|
|
1447
1673
|
let { selectedIndexPattern: t, onIndexPatternChange: n, indices: r = [] } = e, [i, a] = useState([]), [o, s] = useState({ type: ["index", "specialIndex"] }), c = useMemo(() => r?.map((e) => ({
|
|
1448
|
-
id: e,
|
|
1449
|
-
title: e,
|
|
1450
|
-
name: e,
|
|
1451
|
-
type: e.startsWith(".") ? "specialIndex" : "index"
|
|
1674
|
+
id: e.name,
|
|
1675
|
+
title: e.name,
|
|
1676
|
+
name: e.name,
|
|
1677
|
+
type: e.name?.startsWith(".") ? "specialIndex" : "index",
|
|
1678
|
+
_source: e
|
|
1452
1679
|
})) || [], [r]), l = useMemo(() => [{
|
|
1453
1680
|
label: "Type",
|
|
1454
1681
|
key: "type",
|
|
@@ -1460,7 +1687,7 @@ var Loading_module_default = {
|
|
|
1460
1687
|
value: "specialIndex"
|
|
1461
1688
|
}]
|
|
1462
1689
|
}], []);
|
|
1463
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ jsx(DropdownList_default, {
|
|
1464
1691
|
className: index_module_default.indexPatternSelect,
|
|
1465
1692
|
width: 282,
|
|
1466
1693
|
value: {
|
|
@@ -1474,7 +1701,8 @@ var Loading_module_default = {
|
|
|
1474
1701
|
placeholder: "Please select",
|
|
1475
1702
|
rowKey: "id",
|
|
1476
1703
|
data: c,
|
|
1477
|
-
renderItem: (e) => /* @__PURE__ */
|
|
1704
|
+
renderItem: (e) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TableOutlined, { className: "mr-4px" }), e.name] }),
|
|
1705
|
+
renderTag: (e) => e._source?.docs ? /* @__PURE__ */ jsx(Tag, { children: e._source.docs }) : null,
|
|
1478
1706
|
renderLabel: (e) => e.name,
|
|
1479
1707
|
renderEmptyList: () => null,
|
|
1480
1708
|
searchKey: "name",
|
|
@@ -1488,8 +1716,7 @@ var Loading_module_default = {
|
|
|
1488
1716
|
onFiltersChange: s,
|
|
1489
1717
|
filterOptions: l
|
|
1490
1718
|
});
|
|
1491
|
-
}
|
|
1492
|
-
const FilterOptions = class extends Component {
|
|
1719
|
+
}, FilterOptionsUI = class extends Component {
|
|
1493
1720
|
state = { isPopoverOpen: !1 };
|
|
1494
1721
|
togglePopover = () => {
|
|
1495
1722
|
this.setState((e) => ({ isPopoverOpen: !e.isPopoverOpen }));
|
|
@@ -1498,7 +1725,8 @@ const FilterOptions = class extends Component {
|
|
|
1498
1725
|
this.setState({ isPopoverOpen: !1 });
|
|
1499
1726
|
};
|
|
1500
1727
|
render() {
|
|
1501
|
-
|
|
1728
|
+
let e = this.props.i18n?.filter?.all || {};
|
|
1729
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
1502
1730
|
classNames: {
|
|
1503
1731
|
container: "!p-0 !overflow-hidden",
|
|
1504
1732
|
title: "!p-12px !uppercase !mb-0 !border-b-1px !border-b-solid !border-[var(--ant-color-border)]"
|
|
@@ -1508,7 +1736,7 @@ const FilterOptions = class extends Component {
|
|
|
1508
1736
|
onOpenChange: (e) => {
|
|
1509
1737
|
this.setState({ isPopoverOpen: e });
|
|
1510
1738
|
},
|
|
1511
|
-
content: /* @__PURE__ */
|
|
1739
|
+
content: /* @__PURE__ */ jsx(Menu, {
|
|
1512
1740
|
onClick: () => {},
|
|
1513
1741
|
className: "!border-0",
|
|
1514
1742
|
classNames: { item: "!m-0 !px-12px !w-full !rounded-0" },
|
|
@@ -1516,137 +1744,130 @@ const FilterOptions = class extends Component {
|
|
|
1516
1744
|
items: [
|
|
1517
1745
|
{
|
|
1518
1746
|
key: "enable",
|
|
1519
|
-
label: "Enable all",
|
|
1520
|
-
icon: /* @__PURE__ */
|
|
1747
|
+
label: e.enable || "Enable all",
|
|
1748
|
+
icon: /* @__PURE__ */ jsx(Eye, { className: "w-14px h-14px" }),
|
|
1521
1749
|
onClick: () => {
|
|
1522
1750
|
this.closePopover(), this.props.onEnableAll();
|
|
1523
1751
|
}
|
|
1524
1752
|
},
|
|
1525
1753
|
{
|
|
1526
1754
|
key: "disable",
|
|
1527
|
-
label: "Disable all",
|
|
1528
|
-
icon: /* @__PURE__ */
|
|
1755
|
+
label: e.disable || "Disable all",
|
|
1756
|
+
icon: /* @__PURE__ */ jsx(EyeOff, { className: "w-14px h-14px" }),
|
|
1529
1757
|
onClick: () => {
|
|
1530
1758
|
this.closePopover(), this.props.onDisableAll();
|
|
1531
1759
|
}
|
|
1532
1760
|
},
|
|
1533
|
-
{
|
|
1534
|
-
key: "pin",
|
|
1535
|
-
label: "Pin all",
|
|
1536
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Pin, { className: "w-14px h-14px" }),
|
|
1537
|
-
onClick: () => {
|
|
1538
|
-
this.closePopover(), this.props.onPinAll();
|
|
1539
|
-
}
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
key: "unpin",
|
|
1543
|
-
label: "Unpin all",
|
|
1544
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PinOff, { className: "w-14px h-14px" }),
|
|
1545
|
-
onClick: () => {
|
|
1546
|
-
this.closePopover(), this.props.onUnpinAll();
|
|
1547
|
-
}
|
|
1548
|
-
},
|
|
1549
1761
|
{
|
|
1550
1762
|
key: "invert_inclusion",
|
|
1551
|
-
label: "Invert inclusion",
|
|
1552
|
-
icon: /* @__PURE__ */
|
|
1763
|
+
label: e.invert_inclusion || "Invert inclusion",
|
|
1764
|
+
icon: /* @__PURE__ */ jsx(SquaresExclude, { className: "w-14px h-14px" }),
|
|
1553
1765
|
onClick: () => {
|
|
1554
1766
|
this.closePopover(), this.props.onToggleAllNegated();
|
|
1555
1767
|
}
|
|
1556
1768
|
},
|
|
1557
1769
|
{
|
|
1558
|
-
key: "
|
|
1559
|
-
label: "Invert enabled/disabled",
|
|
1560
|
-
icon: /* @__PURE__ */
|
|
1770
|
+
key: "invert_enable_disable",
|
|
1771
|
+
label: e.invert_enable_disable || "Invert enabled/disabled",
|
|
1772
|
+
icon: /* @__PURE__ */ jsx(Eye, { className: "w-14px h-14px" }),
|
|
1561
1773
|
onClick: () => {
|
|
1562
1774
|
this.closePopover(), this.props.onToggleAllDisabled();
|
|
1563
1775
|
}
|
|
1564
1776
|
},
|
|
1565
1777
|
{
|
|
1566
1778
|
key: "remove_all",
|
|
1567
|
-
label: "Remove all",
|
|
1568
|
-
icon: /* @__PURE__ */
|
|
1779
|
+
label: e.remove_all || "Remove all",
|
|
1780
|
+
icon: /* @__PURE__ */ jsx(Trash2, { className: "w-14px h-14px" }),
|
|
1569
1781
|
onClick: () => {
|
|
1570
1782
|
this.closePopover(), this.props.onRemoveAll();
|
|
1571
1783
|
}
|
|
1572
1784
|
}
|
|
1573
1785
|
]
|
|
1574
1786
|
}),
|
|
1575
|
-
title: "Change all filters",
|
|
1787
|
+
title: e.title || "Change all filters",
|
|
1576
1788
|
trigger: "click",
|
|
1577
1789
|
destroyOnHidden: !0,
|
|
1578
1790
|
arrow: !1,
|
|
1579
|
-
children: /* @__PURE__ */
|
|
1791
|
+
children: /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(ListFilter, { className: "w-14px h-14px" }) })
|
|
1580
1792
|
});
|
|
1581
1793
|
}
|
|
1582
1794
|
};
|
|
1795
|
+
const FilterOptions = (e) => {
|
|
1796
|
+
let { i18n: t } = useContext(GlobalConfigContext);
|
|
1797
|
+
return /* @__PURE__ */ jsx(FilterOptionsUI, {
|
|
1798
|
+
...e,
|
|
1799
|
+
i18n: t
|
|
1800
|
+
});
|
|
1801
|
+
};
|
|
1583
1802
|
function FilterActions(e) {
|
|
1584
|
-
let [
|
|
1585
|
-
function
|
|
1586
|
-
let [
|
|
1587
|
-
return /* @__PURE__ */
|
|
1803
|
+
let [n, r] = useState(!1), { i18n: i } = useContext(GlobalConfigContext), a = i?.filter?.item || {};
|
|
1804
|
+
function s() {
|
|
1805
|
+
let [i] = e.indexPatterns, o = buildEmptyFilter(!0, i && i.id);
|
|
1806
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
1588
1807
|
classNames: {
|
|
1589
1808
|
container: "!p-0 !overflow-hidden w-400px",
|
|
1590
1809
|
title: "!p-12px !mb-0 !border-b-1px !border-b-solid !border-[var(--ant-color-border)]"
|
|
1591
1810
|
},
|
|
1592
1811
|
placement: "bottom",
|
|
1593
|
-
open:
|
|
1594
|
-
onOpenChange:
|
|
1595
|
-
content: /* @__PURE__ */
|
|
1596
|
-
filter:
|
|
1812
|
+
open: n,
|
|
1813
|
+
onOpenChange: r,
|
|
1814
|
+
content: /* @__PURE__ */ jsx(FilterEditor, {
|
|
1815
|
+
filter: o,
|
|
1597
1816
|
indexPatterns: e.indexPatterns,
|
|
1598
|
-
onSubmit:
|
|
1599
|
-
onCancel: () =>
|
|
1817
|
+
onSubmit: l,
|
|
1818
|
+
onCancel: () => r(!1),
|
|
1600
1819
|
services: e.services,
|
|
1601
1820
|
dateRangeFrom: e.dateRangeFrom,
|
|
1602
1821
|
dateRangeTo: e.dateRangeTo,
|
|
1603
|
-
timeField: e.timeField
|
|
1604
|
-
|
|
1822
|
+
timeField: e.timeField,
|
|
1823
|
+
theme: e.theme,
|
|
1824
|
+
title: a.create || "Add filter"
|
|
1825
|
+
}, JSON.stringify(o)),
|
|
1605
1826
|
title: null,
|
|
1606
1827
|
trigger: "click",
|
|
1607
1828
|
destroyOnHidden: !0,
|
|
1608
1829
|
arrow: !1,
|
|
1609
|
-
children: /* @__PURE__ */
|
|
1830
|
+
children: /* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(CirclePlus, { className: "w-14px h-14px" }) })
|
|
1610
1831
|
});
|
|
1611
1832
|
}
|
|
1612
|
-
function
|
|
1833
|
+
function c(t) {
|
|
1613
1834
|
e.onFiltersUpdated && e.onFiltersUpdated(t);
|
|
1614
1835
|
}
|
|
1615
|
-
function
|
|
1616
|
-
|
|
1836
|
+
function l(t) {
|
|
1837
|
+
r(!1), c([...e.filters, t]);
|
|
1617
1838
|
}
|
|
1618
|
-
function
|
|
1619
|
-
|
|
1839
|
+
function u() {
|
|
1840
|
+
c(e.filters.map(enableFilter));
|
|
1620
1841
|
}
|
|
1621
|
-
function
|
|
1622
|
-
|
|
1842
|
+
function d() {
|
|
1843
|
+
c(e.filters.map(disableFilter));
|
|
1623
1844
|
}
|
|
1624
|
-
function
|
|
1625
|
-
|
|
1845
|
+
function f() {
|
|
1846
|
+
c(e.filters.map(pinFilter));
|
|
1626
1847
|
}
|
|
1627
|
-
function
|
|
1628
|
-
|
|
1848
|
+
function h() {
|
|
1849
|
+
c(e.filters.map(unpinFilter));
|
|
1629
1850
|
}
|
|
1630
|
-
function
|
|
1631
|
-
|
|
1851
|
+
function _() {
|
|
1852
|
+
c(e.filters.map(toggleFilterNegated));
|
|
1632
1853
|
}
|
|
1633
|
-
function
|
|
1634
|
-
|
|
1854
|
+
function v() {
|
|
1855
|
+
c(e.filters.map(toggleFilterDisabled));
|
|
1635
1856
|
}
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1857
|
+
function x() {
|
|
1858
|
+
c([]);
|
|
1638
1859
|
}
|
|
1639
|
-
return /* @__PURE__ */
|
|
1640
|
-
onEnableAll:
|
|
1641
|
-
onDisableAll:
|
|
1642
|
-
onPinAll:
|
|
1643
|
-
onUnpinAll:
|
|
1644
|
-
onToggleAllNegated:
|
|
1645
|
-
onToggleAllDisabled:
|
|
1646
|
-
onRemoveAll:
|
|
1647
|
-
}),
|
|
1860
|
+
return /* @__PURE__ */ jsxs(Space.Compact, { children: [/* @__PURE__ */ jsx(FilterOptions, {
|
|
1861
|
+
onEnableAll: u,
|
|
1862
|
+
onDisableAll: d,
|
|
1863
|
+
onPinAll: f,
|
|
1864
|
+
onUnpinAll: h,
|
|
1865
|
+
onToggleAllNegated: _,
|
|
1866
|
+
onToggleAllDisabled: v,
|
|
1867
|
+
onRemoveAll: x
|
|
1868
|
+
}), s()] });
|
|
1648
1869
|
}
|
|
1649
|
-
var import_lodash = require_lodash(),
|
|
1870
|
+
var import_lodash = require_lodash(), import_lodash$1 = require_lodash(), search_bar_default = withKibana(class extends Component {
|
|
1650
1871
|
static defaultProps = {
|
|
1651
1872
|
showQueryBar: !0,
|
|
1652
1873
|
showFilterBar: !0,
|
|
@@ -1679,8 +1900,8 @@ var import_lodash = require_lodash(), import_classnames = /* @__PURE__ */ __toES
|
|
|
1679
1900
|
showSaveNewQueryModal: !1,
|
|
1680
1901
|
currentProps: this.props,
|
|
1681
1902
|
query: this.props.query ? { ...this.props.query } : void 0,
|
|
1682
|
-
dateRangeFrom: (0, import_lodash$1.get)(this.props, "dateRangeFrom", "
|
|
1683
|
-
dateRangeTo: (0, import_lodash$1.get)(this.props, "dateRangeTo", "
|
|
1903
|
+
dateRangeFrom: (0, import_lodash$1.get)(this.props, "dateRangeFrom", ""),
|
|
1904
|
+
dateRangeTo: (0, import_lodash$1.get)(this.props, "dateRangeTo", "")
|
|
1684
1905
|
};
|
|
1685
1906
|
isDirty = () => !this.props.showDatePicker && this.state.query && this.props.query ? this.state.query.query !== this.props.query.query : this.state.query && this.props.query && this.state.query.query !== this.props.query.query || this.state.dateRangeFrom !== this.props.dateRangeFrom || this.state.dateRangeTo !== this.props.dateRangeTo;
|
|
1686
1907
|
shouldRenderQueryBar() {
|
|
@@ -1734,7 +1955,7 @@ var import_lodash = require_lodash(), import_classnames = /* @__PURE__ */ __toES
|
|
|
1734
1955
|
render() {
|
|
1735
1956
|
if (!this.props.selectedIndexPattern) return null;
|
|
1736
1957
|
let e;
|
|
1737
|
-
this.shouldRenderQueryBar() && (e = /* @__PURE__ */
|
|
1958
|
+
this.shouldRenderQueryBar() && (e = /* @__PURE__ */ jsx(QueryBarTopRow, {
|
|
1738
1959
|
timeHistory: this.props.timeHistory,
|
|
1739
1960
|
query: this.state.query,
|
|
1740
1961
|
screenTitle: this.props.screenTitle,
|
|
@@ -1759,54 +1980,42 @@ var import_lodash = require_lodash(), import_classnames = /* @__PURE__ */ __toES
|
|
|
1759
1980
|
services: this.props.services,
|
|
1760
1981
|
renderTimeField: this.props.renderTimeField,
|
|
1761
1982
|
timefilterUpdateHandler: this.props.timefilterUpdateHandler,
|
|
1762
|
-
timeSetting: this.props.timeSetting
|
|
1983
|
+
timeSetting: this.props.timeSetting,
|
|
1984
|
+
locale: this.props.locale
|
|
1763
1985
|
}));
|
|
1764
1986
|
let t;
|
|
1765
|
-
return this.shouldRenderFilterBar() && (t = /* @__PURE__ */
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
className: "globalFilterGroup__filterBar",
|
|
1777
|
-
filters: this.props.filters,
|
|
1778
|
-
onFiltersUpdated: this.props.onFiltersUpdated,
|
|
1779
|
-
indexPatterns: this.props.indexPatterns,
|
|
1780
|
-
dateRangeFrom: this.state.dateRangeFrom,
|
|
1781
|
-
dateRangeTo: this.state.dateRangeTo,
|
|
1782
|
-
timeField: this.props.timeSetting?.timeField,
|
|
1783
|
-
services: this.props.services
|
|
1784
|
-
})
|
|
1785
|
-
})
|
|
1786
|
-
})), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1987
|
+
return this.shouldRenderFilterBar() && (t = /* @__PURE__ */ jsx(FilterBar, {
|
|
1988
|
+
className: "globalFilterGroup__filterBar",
|
|
1989
|
+
filters: this.props.filters,
|
|
1990
|
+
onFiltersUpdated: this.props.onFiltersUpdated,
|
|
1991
|
+
indexPatterns: this.props.indexPatterns,
|
|
1992
|
+
dateRangeFrom: this.state.dateRangeFrom,
|
|
1993
|
+
dateRangeTo: this.state.dateRangeTo,
|
|
1994
|
+
timeField: this.props.timeSetting?.timeField,
|
|
1995
|
+
services: this.props.services,
|
|
1996
|
+
theme: this.props.theme
|
|
1997
|
+
})), /* @__PURE__ */ jsxs("div", {
|
|
1787
1998
|
className: "p-8px",
|
|
1788
|
-
children: [/* @__PURE__ */
|
|
1789
|
-
className: "flex items-center gap-8px",
|
|
1999
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2000
|
+
className: "flex items-center gap-8px flex-wrap",
|
|
1790
2001
|
children: [
|
|
1791
|
-
/* @__PURE__ */
|
|
2002
|
+
/* @__PURE__ */ jsx(IndexPatternSelect_default, {
|
|
1792
2003
|
selectedIndexPattern: this.props.selectedIndexPattern,
|
|
1793
2004
|
onIndexPatternChange: this.props.setIndexPattern,
|
|
1794
|
-
indices: this.props.indices
|
|
2005
|
+
indices: this.props.indices,
|
|
2006
|
+
locale: this.props.locale
|
|
1795
2007
|
}),
|
|
1796
|
-
/* @__PURE__ */
|
|
1797
|
-
className: "globalFilterGroup__filterBar",
|
|
2008
|
+
/* @__PURE__ */ jsx(FilterActions, {
|
|
1798
2009
|
filters: this.props.filters,
|
|
1799
2010
|
onFiltersUpdated: this.props.onFiltersUpdated,
|
|
1800
2011
|
indexPatterns: this.props.indexPatterns,
|
|
1801
2012
|
dateRangeFrom: this.state.dateRangeFrom,
|
|
1802
2013
|
dateRangeTo: this.state.dateRangeTo,
|
|
1803
2014
|
timeField: this.props.selectedIndexPattern.timeFieldName,
|
|
1804
|
-
services: this.props.services
|
|
2015
|
+
services: this.props.services,
|
|
2016
|
+
theme: this.props.theme
|
|
1805
2017
|
}),
|
|
1806
|
-
|
|
1807
|
-
className: "flex-1",
|
|
1808
|
-
children: e
|
|
1809
|
-
})
|
|
2018
|
+
e
|
|
1810
2019
|
]
|
|
1811
2020
|
}), t]
|
|
1812
2021
|
});
|