@astrato-io/visualizations 0.10.1 → 0.12.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +148 -5
  3. package/THIRD_PARTY_NOTICES.md +494 -0
  4. package/VISUALIZATION_DEFINITIONS.md +9 -146
  5. package/chunks/{Button-Dn3rJrYf.js → Button-CQdoKSXX.js} +3 -3
  6. package/chunks/{CircularProgress-BFeu06Yb.js → CircularProgress-DpT1lwWw.js} +20 -20
  7. package/chunks/FieldTypeIcon-Cg4F9Q5D.js +22 -0
  8. package/chunks/{LinearProgress-ClO6GUjN.js → LinearProgress-B7S0Q26A.js} +14 -14
  9. package/chunks/{MenuOption-Czc34u4q.js → MenuOption-DpKFJxmo.js} +167 -167
  10. package/chunks/{Title-BgYnaVTR.js → Title-m5damhc0.js} +37 -37
  11. package/chunks/{_createAggregator-BMu9uRax.js → _createAggregator-BA8_iU9q.js} +17 -17
  12. package/chunks/{app-filter-bar.compiler-CVir0wkl.js → app-filter-bar.compiler--T4Qz3Wu.js} +8 -8
  13. package/chunks/{bar-layout-C_UgRlVl.js → bar-layout-OFhxn2Go.js} +2 -2
  14. package/chunks/{bar.compiler-DYuFdi9J.js → bar.compiler-hWZBYYvV.js} +71 -69
  15. package/chunks/{builder-C-TKA-My.js → builder-7w_bgV_h.js} +106 -55
  16. package/chunks/{coloring-BtnPiQ_o.js → coloring-Cd6p0GQJ.js} +93 -88
  17. package/chunks/{createSimplePaletteValueFilter--zrZxRV9.js → createSimplePaletteValueFilter-CiJT8s1s.js} +169 -169
  18. package/chunks/defaults-CMFqXvaJ.js +3 -0
  19. package/chunks/{definitions-CT304NDn.js → definitions-DTauTjIX.js} +399 -398
  20. package/chunks/{escobar-CvEV2ES1.js → escobar-CMvphKSK.js} +4949 -4879
  21. package/chunks/{extend-preset-D9-JP92b.js → extend-preset-BpXttHFk.js} +449 -450
  22. package/chunks/{filter.compiler-CXeZznks.js → filter.compiler-DOGFweJz.js} +10 -10
  23. package/chunks/{filtering-8_bFv-jb.js → filtering-NOnDcGbo.js} +241 -241
  24. package/chunks/handlers-CyYFSfhM.js +15393 -0
  25. package/chunks/{icon-picker-styles-BXiJ1SZS.js → icon-picker-styles-DuSERhBU.js} +8 -8
  26. package/chunks/{isEqual-D8Ay63xR.js → isEqual-4f8yUUtC.js} +1 -1
  27. package/chunks/{isFocusVisible-Bu8gGZu5.js → isFocusVisible-Czm70MGc.js} +9 -9
  28. package/chunks/line.compiler-B-4H55_T.js +203 -0
  29. package/chunks/linear-Bq_r9l5S.js +264 -0
  30. package/chunks/{logger-DdZpR7xZ.js → logger-Cioob-QV.js} +74 -73
  31. package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
  32. package/chunks/{map.compiler-Q_Y1Pvat.js → map.compiler-Cv5V6EhF.js} +40 -40
  33. package/chunks/measure-axis-label-format-COy8U_dd.js +27 -0
  34. package/chunks/measure-format-default-B_kuGSzi.js +26 -0
  35. package/chunks/{metadata-BQm_TXI1.js → metadata-dGSe5UWy.js} +5 -5
  36. package/chunks/number.compiler-D7nMcEMv.js +57 -0
  37. package/chunks/{operations-DKQWuLL7.js → operations-CgfehCad.js} +11397 -11114
  38. package/chunks/{range-BdhzvYQ_.js → range-Dmwp9kVB.js} +2 -2
  39. package/chunks/{react-dom-BGP4tbXV.js → react-dom-CfuL-m78.js} +82 -82
  40. package/chunks/{render-wrappers-BZpyDnJy.js → render-wrappers--g-zPFBW.js} +1 -1
  41. package/chunks/{requirements-e8Fe96ag.js → requirements-DHayNJ2C.js} +245 -221
  42. package/chunks/{shared-C_2F90xq.js → shared-DoEN9nNM.js} +505 -494
  43. package/chunks/standalone-B3hRGgYi.js +773 -0
  44. package/chunks/{standalone-BkbiH-o8.js → standalone-BPNXgFft.js} +498 -759
  45. package/chunks/standalone-BPTT8XEu.js +424 -0
  46. package/chunks/standalone-BgAeHROc.js +2 -0
  47. package/chunks/{standalone-BE_ONgiG.js → standalone-BkQxag7M.js} +102 -102
  48. package/chunks/{standalone-Cc98Pdr6.js → standalone-Bxa3x6dg.js} +872 -872
  49. package/chunks/standalone-C0If-V6O.js +773 -0
  50. package/chunks/standalone-C1TOyflX.js +287 -0
  51. package/chunks/{standalone-CY_kjarf.js → standalone-CE5PwJN0.js} +18 -18
  52. package/chunks/{standalone-B8ZSqauS.js → standalone-CG7IFN6n.js} +120 -120
  53. package/chunks/{standalone-wOWRCpdn.js → standalone-CKlgGu80.js} +49 -49
  54. package/chunks/standalone-CNf-oA2U.js +355 -0
  55. package/chunks/{standalone-BDrXVxlP.js → standalone-CXPdWFlw.js} +14 -14
  56. package/chunks/{standalone-z0o52o5t.js → standalone-Cf0_5tbu.js} +5567 -5568
  57. package/chunks/{standalone-Cl0TSfqC.js → standalone-DMi4-Vp3.js} +122 -122
  58. package/chunks/{standalone-DNh9NcMa.js → standalone-DTEX67C8.js} +154 -154
  59. package/chunks/{standalone-DHRalbVO.js → standalone-DU46-kYv.js} +279 -279
  60. package/chunks/standalone-Dbn3jSH6.js +690 -0
  61. package/chunks/{standalone-CsoMmE9T.js → standalone-DdcAL_k_.js} +839 -843
  62. package/chunks/standalone-DwCIA0UG.js +1057 -0
  63. package/chunks/standalone-Dz13tl3P.js +357 -0
  64. package/chunks/standalone-H9GFzFk_.js +8377 -0
  65. package/chunks/{standalone-CaTxAydz.js → standalone-MduR0qre.js} +2227 -1000
  66. package/chunks/standalone-ejTz66P3.js +2 -0
  67. package/chunks/{standalone-DflyWtuR.js → standalone-keB-0wK3.js} +216 -216
  68. package/chunks/{standalone-BTY3w_JA.js → standalone-nnkuQd0K.js} +28 -28
  69. package/chunks/standalone-vGGR6Vcn.js +6 -0
  70. package/chunks/{table.compiler-COaHE9VD.js → table.compiler-mS4UvhLT.js} +31 -31
  71. package/chunks/theme-MYp6Rj1J.js +232 -0
  72. package/chunks/{useFieldName-CdnCWzhd.js → useFieldName-AdSak4Ch.js} +1 -1
  73. package/chunks/{utils-DganVptf.js → utils-CUKgR7it.js} +4216 -4070
  74. package/chunks/{view-Bzlros43.js → view-BeYwpcVD.js} +1561 -1561
  75. package/chunks/{visualization-filters-D7i6oh1Z.js → visualization-filters-B9qik5_K.js} +2683 -2342
  76. package/chunks/{with-html-element-CiIhFEa5.js → with-html-element-1GSeLT59.js} +3712 -3682
  77. package/definitions.js +2 -2
  78. package/docs/operations/astrato-app-filter-bar.md +1 -1
  79. package/docs/operations/bar.md +144 -32
  80. package/docs/operations/combo.md +79 -17
  81. package/docs/operations/date-picker.md +4 -4
  82. package/docs/operations/distribution-gauge.md +18 -16
  83. package/docs/operations/dot.md +107 -24
  84. package/docs/operations/filter.md +10 -8
  85. package/docs/operations/gauge.md +20 -18
  86. package/docs/operations/heatMap.md +73 -21
  87. package/docs/operations/histogram.md +45 -12
  88. package/docs/operations/iframe.md +1 -1
  89. package/docs/operations/image.md +1 -1
  90. package/docs/operations/index.md +12 -11
  91. package/docs/operations/line.md +86 -24
  92. package/docs/operations/map.md +5274 -0
  93. package/docs/operations/number.md +10 -9
  94. package/docs/operations/pie.md +23 -21
  95. package/docs/operations/radar.md +13 -11
  96. package/docs/operations/sankey.md +19 -17
  97. package/docs/operations/scatter.md +111 -28
  98. package/docs/operations/shape.md +5 -5
  99. package/docs/operations/simpleTextObject.md +4 -4
  100. package/docs/operations/slider.md +1 -1
  101. package/docs/operations/table.md +27 -25
  102. package/docs/operations/tree.md +5 -3
  103. package/docs/operations/treemap.md +70 -18
  104. package/docs/operations/waterfall.md +40 -7
  105. package/docs/operations/word-cloud.md +69 -17
  106. package/getters.js +3 -3
  107. package/index.js +585 -612
  108. package/metadata.js +2 -2
  109. package/operations.js +25 -18
  110. package/package.json +74 -70
  111. package/src/definitions/index.d.ts +1 -7
  112. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +3 -48
  113. package/src/definitions/model/definitions/schema-registry.d.ts +15 -14
  114. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +3 -3
  115. package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
  116. package/src/definitions/model/definitions/schemas/common.schema.d.ts +19 -6
  117. package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
  118. package/src/definitions/model/definitions/schemas/line.schema.d.ts +4 -3
  119. package/src/definitions/model/definitions/schemas/number.schema.d.ts +1 -1
  120. package/src/definitions/model/definitions/schemas/table.schema.d.ts +14 -14
  121. package/src/index.d.ts +1 -1
  122. package/src/operations/index.d.ts +11 -1
  123. package/src/types.d.ts +166 -1
  124. package/src/visualization-catalog.d.ts +3 -0
  125. package/styles.css +1 -1
  126. package/chunks/FieldTypeIcon-DrMoGpHJ.js +0 -22
  127. package/chunks/color-rules-DYJL4fIW.js +0 -15
  128. package/chunks/color-settings-DJFoFTip.js +0 -5
  129. package/chunks/defaults-Dtk7fg3C.js +0 -3
  130. package/chunks/handlers-C6CZ0XJA.js +0 -15399
  131. package/chunks/line.compiler-DmHpmQCC.js +0 -198
  132. package/chunks/number.compiler-DQdg6zTy.js +0 -53
  133. package/chunks/standalone-4MsKiqs0.js +0 -355
  134. package/chunks/standalone-B794g9pE.js +0 -1012
  135. package/chunks/standalone-BA2YXyJS.js +0 -422
  136. package/chunks/standalone-BgumbdaJ2.js +0 -357
  137. package/chunks/standalone-Blh4qejk.js +0 -689
  138. package/chunks/standalone-CXY4FpF7.js +0 -773
  139. package/chunks/standalone-DH0xTEes.js +0 -2
  140. package/chunks/standalone-DcnHjNnC.js +0 -2
  141. package/chunks/standalone-DrHdGkY7.js +0 -762
  142. package/chunks/standalone-c_rROMtx.js +0 -287
  143. package/chunks/standalone-drcFLeN6.js +0 -6
