@infinilabs/discover 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { o as __toESM, r as __export, t as __commonJSMin } from "./chunk-D-4zIDrl.js";
2
2
  import { a as createHashHistory, c as require_object_assign, d as FieldIcon, i as setIndexPatterns$1, l as require_url, o as _extends, t as getIndexPatterns, u as FieldButton } from "./services-Hp7HR5A8.js";
3
- import { C as BehaviorSubject, T as operate, _ as onRedirectNoIndexPattern, b as FilterManager, d as baseFormattersPublic, f as getTimezone, g as onUnsupportedTimePattern, h as IndexPatternsApiClient, l as generateFilters, m as SavedObjectsClientPublicToCommon, n as search, p as deserializeFieldFormat, u as createSearchBar, v as TimeHistory, w as createOperatorSubscriber, x as AutocompleteService, y as Timefilter } from "./public-D4Zk99Ra.js";
3
+ import { C as BehaviorSubject, T as operate, _ as onRedirectNoIndexPattern, b as FilterManager, d as baseFormattersPublic, f as getTimezone, g as onUnsupportedTimePattern, h as IndexPatternsApiClient, l as generateFilters, m as SavedObjectsClientPublicToCommon, n as search, p as deserializeFieldFormat, u as createSearchBar, v as TimeHistory, w as createOperatorSubscriber, x as AutocompleteService, y as Timefilter } from "./public-BS_TzGX7.js";
4
4
  import { t as require_classnames } from "./classnames-BCXlvRQ0.js";
5
5
  import { t as require_lodash } from "./lodash-Gv_ptthU.js";
6
6
  import { n as createGetterSetter } from "./common-1_7zA8Zc.js";
@@ -10,9 +10,8 @@ import * as React$1 from "react";
10
10
  import React, { Component, Fragment, createElement, forwardRef, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
11
11
  import "@elastic/eui/dist/eui_theme_light.min.css";
12
12
  import { Badge, Button, Card, Empty, Form, Input, Menu, Popover, Progress, Radio, Select, Space, Spin, Switch, Tabs, Tooltip, Tree, Typography } from "antd";
13
- import { EuiButton, EuiCallOut, EuiCodeBlock, EuiFlexGroup, EuiFlexItem, EuiHideFor, EuiIcon, EuiIconTip, EuiSpacer, EuiTitle, EuiToolTip } from "@elastic/eui";
13
+ import { EuiCallOut, EuiCodeBlock, EuiFlexGroup, EuiFlexItem, EuiHideFor, EuiIcon, EuiSpacer, EuiTitle, EuiToolTip } from "@elastic/eui";
14
14
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
15
- import Spin$1 from "antd/lib/spin";
16
15
  import { CarryOutOutlined } from "@ant-design/icons";
17
16
  import { AnnotationDomainType, Axis, Chart, DARK_THEME, HistogramBarSeries, LIGHT_THEME, LineAnnotation, Position, RectAnnotation, ScaleType, Settings, TooltipType } from "@elastic/charts";
18
17
  import lightEuiTheme from "@elastic/eui/dist/eui_theme_light.json";
@@ -403,7 +402,8 @@ var mergeClasses = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.i
403
402
  }]
404
403
  ]);
