@milaboratories/graph-maker 1.1.150 → 1.1.152

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 (98) hide show
  1. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.d.ts.map +1 -1
  2. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.js +2 -1
  3. package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.js.map +1 -1
  4. package/dist/GraphMaker/components/Chart.vue.js +3 -3
  5. package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
  6. package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.d.ts +3 -12
  7. package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.d.ts.map +1 -1
  8. package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.js +42 -85
  9. package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.js.map +1 -1
  10. package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.d.ts +1 -9
  11. package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.d.ts.map +1 -1
  12. package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.js +44 -89
  13. package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.js.map +1 -1
  14. package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.d.ts +1 -3
  15. package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.d.ts.map +1 -1
  16. package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.js +68 -86
  17. package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.js.map +1 -1
  18. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.d.ts +7 -11
  19. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.d.ts.map +1 -1
  20. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.js +48 -91
  21. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.js.map +1 -1
  22. package/dist/GraphMaker/components/DragAndDrop/types.d.ts +1 -21
  23. package/dist/GraphMaker/components/DragAndDrop/types.d.ts.map +1 -1
  24. package/dist/GraphMaker/components/PlColorSliderThumb.vue.js +18 -18
  25. package/dist/GraphMaker/components/PlColorSliderThumb.vue.js.map +1 -1
  26. package/dist/GraphMaker/constantsCommon.d.ts +0 -1
  27. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  28. package/dist/GraphMaker/constantsCommon.js +95 -95
  29. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  30. package/dist/GraphMaker/forms/DataMappingForm/DendroForm.vue.d.ts.map +1 -1
  31. package/dist/GraphMaker/forms/DataMappingForm/DendroForm.vue.js +128 -166
  32. package/dist/GraphMaker/forms/DataMappingForm/DendroForm.vue.js.map +1 -1
  33. package/dist/GraphMaker/forms/DataMappingForm/useBaskets.d.ts.map +1 -1
  34. package/dist/GraphMaker/forms/DataMappingForm/useBaskets.js +93 -131
  35. package/dist/GraphMaker/forms/DataMappingForm/useBaskets.js.map +1 -1
  36. package/dist/GraphMaker/forms/DataMappingForm/utils.d.ts +1 -1
  37. package/dist/GraphMaker/forms/DataMappingForm/utils.d.ts.map +1 -1
  38. package/dist/GraphMaker/forms/DataMappingForm/utils.js +79 -155
  39. package/dist/GraphMaker/forms/DataMappingForm/utils.js.map +1 -1
  40. package/dist/GraphMaker/forms/index.js +2 -2
  41. package/dist/GraphMaker/forms/index.js.map +1 -1
  42. package/dist/GraphMaker/icons/StackedAreaIcon.vue.d.ts +3 -0
  43. package/dist/GraphMaker/icons/StackedAreaIcon.vue.d.ts.map +1 -0
  44. package/dist/GraphMaker/icons/StackedAreaIcon.vue.js +19 -0
  45. package/dist/GraphMaker/icons/StackedAreaIcon.vue.js.map +1 -0
  46. package/dist/GraphMaker/index.vue.js +1 -1
  47. package/dist/GraphMaker/store.d.ts.map +1 -1
  48. package/dist/GraphMaker/store.js +43 -45
  49. package/dist/GraphMaker/store.js.map +1 -1
  50. package/dist/GraphMaker/types.d.ts +1 -1
  51. package/dist/GraphMaker/types.d.ts.map +1 -1
  52. package/dist/GraphMaker/utils/addFixedOptionsToState.js +2 -2
  53. package/dist/GraphMaker/utils/addFixedOptionsToState.js.map +1 -1
  54. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js +25 -25
  55. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
  56. package/dist/GraphMaker/utils/loadDefaultSources.d.ts +2 -3
  57. package/dist/GraphMaker/utils/loadDefaultSources.d.ts.map +1 -1
  58. package/dist/GraphMaker/utils/loadDefaultSources.js +47 -51
  59. package/dist/GraphMaker/utils/loadDefaultSources.js.map +1 -1
  60. package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
  61. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +39 -41
  62. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
  63. package/dist/lib.js +1 -1
  64. package/dist/node_modules/@milaboratories/helpers/dist/objects.js +33 -0
  65. package/dist/node_modules/@milaboratories/helpers/dist/objects.js.map +1 -0
  66. package/dist/node_modules/@milaboratories/helpers/dist/utils.js +12 -0
  67. package/dist/node_modules/@milaboratories/helpers/dist/utils.js.map +1 -0
  68. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +6 -5
  69. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +1 -1
  70. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +146 -149
  71. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js.map +1 -1
  72. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js +168 -221
  73. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js.map +1 -1
  74. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +95 -102
  75. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js +145 -156
  77. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js.map +1 -1
  78. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js +68 -75
  79. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js.map +1 -1
  80. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +154 -159
  81. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js.map +1 -1
  82. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js +48 -55
  83. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js.map +1 -1
  84. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +114 -122
  85. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
  86. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +111 -119
  87. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
  88. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +4 -4
  89. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +70 -69
  90. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
  91. package/dist/node_modules/@milaboratories/pf-plots/dist/spec.js +2 -2
  92. package/dist/node_modules/@milaboratories/pf-plots/dist/spec.js.map +1 -1
  93. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +184 -183
  94. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
  95. package/dist/node_modules/@vueuse/shared/index.js.map +1 -1
  96. package/package.json +4 -4
  97. package/dist/node_modules/@milaboratories/helpers/dist/index.js +0 -372
  98. package/dist/node_modules/@milaboratories/helpers/dist/index.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import q from "../../_virtual/canonicalize.js";