@@ -1,28 +1,26 @@
1
1
  import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Ac as n, Et as r, Ir as i, Oa as a, gs as o, yc as s } from "./visualization-filters-D7i6oh1Z.js";
3
- import { Cn as c } from "./utils-DganVptf.js";
4
- import { t as l } from "./color-rules-DYJL4fIW.js";
5
- import { r as u } from "./color-settings-DJFoFTip.js";
6
- import "./logger-DdZpR7xZ.js";
7
- import { t as d, u as f } from "./src-77e3mC7i.js";
8
- var p = (e, t, n) => e?.type === s.Single ? m(t, e.color ?? void 0) : e?.type === s.Categorical ? {
9
- ref: n || void 0,
10
- scale: s.Categorical
11
- } : e?.type === s.Gradient ? {
12
- ref: n || void 0,
13
- scale: s.Gradient
14
- } : m(t), m = (e, t) => t ?? e.colors.brandColors[0], h = (e, t, n, r, i, a = !1) => {
15
- let o = e?.coloring?.type;
16
- if ((o === s.Single || o === s.PerEachMeasure) && t.scales[o]?.range) {
17
- if (a) return {
18
- scale: o,
19
- ref: i || "color"
2
+ import { $c as n, Do as r, Pt as i, Ua as a, Us as o, Xs as s, Yr as c, u as l, ul as u } from "./visualization-filters-B9qik5_K.js";
3
+ import { Dn as d } from "./utils-CUKgR7it.js";
4
+ import "./logger-Cioob-QV.js";
5
+ import { t as f, u as p } from "./src-77e3mC7i.js";
6
+ var m = (e, t, r) => e?.type === n.Single ? h(t, e.color ?? void 0) : e?.type === n.Categorical ? {
7
+ ref: r || void 0,
8
+ scale: n.Categorical
9
+ } : e?.type === n.Gradient ? {
10
+ ref: r || void 0,
11
+ scale: n.Gradient
12
+ } : h(t), h = (e, t) => t ?? e.colors.brandColors[0], g = (e, t, r, i, a, o = !1) => {
13
+ let s = e?.coloring?.type;
14
+ if ((s === n.Single || s === n.PerEachMeasure) && t.scales[s]?.range) {
15
+ if (o) return {
16
+ scale: s,
17
+ ref: a || "color"
20
18
  };
21
- let n = e.measures.findIndex((e) => r?.dataItem === e.dataItem), s = t.scales[o].range?.[n];
22
- if (typeof s == "string") return s;
19
+ let n = e.measures.findIndex((e) => i?.dataItem === e.dataItem), r = t.scales[s].range?.[n];
20
+ if (typeof r == "string") return r;
23
21
  }
24
- return e?.coloring?.type === s.Single ? r?.graphColor ?? e?.coloring?.color ?? n.colors.brandColors[0] : p(e.coloring, n, i);
25
- }, g = (e, t) => {
22
+ return e?.coloring?.type === n.Single ? i?.graphColor ?? e?.coloring?.color ?? r.colors.brandColors[0] : m(e.coloring, r, a);
23
+ }, _ = (e, t) => {
26
24
  let n = null;
27
25
  if (t?.pattern) {
28
26
  let r = e.datum, i = Object.keys(r).reduce((e, t) => {
@@ -32,54 +30,54 @@ var p = (e, t, n) => e?.type === s.Single ? m(t, e.color ?? void 0) : e?.type ==
32
30
  t.itemsMap?.[o] || (n = a.grey3);
33
31
  }
34
32
  return n;
35
- }, _ = /* @__PURE__ */ t(((e, t) => {
33
+ }, v = /* @__PURE__ */ t(((e, t) => {
36
34
  var n = Math.max, r = Math.min;
37
35
  function i(e, t, i) {
38
36
  return e >= r(t, i) && e < n(t, i);
39
37
  }
40
38
  t.exports = i;
41
- })), v = /* @__PURE__ */ t(((e, t) => {
42
- var n = c(), r = Infinity, i = 17976931348623157e292;
39
+ })), y = /* @__PURE__ */ t(((e, t) => {
40
+ var n = d(), r = Infinity, i = 17976931348623157e292;
43
41
  function a(e) {
44
42
  return e ? (e = n(e), e === r || e === -r ? (e < 0 ? -1 : 1) * i : e === e ? e : 0) : e === 0 ? e : 0;
45
43
  }
46
44
  t.exports = a;
47
- })), y = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
48
- var n = _(), r = v(), i = c();
45
+ })), b = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
46
+ var n = v(), r = y(), i = d();
49
47
  function a(e, t, a) {
50
48
  return t = r(t), a === void 0 ? (a = t, t = 0) : a = r(a), e = i(e), n(e, t, a);
51
49
  }
52
50
  t.exports = a;
53
- })))()), b = /* @__PURE__ */ e(r()), x = (e) => typeof e == "string" ? e : `${e}`, S = [
51
+ })))()), x = /* @__PURE__ */ e(i()), S = (e) => typeof e == "string" ? e : `${e}`, C = [
54
52
  "equals",
55
53
  "contains",
56
54
  "startsWith",
57
55
  "endsWith"
58
- ], C = [
56
+ ], w = [
59
57
  "greater",
60
58
  "less",
61
59
  "greater-equals",
62
60
  "less-equals",
63
61
  "between",
64
62
  "not-equals"
65
- ], w = ["inList", "notInList"], T = (e) => o(e) || typeof e != "string" || e.length === 0 ? "," : e, E = (e, t) => {
66
- if (o(e.value)) return !1;
63
+ ], T = ["inList", "notInList"], E = (e) => s(e) || typeof e != "string" || e.length === 0 ? "," : e, D = (e, t) => {
64
+ if (s(e.value)) return !1;
67
65
  let n = e.operator || "equals";
68
- return S.includes(n) ? O(e, t) : C.includes(n) ? k(e, t) : w.includes(n) ? D(e, t) : !1;
66
+ return C.includes(n) ? k(e, t) : w.includes(n) ? A(e, t) : T.includes(n) ? O(e, t) : !1;
69
67
  };