405
404
  function DiscoverFieldBucket({ field: e, bucket: t, onAddFilter: n }) {
406
- return `${e.name}${t.value}`, `${e.name}${t.value}`, /* @__PURE__ */ jsxs("div", {
405
+ let { i18n: i } = useContext(GlobalConfigContext), a = i?.field || {};
406
+ return /* @__PURE__ */ jsxs("div", {
407
407
  className: "flex justify-between gap-8px mb-12px",
408
408
  children: [/* @__PURE__ */ jsxs("div", {
409
409
  className: "flex-1 max-w-[calc(100%-48px-8px)]",
@@ -429,122 +429,46 @@ function DiscoverFieldBucket({ field: e, bucket: t, onAddFilter: n }) {
429
429
  percent: t.percent,
430
430
  count: t.count
431
431
  })]
432
- }), e.filterable && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Button, {
433
- color: "primary",
434
- variant: "text",
435
- size: "small",
436
- className: "!w-24px !h-24px",
437
- classNames: { icon: "!h-14px !leading-14px" },
438
- icon: /* @__PURE__ */ jsx(CirclePlus, { className: "w-14px h-14px" }),
439
- onClick: () => n(e, t.value, "+")
440
- }), /* @__PURE__ */ jsx(Button, {
441
- color: "primary",
442
- variant: "text",
443
- size: "small",
444
- className: "!w-24px !h-24px",
445
- classNames: { icon: "!h-14px !leading-14px" },
446
- icon: /* @__PURE__ */ jsx(CircleMinus, { className: "w-14px h-14px" }),
447
- onClick: () => n(e, t.value, "-")
432
+ }), e.filterable && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Tooltip, {
433
+ title: a.filter_for_value || "Filter for value",
434
+ placement: "top",
435
+ children: /* @__PURE__ */ jsx(Button, {
436
+ color: "primary",
437
+ variant: "text",
438
+ size: "small",
439
+ className: "!w-24px !h-24px",
440
+ classNames: { icon: "!h-14px !leading-14px" },
441
+ icon: /* @__PURE__ */ jsx(CirclePlus, { className: "w-14px h-14px" }),
442
+ onClick: () => n(e, t.value, "+")
443
+ })
444
+ }), /* @__PURE__ */ jsx(Tooltip, {
445
+ title: a.filter_out_value || "Filter out value",
446
+ placement: "top",
447
+ children: /* @__PURE__ */ jsx(Button, {
448
+ color: "primary",
449
+ variant: "text",
450
+ size: "small",
451
+ className: "!w-24px !h-24px",
452
+ classNames: { icon: "!h-14px !leading-14px" },
453
+ icon: /* @__PURE__ */ jsx(CircleMinus, { className: "w-14px h-14px" }),
454
+ onClick: () => n(e, t.value, "-")
455
+ })
448
456
  })] })]
449
457
  });
450
458
  }