2
- import { FORMAT as M } from "../../constants.js";
3
- import { ControllerBase as z } from "../ControllerBase.js";
4
- import { ComponentController as S } from "../ComponentController.js";
5
- import { AxisId as w, columnOrAxisIdFromString as d, isColumnId as A } from "../../spec.js";
6
- import { checkSourceBySpecForFilters as U, createLinkerMap as J, getFiltersFromStates as R, getAxesSpecsFromSources as Q, getLinkerColumnsForSource as V, getColumnOrAxisValueLabelsId as B, getColumnOrAxisLabel as C, getColumnOrAxisSpec as W } from "../../utils.js";
7
- var Z = Object.defineProperty, _ = (c, e, t) => e in c ? Z(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t, E = (c, e, t) => _(c, typeof e != "symbol" ? e + "" : e, t);
8
- const ae = {
1
+ import Y from "../../_virtual/canonicalize.js";
2
+ import { FORMAT as E } from "../../constants.js";
3
+ import { ControllerBase as K } from "../ControllerBase.js";
4
+ import { ComponentController as m } from "../ComponentController.js";
5
+ import { AxisId as v, columnOrAxisIdFromString as g, isColumnId as b } from "../../spec.js";
6
+ import { createLinkerMap as V, createMultipliesByMap as q, getFiltersFromStates as H, getAxesSpecsFromSources as W, getLinkerColumnsForSource as M, getColumnOrAxisValueLabelsId as w, getColumnOrAxisLabel as x, getColumnOrAxisSpec as J } from "../../utils.js";
7
+ var R = Object.defineProperty, U = (u, e, t) => e in u ? R(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t, X = (u, e, t) => U(u, typeof e != "symbol" ? e + "" : e, t);
8
+ const te = {
9
9
  type: "heatmap",
10
10
  components: {
11
11
  value: { type: "simple", selectorStates: [] },
@@ -22,27 +22,27 @@ const ae = {
22
22
  },
23
23
  dividedAxes: {}
24
24
  };
25
- function j(c) {
26
- return c ? "kind" in c && c.kind === "PColumn" ? c.valueType === "String" : c.type === "String" : !0;
25
+ function N(u) {
26
+ return u ? "kind" in u && u.kind === "PColumn" ? u.valueType === "String" : u.type === "String" : !0;
27
27
  }
28
- function F(c, e) {
28
+ function I(u, e) {
29
29
  if (!e.length)
30
30
  return [];
31
- const t = e.map((u) => d(u)), l = Object.values(c.columnsData)[0].length, o = [];
32
- for (let u = 0; u < l; u++) {
33
- const s = t.map((g) => {
34
- const x = g.toCanonicalString();
35
- return A(g) ? c.columnsData[x][u] : c.axesData[x][u];
31
+ const t = e.map((i) => g(i)), r = Object.values(u.columnsData)[0].length, o = [];
32
+ for (let i = 0; i < r; i++) {
33
+ const a = t.map((f) => {
34
+ const B = f.toCanonicalString();
35
+ return b(f) ? u.columnsData[B][i] : u.axesData[B][i];
36
36
  }).join(", ");
37
- o.push(s);
37
+ o.push(a);
38
38
  }
39
39
  return o;
40
40
  }
41
- class le extends z {
41
+ class oe extends K {
42
42
  constructor() {
43
43
  super(
44
44
  {
45
- value: new S({
45
+ value: new m({
46
46
  componentName: "value",
47
47
  allowedTypes: ["Int", "Long", "Double", "Float", "String"],
48
48
  settings: {
@@ -52,7 +52,7 @@ class le extends z {
52
52
  required: !0
53
53
  }
54
54
  }),
55
- x: new S({
55
+ x: new m({
56
56
  componentName: "x",
57
57
  allowedTypes: ["Int", "String", "Long"],
58
58
  strictlyDependsOnParents: !0,
@@ -65,7 +65,7 @@ class le extends z {
65
65
  columnsAllowed: !1
66
66
  }
67
67
  }),
68
- xGroupBy: new S({
68
+ xGroupBy: new m({
69
69
  componentName: "xGroupBy",
70
70
  allowedTypes: ["Int", "String", "Long"],
71
71
  strictlyDependsOnParents: !0,
@@ -78,16 +78,16 @@ class le extends z {
78
78
  },
79
79
  dependsOn: ["x"],
80
80
  checkSourceBySpec: (e, t) => {
81
- const l = /* @__PURE__ */ new Set([
81
+ const r = /* @__PURE__ */ new Set([
82
82
  ...t.components.x.selectorStates.map((o) => o.selectedSource),
83
83
  ...t.components.xGroupBy.selectorStates.map((o) => o.selectedSource)
84
84
  ]);
85
- return "kind" in e && e.kind === "PColumn" ? w.fromAxesSpec(e.axesSpec).every(
86
- (o) => l.has(o.toCanonicalString())
85
+ return "kind" in e && e.kind === "PColumn" ? v.fromAxesSpec(e.axesSpec).every(
86
+ (o) => r.has(o.toCanonicalString())
87
87
  ) : !0;
88
88
  }
89
89
  }),
90
- y: new S({
90
+ y: new m({
91
91
  componentName: "y",
92
92
  allowedTypes: ["Int", "String", "Long"],
93
93
  strictlyDependsOnParents: !0,
@@ -100,7 +100,7 @@ class le extends z {
100
100
  columnsAllowed: !0
101
101
  }
102
102
  }),
103
- yGroupBy: new S({
103
+ yGroupBy: new m({
104
104
  componentName: "yGroupBy",
105
105
  allowedTypes: ["Int", "String", "Long"],
106
106
  strictlyDependsOnParents: !0,
@@ -113,16 +113,16 @@ class le extends z {
113
113
  },
114
114
  dependsOn: ["y"],
115
115
  checkSourceBySpec: (e, t) => {
116
- const l = /* @__PURE__ */ new Set([
116
+ const r = /* @__PURE__ */ new Set([
117
117
  ...t.components.y.selectorStates.map((o) => o.selectedSource),
118
118
  ...t.components.yGroupBy.selectorStates.map((o) => o.selectedSource)
119
119
  ]);
120
- return "kind" in e && e.kind === "PColumn" ? w.fromAxesSpec(e.axesSpec).every(
121
- (o) => l.has(o.toCanonicalString())
120
+ return "kind" in e && e.kind === "PColumn" ? v.fromAxesSpec(e.axesSpec).every(
121
+ (o) => r.has(o.toCanonicalString())
122
122
  ) : !0;
123
123
  }
124
124
  }),
125
- tooltipContent: new S({
125
+ tooltipContent: new m({
126
126
  componentName: "tooltipContent",
127
127
  allowedTypes: ["String", "Int", "Long", "Float", "Double"],
128
128
  strictlyDependsOnParents: !0,
@@ -134,7 +134,7 @@ class le extends z {
134
134
  multipleSelectors: !0
135
135
  }
136
136
  }),
137
- facetBy: new S({
137
+ facetBy: new m({
138
138
  componentName: "facetBy",
139
139
  allowedTypes: ["String", "Int", "Long"],
140
140
  strictlyDependsOnParents: !0,
@@ -146,7 +146,7 @@ class le extends z {
146
146
  multipleSelectors: !0
147
147
  }
148
148
  }),
149
- annotationsX: new S({
149
+ annotationsX: new m({
150
150
  componentName: "annotationsX",
151
151
  allowedTypes: ["Int", "Long", "Double", "Float", "String"],
152
152
  parentComponents: ["value"],
@@ -156,16 +156,16 @@ class le extends z {
156
156
  },
157
157
  dependsOn: ["x"],
158
158
  checkSourceBySpec: (e, t) => {
159
- const l = /* @__PURE__ */ new Set([
159
+ const r = /* @__PURE__ */ new Set([
160
160
  ...t.components.x.selectorStates.map((o) => o.selectedSource),
161
161
  ...t.components.xGroupBy.selectorStates.map((o) => o.selectedSource)
162
162
  ]);
163
- return "kind" in e && e.kind === "PColumn" ? w.fromAxesSpec(e.axesSpec).every(
164
- (o) => l.has(o.toCanonicalString())
165
- ) : l.has(w.fromAxisSpec(e).toCanonicalString());
163
+ return "kind" in e && e.kind === "PColumn" ? v.fromAxesSpec(e.axesSpec).every(
164
+ (o) => r.has(o.toCanonicalString())
165
+ ) : r.has(v.fromAxisSpec(e).toCanonicalString());
166
166
  }
167
167
  }),
168
- annotationsY: new S({
168
+ annotationsY: new m({
169
169
  componentName: "annotationsY",
170
170
  allowedTypes: ["Int", "Long", "Double", "Float", "String"],
171
171
  parentComponents: ["value"],
@@ -175,18 +175,18 @@ class le extends z {
175
175
  },
176
176
  dependsOn: ["y"],
177
177
  checkSourceBySpec: (e, t) => {
178
- const l = /* @__PURE__ */ new Set([
178
+ const r = /* @__PURE__ */ new Set([
179
179
  ...t.components.y.selectorStates.map((o) => o.selectedSource),
180
180
  ...t.components.yGroupBy.selectorStates.map((o) => o.selectedSource)
181
181
  ]);
182
- return "kind" in e && e.kind === "PColumn" ? w.fromAxesSpec(e.axesSpec).every(
183
- (o) => l.has(o.toCanonicalString())
184
- ) : l.has(w.fromAxisSpec(e).toCanonicalString());
182
+ return "kind" in e && e.kind === "PColumn" ? v.fromAxesSpec(e.axesSpec).every(
183
+ (o) => r.has(o.toCanonicalString())
184
+ ) : r.has(v.fromAxisSpec(e).toCanonicalString());
185
185
  }
186
186
  })
187
187
  },
188
188
  {
189
- filters: new S({
189
+ filters: new m({
190
190
  componentName: "filters",
191
191
  allowedTypes: ["String", "Int", "Long", "Double", "Long"],
192
192
  strictlyDependsOnParents: !0,
@@ -197,10 +197,9 @@ class le extends z {
197
197
  axesAllowed: !0,
198
198
  dimensionConsumer: !0,
199
199
  multipleSelectors: !0
200
- },
201
- checkSourceBySpec: U
200
+ }
202
201
  }),
203
- tabBy: new S({
202
+ tabBy: new m({
204
203
  componentName: "tabBy",
205
204
  allowedTypes: ["String", "Int"],
206
205
  strictlyDependsOnParents: !0,
@@ -213,30 +212,30 @@ class le extends z {
213
212
  }
214
213
  })
215
214
  }
216
- ), E(this, "dataInputs", ["value"]), E(this, "dontAllowUnfilteredHighCardinality", !0);
215
+ ), X(this, "dataInputs", ["value"]), X(this, "dontAllowUnfilteredHighCardinality", !0);
217
216
  }
218
- async getMustBeConsumedAxes(e, t) {
219
- if (!t.components.value.selectorStates.length)
217
+ getMustBeConsumedAxes(e, t) {
218
+ if (!e.components.value.selectorStates.length)
220
219
  return /* @__PURE__ */ new Set();
221
- const l = t.components.value.selectorStates[0].selectedSource, o = await e.pFrameProvider.getColumnSpecById(d(l));
222
- return o ? new Set(o.axesSpec.map((u) => w.fromAxisSpec(u).toCanonicalString())) : /* @__PURE__ */ new Set();
220
+ const r = e.components.value.selectorStates[0].selectedSource, o = t.get(r);
221
+ return !o || o.kind !== "column" ? /* @__PURE__ */ new Set() : new Set(o.spec.axesSpec.map((i) => v.fromAxisSpec(i).toCanonicalString()));
223
222
  }
224
223
  async createDataByColumns(e, t) {
225
- var l;
226
- const o = (l = t.components.value.selectorStates[0]) == null ? void 0 : l.selectedSource;
224
+ var r;
225
+ const o = (r = t.components.value.selectorStates[0]) == null ? void 0 : r.selectedSource;
227
226
  if (!o)
228
227
  throw Error("Value column is not valid");
229
- const u = d(o);
230
- if (!A(u))
228
+ const i = g(o);
229
+ if (!b(i))
231
230
  throw Error("Value column is not valid");
232
- const s = {
231
+ const a = {
233
232
  type: "columns",
234
- id: q(t.components) ?? "",
233
+ id: Y(t.components) ?? "",
235
234
  values: {}
236
- }, g = await J(e), x = [
235
+ }, f = await V(e), B = await q(e), P = [
237
236
  ...t.components.filters.selectorStates,
238
237
  ...t.components.tabBy.selectorStates
239
- ], T = R(x), N = x.map((a) => d(a.selectedSource)).filter(A), b = [o], O = await Q(e, b), f = [
238
+ ], k = H(P), T = P.map((l) => g(l.selectedSource)).filter(b), A = [o], C = await W(e, A), F = [
240
239
  t.components.facetBy,
241
240
  t.components.annotationsX,
242
241
  t.components.annotationsY,
@@ -245,188 +244,184 @@ class le extends z {
245
244
  t.components.xGroupBy,
246
245
  t.components.yGroupBy,
247
246
  t.components.tooltipContent
248
- ], h = [], I = [[]], D = [], P = [];
249
- for (const { selectedSource: a, fixedAxes: i } of x)
250
- P.push(...await V(
247
+ ], h = [], L = [];
248
+ for (const { selectedSource: l } of P)
249
+ L.push(...await M(
251
250
  e,
252
- g,
253
- O,
254
- a,
255
- i
256
- )), I.push(
257
- (i ?? []).map(({ axisIdx: G, axisValue: k }) => ({ idx: G, value: k }))
258
- );
259
- for (const a of f)
260
- for (const { selectedSource: i, fixedAxes: G } of a.selectorStates) {
261
- h.push(d(i)), D.push(
262
- (G ?? []).map(({ axisIdx: Y, axisValue: H }) => ({ idx: Y, value: H }))
263
- ), P.push(...await V(
251
+ f,
252
+ B,
253
+ C,
254
+ l
255
+ ));
256
+ for (const l of F)
257
+ for (const { selectedSource: p } of l.selectorStates) {
258
+ h.push(g(p)), L.push(...await M(
264
259
  e,
265
- g,
266
- O,
267
- i,
268
- G
260
+ f,
261
+ B,
262
+ C,
263
+ p
269
264
  ));
270
- const k = await B(e, i, b);
271
- k && h.push(k);
265
+ const j = await w(e, p, A);
266
+ j && h.push(j);
272
267
  }
273
268
  const y = await e.pFrameProvider.getTableOuterJoin(
274
- [u, ...P, ...N],
269
+ [i, ...L, ...T],
275
270
  h,
276
- T,
277
- !0,
278
- I,
279
- D
271
+ k,
272
+ !0
280
273
  );
281
- h.forEach((a) => {
282
- const i = a.toCanonicalString();
283
- s.values[i] = A(a) ? y.columnsData[i] : y.axesData[i];
284
- }), s.values[u.toCanonicalString()] = y.columnsData[u.toCanonicalString()];
285
- const n = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map((a) => a.selectedSource), r = n.join(", ");
286
- s.values[r] = F(y, n);
287
- const p = t.components.x.selectorStates.map((a) => a.selectedSource), m = await Promise.all(
288
- p.map(
289
- async (a) => {
290
- var i;
291
- return ((i = await B(e, a, b)) == null ? void 0 : i.toCanonicalString()) ?? a;
274
+ h.forEach((l) => {
275
+ const p = l.toCanonicalString();
276
+ a.values[p] = b(l) ? y.columnsData[p] : y.axesData[p];
277
+ }), a.values[i.toCanonicalString()] = y.columnsData[i.toCanonicalString()];
278
+ const G = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map((l) => l.selectedSource), n = G.join(", ");
279
+ a.values[n] = I(y, G);
280
+ const c = t.components.x.selectorStates.map((l) => l.selectedSource), S = await Promise.all(
281
+ c.map(
282
+ async (l) => {
283
+ var p;
284
+ return ((p = await w(e, l, A)) == null ? void 0 : p.toCanonicalString()) ?? l;
292
285
  }
293
286
  )
294
287
  );
295
- s.values.xLabelsKey = F(y, m);
296
- const v = t.components.y.selectorStates.concat(t.components.yGroupBy.selectorStates).map((a) => a.selectedSource), L = v.join(", ");
297
- s.values[L] = F(y, v);
298
- const K = t.components.y.selectorStates.map((a) => a.selectedSource), X = await Promise.all(
299
- K.map(
300
- async (a) => {
301
- var i;
302
- return ((i = await B(e, a, b)) == null ? void 0 : i.toCanonicalString()) ?? a;
288
+ a.values.xLabelsKey = I(y, S);
289
+ const s = t.components.y.selectorStates.concat(t.components.yGroupBy.selectorStates).map((l) => l.selectedSource), d = s.join(", ");
290
+ a.values[d] = I(y, s);
291
+ const O = t.components.y.selectorStates.map((l) => l.selectedSource), D = await Promise.all(
292
+ O.map(
293
+ async (l) => {
294
+ var p;
295
+ return ((p = await w(e, l, A)) == null ? void 0 : p.toCanonicalString()) ?? l;
303
296
  }
304
297
  )
305
298
  );
306
- return s.values.yLabelsKey = F(y, X), { byColumns: s };
299
+ return a.values.yLabelsKey = I(y, D), { byColumns: a };
307
300
  }
308
301
  async createChartSettings(e, t) {
309
- var l;
310
- const o = (l = t.components.value.selectorStates[0]) == null ? void 0 : l.selectedSource;
302
+ var r;
303
+ const o = (r = t.components.value.selectorStates[0]) == null ? void 0 : r.selectedSource;
311
304
  if (!o)
312
305
  throw Error("Value column is not valid");
313
- const u = d(o);
314
- if (!A(u))
306
+ const i = g(o);
307
+ if (!b(i))
315
308
  throw Error("Value column is not valid");
316
- const s = [o], g = {
309
+ const a = [o], f = {
317
310
  type: "column",
318
311
  value: o,
319
- label: await C(e, o, [])
320
- }, x = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map(({ selectedSource: n }) => d(n)).map((n) => n.toCanonicalString()).join(", "), T = t.components.y.selectorStates.concat(t.components.yGroupBy.selectorStates).map(({ selectedSource: n }) => d(n)).map((n) => n.toCanonicalString()).join(", "), N = await Promise.all(
312
+ label: await x(e, o, [])
313
+ }, B = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map(({ selectedSource: n }) => g(n)).map((n) => n.toCanonicalString()).join(", "), P = t.components.y.selectorStates.concat(t.components.yGroupBy.selectorStates).map(({ selectedSource: n }) => g(n)).map((n) => n.toCanonicalString()).join(", "), k = await Promise.all(
321
314
  t.components.facetBy.selectorStates.map(async (n) => {
322
- var r;
315
+ var c;
323
316
  return {
324
317
  type: "column",
325
- value: ((r = await B(e, n.selectedSource, s)) == null ? void 0 : r.toCanonicalString()) ?? n.selectedSource
318
+ value: ((c = await w(e, n.selectedSource, a)) == null ? void 0 : c.toCanonicalString()) ?? n.selectedSource
326
319
  };
327
320
  })
328
- ), b = await Promise.all(
321
+ ), T = await Promise.all(
329
322
  t.components.xGroupBy.selectorStates.map(async (n) => {
330
- var r;
323
+ var c;
331
324
  return {
332
325
  type: "column",
333
- label: await C(e, n.selectedSource, s),
326
+ label: await x(e, n.selectedSource, a),
334
327
  value: n.selectedSource,
335
- valueLabels: ((r = await B(e, n.selectedSource, s)) == null ? void 0 : r.toCanonicalString()) ?? n.selectedSource
328
+ valueLabels: ((c = await w(e, n.selectedSource, a)) == null ? void 0 : c.toCanonicalString()) ?? n.selectedSource
336
329
  };
337
330
  })
338
- ), O = await Promise.all(
331
+ ), A = await Promise.all(
339
332
  t.components.yGroupBy.selectorStates.map(async (n) => {
340
- var r;
333
+ var c;
341
334
  return {
342
335
  type: "column",
343
- label: await C(e, n.selectedSource, s),
336
+ label: await x(e, n.selectedSource, a),
344
337
  value: n.selectedSource,
345
- valueLabels: ((r = await B(e, n.selectedSource, s)) == null ? void 0 : r.toCanonicalString()) ?? n.selectedSource
338
+ valueLabels: ((c = await w(e, n.selectedSource, a)) == null ? void 0 : c.toCanonicalString()) ?? n.selectedSource
346
339
  };
347
340
  })
348
- ), f = await e.pFrameProvider.getColumnSpecById(u), h = await Promise.all(
341
+ ), C = await e.pFrameProvider.getColumnSpecById(i), F = await Promise.all(
349
342
  t.components.annotationsX.selectorStates.map(async (n) => {
350
- var r;
351
- const p = n.selectedSource, m = d(p), v = A(m) ? await e.pFrameProvider.getColumnSpecById(m) : ((r = f == null ? void 0 : f.axesSpec) == null ? void 0 : r.find(
352
- (L) => w.fromAxisSpec(L).toCanonicalString() === p
343
+ var c, S;
344
+ const s = n.selectedSource, d = g(s), O = b(d) ? await e.pFrameProvider.getColumnSpecById(d) : ((c = C == null ? void 0 : C.axesSpec) == null ? void 0 : c.find(
345
+ (D) => v.fromAxisSpec(D).toCanonicalString() === s
353
346
  )) ?? null;
354
347
  return {
355
348
  axis: "x",
356
349
  valueColumn: {
357
350
  type: "column",
358
- value: p,
359
- label: await C(e, p, s)
351
+ value: s,
352
+ label: await x(e, s, a),
353
+ valueLabels: ((S = await w(e, s, a)) == null ? void 0 : S.toCanonicalString()) ?? s
360
354
  },
361
- type: j(v) ? "discrete" : "continuous"
355
+ type: N(O) ? "discrete" : "continuous"
362
356
  };
363
357
  })
364
- ), I = await Promise.all(
358
+ ), h = await Promise.all(
365
359
  t.components.annotationsY.selectorStates.map(async (n) => {
366
- var r;
367
- const p = n.selectedSource, m = d(p), v = A(m) ? await e.pFrameProvider.getColumnSpecById(m) : ((r = f == null ? void 0 : f.axesSpec) == null ? void 0 : r.find(
368
- (L) => w.fromAxisSpec(L).toCanonicalString() === p
360
+ var c, S;
361
+ const s = n.selectedSource, d = g(s), O = b(d) ? await e.pFrameProvider.getColumnSpecById(d) : ((c = C == null ? void 0 : C.axesSpec) == null ? void 0 : c.find(
362
+ (D) => v.fromAxisSpec(D).toCanonicalString() === s
369
363
  )) ?? null;
370
364
  return {
371
365
  axis: "y",
372
366
  valueColumn: {
373
367
  type: "column",
374
- value: p,
375
- label: await C(e, p, s)
368
+ value: s,
369
+ label: await x(e, s, a),
370
+ valueLabels: ((S = await w(e, s, a)) == null ? void 0 : S.toCanonicalString()) ?? s
376
371
  },
377
- type: j(v) ? "discrete" : "continuous"
372
+ type: N(O) ? "discrete" : "continuous"
378
373
  };
379
374
  })
380
- ), D = (await Promise.all(
375
+ ), L = (await Promise.all(
381
376
  t.components.x.selectorStates.map(
382
- (n) => C(e, n.selectedSource, s)
377
+ (n) => x(e, n.selectedSource, a)
383
378
  )
384
- )).join(", "), P = (await Promise.all(
379
+ )).join(", "), y = (await Promise.all(
385
380
  t.components.y.selectorStates.map(
386
- (n) => C(e, n.selectedSource, s)
381
+ (n) => x(e, n.selectedSource, a)
387
382
  )
388
- )).join(", "), y = await Promise.all(
383
+ )).join(", "), G = await Promise.all(
389
384
  t.components.tooltipContent.selectorStates.map(async (n) => {
390
- var r, p;
391
- const m = n.selectedSource, v = await W(e, m, s);
385
+ var c, S;
386
+ const s = n.selectedSource, d = await J(e, s, a);
392
387
  return {
393
388
  type: "column",
394
- label: await C(e, m, s) || m,
395
- value: m,
396
- valueLabels: ((r = await B(e, m, s)) == null ? void 0 : r.toCanonicalString()) ?? m,
397
- format: ((p = v == null ? void 0 : v.annotations) == null ? void 0 : p[M]) ?? ".0%"
389
+ label: await x(e, s, a) || s,
390
+ value: s,
391
+ valueLabels: ((c = await w(e, s, a)) == null ? void 0 : c.toCanonicalString()) ?? s,
392
+ format: ((S = d == null ? void 0 : d.annotations) == null ? void 0 : S[E]) ?? ".0%"
398
393
  };
399
394
  })
400
395
  );
401
396
  return {
402
397
  type: "heatmap",
403
- valueColumn: g,
404
- valueType: j(f) ? "discrete" : "continuous",
398
+ valueColumn: f,
399
+ valueType: N(C) ? "discrete" : "continuous",
405
400
  xColumn: {
406
401
  type: "column",
407
- value: x,
408
- label: D,
402
+ value: B,
403
+ label: L,
409
404
  valueLabels: "xLabelsKey"
410
405
  },
411
406
  yColumn: {
412
407
  type: "column",
413
- value: T,
414
- label: P,
408
+ value: P,
409
+ label: y,
415
410
  valueLabels: "yLabelsKey"
416
411
  },
417
- facetBy: N,
418
- xGroupBy: b,
419
- yGroupBy: O,
420
- annotations: [...h, ...I],
412
+ facetBy: k,
413
+ xGroupBy: T,
414
+ yGroupBy: A,
415
+ annotations: [...F, ...h],
421
416
  tooltips: {
422
417
  show: !0,
423
- content: y
418
+ content: G
424
419
  }
425
420
  };
426
421
  }
427
422
  }
428
423
  export {
429
- le as HeatmapStateController,
430
- ae as InitialHeatmapState
424
+ oe as HeatmapStateController,
425
+ te as InitialHeatmapState
431
426
  };
432
427
  //# sourceMappingURL=heatmap.js.map