70
- function D(e, t) {
68
+ function O(e, t) {
71
69
  let n = e.operator;
72
70
  if (t == null || e?.value === null || e?.value === void 0) return !1;
73
- let r = x(t), i = x(e.value), a = T(e.delimiter), o = new Set(i.split(a).map((e) => e.trim()).filter((e) => e.length > 0));
71
+ let r = S(t), i = S(e.value), a = E(e.delimiter), o = new Set(i.split(a).map((e) => e.trim()).filter((e) => e.length > 0));
74
72
  if (o.size === 0) return !1;
75
73
  let s = o.has(r);
76
74
  return n === "notInList" ? !s : s;
77
75
  }
78
- function O(e, t) {
79
- let n = x(t), r = e?.value, i = e.operator || "equals";
76
+ function k(e, t) {
77
+ let n = S(t), r = e?.value, i = e.operator || "equals";
80
78
  if (i === "equals") return r === n;
81
79
  if (t == null || r == null || r === "") return !1;
82
- let a = x(r);
80
+ let a = S(r);
83
81
  switch (i) {
84
82
  case "contains": return n.includes(a);
85
83
  case "startsWith": return n.startsWith(a);
@@ -87,10 +85,10 @@ function O(e, t) {
87
85
  default: return !1;
88
86
  }
89
87
  }
90
- function k(e, t) {
88
+ function A(e, t) {
91
89
  let n = Number(t), r = Number(e?.value), i = e.operator || "equals";
92
90
  if (i === "equals") return r === n;
93
- if ((0, b.default)(t) || (0, b.default)(r) || Number.isNaN(n) || Number.isNaN(r)) return !1;
91
+ if ((0, x.default)(t) || (0, x.default)(r) || Number.isNaN(n) || Number.isNaN(r)) return !1;
94
92
  switch (i) {
95
93
  case "greater": return n > r;
96
94
  case "less": return n < r;
@@ -98,14 +96,14 @@ function k(e, t) {
98
96
  case "less-equals": return n <= r;
99
97
  case "between": {
100
98
  let t = Number(e.secondValue);
101
- return (0, b.default)(t) || Number.isNaN(t) ? !1 : (0, y.default)(n, r, t);
99
+ return (0, x.default)(t) || Number.isNaN(t) ? !1 : (0, b.default)(n, r, t);
102
100
  }
103
101
  case "not-equals": return n !== r;
104
102
  default: return !1;
105
103
  }
106
104
  }
107
- d();
108
- var A = i("color-manager", "#3f6212"), j = (e, t) => {
105
+ f();
106
+ var j = c("color-manager", "#3f6212"), M = (e, t) => {
109
107
  if (t === "null") return null;
110
108
  switch (typeof e) {
111
109
  case "boolean": return typeof t == "boolean" ? t : String(t).toLowerCase() === "true";
@@ -113,46 +111,46 @@ var A = i("color-manager", "#3f6212"), j = (e, t) => {
113
111
  case "number": return typeof t == "string" ? parseFloat(t) : Number(t);
114
112
  default: return t;
115
113
  }
116
- }, M = (e) => o(e) || typeof e != "string" || e.length === 0 ? "," : e, N = (e) => {
114
+ }, N = (e) => s(e) || typeof e != "string" || e.length === 0 ? "," : e, P = (e) => {
117
115
  if (typeof e.value != "string" && typeof e.value != "number") return [];
118
- let t = M(typeof e.delimiter == "string" ? e.delimiter : void 0);
116
+ let t = N(typeof e.delimiter == "string" ? e.delimiter : void 0);
119
117
  return String(e.value).split(t).map((e) => e.trim()).filter((e) => e.length > 0);
120
- }, P = (e, t) => {
118
+ }, F = (e, t) => {
121
119
  let n = String(e);
122
120
  if (t[n]) return t[n];
123
121
  let r = n.split("").reverse().reduce((e, t, n) => e + t.charCodeAt(0) * (1 + n), 0);
124
122
  return t[n] = r, r;
125
- }, F = (e, t) => {
126
- if ((0, b.default)(e.value)) return !1;
127
- if (o(e.value) || u(e.value)) return A.warn("Color rule not preprocessed correctly - ignoring", e), !1;
128
- let n = j(t, e.value);
129
- if ([l.InList, l.NotInList].includes(e.operator)) {
130
- let n = N(e);
123
+ }, I = (e, t) => {
124
+ if ((0, x.default)(e.value)) return !1;
125
+ if (s(e.value) || r(e.value)) return j.warn("Color rule not preprocessed correctly - ignoring", e), !1;
126
+ let n = M(t, e.value);
127
+ if ([o.InList, o.NotInList].includes(e.operator)) {
128
+ let n = P(e);
131
129
  if (n.length === 0) return !1;
132
- let r = new Set(n.map((e) => j(t, e))).has(t);
133
- return e.operator === l.NotInList ? !r : r;
130
+ let r = new Set(n.map((e) => M(t, e))).has(t);
131
+ return e.operator === o.NotInList ? !r : r;
134
132
  }
135
133
  if (typeof t != "number") switch (e.operator) {
136
- case l.Equals: return t === n;
137
- case l.NotEquals: return t !== n;
134
+ case o.Equals: return t === n;
135
+ case o.NotEquals: return t !== n;
138
136
  default: return !1;
139
137
  }
140
138
  switch (e.operator) {
141
- case l.Equals: return t === n;
142
- case l.Greater: return t > n;
143
- case l.Less: return t < n;
144
- case l.GreaterEquals: return t >= n;
145
- case l.LessEquals: return t <= n;
146
- case l.Between: {
147
- if ((0, b.default)(e.secondValue)) return !1;
148
- if (o(e.secondValue) || u(e.secondValue)) return A.warn("Color rule not preprocessed correctly - ignoring", e), !1;
149
- let r = j(t, e.secondValue);
150
- return n <= t && t <= r;
139
+ case o.Equals: return t === n;
140
+ case o.Greater: return t > n;
141
+ case o.Less: return t < n;
142
+ case o.GreaterEquals: return t >= n;
143
+ case o.LessEquals: return t <= n;
144
+ case o.Between: {
145
+ if ((0, x.default)(e.secondValue)) return !1;
146
+ if (s(e.secondValue) || r(e.secondValue)) return j.warn("Color rule not preprocessed correctly - ignoring", e), !1;
147
+ let i = M(t, e.secondValue);
148
+ return n <= t && t <= i;
151
149
  }
152
- case l.NotEquals: return t !== n;
150
+ case o.NotEquals: return t !== n;
153
151
  default: return !1;
154
152
  }
155
- }, I = (e) => typeof e == "string" ? parseFloat(e) : e, L = {}, R = class {
153
+ }, L = (e) => typeof e == "string" ? parseFloat(e) : e, R = {}, z = class {
156
154
  vSpec;
157
155
  vTheme;
158
156
  notAffectedItems;
@@ -174,7 +172,7 @@ var A = i("color-manager", "#3f6212"), j = (e, t) => {
174
172
  let i = e[r], a = this.resolveColorOverwriteValues(i, n);
175
173
  if (!this.hasUnresolvedSupportingMeasureValue(i, n)) for (let e = 0; e < t.length; e++) {
176
174
  let r = t[e];
177
- if (E(a, this.getValueFromProp(n, r))) return a?.color;
175
+ if (D(a, this.getValueFromProp(n, r))) return a?.color;
178
176
  }
179
177
  }
180
178
  return null;
@@ -189,7 +187,7 @@ var A = i("color-manager", "#3f6212"), j = (e, t) => {
189
187
  let r = i[t], a = this.resolveColorOverwriteValues(r, e);
190
188
  if (this.hasUnresolvedSupportingMeasureValue(r, e)) continue;
191
189
  let o = this.getValueFromProp(e, n || this.MAIN_FIELD);
192
- if ((a.operator || "equals") === "equals" && (a?.value === o || a?.value === x(o)) || E(a, o)) return a?.color;
190
+ if ((a.operator || "equals") === "equals" && (a?.value === o || a?.value === S(o)) || D(a, o)) return a?.color;
193
191
  }
194
192
  return null;
195
193
  }
@@ -197,17 +195,17 @@ var A = i("color-manager", "#3f6212"), j = (e, t) => {
197
195
  return this.vSpec.coloring?.rules?.find((t) => {
198
196
  if (e.datum.series && !e.datum.series.source && e.datum.series.value !== t.dataItemId) return !1;
199
197
  let n = e.datum[t.dataItemId]?.value;
200
- return n !== void 0 && F(this.resolveColorRuleValues(t, e), I(n));
198
+ return n !== void 0 && I(this.resolveColorRuleValues(t, e), L(n));
201
199
  })?.color || null;
202
200
  }
203
201
  getHash(e) {
204
- return P(e, L);
202
+ return F(e, R);
205
203
  }
206
204
  getValueFromProp(e, t, n) {
207
205
  return t === this.MAIN_FIELD ? e.datum?.value : e.datum[t || n || ""]?.value;
208
206
  }
209
207
  resolveColoringConditionValue(e, t) {
210
- return u(e) ? t.datum[e.dataItemId]?.value : e;
208
+ return r(e) ? t.datum[e.dataItemId]?.value : e;
211
209
  }
212
210
  resolveColorRuleValues(e, t) {
213
211
  return {
@@ -224,31 +222,38 @@ var A = i("color-manager", "#3f6212"), j = (e, t) => {
224
222
  };
225
223
  }
226
224
  hasUnresolvedSupportingMeasureValue(e, t) {
227
- return [e.value, e.secondValue].some((e) => u(e) && this.resolveColoringConditionValue(e, t) === void 0);
225
+ return [e.value, e.secondValue].some((e) => r(e) && this.resolveColoringConditionValue(e, t) === void 0);
226
+ }
227
+ getThemeCategoryColor(e) {
228
+ let t = l(this.vTheme);
229
+ if (t.null && e == null) return t.null;
230
+ let n = this.vSpec.querySettings?.topN;
231
+ if (t.others && n?.enabled && n.showOthers && e === (n.othersLabel?.stringLabel ?? "Others")) return t.others;
228
232
  }
229
233
  getColorByScale(e, t = {}) {
230
- let { ref: n, dataItemId: r } = t;
234
+ let { ref: r, dataItemId: i } = t;
231
235
  switch (this.vSpec.coloring?.type) {
232
- case s.Categorical: {
233
- let t = e.resources.scale(s.Categorical), i = r || this.getValueFromProp(e, n, "color");
234
- if (this.vSpec.coloring.persistentColors === !1) return t(i);
235
- let a = t.range();
236
- return a[this.getHash(i) % a.length];
236
+ case n.Categorical: {
237
+ let t = e.resources.scale(n.Categorical), a = i || this.getValueFromProp(e, r, "color"), o = this.getThemeCategoryColor(a);
238
+ if (o) return o;
239
+ if (this.vSpec.coloring.persistentColors === !1) return t(a);
240
+ let s = t.range();
241
+ return s[this.getHash(a) % s.length];
237
242
  }
238
- case s.Gradient: {
239
- let t = e.resources.scale(s.Gradient)(r || this.getValueFromProp(e, n, "end"));
243
+ case n.Gradient: {
244
+ let t = e.resources.scale(n.Gradient)(i || this.getValueFromProp(e, r, "end"));
240
245
  return Number.isNaN(t) ? "#000000" : t;
241
246
  }
242
- case s.PerEachMeasure: return e.resources.scale(s.PerEachMeasure)(r || this.getValueFromProp(e, n, "color"));
243
- case s.Single: return e.resources.scale(s.Single)(r || this.getValueFromProp(e, n, "color"));
247
+ case n.PerEachMeasure: return e.resources.scale(n.PerEachMeasure)(i || this.getValueFromProp(e, r, "color"));
248
+ case n.Single: return e.resources.scale(n.Single)(i || this.getValueFromProp(e, r, "color"));
244
249
  default: return this.getSimpleColor();
245
250
  }
246
251
  }
247
252
  overrideColorOpacity(e, t) {
248
- return !e || !t ? e : f(e).copy({ opacity: t }).toString();
253
+ return !e || !t ? e : p(e).copy({ opacity: t }).toString();
249
254
  }
250
255
  getFilteredColor(e, t) {
251
- return g(e, t);
256
+ return _(e, t);
252
257
  }
253
258
  getColorDefinition(e, t) {
254
259
  return (n) => {
@@ -268,11 +273,11 @@ var A = i("color-manager", "#3f6212"), j = (e, t) => {
268
273
  };
269
274
  }
270
275
  getMeasureColor(e, t) {
271
- let r = this.vSpec?.coloring?.type, i = this.vSpec.measures.findIndex((e) => n(t?.dataItem, e.dataItem)), a = r ? e.scales[r]?.range?.[i] : void 0;
272
- return typeof a == "string" ? a : t?.graphColor ?? this.vSpec?.coloring?.color ?? this.vTheme.colors.brandColors[0];
276
+ let n = this.vSpec?.coloring?.type, r = this.vSpec.measures.findIndex((e) => u(t?.dataItem, e.dataItem)), i = n ? e.scales[n]?.range?.[r] : void 0;
277
+ return typeof i == "string" ? i : t?.graphColor ?? this.vSpec?.coloring?.color ?? this.vTheme.colors.brandColors[0];
273
278
  }
274
279
  static getColorWithCallback(e, t) {
275
280
  return (n) => t(typeof e == "function" ? e(n) : e, n);
276
281
  }
277
282
  };
278
- export { g as a, v as i, F as n, h as o, E as r, m as s, R as t };
283
+ export { y as a, h as c, D as i, F as n, _ as o, I as r, g as s, z as t };