451
- function getWarnings(e) {
452
- let t = [];
453
- return e.scripted && t.push("Scripted fields can take a long time to execute."), t.length > 1 && (t = t.map(function(e, t) {
454
- return (t > 0 ? "\n" : "") + (t + 1) + " - " + e;
455
- })), t;
456
- }
457
- function getTriggerConstant(e) {
458
- return e === KBN_FIELD_TYPES.GEO_POINT || e === KBN_FIELD_TYPES.GEO_SHAPE ? VISUALIZE_GEO_FIELD_TRIGGER : VISUALIZE_FIELD_TRIGGER;
459
- }
460
- function getTrigger(e) {
461
- return e === KBN_FIELD_TYPES.GEO_POINT || e === KBN_FIELD_TYPES.GEO_SHAPE ? visualizeGeoFieldTrigger : visualizeFieldTrigger;
462
- }
463
- async function getCompatibleActions(e, t, n, i) {
464
- return await getUiActions().getTriggerCompatibleActions(i, {
465
- indexPatternId: t,
466
- fieldName: e,
467
- contextualFields: n
468
- });
469
- }
470
- async function getVisualizeHref(e, t, n) {
471
- if (!t) return;
472
- let i = {
473
- indexPatternId: t,
474
- fieldName: e.name,
475
- contextualFields: n,
476
- trigger: getTrigger(e.type)
477
- }, a = await getCompatibleActions(e.name, t, n, getTriggerConstant(e.type));
478
- return a.length === 1 ? a[0].getHref?.(i) : void 0;
479
- }
480
- function triggerVisualizeActions(e, t, n) {
481
- if (!t) return;
482
- let i = getTriggerConstant(e.type), a = {
483
- indexPatternId: t,
484
- fieldName: e.name,
485
- contextualFields: n
486
- };
487
- getUiActions().getTrigger(i).exec(a);
488
- }
489
- async function isFieldVisualizable(e, t, n) {
490
- if (e.name === "_id" || !t) return !1;
491
- let i = getTriggerConstant(e.type);
492
- return (await getCompatibleActions(e.name, t, n, i)).length > 0 && e.visualizable;
493
- }
494
459
  function DiscoverFieldDetails({ field: e, indexPattern: t, details: n, onAddFilter: i }) {
495
- let a = getWarnings(e), [o, s] = useState(!1), [u, f] = useState("");
496
- useEffect(() => {
497
- isFieldVisualizable(e, t.id, n.columns).then((i) => {
498
- s(i), getVisualizeHref(e, t.id, n.columns).then((e) => {
499
- e && f(e);
500
- }, () => {
501
- f("");
502
- });
503
- }, () => {
504
- s(!1);
505
- });
506
- }, [
507
- e,
508
- t.id,
509
- n.columns
510
- ]);
511
- let p = (i) => {
512
- i.preventDefault(), triggerVisualizeActions(e, t.id, n.columns);
513
- };
460
+ let { i18n: a } = useContext(GlobalConfigContext), o = a?.field || {};
514
461
  return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("div", {
515
462
  className: "dscFieldDetails !p-12px",
516
- children: [
517
- n.error && /* @__PURE__ */ jsx(Typography.Text, {
518
- className: "text-xs mb-12px",
519
- type: "danger",
520
- children: n.error
521
- }),
522
- !n.error && /* @__PURE__ */ jsxs(Fragment$1, { children: [n?.buckets?.map((t, n) => /* @__PURE__ */ jsx(DiscoverFieldBucket, {
523
- bucket: t,
524
- field: e,
525
- onAddFilter: i
526
- }, `bucket${n}`)), /* @__PURE__ */ jsxs(Typography.Text, { children: [
527
- "Calculated from ",
528
- n.total,
529
- " sample records"
530
- ] })] }),
531
- o && /* @__PURE__ */ jsxs(Fragment$1, { children: [
532
- /* @__PURE__ */ jsx(EuiSpacer, { size: "xs" }),
533
- /* @__PURE__ */ jsx(EuiButton, {
534
- onClick: (e) => p(e),
535
- href: u,
536
- size: "s",
537
- className: "dscFieldDetails__visualizeBtn",
538
- "data-test-subj": `fieldVisualize-${e.name}`,
539
- children: "Visualize"
540
- }),
541
- a.length > 0 && /* @__PURE__ */ jsx(EuiIconTip, {
542
- type: "alert",
543
- color: "warning",
544
- content: a.join(" ")
545
- })
546
- ] })
547
- ]
463
+ children: [n.error && /* @__PURE__ */ jsx(Typography.Text, {
464
+ className: "text-xs mb-12px",
465
+ type: "danger",
466
+ children: n.error
467
+ }), !n.error && /* @__PURE__ */ jsxs(Fragment$1, { children: [n?.buckets?.map((t, n) => /* @__PURE__ */ jsx(DiscoverFieldBucket, {
468
+ bucket: t,
469
+ field: e,
470
+ onAddFilter: i
471
+ }, `bucket${n}`)), /* @__PURE__ */ jsx(Typography.Text, { children: `${o.top_result_prefix || "Calculated from"} ${n.total} ${o.top_result_suffix || "sample records"}` })] })]
548
472
  }) });
549
473
  }
