@kong-ui-public/analytics-utilities 11.4.0 → 11.4.1-pr.2524.6ba16ef2e.0

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.
@@ -3,7 +3,7 @@ var Br = (e, t, n) => t in e ? zr(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var b = (e, t, n) => Br(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  const Oo = 3e4, vo = 250, Eo = "analytics-query-provider";
5
5
  var h = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e))(h || {});
6
- const xo = [
6
+ const Io = [
7
7
  "horizontal_bar",
8
8
  "vertical_bar",
9
9
  "timeseries_line",
@@ -11,7 +11,7 @@ const xo = [
11
11
  "timeseries_bar",
12
12
  "donut",
13
13
  "single_value"
14
- ], Vr = ["in", "not_in", "selector"], Io = ["=", "!="], No = ["=", "!=", "<", ">", "<=", ">="], Xr = ["empty", "not_empty"], Po = ["starts_with", "ends_with"], Co = ["absolute", "relative"], $r = [
14
+ ], Vr = ["in", "not_in", "selector"], xo = ["=", "!="], No = ["=", "!=", "<", ">", "<=", ">="], Xr = ["empty", "not_empty"], Po = ["starts_with", "ends_with"], Co = ["absolute", "relative"], $r = [
15
15
  "15m",
16
16
  "1h",
17
17
  "6h",
@@ -503,6 +503,10 @@ const xo = [
503
503
  },
504
504
  label: {
505
505
  type: "string"
506
+ },
507
+ highlightIntersections: {
508
+ type: "boolean",
509
+ default: !1
506
510
  }
507
511
  },
508
512
  required: ["type", "value"],
@@ -998,7 +1002,7 @@ function Gt(e) {
998
1002
  );
999
1003
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
1000
1004
  }
1001
- function xa(e, ...t) {
1005
+ function Ia(e, ...t) {
1002
1006
  const n = C.bind(
1003
1007
  null,
1004
1008
  t.find((r) => typeof r == "object")
@@ -1009,8 +1013,8 @@ function _e(e, t) {
1009
1013
  const n = D(e, t == null ? void 0 : t.in);
1010
1014
  return n.setHours(0, 0, 0, 0), n;
1011
1015
  }
1012
- function Ia(e, t, n) {
1013
- const [r, i] = xa(
1016
+ function xa(e, t, n) {
1017
+ const [r, i] = Ia(
1014
1018
  n == null ? void 0 : n.in,
1015
1019
  e,
1016
1020
  t
@@ -1468,15 +1472,15 @@ const Ja = /^(\d+)(th|st|nd|rd)?/i, ei = /\d+/i, ti = {
1468
1472
  };
1469
1473
  function fi(e, t) {
1470
1474
  const n = D(e, t == null ? void 0 : t.in);
1471
- return Ia(n, Ra(n)) + 1;
1475
+ return xa(n, Ra(n)) + 1;
1472
1476
  }
1473
1477
  function hi(e, t) {
1474
1478
  const n = D(e, t == null ? void 0 : t.in), r = +pe(n) - +Na(n);
1475
1479
  return Math.round(r / cn) + 1;
1476
1480
  }
1477
1481
  function ln(e, t) {
1478
- var _, y, g, x;
1479
- const n = D(e, t == null ? void 0 : t.in), r = n.getFullYear(), i = se(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (_ = t == null ? void 0 : t.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((x = (g = i.locale) == null ? void 0 : g.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, u = C((t == null ? void 0 : t.in) || e, 0);
1482
+ var _, y, g, I;
1483
+ const n = D(e, t == null ? void 0 : t.in), r = n.getFullYear(), i = se(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (_ = t == null ? void 0 : t.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((I = (g = i.locale) == null ? void 0 : g.options) == null ? void 0 : I.firstWeekContainsDate) ?? 1, u = C((t == null ? void 0 : t.in) || e, 0);
1480
1484
  u.setFullYear(r + 1, 0, s), u.setHours(0, 0, 0, 0);
1481
1485
  const d = Y(u, t), f = C((t == null ? void 0 : t.in) || e, 0);
1482
1486
  f.setFullYear(r, 0, s), f.setHours(0, 0, 0, 0);
@@ -2118,10 +2122,10 @@ function Oi(e, t, n) {
2118
2122
  const r = e[0] === "Y" ? "years" : "days of the month";
2119
2123
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
2120
2124
  }
2121
- const vi = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ei = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, xi = /^'([^]*?)'?$/, Ii = /''/g, Ni = /[a-zA-Z]/;
2125
+ const vi = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ei = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ii = /^'([^]*?)'?$/, xi = /''/g, Ni = /[a-zA-Z]/;
2122
2126
  function mn(e, t, n) {
2123
- var _, y, g, x, I, N, R, W;
2124
- const r = se(), i = (n == null ? void 0 : n.locale) ?? r.locale ?? mi, s = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((y = (_ = n == null ? void 0 : n.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((x = (g = r.locale) == null ? void 0 : g.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, u = (n == null ? void 0 : n.weekStartsOn) ?? ((N = (I = n == null ? void 0 : n.locale) == null ? void 0 : I.options) == null ? void 0 : N.weekStartsOn) ?? r.weekStartsOn ?? ((W = (R = r.locale) == null ? void 0 : R.options) == null ? void 0 : W.weekStartsOn) ?? 0, d = D(e, n == null ? void 0 : n.in);
2127
+ var _, y, g, I, x, N, R, W;
2128
+ const r = se(), i = (n == null ? void 0 : n.locale) ?? r.locale ?? mi, s = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((y = (_ = n == null ? void 0 : n.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((I = (g = r.locale) == null ? void 0 : g.options) == null ? void 0 : I.firstWeekContainsDate) ?? 1, u = (n == null ? void 0 : n.weekStartsOn) ?? ((N = (x = n == null ? void 0 : n.locale) == null ? void 0 : x.options) == null ? void 0 : N.weekStartsOn) ?? r.weekStartsOn ?? ((W = (R = r.locale) == null ? void 0 : R.options) == null ? void 0 : W.weekStartsOn) ?? 0, d = D(e, n == null ? void 0 : n.in);
2125
2129
  if (!Ca(d))
2126
2130
  throw new RangeError("Invalid time value");
2127
2131
  let f = t.match(Ei).map((S) => {
@@ -2160,8 +2164,8 @@ function mn(e, t, n) {
2160
2164
  }).join("");
2161
2165
  }
2162
2166
  function Pi(e) {
2163
- const t = e.match(xi);
2164
- return t ? t[1].replace(Ii, "'") : e;
2167
+ const t = e.match(Ii);
2168
+ return t ? t[1].replace(xi, "'") : e;
2165
2169
  }
2166
2170
  function Ci(e, t) {
2167
2171
  const n = D(e, t == null ? void 0 : t.in), r = n.getFullYear(), i = n.getMonth(), s = C(n, 0);
@@ -2775,13 +2779,13 @@ function ho(e) {
2775
2779
  var Me = { exports: {} };
2776
2780
  Me.exports;
2777
2781
  (function(e, t) {
2778
- var n = 200, r = "__lodash_hash_undefined__", i = 9007199254740991, s = "[object Arguments]", u = "[object Array]", d = "[object Boolean]", f = "[object Date]", m = "[object Error]", _ = "[object Function]", y = "[object GeneratorFunction]", g = "[object Map]", x = "[object Number]", I = "[object Object]", N = "[object Promise]", R = "[object RegExp]", W = "[object Set]", S = "[object String]", T = "[object Symbol]", q = "[object WeakMap]", Ke = "[object ArrayBuffer]", ue = "[object DataView]", Je = "[object Float32Array]", et = "[object Float64Array]", tt = "[object Int8Array]", nt = "[object Int16Array]", rt = "[object Int32Array]", at = "[object Uint8Array]", it = "[object Uint8ClampedArray]", ot = "[object Uint16Array]", st = "[object Uint32Array]", Tn = /[\\^$.*+?()[\]{}|]/g, Mn = /\w*$/, Dn = /^\[object .+?Constructor\]$/, Sn = /^(?:0|[1-9]\d*)$/, w = {};
2779
- w[s] = w[u] = w[Ke] = w[ue] = w[d] = w[f] = w[Je] = w[et] = w[tt] = w[nt] = w[rt] = w[g] = w[x] = w[I] = w[R] = w[W] = w[S] = w[T] = w[at] = w[it] = w[ot] = w[st] = !0, w[m] = w[_] = w[q] = !1;
2782
+ var n = 200, r = "__lodash_hash_undefined__", i = 9007199254740991, s = "[object Arguments]", u = "[object Array]", d = "[object Boolean]", f = "[object Date]", m = "[object Error]", _ = "[object Function]", y = "[object GeneratorFunction]", g = "[object Map]", I = "[object Number]", x = "[object Object]", N = "[object Promise]", R = "[object RegExp]", W = "[object Set]", S = "[object String]", T = "[object Symbol]", q = "[object WeakMap]", Ke = "[object ArrayBuffer]", ue = "[object DataView]", Je = "[object Float32Array]", et = "[object Float64Array]", tt = "[object Int8Array]", nt = "[object Int16Array]", rt = "[object Int32Array]", at = "[object Uint8Array]", it = "[object Uint8ClampedArray]", ot = "[object Uint16Array]", st = "[object Uint32Array]", Tn = /[\\^$.*+?()[\]{}|]/g, Mn = /\w*$/, Dn = /^\[object .+?Constructor\]$/, Sn = /^(?:0|[1-9]\d*)$/, w = {};
2783
+ w[s] = w[u] = w[Ke] = w[ue] = w[d] = w[f] = w[Je] = w[et] = w[tt] = w[nt] = w[rt] = w[g] = w[I] = w[x] = w[R] = w[W] = w[S] = w[T] = w[at] = w[it] = w[ot] = w[st] = !0, w[m] = w[_] = w[q] = !1;
2780
2784
  var On = typeof ge == "object" && ge && ge.Object === Object && ge, vn = typeof self == "object" && self && self.Object === Object && self, k = On || vn || Function("return this")(), ct = t && !t.nodeType && t, ut = ct && !0 && e && !e.nodeType && e, En = ut && ut.exports === ct;
2781
- function xn(a, o) {
2785
+ function In(a, o) {
2782
2786
  return a.set(o[0], o[1]), a;
2783
2787
  }
2784
- function In(a, o) {
2788
+ function xn(a, o) {
2785
2789
  return a.add(o), a;
2786
2790
  }
2787
2791
  function Nn(a, o) {
@@ -2822,7 +2826,7 @@ Me.exports;
2822
2826
  c[++o] = [M, l];
2823
2827
  }), c;
2824
2828
  }
2825
- function xe(a, o) {
2829
+ function Ie(a, o) {
2826
2830
  return function(c) {
2827
2831
  return a(o(c));
2828
2832
  };
@@ -2833,12 +2837,12 @@ Me.exports;
2833
2837
  c[++o] = l;
2834
2838
  }), c;
2835
2839
  }
2836
- var kn = Array.prototype, Gn = Function.prototype, le = Object.prototype, Ie = k["__core-js_shared__"], ht = function() {
2837
- var a = /[^.]+$/.exec(Ie && Ie.keys && Ie.keys.IE_PROTO || "");
2840
+ var kn = Array.prototype, Gn = Function.prototype, le = Object.prototype, xe = k["__core-js_shared__"], ht = function() {
2841
+ var a = /[^.]+$/.exec(xe && xe.keys && xe.keys.IE_PROTO || "");
2838
2842
  return a ? "Symbol(src)_1." + a : "";
2839
2843
  }(), yt = Gn.toString, H = le.hasOwnProperty, de = le.toString, An = RegExp(
2840
2844
  "^" + yt.call(H).replace(Tn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2841
- ), gt = En ? k.Buffer : void 0, pt = k.Symbol, _t = k.Uint8Array, Yn = xe(Object.getPrototypeOf, Object), Hn = Object.create, Fn = le.propertyIsEnumerable, Ln = kn.splice, wt = Object.getOwnPropertySymbols, Wn = gt ? gt.isBuffer : void 0, qn = xe(Object.keys, Object), Ne = $(k, "DataView"), te = $(k, "Map"), Pe = $(k, "Promise"), Ce = $(k, "Set"), Re = $(k, "WeakMap"), ne = $(Object, "create"), Un = z(Ne), jn = z(te), zn = z(Pe), Bn = z(Ce), Vn = z(Re), bt = pt ? pt.prototype : void 0, Tt = bt ? bt.valueOf : void 0;
2845
+ ), gt = En ? k.Buffer : void 0, pt = k.Symbol, _t = k.Uint8Array, Yn = Ie(Object.getPrototypeOf, Object), Hn = Object.create, Fn = le.propertyIsEnumerable, Ln = kn.splice, wt = Object.getOwnPropertySymbols, Wn = gt ? gt.isBuffer : void 0, qn = Ie(Object.keys, Object), Ne = $(k, "DataView"), te = $(k, "Map"), Pe = $(k, "Promise"), Ce = $(k, "Set"), Re = $(k, "WeakMap"), ne = $(Object, "create"), Un = z(Ne), jn = z(te), zn = z(Pe), Bn = z(Ce), Vn = z(Re), bt = pt ? pt.prototype : void 0, Tt = bt ? bt.valueOf : void 0;
2842
2846
  function U(a) {
2843
2847
  var o = -1, c = a ? a.length : 0;
2844
2848
  for (this.clear(); ++o < c; ) {
@@ -2976,19 +2980,19 @@ Me.exports;
2976
2980
  return E;
2977
2981
  if (!he(a))
2978
2982
  return a;
2979
- var It = Ae(a);
2980
- if (It) {
2983
+ var xt = Ae(a);
2984
+ if (xt) {
2981
2985
  if (E = Pr(a), !o)
2982
- return xr(a, E);
2986
+ return Ir(a, E);
2983
2987
  } else {
2984
2988
  var Z = j(a), Nt = Z == _ || Z == y;
2985
2989
  if (Lr(a))
2986
2990
  return Tr(a, o);
2987
- if (Z == I || Z == s || Nt && !v) {
2991
+ if (Z == x || Z == s || Nt && !v) {
2988
2992
  if (dt(a))
2989
2993
  return v ? a : {};
2990
2994
  if (E = Cr(Nt ? {} : a), !o)
2991
- return Ir(a, yr(E, a));
2995
+ return xr(a, yr(E, a));
2992
2996
  } else {
2993
2997
  if (!w[Z])
2994
2998
  return v ? a : {};
@@ -2999,7 +3003,7 @@ Me.exports;
2999
3003
  var Pt = A.get(a);
3000
3004
  if (Pt)
3001
3005
  return Pt;
3002
- if (A.set(a, E), !It)
3006
+ if (A.set(a, E), !xt)
3003
3007
  var Ct = c ? Nr(a) : Ye(a);
3004
3008
  return Nn(Ct || a, function(He, ye) {
3005
3009
  Ct && (ye = He, He = a[ye]), Mt(E, ye, ke(He, o, c, l, ye, a, A));
@@ -3018,7 +3022,7 @@ Me.exports;
3018
3022
  function wr(a) {
3019
3023
  if (!he(a) || Ar(a))
3020
3024
  return !1;
3021
- var o = xt(a) || dt(a) ? An : Dn;
3025
+ var o = It(a) || dt(a) ? An : Dn;
3022
3026
  return o.test(z(a));
3023
3027
  }
3024
3028
  function br(a) {
@@ -3045,7 +3049,7 @@ Me.exports;
3045
3049
  }
3046
3050
  function Dr(a, o, c) {
3047
3051
  var l = o ? c(mt(a), !0) : mt(a);
3048
- return lt(l, xn, new a.constructor());
3052
+ return lt(l, In, new a.constructor());
3049
3053
  }
3050
3054
  function Sr(a) {
3051
3055
  var o = new a.constructor(a.source, Mn.exec(a));
@@ -3053,7 +3057,7 @@ Me.exports;
3053
3057
  }
3054
3058
  function Or(a, o, c) {
3055
3059
  var l = o ? c(ft(a), !0) : ft(a);
3056
- return lt(l, In, new a.constructor());
3060
+ return lt(l, xn, new a.constructor());
3057
3061
  }
3058
3062
  function vr(a) {
3059
3063
  return Tt ? Object(Tt.call(a)) : {};
@@ -3062,7 +3066,7 @@ Me.exports;
3062
3066
  var c = o ? Ge(a.buffer) : a.buffer;
3063
3067
  return new a.constructor(c, a.byteOffset, a.length);
3064
3068
  }
3065
- function xr(a, o) {
3069
+ function Ir(a, o) {
3066
3070
  var c = -1, l = a.length;
3067
3071
  for (o || (o = Array(l)); ++c < l; )
3068
3072
  o[c] = a[c];
@@ -3076,7 +3080,7 @@ Me.exports;
3076
3080
  }
3077
3081
  return c;
3078
3082
  }
3079
- function Ir(a, o) {
3083
+ function xr(a, o) {
3080
3084
  return Dt(a, St(a), o);
3081
3085
  }
3082
3086
  function Nr(a) {
@@ -3090,9 +3094,9 @@ Me.exports;
3090
3094
  var c = Rn(a, o);
3091
3095
  return wr(c) ? c : void 0;
3092
3096
  }
3093
- var St = wt ? xe(wt, Object) : Ur, j = _r;
3097
+ var St = wt ? Ie(wt, Object) : Ur, j = _r;
3094
3098
  (Ne && j(new Ne(new ArrayBuffer(1))) != ue || te && j(new te()) != g || Pe && j(Pe.resolve()) != N || Ce && j(new Ce()) != W || Re && j(new Re()) != q) && (j = function(a) {
3095
- var o = de.call(a), c = o == I ? a.constructor : void 0, l = c ? z(c) : void 0;
3099
+ var o = de.call(a), c = o == x ? a.constructor : void 0, l = c ? z(c) : void 0;
3096
3100
  if (l)
3097
3101
  switch (l) {
3098
3102
  case Un:
@@ -3137,7 +3141,7 @@ Me.exports;
3137
3141
  return Er(a, l);
3138
3142
  case g:
3139
3143
  return Dr(a, l, c);
3140
- case x:
3144
+ case I:
3141
3145
  case S:
3142
3146
  return new M(a);
3143
3147
  case R:
@@ -3186,13 +3190,13 @@ Me.exports;
3186
3190
  }
3187
3191
  var Ae = Array.isArray;
3188
3192
  function Et(a) {
3189
- return a != null && Wr(a.length) && !xt(a);
3193
+ return a != null && Wr(a.length) && !It(a);
3190
3194
  }
3191
3195
  function Fr(a) {
3192
3196
  return qr(a) && Et(a);
3193
3197
  }
3194
3198
  var Lr = Wn || jr;
3195
- function xt(a) {
3199
+ function It(a) {
3196
3200
  var o = he(a) ? de.call(a) : "";
3197
3201
  return o == _ || o == y;
3198
3202
  }
@@ -3576,15 +3580,15 @@ const Zo = (e, t, n) => {
3576
3580
  for (let y = s; y <= u; y += 60 * 60 * 1e3)
3577
3581
  if (t)
3578
3582
  for (const g in t)
3579
- t[g].forEach((x) => {
3583
+ t[g].forEach((I) => {
3580
3584
  f += i.next(50, 500);
3581
- const I = {
3582
- [g]: x,
3585
+ const x = {
3586
+ [g]: I,
3583
3587
  [e.name]: f
3584
3588
  }, N = {
3585
3589
  version: "1.0",
3586
3590
  timestamp: new Date(y).toISOString(),
3587
- event: I
3591
+ event: x
3588
3592
  };
3589
3593
  d.push(N);
3590
3594
  });
@@ -3664,22 +3668,22 @@ const Zo = (e, t, n) => {
3664
3668
  }, Ko = (e, t, n) => {
3665
3669
  const r = Math.floor(Math.random() * 9991) + 10, i = new Qe(r), s = Date.now() - 6 * 60 * 60 * 1e3, u = Date.now(), d = new Date((s + u) / 2).toISOString(), f = [];
3666
3670
  if (t) {
3667
- const y = Object.keys(t), g = Object.values(t), x = (I, N) => {
3671
+ const y = Object.keys(t), g = Object.values(t), I = (x, N) => {
3668
3672
  if (N === y.length) {
3669
3673
  e.forEach((R) => {
3670
- I[R.name] = i.next(1e3, 5e7);
3674
+ x[R.name] = i.next(1e3, 5e7);
3671
3675
  }), f.push({
3672
3676
  version: "1.0",
3673
3677
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
3674
- event: { ...I }
3678
+ event: { ...x }
3675
3679
  });
3676
3680
  return;
3677
3681
  }
3678
3682
  g[N].forEach((R) => {
3679
- x({ ...I, [y[N]]: R }, N + 1);
3683
+ I({ ...x, [y[N]]: R }, N + 1);
3680
3684
  });
3681
3685
  };
3682
- x({}, 0);
3686
+ I({}, 0);
3683
3687
  } else {
3684
3688
  const y = {};
3685
3689
  e.forEach((g) => {
@@ -3787,9 +3791,9 @@ export {
3787
3791
  bn as rand,
3788
3792
  ko as relativeTimeRangeValuesRequestV2,
3789
3793
  $r as relativeTimeRangeValuesV4,
3790
- xo as reportChartTypes,
3794
+ Io as reportChartTypes,
3791
3795
  Xr as requestFilterTypeEmptyV2,
3792
- Io as requestFilterTypeEqualsV2,
3796
+ xo as requestFilterTypeEqualsV2,
3793
3797
  No as requestFilterTypeMetricV2,
3794
3798
  Po as requestFilterTypeWildcardV2,
3795
3799
  ma as singleValueSchema,