550
474
  function filter(e, t) {
@@ -672,15 +596,11 @@ function DiscoverField({ field: e, indexPattern: t, onAddField: n, onRemoveField
672
596
  trigger: "click",
673
597
  title: /* @__PURE__ */ jsxs("div", {
674
598
  className: "!flex !items-center !justify-between",
675
- children: [/* @__PURE__ */ jsxs("div", {
599
+ children: [/* @__PURE__ */ jsx("div", {
676
600
  className: "!uppercase",
677
- children: [
678
- "Top ",
679
- A?.buckets?.length || 5,
680
- " values"
681
- ]
601
+ children: `${T.top || "Top"} ${A?.buckets?.length || 5} ${T.top_values || "values"}`
682
602
  }), x || x === void 0 ? /* @__PURE__ */ jsx(Tooltip, {
683
- title: `Toggle ${F ? "remote" : "local"} top values`,
603
+ title: F ? T.top_remote || "Toggle remote top values" : T.top_local || "Toggle local top values",
684
604
  children: /* @__PURE__ */ jsx(Button, {
685
605
  size: "small",
686
606
  className: "!flex !items-center !justify-center",
@@ -698,14 +618,14 @@ function DiscoverField({ field: e, indexPattern: t, onAddField: n, onRemoveField
698
618
  onOpenChange: (e) => {
699
619
  e || O(!1);
700
620
  },
701
- content: /* @__PURE__ */ jsx(Spin$1, {
621
+ content: /* @__PURE__ */ jsx(Spin, {
702
622
  spinning: N,
703
623
  children: e.isMulti || e.spec?.aggregatable === !0 ? /* @__PURE__ */ jsx(DiscoverFieldDetails, {
704
624
  indexPattern: t,
705
625
  field: e,
706
626
  details: A,
707
627
  onAddFilter: a
708
- }) : `No field data found for field ${e.displayName}`
628
+ }) : /* @__PURE__ */ jsx(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE })
709
629
  }),
710
630
  destroyOnHidden: !0,
711
631
  children: /* @__PURE__ */ jsx("div", {
@@ -1326,45 +1246,45 @@ var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((e) => {
1326
1246
  }
1327
1247
  var M = p, N = m, P = f, F = u, I = n, L = g, R = a, z = S, B = x, V = i, U = s, W = o, G = y, K = !1;
1328
1248
  function J(e) {
1329
- return K || (K = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), iQ(e) || A(e) === p;
1249
+ return K || (K = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), JZ(e) || A(e) === p;
1330
1250
  }
1331
- function iQ(e) {
1251
+ function JZ(e) {
1332
1252
  return A(e) === m;
1333
1253
  }
1334
1254
  function Z(e) {
1335
1255
  return A(e) === f;
1336
1256
  }
1337
- function aQ(e) {
1257
+ function YZ(e) {
1338
1258
  return A(e) === u;
1339
1259
  }
1340
- function oQ(e) {
1260
+ function XZ(e) {
1341
1261
  return typeof e == "object" && !!e && e.$$typeof === n;
1342
1262
  }
1343
- function sQ(e) {
1263
+ function ZZ(e) {
1344
1264
  return A(e) === g;
1345
1265
  }
1346
- function cQ(e) {
1266
+ function QZ(e) {
1347
1267
  return A(e) === a;
1348
1268
  }
1349
- function lQ(e) {
1269
+ function $Z(e) {
1350
1270
  return A(e) === S;
1351
1271
  }
1352
- function uQ(e) {
1272
+ function eQ(e) {
1353
1273
  return A(e) === x;
1354
1274
  }
1355
1275
  function Q(e) {
1356
1276
  return A(e) === i;
1357
1277
  }
1358
- function dQ(e) {
1278
+ function tQ(e) {
1359
1279
  return A(e) === s;
1360
1280
  }
1361
- function fQ(e) {
1281
+ function nQ(e) {
1362
1282
  return A(e) === o;
1363
1283
  }
1364
- function pQ(e) {
1284
+ function rQ(e) {
1365
1285
  return A(e) === y;
1366
1286
  }
1367
- e.AsyncMode = M, e.ConcurrentMode = N, e.ContextConsumer = P, e.ContextProvider = F, e.Element = I, e.ForwardRef = L, e.Fragment = R, e.Lazy = z, e.Memo = B, e.Portal = V, e.Profiler = U, e.StrictMode = W, e.Suspense = G, e.isAsyncMode = J, e.isConcurrentMode = iQ, e.isContextConsumer = Z, e.isContextProvider = aQ, e.isElement = oQ, e.isForwardRef = sQ, e.isFragment = cQ, e.isLazy = lQ, e.isMemo = uQ, e.isPortal = Q, e.isProfiler = dQ, e.isStrictMode = fQ, e.isSuspense = pQ, e.isValidElementType = O, e.typeOf = A;
1287
+ e.AsyncMode = M, e.ConcurrentMode = N, e.ContextConsumer = P, e.ContextProvider = F, e.Element = I, e.ForwardRef = L, e.Fragment = R, e.Lazy = z, e.Memo = B, e.Portal = V, e.Profiler = U, e.StrictMode = W, e.Suspense = G, e.isAsyncMode = J, e.isConcurrentMode = JZ, e.isContextConsumer = Z, e.isContextProvider = YZ, e.isElement = XZ, e.isForwardRef = ZZ, e.isFragment = QZ, e.isLazy = $Z, e.isMemo = eQ, e.isPortal = Q, e.isProfiler = tQ, e.isStrictMode = nQ, e.isSuspense = rQ, e.isValidElementType = O, e.typeOf = A;
1368
1288
  })();
1369
1289
  })), require_react_is = /* @__PURE__ */ __commonJSMin(((e, t) => {
1370
1290
  process.env.NODE_ENV === "production" ? t.exports = require_react_is_production_min() : t.exports = require_react_is_development();
@@ -3152,25 +3072,25 @@ function highlight_default(e, t) {
3152
3072
  numberStyle: A,
3153
3073
  startingLineNumber: T,
3154
3074
  codeString: W
3155
- }) : null, iQ = s.hljs || s["pre[class*=\"language-\"]"] || { backgroundColor: "#fff" }, Z = isHighlightJs(G) ? "hljs" : "prismjs", aQ = y ? Object.assign({}, K, { style: Object.assign({}, iQ, f) }) : Object.assign({}, K, {
3075
+ }) : null, JZ = s.hljs || s["pre[class*=\"language-\"]"] || { backgroundColor: "#fff" }, Z = isHighlightJs(G) ? "hljs" : "prismjs", YZ = y ? Object.assign({}, K, { style: Object.assign({}, JZ, f) }) : Object.assign({}, K, {
3156
3076
  className: K.className ? `${Z} ${K.className}` : Z,
3157
3077
  style: Object.assign({}, f)
3158
3078
  });
3159
- if (P ? m.style = _objectSpread({ whiteSpace: "pre-wrap" }, m.style) : m.style = _objectSpread({ whiteSpace: "pre" }, m.style), !G) return /* @__PURE__ */ React.createElement(z, aQ, J, /* @__PURE__ */ React.createElement(V, m, W));
3079
+ if (P ? m.style = _objectSpread({ whiteSpace: "pre-wrap" }, m.style) : m.style = _objectSpread({ whiteSpace: "pre" }, m.style), !G) return /* @__PURE__ */ React.createElement(z, YZ, J, /* @__PURE__ */ React.createElement(V, m, W));
3160
3080
  (M === void 0 && L || P) && (M = !0), L ||= defaultRenderer;
3161
- var oQ = [{
3081
+ var XZ = [{
3162
3082
  type: "text",
3163
3083
  value: W
3164
- }], sQ = getCodeTree({
3084
+ }], ZZ = getCodeTree({
3165
3085
  astGenerator: G,
3166
3086
  language: i,
3167
3087
  code: W,
3168
- defaultCodeValue: oQ
3088
+ defaultCodeValue: XZ
3169
3089
  });
3170
- sQ.language === null && (sQ.value = oQ);
3171
- var cQ = T + (W.match(/\n/g)?.length ?? 0), lQ = processLines(sQ, M, I, x, C, T, cQ, A, P);
3172
- return /* @__PURE__ */ React.createElement(z, aQ, /* @__PURE__ */ React.createElement(V, m, !C && J, L({
3173
- rows: lQ,
3090
+ ZZ.language === null && (ZZ.value = XZ);
3091
+ var QZ = T + (W.match(/\n/g)?.length ?? 0), $Z = processLines(ZZ, M, I, x, C, T, QZ, A, P);
3092
+ return /* @__PURE__ */ React.createElement(z, YZ, /* @__PURE__ */ React.createElement(V, m, !C && J, L({
3093
+ rows: $Z,
3174
3094
  stylesheet: s,
3175
3095
  useInlineStyles: y
3176
3096
  })));
@@ -51842,40 +51762,40 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51842
51762
  sort: []
51843
51763
  }), z({ sort: [] });
51844
51764
  }, [t]);
51845
- let { onAddColumn: J, onRemoveColumn: Z, onMoveColumn: aQ, onSetColumns: oQ } = useMemo(() => getStateColumnActions({
51765
+ let { onAddColumn: J, onRemoveColumn: Z, onMoveColumn: YZ, onSetColumns: XZ } = useMemo(() => getStateColumnActions({
51846
51766
  indexPattern: t,
51847
51767
  setAppState: O,
51848
51768
  state: T,
51849
51769
  useNewFieldsApi: !1
51850
- }), [t, T]), sQ = useCallback((e) => {
51770
+ }), [t, T]), ZZ = useCallback((e) => {
51851
51771
  O({
51852
51772
  ...T,
51853
51773
  sort: e
51854
51774
  }), z({ sort: e.reverse() });
51855
- }, [T, t]), cQ = useCallback((e, n, i) => {
51775
+ }, [T, t]), QZ = useCallback((e, n, i) => {
51856
51776
  typeof e == "string" || e.name;
51857
51777
  let a = generateFilters(filterManager, e, n, i, String(t.id));
51858
51778
  filterManager.addFilters(a), z();
51859
- }, [t, z]), lQ = useCallback((e) => {
51779
+ }, [t, z]), $Z = useCallback((e) => {
51860
51780
  timefilter.setTime({
51861
51781
  from: moment_default(e.from).toISOString(),
51862
51782
  to: moment_default(e.to).toISOString(),
51863
51783
  mode: "absolute"
51864
51784
  }), z();
51865
- }, [timefilter]), uQ = x.hits.hits || [], [Q, dQ] = useState([]);
51785
+ }, [timefilter]), eQ = x.hits.hits || [], [Q, tQ] = useState([]);
51866
51786
  useMemo(() => {
51867
- uQ.length > 0 ? dQ(I > 0 ? [...Q, ...uQ] : uQ) : I === 0 && dQ([]);
51868
- }, [uQ]);
51869
- let fQ = {
51787
+ eQ.length > 0 ? tQ(I > 0 ? [...Q, ...eQ] : eQ) : I === 0 && tQ([]);
51788
+ }, [eQ]);
51789
+ let nQ = {
51870
51790
  savedSearch: {},
51871
51791
  timefield: t?.getTimeField()?.displayName,
51872
51792
  chartAggConfigs: {}
51873
- }, pQ = {};
51874
- for (let e of Q) for (let n of Object.keys(t.flattenHit(e, !0))) pQ[n] = (pQ[n] || 0) + 1;
51875
- let mQ = Number.isInteger(x.hits.total?.value) ? x.hits.total?.value : 0, hQ = t?.timeFieldName != "", gQ = useCallback(async ({ _index: e, _id: t, _type: n, _source: i, is_new: a }) => !1, [z]), _Q = useCallback(async ({ _index: e, _id: t, _type: n }) => !1, [z]), vQ = useMemo(() => ({
51876
- saveDocument: gQ,
51877
- deleteDocument: _Q
51878
- }), [gQ, _Q]), yQ = async (e, n, i) => {
51793
+ }, rQ = {};
51794
+ for (let e of Q) for (let n of Object.keys(t.flattenHit(e, !0))) rQ[n] = (rQ[n] || 0) + 1;
51795
+ let iQ = Number.isInteger(x.hits.total?.value) ? x.hits.total?.value : 0, aQ = t?.timeFieldName != "", oQ = useCallback(async ({ _index: e, _id: t, _type: n, _source: i, is_new: a }) => !1, [z]), sQ = useCallback(async ({ _index: e, _id: t, _type: n }) => !1, [z]), cQ = useMemo(() => ({
51796
+ saveDocument: oQ,
51797
+ deleteDocument: sQ
51798
+ }), [oQ, sQ]), lQ = async (e, n, i) => {
51879
51799
  let o = e?.spec?.name || e?.name;
51880
51800
  if (!o || !a) return;
51881
51801
  if (e.isMulti) o = `${o}.keyword`;
@@ -51911,7 +51831,7 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51911
51831
  let e = s.sampleRecords === "all" ? y?.aggregations?.top5?.buckets : y?.aggregations?.sample?.top5?.buckets, t = s.sampleRecords === "all" ? y?.aggregations?.top5?.sum_other_doc_count : y?.aggregations?.sample?.sample_count?.value;
51912
51832
  i(e || [], t || 0);
51913
51833
  }
51914
- }, bQ = async (e) => {
51834
+ }, uQ = async (e) => {
51915
51835
  t.timeFieldName = e, n(t);
51916
51836
  let i = [[e, "desc"]];
51917
51837
  O({
@@ -51927,7 +51847,7 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51927
51847
  showSearchBar: !1,
51928
51848
  showQueryBar: !0,
51929
51849
  showQueryInput: !0,
51930
- showDatePicker: hQ,
51850
+ showDatePicker: aQ,
51931
51851
  showFilterBar: !0,
51932
51852
  useDefaultBehaviors: !0,
51933
51853
  screenTitle: "",
@@ -51952,8 +51872,8 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51952
51872
  setIndexPattern: i,
51953
51873
  indices: e.indices,
51954
51874
  histogramData: G,
51955
- timefilterUpdateHandler: lQ,
51956
- histogramOpts: fQ,
51875
+ timefilterUpdateHandler: $Z,
51876
+ histogramOpts: nQ,
51957
51877
  timeSetting: {
51958
51878
  ...K || {},
51959
51879
  showTimeSetting: !0,
@@ -51967,7 +51887,7 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51967
51887
  value: t
51968
51888
  })),
51969
51889
  onTimeSettingChange: ({ timeField: e, timeInterval: n }) => {
51970
- t.timeFieldName !== e && bQ(e), K?.stateInterval !== n && B(n);
51890
+ t.timeFieldName !== e && uQ(e), K?.stateInterval !== n && B(n);
51971
51891
  },
51972
51892
  timeZone: y,
51973
51893
  onTimeZoneChange: b,
@@ -51978,7 +51898,7 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51978
51898
  }), /* @__PURE__ */ jsx("div", {
51979
51899
  className: "flex flex-1 min-h-0 border-t border-t-solid border-[var(--ant-color-border)]",
51980
51900
  children: V === "none" && I === 0 ? /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(DiscoverNoResults, {
51981
- timeFieldName: fQ.timefield,
51901
+ timeFieldName: nQ.timefield,
51982
51902
  queryLanguage: T.query?.language || "",
51983
51903
  range: s.range
51984
51904
  }) }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [!m.sideBar && /* @__PURE__ */ jsx("div", {
@@ -51986,11 +51906,11 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51986
51906
  children: /* @__PURE__ */ jsx(SidebarMemoized, {
51987
51907
  config: {},
51988
51908
  columns: R,
51989
- fieldCounts: pQ,
51909
+ fieldCounts: rQ,
51990
51910
  hits: Q,
51991
51911
  indexPatterns: [t],
51992
51912
  onAddField: J,
51993
- onAddFilter: cQ,
51913
+ onAddFilter: QZ,
51994
51914
  onRemoveField: Z,
51995
51915
  selectedIndexPattern: t,
51996
51916
  setIndexPattern: () => {},
@@ -51998,8 +51918,8 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
51998
51918
  state: T,
51999
51919
  distinctParams: M,
52000
51920
  onDistinctParamsChange: P,
52001
- total: mQ,
52002
- onFieldAgg: yQ,
51921
+ total: iQ,
51922
+ onFieldAgg: lQ,
52003
51923
  whetherToSample: s.whetherToSample,
52004
51924
  sampleSize: s.sampleSize,
52005
51925
  topNumber: s.topNumber,
@@ -52028,16 +51948,16 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
52028
51948
  collapseState: m,
52029
51949
  setCollapseState: g,
52030
51950
  took: x.took || 1,
52031
- total: mQ,
51951
+ total: iQ,
52032
51952
  timeChartProps: K
52033
51953
  }),
52034
- !m.histogram && fQ.chartAggConfigs && G && Q.length !== 0 && /* @__PURE__ */ jsx("div", {
51954
+ !m.histogram && nQ.chartAggConfigs && G && Q.length !== 0 && /* @__PURE__ */ jsx("div", {
52035
51955
  className: "dscTimechart",
52036
51956
  children: /* @__PURE__ */ jsx("div", {
52037
51957
  className: "h-100px dscHistogramGrid",
52038
51958
  children: /* @__PURE__ */ jsx(DiscoverHistogram, {
52039
51959
  chartData: G,
52040
- timefilterUpdateHandler: lQ,
51960
+ timefilterUpdateHandler: $Z,
52041
51961
  theme: p
52042
51962
  })
52043
51963
  })
@@ -52046,14 +51966,14 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
52046
51966
  columns: R,
52047
51967
  sortOrder: T.sort || [],
52048
51968
  indexPattern: t,
52049
- onFilter: cQ,
51969
+ onFilter: QZ,
52050
51970
  onRemoveColumn: Z,
52051
- onMoveColumn: aQ,
51971
+ onMoveColumn: YZ,
52052
51972
  onAddColumn: J,
52053
- onChangeSortOrder: sQ,
52054
- document: vQ,
51973
+ onChangeSortOrder: ZZ,
51974
+ document: cQ,
52055
51975
  hits: Q,
52056
- hitsTotal: mQ,
51976
+ hitsTotal: iQ,
52057
51977
  queryFrom: I,
52058
51978
  setQueryFrom: L,
52059
51979
  scrollableTarget: o,